220
ME 413: System Dynamics and Control 1/220 Laboratory Manual King Fahd University of Petroleum & Minerals College of Engineering Sciences Mechanical Engineering Department ME 413 System Dynamics & Control

System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

King Fahd University of Petroleum & Minerals

College of Engineering Sciences

Mechanical Engineering Department

ME 413 System Dynamics & Control

Page 2: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 2/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

Page 3: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 3/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

Page 4: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 4/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.

Page 5: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 5/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.

Page 6: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 6/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.

Page 7: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 7/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.

Page 8: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 8/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.

Page 9: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

King Fahd University of Petroleum & Minerals

College of Engineering SciencesMechanical Engineering Department

ME 413: System Dynamics & Control

INTRODUCTION TO MATLAB

Student Name:_________________________________________________________

Section#:__________________________________________________________________

Student ID#:____________________________________________________________

Date:_________________________________________________________________________

Instructor:________________________________________________________________

Page 10: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 10/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

Page 11: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 11/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 23)2/5(73 +−+ » 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; » items=erasers+pads+tapes 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

The semicolon tells MATLAB to evaluate the line but not tell us the answer

Page 12: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 12/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

Page 13: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

ZggZV /)(sinh)(cosh +=

where 5.102.0 and 300200 jgjZ +=+= » 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 x =

0.7071 » y=asin(x) y =

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

These commands find the angle where the sine function has a value

2/2 . Note that MATLAB only works in radians.

Page 14: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 14/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

Page 15: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 15/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 22× matrix A, the determinant is

12212211 aaaaA −= For a 33× matrix A, the determinant is

3231

222113

3331

232112

3332

232211 aa

aaa

aaaa

aaaaa

aA +−=

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

Page 16: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 16/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

3333232131

2323222121

1313212111

bxaxaxabxaxaxabxaxaxa

=++=++=++

where ix are the unknowns and ija and ib are known coefficients. The previous system can be written in matrix form as

=

3

2

1

3

2

1

333231

232221

131211

bbb

xxx

aaaaaaaaa

this can be written in compact form as

[ ] [ ]BXA =

Page 17: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

where

[ ] [ ]

=

=

=

3

2

1

3

2

1

333231

232221

131211

,,bbb

bxxx

Xaaaaaaaaa

A

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

[ ] [ ]BAX 1−=

In MATLAB, a system of simultaneous equations can be solved using matrix division. The solution to the matrix equation [ ] [ ]BXA = can be computed using matrix left division, as in A\B. The solution to the matrix equation [ ] [ ]BAX = 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

1523

1023

321

321

321

−=−−=++−=−+

xxxxxx

xxx

where

[ ] [ ]1

2

3

3 2 1 101 3 2 , , 5

1 1 1 1

xA X x b

x

− = − = = − − −

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 [ ] [ ]BAX = as shown in these statements.

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

» x=B/A

Page 18: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 18/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 nn × matrix, the n numbers λ that satisfy

[ ] xxA λ= 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

−−−−

−=

51166116110

A

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

Page 19: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 19/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,

nnn

nnn axaxaxaxaxaxP ++++++= −−−−

12

22

21

1 ...)( ο where the variable is x and the polynomials coefficients are represented by the values of 21 ,, aaaο 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 1162512 34 ++− xxx 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

Page 20: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 20/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 432)( 23 +++= xxxxa and

1692)( 23 +++= xxxxb » 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 64846744164)( 23456 ++++++= xxxxxxxc . 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 201262)( 23 +++= xxxxd . 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 84968152206)( 23456 ++++++= xxxxxxxe . Leading zeros are required rather than trailing zeros because coefficients associated with like powers of x must line up. Polynomial Division

Page 21: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 21/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 84968152206)( 23456 ++++++= xxxxxxxe » e e =

1 6 20 52 81 96 84

» h= polyder(e)

h =

6 30 80 156 162 96 which is 9616215680306)( 2345 +++++= xxxxxxh . 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

84968152206)( 23456 ++++++= xxxxxxxe , at the points x = –5 and x = 12 » v= polyval(e,–5) v =

4504

» W= polyval(e,12) v =

4996452

Page 22: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 22/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

0 2 4 6 8 10 120

2

4

6

8

10

12

14

16Plot of t versus y

Variable t

Func

tion

y

title

xlabel

grid

ylabel

Figure 1. Example of x-y plot

Plotting Functions Single Plot Example 2. Plot the function y=sin(t)/t, for ππ 44 <<− t . » t = – 4*pi:0.05:4*pi; %starting point:increment:end point

Page 23: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 23/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

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

-0.2

0

0.2

0.4

0.6

0.8

1The Sinc Function

Radians

Dis

plac

emen

t

Figure 2. Example of Sinc function plot Multiple Plots Example 3. For π40 << t , 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.

Page 24: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

0 2 4 6 8 10 12 14-0.5

-0.4

-0.3

-0.2

-0.1

0

0.1

0.2

0.3

0.4

0.5Plot of Two Function

Radians

Dis

plac

emen

t

xy

Legend

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

Page 25: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

-10 -5 0 5 10-15

-10

-5

0

5

10

15The Function x

-10 -5 0 5 10-5

0

5The Function y

-10 -5 0 5 10-4

-2

0

2

4The Function z

-10 -5 0 5 10-20

-10

0

10

20The Function w

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

n

dd cxcxcxp +++= − ...)( 121

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., 132 23 +++= xxxy

Page 26: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 26/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 22 yxJ +ο over the

range 1212,1212 ≤≤−≤≤− yx . » 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

Page 27: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 27/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.

Page 28: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 28/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

Page 29: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 29/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

)2(sin 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

Page 30: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

-1 0 1

-1

-0.5

0

0.5

1

n = 3

-1 0 1

-1

-0.5

0

0.5

1

n = 4

-1 0 1

-1

-0.5

0

0.5

1

n = 5

-1 0 1

-1

-0.5

0

0.5

1

n = 6

-1 0 1

-1

-0.5

0

0.5

1

n = 8

-1 0 1

-1

-0.5

0

0.5

1

n = 10

-1 0 1

-1

-0.5

0

0.5

1

n = 12

-1 0 1

-1

-0.5

0

0.5

1

n = 18

-1 0 1

-1

-0.5

0

0.5

1

n = 24

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

-1 -0.8 -0.6 -0.4 -0.2 0 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

STOP

Figure 10. Red stop sign

Page 31: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

MATLAB Commands and Matrix Functions

Commands and matrix functions commonly used in solving control engineering problems

Explanations of what commands do, matrix functions mean, or statements 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

Page 32: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 32/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

Page 33: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

King Fahd University of Petroleum & Minerals

College of Engineering SciencesMechanical Engineering Department

ME 413: System Dynamics & Control

LAPLACE TRANSFORMS

Student Name:_________________________________________________________

Section#:__________________________________________________________________

Student ID#:____________________________________________________________

Date:_________________________________________________________________________

Instructor:________________________________________________________________

Page 34: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 34/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

3 2

num 7 5( )den 4 6

sG ss s s

−= =

− + +

1. Write G(s) in partial fractions (Hint: 1−=s is a pole)

3

3

2

2

1

1

dennum)(

psr

psr

psrsG

−+

−+

−==

2. Find the inverse Laplace transform L 1− [ )(sG ]= )(tg . 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

( )23 12

dennum)(

−+

==ss

ssG

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

dennum)( =sG

Page 35: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 35/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

525)( 2 ++

+=

ssssG

PROBLEM #4: Initial Value Problem

1. Solve the Initial Value Problem

0)0(,1)0(),( ===+ yytfyy

where f(t) is defined by

t

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

Page 36: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

King Fahd University of Petroleum & Minerals

College of Engineering SciencesMechanical Engineering Department

ME 413: System Dynamics & Control

MECHANICAL SYSTEMS (I)Simple Harmonic Oscillator

Student Name:_________________________________________________________

Section#:__________________________________________________________________

Student ID#:____________________________________________________________

Date:_________________________________________________________________________

Instructor:________________________________________________________________

Page 37: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 37/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

2n nfω π= =Elastic propertyInertia property

The simplest example of an oscillating system is a mass connected to a rigid foundation by a spring as shown in Figure 1.

M

k

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

2 2 22

2 2 20 0 0nd x d x k d xM kx x x ,dt dt M dt

ω+ = ⇒ + = ⇒ + =

Page 38: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 38/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

( ) ( )m nx t X cos tω φ= + where mX is the amplitude of the oscillation, and φ is the phase shift. Both mX and φ are constants that are determined by the initial conditions (initial displacement and velocity) at time 0t = . 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 L= . The quantity y L L= − is the elastic extension (stretch) of the spring from its unstretched length L .

L

y

L

M

Mg

F k y= −

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 L= = = −

Page 39: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

so that ( )/L g k M L= +

The above equation represents a straight line relationship between L and M . The quantity /g k represents the slope and L is the intercept.

M

L

L

( )/L g k M L= +

( )slope /g k=

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.

Page 40: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 40/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 24 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 ( )24 kπ which

extends through the origin in the case of a massless spring. For a spring with mass sm , 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, sm to the mass M of the hanging weight in the theory, so

( )/ 32 sM m

kτ π

+=

and

( )2

2 4 / 3sM mkπτ

= +

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 3,sm instead of, say 2,sm is more technical. It comes from the fact that the kinetic energy of the spring is ( )( ) 21 2 3sm v , 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 ( ) 21 2 sm v of

the particle of mass sm moving at speedv . 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 ( )24 kπ as shown in Figure 4. When the line is extended to 2 0,τ = its

intercept with the horizontal axis should be 3,sm− instead of 0. The period is predicted to be independent of the amplitude of the oscillation.

Page 41: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 41/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

M

2τ( )

22 4 / 3sM m

kπτ

= +

24slopekπ

=

/ 3sm−

Figure 4.

Procedure and Requirements How does period T depend on mass M and Amplitude?

1) Measure the mass sm 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.

Page 42: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 42/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.

8) Plot a theory line for the improved theory ( )2

2 4 / 3sM mkπτ

= +

on the

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 2.0M = kg

Page 43: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

TABLE 1. Measure of the Spring Constant k

Trial #

Mass M (kg)

Length L (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 (kg)

Time t for n oscillations (s)

Period t nτ = (s)

2τ (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

Page 44: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

PART II: SIMULATION

The mass is fixed to be 2.0M = 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?

Page 45: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

King Fahd University of Petroleum & Minerals

College of Engineering SciencesMechanical Engineering Department

ME 413: System Dynamics & Control

MECHANICAL SYSTEMS (II)Modeling of a Pickup Truck

Student Name:_________________________________________________________

Section#:__________________________________________________________________

Student ID#:____________________________________________________________

Date:_________________________________________________________________________

Instructor:________________________________________________________________

Page 46: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 46/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

∑ = aMF (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

∑ = αJT (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.

Page 47: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

TABLE 1. Summary of elements involved in linear mechanical systems

Translation Rotation

Spring kFF

1x 2x

kxxxkF =−= )( 21

kT T

2θ1θ

θθθ kkT =−= )( 21

Inertia

Damper bFF

1x 2x

xbxxbF =−= )( 21

bT T

2θ1θ

θθθ bbT =−= )( 21

Element

m1F

x2F

3F4F

∑ = amF T

θJ

∑ = αJT

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

Page 48: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

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

x

1y

2y

Spring

Shockabsorber

Profileof 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

)(1)(1

)()(

)( 11 sden

snumsXsY

sG == and )(2)(2

)()(

)( 22 sden

snumsXsY

sG ==

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

)(1 sY and )(2 sY represent the Laplace transform of )(1 ty and )(2 ty ,

respectively and X(s) represents the Laplace transform of )(tx . The

quantities num1(s), num2(s), den1(s) and den2(s) are numerator and

denominator polynomials in s.

5. To find the responses )(1 ty and )(2 ty consider the following

a)- mKNsBmNKmNKKgmKgM /0.1 and,/005,/100,10,200 21 =====

b) mNsBmNKmNKKgmKgM /010 and,/1000,/500,10,500 21 =====

c) mKNsBmNKmNKKgmKgM /0.1 and,/1000,/50,10,500 21 =====

For each of the previous cases, use MATLAB to plot the responses )(1 ty

and )(2 ty if the profile road were given by the following input function

Page 49: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

≥<

=002.00,0

)(tt

tx

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

system parameters M, m, B, 1K and 2K is the best one and why? Justify

your answer.

7. Use the final value theorem to obtain the steady state values ssy1 and ssy2

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

Page 50: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

King Fahd University of Petroleum & Minerals

College of Engineering SciencesMechanical Engineering Department

ME 413: System Dynamics & Control

MECHANICAL SYSTEMS (III)Torsional Oscillations

Student Name:_________________________________________________________

Section#:__________________________________________________________________

Student ID#:____________________________________________________________

Date:_________________________________________________________________________

Instructor:________________________________________________________________

Page 51: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 51/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

∑ = aMF (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

∑ = αJT (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.

Page 52: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 52/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.

Translation Rotation

Spring kFF

1x 2x

kxxxkF =−= )( 21

kT T

2θ1θ

θθθ kkT =−= )( 21

Inertia

Damper bFF

1x 2x

xbxxbF =−= )( 21

bT T

2θ1θ

θθθ bbT =−= )( 21

Element

m1F

x2F

3F4F

∑ = amF T

θJ

∑ = αJT

Page 53: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 53/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 1k and 2k . The two disks, with moments of inertia 1J and

2J are supported by bearings whose friction is negligible compared to the viscous friction element denoted by the coefficients 1B and 2B . 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 ( )1G s and ( )2G s

given by ( ) ( )( )

11

a

sG s

sτΘ

= and ( ) ( )( )

22

a

sG s

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 ( )1G s and ( )2G s should be given in terms of the

system parameters 1k , 2k , 1B , 2B and 1J , 2J .

3. If in SI units 1J = 2J =1.0 and 1B = 2B =0.7 and 1k = 2k =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 ( )2G 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.

Page 54: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 54/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 ( )1G s ). What do you conclude.

Page 55: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 55/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

I kθ θ= − ⇒ 0kI

θ θ + =

ld

I

Figure 1.

Where

Page 56: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 56/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.

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

The natural frequency of the system can be written as

nk GJI I l

ω = =

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

2 I lGJ

τ π= ⇒ 2

2 4 I lGJπτ

=

It is obvious that the relationship between 2τ and l is linear, with a slope equal to

( )24 /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.

l

2τ2

2 4 I lGJπτ

=

24slope IGJπ

=

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.

Page 57: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 57/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

Page 58: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 58/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

( )24 /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

determined using the analytical method 212i i iI I m r= =∑ ∑ where im and ir

are the mass and radius of each part separately.

Page 59: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

TABLE 2.

Trial #

Length l (m)

Time t for n oscillations (s)

Period t nτ = (s)

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

I

R

m

h

Figure 4. Setup for Falling Weight Method experiment.

Page 60: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 60/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 ( )1N be the number of revolutions of the wheel during the time 1t taken by the flywheel before stopping, Figure 4. and ( )2N be the number of revolutions of the wheel during

the time 2t 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 0t = and 1t , 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 fT of the rotor’s bearing. The equation of motion (applying Newton’s second law for rotating system) can be written as

fT I mgR Tθ= = −∑

where 2totalI I mR= + . Knowing that

d d d ddt d dt dθ θ θ θθ θ

θ θ= = × = ×

the above equation becomes

( )2fI mR d d mgR Tθ θ θ+ = −

Integrating the above equation over the whole range of θ , i.e., between 0 and 1θ , results in the following equation:

( )2 21 1 12 fI mR mgR Tθ θ θ+ = −

Replacing the following expressions

1 1 1

22

R hR v

NN t

θ ωθ

θθ πω π

==

===

hence

( ) ( )2 21 1 11 2 1 2 2 fI mv mgh N Tω π+ = − (*)

Page 61: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 61/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 fT . The equation of motion can be written as:

fI Tθ = −

Substituting for ddθθ θθ

= × and integrating the above equation over the entire range

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

( ) ( )2 3 21 2 fI Tθ θ θ= − − (**)

The difference ( )3 2θ θ− expresses the total angle traveled by the rotor during the

third phase. It can be expressed as ( )3 2 22 Nθ θ π− = , where 2N is the number of revolutions of phase 3. Eliminating fT from equations (*) and (**) results in the following equation

21

2 211 2

2

2mgh mvI NN

ω ω

−=

+

where

1 12 / ;v h t= average descending velocity of the mass .m

1 1 12 / ;N tω π= average angular velocity of the rotor during phase (1).

2 2 22 / ;N tω π= average angular velocity of the rotor during phase (3).

1N and 2N : 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 1N and the corresponding time 1t .

Page 62: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

4) Record the number of revolutions 2N and the corresponding time 2t 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 (m)

Time t1 (s) N1 1ω Time t2

(s) N2 2ω

1 2

3

4

5

6

7 8

Page 63: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

King Fahd University of Petroleum & Minerals

College of Engineering SciencesMechanical Engineering Department

ME 413: System Dynamics & Control

ELECTRICAL SYSTEMS

Student Name:_________________________________________________________

Section#:__________________________________________________________________

Student ID#:____________________________________________________________

Date:_________________________________________________________________________

Instructor:________________________________________________________________

Page 64: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 64/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

0=∑j

ji at any node

Kirchhoff’s Voltage Law (KVL) The algebraic sum of all voltages taken around a closed path in a circuit is zero, or

0=∑j

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

Page 65: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

a)- Voltage source

i(t)

v(t) i(t)

b)- Current source

i(t)

Circuit v(t)+

-Circuit

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)

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

0 V 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.

Page 66: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

TABLE 1. Summary of elements involved in linear electrical systems

Element

Capacitor

Resistor

Inductor

Voltage-current Current-voltage Voltage-charge Impedance,Z(s)=V(s)/I(s)

∫=t

dic

tv0

)(1)( ττdt

tdvCti )()( = )(1)( tqc

tv =Cs1

)()( tiRtv = )(1)( tvR

ti =dt

tdqRtv )()( = R

dttdiLtv )()( = ∫=

t

dvL

ti0

)(1)( ττdt

tqdLtv )()(2

= Ls

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 ii

Rv LvCv

v

i

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

Parallel Circuits

-Lv

Li

R C L+

CiRi

CvRv

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

Complex impedance

Page 67: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 67/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.

1Z 2Z

1v 2vv

(a) Impedance in series arrangement

1Z

2Z)(inputvi

(b) Transfer function in parallel arrangement

)(outputvοi i i

)()(

21 sIsVZZZ =+= )()(

)()()(

21

2

sZsZsZ

sVsV

i +=ο

Figure 6. Complex impedance in electrical circuits

PROBLEM # 1:

In the electrical circuit shown below, ( )ie 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

Page 68: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 68/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 ( )ie 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 ( )0E s for all t>0. Notice that ( )0E 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 ( )0E s for all t>0. As part of your solution show that the

initial voltage across the capacitor is ( ) ( )0 0 9 VA oe e− = .

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)

while 1 21 22 , 5.5 , F and H.

15 15R R C L= Ω = Ω = =

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

Page 69: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

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

2. Find the transfer-function matrix relating the output variables 1y and 2y to

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

( )e t

2Li x=1R

2RC

L

ci1cv x=

2y

1y

Figure 8. Circuit of Problem # 2.

Page 70: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

King Fahd University of Petroleum & Minerals

College of Engineering SciencesMechanical Engineering Department

ME 413: System Dynamics & Control

SIMULATION: Electro-Mechanical SystemsEXPERIMENT: Centrifugal Governor

Student Name:_________________________________________________________

Section#:__________________________________________________________________

Student ID#:____________________________________________________________

Date:_________________________________________________________________________

Instructor:________________________________________________________________

Page 71: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 71/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.

οο ωθ =

J

aiKττ =

aLaR

)(tva

οθvc Kv =

+

-

ai

B

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 )(tva , the output is the shaft’s angular speed

)()( tt οο ωθ = and

Page 72: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

)(tia : armature current )(tτ : torque aR : armature resistance aL : armature inductance B : viscous damping coefficient J : motor of inertia of motor and load τK : torque constant vK : back emf constant cv : back emf of the motor

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

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

dennum

sVs

sGa

=)()(

)( ο

where )(sοΩ and )(sVa are the Laplace transform of )(tοω and )(tva respectively.

6. Write the previous expression in the standard form

dennum

sVs

sGa

=)()(

)( ο = 22 2 nnssk

ωξωο

++

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., ),,( JLKfk aτο = , ),,,,,( vaa KRBJLKf τξ = , ),,,,,( vaan KRBJLKf τω =

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

Page 73: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

a) ( )⇒=ξ=ω=ο 0;4,0.1 nk no damping

b) ( )⇒=ξ=ω=ο 1.0;4,0.1 nk The system is under-damped

c) ( )⇒=ξ=ω=ο 7.0;4,0.1 nk The system is underdamped

d) ( )⇒=ξ=ω=ο 0.1;4,0.1 nk The system is critically damped

e) ( )⇒=ξ=ω=ο 0.2;4,0.1 nk The system is over-damped

9. (Optional) Let the state vector defined by [ ]ax iω= . 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, 4.0aR = Ω , 2.75 HaL µ= , 63.5077 10 NmsB −= × ,

6 2 23.2284 10 kg m /sJ −= × , 0.0274 Nm/AmpK Kτ τ= = , 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.

Page 74: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 74/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

Page 75: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 75/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).

Sleeve

Shaft

Arms

Governor balls

Figure 1. Porter Governor

10 mm5 mm

Page 76: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 76/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.

α

h

β

r

I

B

D

F

A

α

βT2

T1

Mg/2

Mgmg

C

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

Page 77: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

(1 ) tan2MF K m g = + + α

(1)

where m=1.0 kg and M=0.794 kg. In the above

αβ

=tantanK (2)

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

rmF 2ω= (3) and

hr

=αtan (4)

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

2 (1 ) 12M gKm h

ω = + + (5)

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.

Page 78: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

αr 19

r-38

β

h

298

Axis ofrotation

Centerline

s

F

38

19

lolkkk

s

r

shrh

−−−

=β298

38tan

sh −−298

r −=α

19tan

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.

Page 79: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 79/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.

tan(1 ) tan (1 ) tan

2 2 tanM MF K m g m gβ = + + α = + + α α

or

( )( ) ( )

( )38 191

2 298 19r rM hF m g

h s r h − − = + + − − −

(6)

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.

( )( ) ( )

( )147 38 147 190.794 1251 1 9.812 298 125 100 147 19 125

19.849

F

F N

− − ∴ = + + × × − − − ∴ =

Page 80: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

0 20 40 60 80 100 120 140 160 18060

80

100

120

140

160

180

200

220

240

h

r

Figure 4. Calibration curve of h and r against spindle scale reading s of a Porter governor configuration.

h scale reading (mm) r scale reading (mm)

r a

nd

h

(m

m)

Sleeve scale reading s (mm)

Page 81: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

TABLE 1. Reading and Summary of the results

S mm

Nm (Motor)

rpm

Ng (gov) rpm

r (Fig.4) mm

h (Fig.4) mm

F (Eq.6) N

0 0

10

20

30

40

50

60

70

80

90

100

110

120

130

140

150

160

Remember 60

2 Nπ=ω and

30m

gN

N = where ω is in rad/s and N is in rpm

Page 82: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 82/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.

Page 83: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 84: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 84/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

Moving a pickoffpoint behind a block

G1e

1e

2e

Moving a pickoffpoint ahead of a block

Moving a summingpoint behind a block

G1e

3e

2e

G/1

G1e

3e

2e

G

Moving a summingpoint ahead of a block

G1e

3e

2e

G1e

3e

2e

Eliminating afeedback loop

GR C

HR C

GHG+1

G1e

1e

2e

G/1

G1e 2e

2e

G1e

1e

2e

G

Series or cascadedelements 2GR C

1G Y R C21GG

Page 85: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

MATLAB IMPLEMENTATION Series Connection

dennum

)()()( ==

sRsCsT

den1num1)(1 =sG

den2num2)(2 =sG

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

)(2 sG)( sR )( sC)(1 sG

Parallel Connection

dennum

)()()( ==

sRsCsT

den1num1)(1 =sG

den2num2)(2 =sG

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

)(2 sG

)( sR )( sC

)(1 sG

Cloop Connection

)(1 sG)(sR )(sC

dennum

)()()( ==

sRsCsT

den1num1)(1 =sG

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

+1 Positive Feedback -1 Negative Feedback (default)

Feedback Function

Page 86: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

1GR C

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

+1 Positive Feedback -1 Negative Feedback (default)

)(sG

)(sH

dennum

)()()( ==

sRsCsT

den1num1)( =sG

den2num2)( =sH

PROBLEM # 1: Draw the system block Diagram shown in the Figure below and obtain the transfer function

=( )( )( )

X sG sF s

by

kM

x

PROBLEM # 2:

1. Draw the system block Diagram shown in the Figure below and obtain the transfer function

=( )( )( )

o

i

E sG sE s

2. Use Matlab to obtain the same transfer function obtained above and plot ( )oe t .

ο ( )e t1 2 FC = µ

2 2 MR = Ω

2 1 FC = µ

1 1 MR = Ωxv

( )ie t

10t

Page 87: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 87/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 )()(1 sCsH is a positive feedback signal and the loop )()()( 143 sHsGsG is called a positive feedback loop.

1G 2G 3G 4G

2H2H

)(sC)(sR

2H1H

2H3H

Figure 1. Multiple-loop feedback control system

where

61)(,

441)(,

11)(,

101)( 42

2

321 ++

=++

+=

+=

+=

sssG

ssssG

ssG

ssG

and

1)(,2)(,21)( 321 ==

++

= sHsHsssH

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

den(s))(num

)()()( s

sRsYsT ==

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.

Page 88: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 88/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.

C k

A

h

l

L

θ

Mass m

Figure 1.

Page 89: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 89/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

22 0n n+ + =θ ζω θ ω θ (1) where

22n

A

lkI

=ω (2)

2

2 nA

ChI

=ζω (3)

and 3

3A

LmI = (4)

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

k ≡ spring stiffness. AI ≡mass moment of inertia of the system about (A).

≡ζ damping coefficient.

The solution of Equation.(1) can be written as

( )2sin 1ntne t−= −ζωθ θ ζ ω (5)

in the above equation, the frequency of the damped oscillations can be written as

21d n= −ω ω ζ (6) The shape of the oscillatory motion described by equation. (5) above is shown in Figure. 2.

0 2 4 6 8 10 12-4

-3

-2

-1

0

1

2

3

4

5

t

θ(t)

τd

θ1

θ2

θ4

n cycles

t1 t2 t4

θn+1

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

Page 90: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 90/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. 1 2ln( / )=δ θ θ , as shown in Fig.2. The logarithmic decrement can be found by any of the following equations:

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

or

21 1(1/ ) ln( / ) 2 / 1nn += = − ζδ θ θ πζ (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

22 n AC I h= ζω (9)

or 22 A dC I h= δ τ (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

Page 91: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 91/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 ( )2n =ω π τ .

7. From the resulting plots in steps (3 through 5 above), obtain the damped natural frequencies ( )2d 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 ( )0.573 in/sdrumV = , then the damped period can be found as:

( )d drumx n V=τ

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

dashpot. Explain that using a graph (C vs. 21/ h ). 2. Discuss what are the factors affecting the damping characteristics of a

dashpot when h is constant. 3. Discuss briefly how the parameters , and n Cζ ω of equation (9) are affected

by the dashpot position h .

Page 92: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 92/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)?

Page 93: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 93/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 ( )d sX X . 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:

2 21 0AI Cl klθ θ θ+ + = (1)

C

k

A

Electric Motorwith mass M

Beam ofmass mb

a

l

L

l1

θ

Figure 1. Setup of the experiment

Page 94: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

where ( )2 2* 3A bI M a m L= + 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

21

nA

kLI

=ω (2)

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

2n T=

πω (3)

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

1 drumT V= ∆ (4)

where 0.573 in/sec drumV = , (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.

Page 95: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 95/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:

2 21 sin( ) sin( )AI k l me a t F a 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

( )( ) ( )

2

2 221 2

me M rX

r r=

− + ζ (6)

where M is the effective mass of the vibrating system, ( )nr = ω ω 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 ( )sX F k= , where

2F m e= ω is the excitation force that can be adjusted to the value of (0.0005 2ω )

in this experiment.. Substituting for ( )2n k M=ω and 2F m e= ω into Equation

(6) and rearrange, one can write:

( )( ) ( )2 221 2

F kX

r r=

− + ζ (7)

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 2F m e= ω , then the ratio

( )F k can be considered as static deflection or static amplitude of the system. Equation (7) can be written in the form:

( ) ( )2 22

1(MF)1 2

d

s

XX r r

= =− + ζ

(8)

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 dX and sX 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 2F m e= ω is supposed to act upon the system. taking the moments about the hinge A, the spring’s force can be written as

Page 96: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

21/sF m e a L= ω (9)

The deflection of the spring is ( ) 21/sF k m e a k L∆ = = ω , from which the static

deflection of the beam’s end would therefore be: 2 2

1/sX m e a L k L= ω (10)

where a , L and 1L are taken from the geometry as shown Figure (2).

k

Aa

l

L

l12F m e= ω

sF

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.

Page 97: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 97/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 21d n= −ω ω ζ . 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 dX 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?

Page 98: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 98/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:

1..................., ...................

...................., ...................L Il a= == =

Mass moment of inertia of the beam about point (A): ( )2 2* 3 .....................A bI M a m L= + =

Natural frequency of the dynamic system:

2 ...................n T

= =πω

Damped Natural frequency of the system:

22 ................... or 1 ...................d d ndT

= = = − =πω ω ω ζ

Spring stiffness:

221

................An

IkL

= =

ω

Damping ratio

Page 99: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Table 1 Readings and Measurements

No.

N (rpm)

( )2 60N=ω π (rad/s)

( ) 20.0005sX F k k= = ω (m)

( )nr = ω ω dX (Theoretical) Equation(8)

dX (Experimental)

1

2

3

4

5

6

7

8

9

10

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

Page 100: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

King Fahd University of Petroleum & Minerals

College of Engineering SciencesMechanical Engineering Department

ME 413: System Dynamics & Control

Simulation: Transient ResponseSpecifications of a 2nd Order SystemExperiment: Vibrations Absorbers

Student Name:_________________________________________________________

Section#:__________________________________________________________________

Student ID#:____________________________________________________________

Date:_________________________________________________________________________

Instructor:________________________________________________________________

Page 101: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 101/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:

22

2

2)(

nn

n

sssG

ωζωω

++=

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

Input: unit step Output: ( )θωβ

ζω +−= − tetc dtn sin11)(

Input: impulse Output: ( )tetc dtn n ω

βω ζω sin)( −=

where 21 ζβ −= and

= −

ζβθ 1tan .

TIME DOMAIN PERFORMANCE SPECIFICATIONS

Page 102: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 102/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.

pM

stptrt

dt

t

)(tc

toleranceAllowable

0.02

0.1

0.5

0.9

Figure 1. Transient response specifications

TABLE 1. Useful Formulas and Step Response Specifications for the Linear

Second-Order Model

)(tfxkxcxm =++ , m, c, k constant

1. Roots m

mkccs2

42

2,1−±−

=

2. Damping ratio or mkc 2/=ζ

3. Undamped natural frequency mk

n =ω

4. Damped natural frequency 21 ζωω −= nd 5. Time constant ncm ζωτ /1/2 == if 1≤ζ

6. Logarithmic decrement 21

πζδ−

= or 224 δπ

δζ+

=

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 21/100 ζπζ −−= eM p

9. Peak time 21/ ζωπ −= npt

10. Delay time 107.01≤≤

+≈ ζ

ωζ

ndt

11. Settling time n

st ζω4

=

Page 103: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

12. Rise time d

rtωθπ −

= (See Figure 2)

θ

σ−nζω

21 ζω −n

djω

σ

ωj

o

Figure 2. Definition of the angle θ

PROBLEM # 1: The following block diagram represents a second-order system:

)3.02.0(2.0+s

)(sC)(sR

4

s1

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 )(tvi is the input voltage while

)(tvο 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 )(tvο having an overshoot of no more than

25%, assuming )(tvi is a unit step, L=10 mH, and C= 4µF.

Page 104: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

)(tvο

RL

)(tiο)(tvi C

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 1A and 2A , 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.

)(tF)(tx

k 2/b2/b

m

1A2A

sec1

sec,Time

cm,Output

Page 105: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 105/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.

Machine 1m

)(1 tx

2/1k2/1k

tF ωο sin

Figure 1. Idealization of a machine

Page 106: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

DESCRIPTION AND THEORY

When we attach an auxiliary mass 2m to a machine of mass 1m through a spring of stiffness 2k , the resulting two degrees of freedom system will look as shown in Figure 2. The equations of motion of the masses 1m and 2m are

( )( ) 0

sin

12222

2121111

=−+=−++

xxkxmtFxxkxkxm ωο (1)

By assuming a harmonic solution,

tXtx jj ωsin)( = , j=1, 2 (2)

We can obtain the steady-state amplitude of the masses 1m and 2m as we can obtain

22

222

2121

222

1 kmkmkkFmk

X−−−+

−=

))(()(

ωωω ο (3)

22

222

2121

22 kmkmkk

FkX

−−−+=

))(( ωωο (4)

Machine 1m

)(1 tx

2/1k2/1k

tF ωο sin

)(2 tx

2m

2k

Dynamic vibration absorber

Figure 2. Undamped dynamic vibration absorber

Page 107: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

We are primarily interested in reducing the amplitude of the machine 1X . In order to make the amplitude of 1m zero, the numerator of Equation (3) should be set equal to zero. This gives

2

22

mk

=ω (5)

If the machine, before the addition of the dynamic vibration absorber, operates near its resonance, 11

21

2 / mk=≈ωω . Thus if the absorber is designed such that

1

1

2

22

mk

mk

==ω (6)

The amplitude of vibration of the machine, while operating at its original resonant frequency, will be zero. By defining

,1k

Fst

οδ = 1

11 m

k=ω

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

2

22 m

k=ω (7)

as the natural frequency of the absorber or auxiliary system, Equations (3) and (4) can be rewritten

1

2

2

2

2

11

2

21

11

1

kk

kk

X

st−

−+

=

ωω

ωω

ωω

δ (8)

1

2

2

2

2

11

2

2

11

1

kk

kk

X

st−

−+

=

ωω

ωωδ

(9)

Figure (3) shows the variation of the amplitude of vibration of the machine stX δ/1 with

the machine speed 1/ωω . The two peaks correspond to the two natural frequencies of the composite system. As seen before, 01 =X at 1ωω = . At this frequency, Equation (9) gives

22

12 k

Fkk

X stοδ −=−= (10)

This shows that the force exerted by the auxiliary spring is opposite to the impressed force ( )οFXk −=22 and neutralizes it, thus reducing 1X to zero. The size of the dynamic vibration absorber can be found from Equations (10) and (6):

Page 108: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

οω FXmXk −== 22

222 (11)

Thus the values of 2k and 2m depend on the allowable value of 2X . 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Ω .

0.7 0.8 0.9 1.0 1.1 1.2 1.3

Without absorber With absorber

0

4

8

12

16

20

24

2Ω1Ω

21 ωω =

201

1

2 =mm

stX δ/1

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.

Page 109: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 109/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

3

321

2 mlEIf

ππω

== (12)

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.

Page 110: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 110/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.

Page 111: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Accelerometer

Speed Control

a)- Simple Instrumentation for determining natural frequencies of a simple support beam.

Vibration Meter

h

b)- The dynamic vibration absorber as a double cantilever beam with attached masses.

ElectricMotor

Simply supported rectangularcross-section steel beam

b

m = 0.17 Kgh = 1.00 mmb = 12.00 mmE = 200 GPa

3

32mlEIf == πω

3

121 bhI =

mm

mm

l

Figure 4: - Setup of the experiment.

Page 112: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Table1 Readings

With no Absorber With Absorber

# N (rpm) Disp.

Ampl. (mm)

Vel. Ampl. (mm/s)

Acc. Ampl. (mm/s2)

Disp. Ampl. (mm)

Vel. Ampl. (mm/s)

Acc. Ampl. (mm/s2)

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

Page 113: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

King Fahd University of Petroleum & Minerals

College of Engineering SciencesMechanical Engineering Department

ME 413: System Dynamics & Control

AIR TEMPERATURE CONTROLSimulation and Experiment

Student Name:_________________________________________________________

Section#:__________________________________________________________________

Student ID#:____________________________________________________________

Date:_________________________________________________________________________

Instructor:________________________________________________________________

Page 114: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 114/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 30 C to 60 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.

( )TCV pρ TQC pρ

Figure1. Model of the heater-flow system.

Page 115: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

An energy balance yields

Heat stored = heat in - heat out (1) Replacing terms of equation (1) by their thermodynamic equivalents yields

( )p pd V C T P C QTdt

ρ ρ= − (2)

where: pC = 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:

1

p

dT QT T Pdt V VCρ

= = − +

(3)

Solving equation (3) yields

( ) ( )t t

f fT t T T e Tτ− −

= − + (4) Taking Laplace Transform of both sides of equation (3) gives:

1( ) ( )p

QsT s T s PV VCρ

= − +

Factoring and arranging in standard form then gives

1

1

pVCTQP sV

ρ = − +

(5)

which can be represented by the following block diagram?

[ ]

+1s

GK p

p τ

)(sR )(sC

)(sG)(sE

Figure 2. Simplified closed loop model

Page 116: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 116/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 pG = the steady sate gain of the heater system

pK = 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, )(sE , is first developed. The following set of equations may be written from the block diagram of Figure 2.

)()()( sCsRsE −= (6)

)()()( sCsRsE −= (7)

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

)(1)()(sG

sRsE+

= (8)

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

)(lim0

ssEesss →

= (9)

The subscript ss has been used to denote a steady-state condition. If the input is taken as a unit step function, ssR 1)( = , equation (8) may be written as

( ))(lim11

0sG

es

ss

→+

= (10)

where

[ ]

+

=1

)(sG

KsG pp τ

(11)

with proportional control only Ki and Kd are zero and equation (9) becomes

ppss GK

e+

=1

1 ………(12)

For the proportional control only condition, the closed-loop transfer function, T(s), may be written

Page 117: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

11

1)(

+

+

+=

sGK

GKGK

sT

pp

pp

pp

τ ………(13)

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

Page 118: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 118/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 30 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%.

Page 119: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 119/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 30 C to 60 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?)

Page 120: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 120/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

Page 121: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 121/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.

Page 122: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

King Fahd University of Petroleum & Minerals

College of Engineering SciencesMechanical Engineering Department

ME 413: System Dynamics & Control

Student Name:_________________________________________________________

Section#:__________________________________________________________________

Student ID#:____________________________________________________________

Date:_________________________________________________________________________

Instructor:________________________________________________________________

Simulation: Liquid Level SystemsExperiment: Coupled Tanksi) Basic Tests and Transducer Calibrationii) Open and Closed Loop Systems

Page 123: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 123/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,

sR

/mm

rate flowin Changedifference levelin Change Resistance 3≡=

hH +

iqQ +

R ResistanceοqQ +

Control valve

C eCapacitanc

valveLoad

Figure 1. Liquid level system For laminar flow; ( 2000Re < ), the relationship between the steady-state flow rate and steady- state head at the level of restriction is given by

HKQ l= where

Page 124: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Q = steady-state liquid flow rate, s/m3

lK = constant, s/m 2 H = steady-state head, m Then

QH

KQHR

ll ===

1dd

For turbulent flow; ( 3000Re > ), the steady-state flow rate is given by

HKQ t= where Q = steady-state liquid flow rate, s/m3

tK = constant, s/m2.5 H = steady-state head, m The resistance tR for turbulent flow is obtained from

QHRt d

d=

Then

QH

HQH

QH

HK

HQH

HK

Q tt 2)/(

2dd

2ddd

2d ==⇒=⇒=

Thus

QHRt

2=

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

23

mor mm

headin Changestored liquidin Change eCapacitanc ≡=C

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

Page 125: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 125/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 iq while the output flow is .οq

1h

iq

2C

2h1R 2R

οq

Inflow

1q

1C

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 )(sQi to the output )(sQο .

4. If in normalized units, ,121 == CC ,121 == RR and ,121 == hh plot )(2 th and )(tqο for the following cases: a. )(tqi is a unit step input b. )(tqi is an impulsive input

5. Repeat question (4) for the case where ,5.021 == CC ,221 == RR and .121 == hh Compare the resulting responses to the previous ones.

6. In each of the previous cases, obtain the steady state value )(2 th and )(tqο .

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

Page 126: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

PART II: Experiment

1) Basic Tests and Transducer Calibration 2) Open and Closed Loop Systems

Page 127: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 128: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 129: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 130: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 131: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 132: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 133: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 134: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 135: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 136: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 137: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 138: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 139: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 140: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 141: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 142: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 143: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 144: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 145: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 146: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 147: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 148: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

King Fahd University of Petroleum & Minerals

College of Engineering SciencesMechanical Engineering Department

ME 413: System Dynamics & Control

Simulation: PID ControllersExperiment: Coupled Tanksi) PI Controller Tuning 1 :Hand Tuning of Single Tankii) PI Controller Tuning 2 :Hand Tuning of Double Tank

Student Name:_________________________________________________________

Section#:__________________________________________________________________

Student ID#:____________________________________________________________

Date:_________________________________________________________________________

Instructor:________________________________________________________________

Page 149: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 149/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

atmmm iKbJ =+ θθ (1) and

aaaa

ame viRdtdi

LK =++θ (2)

In the above, the input is the voltage av and the output is the shaft speed .mθ

1. Define the output to be ( )my θ= , write equations (1) and (2) based on this assumption.

2. Write the transfer function in the form

( )( )ssA

sVsYsG

a 21 11)()()(

ττ ++== (3)

where )(sY and )(sVa are the Laplace transform of )(ty and )(tva . The quantities A, 1τ and 2τ are constants to be determined. Note that if 0=b and

aL is small then aRL /22 =τ is called the electrical time constant while

mtma KKJR /1 =τ is called the mechanical time constant.

Page 150: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

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

Controller Y(s)Referencespeed, R(s)

Motor

( )( )ssA

21 11 ττ ++

)(sVa

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 ( )my θ= .

_+ Controller Y(s)Referencespeed, R(s)

Motor

( )( )ssA

21 11 ττ ++

)(sVa

Sensor

11

Y(s)

)(sEa

Figure 2. Feedback speed control system.

The controller in Figure 2 is an electronic device whose input is the error signal given by

)()()( sYsRsE −= (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 aV , which is the input to the motor. For a specific motor, it was found that: 10sec,600/1sec,60/1 21 === Aττ and ( ) ),(1*100 ttr = where )(1 t is the unit step function.

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

( ) ( )( ) p

a

ac K

sEsV

sG == (5)

find the closed loop transfer function )(/)( sRsY . By using MATLAB plot the response y(t) for 5,1 == pp KK and 10=pK . Compare the three plots, and

write your remarks when pK increases (in terms of overshoot, settling time, rise time, steady state error …etc).

Page 151: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

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

( ) ( )( )

+==

sTK

sEsV

sGi

pa

ac

11 (6)

find the closed loop transfer function )(/)( sRsY . By using MATLAB plot the response y(t) for 01.0,005.0,5 === iip TTK and 02.0=iT . Compare the three

plots, and write your remarks when iT increases and pK 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

( ) ( )( )

++== sT

sTK

sEsV

sG di

pa

ac

11 (7)

find the closed loop transfer function )(/)( sRsY . By using MATLAB plot the response y(t) for ,01.0,5 == ip TK and 0004.0,0002.0 == dd TT and 004.0=dT

Compare the three plots, and write your remarks when dT increases and

pK and iT 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 sse , 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);

Page 152: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 152/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

Page 153: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 153/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

Page 154: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 155: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 156: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 157: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 158: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 159: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 160: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 161: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 162: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 163: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 164: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

King Fahd University of Petroleum & Minerals

College of Engineering SciencesMechanical Engineering Department

ME 413: System Dynamics & Control

Simulation: Steady State Error and System TypeExperiment: Servo Traineri) Response Calculating and Measurementsii) Proportional Control of Servo Trainer Speed

Student Name:_________________________________________________________

Section#:__________________________________________________________________

Student ID#:____________________________________________________________

Date:_________________________________________________________________________

Instructor:________________________________________________________________

Page 165: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 165/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).

C(s)R(s) _+ )(sGE(s)

H(s)

Figure 1. Unity feedback system. The closed-loop transfer function is

)(1)(

)()(

sGsG

sRsC

+=

The error of the closed loop system is

)(1)()()()(sG

sRsCsRsE+

=−=

Using the final value theorem, we have

Page 166: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

)(1)(lim)(lim)(lim

00 sGssRssEtee

sstss +===

→→∞→

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

Type

-0 sy

stem

Type

-1 sy

stem

Type

-2 sy

stem

)(lim0

sGKsp →

= )(lim0

ssGKsv →

= )(lim 2

0sGsK

sa →=

c(t)

t

∞=sse

vss K

Ae =

c(t)

t

tAtr =)(

0=sse

t

c(t)

∞=sse

c(t)

t

∞=sse

t

c(t)

ass K

Ae =

c(t)

t

2

21)( tAtr =

pss K

Ae+

=1

c(t)

t

Atr =)(

0=sse

t

c(t)

0=sse

c(t)

t

Page 167: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

PROBLEM 1 Given the unity feedback control system of Figure 1, where

( )assKsG+

=)(

find the following:

a. K and a to yield 1000=vK 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:

C(s)R(s) _+_+ ( )11

2 +ss ( )31

2 +ss

s/1

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

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

2 ++

sssK

( )34

++

ss

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.

Page 168: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

PART II: Experiment

1) Response Calculating and Measurements 2) Proportional Control of Servo Trainer Speed

Page 169: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 170: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 171: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 172: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 173: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 174: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 175: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 176: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 177: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 178: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 179: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 180: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 181: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

King Fahd University of Petroleum & Minerals

College of Engineering SciencesMechanical Engineering Department

ME 413: System Dynamics & Control

ROOT LOCUS

Student Name:_________________________________________________________

Section#:__________________________________________________________________

Student ID#:____________________________________________________________

Date:_________________________________________________________________________

Instructor:________________________________________________________________

Page 182: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 182/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.

K G(s)

H(s)

C(s)R(s)_+

Figure 1. Control system for root locus.

The closed-loop transfer function for this system is

)()(1)(

)()()(

sHsKGsKG

sRsCsT

+== (1)

In general, the open loop transfer function is given by

( )( ) ( )( )( ) ( )n

m

pspspszszszsK

sHsKG++++++

=......

)()(21

21 (2)

Page 183: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 183/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

0)()(1 =+ sHsKG (3)

or 1)()( −=sHsKG (4)

Therefore

( )( ) ( )( )( ) ( ) K

zszszspspsps

m

n −=++++++

......

21

21 (5)

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:

zeros finite from lengths vector ofProduct polesfinitefromlengthsvector ofProduct

=K (6)

Angle Criterion: From equation (5),

[ ] πφ )12()()( +== sHsKGangle , =0, 1, 2, 3, (7)

which can be expressed in the form

( ) ( )......)12( 321321 +++−+++=+= pppzzz φφφφφφπφ (8)

or

( ) ( )∑∑ −=+= poles of angles zeros of anglesπφ )12( (9)

ROOT LOCUS RULES SUMMARY

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

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:

Page 184: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

( ) ,...,2,1,0,12=

−+

=zp nnπθ

7. Intersection of the asymptotes:

zp

n

i

n

iii

nn

zpp z

−=∑ ∑= =1 1σ

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:

( ) 0)()( =sHsGdsd

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

( )( )( ) 12198431)()( 23 +++

=+++

=sss

Ksss

KsHsG

Page 185: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

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

SOLUTION

1. Poles are 4 and,3,1 −=−=−= sss . Therefore, the number of poles 3=pn ,

while the number of zeros 0=zn . 2. The root loci on the real axis are to the left of an odd number of finite poles

and zeros. 3. Because 3=pn , there are 3 branches each one starts at )0( =K and ends at

)( ∞=K . 4. The asymptotes intersect on the real axis at

667.203

0)431(1 1 −=−

−−−−=

−=∑ ∑= =

zp

n

i

n

iii

nn

zpp z

σ

5. The angle of asymptotes

( ) ( )

⇒−=+≡=−=−≡=

≡=≡=

=+

=−+

=

repeated isit because here stop603/23/7603/5

180603/

31212

3

2

1

0

ο

ο

ο

ο

πππθππθ

πθπθ

ππθzp nn

6. Breakaway point on the real axis is given by

012198d

ddd

23 =

+++−=

sssK

ssK

The roots of this equation are 55.31 −=s and 78.12 −=s but 55.3−=s is not part of the root -locus for K>0, therefore the breakaway point is at 78.1−=s 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

( )

rad/sec36.436.4

0140128 2

=⇒±=⇒

=++

ωjs

s

8. The root locus sketch is shown in Figure 2 4. MATLAB PROGRAM

The following lines

Page 186: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

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

produce the graph shown in Figure 3.

ωj

σo

-1-2-3-4-6 -5 10 2 3 4

-2.66 -1.78

36.4=ω

36.4−=ω

0=K0=K0=K

Figure 2. Root –locus sketch

Page 187: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

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

-3

-2

-1

0

1

2

3

4

Real Axis

Imag

Axi

s

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

( )( )( )432)1()()(

++++

=ssss

sKsHsG

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

Page 188: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

PART II: The Ball Beam Apparatus Basic Tests and Familiarization

Page 189: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 190: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 191: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 192: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 193: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 194: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 195: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 196: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 197: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

King Fahd University of Petroleum & Minerals

College of Engineering SciencesMechanical Engineering Department

ME 413: System Dynamics & Control

Simulation: Frequency ResponseAnalysis: Bode Plot

Experiment: The Ball & beam

Student Name:_________________________________________________________

Section#:__________________________________________________________________

Student ID#:____________________________________________________________

Date:_________________________________________________________________________

Instructor:________________________________________________________________

Page 198: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 198/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 )()()( sRsGsC = with ).sin()( tAtr ω= We have

22)(ωω+

=s

AsR (1)

and

∏=

+== n

iips

smsqsmsG

1

)(

)()()()( (2)

Then, in partial fraction form,

.)(

...)(

)( 221

1

ωβα

++

++

+++

=s

sps

kps

ksC

n

n (3)

If the system is stable, then all ip have negative nonzero real parts and

∞→tlim L ( )[ ] 0/1 =+−

ii psk (4)

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

[ ]

[ ])(sin)(

)(sin)(1

)( 221

ωω

ωωωω

ωβα

Φ+=

Φ+=

++

= −

tjwGA

tjwGA

ssLtc

(5)

Page 199: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

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

)()()( ωωω Φ∠= jGjG (6)

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

)()()(Im)(Re)( ωωωωω jjXjRjGjjGjG +=+= (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 )( ωjG . 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

dB

=

=

οο XX

XX log20log10

2

(8)

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 1f to 2f such that 10/ 12 =ff . Thus the frequency band from 3.01 =f cps to 0.31 =f cps is one decade, and the frequency band from 10 cps to 100 cps is also one decade. The number of decades from 1f to

2f is ( )./log 12 ff 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 )( ωjG in decibels versus the logarithm of ,ω the frequency.

)(log20)( ωω jGjGdB= (9)

The second graph of a Bode plot shows the phase function )(ωΦ versus the logarithm of .ω

)()( ωω jG∠=Φ (10)

Page 200: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 200/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 )( ωjG in the Bode plot is expressed in dB, product and division factors in )( ωjG 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 )( ωjG 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 dB

jG )( ω 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, ,MGω where

the phase angle is ο180 . At this frequency look at the magnitude plot to determine the gain margin, MG , 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,

,MΦω where the gain is 0 dB. On the phase curve at that frequency, the phase

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

Magnitude(dB)

0 dB

MG

ω

Gainplot

Phaseplot

Phase (degrees)

ο180MGωMΦω

Gaincrossover

Phasecrossover

ω

Figure 1. Gain and phase margins on the Bode diagrams

Page 201: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 201/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 )( ωjG in decibels versus ω and a separate semi-logarithmic plot of the phase angle

[ ])(arg ωjG 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

Page 202: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 202/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.

Page 203: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

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

Description

Transfer Function )( ωjG Corner Frequency (rad/s)

Magnitude dB

jG )( ω Phase )( ωjG∠

Constant gain: K None = 20 log K 0,1800,0<

>

KKο

ο

Poles or zeros at the origin of order p

pj ±)( ω None

= 0 for 1=ω , Straight lines of constant slope

p20± dB/dec

ο90×± p

Simple pole )1/(1 +ωτj τ/1 Straight line of 0 dB/dec for ,/1 τω < Straight line of slope –20 dB/dec for

τω /1> )(tan 1 ωτ−−

Real zero 1+ωτj τ/1 Straight line of 0 dB/dec for ,/1 τω < Straight line of slope 20 dB/dec for

τω /1> )(tan 1 ωτ−

Conjugate poles 2

2

)()(21nn

n

jωω

ωωξ

ω

−+

nω Straight line of 0 dB/dec for ,nωω < Straight line of slope – 40 dB/de for

nωω >

−− −

2

1

)(1

)(2tan

n

n

ωωωωξ

Conjugate zeros

−+ 2

2 )()(211

nnn

jωω

ωωξ

ω nω

Straight line of 0 dB/dec for ,nωω <

Straight line of slope 40 dB/de for nωω >

2

1

)(1

)(2tan

n

n

ωωωωξ

Page 204: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

ILLUSTRATIVE EXAMPLE: Draw by hand the Bode plot for the transfer function

)642.3)(5.0()2(64)( 2 +++

+=

ssssssG

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 )(sG in the standard form

)64/05.01)(21()2/1(64)( 2ssss

ssG+++

+=

2. Substitute ωjs = in )(sG

( )2

4(1 0.5 )( )( )(1 2 ) 1 2 0.2( / 8) ( / 8)

jG jj j j

ωωω ω ω ω

+=

+ + × −

3. The factors of this transfer function in order to their occurrence as frequency increases are:

* Constant gain, K = 4, * Zero at 2−=s ; corner frequency 25.0/12 ==ω

* Pole at origin, ωj/1 , * Pole at 5.0−=s ; corner frequency 5.02/11 ==ω *

Pair of complex conjugate poles with ;8,2.0 == nωξ corner frequency 83 =ω

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

( )2

4(1 0.5 )( )( )(1 2 ) 1 2 0.2( / 8) ( / 8)

jG jj j j

ωωω ω ω ω

+=

+ + × −

Factor Corner Frequency (rad/s)

Asymptotic log-magnitude Characteristic

Phase angle characteristic

4 None 20 log 4=12.04 ο0

ωj/1 None Straight line of constant slope –20

dB/dec passing through 1=ω

ο90−

)21/(1 ωj+ 5.02/11 ==ω Straight line of 0 dB/dec for ,1ωω < Straight line of slope – 20 dB/dec for

1ωω > )2(tan 1 ω−−

ω5.01 j+ 25.0/12 ==ω Straight line of 0 dB/dec for ,2ωω < Straight line of slope 20 dB/dec for

)5.0(tan 1 ω−

Page 205: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

2ωω >

2)8

()8

(2.021

1ωω

−×+ j

2.0

83

==

ξω

Straight line of 0 dB/dec for ,3ωω < Straight line of slope – 40 dB/de for

3ωω >

−− −

2

1

)8

(1

)8

(4.0tan

ω

ω

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

20 dB/dec−

40 dB/dec−

20 dB/dec−

60dB/dec−

Figure 2. Bode plot of ( )2

4(1 0.5 )( )(1 2 ) 1 2 0.2( / 8) ( / 8)

jG jj j j

ωωω ω ω ω

+=

+ + × −

6. Construct the phase versus ω by adding each of the previous phase factors, i.e.,

)()( ωω jG∠=Φ = ο90− )2(tan 1 ω−− + )5.0(tan 1 ω−

−− −

2

1

)8

(1

)8

(4.0tan

ω

ω

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

,ω and then plot the obtained values.

Page 206: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 206/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.

Page 207: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

ME 413: System Dynamics and Control 207/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

)15.05.0)(2()3(10)( 2 +++

+=

ssssssG

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

Page 208: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

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

Manual Control of Ball Position

Page 209: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 210: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 211: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 212: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 213: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 214: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 215: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 216: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 217: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 218: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 219: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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

Page 220: System Dynamic & Control Manual - TUC · 2011-08-04 · ME 413: System Dynamics and Control 4/220 Laboratory Manual ACKNOWLEDGMENT The efforts of Angry. Ahmed A. Abdulnabi in setting

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