Lab Experiment 11
Lab Experiment 11
Objectives: The objectives of this lab are to analyze the stability of the system with RouthHurwitz 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 or oscillates 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. 1 Mathematically, when () = then () = (), so for a system to be stable the a + has 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 cannot find their exact coordinates in s-plane. Generating Routh Table Consider 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
Page 87
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 that the number of roots of the polynomial that are in the right half-plane is equal to the number of sign changes in the first column.
Control Systems Lab (EE 360 L) Page 88
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 the right 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 Column If 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, after which 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.
T ( s) =
10 s + 2 s + 3s 3 + 6 s 2 + 5s + 3
5 4
Table 11.4b shows the first column of Table 11.4a, along with the resulting signs for a choice of positive and negative.
Page 89
Conclusion: We can see, if we choose positive or negative, Table 11.4b will show two sign changes for both conditions. Hence, the system is unstable and has two poles in the right half-plane. Entire Row is Zero We 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.
T (s) =
10 s 5 + 7 s 4 + 6 s 3 + 42 s 2 + 8s + 56
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.
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 the entries in that row as coefficients. The polynomial will start with the power of s in the label column and continue by skipping every other power of s. Thus the polynomial formed for this example is () = 4 + 6 2 + 8. 2. Next, we differentiate the polynomial with respect to s and obtain () = 3 + 12 + 0 3. 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 the jw-axis. If we do not have a row of zeros, we cannot possibly have jw roots.
Page 91
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:
%========================================================================== % Routh-Hurwitz Stability Criterion %========================================================================== clc; disp(' ') D=input('Input coefficients of characteristic equation, i.e:[an an-1 an-2 ... a0]= '); L=length (D); disp(' ') disp('----------------------------------------') disp('Roots of characteristic equation are: '), disp(roots(D)); %%=======================Program Begin==========================
% --------------------Begin of Building array-----------------------------if mod(L,2)==0 m=zeros(L,L/2); [rows,cols]=size(m); for i=1:cols m(1,i)=D(1,(2*i)-1); m(2,i)=D(1,(2*i)); end else m=zeros(L,(L+1)/2); [rows,cols]=size(m); for i=1:cols m(1,i)=D(1,(2*i)-1); end for i=1:((L-1)/2) m(2,i)=D(1,(2*i)); end end for j=3:rows if m(j-1,1)==0 m(j-1,1)=0.001; end for i=1:cols-1 m(j,i)=(-1/m(j-1,1))*det([m(j-2,1) m(j-2,i+1);m(j-1,1) m(j1,i+1)]); end end disp('--------The Routh-Hurwitz array is:--------'),disp(m); % --------------------End of Bulding array--------------------------------
Page 92
% Checking for sign change signMat=sign(m);a=0; for j=1:rows a=a+signMat(j,1); end if a==rows disp(' ----> System is Stable <----') else disp(' ----> System is Unstable <----') end % Calculating Number of Sign Changes rhpPoles=0; for k=1:rows-1, if(signMat(k,1)~=signMat(k+1,1)), rhpPoles=rhpPoles+1; end end
disp(sprintf('--> There are %2d Poles in Right Half Plane <-- ',rhpPoles)) %=======================Program Ends=======================================
Example 5: Write a Matlab Code to find the stability of the following system. 0 = 2 10 = [1 3 8 5 1 10 + 0 1 2 0 3 8 5 1 1 2 10 and = 0 0
= [1
0 Where = 2 10
0 0]
0 0] and = [0]
Page 93
MATLAB Code:
%========================================================================== % State Space Stability Criterion %+++++++++++++++++++++++++++++++++++++++++++++++++ % May.16.2012, + % Engr. Hassaan Haider + % [email protected] + % Dept of Electronic Engineering + % Faculty of Engineering and Technology + % International Islamic University, Islamabad + %+++++++++++++++++++++++++++++++++++++++++++++++++ clc; clear all; disp(' ') A=input('Input the System Matrix A,i.e:[a11 a12; a21 a22]= '); [rows,cols]=size(A); disp(' ') disp('----------------------------------------') disp('Eigen Values (Poles) of the System Matrix are: '), eigVal=eig(A); disp(eigVal);
% Checking for Signs temp=0; for j=1:rows, if(real(eigVal(j))<0); temp=temp+1; end end if temp==rows disp(' ----> System is Stable <----') else disp(' ----> System is Unstable <----') end %=======================Program Ends=======================================
Page 94
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. () 100 = 4 () + 3 3 + 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.
P ( s ) = 3s 7 + 9 s 6 + 6 s 5 + 4 s 4 + 7 s 3 + 8 s 2 + 2 s + 6
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 is stable or not?
Page 95