Lab Experiment 11

download Lab Experiment 11

of 10

Transcript of Lab Experiment 11

  • 7/30/2019 Lab Experiment 11

    1/10

    International Islamic University, IslamabadFaculty of Engineering and Technology

    Department of Electronic Engineering

    CONTROL SYSTEMS LAB

    LAB EXPERIMENT # 11: Stability Analysis using MATLAB

    Name of Student:

    Registration No.:

    Section:

    Date of Experiment:

    Report submitted on:

    Marks obtained:

    Remarks:

    Instructors Signature: ...

  • 7/30/2019 Lab Experiment 11

    2/10

    Lab11: Stability Analysis using MATLAB

    Control Systems Lab (EE 360 L) Page 87

    Lab Experiment 11: Stability Analysis using MATLAB

    Objectives: The objectives of this lab are to analyze the stability of the system with Routh-Hurwitz criterion when transfer function of the system is known. How can we check the

    stability of the system when its State Space Model is given?

    Stability Analysis Overview:

    If the total response of an LTI system is() = () + (),then the system will be stable if() 0, when An LTI system will be unstable if() grows without bound as time approaches to infinity.LTI system will be marginally stable if() neither decay nor grows but remain constant oroscillates as time approaches to infinity. If the natural response of the LTI system approaches

    to zero as time goes to zero then the system will be Stable.

    How do we determine that the system is stable? If all closed loop pole is in left half plane,then the system will be stable, and if the closed loop pole is in right half plane, then the

    system will be unstable. The system will be marginally stable if the closed loop lies at the

    imaginary axis of s-plane. We will check the stability of the system using Routh-Hurwitz

    Criterion and State Space method.

    Mathematically, when () = 1+ then() = (), so for a system to be stable the ahas to be a positive number only then the pole will be on left half plane and exponential will

    decay with time .Routh-Hurwitz Criterion:

    By this method we can find the number of poles in each section of the s-plane, but we cannotfind their exact coordinates in s-plane.

    Generating Routh TableConsider the closed-loop transfer function of a system is given by

    We first create the initial layout for Routh table shown in Table 11.1below

    Table 11.1: Routh Table

  • 7/30/2019 Lab Experiment 11

    3/10

    Lab11: Stability Analysis using MATLAB

    Control Systems Lab (EE 360 L) Page 88

    The complete Routh Table is shown in Table 11.2 below:

    Table 11.2: Complete Routh Table

    Example 1:Now consider the closed loop system given in Figure 11.3 (a). Create a Routh

    Table for the system shown in Figure 11.3(a) and analyze its stability.

    Figure 11.3: Closed Loop System

    Solution:First, we have to find the equivalent closed-loop system because we want to test

    the denominator of this function. Using feedback formula, we obtain the equivalent system

    in Figure 11.3(b). Then we create the initial layout of Routh table and Table 11.3 is the

    completed Routh table.

    Table 11.3: Complete Routh Table of Example 1

    Interpreting the Basic Routh Table

    The Routh-Hurwitz criterion declares thatthe number of roots of the polynomial that are inthe right half-plane is equal to the number of sign changes in the first column.

  • 7/30/2019 Lab Experiment 11

    4/10

    Lab11: Stability Analysis using MATLAB

    Control Systems Lab (EE 360 L) Page 89

    If the closed-loop transfer function has all poles in the left half of the s-plane, the system is

    stable. Thus, a system is stable if there are no sign changes in the first column of the Routh

    table.

    For example, Table 11.3 has two sign changes in the first column. The first sign change

    occurs from 1 in the s2 row to 72 in the s1 row. The second occurs from 72 in the s1 row to

    103 in the s0

    row. Thus, the system of Figure 11.1(a) is unstable since two poles exist in theright half of the s-plane.

    Routh-Hurwitz Criterion: Special Cases

    Two special cases can occur:

    The Routh table sometimes have a zero only in the first column of a row. The Routh table sometimes will have an entire row that consists of zeros.

    Zero Only in the First ColumnIf the first element of a row is zero, division by zero would be required to form the next row.

    To avoid this phenomenon, an epsilon, is assigned to replace the zero in the first column.The value is then allowed to approach zero from either the positive or negative side, afterwhich the signs of the entries in the first column can be determined.

    Example 2: Determine the stability of the closed-loop transfer function given below.

    35632

    10)(

    2345+++++

    =

    ssssssT

    Solution: The completed Routh table is shown in Table 11.4a.

    Table 11.4a: Routh Table for Example 3

    Table 11.4b shows the first column of Table 11.4a, along with the resulting signs for a

    choice of positive and negative.

  • 7/30/2019 Lab Experiment 11

    5/10

    Lab11: Stability Analysis using MATLAB

    Control Systems Lab (EE 360 L) Page 90

    Table 11.4b: Routh Table 1st

    columns sign with + and Conclusion: We can see, if we choose positive or negative, Table 11.4b will show twosign changes for both conditions. Hence, the system is unstable and has two poles in the right

    half-plane.

    Entire Row is ZeroWe will now look at the special case. Sometimes while making Routh table, we find that an

    entire row consists of zeros because there is an even polynomial that is a factor of the

    original polynomial. This case must be handled differently from the case of a zero in only

    first column of a row. Let us look at an example that demonstrates how to construct and

    interpret the Routh table when an entire row of zeros is present.

    Example 3: Determine the number of right-half-plane poles in the closed-loop transfer

    function.

    5684267

    10)(

    2345+++++

    =

    ssssssT

    Solution:Start by forming the Routh Table shown in Table 11.5 for the denominator of T(s). We stop

    at 3rd

    row, since the entire row consists of zeros, and the use the following procedure.

    Table 11.5: Routh Table of Example 5

  • 7/30/2019 Lab Experiment 11

    6/10

    Lab11: Stability Analysis using MATLAB

    Control Systems Lab (EE 360 L) Page 91

    At the second row, we multiply through by 1/7 for convenience.

    At third row, we can see that the entire row consists of zeros, so we use the following

    procedure:

    1. Return to the row above the row of zeros, form the auxiliary polynomial using theentries in that row as coefficients. The polynomial will start with the power ofs inthe label column and continue by skipping every other power ofs. Thus the

    polynomial formed for this example is () = 4 + 62 + 8.2. Next, we differentiate the polynomial with respect to s and obtain() = 3 + 12 + 03. Finally, we use the coefficients of this differentiate equation to replace the row of

    zeros.

    4. For convenience, we multiplied the third row by 1/4.There are no right-half-plane poles. For the case of zeros row, some of the roots could be on

    thejw-axis. If we do not have a row of zeros, we cannot possibly havejw roots.

  • 7/30/2019 Lab Experiment 11

    7/10

    Lab11: Stability Analysis using MATLAB

    Control Systems Lab (EE 360 L) Page 92

    Example 4: Write a Generic Matlab Code that takes the characteristic polynomial of system

    as an input and display the Roots, Routh Table, number of poles in right half plane and

    Systems stability.

    Solution:%==========================================================================% Rout h- Hur wi t z St abi l i t y Cr i t er i on%==========================================================================

    cl c; di sp( ' ' ) D=i nput ( ' I nput coef f i ci ent s of char acter i st i c equat i on, i . e: [ an an- 1 an- 2. . . a0] = ' ) ; L=l ength ( D) ;

    di sp( ' ' ) di sp( ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ' ) di sp( ' Root s of char acteri st i c equat i on ar e: ' ) , di sp( r oot s(D) ) ;

    %%=======================Pr ogr am Begi n==========================

    % - - - - - - - - - - - - - - - - - - - - Begi n of Bui l di ng ar r ay- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    i f mod( L, 2) ==0m=zeros( L, L/ 2) ; [ r ows, col s] =si ze( m) ; f or i =1: col s

    m( 1, i ) =D( 1, ( 2*i ) - 1) ; m( 2, i ) =D( 1, ( 2*i ) ) ;

    endel se

    m=zeros( L, ( L+1) / 2) ; [ r ows, col s] =si ze( m) ; f or i =1: col s

    m( 1, i ) =D( 1, ( 2*i ) - 1) ; endf or i =1: ( ( L-1) / 2)

    m( 2, i ) =D( 1, ( 2*i ) ) ; end

    end

    f or j =3: r ows

    i f m( j - 1, 1) ==0m( j - 1, 1) =0. 001;

    end

    f or i =1: col s- 1m( j , i ) =( - 1/ m( j - 1, 1) ) *det ( [ m( j - 2, 1) m( j - 2, i +1) ; m( j - 1, 1) m( j -1, i +1) ] ) ;

    endend

    di sp( ' - - - - - - - - The Routh- Hurwi tz arr ay i s : - - - - - - - - ' ) , di sp( m) ; % - - - - - - - - - - - - - - - - - - - - End of Bul di ng ar r ay- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

  • 7/30/2019 Lab Experiment 11

    8/10

    Lab11: Stability Analysis using MATLAB

    Control Systems Lab (EE 360 L) Page 93

    % Checki ng f or si gn changesi gnMat =si gn( m) ; a=0; f or j =1: r ows

    a=a+si gnMat ( j , 1) ; endi f a==r ows

    di sp( ' - - - - > System i s St abl e Systemi s Unstabl e Ther e ar e %2d Pol es i n Ri ght Hal f Pl ane

  • 7/30/2019 Lab Experiment 11

    9/10

    Lab11: Stability Analysis using MATLAB

    Control Systems Lab (EE 360 L) Page 94

    MATLAB Code:

    %==========================================================================% St at e Space St abi l i t y Cr i t er i on%+++++++++++++++++++++++++++++++++++++++++++++++++% May. 16. 2012, +

    % Engr . Hassaan Hai der +% hassaan. hai der @i i u. edu. pk +% Dept of El ect r oni c Engi neer i ng +% Facul t y of Engi neer i ng and Technol ogy +% I nt er nat i onal I sl ami c Uni ver si t y, I sl amabad +%+++++++++++++++++++++++++++++++++++++++++++++++++

    cl c; cl ear al l ; di sp( ' ' ) A=i nput ( ' I nput t he System Mat r i x A, i . e: [ a11 a12; a21 a22] = ' ) ; [ r ows, col s] =si ze( A) ;

    di sp( ' ' )

    di sp( ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ' ) di sp( ' Ei gen Val ues ( Pol es) of t he Syst em Mat r i x ar e: ' ) , ei gVal =ei g( A) ; di sp( ei gVal ) ;

    % Checki ng f or Si gnst emp=0; f or j =1: r ows,

    i f( r eal ( ei gVal ( j ) )

  • 7/30/2019 Lab Experiment 11

    10/10

    Lab11: Stability Analysis using MATLAB

    Control Systems Lab (EE 360 L) Page 95

    Exercises

    Exercise 1: Write a Matlab Code to generate the Routh Table. Also state whether the system

    is stable or unstable and number of poles on R.H.S. of the S-Plane.

    ()() = 1004 + 33 + 2 + 3

    Exercise 2: Make a Routh table and tell how many roots of the following characteristic

    polynomial are in the right half-plane and in the left half-plane.

    62874693)( 234567 +++++++= ssssssssP

    Exercise 3: Derive the state space and output equation for the series RLC Circuit. Take any

    values of R, L and C. Take as input and as output. Determine whether the system isstable or not?