1

Lecture 20 State Space Representation of Transfer Functions

The state space approach to feedback control systems is central to a graduate level course in feedback control systems. It is often referred to as ‘modern control’. This approach is based on elements of linear algebra (involving matrices, vectors, eigenvalues, eigenvectors, etc.). This approach is essential in relation to complex systems that have many inputs and/or outputs. However, if the student is not sufficiently grounded in an understanding of basics, such as time constants, damping, and transfer functions with associated poles/zeros, then the advanced mathematics of modern control will likely detract from gaining such an understanding.

Example 1. Aircraft small perturbation lateral dynamics are described by [see (5.35) p.195]:

(1a)

Consider a general aviation plane at speed whose lateral dynamics described by (1a) are:

and (1b)

(a)Use Matlab to find the eigenvalues of (1b), and identify each mode.

Solution: Using the Matlab command ‘eig(A)’ gives:

s1= -8.4322 Roll ; s2,3= -0.4845 +/- 2.3329i Dutch Roll ; s4=-0.0088 Spiral

(b)For each mode, obtain numerical values for the related dynamic parameters.

Solution: mode 1:s1= -8.4322. Hence, mode 2:s4= -.0088. Hence,

mode #3:. Hence,

We have , where . Hence, . Hence, .


(c) Obtain plots of all four responses to a 2-second pulse rudder input (over a total time T=0:.01:200sec).

Solution:

(c)Use the ss2tf command to obtain the 4 transfer functions for input

Num =

0 0 -0.2200 10.4268 3.2550

0 23.1600 23.8734 112.0337 0

0 0.2200 -6.2030 -1.5645 19.3523

0 0 23.1600 23.8734 112.0337

Den = 1.0000 9.4100 13.9305 47.9942 0.4216

For example:

(d)Based on your answers in (c), what might you pursue to better appreciate the structure of the transfer function?

ANSWER: ???

Example 2. Consider a plant with transfer function .

(a) Recover the differential equation, and then define the state vector . Derive the expressions for a state space realization related to the state equation and the output equation .

Solution: gives: . Also: . So we can write: . Then:.

Hence, .

(b) Use the Matlab command ‘ss2tf’ in relation to to verify that it, indeed, has the given transfer function.

Solution: A=[-1,-25;1,0];B=[5;0]; C=[0,1]; D=0; [num,den]=ss2tf(A,B,C,D,1)

num =[00 5] den =[1 1 25]. Verified 

(c) Use the Matlab command ‘tf2ss’ to arrive at the .

Solution: This command gives .

(c) You should have found that your expressions are ; whereas you should have found the Matlab expressions to be . It should be clear that Matlab defaults to the controller canonical form [See (7.13) on p.446 in the book.]

(e) Explain the difference between the two forms in terms of the state initial condition problem.

Answer: The solution to the initial condition problem (i.e. u=0) the state equation and output equation is obtained from , and Hence, and . Both and will give the same answer. Specifically,, and . The only way this is possible is if the state vector associated with is .

In summary, there are many equivalent representations of . It is important to understand what the underlying state is for a chosen representation.

Remark. It is little things, like this, that highlight the need for understanding concepts before using Matlab commands.

State Space Representations of Block Diagrams [Book p.442]

Example3. [(7.9) on p.445]

Let with the sequence of block diagram representations in Figure 1.

Figure 1. Sequence of block diagrams to arrive at the block diagram of the controller canonical form.

From the final block diagram in Figure 1 we have the following equations:

and .

Let and . Then these equations become:

and .

The equivalent time-domain equation are:

and .

These, in turn, lead to the state space equations:

and .

Matlab:

> a=[1 7 12]; > b=[1 2]; > G=tf(b,a) = ( s + 2 ) / (s^2 + 7 s + 12 )

> [A,B,C,D]=tf2ss(b,a); A =[ -7 -12 ; 1 0]; B =[1; 0]; C =[ 1 2]; D = 0

Notice that, per the remark in part (e) of Example 2, this is the controller canonical form. To solve the initial condition problem, you would need to use ]; B =[1; 2] and C =[ 1 0].

Generalization of the controller canonical state space representation:

For the single-input/single-output transfer function, the controller state space representation for this single-input/single-output system is:

and .

[Note:These equations are (7.13) on p.446 in the book.]

Remark 2. There are many other state space representations for a given system. The book covers them in detail. In this course we will not pursue them in such detail. Nonetheless, it is important to be aware that a given system can be represented in different ways.

Appendix Matlab Code

%PROGRAM NAME: lec20.m

%EXAMPLE 1

%(c)

A=[-.25 0 -1 .18; -16.02 -8.4 2.19 0; 4.49 -.35 -.76 0; 0 1 0 0];

B=[.07 0;-29.01 23.16; 4.55 .22; 0 0];

C = eye(4); D=zeros(4,2);

sys=ss(A,B,C,D);

T=0:.01:200; nT=length(T);

T1=0:.01:2; nT1=length(T1);

U1 = zeros(nT,1);

U2 =[(10*pi/180)*ones(nT1,1);zeros(nT-nT1,1)];

U=[U1 , U2];

lsim(sys,U,T)

grid

%(d)

G=ss2tf(A,B,C,D,2)