You are on page 1of 220

King Fahd University of Petroleum & Minerals

College of Engineering Sciences


Mechanical Engineering Department

ME 413 System Dynamics & Control

ME 413: System Dynamics and Control 1/220 Laboratory Manual


Preface to the First Edition

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.

I gratefully acknowledge the support and encouragement provided by Dr. Abdulghani


Al-Farayedhi, Chairman of the Mechanical Engineering Department in writing this
manual for supporting my request for one month summer supporting 1999-2000.

Abdelaziz BAZOUNE
Lecturer
Mechanical Engineering Department
July 2000

ME 413: System Dynamics and Control 2/220 Laboratory Manual


Preface to the Second Edition

Objective

Developing the ME 413 laboratory content to meet the following requirements:

1. Optimize the utilization of existing equipments and facilities to enhance


student learning of lecture materials.
2. Synchronize laboratory assignments with lecture topics.

Toward the first objective, the following tasks were undertaken:

► 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.).

► Initialize the maintenance of the equipment. This also entailed ordering


several missing parts from the agents. Some broken or badly corroded shafts
were also ordered from the M. E. workshop.

► Assembly and setup of the five apparatus (Simple Harmonic Oscillator,


Torsional Oscillator, Temperature Controller, Coupled Tanks, Servo
Controller).

► Calibration and operation of the experimental setups. In some of the setups,


e.g., CE105, CE110, selected experiments were chosen and performed.

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.

Dr. Faleh Al-Suleiman


Mechanical Engineering Department
July 2002

ME 413: System Dynamics and Control 3/220 Laboratory Manual


ACKNOWLEDGMENT

The efforts of Angry. Ahmed A. Abdulnabi in setting up the experiments and


following up the order of parts is greatly appreciated.

Many Sections of the previous work of Mr. Abdelaziz Bazoune for the Lab Manual of
ME 413 has been utilized in this manual.

ME 413: System Dynamics and Control 4/220 Laboratory Manual


TABLE OF CONTENTS

[1] Introduction to MATLAB


[2] Laplace transform
[3] Mechanical Systems (I): Translational mechanical Systems
a) Simulation: Simple Harmonic Oscillator
b) Experiment: Simple Harmonic Oscillator
[4] Mechanical Systems (II): Rotational mechanical Systems
a) Simulation: Torsional Oscillations
b) Experiment: Torsional Oscillations
[5] Mechanical Systems (III):
a) Modeling and Analysis of a Pickup Truck
b) Experiment: Centrifugal Governors
[6] Response of Systems in time Domain
a) Block diagram Reduction Using MATLAB
b) Experiment: i) Damped free Vibration
ii) Forced Vibrations
[7] Electrical and Electromechanical Systems
a) Simulation of Electrical Systems
b) Simulation of Electromechanical Systems
[8] Liquid Level Systems
a) Simulation : Two Coupled Tanks
b) Experiment: Coupled Tanks
i) Basic Tests and Transducer Calibration
ii) Open and Closed Loop System
[9] Air Temperature Control
a) Simulation: Air Temperature Control
b) Experiment: Air temperature Control
[10] Transient Response Characteristics
a) Simulation: Transient Response Specifications of a Second Order Systems.
b) Experiment: Vibration Absorbers
[11] Steady State Response characteristics
a) Simulation: Steady State Error and System Type.

ME 413: System Dynamics and Control 5/220 Laboratory Manual


b) Experiment: Servo Trainer
i) Response calculating and Measurements
ii) Proportional Control of Servo Trainer Speed
[12] Design In Control System
a) Simulation: Root Locus.
b) Experiment: The Ball and Beam Apparatus
i) Basic Tests and Familiarization
[13] Design In Control System
a) Simulation: PID Controllers.
b) Experiment: The Ball and Beam Apparatus
i. Proportional Control and Manual Control of Ball Position.
[14] Frequency Domain Analysis of Dynamic Systems
a) Simulation: Bode Plot.

ME 413: System Dynamics and Control 6/220 Laboratory Manual


References

[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.

[5] J. L Shearer, B. T. Kulakowski and J. F. Gardner “Dynamic Modeling and Control of


Engineering Systems”, 2nd Edition, 1997. Prentice Hall Inc.

[6] C. H. Van Loan,“ Introduction to Scientific Computing”, 1997Prentice Hall Inc.

[7] Katsuhiko Ogata, “System Dynamics, 2nd Edition, 1992. Prentice Hall Inc.

[8] G. F Franklin, J. D. Kulakowski and A. Emami-Naeini “Feedback Control of Dynamic


Systems”, 3rd Edition, 1994. Addison Wesley.

[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.

[12] E. Pärt-Enander, A. Sjöberg, B. Melin and P. Isaksson, “The MATLAB® Handbook”,


1996. Addison Wesley.

[13] D. Rowell, and D. N. Wormley, “System Dynamic”, International Edition, 1997.


Prentice Hall Inc.

[14] D. Hanselman, and B. Littlefield, “Mastering MATLAB®: A Comprehensive Tutorial


and Reference”, 1996. Prentice Hall Inc.

[15] H. Saadat, “Computational Aids in Control Systems Using MATLAB®”, 1993.


McGraw-Hill.

[16] N. E. Leonard and W. S. Levine, “Using MATLAB® to Analyze and Design Control
Systems”, 2nd Edition, 1995. Benjamin/Cummings Publishing Company, Inc.

ME 413: System Dynamics and Control 7/220 Laboratory Manual


[17] V. Stonick and K. Bradley, “Labs for Signals and Systems Using MATLAB®”, 1996.
PWS.

[18] N. S. Nise, “Control Systems Engineering”, 2nd Edition, 1995. Benjamin/Cummings


Publishing Company, Inc.

[19] S. S. Rao, “Mechanical Vibrations, Third Edition, 1995. Addison Wesley.

[20] S. G. Kelly, “Fundamentals of Mechanical Vibrations, 1993. McGraw-Hill.

[21] CE105 and CE105MV Coupled Tanks Manual, TQ education and Training Ltd.

[22] CE106 Ball and Beam Apparatus Manual, TQ education and Training Ltd.

[23] CE110 Servo Trainer Manual, TQ education and Training Ltd.

ME 413: System Dynamics and Control 8/220 Laboratory Manual


King Fahd University of Petroleum & Minerals
College of E ngineering Sciences
Mechanical E ngineering Department

ME 413: System Dynamics & Control

INTRODUCTION TO MATLAB

Student Name :_________________________________________________________


Section# :__________________________________________________________________
Student ID#:____________________________________________________________
Date:_________________________________________________________________________
Instructor:________________________________________________________________

ME 413: System Dynamics and Control 9/220 Laboratory Manual


INTRODUCTION TO MATLAB®

MATLAB (an abbreviation for MATrix LABoratory) is a matrix-based system for


mathematical and engineering calculations.

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

» help 'function name'

will give information on the specific function named as to its purpose and use.
the. command

» help help

will give information as to how to use the on-line help.

Commands and Matrix Functions Used in MATLAB

We shall first list various types of MATLAB commands and matrix functions that are
frequently used in solving control engineering problems.

Matrix Operators

The following notations are used in the matrix operations:

+ Addition
– Subtraction
* Multiplication
/ Division
\ Left-division
^ Power
' Conjugate transpose

Relational and Logical Operators

The following relational and logical operators are used in MATLAB:

< Less than


<= Less than or equal
> Greater than
>= Greater than or equal
== Equal
~= Not equal

Special Characters

ME 413: System Dynamics and Control 10/220 Laboratory Manual


The following special characters are used in MATLAB:

[ ] Used to form vectors and matrices


( ) Arithmetic expression precedence
' Separate subscripts and function arguments
; End rows, suppress printing
: Subscripting, vector generation
! Execute operating system command
% Comments

BASIC CALCULATIONS

Simple Math

MATLAB can be used as a calculator.

Example 1. Calculate the expression 3 + 7 − (5 / 2) + 3 2

» 3+sqrt(7)–(5/2)+3^2

ans =
12.1458

The variable ans is assigned to the previous result if no assignment is made.


Normally variables are used and assigned values or results.

Example 2. As an alternative, the above can be solved by storing information in


MATLAB variables

» erasers=4; pads=6;tapes=2; The semicolon tells MATLAB to evaluate


» items=erasers+pads+tapes the line but not tell us the answer

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.

Number Display Format

ME 413: System Dynamics and Control 11/220 Laboratory Manual


When MATLAB displays numerical results, it follows several rules. By default, if a
result is an integer, MATLAB displays it as an integer. Likewise, when a result is a
real number, MATLAB displays it with approximately 4 digits to the right of the
decimal point. You can override this default behavior by specifying a different
format using the Numeric Format menu item in the Options menu if available or
by typing the appropriate MATLAB command at the prompt. Using the variable
average_cost from the above example, some of these numerical formats are

MATLAB Command average_cost Comments

format long 36.16666666666666 16 digits


format short e 3.6167e+001 5 digits plus exponent
format long e 3.616666666666666e+001 16 digits plus exponent
format bank 36.17 2 decimal digits
format rat 217/6 rational approximation
format short 36.1667 default display

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 Naming Rules Comments/Examples

Variable names are case sensitive Items, items, itEms and ITEMS are
all different MATLAB variables

Variable names can contain up to howaboutthisvariablename


19 characters; characters beyond
the 19th are ignored.

Variable names must start with a how_about_this_variable_name


letter followed by any number of X51483
letters, digits, or underscores. a_b_c_d
Punctuation characters are not
allowed since many have special
meaning to MATLAB.

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.

Example. Evaluate the following function

ME 413: System Dynamics and Control 12/220 Laboratory Manual


V = Z cosh ( g ) + sinh ( g ) / Z

where Z = 200 + j 300 and g = 0.02 + j1.5

» 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).

Infinity is generated by dividing a nonzero value by zero, or by evaluating well-


defined mathematical expressions that overflow, i.e., exceed realmax. Not-a-
number is generated by trying to evaluate expressions like 0/0 or Inf-Inf that do
not have well defined mathematical values.

MATRICES

A matrix is a set of numbers arranged in a rectangular grid of rows and columns.


When we use a matrix, we need a way to refer to individual elements or numbers in

ME 413: System Dynamics and Control 13/220 Laboratory Manual


the matrix. A simple method for specifying an element in the matrix uses the row
and the column number. The size of a matrix is specified by the number of rows
and columns. If a matrix has the same number of rows and columns, it is called a
square matrix.

Entering Matrices in MATLAB

In MATLAB a matrix is created with a rectangular array of numbers surrounded by


square brackets. The elements in each row are separated by blanks or commas.
The end of each row, except the last row, is indicated by a semicolon. Matrix
elements can be any MATLAB expression. The statement

» A = [6 1 2; –1 8 3; 2 4 9]

results in the output

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

ME 413: System Dynamics and Control 14/220 Laboratory Manual


A determinant is a scalar computed from the entries in a square matrix. Determinants
have various applications in engineering, including computing inverses and solving
system of simultaneous equations. For a 2 × 2 matrix A, the determinant is

A = a11 a 22 − a 21 a12

For a 3 × 3 matrix A, the determinant is

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'

will produce the following matrix

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

ME 413: System Dynamics and Control 15/220 Laboratory Manual


Basic Operations in Matrices

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];

To add two matrices A and B, simply type

» A+B

ans =
9 6 2
4 12 4
2 2 11

Similarly, to multiply two matrices A and B, simply type

» A*B

ans =
23 30 5
37 21 14
26 8 22

Dividing by matrices is also straightforward once you understood how MATLAB


interprets the divide symbols / and \. This can be illustrated into the following
topic .

Solving a System of Equations

Consider the following system of three equations with three unknowns

a11 x1 + a12 x 2 + a13 x 3 = b1


a 21 x1 + a 22 x 2 + a 23 x 3 = b2
a 31 x1 + a 32 x 2 + a 33 x 3 = b3

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 

this can be written in compact form as

[A]{X } = [B]

ME 413: System Dynamics and Control 16/220 Laboratory Manual


where

 a11 a12 a13   x1   b1 


[A] = a 21 a 22 a 23 , {X } =  x 2 , [b] = b2 
 a 31 a 32 a 33  x  b3 
 3

A system of equations is nonsingular if the matrix [A] containing the coefficients of


the equations is nonsingular. Solving the previous equation for the unknown {X }
yields

{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).

To illustrate, we can consider the following system equations

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

» A=[3 2 -1;-1 3 2;1 -1 -1]; B=[10 5 -1]';

» 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.

» A=[3 -1 1; 2 3 -1; -1 2 -1]; B=[10 5 -1];

» x=B/A

ME 413: System Dynamics and Control 17/220 Laboratory Manual


produces the same result. The vector x then contains the following values: -2, 5, -
6. If a set of equations is singular, an error message is displayed ; the solution
vector may contain values of NaN or ∞

Eigenvalues

If [A] is n × n matrix, the n numbers λ that satisfy

[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

The magic Function

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=

ME 413: System Dynamics and Control 18/220 Laboratory Manual


16 2 3 13
5 11 10 8
9 7 6 12
4 14 15 1

POLYNOMIALS

A polynomial is a function of a single variable that can be expressed in the


following general form,

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.

Example. The polynomial x 4 − 12 x 3 + 25 x + 116 is entered as

» 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

ME 413: System Dynamics and Control 19/220 Laboratory Manual


0.0100 – 0.1200 0.0000 0.2500 1.1600 + 0.0000i

» pp = real(pp) % throwaway spurious imaginary part

pp =
1.0000 -12.0000 0.0000 25.0000 116.0000

Polynomial Multiplication

Polynomial multiplication is supported by the function conv (which performs the


convolution of two arrays).

Example. Consider the product of the two polynomials a ( x) = x 3 + 2 x 2 + 3 x + 4 and


b( x) = x 3 + 2 x 2 + 9 x + 16

» a = [1 2 3 4]; b = [1 2 9 16];
» c = conv(a,b)

c=
1 4 16 44 67 84 64

This result is c( x) = x 6 + 4 x 5 + 16 x 4 + 44 x 3 + 67 x 2 + 84 x + 64 . Multiplication of more


than two polynomials requires repeated use of conv.

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

which is d ( x) = 2 x 3 + 6 x 2 + 12 x + 20 . When two polynomials are of different orders,


the one having lower order must be padded with leading zeros to make it have the
same effective order as the higher-order polynomial. Consider the addition of
polynomial c and d above
» e = c + [0 0 0 d]

e=
1 6 20 52 81 96 84

which is e( x) = x 6 + 6 x 5 + 20 x 4 + 52 x 3 + 81 x 2 + 96 x + 84 . Leading zeros are required


rather than trailing zeros because coefficients associated with like powers of x must
line up.

Polynomial Division

ME 413: System Dynamics and Control 20/220 Laboratory Manual


In MATLAB, the division of polynomials is accomplished with the function deconv.
Using the polynomials c and b from above

» [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

Because differentiation of a polynomial is simple to express, MATLAB offers the


function polyder for polynomial differentiation

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

which is h( x) = 6 x 5 + 30 x 4 + 80 x 3 + 156 x 2 + 162 x + 96 .

Polynomial Evaluation

In MATLAB, the evaluation of polynomials is accomplished with the function


polyval.

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

ME 413: System Dynamics and Control 21/220 Laboratory Manual


GRAPHICS

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.

Plotting Data Points

Example 1. Create a linear x-y plot for the following variables

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

Figure 1. Example of x-y plot

Plotting Functions

Single Plot

Example 2. Plot the function y=sin(t)/t, for − 4π < t < 4π .

» t = – 4*pi:0.05:4*pi; %starting point:increment:end point

ME 413: System Dynamics and Control 22/220 Laboratory Manual


» y = sin(t)./t; %the dot is placed after sin(t) to show that this is a
scalar %division.
» plot(t,y)
» title('The Sinc Function')
» xlabel('Radians')
» ylabel('Displacement')
» grid

The Sinc Function


1

0.8

0.6
Displacement

0.4

0.2

-0.2

-0.4
-15 -10 -5 0 5 10 15
Radians

Figure 2. Example of Sinc function plot

Multiple Plots

Example 3. For 0 < t < 4π , Plot the functions x = 0.5*sin(0.5*t) and Y = sin(t)*cos(t);

» clf % clear the previous graph windows


» t = 0:0.05:4*pi; % starting point:increment:end point
» x =.5*sin(0.5*t); % first function
» y =.5*cos(0.5*t); % second function
» plot(t,x,':',t,y,'-')% multiple plots, the first function is plotted with dotted lines
% while the second one is plotted as solid lines.
» title('Plot of Two Function')
» xlabel('Radians')
» ylabel('Displacement')
» grid
» legend('x','y') % a legend is plotted to show the different plots

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.

ME 413: System Dynamics and Control 23/220 Laboratory Manual


Plot of Two Function
0.5
x
0.4 y

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

Figure 3. Example of two function plot

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.

Example 4. Use the subplot command to plot the following functions

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;

» clf % clear the previous graph windows


» t = linspace(–10,10,1000); % generates 1000 points linearly spaced starting
% from –10 and ending at 10.
%
» x = 2*sin(t)+3*sin(2*t)+4*sin(3*t)+5*sin(4*t);
» y = (t).*cos(t).*sin(t);
» z = cos(2*t)+2*cos(3*t)+2*cos(3*t).*sin(3*t);
» w=x+y–z;
%
» hold on
» subplot(221);plot(t,x); title('The Function x');
» subplot(222);plot(t,y); title('The Function y');
» subplot(223);plot(t,z); title('The Function z');
» subplot(224);plot(t,w); title('The Function w');
» hold off

ME 413: System Dynamics and Control 24/220 Laboratory Manual


The Function x The Function y
15 5

10

0 0

-5

-10

-15 -5
-10 -5 0 5 10 -10 -5 0 5 10

The Function z The Function w


4 20

2 10

0 0

-2 -10

-4 -20
-10 -5 0 5 10 -10 -5 0 5 10

Figure 4. Example of subplot.

Polynomial Curve Fitting

In general, a polynomial fit to data in vector x and y is a function p of the form

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.

Example 5. Find a polynomial of degree 3 to fit the following data:

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)

The coefficients of a third degree polynomial are found as follows

p=
1.0000 2.0000 3.0000 1.0000

i.e., y = x 3 + 2 x 2 + 3x + 1

ME 413: System Dynamics and Control 25/220 Laboratory Manual


Three-Dimensional Mesh Surface Plot

The statement mesh(z) creates a three-dimensional plot of the elements in matrix Z.


A mesh surface is defined by the Z coordinates of points above a rectangular grid in
the x-y plane. The plot is formed by joining adjacent points with straight lines.
meshgrid transforms the domain specified by vector x and y into arrays X and Y.

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)

Figure 5. Three dimensional plot.

Line Plots of 3-D Data

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.

Example 7. The following statements produce a helix.

» t = 0:pi/50:10*pi;
» plot3(sin(t),cos(t),t)
» axis square; grid on

ME 413: System Dynamics and Control 26/220 Laboratory Manual


Figure 7. Helix plot

Plotting Matrix Data

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

Notice how MATLAB cycles through line colors.

ME 413: System Dynamics and Control 27/220 Laboratory Manual


Figure 8. Three dimensional plot

Additional Plotting Capabilities

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].

Line and Mark Style

ME 413: System Dynamics and Control 28/220 Laboratory Manual


The command plot(x,y) generates a line plot that connects the points represented
by the vectors x and y with line segments. You can also select other line types-
dashed, dotted and dash-dot. You can also select a point, plus sign, stars circles or
x-mark plots instead of a line plot. Table 2 contains these different options for lines
and marks.

TABLE 2. Line and Mark Options

Line Type Point Type Colors

- solid . point y yellow w white


-- dashed + plus g green r red
: dotted * star m magenta k black
–. dash-dot ○ circle b blue I invisible
x x-mark c cyan

PROGRAMMING IN MATLAB®

MATLAB contains several commands to control the execution of MATLAB statements,


such as conditional statements, loops, and commands supporting user interaction.

Example 1. A script file that produces a sequence of increasingly refined plots of


sin (2 π x) .

» 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

ME 413: System Dynamics and Control 29/220 Laboratory Manual


1 1 1

0.5 0.5 0.5


n= 3 n= 5
0 0 n= 4 0

-0.5 -0.5 -0.5


-1 -1 -1
-1 0 1 -1 0 1 -1 0 1

1 1 1
0.5 0.5 0.5

0 n= 6 0 n= 8 0 n = 10

-0.5 -0.5 -0.5

-1 -1 -1
-1 0 1 -1 0 1 -1 0 1

1 1 1

0.5 0.5 0.5

0 n = 12 0 n = 18 0 n = 24

-0.5 -0.5 -0.5


-1 -1 -1
-1 0 1 -1 0 1 -1 0 1

Figure 9. Regular polygons

Example 3. How to create a STOP sign.

» 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

Figure 10. Red stop sign

ME 413: System Dynamics and Control 30/220 Laboratory Manual


MATLAB Commands and Matrix Functions

Commands and matrix functions Explanations of what commands do,


commonly used in solving control matrix functions mean, or statements
engineering problems mean
abs Absolute value, complex magnitude
angle Phase angle
ans Answer when expression is not assigned
atan Arctangent
axis Manual axis scaling
bode Plot Bode diagram
clear clear workspace
clf Clear graph screen
computer Type of computer
conj Complex conjugate
conv Convolution, multiplication
corrcoef Correlation coefficients
cos Cosine
cosh Hyperbolic cosine
cov Covariance
deconv Deconvolution, division
det Determinant
diag Diagonal matrix
eig Eigenvalues and eigenvectors
exit Terminate program
exp Exponential base e
expm Matrix exponential
eye Identity matrix
filter Direct filter implementation
format long 15-Digit scaled fixed point
(Example: 1.33333333333333)
format long e 15-Digit floating point
(Example: 1.33333333333333e+000)
format short 5-Digit scaled fixed point
(Example: 1.3333)
format short e 5-Digit floating point
(Example: 1.3333e+000)
freqs Laplace transform frequency response
freqz z-Transform frequency response
grid Draw grid lines
hold Hold current graph on the screen
i −1
imag Imaginary part
inf Infinity
inv Inverse
j −1
length Vector length
linspace Linearly spaced vectors

ME 413: System Dynamics and Control 31/220 Laboratory Manual


log Natural logarithm
loglog Loglog x-y plot
logm Matrix logarithm
logspace Logarithmically spaced vectors
log10 Log base 10
lqe Linear quadratic estimator design
lqr Linear quadratic regulator design
max Maximum value
mean Mean value
median Median value
min Minimum value
NaN Not-a-number
nyquist Plot Nyquist frequency response
ones constant
Pi Pi ( π )
plot Linear x-y plot
polar Polar plot
poly Characteristic polynomial
polyfit Polynomial curve fitting
polyval Polynomial evaluation
polyvalm Matrix polynomial evaluation
prod Product of elements
quit Terminate program
rand Generate random numbers and matrices
rank Calculate the rank of a matrix
real Real part
rem Remainder or modulus
residue Partial-fraction expansion
rlocus Plot root loci
roots Polynomial roots
semilogx Semilog x-y plot (x-axis logarithmic)
semilogy Semilog x-y plot (y-axis logarithmic)
sign Signum function
sin Sine
sinh Hyperbolic sine
size Row and column dimensions
sqrt Square root
sqrtm Matrix square root
std Standard deviation
step Plot unit-step response
sum Sum of elements
tan Tangent
tanh Hyperbolic tangent
text Arbitrarily positioned text
title Plot title
trace Trace of a matrix
who Lists all variables currently in memory
xlabel x-Axis label
ylabel y-Axis label
zeros Zero

ME 413: System Dynamics and Control 32/220 Laboratory Manual


King Fahd University of Petroleum & Minerals
College of E ngineering Sciences
Mechanical E ngineering Department

ME 413: System Dynamics & Control

LAPLACE TRANSFORMS

Student Name :_________________________________________________________


Section# :__________________________________________________________________
Student ID#:____________________________________________________________
Date:_________________________________________________________________________
Instructor:________________________________________________________________

ME 413: System Dynamics and Control 33/220 Laboratory Manual


LAPLACE TRANSFORM

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).

PROBLEM #1: Distinct Real Poles

Consider the following transfer function

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

2. Find the inverse Laplace transform L −1 [ G (s ) ]= g (t ) .


3. Check your finding by using MATLAB. The MATLAB function residue performs a
partial fraction expansion and is defined as:

[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.

PROBLEM #2: Repeated Real Poles

Consider the following transfer function

num s+2
G(s) = = 3
den s (s − 1)2

1. Write G(s) in partial fractions.


2. Find the inverse Laplace transform L −1 [ G (s ) ]= g (t ) .
3. Check your finding by using MATLAB. First write G(s) in the form

num
G(s) =
den

ME 413: System Dynamics and Control 34/220 Laboratory Manual


For repeated poles, however, the previous command is not applied and one can use the
online help and the MATLAB function resi2. The MATLAB function resi2 performs a
partial fraction expansion is defined as:

resi2(num,den,pole,n,k) returns the residue of a repeated pole of order n and the


kth power denominator of [1-pole], where num and den
represent the original polynomial ratio num/den.

PROBLEM #3: Complex Poles

Use the method of completing the square to find the inverse Laplace transform of

s+5
G(s) =
s + 2s + 5
2

PROBLEM #4: Initial Value Problem

1. Solve the Initial Value Problem

y + y = f (t ), y (0) = 1, y (0) = 0

where f(t) is defined by


f(t)

t
0 π 2π
2. Plot the response y(t)

MATLABPROGRAM

Click at File, New, M-file


Then write the following program and do not forget to fill the blanks

% Distinct Poles

num=[……………. …………….];
den=[……………. ……………. …………….];
[r,p,k]=residue(num,den)
%

When you finish typing the program


Select in this order: Edit, Select all, Copy
At the MATLAB prompt, type
Paste and then press Enter
Repeat the previous program for the case of repeated poles and apply the
appropriate function.

ME 413: System Dynamics and Control 35/220 Laboratory Manual


King Fahd University of Petroleum & Minerals
College of E ngineering Sciences
Mechanical E ngineering Department

ME 413: System Dynamics & Control

MECHANICAL SYSTEMS (I)


Simple Harmonic Oscillator

Student Name :_________________________________________________________


Section# :__________________________________________________________________
Student ID#:____________________________________________________________
Date:_________________________________________________________________________
Instructor:________________________________________________________________

ME 413: System Dynamics and Control 36/220 Laboratory Manual


SIMPLE HARMONIC OSCILLATOR
PART I: EXPERIMENT

OBJECTIVE

4. To determine linear spring characteristics.


5. To determine the period of a mass spring system experimentally.
6. To compare the theoretical period with the one obtained from the
experiment.

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 simplest example of an oscillating system is a mass connected to a rigid


foundation by a spring as shown in Figure 1.

Figure 1. Mass spring system

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

ME 413: System Dynamics and Control 37/220 Laboratory Manual


where ωn = k M is the natural frequency of the system. The above equation
represents a second order ordinary differential equation that admits a solution of
the form

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.

In the static situation shown in Figure 2, in equilibrium, the magnitude of the


upward force, F , exerted by the spring on M is equal to the weight of the attached
mass, W = Mg .

Experiment 1: Measure of the Spring Constant k

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 )

ME 413: System Dynamics and Control 38/220 Laboratory Manual


so that
L = ( g / k ) M + 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.

Procedure and Requirements

1) Hang the spring with its narrow part at the top.

2) Hang various masses from the spring, and record the values of L for each
mass M .

3) Record your readings in Table 1.

4) Plot a graph of L versus 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.

6) The slope of this line is g / k , so the spring constant is k = g /slope. For


intermediate values of M , the graph will probably be straight. Measure the
slope of that part of the graph and determine the value of k and its
uncertainty.

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.

ME 413: System Dynamics and Control 39/220 Laboratory Manual


8) In following experiments, try to keep range of oscillations between these two
points you marked on the graphs to avoid complications.

Experiment 2: Period of Oscillations of Mass on spring

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

where k is the spring constant that you determined experimentally in Experiment #


1.

(
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.

ME 413: System Dynamics and Control 40/220 Laboratory Manual


Apparatus

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.

Procedure and Requirements

How does period T depend on mass M and Amplitude?

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).

2) Choose a mass M in the middle of the straight range of graph from


Experiment #1, Figure 3 and hang it from the spring.

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.

ME 413: System Dynamics and Control 41/220 Laboratory Manual


6) Measure τ for other masses M keeping motion in the mid range of graph of
L versus M (Figure 3).

7) Compute τ 2 and plot a graph of τ 2 versus M .

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

ME 413: System Dynamics and Control 42/220 Laboratory Manual


TABLE 1. Measure of the Spring Constant k

Trial Mass M Length L


# (kg) (cm)
1 0.4
2 0.8
3 1.2
4 1.6
5 2.0
6 2.4
7 2.8
8 3.2
9 3.6
10 4.0

TABLE 2. Period of Oscillations of Mass on spring

Trial Mass M Time t for n oscillations Period τ = t n τ2


# (kg) (s) (s) (s2)
1 0.4
2 0.8
3 1.2
4 1.6
5 2.0
6 2.4
7 2.8
8 3.2
9 3.6
10 4.0

ME 413: System Dynamics and Control 43/220 Laboratory Manual


PART II: SIMULATION

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®.

1) Obtain the differential equation of motion.


2) Obtain the output response for a step input of magnitude 2.0 N? Plot this
response.
3) State clearly the major differences between this response and the one
obtained from the experiment? Justify your answer.
4) If you are asked that your simulation response should match the
experimental one what are the measures that you should take into
consideration?
5) From the above steps obtain a similar response to the one obtained in the
experiment.

Report and Requirements

6) Discuss your experimental results and their uncertainties.


7) How does the period τ depend on the amplitude of oscillations, A?
8) How well does the improved theory compare with your data?
9) How does the simulation compare with the experimental results?

ME 413: System Dynamics and Control 44/220 Laboratory Manual


King Fahd University of Petroleum & Minerals
College of E ngineering Sciences
Mechanical E ngineering Department

ME 413: System Dynamics & Control

MECHANICAL SYSTEMS (II)


Modeling of a Pickup Truck

Student Name :_________________________________________________________


Section# :__________________________________________________________________
Student ID#:____________________________________________________________
Date:_________________________________________________________________________
Instructor:________________________________________________________________

ME 413: System Dynamics and Control 45/220 Laboratory Manual


Modeling of a Pickup Truck

OBJECTIVE

To model a suspension system of a pickup truck and simulate its response for a
given profile of the road.

MODELING OF MECHANICAL SYSTEM ELEMENTS

The motion of mechanical elements can be described in various dimensions as


translational, rotational, or combinations. The equations governing the motion of
mechanical systems are often formulated from Newton’s law of motion.

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.

ME 413: System Dynamics and Control 46/220 Laboratory Manual


TABLE 1. Summary of elements involved in linear mechanical systems

Element Translation Rotation

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

The motion of mechanical elements can be described in various dimensions as


translational, rotational, or combination of both. The equations governing the
motion of mechanical systems are often formulated from Newton’s law of motion.

1. Construct a model for the system containing interconnecting elements.


2. Draw the free-body diagram.
3. Write equations of motion of all forces acting on the free body diagram. For
translational motion, the equation of motion is Equation (1), and for
rotational motion, Equation (2) is used.

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

ME 413: System Dynamics and Control 47/220 Laboratory Manual


wheel is m. The suspension spring has a constant K 1 , and the tire has a spring
constant K 2 . The damping constant of the shock absorber is B.

y1

Shock
absorber

y2
Spring
x Profile
of road

Figure 1. Pickup truck suspension system.

1. Suggest a suitable model for this system.


2. Draw the free body diagram for the suggested model.
3. Write the equations of motion of the system.
4. For zero initial conditions, take Laplace transform of both sides of the
above equations obtained in part (3). Obtain the transfer functions

Y1 ( s ) num1( s ) Y2 ( s ) num 2( s )
G1 ( s ) = = and G2 (s) = =
X ( s ) den1( s ) X ( s ) den2( s )

in function of the system parameters M, m, B, K 1 and K 2 . In the above

Y1 ( s ) and Y2 ( s ) represent the Laplace transform of y1 (t ) and y 2 (t ) ,


respectively and X(s) represents the Laplace transform of x(t ) . The
quantities num1(s), num2(s), den1(s) and den2(s) are numerator and
denominator polynomials in s.
5. To find the responses y1 (t ) and y 2 (t ) consider the following

a)- M = 200 Kg , m = 10 Kg , K 1 = 100 N / m, K 2 = 5 00 N / m, and B = 1.0 KNs / m

b) M = 500 Kg , m = 10 Kg , K 1 = 500 N / m, K 2 = 1000 N / m, and B = 10 0 Ns / m

c) M = 500 Kg , m = 10 Kg , K 1 = 50 N / m, K 2 = 1000 N / m, and B = 1.0 KNs / m

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

ME 413: System Dynamics and Control 48/220 Laboratory Manual


0, t<0
x(t ) = 
0.02 t≥0

6. Refer to the previous question, i.e., question # (5), which choice of


system parameters M, m, B, K 1 and K 2 is the best one and why? Justify
your answer.
7. Use the final value theorem to obtain the steady state values y1ss and y 2 ss
of the system that appears to you to be the best one.

MATLAB PROGRAM

Click at File, New, M-file


Then write the following program and do not forget to fill the blanks
% Part a
t=0.0:0.01:15;
M=……….;m=……….;k1=……….;k2=……….;B=……….;
num_1 = [………. ……….];num_2 = [………. ……….];
den=[………. ………. ………. ………. ……….];
%
y1=0.02*step (num_1,den,t);y2=0.02*step (num_2,den,t);
subplot(311);plot(t,y1,'r',t,y2,':');legend('y1','y2');
grid;title('Part A : Response of the pickup ');
xlabel('Time in seconds');ylabel('Deflection in m');
%
Repeat the previous steps for parts b and c and modify the program accordingly. To do
so, follow the following steps:
Edit, Select all, Copy, Paste
When you finish typing the program, follow these steps:
Edit, Select all, Copy
Go to MATLAB prompt and type
Paste and then press Enter

ME 413: System Dynamics and Control 49/220 Laboratory Manual


King Fahd University of Petroleum & Minerals
College of E ngineering Sciences
Mechanical E ngineering Department

ME 413: System Dynamics & Control

MECHANICAL SYSTEMS (III)


Torsional Oscillations

Student Name :_________________________________________________________


Section# :__________________________________________________________________
Student ID#:____________________________________________________________
Date:_________________________________________________________________________
Instructor:________________________________________________________________

ME 413: System Dynamics and Control 50/220 Laboratory Manual


TORSIONAL OSCILLATIONS

SUMMARY AND REVIEW

MODELING OF MECHANICAL SYSTEM ELEMENTS

The motion of mechanical elements can be described in various dimensions as


translational, rotational, or combinations. The equations governing the motion of
mechanical systems are often formulated from Newton’s law of motion.

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

The motion of mechanical elements can be described in various dimensions as


translational, rotational, or combination of both. The equations governing the
motion of mechanical systems are often formulated from Newton’s law of motion.

1. Construct a model for the system containing interconnecting elements.

ME 413: System Dynamics and Control 51/220 Laboratory Manual


2. Draw the free-body diagram.
3. Write equations of motion of all forces acting on the free body diagram. For
translational motion, the equation of motion is Equation (1), and for
rotational motion, Equation (2) is used.

TABLE 1. Summary of elements involved in linear mechanical systems.

Element Translation Rotation

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θ

ME 413: System Dynamics and Control 52/220 Laboratory Manual


PART I: SIMULATION

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.

2. For zero initial conditions obtain the transfer functions G1 ( s ) and G2 ( s )


Θ1 ( s ) Θ2 ( s )
given by G1 ( s ) = and G2 ( s ) =
τa (s) τa (s)
where Θ1 ( s ) and Θ 2 ( s ) are the Laplace transforms of θ1 ( t ) and θ 2 ( t ) ,
respectively; and τ a ( s ) is the Laplace transforms of τ a ( t ) . It is clear that
the transfer functions G1 ( s ) and G2 ( s ) should be given in terms of the
system parameters k1 , k2 , B1 , B2 and J1 , J 2 .

3. If in SI units J1 = J 2 =1.0 and B1 = B2 =0.7 and k1 = k2 =10; use Matlab to plot


the responses θ1 ( t ) and θ 2 ( t ) if τ a ( t ) is a step input of magnitude 10 N.m.

4. From the above expression of G2 ( s ) , write the explicit expression of θ 2 ( t )


if τ a ( s ) is a step input of magnitude 10 N.m. as in the previous case.

5. Use the final value theorem find the steady state values of θ1 ( t ) and θ 2 ( t ) .

6. (Optional) Obtain a state space representation of the system.

ME 413: System Dynamics and Control 53/220 Laboratory Manual


7. (Optional) Find the eigenvalues of the state matrix [ A] and compare them
to the roots of the characteristic equation (Denominator of G1 ( s ) ). What do
you conclude.

ME 413: System Dynamics and Control 54/220 Laboratory Manual


PART II: EXPERIMENT

OBJECTIVE

1. To determine the modulus of rigidity G of an unknown material.


2. To determine the mass moment of inertia of a flywheel using the Falling
Weight Method (FWM).
3. To compare between the experimental and theoretical periods for an oscillating
flywheels.

DESCRIPTION

For experiments on torsional oscillations of shafts, the oscillating inertia is


provided by a heavy steel flywheel which is mounted on ball bearings. The moment
of inertia of this flywheel can be found experimentally by the falling weight method,
when the flywheel is mounted in position for the torsional tests.

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

ME 413: System Dynamics and Control 55/220 Laboratory Manual


I is the mass moment of inertia of the flywheel.

k = GJ / l is the shaft stiffness and l is the shaft length.

G is the modulus of rigidity of the shaft’s material.

J = π d 4 / 32 is the second moment of area of the shaft.

The natural frequency of the system can be written as

k GJ
ωn = =
I Il

Knowing that τ = 2π / ωn , the period of oscillation can be expressed as:

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

1) A steel portal frame.


2) A cylindrical rotor fitted with a chuck designed to accept shafts of different
diameters.
3) A steel shaft.
4) A chuck with a bracket for holding a shaft.
5) A small mass and a thread.

ME 413: System Dynamics and Control 56/220 Laboratory Manual


The rotor can be mounted on a short axle at the vertical member of the portal
frame and then used with the small mass and cord to perform the experimental
part related to falling weight method.

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.

Figure 3. Schematic diagram for the setup

ME 413: System Dynamics and Control 57/220 Laboratory Manual


Experiment 1: Determination of the Modulus of Rigidity of a Shaft

Procedure and Requirements

1) Take all dimensions needed for the experiment.

2) Fix a steel shaft to the rotor and measure the period τ for different shaft
lengths.

3) Record your readings in Table 2.

4) Plot a graph of τ 2 versus l .

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.

6) How do the value of G compare with the standard value of steel?

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.

ME 413: System Dynamics and Control 58/220 Laboratory Manual


TABLE 2.

Trial Length l Time t for n oscillations Period τ = t n τ2


# (m) (s) (s) (s2)
1
2
3
4
5
6
7
8

Experiment 2: Determination of Moment of Inertia of Flywheel Using


Falling Weight Method (FWM)

DESCRIPTION & THEORY

The flywheel is mounted horizontally on ball bearings as in the above experiment


(Figure 4). A string is looped round a peg on the rim of the flywheel, to which a
weight is attached. The height from which the weight is to be released is measured
carefully, the number of revolutions of the wheel while the weight is descending is
obtained by placing the weight on the ground and counting the number of turns of
the wheel required to wind it up to its starting point. The length of the string is
adjusted so that the loop comes off the peg as the weight reaches the ground.

Figure 4. Setup for Falling Weight Method experiment.

ME 413: System Dynamics and Control 59/220 Laboratory Manual


The weight is released from rest and the number of revolutions made by the wheel
after the weight reaches the ground is measured, and also the time taken for the
flywheel to come to rest, after the weight strikes the ground.

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

dθ dθ dθ  dθ


where I total = I + mR 2 . Knowing that θ = = × =θ ×
dt dθ dt dθ

the above equation becomes

( I + mR )θ dθ dθ = mgR − T


2
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

Replacing the following expressions

θ = ω
Rθ = h
Rθ = v
θ = 2π N
ω1 = 2π N1 t1

hence

(1 2 ) I ω12 + (1 2 ) mv12 = mgh − 2π N1T f (*)

ME 413: System Dynamics and Control 60/220 Laboratory Manual


Phase 2: Impact between the mass m and the floor, the angular velocity of the rotor
changes from ω1 to ω2 .

Phase 3: The rotor moves alone due to its own inertia, decelerating from ω2 to 0 ,
due to friction T f .

The equation of motion can be written as:

Iθ = −T f
dθ 
Substituting for θ = θ × and integrating the above equation over the entire range

of θ , i.e., between θ 2 and θ 3 , results in the following equation:

(1 2 ) Iθ2 = −T f (θ3 − θ 2 ) (**)


The difference (θ3 − θ 2 ) expresses the total angle traveled by the rotor during the
third phase. It can be expressed as (θ3 − θ 2 ) = 2π N 2 , where N 2 is the number of
revolutions of phase 3.

Eliminating T f from equations (*) and (**) results in the following equation

2mgh − mv12
I=
N
ω12 + 1 ω22
N2
where

v1 = 2h / t1 ; average descending velocity of the mass m.


ω1 = 2π N1 / t1 ; average angular velocity of the rotor during phase (1).
ω2 = 2π N 2 / t2 ; average angular velocity of the rotor during phase (3).
N1 and N 2 : Number of revolutions made by the flywheel in phase (1) and phase (3)
respectively.
m = attached mass.
h = release height from the ground.
I = mass moment of inertia of the flywheel.

Procedure and Requirements

1) Take all dimensions required for the experiment.

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 .

ME 413: System Dynamics and Control 61/220 Laboratory Manual


4) Record the number of revolutions N 2 and the corresponding time t2 taken by
the flywheel to come to rest after the weight strikes the ground.

5) Record your readings in Table 3.

6) How accurate were your time measurements?

7) How would the results be affected if the cord were wrapped around the axle
of the rotor instead around of its rim?

8) What changes in procedure would be necessary if a stepped shaft were used


instead of one of uniform section?

TABLE 3.

Trial Height h Time t1 Time t2


N1 ω1 N2 ω2
# (m) (s) (s)
1
2
3
4
5
6
7
8

ME 413: System Dynamics and Control 62/220 Laboratory Manual


King Fahd University of Petroleum & Minerals
College of E ngineering Sciences
Mechanical E ngineering Department

ME 413: System Dynamics & Control

ELECTRICAL SYSTEMS

Student Name :_________________________________________________________


Section# :__________________________________________________________________
Student ID#:____________________________________________________________
Date:_________________________________________________________________________
Instructor:________________________________________________________________

ME 413: System Dynamics and Control 63/218 Laboratory Manual


ELECTRICAL SYSTEMS

OBJECTIVE

7. To develop models for some simple circuits.


8. To obtain the transfer function description of a model.
9. To apply impedance-based techniques to obtain transfer functions for
electrical systems.
10. To apply MATLAB in analyzing transfer function models and obtaining
their response to various types of input functions.

REVIEW AND SUMMARY OF ELECTRICAL SYSTEM


ELEMENTS

Kirchhoff’s Current Law (KCL)

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

Kirchhoff’s Voltage Law (KVL)

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).

ME 413: System Dynamics and Control 64/218 Laboratory Manual


i(t) i(t)
+
v(t) Circuit i(t) v(t) Circuit
-

a)- Voltage source b)- Current source

Figure 1. Sources

Open and Short Circuit:

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

Circuit elements may be classified as active or passive. Passive elements such as


resistors, capacitors and inductors are not sources of energy, although the last two
elements can store it temporarily. The active elements are energy sources that drive
the system. The passive elements involved with electrical systems are summarized
in Table 1.

ME 413: System Dynamics and Control 65/218 Laboratory Manual


TABLE 1. Summary of elements involved in linear electrical systems

Element Voltage-current Voltage-charge Impedance,


Current-voltage
Z(s)=V(s)/I(s)

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

Figure 4. In series connection, the current is common.

Parallel Circuits

iR iC iL

+
R vR C vC L vL
-

Figure 5. In parallel connection, the voltage is common.

Complex impedance

ME 413: System Dynamics and Control 66/218 Laboratory Manual


In deriving transfer functions for electrical circuits, we frequently find it convenient
to write the Laplace-transformed equations directly, without writing the differential
equations. Table 1 gives the complex impedance of the basics passive elements
such as resistance R, an inductance L, and a capacitance C. Figure 6(a) shows the
complex impedance in a series circuit while Figure 6(b) shows the transfer function
between the output and input voltage. Remember that the impedance is valid only
if the initial conditions involved are all zeros.

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

Figure 6. Complex impedance in electrical circuits

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

ME 413: System Dynamics and Control 67/218 Laboratory Manual


1. Obtain the differential equation for the output voltage eο (t ) in Figure 7(a)
when the switch is closed. Notice that numerical values are given for the
resistors but not for the capacitor.

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

and let C=2F.


a. The switch has been open for all t<0, so there is no initial stored
energy in the capacitor. The switch then closes at t=0. Take Laplace
transform of both sides of the modeling equations obtained in (1) for

t>0, and find E0 ( s ) for all t>0. Notice that E0 ( s ) is the Laplace

transform of eο (t ) .

b. Obtain the response eο (t ) .

c. Plot the response 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

initial voltage across the capacitor is eA ( 0 ) − eo ( 0 ) = 9 V .

e. Obtain the response eο (t ) .

f. Plot the response eο (t ) .

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

ME 413: System Dynamics and Control 68/218 Laboratory Manual


source, and take the output variables to be the currents through L and R2
respectively.

2. Find the transfer-function matrix relating the output variables y1 and y2 to


the input variable u . Thus find the system response to the unit step input
u ( t ) = 1( t ) , assuming that the circuit is initially in a quiescent state.

vc = x1
ic
y2
R1 iL = x2
C
L R2
e(t )

y1

Figure 8. Circuit of Problem # 2.

ME 413: System Dynamics and Control 69/218 Laboratory Manual


King Fahd University of Petroleum & Minerals
College of E ngineering Sciences
Mechanical E ngineering Department

ME 413: System Dynamics & Control

SIMULATION: Electro-Mechanical Systems


EXPERIMENT: Centrifugal Governor

Student Name :_________________________________________________________


Section#:__________________________________________________________________
Student ID#:____________________________________________________________
Date:_________________________________________________________________________
Instructor:________________________________________________________________

ME 413: System Dynamics and Control 70/218 Laboratory Manual


PART I: SIMULATION
ELECTRO-MECHANICAL SYSTEMS

OBJECTIVE

11. To develop models for electromechanical systems.


12. To obtain the transfer function description of a model.
13. To obtain the block diagram of each components and the overall block
diagram using the block diagram algebra.
14. To apply MATLAB in analyzing the characteristic equation of the transfer
function and obtaining pole locations in s-domain.
15. To apply MATLAB in analyzing transfer function models and obtaining
their response to various types of input functions.

PROBLEM

A DC motor may be used to position the angular attitude of a platform. The


platform may be pointing a telescope at a star, an antenna at a satellite, or a gun at
a target. Since the motor in these cases provides the power to actuate the desired
response, the motor in this role may be called the actuator. There are two ways to
configure a DC motor namely the field controlled DC motor and the armature
controlled DC motor. In this problem, the armature controlled DC motor shown
schematically in Figure 1 is examined.

Ra ia
La
+
va (t )
θο = ωο
-
vc = K v θο J
B
τ = K τ ia

Figure 1. Schematic diagram of an armature-controlled DC-motor

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
ο ο

ME 413: System Dynamics and Control 71/218 Laboratory Manual


i a (t ) : armature current
τ (t ) : torque
Ra : armature resistance
La : armature inductance
B: viscous damping coefficient
J: motor of inertia of motor and load
Kτ : torque constant
Kv : back emf constant
vc : back emf of the motor

1. Derive the equations that describe the system (for both mechanical and
electrical part) in function of ω ο , i a and v a .

2. For zero initial conditions, take Laplace Transform of each of the


previous equations derived in (1).

3. Represent each of the transformed equations in block diagrams showing


the relationship between the input and output of each part of the system.

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

where Ω ο ( s ) and Va ( s ) are the Laplace transform of ω ο (t ) and v a (t )


respectively.

6. Write the previous expression in the standard form

Ω ο ( s ) num kο
G(s) = = = 2
Va ( s ) den s + 2ξω n s + ω n
2

In the above, kο is a constant, ω n is the natural frequency of the system,


and ξ is the damping ratio. The denominator of the transfer function is
known as the characteristic equation while the roots of the characteristic
equation are known as the poles.

7. Find kο , ω n and ξ in function of the system parameters, i.e.,


kο = f ( Kτ , La , J ) , ξ = f ( Kτ , La , J , B, Ra , K v ) , ω n = f ( Kτ , La , J , B, Ra , K v )

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

ME 413: System Dynamics and Control 72/218 Laboratory Manual


a) k ο = 1.0, ω n = 4; (ξ = 0) ⇒ no damping
b) k ο = 1.0, ω n = 4; (ξ = 0.1) ⇒ The system is under-damped
c) k ο = 1.0, ω n = 4; (ξ = 0.7 ) ⇒ The system is underdamped
d) k ο = 1.0, ω n = 4; (ξ = 1.0) ⇒ The system is critically damped
e) k ο = 1.0, ω n = 4; (ξ = 2.0) ⇒ The system is over-damped

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

pzmap(num,den) Plot pole-zero map of continuous-time linear system.


pzmap(num,den) computes the poles and zeros of the siso
polynomial transfer function G(s) = num(s)/den(s) where num
and den contain the polynomial coefficients in descending
powers of s. If the system has more than one output, then the
transmission zeros are computed. pzmap(p,z) plots the poles,
p, and the zeros, z, in the complex plane. p and z must be
column vectors. When invoked with left hand arguments,[p,z] =
pzmap(num,den) or [p,z] = pzmap(A,B,C,D) returns the poles
and transmission zeros of the system in the column vectors p
and z. No plot is drawn on the screen. The function sgrid or
zgrid can be used to plot lines of constant damping ratio and
natural frequency in the s or z plane.

ME 413: System Dynamics and Control 73/218 Laboratory Manual


MATLAB Program for Question # 8

Click at File, New, M-file


Then write the following program and do not forget to fill the blanks
%
k0=10;wn=4.;
num=[-----];
den=[---------- ---------- ----------];
zeta=[0.0 0.1 0.7 1.0 2.0];
t=0.0:0.001:3.0
for i=1:5;
num=ko;
den=[1 2*zeta(i)*wn wn^2];
printsys(num,den)
roots(den)
Omega=step(num,den,t);
subplot(5,2,2*i-1);pzmap(num,den);
gtext([‘\xi= ‘, num2str(zeta(i))])
subplot(5,2,2*i);plot(t,Omega)
title(‘Your Full Name and ID#)
end
%
When you finish typing the previous lines:
2 Select in this order: Edit, Select all, Copy
3 At the MATLAB prompt, type
Paste and then press Enter

ME 413: System Dynamics and Control 74/218 Laboratory Manual


PART II: EXPERIMENT
CENTRIFUGAL GOVERNORS

OBJECTIVE

1. To study the dynamic characteristics of a centrifugal governor and to


determine its controlling force at various positions.
2. To compare between the experimental and theoretical values.

INTRODUCTION

Governors are devices that control the rotational speed of engines at a


predetermined level. It senses the change in speed as a result of load variation at
the output engine shaft and automatically compensates by adjusting the fuel
supply to the engine. This self-adjusting system involves certain design criteria that
needs thorough evaluation. These include time response of the governor to the
fluctuation in speed and its stability of operation. These and some other functions
are performed on the Tecquipment TM27 Governor Unit, (Figure 1).

Governor balls

Arms

Sleeve

Shaft 10 mm
5 mm

Figure 1. Porter Governor

ME 413: System Dynamics and Control 75/218 Laboratory Manual


These are of centrifugal type and the one used in this experiment is known as
Porter Governor (see Figure 1) that is almost identical to the original Watt
Governor. The difference is only in the use of heavily weighted sleeves to provide
the controlling force.

DESCRIPTION AND THEORY

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

Figure 2. Diagram representation of one half of a Porter Governor.

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

ME 413: System Dynamics and Control 76/218 Laboratory Manual


M 
F =  (1 + K ) + m  g tan α (1)
2 
where m=1.0 kg and M=0.794 kg. In the above

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.

The centrifugal force is given by

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.

ME 413: System Dynamics and Control 77/218 Laboratory Manual


Axis of
rotation

19
r − 19
tan α =
h
r − 38
tan β =
α 298 − h − s
h r −19

298
Centerline 298 −h−s
lolkkk

s
β

38 r-38

Figure 3. Geometric details of the rotating Porter Governor. (Dimensions in mm)

APPARATUS

The tecquipment TM27 governor apparatus in the laboratory consists of basic


mainframe capable of locating different governor mechanisms. The crossbeam is
retained by two thumbnuts. The drive unit consists of a small electric motor
connected through a flexible coupling to a 30:1 worm reduction gearbox.

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.

ME 413: System Dynamics and Control 78/218 Laboratory Manual


EXPERIMENTAL PROCEDURE

1. Turn ON the speed control knob.


2. Increase the speed and observe the upward movement (s) of the
sleeve.
3. Adjust the speed of the motor to give a suitable sleeve movement.
A steady state value of the sleeve position is then obtained.
4. Use the stroboscope to determine the corresponding output shaft
speed. Record your readings (sleeve position (s) and the
corresponding speed (N)) in Table 1.
5. Increase the speed (N) and repeat steps (3) and (4) for at least
fifteen readings.

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

ME 413: System Dynamics and Control 79/218 Laboratory Manual


240
h scale reading (mm)
220 r scale reading (mm)

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.

ME 413: System Dynamics and Control 80/220 Laboratory Manual


TABLE 1. Reading and Summary of the results

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

ME 413: System Dynamics and Control 81/220 Laboratory Manual


REQUIREMENT

GIVEN: Mass of the rotating weight m=1.0 kg


Mass of the weight pan and M=0.794 kg

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.

ME 413: System Dynamics and Control 82/220 Laboratory Manual


ME 413: System Dynamics and Control 83/218 Laboratory Manual
PART I: BLOCK DIAGRAMS

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

Table 1. Block Diagram Transformations

Transformation Original Block Diagram Equivalent Block Diagram

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

ME 413: System Dynamics and Control 84/218 Laboratory Manual


MATLAB IMPLEMENTATION

Series Connection

R (s) G1 (s) G2 (s) C (s)

C ( s ) num num1 num2


T (s) = = G1 ( s ) = G2 (s) =
R( s ) den den1 den2

[num,den]=series(num1,den1,num2,den2)

Parallel Connection

G1 (s)

R (s) C (s)

G2 (s)

C ( s ) num num1 num2


T (s) = = G1 ( s ) = G2 (s) =
R( s ) den den1 den2

[num,den]=parallel(num1,den1,num2,den2)

Cloop Connection

R (s ) G1 ( s) C (s )

C ( s ) num num1 +1 Positive Feedback


T (s) = = G1 ( s ) =
R ( s ) den den1 -1 Negative Feedback (default)

[num,den]=cloop(num1,den1,sign)

Feedback Function

ME 413: System Dynamics and Control 85/218 Laboratory Manual


R GG
(s1) C

H (s )

C ( s ) num num1 num2 +1 Positive Feedback


T (s) = = G (s) = H (s) =
R( s) den den1 den2 -1 Negative Feedback (default)

[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 )

ME 413: System Dynamics and Control 86/218 Laboratory Manual


PROBLEM # 3:

The block diagram of a multiple-loop feedback control system is shown in Figure 1.


It is interesting to note that the feedback signal H 1 ( s ) C ( s ) is a positive feedback
signal and the loop G3 ( s ) G 4 ( s ) H 1 ( s ) is called a positive feedback loop.

H2

R (s ) C (s )
G1 G2 G3 G4

H 12

H 32

Figure 1. Multiple-loop feedback control system

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

[numm,denm] = minreal(num,den), where num and den are row vectors of


polynomial coefficients, cancels the
common roots in the polynomials.

ME 413: System Dynamics and Control 87/218 Laboratory Manual


PART II: DAMPED FREE VIBRATIONS

OBJECTIVE

1. To determine the viscous damping coefficient C as a function of the dashpot


position in a certain dynamic system.
2. To learn how to estimate the damping coefficient C of a dynamic system
experimentally.

A): DESCRIPTION AND THEORY

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.

ME 413: System Dynamics and Control 88/218 Laboratory Manual


Consider the dynamic system shown in Figure 1. If the beam was pulled down and
released, the equation of the angular motion becomes

θ + 2ζω nθ + ω n2θ = 0 (1)


where
kl2
ω n2 = (2)
IA
Ch 2
2ζω n = (3)
IA
and
m L3
IA = (4)
3

In the above, ω n ≡ natural frequency of the beam.


k ≡ spring stiffness.
I A ≡ mass moment of inertia of the system about (A).
ζ ≡ damping coefficient.
The solution of Equation.(1) can be written as

θ = θ 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

Figure 2. The free damped response of a dynamic system.

ME 413: System Dynamics and Control 89/218 Laboratory Manual


A convenient way of measuring the amount of damping present in the dynamic
system is to measure the decay of the oscillations. The larger the damping, the
greater will be the rate of decay, which is expressed as logarithmic decrement. The
logarithmic decrement is defined as the natural logarithm of the ratio of any two
successive amplitudes, i.e. δ = ln(θ 1 / θ 2) , as shown in Fig.2. The logarithmic
decrement can be found by any of the following equations:

δ = ln(θ 1 / θ 2) = ζω nt (7)

or

δ = (1/ n)ln(θ 1 / θ n + 1) = 2πζ / 1 − ζ 2 (8)

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.

B): EXPERIMENTAL PROCEDURES

APPARATUS

• A rectangular beam, which supported at one end (A) by a trunion,


pivoted in ball bearings and all located in a fixed housing.
• The outer end of the beam is supported by a helical spring of stiffness k.
• The free vibrations of the system are damped by means of a dashpot, fixed to
the base by sliding bracket. The dashpot consists of a transparent cylindrical
container filled with oil. Inside the container, there are two discs each with
several orifices. The two discs can be rotated relatively to each other to
change the damping characteristics of the dashpot
• The amplitude time recording is provided by the chart recorder, which is
clamped to the right hand upright. The unit consists of a slowly rotating
drum driven by a synchronous motor. The motor is operated from the

ME 413: System Dynamics and Control 90/218 Laboratory Manual


auxiliary supply on the speed control unit. A roll of recording paper is fitted
adjacent to the drum and is wound round the drum so that the paper is
driven at a constant speed. A felt-tipped pen is fitted to the free end of the
beam and the drum may be adjusted in the horizontal plane so that the pen
just touches the paper. The paper is guided vertically downwards by a small
attachable weight. By switching on the motor, a trace can be obtained
showing the oscillations of the end of the beam.

EXPERIMENTAL PROCEDURES AND REQUIREMENTS

1. Record all dimensions needed for your analysis.


2. Pull the beam downward with the dashpot unattached and release it, while
the drum is rotating. Record the total time required for the motion.
3. Clamp the dashpot at a certain distance h along the beam and pull down on
the free end of the beam and release it. Draw the decaying curve on the
recording drum, while it is rotating.
4. Vary the damping characteristics of the system by moving the dashpot to a
new position and obtain a new record of the decaying curve.
5. Repeat steps 3 & 4 to get the records for 8 different positions of the dashpot.
6. From the resulting plot in step # 2 above, obtain the undamped natural time
period (τ) and based on that calculate the natural (undamped) frequency of
the system ω n = ( 2π τ ) .
7. From the resulting plots in steps (3 through 5 above), obtain the damped
natural frequencies ω d = ( 2π τ d ) of the system in each case (for each h
length). The damped period τ d can be determined by using the decaying
curve drawn on the recording drum. Assuming that the length of n
(
oscillations is measured to be x and the drum speed is Vdrum = 0.573 in/s , )
then the damped period can be found as:

τ 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

1. Discuss how the damping constant C is affected by the position of the


2
dashpot. Explain that using a graph (C vs.1/ h ).
2. Discuss what are the factors affecting the damping characteristics of a
dashpot when h is constant.
3. Discuss briefly how the parameters ζ , ω n and C of equation (9) are affected
by the dashpot position h.

ME 413: System Dynamics and Control 91/218 Laboratory Manual


4. Both Equations (7) and (8) are used to evaluate the damping coefficient ζ of
any damped free dynamic system. Which one of them is more accurate?
Explain why.
5. What would be the reason for any differences in the C value obtained from
Equations (9) and (10)?

ME 413: System Dynamics and Control 92/218 Laboratory Manual


PART III: FORCED VIBRATIONS

OBJECTIVE

1. To determine the natural frequency of a dynamic system using different


methods.
2. To determine the magnification factor X d X s . ( )
3. Plotting the response curve of the dynamic system (Amplitude against
excitation frequency).

A): DESCRIPTION AND THEORY

When a system is subjected to an external harmonic excitation, its vibrational


response takes place at the same frequency as that of excitation. Forced vibrations
are produced in operating machines either due to unbalance of some rotating parts,
due to reciprocating motion such as in internal combustion engines or due to
impact and shock effects as in punch presses. The excitations that produce
vibrations are either unwanted, i.e., they occur as a by-product of the machines
operation or wanted, i.e., they are designed into the system as a part of their
operation such as vibrating screens.

The equation of motion for the dynamic system (Figure 1), when given a small
angular displacement (free vibrations) is:

I A θ + Cl 2θ + kl12θ = 0 (1)

l1
a Electric Motor
with mass M k

A θ

Beam of
mass mb
C
l

Figure 1. Setup of the experiment

ME 413: System Dynamics and Control 93/218 Laboratory Manual


where I A = M * a 2 + ( mb L2 3) is the mass moment of inertia of the beam about
point A. The natural frequency of the system described by Equation (1) can be
written as

kL12
ωn = (2)
IA
Determination of the undamped natural frequency ω n

1. Oscillations Method: (Using a chart recorder)

• The counting of oscillations can be done easily performed by using a chart


recorder.
• The pen is brought into contact with a recording paper, then the system is
displaced angularly.

• A stop-watch is started simultaneously with a chart recorder.

• 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


ω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.

ME 413: System Dynamics and Control 94/218 Laboratory Manual


3. Resonance Curve
Using the speed control unit, the rotational speed of the motor can be increased
until resonance occurs. The speed at resonance can be employed to determine the
natural frequency of the system, taking into account the reduction ratio between
the motor and the exciting disks.
If the system shown in figure (1) is subjected to a harmonic force using out of
balance excitation due to the eccentric holes in the disks fixed below the motor, the
equation of motion will have the form:

I A θ + k l12 θ = meω 2 a sin(ω t ) = F a sin(ω t ) (5)

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

where M is the effective mass of the vibrating system, r = (ω ω n ) is the frequency


ratio, X is known as the dynamic amplitude and ζ is the damping ratio , which
can be found using the logarithmic decrement method.
The ratio between the dynamic and static amplitude is defined as the Magnification
factor (MF). The static amplitude can be expressed as X s = ( F k ) , where
F = m eω 2
is the excitation force that can be adjusted to the value of (0.0005 ω2 )
in this experiment.. Substituting for ω n2 = ( k M ) and F = m eω2 into Equation
(6) and rearrange, one can write:

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

( F k ) can be considered as static deflection or static amplitude of the system.


Equation (7) can be written in the form:
Xd 1
(MF) = = (8)
Xs (1 − r 2 ) + ( 2ζ r )
2 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

moments about the hinge A, the spring’s force can be written as

ME 413: System Dynamics and Control 95/218 Laboratory Manual


Fs = m e ω 2 a / L1 (9)

The deflection of the spring is ∆ = ( Fs k ) = m e ω 2 a / k L1 , from which the static


deflection of the beam’s end would therefore be:

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.

B): EXPERIMENTAL PROCEDURES

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.

ME 413: System Dynamics and Control 96/218 Laboratory Manual


• An electrically energized stylus can be fitted to the free end of the test beam
and continuously traces the vibrations onto a synchronous motor driven
drum recorder, which is also supplied. Amplitude and frequency
measurements can be taken from this permanent (Teledeltos paper) trace.
This can be clamped, on its special bracket, to the side of the basic frame.
The electrical leads from the stylus and recorder can be plugged into sockets
on the basic frame.

• 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.

EXPERIMENTAL PROCEDURES AND REQUIREMENTS

1. Take all dimensions needed for the analysis of the experiment.


2. With the dashpot unattached, make a plot of the system’s amplitude and
find the natural frequency of the system ω n (as explained in the theory.
3. Now, connect the dashpot and make a plot of the system’s amplitude and
find the damping ratio ζ of the system. You can use the logarithmic

decrement method. Also, remember that ωd = ωn 1 − ζ 2 .


4. Excite the system by adjusting the motor to a certain speed ω . Make a plot
of the beam’s motion. Increase the excitation frequency of the system ω
gradually in steps and make a plot of the beam’s motion at each speed.
Make sure that the range of the frequencies will include the natural
frequency of the system. Obtain the dynamic amplitude X d from the plots in
each case.
5. Calculate the natural frequency of the system using different methods and
compare it with the experimental natural frequency of the system (The speed
at resonance). Which method results in a more accurate value?
( )
6. Plot the experimental resonance curve of the system MF vs. r . Compare
the experimental curve with the theoretical resonance curve. Note that the
right hand side of Equation (8) represents the theoretical magnification
factor.

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?

ME 413: System Dynamics and Control 97/218 Laboratory Manual


6. Assuming lager holes are used in the disks, what would be the effect on the
response curve?

C): DATA & RESULTS

Dimensions:

L = ..................., I1 = ...................
l = ...................., a = ...................
Mass moment of inertia of the beam about point (A):

I A = M * a 2 + ( mb L2 3) = .....................

Natural frequency of the dynamic system:


ωn = = ...................
T
Damped Natural frequency of the system:


ωd = = ................... or ω d = ω n 1 − ζ 2 = ...................
Td

Spring stiffness:

I 
k = ω n2  A2  = ................
 L1 
Damping ratio

ME 413: System Dynamics and Control 98/218 Laboratory Manual


Table 1 Readings and Measurements

No N ω = ( 2π N 60 ) X s = ( F k ) = 0.0005ω 2 k r = (ω ω n ) X d (Theoretical) X d (Experimental


. (rpm) (rad/s) (m) Equation(8) )
1

8
9

10

Note: The reduction ratio of the disk speed to the motor speed is (1/3)

ME 413: System Dynamics and Control 99/218 Laboratory Manual


King Fahd University of Petroleum & Minerals
College of E ngineering Sciences
Mechanical E ngineering Department

ME 413: System Dynamics & Control

Simulation: Transient Response


Specifications of a 2nd Order System
Experiment: Vibrations Absorbers

Student Name :_________________________________________________________


Section# :__________________________________________________________________
Student ID#:____________________________________________________________
Date:_________________________________________________________________________
Instructor:________________________________________________________________

ME 413: System Dynamics and Control 100/218 Laboratory Manual


PART I: TRANSIENT RESPONSE SPECIFICATIONS OF A
SECOND ORDER SYSTEM

OBJECTIVE

To obtain the performance criteria for the transient response specification of a


second order system for a typical input step response.

INTRODUCTION

Assessing the time-domain performance of closed-loop system model is important


because control systems are inherently time-domain systems. The performance of
dynamic systems in the time domain can be defined in terms of the time response
to standard test inputs. One very common input to control systems is the step
function. If the response to a step input is known, it is mathematically possible to
compute the response to any input. Another input of major importance is the
sinusoidal function. A sinusoidal steady-state output is obtained when an
asymptotically stable linear system is subjected to a sinusoidal input. Thus, if we
know the response of a linear time-invariant system to sinusoids of all frequencies,
we have a complete description of the system.

REVIEW AND SUMMARY

The standard form of the second-order transfer function is given by:

ωn
2

G(s) = 2
s + 2ζω n s + ω n
2

where ω n is the natural frequency. The natural frequency is the frequency of


oscillation if all of the damping is removed. Its value gives us an indication of the
speed of the response. The quantity ζ is the dimensionless damping ratio. The
damping ratio gives us an idea about the nature of the transient response. It gives
us a feel for the amount of overshoot and oscillation that the response undergoes.
The transient response of a practical control system often exhibits damped
oscillations before reaching steady state.

The under-damped response (ζ < 1) to typical inputs, subject to zero initial


conditions, is given by
1
Input: unit step Output: c(t ) = 1 − e −ζω t sin ( ω d t + θ )
n

β
ω n −ζω t
Input: impulse Output: c(t ) = e sin ( ω d t )
n

β
β 
where β = 1 − ζ 2
and θ = tan −1   .
ζ 
TIME DOMAIN PERFORMANCE SPECIFICATIONS

ME 413: System Dynamics and Control 101/218 Laboratory Manual


The performance criteria that are used to characterize the transient response to a
unit step input are shown graphically in Figure 1 and summarized in Table 1.
c(t )

Allowable tolerance
Mp
0.02
0.9
td
0.5

0.1
t
tr
tp
ts

Figure 1. Transient response specifications

TABLE 1. Useful Formulas and Step Response Specifications for the


Linear
Second-Order Model

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.

8. Maximum Percent Overshoot M p = 100e −πζ / 1−ζ 2

9. Peak time t p = π /ωn 1−ζ 2


1 + 0.7ζ
10. Delay time td ≈ 0 ≤ζ ≤1
ωn
4
11. Settling time ts =
ζω n

ME 413: System Dynamics and Control 102/218 Laboratory Manual


π −θ
12. Rise time tr = (See Figure 2)
ωd

jω d

ωn
ωn 1 − ζ 2
θ
σ
−σ o
ζω n

Figure 2. Definition of the angle θ

PROBLEM # 1:

The following block diagram represents a second-order system:

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.

ME 413: System Dynamics and Control 103/218 Laboratory Manual


R
L

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

ME 413: System Dynamics and Control 104/218 Laboratory Manual


PART II: EXPERIMENT
Undamped Dynamic Vibration Absorbers

OBJECTIVE

1. To demonstrate how a tuned vibration absorber is used to eliminate the


excessive vibrations of a single degree of freedom system
2. To verify the validity of the absorber equations

INTRODUCTION

If a single or a multi-degree of freedom system is excited into resonance (the


excitation frequency nearly coincides with the natural frequency of the system),
large amplitudes of vibration result with accompanying high dynamic stresses and
noise and fatigue problems. Excessive vibrations in engineering systems are
generally undesirable and therefore must be avoided for the sake of safety and
comfort. If neither the excitation frequency nor the natural frequency can
conveniently be altered, this resonance condition can often be successfully
controlled. It is possible to reduce the unwanted vibrations by extracting the energy
that causes these vibrations. The extraction of this energy can be established by
attaching to the main vibrating system a dynamic vibration absorber, which is
simply a spring-mass system. The dynamic vibration absorber is designed such that
the natural frequencies of the resulting system are away from the excitation
frequency.

Fο sin ωt

Machine m1

x1 (t )

k1 / 2 k1 / 2

Figure 1. Idealization of a machine

ME 413: System Dynamics and Control 105/218 Laboratory Manual


DESCRIPTION AND THEORY

When we attach an auxiliary mass m 2 to a machine of mass m1 through a spring of


stiffness k 2 , the resulting two degrees of freedom system will look as shown in Figure 2.
The equations of motion of the masses m1 and m 2 are

m1 x1 + k1 x1 + k 2 (x1 − x 2 ) = Fο sin ωt


(1)
m2 x2 + k 2 (x 2 − x1 ) = 0

By assuming a harmonic solution,

x j (t ) = X j sin ωt , j=1, 2 (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 )

Dynamic vibration absorber


Figure 2. Undamped dynamic vibration absorber

ME 413: System Dynamics and Control 106/218 Laboratory Manual


We are primarily interested in reducing the amplitude of the machine X 1 . In order to
make the amplitude of m1 zero, the numerator of Equation (3) should be set equal to
zero. This gives
k2
ω2 = (5)
m2
If the machine, before the addition of the dynamic vibration absorber, operates near its
resonance, ω 2 ≈ ω12 = k1 / m1 . Thus if the absorber is designed such that

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

as the natural frequency of the machine or main system, and

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):

ME 413: System Dynamics and Control 107/218 Laboratory Manual


k 2 X 2 = m2ω 2 X 2 = − Fο (11)

Thus the values of k 2 and m 2 depend on the allowable value of X 2 .

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 .

Without absorber With absorber


24

ω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

Figure 3: Effect of undamped vibration absorber on the response of machine

NOTES

1. The primary system possess now the characteristics of a two-degrees of freedom,


it has two natural frequencies Ω1 and Ω 2 . The new natural frequencies lie in
the neighborhood of the natural frequency ω1 of the primary system alone as
shown in Figure 3. It can be seen from Figure 3 that Ω1 ≤ ω1 ≤ Ω 2 . Thus the
machine must pass through Ω1 during start-up and stopping leading to large
amplitude vibrations during these transient periods.

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.

ME 413: System Dynamics and Control 108/218 Laboratory Manual


3. The preceding analysis is valid only for an undamped system. If damping is
present in the absorber it is not possible to eliminate steady state vibrations of
the original mass. The amplitude of vibration can only be reduced.

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

where f is natural frequency of the auxiliary system, m is the mass of each of


the two bodies, and EI is the flexural rigidity of the double cantilever beam. The
mass m is a given constant and l is to be found from the above formula.

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.

ME 413: System Dynamics and Control 109/218 Laboratory Manual


RESULTS AND DISCUSSION

1. Organize your measurements the vibration amplitudes versus the rotational


speed as shown in Table 1.

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).

5. Give a brief discussion of your findings.

6. Briefly state your concluding remarks.

ME 413: System Dynamics and Control 110/218 Laboratory Manual


Accelerometer
Electric
Simply supported rectangular
Motor
cross-section steel beam

Vibration Meter Speed Control

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.

Figure 4: - Setup of the experiment.

ME 413: System Dynamics and Control 111/218 Laboratory Manual


Table1 Readings

With no Absorber With Absorber


N
# Disp. Disp.
(rpm) Vel. Ampl. Acc. Ampl. Vel. Ampl. Acc. Ampl.
Ampl. Ampl.
(mm/s) (mm/s2) (mm/s) (mm/s2)
(mm) (mm)
1 850
2 900
3 950
4 1000
5 1050
6 1075
7 1100
8 1150
9 1200
10 1250
11 1300
12 1325
13 1350
14 1400
15 1450
16 1500
17 1600
18 1700
19 1800
20 1900
21 2000

ME 413: System Dynamics and Control 112/218 Laboratory Manual


King Fahd University of Petroleum & Minerals
College of E ngineering Sciences
Mechanical E ngineering Department

ME 413: System Dynamics & Control

AIR TEMPERATURE CONTROL


Simulation and Experiment

Student Name :_________________________________________________________


Section# :__________________________________________________________________
Student ID#:____________________________________________________________
Date:_________________________________________________________________________
Instructor:________________________________________________________________

ME 413: System Dynamics and Control 113/218 Laboratory Manual


AIR TEMPERATURE CONTROL

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.

The process to be controlled in this laboratory session is the temperature of a


flowing fluid (air). The PT326 Process Trainer will be employed in this investigation.
The PT326 is built by Feedback Instruments Limited, and discussed in the
Appendix attached to this experiment.

EQUIPMENT

The PT326 is a self-contained process control trainer. It incorporates a plant and


control equipment in a single unit. In this equipment, a centrifugal blower draws
air from the atmosphere and forces it through a heater grid. The air temperature is
detected downstream of the grid by a bead thermistor before being returned to the
atmosphere. The detecting (bead thermistor) and correcting (heater) elements have
been placed sufficiently far apart to facilitate the investigation of “lag” time. The air
stream velocity may be adjusted by means of an inlet throttle attached to the
blower. The desired temperature may be set in a range from 30D C to 60D C . A toggle
switch provides an internal step increase to the desired temperature signal. The
PT326 may be configured to run with either open or closed-loop control. The
process trainer also allows the connection of an external controller (the PID 150Y).

THEORY

A mathematical model of the temperature response for the system must be


developed. A diagram of the system to be modeled is presented in Figure 1.

ρ Cp Q T
(ρ V C ) T
p

Figure1. Model of the heater-flow system.

ME 413: System Dynamics and Control 114/218 Laboratory Manual


An energy balance yields
Heat stored = heat in - heat out (1)

Replacing terms of equation (1) by their thermodynamic equivalents yields

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)

Taking Laplace Transform of both sides of equation (3) gives:

 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

which can be represented by the following block diagram?

G (s )
R(s) E (s) C (s)
[K ] τ Gs +1
p
p

 

Figure 2. Simplified closed loop model

ME 413: System Dynamics and Control 115/218 Laboratory Manual


where:
τ = the time constant of the plant
C (s ) = Laplace transform of the response temperature
E (s ) = the deviation of the output temperature from the desired
temperature
G p = the steady sate gain of the heater system
K p = proportional gain
R (s ) = Laplace transform of the desired output temperature

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)

Equations (5) and (6) can be combined to yield the error, E ( s )

R( s)
E ( s) = (8)
1 + G ( s)

The final value theorem is now used to determine the steady-state accuracy.

ess = lim sE ( s ) (9)


s →0

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

ME 413: System Dynamics and Control 116/218 Laboratory Manual


 K pG p 
 
1 + K p G p 

T ( s) = ………(13)
 τ 
 s + 1
1 + K p G p 

The denominator of equation (13) is first order. Hence, oscillations are not
anticipated for proportional control.

PROCEDURE

Note: Kp=100% Proportional


Therefore, a 100% proportional setting provides a gain of one to the deviation
signal.

A. Open Loop Response without a Proportional Controller

a) Make the following connections on the PT326:

● Turn Proportional control off


● Turn Continuous control on
● No jumper between X and Y (open loop)
● Put a jumper between socket A and B (to complete the circuit).

b) Set the blower intake to 40.

c) Set temperature value to 30D C

d) Connect the output socket ‘Y’ to oscilloscope. Use a pigtail or banana


plug to do this and connect the other terminal to the ground. Also
connect the socket “trigger CRO” to the oscilloscope and the terminal
to the ground. This will measure the input impulse.

e) Give input impulse using the ‘internal’ switch and observe the
response on the oscilloscope.

f) Measure the time constant, steady-state value (gain) and steady-state


Time using the oscilloscope.

g) Measure the steady-state error. (This is read directly from the


difference in the values of ‘set value’ and ‘measured value’ of the
temperature when the internal switch is put ON.)

B. Open Loop Response with Proportional Controller

a) Make the following connections on the PT326:

● Turn Proportional control ON


● Keep Continuous control ON
● No jumper between X and Y (open loop)
● Remove the jumper that was put between A and B.
b) Repeat (b) through (g) as in (A) for Proportional Controller value of

ME 413: System Dynamics and Control 117/218 Laboratory Manual


200%, 150%, 100%, 50% and 30%.

C. Closed-Loop Feedback Response with Proportional Controller

a) Make the following connections on the PT326:

● Turn Proportional control ON


● Keep Continuous control ON
● Jumper between X and Y (closed loop)

b) Set the blower intake to 40.

c) Set temperature value to 30D C .

d) Connect the output socket ‘Y’ to oscilloscope. Use a pigtail or banana


plug to do this and connect the other terminal to the ground.

e) Give input impulse using the ‘internal’ switch and observe the
response on the oscilloscope.

f) Measure the time constant, steady-state value (gain), steady-state


time and steady-state error. Repeat with proportional gain of 200%,
150%, 100%, 50% and 30%.

ME 413: System Dynamics and Control 118/218 Laboratory Manual


PART II: SIMULATION

Simulation: Proportional Control

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.

1. Write a Matlab script this simulation for the following cases:

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).

3. Discuss how the Steady-State Error depends on the value of Kp


(Proportional Gain).

4. How does the measured temperature compare to the desired temperature


at steady-state? Was this expected? For the open loop and closed loop?

5. What is the effect of increasing the proportional gain on system


response? For the open loop and closed loop?

6. Assuming no oscillations and proportional control only (closed-loop),


what must the gain be in order to reduce the steady-state error to zero
(theoretically)?

7. From the Matlab plots obtained make an analysis on how steady-state


error depends on the value of Kp (proportional gain).

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?

9. Write your observation on how the percentage overshoot and steady-state


error (from the oscilloscope) depend on varying the proportional gain.
Does the pattern of variation match with the theory? (Hint: What is the
theory to describe overshoot in a 1st order system?)

ME 413: System Dynamics and Control 119/218 Laboratory Manual


APPENDIX: DEFINITIONS

Figure .3 represents the basic components of a closed-loop process control system.

Figure .3 Basic elements of a closed-loop process control system.

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.

Detecting Element: The detecting element is a bead thermistor connected to one


leg of a bridge.

Measuring Element: The resistances of the thermistor changes as the temperature


of its surroundings change. This change in resistance causes the bridge output
voltage to change. Thus, the bridge output voltage may be used to measure
temperature.

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

ME 413: System Dynamics and Control 120/218 Laboratory Manual


Set Value Disturbance: A step change in the desired value may be introduced
when the INTERNAL SET VALUE DISTURBANCE is applied.

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.

Controlling Element: A signal proportional to deviation is applied to the


controlling element. A correcting signal is generated and sent to the correcting
element. The PT326 is capable of continuous or two-step control.

Continuous Control Mode

1) Internal This provides proportional control only. Proportional


control may be varied on the PT326 from 5 to 200 percent. Where the
percent proportional control reflects the gain applied to the deviation
signal.

Gain=100/% Proportional

Therefore, a 100% proportional setting provides a gain of one to the


deviation signal.

2) External The internal proportional band adjustment can be


switched off to allow external control.

Motor Element: The motor element produces an output which is adjusted in


response to the signal from the controlling element. In the PT326, the motor
element supplies power(between 15 and 80 watts) to the correcting element.

Correcting Element: The correcting element directly affects the controlled


condition. The correcting element in the PT326 is a wire grid, which heats the
flowing air.

ME 413: System Dynamics and Control 121/218 Laboratory Manual


King Fahd University of Petroleum & Minerals
College of E ngineering Sciences
Mechanical E ngineering Department

ME 413: System Dynamics & Control

Simulation: Liquid Level Systems


Experiment: Coupled Tanks
i) Basic Tests and Transducer Calibration
ii) Open and Closed Loop Systems

Student Name :_________________________________________________________


Section# :__________________________________________________________________
Student ID#:____________________________________________________________
Date:_________________________________________________________________________
Instructor:________________________________________________________________

ME 413: System Dynamics and Control 122/218 Laboratory Manual


LIQUID-LEVEL SYSTEMS
PART I: SIMULATION

OBJECTIVE

1. To develop models for liquid-level systems containing one or more


storage compartments.
2. To obtain the transfer function description of the model.
3. To obtain the block diagram of each components and the overall
block diagram using the block diagram algebra.
4. To apply MATLAB in analyzing transfer function models and
obtaining their response to various types of input functions.

REVIEW AND SUMMARY LIQUID-LEVEL SYSTEM ELEMENTS

Resistance and Capacitance of Liquid Level Systems

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,

Change in level difference m


Resistance R = ≡
Change in flow rate m3 / s

Control valve
Q + qi

Load valve
H +h
Capacitance C
Q + qο
Resistance R

Figure 1. Liquid level system

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

ME 413: System Dynamics and Control 123/218 Laboratory Manual


Q = steady-state liquid flow rate, m 3 / s
K l = constant, m 2 / s
H = steady-state head, m

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

Q = steady-state liquid flow rate, m 3 / s


K t = constant, m 2.5 / s
H = steady-state head, m

The resistance Rt for turbulent flow is obtained from


dH
Rt =
dQ
Then
Kt dQ Kt dH 2 H 2H
dQ = dH ⇒ = ⇒ = =
2 H dH 2 H dQ (Q / H ) Q

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).

Change in liquid stored m3


Capacitance C = ≡ or m 2
Change in head m

MATLAB IMPLEMENTATION

impulse Impulse response of continuous-time linear systems.vectors.


impulse(num,den) plots the impulse response of the polynomial
transfer function G(s) = num(s)/den(s) where num and den
contain the polynomial coefficients in descending powers of s.
When invoked with left hand arguments, [y,x,t] =
impulse(num,den,t) returns the output and state time history in
the matrices y and x. No plot is drawn on the screen. Y has as

ME 413: System Dynamics and Control 124/218 Laboratory Manual


many columns as there are outputs and length(t) rows. x has as
many columns as there are states.

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ο

Figure 1: Two tanks liquid level system representation.

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

File, New, M-file


Then write the following program and do not forget to fill the blanks
%
num=[-----]; den=[----- ----- -----];
%
subplot(211);step(num,den)
subplot(212);impulse(num,den)

When you finish typing the program select in this order: Edit, Select all, Copy
At the MATLAB prompt, type Paste and then press Enter

ME 413: System Dynamics and Control 125/218 Laboratory Manual


PART II: Experiment
1) Basic Tests and Transducer Calibration
2) Open and Closed Loop Systems

ME 413: System Dynamics and Control 126/218 Laboratory Manual


ME 413: System Dynamics and Control 127/218 Laboratory Manual
ME 413: System Dynamics and Control 128/218 Laboratory Manual
ME 413: System Dynamics and Control 129/218 Laboratory Manual
ME 413: System Dynamics and Control 130/218 Laboratory Manual
ME 413: System Dynamics and Control 131/218 Laboratory Manual
ME 413: System Dynamics and Control 132/218 Laboratory Manual
ME 413: System Dynamics and Control 133/218 Laboratory Manual
ME 413: System Dynamics and Control 134/218 Laboratory Manual
ME 413: System Dynamics and Control 135/218 Laboratory Manual
ME 413: System Dynamics and Control 136/218 Laboratory Manual
ME 413: System Dynamics and Control 137/218 Laboratory Manual
ME 413: System Dynamics and Control 138/218 Laboratory Manual
ME 413: System Dynamics and Control 139/218 Laboratory Manual
ME 413: System Dynamics and Control 140/218 Laboratory Manual
ME 413: System Dynamics and Control 141/218 Laboratory Manual
ME 413: System Dynamics and Control 142/218 Laboratory Manual
ME 413: System Dynamics and Control 143/218 Laboratory Manual
ME 413: System Dynamics and Control 144/218 Laboratory Manual
ME 413: System Dynamics and Control 145/218 Laboratory Manual
ME 413: System Dynamics and Control 146/218 Laboratory Manual
ME 413: System Dynamics and Control 147/218 Laboratory Manual
King Fahd University of Petroleum & Minerals
College of E ngineering Sciences
Mechanical E ngineering Department

ME 413: System Dynamics & Control

Simulation: PID Controllers


Experiment: Coupled Tanks
i) PI Controller Tuning 1 :Hand Tuning of Single Tank
ii) PI Controller Tuning 2 :Hand Tuning of Double Tank

Student Name :_________________________________________________________


Section# :__________________________________________________________________
Student ID#:____________________________________________________________
Date:_________________________________________________________________________
Instructor:________________________________________________________________

ME 413: System Dynamics and Control 148/218 Laboratory Manual


PID CONTROLLERS

PART I: SIMULATION

OBJECTIVE

To recognize the different types of controllers and to illustrate the differences


between them in terms of percent overshoot, settling time, steady state errors…etc.

INTRODUCTION

Using a control signal that is proportional to the error cannot be expected to


result in good damping and fast response and may have unacceptable
steady-state error. Introducing an integral term in the controller can
eliminate steady state errors but may adversely affect the damping. A term
proportional to the derivative of the error can improve the speed of the
response and the damping, but it will not reduce steady state errors. A
controller that combines all three terms, known as a proportional-Integral-
Derivative (PID) controller can provide significant improvements in response
time, damping, and steady-state error reduction.

REQUIREMENTS

The dynamic equations of a DC motor considered in electromechanical systems can


be expressed as

J m θm + b θm = K t i a (1)

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.

2. Write the transfer function in the form

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.

ME 413: System Dynamics and Control 149/218 Laboratory Manual


The transfer function in equation (3) is labeled “Motor” in Figure 1 and shows an
open-loop control.

Motor
Reference Va ( s )
speed, R(s) Controller A Y(s)
(1 + τ 1s )(1 + τ 2 s )

Figure 1. Open-loop control system.

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

Figure 2. Feedback speed control system.

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.

3. If the controller is a proportional controller whose transfer function is given


by
V (s )
G c (s ) = a = Kp (5)
E a (s )

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).

ME 413: System Dynamics and Control 150/218 Laboratory Manual


4. If the controller is a proportional-plus-integral (PI) controller whose transfer
function is given by

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).

5. If the controller is a proportional-plus-integral-plus-derivative (PID)


controller whose transfer function is given by

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

In the MATLAB prompt click at : File ⇒ New ⇒ M-file


You will get a new window into which you will write the following program and do
not forger to fill the blanks:

%------------------------------------------------

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);

ME 413: System Dynamics and Control 151/218 Laboratory Manual


[num,den]=cloop(nums,dens);
[y,x]=step(num*100,den,t);
ys(:,i)=y;
end
%
hold on
%
subplot(311);plot(t,ys(:,1),t,ys(:,2),t,ys(:,3));
%
%-------------------------------------------------------+
% Case 2: Proportional-plus-Integral Controller +
%-------------------------------------------------------+
%
kp=5;
Ti=[0.005 0.01 0.02];
%
for i=1:length(Ti)
numc=[.......... ..........];
denc=[.......... ..........];
[nums,dens]=series(numc,denc,numg,deng);
[num,den]=cloop(nums,dens);
[y,x]=step(num*100,den,t);
ys(:,i)=y;
end
%
subplot(312);plot(t,ys(:,1),t,ys(:,2),t,ys(:,3));
%
%--------------------------------------------------------------------------+
% Case 3: Proportional-plus-Integral-plus-Derivative Controller +
%--------------------------------------------------------------------------+
%
kp=5;
Ti=0.01;
Td=[0.0002 0.0004 0.004];
%
for i=1:length(Td)
numc=[.......... .......... ..........];
denc=[.......... .......... ..........];
[nums,dens]=series(numc,denc,numg,deng);
[num,den]=cloop(nums,dens);
[y,x]=step(num*100,den,t);
ys(:,i)=y;
end
%
subplot(313);plot(t,ys(:,1),t,ys(:,2),t,ys(:,3));
hold off

When you finish typing the program Select in this order: Edit ⇒ Select all ⇒ Copy

At the MATLAB prompt, type Paste and then press Enter

ME 413: System Dynamics and Control 152/218 Laboratory Manual


PART II: Experiment
3) PI Controller Tuning 1: Hand Tuning of Single
Tank
4) PI Controller Tuning 2: Hand Tuning of Double
Tank

ME 413: System Dynamics and Control 153/218 Laboratory Manual


ME 413: System Dynamics and Control 154/218 Laboratory Manual
ME 413: System Dynamics and Control 155/218 Laboratory Manual
ME 413: System Dynamics and Control 156/218 Laboratory Manual
ME 413: System Dynamics and Control 157/218 Laboratory Manual
ME 413: System Dynamics and Control 158/218 Laboratory Manual
ME 413: System Dynamics and Control 159/218 Laboratory Manual
ME 413: System Dynamics and Control 160/218 Laboratory Manual
ME 413: System Dynamics and Control 161/218 Laboratory Manual
ME 413: System Dynamics and Control 162/218 Laboratory Manual
ME 413: System Dynamics and Control 163/218 Laboratory Manual
King Fahd University of Petroleum & Minerals
College of E ngineering Sciences
Mechanical E ngineering Department

ME 413: System Dynamics & Control

Simulation: Steady State Error and System Type


Experiment: Servo Trainer
i) Response Calculating and Measurements
ii) Proportional Control of Servo Trainer Speed

Student Name :_________________________________________________________


Section# :__________________________________________________________________
Student ID#:____________________________________________________________
Date:_________________________________________________________________________
Instructor:________________________________________________________________

ME 413: System Dynamics and Control 164/220 Laboratory Manual


PART I: Steady State Error and System
Type

OBJECTIVE

1. To introduce the concept of steady-state error and to show its importance in


the stability of a control system.

2. To calculate the steady state error for a certain class of inputs, namely, step
(positional), ramp (velocity) and parabolic (acceleration) inputs.

INTRODUCTION

Steady state errors constitute an extremely important aspect of system


performance, for it would be meaningless to design for dynamic accuracy if the
steady output differed substantially from the desired value for one reason or
another. The steady-state error is a measure of system accuracy. These errors arise
from the nature of inputs, type of system and from non-linearities of system
components such as static friction, backlash, etc. The steady-state performance of
a stable control system is judged not only by the transient response, but also by
steady-state error. The steady –state error is the error as the transient response
decays leaving only the continuous response. The steady-state error for a control
system is classified according to its response characteristics to a polynomial input.
A system may have no steady-state error to a ramp input. This depends on the type
of the open-loop transfer function.

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)

Figure 1. Unity feedback system.

The closed-loop transfer function is

C (s) G(s)
=
R(s) 1 + G (s)

The error of the closed loop system is


R(s)
E (s) = R(s) − C (s) =
1 + G (s)
Using the final value theorem, we have
ME 413: System Dynamics and Control 165/220 Laboratory Manual
sR ( s )
e ss = lim e(t ) = lim sE ( s ) = lim
t →∞ s →0 s →0 1 + G(s)

For the polynomials inputs, such as step, velocity and acceleration, the steady-
state error is summarized in Table 1.

TABLE 1 Steady-state error in closed loop systems

Positional input Velocity input Acceleration input

c(t) c(t) c(t)

r (t ) = A
Type-0 system

ess = ∞
A ess = ∞
ess =
1+ K p
t t t

c(t) c(t) c(t)


r (t ) = A t
Type-1 system

A ess = ∞
ess =
Kv
ess = 0

t t t

c(t) c(t) c(t)


Type-2 system

1 2
r (t ) = At
2
ess = 0
ess = 0
A
ess =
Ka
t t t

K p = lim G ( s ) K v = lim sG ( s ) K a = lim s 2 G ( s )


s→0 s→0 s→0

ME 413: System Dynamics and Control 166/220 Laboratory Manual


PROBLEM 1

Given the unity feedback control system of Figure 1, where


K
G(s) =
s (s + a )
find the following:
a. K and a to yield K v = 1000 and 20% overshoot
b. K and a to yield a 1% error in the steady state and a 10% overshoot

PROBLEM 2

Given the system in the Figure below, find the following:

1 1
R(s) C(s)
s 2 (s + 1) ( s + 3)
+ _ +_ 2
s

1/ s

a. The closed loop transfer function


b. The system type
c. The steady state error for an input of 5 u(t)
d. The steady state error for an input of 5 t u(t)
e. Discuss the validity of your answers to parts (c) and (d).

PROBLEM 3

For the system shown in the figure below

K(s +1)
R(s) C(s)
s2 (s + 2)
+_

s+4
(s + 3)

1. What is the system type?


2. What is the appropriate static error constant?
3. What is the value of the appropriate static error constant?
4. What is the steady-state error for a unit step input?
5. Discuss the validity of your answers.

ME 413: System Dynamics and Control 167/220 Laboratory Manual


PART II: Experiment
1) Response Calculating and Measurements
2) Proportional Control of Servo Trainer Speed

ME 413: System Dynamics and Control 168/220 Laboratory Manual


ME 413: System Dynamics and Control 169/220 Laboratory Manual
ME 413: System Dynamics and Control 170/220 Laboratory Manual
ME 413: System Dynamics and Control 171/220 Laboratory Manual
ME 413: System Dynamics and Control 172/220 Laboratory Manual
ME 413: System Dynamics and Control 173/220 Laboratory Manual
ME 413: System Dynamics and Control 174/220 Laboratory Manual
ME 413: System Dynamics and Control 175/220 Laboratory Manual
ME 413: System Dynamics and Control 176/220 Laboratory Manual
ME 413: System Dynamics and Control 177/220 Laboratory Manual
ME 413: System Dynamics and Control 178/220 Laboratory Manual
ME 413: System Dynamics and Control 179/220 Laboratory Manual
ME 413: System Dynamics and Control 180/220 Laboratory Manual
King Fahd University of Petroleum & Minerals
College of E ngineering Sciences
Mechanical E ngineering Department

ME 413: System Dynamics & Control

ROOT LOCUS

Student Name :_________________________________________________________


Section# :__________________________________________________________________
Student ID#:____________________________________________________________
Date:_________________________________________________________________________
Instructor:________________________________________________________________

ME 413: System Dynamics and Control 181/220 Laboratory Manual


PART I: 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.

3. Use MATLAB to plot and analyze root locus plots.

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.

ROOT LOCUS METHOD

Consider the feedback control system given in Figure 1.

R(s) C(s)
+_ K G(s)

H(s)

Figure 1. Control system for root locus.

The closed-loop transfer function for this system is

C (s) KG ( s )
T ( s) = = (1)
R ( s ) 1 + KG ( s ) H ( s )

In general, the open loop transfer function is given by

K (s + z1 )(s + z 2 )...(s + z m )
KG ( s ) H ( s ) = (2)
(s + p1 )(s + p 2 )...(s + p n )

ME 413: System Dynamics and Control 182/220 Laboratory Manual


Where m is the number of finite zeros and n is the number of finite poles of the loop
transfer function. If n>m, there are (n-m) zeros at infinity.

The characteristic equation of the closed-loop transfer function is

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:

Product of vector lengths from finite poles


K= (6)
Product of vector lengths from finite zeros
Angle Criterion:

From equation (5),

φ = angle[KG ( s) H ( s)] = (2A + 1)π , A =0, 1, 2, 3, (7)

which can be expressed in the form

φ = (2A + 1)π = (φ z1 + φ z 2 + φ z 3 + ...) − (φ p1 + φ p 2 + φ p 3 + ...) (8)

or

φ = (2A + 1)π = ∑ (angles of zeros ) − ∑ (angles of poles ) (9)

ROOT LOCUS RULES SUMMARY

1. The root locus starts at the open-loop poles ( K = 0) .

2. The root locus ends at the open-loop zeros ( K = ∞) .


3. The root locus is composed of n branches.
4. The root locus is symmetrical with respect to the real axis.
5. The root locus can exist on the real axis only to the left of an odd number of
real poles and/or zeros; furthermore, it must exist there.
6. Angles of asymptotes:

ME 413: System Dynamics and Control 183/220 Laboratory Manual


θA =
(2A + 1)π , A = 0,1,2,...,
n p − nz

7. Intersection of the asymptotes:


np nz

∑ 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

The Control System Toolbox functions for root locus are:

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.

[K, poles]=rlocfind(num,den): 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 root locus. Moving it to
any point on the locus and clicking the mouse (or hitting
a key on some computers) causes MATLAB to display the
value of K that places a closed-loop pole at that point
and the location of all closed-loop poles corresponding to
that value of K. Clicking at a different location will
display that value of K and the location of the
corresponding closed-loop poles. Note you may not be
able to click exactly where you want. The computer
maps the cursor position onto a rather coarse grid on its
screen.

sgrid generates a grid over an existing continuous s-plane root


locus or pole-zero map. Lines of constant damping ratio
ξ and natural frequency ω n are drawn in.

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

ME 413: System Dynamics and Control 184/220 Laboratory Manual


2. Use MATLAB to sketch the root-locus. Compare the two sketches.

SOLUTION

1. Poles are s = −1, s = −3, and s = −4 . Therefore, the number of poles n p = 3 ,


while the number of zeros n z = 0 .
2. The root loci on the real axis are to the left of an odd number of finite poles
and zeros.
3. Because np = 3 , there are 3 branches each one starts at ( K = 0) and ends at
( K = ∞) .
4. The asymptotes intersect on the real axis at
np nz

∑ 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

Therefore K = 140. Substitute in the auxiliary equation and solve

8s 2 + (12 + 140 ) = 0
⇒ s = ± j 4.36
⇒ ω = 4.36 rad/sec

8. The root locus sketch is shown in Figure 2

4. MATLAB PROGRAM

The following lines

ME 413: System Dynamics and Control 185/220 Laboratory Manual


» num=1;
» den=conv([1 1],conv([1 3],[1 4]));
» rlocus(num,den)

produce the graph shown in Figure 3.

ω = 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

Figure 2. Root –locus sketch

ME 413: System Dynamics and Control 186/220 Laboratory Manual


4

1
Imag Axis

-1

-2

-3

-4
-6 -5 -4 -3 -2 -1 0 1 2
Real Axis

Figure 3. Root-locus sketch generated by MATLAB

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 )

2. Use MATLAB to sketch the root-locus. Compare the two sketches.

ME 413: System Dynamics and Control 187/220 Laboratory Manual


PART II: The Ball Beam Apparatus
Basic Tests and Familiarization

ME 413: System Dynamics and Control 188/220 Laboratory Manual


ME 413: System Dynamics and Control 189/220 Laboratory Manual
ME 413: System Dynamics and Control 190/220 Laboratory Manual
ME 413: System Dynamics and Control 191/220 Laboratory Manual
ME 413: System Dynamics and Control 192/220 Laboratory Manual
ME 413: System Dynamics and Control 193/220 Laboratory Manual
ME 413: System Dynamics and Control 194/220 Laboratory Manual
ME 413: System Dynamics and Control 195/220 Laboratory Manual
ME 413: System Dynamics and Control 196/220 Laboratory Manual
King Fahd University of Petroleum & Minerals
College of E ngineering Sciences
Mechanical E ngineering Department

ME 413: System Dynamics & Control

Simulation: Frequency Response


Analysis: Bode Plot
Experiment: The Ball & beam

Student Name :_________________________________________________________


Section# :__________________________________________________________________
Student ID#:____________________________________________________________
Date:_________________________________________________________________________
Instructor:________________________________________________________________

ME 413: System Dynamics and Control 197/220 Laboratory Manual


PART I: Frequency Response Analysis
Bode Plot

OBJECTIVE

2. To introduce graphical methods such as Bode plot in the prediction of the


frequency response analysis.
2. To calculate performance specifications in the frequency domain.

FREQUENCY RESPONSE

The frequency response of a linear time-invariant system is defined as the steady


state response of the system to a sinusoidal input signal. The sinusoidal is a
unique input signal, and the resulting output signal for a linear system, as well as
signals throughout the system is sinusoidal in the steady state; it differs from the
input waveform only in amplitude and phase angle. For example, consider the
system C ( s ) = G ( s ) R ( s ) with r (t ) = A sin(ωt ). We have


R(s) = (1)
s2 + ω 2
and
m( s ) m( s )
G(s) = = n
(2)
q( s)
∏ (s + p )
i =1
i

Then, in partial fraction form,

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 →∞

in the limit, for c(t ), we obtain for t → ∞ ( the steady state)


 αs + β 
c(t ) = L−1  2 2 
s + ω 
1
= AωG ( jw) sin[ωt + Φ (ω )] (5)
ω
= A G ( jw) sin[ωt + Φ (ω )]

ME 413: System Dynamics and Control 198/220 Laboratory Manual


where the transfer function G ( jω ) is obtained by substituting jω for s in the
expression of G (s ). The resulting transfer function may be written in polar form as

G ( jω ) = G ( jω ) ∠Φ (ω ) (6)

Alternatively, the transfer function can be represented in rectangular complex form


as

G ( jω ) = Re G ( jω ) + j Im G ( jω ) = R ( jω ) + jX ( jω ) (7)

The most common graphical representation of a frequency response function is the


Bode plot.

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)

ME 413: System Dynamics and Control 199/220 Laboratory Manual


The logarithmic representation is useful in that it shows both the low- and high-
frequency characteristics of the transfer function in one diagram. Furthermore, the
frequency response of a system may be approximated by a series of straight-line
segments. In simple terms, the Bode plot has the following features:

1. Since the magnitude of G ( jω ) in the Bode plot is expressed in dB, product


and division factors in G ( jω ) became additions and subtractions,
respectively. The phase relations are also added and subtracted from each
other algebraically.
2. The magnitude plot of the Bode plot of G ( jω ) can be approximated by
straight-line segments, which allow the simple sketching of the plot without
detailed computation.

GAIN- AND PHASE-CROSSOVER POINTS

The gain-crossover point (or points) is where the magnitude curve G ( jω ) dB


crosses the 0-dB axis. The phase-crossover point (or points) is where the
phase curve crosses the 180ο axis (see Figure 1).

GAIN AND PHASE MARGINS

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

margin, Φ M , is the difference between the phase value and 180ο .

Magnitude Gain
(dB) plot Gain
crossover

0 dB ω
GM

Phase (degrees) Phase


plot

Phase
ΦM crossover

180ο ω
ωΦ M
ωG M

Figure 1. Gain and phase margins on the Bode diagrams

ME 413: System Dynamics and Control 200/220 Laboratory Manual


STEPS TO CONSTRUCT THE BODE MAGNITUDE PLOT

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.

2. Identify the break frequency associated with each factor.

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).

The phase plot is constructed by graphically adding the component phase


responses. The individual plots are drawn, either as the piecewise linear
approximation for the first-order poles or in a smooth form from the exact plot, and
then added to find the total phase shift at any frequency.

SUMMARY

The asymptotic forms of the seven components of the magnitude plot are summarized
in Table 1.

MATLAB IMPLEMENTATION

The Control System Toolbox functions for Bode plots are:

[mag,phase]=bode(num,den,w) Determines the magnitude and phase of the


transfer function defined by the vectors num and
den, which contain the coefficients of the
numerator and denominator polynomials of the
transfer function.

bode(num,den,w) or bode(num,den) generates a semi-logarithmic plot of


magnitude G ( jω ) in decibels versus ω and a
separate semi-logarithmic plot of the phase angle
arg [G ( jω )] in degrees versus ω .

[Gm,Pm,Wcg,Wpc]=margin(num,den) returns the gain, phase margins, gain


crossover and phase crossover for a system
in s-domain transfer function form
(num,den).

[Gm,Pm,Wcg,Wpc]=margin(mag,phase,w) returns the gain and phase margins


given the Bode magnitude, phase, and
frequency vectors mag, phase, and w from
a system. When invoked without left hand
arguments, margin(mag,phase,w) plots

ME 413: System Dynamics and Control 201/220 Laboratory Manual


the Bode plot with the gain and phase
margins marked with a vertical line. The
gain margin, Gm, is defined as 1/G where
G is the gain at the -180 phase frequency.
20*log10(Gm) gives the gain margin in dB.

ME 413: System Dynamics and Control 202/220 Laboratory Manual


TABLE 1. Summary of asymptotic magnitude Bode plot parameters for the most basic blocs

Description Corner Frequency


Transfer Function G ( jω ) Magnitude G ( jω ) Phase ∠ G ( jω )
(rad/s) dB

0ο , K > 0
Constant gain: K None = 20 log K 180ο , K < 0

Poles or zeros at = 0 for ω = 1 ,


the origin of Straight lines of constant slope
( jω ) ± p None ± p × 90ο
order p ± 20 p dB/dec

Straight line of 0 dB/dec for ω < 1 / τ ,


Simple pole 1 /( jωτ + 1) 1/ τ Straight line of slope –20 dB/dec for − tan −1 (ωτ )
ω > 1/τ
Straight line of 0 dB/dec for ω < 1 / τ ,
Real zero jωτ + 1 1/ τ Straight line of slope 20 dB/dec for tan −1 (ωτ )
ω > 1/τ
 ω 
ω n2 Straight line of 0 dB/dec for ω < ω n ,  2ξ ( ) 
ω
Conjugate poles ω ω ωn Straight line of slope – 40 dB/de for − tan −1  n 
1 + j 2ξ ( ) − ( ) 2  ω 2
ωn ωn ω > ωn 1− ( ) 
 ωn 
 ω 
 2ξ ( ) 
Conjugate zeros 1  ω ω  Straight line of 0 dB/dec for ω < ω n , ω
1 + j 2ξ ( ) − ( ) 2 
2 
ωn tan −1  n 
ωn  ωn ωn  Straight line of slope 40 dB/de for ω > ω n  ω 2
1− ( ) 
 ωn 

ME 413: System Dynamics and Control 203/220 Laboratory Manual


ILLUSTRATIVE EXAMPLE:
Draw by hand the Bode plot for the transfer function
64( s + 2)
G(s) =
s ( s + 0.5)( s 2 + 3.2s + 64)

Check your answer by using MATLAB. Find also a) the gain crossover and the
phase crossoverb) the phase margin and the gain margin.

SOLUTION

1. Rearrange the transfer function G (s ) in the standard form


64(1 + s / 2)
G(s) =
s (1 + 2 s )(1 + 0.05s + s 2 / 64)
2. Substitute s = jω in G (s )
4(1 + j 0.5ω )
G ( jω ) =
( jω )(1 + j 2ω ) (1 + j 2 × 0.2(ω / 8) − (ω / 8) 2 )
3. The factors of this transfer function in order to their occurrence as
frequency increases are:

* 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

4. The characteristics of each factor of the transfer function are given in


Table 2

TABLE 2. Asymptotic approximation table for construction of Bode plot of


4(1 + j 0.5ω )
G ( jω ) =
( jω )(1 + j 2ω ) (1 + j 2 × 0.2(ω / 8) − (ω / 8) 2 )

Corner
Asymptotic log-magnitude Phase angle
Factor Frequency
Characteristic characteristic
(rad/s)

4 None 20 log 4=12.04 0ο


Straight line of constant slope –20
1 / jω None dB/dec passing through − 90ο
ω =1
Straight line of 0 dB/dec for ω < ω1 ,
1 /(1 + j 2ω ) ω 1 = 1 / 2 = 0.5 Straight line of slope – 20 dB/dec for − tan −1 (2ω )
ω > ω1
Straight line of 0 dB/dec for ω < ω 2 ,
1 + j 0.5ω ω 2 = 1 / 0.5 = 2 tan −1 (0.5ω )
Straight line of slope 20 dB/dec for

ME 413: System Dynamics and Control 204/220 Laboratory Manual


ω > ω2
 ω 
1  0.4( ) 
Straight line of 0 dB/dec for ω < ω 3 , 8 
ω ω ω3 = 8 − tan −1 
1 + j 2 × 0.2( ) − ( ) 2 Straight line of slope – 40 dB/de for  ω 2
8 8 ξ = 0.2 1− ( ) 
ω > ω3  8 

5. Construct the log magnitude versus ω of each of the previous factors.

− 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 )

6. Construct the phase versus ω by adding each of the previous phase


factors, i.e.,

 ω 
 0.4( ) 
Φ (ω ) = ∠ G ( jω ) = − 90 − tan (2ω ) + tan (0.5ω ) − tan 
ο −1 −1 8  −1

 ω 2
1− ( ) 
 8 

Accordingly, prepare a table for which you calculate Φ (ω ) in function of


ω , and then plot the obtained values.

ME 413: System Dynamics and Control 205/220 Laboratory Manual


MATLAB PROGRAM

The following program is provided to you to check the validity of the


previous example. Any of the previous commands can be applied in order
to determine the Bode plot (magnitude and phase).

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)

These statements produce the plots shown in Figure 4.

Figure 3. Bode plot for the previous example.

ME 413: System Dynamics and Control 206/220 Laboratory Manual


Figure 4. Gain margin Gm, phase margin Pm, and associated frequencies
Wcg and Wcp
PROBLEM TO BE SOLVED IN CLASS
1. Draw by hand the Bode plot for the transfer function

10( s + 3)
G(s) =
s ( s + 2)(0.5s 2 + 0.5s + 1)

1. Check your answer by using MATLAB. Find also:


a) the gain crossover and the phase crossover
b) the phase margin and the gain margin

ME 413: System Dynamics and Control 207/220 Laboratory Manual


PART II: The Ball and Beam Apparatus
Proportional Control of Beam Angle and
Manual Control of Ball Position

ME 413: System Dynamics and Control 208/220 Laboratory Manual


ME 413: System Dynamics and Control 209/220 Laboratory Manual
ME 413: System Dynamics and Control 210/220 Laboratory Manual
ME 413: System Dynamics and Control 211/220 Laboratory Manual
ME 413: System Dynamics and Control 212/220 Laboratory Manual
ME 413: System Dynamics and Control 213/220 Laboratory Manual
ME 413: System Dynamics and Control 214/220 Laboratory Manual
ME 413: System Dynamics and Control 215/220 Laboratory Manual
ME 413: System Dynamics and Control 216/220 Laboratory Manual
ME 413: System Dynamics and Control 217/220 Laboratory Manual
ME 413: System Dynamics and Control 218/220 Laboratory Manual
ME 413: System Dynamics and Control 219/220 Laboratory Manual
ME 413: System Dynamics and Control 220/220 Laboratory Manual

You might also like