Professional Documents
Culture Documents
All Praises and Glory to Almighty Allah without his help no work can be accomplished.
Acknowledgement is due to King Fahd University of Petroleum and Minerals for its
unlimited moral and financial support to accomplish this task.
Abdelaziz BAZOUNE
Lecturer
Mechanical Engineering Department
July 2000
Objective
► The status of the existing equipment was assessed. Since most of the
equipment were left idle for a prolonged period of time, the power circuits
were the most frequent failure (Signal Analyzer, Vibration meters,
Stroboscope, Chart Recorder, The Ball and Beam Apparatus, etc.).
Toward the second objective, changes are proposed for the lecture sequence and
laboratory content. Table 1 shows the proposed course plan along with the
laboratory assignment. The Laboratory assignment is composed of several
laboratory sessions. The main content of Session is shown in Table 2. The details of
the sessions are given in the next part.
Many Sections of the previous work of Mr. Abdelaziz Bazoune for the Lab Manual of
ME 413 has been utilized in this manual.
[1] D. M. Etter, “Engineering Problem Solving with MATLAB® ”, Second Edition, 1997.
Prentice Hall Inc.
[2] Katsuhiko Ogata, ''Solving Engineering Problems with MATLAB® '', 1994. Prentice Hall
Inc.
[3] D. K. Frederick and J. H. Chow, ''Feedback Control Problem: Using MATLAB® and The
Control System Toolbox'', 1995. PWS.
[4] W. J. Palm III, “Modeling, Analysis, and Control of Dynamic Systems”, 2nd Edition 1999.
John Wiley & Sons.
[7] Katsuhiko Ogata, “System Dynamics, 2nd Edition, 1992. Prentice Hall Inc.
[9] R. C Dorf and R. H. Bishop “Modern Control Systems”, 7th Edition, 1995. Addison
Wesley.
[10] R. H. Bishop “Modern Control Systems Analysis and Design Using MATLAB®”,
1995. Addison Wesley.
[11] C. L Philippe, and R. D. Harbor, “Feedback Control Systems”, 3rd Edition, 1996.
Prentice Hall Inc.
[16] N. E. Leonard and W. S. Levine, “Using MATLAB® to Analyze and Design Control
Systems”, 2nd Edition, 1995. Benjamin/Cummings Publishing Company, Inc.
[21] CE105 and CE105MV Coupled Tanks Manual, TQ education and Training Ltd.
[22] CE106 Ball and Beam Apparatus Manual, TQ education and Training Ltd.
INTRODUCTION TO MATLAB
MATLAB has an on-line help facility that may be invoked whenever need arises. The
command help will display a list of predefined functions and operator for which on-line
help is available. The command
will give information on the specific function named as to its purpose and use.
the. command
» help help
We shall first list various types of MATLAB commands and matrix functions that are
frequently used in solving control engineering problems.
Matrix Operators
+ Addition
– Subtraction
* Multiplication
/ Division
\ Left-division
^ Power
' Conjugate transpose
Special Characters
BASIC CALCULATIONS
Simple Math
» 3+sqrt(7)–(5/2)+3^2
ans =
12.1458
items =
12
» cost=erasers*25.75+pads*22+tapes*99.5
» average_cost=cost/items
cost =
434
average_cost =
36.1667
Here we created three MATLAB variables erasers, pads and tapes to store the
number of each item. After entering each statement, MATLAB displayed the results
except in the case of tapes, pads and tapes.
About Variables
Like any other computer language, MATLAB has rules about variables and names.
Earlier it was noted that variable names must be a single word containing no
spaces. More specifically, MATLAB variables naming rules are
Variable names are case sensitive Items, items, itEms and ITEMS are
all different MATLAB variables
Complex Numbers
All the MATLAB arithmetic operators are available for complex operations. The
imaginary unit − 1 is predefined by two variables i and j. In a program, if other
values are assigned to i and j, they must be redefined as imaginary units, or other
characters can be defined for the imaginary unit.
j = sqrt(–1) or i = sqrt(–1)
Once the complex unit has been defined, complex numbers can be generated.
» i = sqrt(–1);
» Z = 200 + 300*i;
» g = 0.02+1.5*i;
» V = Z*cosh(g) + sinh(g)/Z
V=
8.1672 +25.2172i
Mathematical Functions
A partial list of the common functions that MATLAB supports is shown in the table
below. Most of these functions are used in the same way you would write them
mathematically.
» x=sqrt(2)/2
These commands find the
x= angle where the sine
0.7071 function has a value
2 /2.
» y=asin(x)
y=
Note that MATLAB only
0.7854
works in radians.
» y_deg=y*180/pi
y_deg =
45.0000
These commands find the angle where the sine function has a value 2 / 2 .
Some of the functions, like sqrt and sin, are built-in. They are part of the MATLAB
core so they are very efficient, but the computational details are not readily
accessible. Other functions, like gamma and sinh, are implemented in M-files. You
can see the code and even modify it if you want. Several special functions provide
values of useful constants. (See TABLE 2 for the listing of some MATLAB
functions).
MATRICES
» A = [6 1 2; –1 8 3; 2 4 9]
A=
6 1 2
–1 8 3
2 4 9
If a semicolon is not used, each row must be entered in a separate line as shown
below
» A = [6 1 2
–1 8 3
2 4 9]
The entire row or column of a matrix can be addressed by means of the symbol (:).
For example:
» r3 = A(3,:)
results in
r3 =
2 4 9
Similarly, the statement A (:,2) addresses all elements of the second column in A.
For example
» c2 = A (:,2)
results in
c2 =
1
8
4
Determinant of a Matrix
A = a11 a 22 − a 21 a12
a 22 a 23 a 21 a 23 a 21 a 22
A = a11 − a12 + a13
a 32 a 33 a 31 a 33 a 31 a 32
The determinant of a matrix A can be carried out by MATLAB through the command
det(A)
» det(A)
ans =
335
Transpose of a Matrix
The transpose of a matrix is a new matrix in which the rows of the original matrix are
the columns of the new matrix. We use a superscript T after a matrix name to refer to
the transpose, B = AT. In MATLAB, the apostrophe (prime) ' denotes the transpose of a
matrix. If B is the transpose of A then
» B = A'
B=
6 –1 2
1 8 4
2 3 9
Inverse of a Matrix
By definition, the inverse of a square matrix A is the matrix A–1 for which the
matrix product AA–1 and A–1A are both equal to the identity matrix. The inverse of
an ill-conditioned or singular matrix does not exist. The inverse of the matrix A is
performed with the function inv(A)
» C = inv(A)
will result in
C=
0.1791 – 0.0030 – 0.0388
0.0448 0.1493 – 0.0597
– 0.0597 – 0.0657 0.1463
Matrices of the same dimension can be added or subtracted. Two matrices A and B
can be multiplied together to form the product AB if they are conformable (the
number of columns of A is equal to the number of rows of B).
Two symbols are used for non-singular matrix division. A\B is equivalent to A–1B, and
A/B is equivalent to B–1A. For example,
» A = [6 1 2; –1 8 3; 2 4 9];
» B = [3 5 0; 5 4 1; 0 –2 2];
» A+B
ans =
9 6 2
4 12 4
2 2 11
» A*B
ans =
23 30 5
37 21 14
26 8 22
where x i are the unknowns and a ij and bi are known coefficients. The previous
system can be written in matrix form as
a11 a12 a13 x1 b1
a
21 a 22 a 23 x 2 = b2
a 31 a 32 a 33 x 3 b3
[A]{X } = [B]
{X } = [A]−1 [B]
In MATLAB, a system of simultaneous equations can be solved using matrix
division. The solution to the matrix equation [A]{X } = [B ] can be computed using
matrix left division, as in A\B. The solution to the matrix equation {X }[A] = [B] can
be computed using matrix right division, as in B/A. (MATLAB uses a Gauss
elimination technique to perform both left and right matrix division).
3 x1 + 2 x 2 − x 3 = 10
− x1 + 3 x 2 + 2 x3 = 5
x1 − x 2 − x3 = − 1
where
3 2 −1 x1 10
[ A] = −1 3 2 , { X } = x2 , [b] = 5
1 −1 −1 x3 −1
This is shown in MATLAB as
» x=A\B
x=
-2.0000
5.0000
-6.0000
The vector x then contains the following values: -2, 5, -6. We can also define and
solve the same system of equations using the matrix equation {X }[A] = [B ] as shown
in these statements.
» x=B/A
Eigenvalues
[A]{x} = λ {x}
are the eigenvalues of [A]. They are found using eig(A), which returns the
eigenvalues in a column vector. Eigenvalues and associated eigenvectors can be
obtained with a double assignment statement [X, D] = eig (A). The diagonal elements
of D are the eigenvalues and the columns of X are the corresponding eigenvectors
such that AX = XD.
Example. Find the eigenvalues and the associated eigenvectors of the matrix [A]
given by
0 1 − 1
A = − 6 − 11 6
− 6 − 11 5
» A = [0 1 – 1; – 6 – 11 6; – 6 – 11 5];
» [X,D] = eig(A)
X=
– 0.7071 0.2182 – 0.0921
0.0000 0.4364 – 0.5523
– 0.7071 0.8729 – 0.8285
D=
–1.0000
–2.0000
–3.0000
MATLAB actually has a built-in function that creates magic squares of almost any
size. Not surprisingly, this function is named magic.
» B = magic(3)
B=
8 1 6
3 5 7
4 9 2
» B = magic(4)
B=
POLYNOMIALS
P ( x) = aο x n + a1 x n −1 + a 2 x n − 2 + ... + a n − 2 x 2 + a n −1 x + a n
where the variable is x and the polynomials coefficients are represented by the
values of aο , a1 , a 2
and so on. The degree of a polynomial is equal to the largest value used as an
exponent.
Polynomial Roots
Finding the roots of a polynomial, i.e., the values for which the polynomial is zero,
is a problem common to many disciplines. In MATLAB, a polynomial is
represented by a row vector of its coefficients in descending order.
» p = [1 –12 0 25 116];
p=
1 –12 0 25 116
Note that terms with zero coefficients must be included. Given this form, the
roots of a polynomial are found by using the function roots.
» r = roots(p)
r=
11.7473
2.7028
–1.2251 + 1.4672i
–1.2251 – 1.4672i
Since both a polynomial and its roots are vectors in MATLAB, MATLAB adopts the
convention that polynomials are row vectors and roots are column vectors.
Given the roots of a polynomial, it is also possible to construct the associated
polynomial. In MATLAB, the command poly performs this task
» pp = poly(r)
pp =
1.0e+002 *
Columns 1 through 5
pp =
1.0000 -12.0000 0.0000 25.0000 116.0000
Polynomial Multiplication
» a = [1 2 3 4]; b = [1 2 9 16];
» c = conv(a,b)
c=
1 4 16 44 67 84 64
Polynomial Addition
MATLAB does not provide a direct function for adding polynomials. Standard array
addition works if both polynomial vectors are the same size. Add the polynomial
a(x) and b(x) given above.
»d=a+b
d=
2 6 12 20
e=
1 6 20 52 81 96 84
Polynomial Division
» [q,r] = deconv(c,b)
q=
1 2 3 4
r=
0 0 0 0 0 0 0
This result says that b divided into c gives the quotient polynomial q and the
remainder r, which is zero in this case since the product of b and q is exactly c.
Polynomial Derivatives
Example. Use the function polyder to find the derivative of the polynomial e(x)
given above e( x) = x 6 + 6 x 5 + 20 x 4 + 52 x 3 + 81 x 2 + 96 x + 84
»e
e=
1 6 20 52 81 96 84
» h= polyder(e)
h=
6 30 80 156 162 96
Polynomial Evaluation
Example. Use the function polyval to evaluate the polynomial e(x) given above
e( x) = x 6 + 6 x 5 + 20 x 4 + 52 x 3 + 81 x 2 + 96 x + 84 , at the points x = –5 and x = 12
» v= polyval(e,–5)
v=
4504
» W= polyval(e,12)
v=
4996452
The most common plot used by engineers and scientists is the x-y plot . The data
that we ploy is usually read from a data file or computed in our programs, and
stored in vectors which we call x and y. In general, we assume that the x values
represent the independent variable and that the y values represent the dependent
variable. The y values can be computed as a function of x, or the x and y values
might be measured in an experiment. We now present some additional ways of
displaying this information.
t 0 1 2 3 4 5 6 7 8 9 10 11 12
y 0 0.5 1 2 4 7 11 14 15.5 16 16 16 16
For a small amount of data, you can type in data explicitly using square brackets.
» t = [0 1 2 3 4 5 6 7 8 9 10 11 12];
» y = [0 0.5 1 2 4 7 11 14 15.5 16 16 16 16];
» plot(t,y)
» title('Plot of t versus y')
» xlabel('Variable t')
» ylabel('Function y')
» grid
title Plot of t versus y
16
14
12
grid
10
Function y
ylabel
2
0
0 2 4 6 8 10 12
Variable t
xlabel
Plotting Functions
Single Plot
0.8
0.6
Displacement
0.4
0.2
-0.2
-0.4
-15 -10 -5 0 5 10 15
Radians
Multiple Plots
Example 3. For 0 < t < 4π , Plot the functions x = 0.5*sin(0.5*t) and Y = sin(t)*cos(t);
The command gtext('x','y') allows you to obtain a crosshair cursor, which you can
move by means of the mouse (or arrow keys on some computers), to any point on
the graph. Moving it to any point on the graph and clicking the mouse (or hitting a
key on some computers) causes MATLAB to display 'x', and 'y' on the screen.
0.3
Legend
0.2
0.1
Displacement
0
-0.1
-0.2
-0.3
-0.4
-0.5
0 2 4 6 8 10 12 14
Radians
Subplots
The subplot command allows you to split the graph window into subwindows. The
arguments to the subplot command are three integers: m, n, p. The digits m and n
specify that the graph windows is to be split into an m by n grid of smaller windows,
and the digit p specifies the pth windows for the current plot. The windows are
numbered from left to right, top to bottom.
x = 2sin(t)+3sin(2t)+4sin(3t)+5sin(4t);
y = (t)*cos(t).*sin(t);
z = cos(2t)+2 cos(3t)+2 cos(3t)*sin(3t);
w=x + y – z;
10
0 0
-5
-10
-15 -5
-10 -5 0 5 10 -10 -5 0 5 10
2 10
0 0
-2 -10
-4 -20
-10 -5 0 5 10 -10 -5 0 5 10
p ( x) = c1 x d + c 2 x d −1 + ... + c n
The degree of the polynomial is d and the number of coefficients is n = d+1. Given a
set of points in vector x and y, polyfit(x,y,d) returns the coefficients of dth order
polynomial in descending powers of x.
x 0 1 2 4 6 10
y 1 7 23 109 307 1231
» x = [0 1 2 4 6 10];
» y = [1 7 23 109 307 1231];
» p = polyfit(x,y,3)
p=
1.0000 2.0000 3.0000 1.0000
i.e., y = x 3 + 2 x 2 + 3x + 1
Example 6. Obtain the Cartesian plot of the Bessel function J ο x 2 + y 2 over the
range − 12 ≤ x ≤ 12, − 12 ≤ y ≤ 12 .
» clf
» [x,y] = meshgrid(–12:0.6:12, –12:0.6:12);
» r = sqrt(x.^2+y.^2);
» z = bessel(0,r);
» m = [-45 60];
» mesh(z,m)
The 3-D analog of the plot function is plot3. If x, y, and z are three vectors of the
same length, plot3(x,y,z) generates a line in 3-D through the points whose
coordinates are the elements of x, y, and z and then produces a 2-D projection of
that line on the screen.
» t = 0:pi/50:10*pi;
» plot3(sin(t),cos(t),t)
» axis square; grid on
If the arguments to plot3 are matrices of the same size, MATLAB plots lines
obtained from the columns of X, Y, and Z. For example,
Example 8. The following lines produce plot obtained from the columns of X, Y,
and Z.
» [X,Y] = meshgrid([-2:0.1:2]);
» Z = X.*exp(-X.^2-Y.^2);
» plot3(X,Y,Z)
» grid on
Most plots that we generate assume that the x and y axes are divided into equally
spaced intervals; these plots are called linear plots. Occasionally, we may like to use a
logarithmic scale on one or both of the axes. A logarithmic scale (base 10) is convenient
when a variable ranges over many orders of magnitude because the wide range of
values can be graphed without compressing the smaller values. The MATLAB
commands for generating linear and logarithmic plots of the vectors x and y are the
following:
semilogx(x,y) Generates a plot of the values x and y using a logarithmic scale for
x and a linear scale for y.
semilogy(x,y) Generates a plot of the values x and y using a linear scale for x and
a logarithmic scale for y.
loglog(x,y) Generates a plot of the values x and y using a logarithmic scale for
both x and y.
Axes Scaling
MATLAB automatically scales the axes to fit the data values. However, you can
override this scaling with the axis command. There are several forms of the axis
command:
Axis Freezes the current axis scaling for subsequent plots. A second
execution of the command returns the system to automatic
scaling.
Axis(v) Specifies the axis scaling using the scaling values in the vector v,
which should contain [xmin, xmax, ymin, ymax].
PROGRAMMING IN MATLAB®
» clf
» for n = [4 8 12 16 20 50 100 200 500 1000]
x=linspace(0,pi/2,n);
y=(sin(2*pi*x));
plot(x,y)
title(sprintf('Plot based upon n = %3.0f points.',n))
pause(1);
» end
Example 2. How to create polygons. The following script file produces the graph
shown in Figure 9.
» close all
» clc
» theta=linspace(0,2*pi,361);
» c=cos(theta);s=in(theta);
» k=0;
» for sides = [3 4 5 6 8 10 12 18 24]
stride = 360/sides;
k=k+1;
subplot(3,3,k)
plot(c(1:stride:361),s(1:stride:361))
xlabel(sprintf(' n = %2.0f',sides));
axis([-1.2 1.2 -1.2 1.2])
axis('square')
» end
1 1 1
0.5 0.5 0.5
0 n= 6 0 n= 8 0 n = 10
-1 -1 -1
-1 0 1 -1 0 1 -1 0 1
1 1 1
0 n = 12 0 n = 18 0 n = 24
» t = (1/8:2/8:15/8)'*pi;
» x=sin(t);y=cos(t);
» fill(x,y,'r')
» axis('square')
» text(0,0,'STOP','Color',[1 1 1],'FontSize',80,'HorizontalAlignment','Center')
0.8
0.6
0.4
STOP
0.2
-0.2
-0.4
-0.6
-0.8
-1
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
LAPLACE TRANSFORMS
OBJECTIVE
1. To illustrate the use of The Laplace transform with the aid of MATLAB.
2. To use MATLAB in partial fraction.
3. To solve an Initial Value Problem (IVP).
num 7s − 5
G(s) = = 3
den s − 4 s 2 + s + 6
1. Write G(s) in partial fractions (Hint: s = −1 is a pole)
num r r r
G(s) = = 1 + 2 + 3
den s − p1 s − p 2 s − p3
[r,p,k] = residue(num,den) finds the residues, poles and direct term of a partial
fraction expansion of the ratio of two polynomials,
num(s)/den(s).If there are no multiple roots, Vectors den
and num specify the coefficients of the polynomials in
descending powers of s. The residues are returned in the
column vector r, the pole locations in column vector p, and
the direct terms in row vector k.
num s+2
G(s) = = 3
den s (s − 1)2
num
G(s) =
den
Use the method of completing the square to find the inverse Laplace transform of
s+5
G(s) =
s + 2s + 5
2
t
0 π 2π
2. Plot the response y(t)
MATLABPROGRAM
% Distinct Poles
num=[……………. …………….];
den=[……………. ……………. …………….];
[r,p,k]=residue(num,den)
%
OBJECTIVE
THEORY
In order for mechanical oscillation to occur, a system must possess two properties:
elasticity and inertia. When the system is displaced from its equilibrium position,
the elastic property provides a restoring force such that the system tries to return
to equilibrium. The inertia property causes the system to overshoot equilibrium.
This constant play between elastic and inertia properties is what allows oscillatory
motion to occur. The natural frequency of the oscillation is related to the elastic
and inertia properties by
Elastic property
ωn = 2π f n =
Inertia property
The spring constant k provides the elastic restoring force, and the inertia of the
mass m provides the overshoot. By applying Newton’s second law F = M a to the
mass, one can obtain the equation of motion for the system
d 2x d 2x k d 2x
M + kx = 0 ⇒ + x=0 ⇒ + ωn2 x = 0 ,
dt 2 dt 2 M dt 2
x ( t ) = X m cos (ωn t + φ )
where X m is the amplitude of the oscillation, and φ is the phase shift. Both X m
and φ are constants that are determined by the initial conditions (initial
displacement and velocity) at time t = 0 .
Spring Constant
The force exerted by an ideal spring is a linear restoring force vector whose
magnitude is F = ky in direction opposite to the stretch y . This force tries to restore
the spring to its original length L = LD . The quantity y = L − LD is the elastic
extension (stretch) of the spring from its unstretched length LD .
LD
L F = −k y
Mg
Figure 2.
We would determine the value of k by measuring the amount of stretch y for various
weights W = Mg .
It turns out simpler and more accurate to measure the length L for various masses
M , and then determine k from
F = Mg = ky = k ( L − LD )
The above equation represents a straight line relationship between L and M . The
quantity g / k represents the slope and LD is the intercept.
L = ( g / k ) M + LD
slope = ( g / k )
LD
M
Figure 3.
2) Hang various masses from the spring, and record the values of L for each
mass M .
5) Notice that for very small M , the graph representing the relationship
between L and M may not be very straight because not all of the spring is
yet “active.” Some coils are still touching metal-to-metal so it acts more like
a solid tube than a coil spring. Record the first value L and M at which the
coils all have some air between them. Mark this point on your graph.
7) You might find also that for large M , the graph again deviates from a
straight line. If this happens, record the maximum value of M , and the
corresponding y for which the graph is straight. Mark this point on your
graph also.
Theory
The theory shows that for a massless ideal spring, the period of oscillations is given
by
τ = 2π M / k
from which
τ 2 = ( 4π 2 k ) M
(
A graph of τ 2 versus M is predicted to be a straight line with slope 4π 2 k ) which
extends through the origin in the case of a massless spring.
For a spring with mass ms , the previous relation is no longer valid and the theory is
more complicated. In the simplest case, as long as the spring is active all the time,
the result is that we must add 1/3 of the spring’s own mass, ms to the mass M of
the hanging weight in the theory, so
M + ( ms / 3)
τ = 2π
k
and
4π 2
τ2 = M + ( ms / 3)
k
The reason we add less than ms is fairly simple. Only the bottom of the spring
moves at the speed v of the hanging mass M ; the rest moves slower (top is at rest),
so the effective inertia is less. The reason it comes out ms 3, instead of, say ms 2, is
more technical. It comes from the fact that the kinetic energy of the spring is
(1 2 )( ms 3) v 2 , where v is the speed of the hanging mass M , equal to the speed of
the bottom end of the spring. This KE is just (1 3) of the kinetic energy (1 2 ) ms v 2 of
the particle of mass ms moving at speed v . So, the improved theory predicts the
period and the period squared as given by the above equations. Thus from the
above equations a graph of τ 2 versus M is still predicted to be a straight line with a
slope of ( 4π k )
2
as shown in Figure 4. When the line is extended to τ 2 = 0, its
intercept with the horizontal axis should be − ms 3, instead of 0. The period is
predicted to be independent of the amplitude of the oscillation.
1) To plot τ with different weights, use the transducer type 4366 and connect
the transducer with charge amplifier to increase the signal of oscillations.
2) Take the output velocity from the charge amplifier.
3) Connect the output with the Chart recorder type L
τ2 4π 2
τ2 = M + ( ms / 3)
k
4π 2
slope =
k
M
− ms / 3
Figure 4.
1) Measure the mass ms of the spring. (To prevent disturbing the experiments,
you should actually measure the mass of an identical spring which will be
provided to you).
3) Lift the mass straight up to the minimum length for which the whole spring
is active.
4) Release the mass and measure the period τ of oscillations. To measure the
period, use a stop watch determine the time for n complete vibrations.
Divide this time by n to find the period τ the time for one complete
oscillation (the period of oscillation). Perform three trials and average your
results.
5) Repeat the measurement of the period a few times, as the amplitude of
motion decreases due to friction. If the periods change, record τ versus
amplitude of motion and consult your instructor. If the periods do not
change significantly, you can proceed to measure periods without concern
about careful measurement of the amplitude of motion.
Use enough values of M to see if the graph is straight, and to measure its
slope accurately.
Make sure that the spring stays active through the full range of oscillations.
Make sure that your M axis goes far enough to negative numbers that you
can see the intercept.
4π 2
8) Plot a theory line for the improved theory τ 2 = M + ( ms / 3) on the
k
same graph. Does it agree (within margin of error) with your measurements?
9) For zero initial conditions, Obtain the plot of the output response for
M = 2.0 kg
The mass is fixed to be M = 2.0 kg and k is the same as the obtained in Experiment
1. Model the mass and spring systems used in Experiment 2. Simulate your model
using Matlab®.
OBJECTIVE
To model a suspension system of a pickup truck and simulate its response for a
given profile of the road.
Translational Motion:
The translational motion is defined as a motion that takes place along a straight
line. The variables that are used to describe translational motion are acceleration,
velocity and displacement. Newton’s law of motion states that the algebraic sum
of forces acting on a rigid body in a given direction is equal to the product of
the mass of the body and its acceleration in the same direction. The law can
be expressed as
∑F =M a (1)
where M denotes the mass and a is the acceleration in the direction considered.
Rotational Motion:
The rotational motion of a body can be defined as a motion about a fixed axis. The
extension of Newton’s law of motion for rotational motion states that the algebraic
sum of moments or torques about a fixed axis is equal to the product of the
inertia and the angular acceleration about the axis. The law can be expressed
as
∑T = J α (2)
where J denotes the inertia and α is the angular acceleration in the direction
considered. The other variables generally used to describe rotational motion are
torque, angular velocity and angular displacement.
The elements involved with translational and rotational motion are summarized in
Table 1.
x
F4 F2
m F1 θ
F3 J
Inertia
T
∑F = m a
∑T = J α
x1 x2 k
F F T T
Spring k θ1 θ2
F = k ( x1 − x2 ) = kx T = k (θ1 − θ 2 ) = kθ
x 1 x 2 b
F F T T
Damper b
θ1 θ2
F = b( x1 − x 2 ) = bx T = b(θ1 − θ2 ) = bθ
PROCEDURE
PROBLEM
The suspension system for one wheel of an old-fashioned pickup truck can be
illustrated as shown in Figure 1. The mass of the vehicle is M and the mass of the
y1
Shock
absorber
y2
Spring
x Profile
of road
Y1 ( s ) num1( s ) Y2 ( s ) num 2( s )
G1 ( s ) = = and G2 (s) = =
X ( s ) den1( s ) X ( s ) den2( s )
For each of the previous cases, use MATLAB to plot the responses y1 (t )
and y 2 (t ) if the profile road were given by the following input function
MATLAB PROGRAM
Translational Motion:
The translational motion is defined as a motion that takes place along a straight
line. The variables that are used to describe translational motion are acceleration,
velocity and displacement. Newton’s law of motion states that the algebraic sum
of forces acting on a rigid body in a given direction is equal to the product of
the mass of the body and its acceleration in the same direction. The law can
be expressed as
∑F =M a (1)
where M denotes the mass and a is the acceleration in the direction considered.
Rotational Motion:
The rotational motion of a body can be defined as a motion about a fixed axis. The
extension of Newton’s law of motion for rotational motion states that the algebraic
sum of moments or torques about a fixed axis is equal to the product of the
inertia and the angular acceleration about the axis. The law can be expressed
as
∑T = J α (2)
where J denotes the inertia and α is the angular acceleration in the direction
considered. The other variables generally used to describe rotational motion are
torque, angular velocity and angular displacement.
The elements involved with translational and rotational motion are summarized in
Table 1.
PROCEDURE
x
F4 F2
m F1 θ
F3 J
Inertia
T
∑F = m a
∑T = J α
x1 x2 k
F F T T
Spring k θ1 θ2
F = k ( x1 − x2 ) = kx T = k (θ1 − θ 2 ) = kθ
x 1 x 2 b
F F T T
Damper b
θ1 θ2
F = b( x1 − x 2 ) = bx T = b(θ1 − θ2 ) = bθ
In the system shown in the figure below, the two shafts are assumed to be flexible
with stiffness constants k1 and k2 . The two disks, with moments of inertia J1 and
J 2 are supported by bearings whose friction is negligible compared to the viscous
friction element denoted by the coefficients B1 and B2 . The reference position for θ1
and θ 2 are the positions of the reference marks on the rims of the disks when the
system contains no stored energy.
Figure 1.
1. Draw the FBD of the system and obtain the system differential equations of
motion.
5. Use the final value theorem find the steady state values of θ1 ( t ) and θ 2 ( t ) .
OBJECTIVE
DESCRIPTION
The flywheel is mounted with its axle horizontal as shown in Figure 1 and one end
of the experimental shaft, which may be 1/8" or 3/16" diameter steel rod, is
gripped by the flywheel chuck. The other end of the shaft is held in a stationary
chuck rigidly fixed to a bracket attached to the cross member of the frame. The
lateral position of the bracket may be varied and the relationship between the
periodic time and the shaft length investigated.
THEORY
The equation of motion for the undamped system shown in Figure 1, when given a
small angular displacement, can be written as follows
k
Iθ = − kθ ⇒ θ + θ = 0
I
d
l
Figure 1.
Where
k GJ
ωn = =
I Il
Il 4π 2 I
τ = 2π ⇒ τ2 = l
GJ GJ
It is obvious that the relationship between τ 2 and l is linear, with a slope equal to
( 4π 2
I / GJ ) as shown in Figure 3. If the period τ is measured for different shaft
lengths, the slope of the plot τ 2 versus l can be used to determine G since I and
J are known.
4π 2 I
τ2 τ2 = l
GJ
4π 2 I
slope =
GJ
Figure 2.
Apparatus
The shaft can be clamped to the chuck of the rotor at one end and to the chuck
with bracket at the outer end. This assembly is used to study the oscillations of a
single rotor.
2) Fix a steel shaft to the rotor and measure the period τ for different shaft
lengths.
5) The slope of the above graph should be a straight line with a slope of
( 4π 2
I / GJ ) . Measure the slope of that line and determine the value of G and
its uncertainty.
7) Does the value of G depend in any way on the shaft Dimensions? Why?
8) What could be the possible source of error if the relation between τ 2 and
l were nonlinear.
9) If the rotor used in this experiment has an unknown inertia, explain briefly
how the auxiliary inertia method can be employed to determine the modulus
of rigidity of the shaft.
10) Notice that the rotor for which the mass moment of inertia can be
1
determined using the analytical method I = ∑I i =
2
∑ mi ri 2 where mi and ri
are the mass and radius of each part separately.
Let ( N1 ) be the number of revolutions of the wheel during the time t1 taken by the
flywheel before stopping, Figure 4.
and ( N 2 ) be the number of revolutions of the wheel during
the time t2 after the weight has struck the ground.
The length of the string is adjusted so that the loop comes off the peg as the weight
reaches the ground. The motion of this system, after adding the small mass m , can
be divided into three phases:
Phase 1: Between the instant t = 0 and t1 , i.e., falling body motion (falling phase).
When the mass m is released from rest, it moves downwards accelerating towards
the ground, causing the rotor to revolve at an increasing angular velocity. The
motion of the rotor is resisted by a frictional torque T f of the rotor’s bearing. The
equation of motion (applying Newton’s second law for rotating system) can be
written as
∑ T =Iθ = mgR − T f
Integrating the above equation over the whole range of θ , i.e., between 0 and θ1 ,
results in the following equation:
( I + mR ) θ
2
1
2
2 = mgRθ1 − T f θ1
θ = ω
Rθ = h
Rθ = v
θ = 2π N
ω1 = 2π N1 t1
hence
Phase 3: The rotor moves alone due to its own inertia, decelerating from ω2 to 0 ,
due to friction T f .
Iθ = −T f
dθ
Substituting for θ = θ × and integrating the above equation over the entire range
dθ
of θ , i.e., between θ 2 and θ 3 , results in the following equation:
Eliminating T f from equations (*) and (**) results in the following equation
2mgh − mv12
I=
N
ω12 + 1 ω22
N2
where
2) Fix the rotor as explained previously and carry out the procedure of Falling
Weight Method(FWM). Repeat the procedure of data collection several times
to take the average.
3) Release the weight from rest and record the number of revolutions made by
the wheel N1 and the corresponding time t1 .
7) How would the results be affected if the cord were wrapped around the axle
of the rotor instead around of its rim?
TABLE 3.
ELECTRICAL SYSTEMS
OBJECTIVE
The algebraic sum of currents leaving a junction or node equals the algebraic sum
of the currents entering that node, or
∑ i j = 0 at any node
j
The algebraic sum of all voltages taken around a closed path in a circuit is zero, or
∑v
j
j = 0 at any closed path
Sources
The inputs for electrical circuit model are provided by ideal voltage and current
sources. A voltage source is any device that causes a specified voltage to exist
between two points in a circuit regardless of the current that may flow. A current
source causes a specified current to flow through the branch containing the
source, regardless of the voltage that may be required. The symbols used to
represent general voltage and current sources are shown in Figure 1(a) and (b).
Figure 1. Sources
An open circuit is any element through which current cannot flow. For example, a
switch in the open position provides an open circuit, as shown in Figure 2(a).
Likewise, we can consider a current source that has a value of i(t) = 0 over a
nonzero time interval an open circuit and can draw it as shown in Figure 2(b)
0A Circuit
a) b)
Figure 2. Examples of open circuits. (a) Open switch. (b) Zero current source
A Short Circuit is any element across there is no voltage. A switch in the closed
position , as shown in Figure 3(a), is an example of a short circuit. Another example
is a voltage source with v(t) = 0, as shown in Figure 3(b).
+
0V Circuit
-
a) b)
Figure 3. Examples of short circuits. (a) Closed switch. (b) Zero voltage source
Capacitor 1t dv(t ) 1 1
c ∫0
v(t ) = i (τ )dτ i (t ) = C v (t ) = q (t )
dt c Cs
Resistor 1 dq(t )
v(t ) = R i (t ) i (t ) = v(t ) v(t ) = R R
R dt
Inductor
di(t ) 1 t d 2 q(t )
L ∫0
v(t ) = L i (t ) = v(τ )dτ v(t ) = L Ls
dt dt
The following set of symbols and units are used: v(t) = V (Volts), i(t) = A (Amps), q(t)
= Q (Coulombs), C = F (Farads), R = Ω (Ohms), L = H (Henries).
Series Circuits
i i
i i
vR vC v L
Parallel Circuits
iR iC iL
+
R vR C vC L vL
-
Complex impedance
Z1
i i i
Z1 Z2 vi (input ) Z2 vο (output )
v1 v2
v
Vο ( s ) Z 2 (s)
V (s) =
Z = Z1 + Z 2 = Vi ( s ) Z1 ( s ) + Z 2 ( s )
I (s)
(a) Impedance in series arrangement (b) Transfer function in parallel arrangement
PROBLEM # 1:
In the electrical circuit shown below, ei (t ) represents the source (input voltage)
while eο (t ) represents the response (output voltage).
Figure 7. (a) Circuit for Problem 1. (b) switch closed. (c) switch open
2. Repeat the problem when the left branch is disconnected by opening the
switch.
3. Let the input voltage source ei (t ) in Figure 7(a) has a constant value of 24 V
t>0, and find E0 ( s ) for all t>0. Notice that E0 ( s ) is the Laplace
transform of eο (t ) .
d. The switch has been closed for a long time, so that the circuit in the
steady state at t=0-. The switch then opens at t=0. Take Laplace
transform of both sides of the modeling equations obtained in (2) for
t>0, and find E0 ( s ) for all t>0. As part of your solution show that the
g. Find the time constants for parts (a) and (d) and explain why they are
not the same.
PROBLEM # 2:
In the electrical circuit shown below, e(t ) represents the source (input voltage)
1 2
while R1 = 2 Ω, R2 = 5.5 Ω, C = F and L = H.
15 15
1. Obtain the state-space model characterizing the circuit of the Figure shown
below. Take the inductor current and the voltage drop across the capacitor
as the state variables, take the input variable to be the output of the voltage
vc = x1
ic
y2
R1 iL = x2
C
L R2
e(t )
y1
OBJECTIVE
PROBLEM
Ra ia
La
+
va (t )
θο = ωο
-
vc = K v θο J
B
τ = K τ ia
In this case, the load is the inertia plus friction; the field current is held constant.
The input is the applied voltage v a (t ) , the output is the shaft’s angular speed
θ (t ) = ω (t ) and
ο ο
1. Derive the equations that describe the system (for both mechanical and
electrical part) in function of ω ο , i a and v a .
4. Use the schematic diagram shown in Figure 1 and the block diagram
algebra to obtain the overall block diagram.
5. Obtain the transfer function G(s) relating the input to the output and
write it in the form
Ω ο ( s ) num
G(s) = =
Va ( s ) den
Ω ο ( s ) num kο
G(s) = = = 2
Va ( s ) den s + 2ξω n s + ω n
2
8. For each of the following values of kο , ω n and ξ , plot the location of the
poles of the characteristic equation in s-domain. Plot also the
corresponding response ω ο (t ) for a given unit step input
9. (Optional) Let the state vector defined by x = [ωD ia ] . Derive the state
space model of the above system. Determine the state matrix [ A] , the
input matrix [ B] , the output matrix [C ] , and the direct transmission
matrix [ D ] . In function of the system parameters.
10. (Optional) For the given values of the different parameters expressed in SI
units, Ra = 4.0 Ω , La = 2.75 µ H , B = 3.5077 ×10−6 Nms ,
J = 3.2284 ×10−6 kg m 2 /s 2 , Kτ = Kτ = 0.0274 Nm/Amp , determine the
eigenvalues of the state matrix [ A] using MATLAB. (The MATLAB
command is eig(A)).
11. (Optional) Using MATLAB find the transfer function relating the input to
the output from the state space model obtained above. The MATLAB
command is [num,den]=ss2tf(A,B,C,D,1) where 1 here indicates the
number of inputs to the system. Compare this expression of the transfer
function with the one obtained in (5).
12. (Optional) Find the roots of the denominator of the transfer function
(called characteristic equation) obtained in the previous part and
compare them to the eigenvalues of the state matrix [ A] . What do you
conclude?
MATLAB IMPLEMENTATION
OBJECTIVE
INTRODUCTION
Governor balls
Arms
Sleeve
Shaft 10 mm
5 mm
The diagrammatic details of a Porter Governor are shown in Figure 2. The force
acting radially inwards on each ball is termed the controlling force. It must increase
in magnitude as the distance of the ball from the axis increases, which would occur
due to the centrifugal effects on the governor balls. At uniform governor ball-
revolving speed the centrifugal force on the balls is just balanced by the controlling
force.
α
T1 h
F B r
α β
T2
mg β Mg
C
I D
Mg/2
The two balls, termed the governor balls, of the centrifugal type governor in the
experiment are caused to revolve about the axis of the shaft. If the weights of the
lower and the upper arms are neglected, the forces acting through the pin joint B
(Figure 2) consists of force F, weight of the ball mg, tensions T1 and T2 and half of
the sleeve load Mg acting pin C. Taking moment about I, the force F is found to be
tan β
K= (2)
tan α
Notice that K will have a different value at each radius of rotation of B unless the
upper and lower arms are of equal length and the point A and C are on the
governor axis or equidistant from it.
F = mω2 r (3)
and
r
tan α = (4)
h
where r is the radius of rotation and h is the height of the governor. The angular
velocity ω of the governor is obtained by equating equations (1) and (3), thus
M g
ω2 = (1 + K ) + 1 (5)
2m h
The two balls, termed the governor balls, of the centrifugal type governor in the
experiment are caused to revolve about the axis of the shaft. If the weights of the
lower and the upper arms are neglected, the forces acting through the pin joint B
(Figure 2) consists of force F, weight of the ball mg, tensions T1 and T2 and half of
the sleeve load Mg acting pin C.
Figure 4 gives a calibration of a spindle scale reading against the governor height h
and the radius of rotating weight r, which remains same for a particular governor
configuration.
The effort of the governor is the force, which it exerts on the sleeve of the
mechanism controlling the energy to supply the engine. For constant speed the
effort is zero. The power of a governor is defined as the work done at the sleeve for a
given percentage change in speed. It is the product of the governor effort and the
displacement of the sleeve.
A governor is said to be stable when for each working speed if there is only one
radius of rotation of the governor balls at which the governor is in equilibrium. A
governor is said to be more sensitive if the change in the speed is smaller for a
given displacement or the sleeve displacement is large for a given change in speed.
19
r − 19
tan α =
h
r − 38
tan β =
α 298 − h − s
h r −19
298
Centerline 298 −h−s
lolkkk
s
β
38 r-38
APPARATUS
The governor mechanisms are mounted on their own spindles, which are graduated
at 5 mm intervals to indicate the center sleeve position (Figure 1). The rotating
speeds of the shaft may be estimated by counting the number of revolution with a
stopwatch or by using a stroboscope.
Sample of Calculation
The geometric details of the rotating Porter governor are depicted in Figure 3.
Equation (1) is then modified to express the controlling force F in terms of M,
m, r and h, where M and m are respectively the sleeve and rotating masse in
kg, r is the radius of rotation and h is the height of the governor in mm.
M M tan β
F = (1 + K ) + m g tan α = (1 + ) + m g tan α
2 2 tan α
or
M
F =
( r − 38) h ( r − 19 )
1 + + m g (6)
2 ( 298 − h − s ) ( r − 19 ) h
To determine the radius of rotation r and the height of the governor h refer to
Figure 4. For a given value of the spindle sleeve position draw a vertical line.
This line crosses the h-and r-curves. Record the obtained values of h-and r
in Table 1. The corresponding force F is then calculated from the modified
equation (6) for selected sleeve positions.
For a typical case test where m=1.0 kg and M=0.794 kg and from Figure 4
when s=100 mm, r=147 mm and h=125 mm.
∴ F =
0.794
+
(147 − 38) 125 (147 − 19 )
1 + 1 × 9.81 ×
2 ( 298 − 125 − 100 ) (147 − 19 ) 125
∴ F = 19.849 N
200
180
(mm)
h
160
r and h
140
120 r
100
80
60
0 20 40 60 80 100 120 140 160 180
Sleeve scale reading s (mm)
Figure 4. Calibration curve of h and r against spindle scale reading s of a Porter governor configuration.
Nm
S Ng (gov) r (Fig.4) h (Fig.4) F (Eq.6)
(Motor)
mm rpm mm mm N
rpm
0 0
10
20
30
40
50
60
70
80
90
100
110
120
130
140
150
160
2πN Nm
Remember ω = and Ng = where ω is in rad/s and N is in rpm
60 30
1. Complete Table 1.
2. Plot the relationship between the speed (N) in rpm and the shaft
graduation s (sleeve position) in mm. The plot should be a smooth curve
(not broken lines). This curve is known as a characteristic curve of sleeve
position (s) against the speed of rotation (N). The data points should be
shown on the plot.
3. Find a best fitting for the previous relation N = N(s).
4. Plot the graph of F (in Newton) against the shaft graduation s (sleeve
position) in mm.
5. Discuss in details the previous results and state your conclusions.
OBJECTIVE
To simplify a multiple-loop feedback control system to a single block relating the output to
the input by using block reduction rules.
SUMMARY
e1 G e2 e1 G e2
Moving a pickoff
point behind a block
e1 e1 1/ G
e1 G e2 e1 G e2
Moving a pickoff
point ahead of a block
e2 e1 G
Moving a summing e1 G e2 e1 G e2
point behind a block
G e3
e3
Moving a summing e1 G e2 e1 G e2
point ahead of a block
e3 1/ G e3
Series or cascaded Y
elements R G1 G2 C R G1G2 C
R G C G
Eliminating a R C
feedback loop 1 + GH
H
Series Connection
[num,den]=series(num1,den1,num2,den2)
Parallel Connection
G1 (s)
R (s) C (s)
G2 (s)
[num,den]=parallel(num1,den1,num2,den2)
Cloop Connection
R (s ) G1 ( s) C (s )
[num,den]=cloop(num1,den1,sign)
Feedback Function
H (s )
[num,den] = feedback(num1,den1,num2,den2,sign)
PROBLEM # 1:
Draw the system block Diagram shown in the Figure below and obtain the transfer function
X (s )
G (s ) =
F (s )
y x
b
k
M
PROBLEM # 2:
1. Draw the system block Diagram shown in the Figure below and obtain the transfer
function
Eo (s )
G (s ) =
Ei (s )
2. Use Matlab to obtain the same transfer function obtained above and plot eo (t ) .
R 1 = 1 MΩ R 2 = 2 MΩ
vx
ei (t )
10
t C 1 = 2 µF C 2 = 1 µF eο (t )
H2
R (s ) C (s )
G1 G2 G3 G4
H 12
H 32
where
1 1 s2 +1 s +1
G1 ( s ) = , G2 (s) = , G3 ( s ) = 2 , G4 (s) =
s + 10 s +1 s + 4s + 4 s+6
and
s +1
H 1 (s) = , H 2 ( s ) = 2, H 3 ( s ) = 1
s+2
1. Use block diagram reduction to simplify this system to a single block relating
C(s) to R(s).
2. Write the explicit expression of the transfer function
Y ( s ) num( s )
= T (s) =
R ( s ) den(s)
3. Use MATLAB functions to carry out the block diagram transformations and
obtain the previous expression of the transfer function T(s). Write the
MATLAB program in your answer sheet.
4. Write the expression of T(s) in an irreducible form by applying the MATLAB
function mineral
OBJECTIVE
All systems possessing mass and elasticity are capable of executing free vibrations,
i.e., vibrations that take place with the absence of external excitation. The system
shown in Figure 1 is an example here on. If such an ideal undamped and
frictionless system is given a small displacement, it will continue to oscillate
without stopping. Such an ideal system does not exist in the real life due to the
existence of internal friction between the molecules of the beam’s material, due to
the friction between the oscillating beam and surrounding air and due to the
friction at the supports of the beam. One can easily notice, that any system, when
given a small displacement, its oscillatory motion will decay until it completely dies
out after a while. The rate of decay can be increased by introducing a dashpot with
a damping constant C.
h
C Mass m k
A θ
Figure 1.
θ = θ e −ζω t sin n
( 1 − ζ 2 ω nt ) (5)
in the above equation, the frequency of the damped oscillations can be written as
ωd = ωn 1 − ζ 2 (6)
The shape of the oscillatory motion described by equation. (5) above is shown in
Figure. 2.
3
θ1
2
θ2
1
θ4
θn+1
θ(t)
0
t1 t2 t4
-1
-2 τd
n cycles
-3
-4
0 2 4 6 8 10 12
t
δ = ln(θ 1 / θ 2) = ζω nt (7)
or
Both equations (7) and (8) can be used to evaluate the damping coefficient of any
free vibrating system with damping. Equation (8) is more accurate, since the
determination of δ is very sensitive to any inaccuracy in the amplitude
measurements.
The amount of damping in any dynamic system C is usually assessed by any of the
following equations
C = 2ζω n I A h 2 (9)
or
C = 2I A δ τ d h2 (10)
where τ d is the damped time period. Both methods used to determine the damping
constant C are supposed to giver similar results.
APPARATUS
τ d = ( x n )Vdrum
8. Determine the damping constant C of the system in each of the cases using
both equations (7) and (8). (Hint: You can use equation (2) to determine the
spring stiffness k . Assume that the mass of the beam is equal to 5 kg).
DISCUSSION POINTS
OBJECTIVE
The equation of motion for the dynamic system (Figure 1), when given a small
angular displacement (free vibrations) is:
l1
a Electric Motor
with mass M k
A θ
Beam of
mass mb
C
l
kL12
ωn = (2)
IA
Determination of the undamped natural frequency ω n
• After a while (3 to 5 seconds) both the step watch and the recorder are
stopped.
• The number of cycles and the corresponding time can be used to determine
the time period (T = total time/number of cycles), which can be used to
determine ω n according to the equation
2π
ωn = (3)
T
2. Using the Drum Speed
• Using the oscillations plot made above, the distance (∆) traveled by the
recorder can be easily measured.
• The length of one cycle (∆1= ∆/N) can be used to determine the periodic time
as follows
T = ∆1 Vdrum (4)
where Vdrum = 0.573 in/sec , (The circumferential speed of the drum). Then
the natural frequency can be solved using Equation (4). Theoretically, the
natural frequency can is given by Equation (2), from which the stiffness of
the spring can be found.
where m is the mass of the removed material from the disks, e is the eccentricity
and ω is the excitation frequency. The solution for Equation (5) is
X=
( me M )r2
(6)
(1 − r 2 ) + ( 2ζ r )
2 2
X=
(F k) (7)
(1 − r ) + ( 2ζ r )
2 2 2
If the effect of the exciting force is to be studied, while the system is at rest (no
vibrations) but subjected to an external force equal to F = m e ω , then the ratio
2
The left hand side of this equation was defined as the experimental magnification
factor, while the right hand side is the theoretical one, which can be determined if
r and ζ are known. The experimental (MF) can be determined if X d and X s are
known. The dynamic amplitude can be measured using the trace of the beam’s
motion obtained from the chart recorder at a specific frequency. The static
amplitude of the beam’s end can be calculated if a static force equals to the
excitation force F = m e ω is supposed to act upon the system. taking the
2
X s = m e ω 2 a L / k L12 (10)
where a, L and L1 are taken from the geometry as shown Figure (2).
l1
F = m eω2
k
a
A
l
Fs
L
Figure 2.
APPARATUS
• Forced vibration tests can be conducted using the Exciter Motor and Control
Unit TM.16f. The motor and its lower belt-driven shaft assembly, can be
transversely clamped onto the beam in any convenient position relative to
the pivot. The slow speed (driven) shaft rotates at approximately (1/3) of the
motor speed and carries an unbalanced disc each end. A plain circular piece
of (Teledeltos paper) can be attached to the light smooth plate, which is
clamped to the front unbalanced disc. An upper pen recorder is supplied,
and this can be clamped to the top member of the basic frame. Its energized
stylus can be brought into contact with the Teledeltos disk to make a
circular trace of the beam vibration. Simple analysis of this trace will reveal
both the amplitude of vibration and the phase difference between the beam
and the unbalanced forced.
• A steel beam nominally 762 x 25.4 x 12.7 mm, is clamped at one end into a
bracket which can be fixed to the side of the basic frame. The beam is free to
pivot in ball bearings in the bracket. The free end of the beam is supported
by any one of the tension springs of TM.16c experiment and uses the same
upper adjustable assembly. The assembly provides a hand-wheel adjustment
so that the beam can be leveled before test.
• The oil dashpot, which is provided can be clamped anywhere along the test
beam to alter the degree of damping. Rotating the holes of its two drilled
plates relative to each other can also vary the effective area of its piston.
Thus, an approximate total variation in damping of between 0.456 and 1.2
N/ms can be obtained over a distance of 330 mm from the beam pivot.
DISCUSSION POINTS
1. How accurate were your ω n values obtained from the different methods?
2. How does the shape of the resonance curve compare with the theoretical
one?
3. If damping were increased, how would be the shape of the resonance curve
going to be affected?
4. How accurate were your experimental ( MF ) values?
5. How would a stiffer spring affect the magnification factor of the system?
Dimensions:
L = ..................., I1 = ...................
l = ...................., a = ...................
Mass moment of inertia of the beam about point (A):
I A = M * a 2 + ( mb L2 3) = .....................
2π
ωn = = ...................
T
Damped Natural frequency of the system:
2π
ωd = = ................... or ω d = ω n 1 − ζ 2 = ...................
Td
Spring stiffness:
I
k = ω n2 A2 = ................
L1
Damping ratio
8
9
10
Note: The reduction ratio of the disk speed to the motor speed is (1/3)
OBJECTIVE
INTRODUCTION
ωn
2
G(s) = 2
s + 2ζω n s + ω n
2
β
ω n −ζω t
Input: impulse Output: c(t ) = e sin ( ω d t )
n
β
β
where β = 1 − ζ 2
and θ = tan −1 .
ζ
TIME DOMAIN PERFORMANCE SPECIFICATIONS
Allowable tolerance
Mp
0.02
0.9
td
0.5
0.1
t
tr
tp
ts
m x + c x + k x = f (t ) , m, c, k constant
− c ± c 2 − 4mk
1. Roots s1, 2 =
2m
2. Damping ratio or ζ = c / 2 mk
k
3. Undamped natural frequency ωn =
m
4. Damped natural frequency ωd = ωn 1−ζ 2
5. Time constant τ = 2m / c = 1 / ζω n if ζ ≤ 1
2πζ δ
6. Logarithmic decrement δ= or ζ =
1−ζ 2
4π 2 + δ 2
7. Stability Property Stable if, and only if, both roots have negative real
parts, this occurs if and only if , m, c, and k have the same sign.
jω
jω d
ωn
ωn 1 − ζ 2
θ
σ
−σ o
ζω n
PROBLEM # 1:
R (s ) 0.2 C (s )
1
(0.2 s + 0.3) s
Find:
1. The transfer function C(s)/R(s)
2. The natural frequency
3. The damped natural frequency
4. The maximum % overshoot
5. The rise time
6. The peak time
7. The delay time
8. The settling time for 3% settling error
PROBLEM # 2:
For the electrical system shown in the Figure below vi (t ) is the input voltage while
vο (t ) represents the output voltage. Assuming all initial conditions are zero, find the
following:
1. The transfer function relating the output voltage to the input voltage
2. The natural frequency of the system
3. The damping ratio and the damped natural frequency
4. The values of R that will result in vο (t ) having an overshoot of no more than
25%, assuming vi (t ) is a unit step, L=10 mH, and C= 4µF.
v i (t ) iο (t ) C v ο (t )
PROBLEM # 3:
In the system shown in the Figure below, the mass m = 5 kg is subjected to a force
F(t) acting vertically and undergoing a step change from 0 to 1.0 N at time t = 0.
The response of this system to a step change in force F(t) was found to be very
oscillatory as shown in the Figure. The only measurements obtained were two
successive amplitudes A1 and A2 , equal to 55 cm and 16.5 cm, respectively, and
the period of oscillation τ d = 1 s.
1. Determine the values of the spring constant k and the coefficient of friction b
in this case.
2. Determine the necessary modification to make the system critically damped.
Sketch the modified system and plot the resulting response.
Output, cm
F (t ) A1
x(t ) A2
1 sec
b/2 k b/2
Time, sec
OBJECTIVE
INTRODUCTION
Fο sin ωt
Machine m1
x1 (t )
k1 / 2 k1 / 2
We can obtain the steady-state amplitude of the masses m1 and m 2 as we can obtain
(k 2 − m2ω 2 ) Fο
X1 = (3)
(k1 + k 2 − m1ω 2 )(k 2 − m2ω 2 ) − k 22
k 2 Fο
X2 = (4)
(k1 + k 2 − m1ω 2 )( k 2 − m2ω 2 ) − k 22
Fο sin ωt
Machine m1
x1 (t )
k2
k1 / 2 m2 k1 / 2
x2 (t )
k2 k
ω2 = = 1 (6)
m2 m1
The amplitude of vibration of the machine, while operating at its original resonant
frequency, will be zero. By defining
Fο k1
δ st = , ω1 =
k1 m1
k2
ω2 = (7)
m2
as the natural frequency of the absorber or auxiliary system, Equations (3) and (4) can
be rewritten
ω
1 −
X1
= ω2 (8)
δ st 2
2
1 + k 2 − ω 1 − ω − k 2
k1 ω1 ω 2 k1
X2 1
= (9)
δ st k ω 2
ω 2 k
1 + 2 − 1 − − 2
k1 ω1 ω 2 k1
Figure (3) shows the variation of the amplitude of vibration of the machine X 1 / δ st with
the machine speed ω / ω 1 . The two peaks correspond to the two natural frequencies of
the composite system. As seen before, X 1 = 0 at ω = ω1 . At this frequency, Equation (9)
gives
k1 F
X2 = − δ st = − ο (10)
k2 k2
This shows that the force exerted by the auxiliary spring is opposite to the impressed
force (k 2 X 2 = − Fο ) and neutralizes it, thus reducing X 1 to zero. The size of the
dynamic vibration absorber can be found from Equations (10) and (6):
It can be seen from Figure 3 that the dynamic vibration absorber, while eliminating
vibration at the known impressed frequency ω , introduces two resonant frequencies
Ω1 and Ω 2 at which the amplitude of the machine is infinite. In practice, the operating
frequency ω must therefore be kept away from the frequencies Ω1 and Ω 2 .
ω1 = ω 2
20
m2 1
=
m1 20
16
X 1 / δ st 12
4
Ω1 Ω2
0
0.7 0.8 0.9 1.0 1.1 1.2 1.3
ω / ω1
NOTES
2. Since the dynamic absorber is tuned to one excitation frequency ω , the steady-
state amplitude of the machine is zero only at that frequency. If the machine
operates at other frequencies or if the force acting on the machine has several
frequencies, then the amplitude of vibration of the machine may become large.
EXPERIMENTAL PROCEDURES
The above theory is applied to a simply supported beam carrying a motor with mass
unbalance at its mid-span.
APPARATUS
Figure 5 shows a simply supported beam carrying a motor with mass unbalance at its
mid-span. The motor is connected to a speed control unit through which the speed of
rotation can be varied. Underneath the motor assembly, the vibration absorber can be
fixed. The vibration absorber comprises two bodies of equal mass fixed at equidistant
position from the midpoint of the horizontal cantilever. In order to measure the
amplitude of vibration an accelerometer can be attached at the beam mid-span. The
output of the accelerometer is connected to a vibration meter that will provide reading
of the amplitude of vibration.
PROCEDURE
1. For the simply supported beam and motor assembly, vary the motor speed and
measure the vibration amplitude. From the obtained response you can find the
resonance frequency of the system as a single degree of freedom system.
2. With the aid of the experimentally defined resonance frequency, the dynamic
vibration absorber is to be designed such that the frequency of oscillations is
equal to
ω 1 3EI
f = = (12)
2π 2π ml 3
3. One can easily conclude, that any three parameters of equation (12) can be
fixed, in order to determine the fourth parameter. In this experiment we will
determine the position of the mass m, at which the absorber effect is verified.
Experimentally, one can vary the position of the mass m, and excite the system
at the required excitation frequency until no vibrations of the primary system
are observed, or the position of the mass l can be determined from equation (12),
adjusted accordingly and the absorbing effect can be verified.
4. With the auxiliary system attached, vary the motor speed and record the
corresponding frequency and the resulting amplitude of vibration.
2. Plot on the same graph the velocity amplitude versus the rotational speed for
the cases with and without the dynamic vibration absorber.
3. Plot on the same graph the displacement amplitude versus the rotational
speed for the cases with and without the dynamic vibration absorber.
4. Find the length l for which the amplitude of vibration is zero when the absorber
is used using Equation (12).
a)- Simple Instrumentation for determining natural frequencies of a simple support beam.
m m
3EI
ω = 2πf =
ml 3
l
b
h
1
I = bh 3
m m 12
m = 0.17 Kg
h = 1.00 mm
b = 12.00 mm
E = 200 GPa
b)- The dynamic vibration absorber as a double cantilever beam with attached masses.
PART I: EXPERIMENT
OBJECTIVE
The ability to accurately control a process is vital to numerous design efforts. For
example, the automatic pilot in an airplane would not prove very useful, and
potentially quite dangerous, if large deviations from the desired path could not be
avoided. The Continuous Process Control laboratory will provide “hands-on”
experience with proportional control techniques. A performance evaluation of these
methods of control will be conducted.
EQUIPMENT
THEORY
ρ Cp Q T
(ρ V C ) T
p
d
dt
( ρ V C p T ) = P − ρ C p QT (2)
where:
C p = specific heat of air
Q = flow rate
ρ = density
P = power
V = volume from heater to thermistor
T = temperature above ambient
Combining terms yields the first order differential equation for the exhaust
temperature:
dT Q 1
=T = − T + P (3)
dt V ρVC p
Solving equation (3) yields
t −t
− D
τ
T (t ) = (TD − T f ) e + Tf (4)
Q 1
sT ( s) = − T ( s ) + P
V ρVC p
Factoring and arranging in standard form then gives
1
T ρVC p
= (5)
P Q
− s +1
V
G (s )
R(s) E (s) C (s)
[K ] τ Gs +1
p
p
One case of closed-loop control will be investigated: proportional control (P). For the
analysis of the steady-state accuracy of the control, an equation to describe the
system steady-state error, E (s ) , is first developed. The following set of equations
may be written from the block diagram of Figure 2.
E ( s) = R( s) − C ( s) (6)
E ( s) = R( s) − C ( s) (7)
R( s)
E ( s) = (8)
1 + G ( s)
The final value theorem is now used to determine the steady-state accuracy.
The subscript ss has been used to denote a steady-state condition. If the input is
taken as a unit step function, R ( s ) = 1 s , equation (8) may be written as
1
ess =
(
1 + lim G ( s )
s →0
) (10)
where
Gp
[ ]
G( s) = K p (11)
τ s + 1
with proportional control only Ki and Kd are zero and equation (9) becomes
1
ess = ………(12)
1 + K pG p
For the proportional control only condition, the closed-loop transfer function, T(s),
may be written
The denominator of equation (13) is first order. Hence, oscillations are not
anticipated for proportional control.
PROCEDURE
e) Give input impulse using the ‘internal’ switch and observe the
response on the oscilloscope.
e) Give input impulse using the ‘internal’ switch and observe the
response on the oscilloscope.
Our first set of simulations will consist of examining the effect of proportional
control on our system. We want to examine the effect of a change in the set-point
temperature. We will consider the effect of changing the set-point temperature from
30D C to 60D C . (above the ambient temperature) after 1 second. We will use this
same desired temperature trajectory throughout this simulation exercise.
a) Kp=0.1
b) Kp=0.25
c) Kp=0.75
d) Kp=2.25
2. Plot the obtained time response for each of the previous case. Note how
the measured (simulated) response compares to the desired response (a
step function).
8. What is the time constant and steady-state gain of the closed-loop system
at 100% gain? How does the time constant and steady-state gain vary
with change in proportional control?
The following list provides the definition of terms and information adapted from the
PT326 Process Trainer Manual:
Process: The term process is used to describe a physical or chemical change or the
conversion of energy. The temperature of air flowing in a tube is the process this
laboratory is concerned with.
Measured Value, qo: This is the voltage signal from the measuring element which
corresponds to the value of the controlled condition.
Set Value, qi: This is the desired value of the controlled condition. The set value
may be adjusted using a turn pot on the front panel or externally by providing a
voltage between 0 and -10 volt to socket D. A decrease in voltage at socket D will
cause a rise in process temperature.
Deviation, D: The deviation, D, is the difference of the measured value and the
desired value.
D = qo - qi
Comparing Element: The measured value from the bridge and the set value are
compared with a summing amplifier. The internal signals of this equipment have
been arranged to be of opposite sign. Therefore, the output from the summing
amplifier represents a deviation. Socket B on the front panel may be use to
monitor this deviation.
Gain=100/% Proportional
OBJECTIVE
Consider the flow through a short pipe connecting two tanks. The resistance
for liquid flow in such a pipe or restriction is defined as the change in the
level difference (the difference of the liquid levels of the two tanks) necessary
to cause a unit change in flow rate; that is,
Control valve
Q + qi
Load valve
H +h
Capacitance C
Q + qο
Resistance R
For laminar flow; ( Re < 2000 ), the relationship between the steady-state flow
rate and steady- state head at the level of restriction is given by
Q = Kl H
where
Then
dH 1 H
Rl = = =
dQ K l Q
For turbulent flow; ( Re > 3000 ), the steady-state flow rate is given by
Q = Kt H
where
Thus
2H
Rt =
Q
The capacitance of a tank is defined to be the change in quantity of stored
liquid necessary to cause a unity change in the potential (head). The
potential (head) is the quantity that includes the energy level of the system).
MATLAB IMPLEMENTATION
PROBLEM
The Figure below shows a system of coupled tanks. The input flow is qi
while the output flow is qο .
Inflow
qi
C2
C1 R1 R2
h1
h2
q1 qο
1. Derive an equation for each of the three subsystems (the two tanks
and the outflow) and put them into block diagram form.
2. Combine the three diagrams to form a single block diagram of the
overall system.
3. Obtain the transfer function relating the input Qi ( s ) to the output
Qο ( s ) .
4. If in normalized units, C1 = C 2 = 1, R1 = R2 = 1, and h1 = h2 = 1, plot h2 (t ) and
qο (t ) for the following cases:
a. qi (t ) is a unit step input
b. qi (t ) is an impulsive input
5. Repeat question (4) for the case where C1 = C 2 = 0.5, R1 = R2 = 2, and
h1 = h2 = 1. Compare the resulting responses to the previous ones.
6. In each of the previous cases, obtain the steady state value h2 (t ) and
qο (t ) .
MATLAB PROGRAM
When you finish typing the program select in this order: Edit, Select all, Copy
At the MATLAB prompt, type Paste and then press Enter
PART I: SIMULATION
OBJECTIVE
INTRODUCTION
REQUIREMENTS
and
di
K e θm + La a + Ra i a = v a (2)
dt
In the above, the input is the voltage v a and the output is the shaft speed θm .
( )
1. Define the output to be y = θm , write equations (1) and (2) based on this
assumption.
Y (s) A
G(s) = = (3)
Va ( s ) (1 + τ 1 s )(1 + τ 2 s )
where Y ( s) and Va ( s ) are the Laplace transform of y (t ) and v a (t ) . The
quantities A, τ 1 and τ 2 are constants to be determined. Note that if b = 0 and
La is small then τ 2 = L2 / Ra is called the electrical time constant while
τ 1 = Ra J m / K t K m is called the mechanical time constant.
Motor
Reference Va ( s )
speed, R(s) Controller A Y(s)
(1 + τ 1s )(1 + τ 2 s )
The block diagram in Figure 2 shows a closed loop system and includes a feedback
sensor. In this case the sensor is a tachometer, which is usually a small permanent
magnet DC machine that produces a voltage proportional to the shat speed y = θm . ( )
Motor
Ea (s ) Va (s )
Reference +_ Controller A Y(s)
speed, R(s) (1 + τ 1s )(1 + τ 2 s )
Y(s) Sensor
11
The controller in Figure 2 is an electronic device whose input is the error signal
given by
E ( s) = R( s) − Y (s) (4)
which is the difference between the voltages that represent the reference speed r
and the motor speed y. The output of the controller is the actuating voltage Va ,
which is the input to the motor. For a specific motor, it was found
that: τ 1 = 1 / 60 sec, τ 2 = 1 / 600 sec, A = 10 and r (t ) = 100 * 1(t ), where 1(t ) is the unit step
function.
find the closed loop transfer function Y ( s ) / R ( s) . By using MATLAB plot the
response y(t) for K p = 1, K p = 5 and K p = 10 . Compare the three plots, and
write your remarks when K p increases (in terms of overshoot, settling time,
rise time, steady state error …etc).
Va (s ) 1
G c (s ) = = K p 1 + (6)
E a (s ) Ti s
find the closed loop transfer function Y ( s ) / R ( s) . By using MATLAB plot the
response y(t) for K p = 5, Ti = 0.005, Ti = 0.01 and Ti = 0.02 . Compare the three
plots, and write your remarks when Ti increases and K p is held constant.
(in terms of overshoot, settling time, rise time, steady state error …etc).
Va (s ) 1
Gc (s ) = = K p 1 + + Td s (7)
E a (s ) Ti s
find the closed loop transfer function Y ( s ) / R ( s) . By using MATLAB plot the
response y(t) for K p = 5, Ti = 0.01, and Td = 0.0002, Td = 0.0004 and Td = 0.004
Compare the three plots, and write your remarks when Td increases and
K p and Ti are held constant. (in terms of overshoot, settling time, rise time,
steady state error …etc).
6. Compare the responses obtained in parts (3), (4) and (5) in terms of the
steady state error e ss , and the transient response.
MATLAB® IMPLEMENTATION
%------------------------------------------------
tau1=1/60; tau2=1/600;
A=10.0;
t=0.0:0.0001:0.015;
%
numg=[A];
deng=[(tau1*tau2) (tau1+tau2) 1];
%
%----------------------------------------------+
% Case 1: Proportional Controller +
%----------------------------------------------+
%
kp=[1 5 10];
%
for i=1:length(kp)
[nums,dens]=series(kp(i),1,numg,deng);
When you finish typing the program Select in this order: Edit ⇒ Select all ⇒ Copy
OBJECTIVE
2. To calculate the steady state error for a certain class of inputs, namely, step
(positional), ramp (velocity) and parabolic (acceleration) inputs.
INTRODUCTION
Consider a unity feedback system shown in Figure 1. The input is R(s) and the
output is C(s), the feedback signal H(s) and the difference between input and output
is the error signal E(s).
E(s)
R(s) +_ G (s ) C(s)
H(s)
C (s) G(s)
=
R(s) 1 + G (s)
For the polynomials inputs, such as step, velocity and acceleration, the steady-
state error is summarized in Table 1.
r (t ) = A
Type-0 system
ess = ∞
A ess = ∞
ess =
1+ K p
t t t
A ess = ∞
ess =
Kv
ess = 0
t t t
1 2
r (t ) = At
2
ess = 0
ess = 0
A
ess =
Ka
t t t
PROBLEM 2
1 1
R(s) C(s)
s 2 (s + 1) ( s + 3)
+ _ +_ 2
s
1/ s
PROBLEM 3
K(s +1)
R(s) C(s)
s2 (s + 2)
+_
s+4
(s + 3)
ROOT LOCUS
OBJECTIVE
1. The main objective of this chapter is that students master rules for
drawing control system root loci and develop a feeling for the shape of the
root loci as functions of system static gain K.
2. Sketch by hand the major features of a root locus plot for a given transfer
function.
DEFINITION
This chapter deals with the root-locus method developed by W. R. Evans. The root-
locus method enables us to find the closed-loop poles from the open loop poles for
the values of the gain of the open loop transfer function. The root-locus of a system
is a plot of the roots of the system characteristic equation as the gain factor K is
varied. It is important to know how to construct the root-locus by hand, so one can
design a simple system and be able to understand and develop the computer-
generated loci.
R(s) C(s)
+_ K G(s)
H(s)
C (s) KG ( s )
T ( s) = = (1)
R ( s ) 1 + KG ( s ) H ( s )
K (s + z1 )(s + z 2 )...(s + z m )
KG ( s ) H ( s ) = (2)
(s + p1 )(s + p 2 )...(s + p n )
1 + KG ( s) H ( s) = 0 (3)
or
KG ( s ) H ( s ) = −1 (4)
Therefore
(s + p1 )(s + p 2 )...(s + p n )
= −K (5)
(s + z1 )(s + z 2 )...(s + z m )
From (5), it follows that for a point in the s-plane to be on the root-locus, when
0 < K < ∞, it must satisfy the following two conditions:
Magnitude Criterion:
or
∑ pi − ∑ z i
σ = i =1 i =1
n p − nz
8. The Routh Hurwitz test produces information about the points of
intersection of the root locus and the imaginary axis.
9. The necessary condition for the breakaway points:
d
(G ( s) H (s)) = 0
ds
MATLAB IMPLEMENTATION
rlocus(num,den): calculates and plots the root locus of the system defined
by the transfer function with numerator num and
denominator den for a vector of values of K that is
automatically determined.
ILLUSTRATIVE EXAMPLE
1. Sketch by hand the root-locus for K > 0 for a system whose open-loop
transfer function is given below
K K
G(s) H (s) = =
(s + 1)(s + 3)(s + 4) s 3 + 8s 2 + 19s + 12
SOLUTION
∑ p −∑z i i
(−1 − 3 − 4) − 0
σ= i =1 i =1
= = −2.667
n p − nz 3−0
5. The angle of asymptotes
θ 0 = π / 3 ≡ 60 ο
θA =
(2A + 1)π = (2A + 1)π = θ 1 = π ≡ 180ο
n p − nz 3 θ 2 = 5π / 3 ≡ −π = −60 ο
θ 3 = 7π / 3 ≡ 2π + π / 3 = −60 ο ⇒ stop here because it is repeated
6. Breakaway point on the real axis is given by
dK d K
=− 3 =0
ds ds s + 8s + 19 s + 12
2
The roots of this equation are s1 = −3.55 and s 2 = −1.78 but s = −3.55 is not
part of the root -locus for K>0, therefore the breakaway point is at s = −1.78
7. The Routh array gives the location of the jω crossing.
s3 1 19
s2 8 12+K
s1 (140-K)/8 0
s0 19 0
8s 2 + (12 + 140 ) = 0
⇒ s = ± j 4.36
⇒ ω = 4.36 rad/sec
4. MATLAB PROGRAM
jω
ω = 4.36
K =0 K =0 K =0
σ
o
-2.66 -1.78
ω = −4.36
-6 -5 -4 -3 -2 -1 0 1 2 3 4
1
Imag Axis
-1
-2
-3
-4
-6 -5 -4 -3 -2 -1 0 1 2
Real Axis
PROBLEM
1. Sketch by hand the root-locus for K > 0 for a system whose open-loop
transfer function is given below
K ( s + 1)
G(s) H (s) =
s(s + 2 )(s + 3)(s + 4 )
OBJECTIVE
FREQUENCY RESPONSE
Aω
R(s) = (1)
s2 + ω 2
and
m( s ) m( s )
G(s) = = n
(2)
q( s)
∏ (s + p )
i =1
i
k1 kn αs + β
C (s) = + ... + + 2 . (3)
( s + p1 ) (s + pn ) s + ω 2
If the system is stable, then all pi have negative nonzero real parts and
lim L −1 [k i / (s + p i )] = 0 (4)
t →∞
G ( jω ) = G ( jω ) ∠Φ (ω ) (6)
G ( jω ) = Re G ( jω ) + j Im G ( jω ) = R ( jω ) + jX ( jω ) (7)
DECIBEL
The Bode magnitude plots are frequently plotted using the decibel logarithmic scale
to display the function G ( jω ) . The decibel is defined in terms of the base 10
logarithm of the power ratio of two electrical signals, or as the ratio of the square of
the amplitudes of two signals. It is defined as
2
X X
dB = 10 log = 20 log (8)
X
ο Xο
where X ο is a specified reference voltage. In practice, Equation (8) is also used for
expressing the ratios of other quantities such as displacements, velocities,
accelerations, and pressures.
DECADE
The decade is a frequency band (range) from f 1 to f 2 such that f 2 / f 1 = 10 . Thus the
frequency band from f 1 = 0.3 cps to f 1 = 3 .0 cps is one decade, and the frequency
band from 10 cps to 100 cps is also one decade. The number of decades from f 1 to
f 2 is log( f 2 / f 1 ).
BODE PLOT
The Bode plot consists of two graphs plotted on semi-log paper with linear vertical
scales and logarithmic horizontal scales. The first graph is a plot of the magnitude
of a frequency response function G ( jω ) in decibels versus the logarithm of ω , the
frequency.
G ( jω ) dB = 20 log G ( jω ) (9)
The second graph of a Bode plot shows the phase function Φ (ω ) versus the
logarithm of ω .
Φ (ω ) = ∠ G ( jω ) (10)
The gain margin is found by using the phase plot to find the frequency, ω G , where M
ο
the phase angle is 180 . At this frequency look at the magnitude plot to determine
the gain margin, GM , which is the gain required to raise the magnitude curve to 0
dB. The phase margin is found by using the magnitude curve to find the frequency,
ω Φ , where the gain is 0 dB. On the phase curve at that frequency, the phase
M
Magnitude Gain
(dB) plot Gain
crossover
0 dB ω
GM
Phase
ΦM crossover
180ο ω
ωΦ M
ωG M
1. Factor the numerator and denominator of the transfer function into the
constant, first order, and quadratic terms in the form described in Table 1.
3. Plot the asymptotic form for each of the factors on semi-log axes.
4. Graphically add the component asymptotic plots to form the overall plot in
straight-line form.
5. “Round out” the corner sin the straight-line approximate curve by hand using
the known values of the responses at the break frequencies ( ± 3dB/dec for first-
order sections, and dependent upon ξ for quadratic factors).
SUMMARY
The asymptotic forms of the seven components of the magnitude plot are summarized
in Table 1.
MATLAB IMPLEMENTATION
0ο , K > 0
Constant gain: K None = 20 log K 180ο , K < 0
Check your answer by using MATLAB. Find also a) the gain crossover and the
phase crossoverb) the phase margin and the gain margin.
SOLUTION
* Constant gain, K = 4,
* Zero at s = −2 ; corner frequency ω 2 = 1 / 0.5 = 2
* Pole at origin, 1 / jω ,
* Pole at s = −0.5 ; corner frequency ω1 = 1 / 2 = 0.5 *
Pair of complex conjugate poles with ξ = 0.2, ω n = 8; corner frequency
ω3 = 8
Corner
Asymptotic log-magnitude Phase angle
Factor Frequency
Characteristic characteristic
(rad/s)
− 20 dB/dec
− 40 dB/dec
− 20 dB/dec
− 60 dB/dec
4(1 + j 0.5ω )
Figure 2. Bode plot of G ( jω ) =
jω (1 + j 2ω ) (1 + j 2 × 0.2(ω / 8) − (ω / 8) 2 )
ω
0.4( )
Φ (ω ) = ∠ G ( jω ) = − 90 − tan (2ω ) + tan (0.5ω ) − tan
ο −1 −1 8 −1
ω 2
1− ( )
8
num=64*[1 2];
den=conv([1 0],conv([1 0.5],[1 3.2 64]));
bode(num,den)
This will result in the graph given by Figure 3. In order to determine the
gain crossover, the gain margin, the phase crossover and the phase
margin, the following lines can be added at the MATLAB prompt
clg
margin(num,den)
10( s + 3)
G(s) =
s ( s + 2)(0.5s 2 + 0.5s + 1)