You are on page 1of 24

State Space System Representation

4. STATE SPACE SYSTEM REPRESENTATION


4.1. State Space (SISO Systems) Time of study: 3 to 6 hours

Goal After study this chapter you will know


State-Space and State-Space equations Describe MIMO Systems Describe State variables Describe State Matrices Describe and clarify State-Space equations Create State-Space representation of systems Analyze State-Space

Explication
The modern method of controls uses systems of special state-space equations to model and manipulate systems. The state variable model is broad enough to be useful in describing a wide range of systems, including systems that cannot be adequately described using the Laplace Transform. These chapters will require the reader to have a solid background in linear algebra, and multi-variable calculus. State-Space Equations Time-Domain Approach The "Classical" method of controls (what we have been studying so far) has been based mostly in the transform domain. When we want to control the system in general we use the Laplace transform (Z-Transform for digital systems) to represent the system, and when we want to examine the frequency characteristics of a system, we use the Fourier Transform. The question arises, why we do this: Let's look at a basic second-order Laplace Transform transfer function: Y ( s) s +1 = G (s) = 2 U ( s) 5s + 2 s + 1 And we can decompose this equation in terms of the system inputs and outputs: U ( s )( s + 1) = Y ( s )(5s 2 + 2 s + 1) Now, when we take the inverse Laplace transform of our equation, we can see the terrible truth: u (t ) + du (t ) dy 2 (t ) dy (t ) =5 +2 + y (t ) 2 dt dt dt

That's right, the Laplace transform is hiding the fact that we are actually dealing with second-order differential equations. The Laplace transform moves us out of the time-domain
117

State Space System Representation (messy, second-order ODEs) into the complex frequency domain (simple, second-order polynomials), so that we can study and manipulate our systems more easily. So, why would anybody want to work in the time domain? It turns out that if we decompose our second-order (or higher) differential equations into multiple first-order equations, we can find a new method for easily manipulating the system without having to use integral transforms. The solution to this problem is state variables. By taking our multiple first-order differential equations, and analyzing them in vector form, we can not only do the same things we were doing in the time domain using simple matrix algebra, but now we can easily account for systems with multiple inputs and multiple outputs, without adding much unnecessary complexity. All these reasons demonstrate why the "modern" state space approach to controls has become so popular. State-Space In a state space system, the internal state of the system is explicitly accounted for by an equation known as the state equation. The system output is given in terms of a combination of the current system state, and the current system input, through the output equation. These two equations form a linear system of equations known collectively as statespace equations. The state-space is the linear vector space that consists of all the possible internal states of the system. Because the state-space must be finite, a system can only be described by state-space equations if the system is lumped. For a system to be modeled using the state-space method, the system must meet these requirements:

The system must be linear. The system must be lumped

State Variables When modeling a system using a state-space equation, we first need to define three vectors:

Input variables

A SISO (Single Input Single Output) system will only have a single input value, but a MIMO system may have multiple inputs. We need to define all the inputs to the system, and we need to arrange them into a vector.

Output variables

This is the system output value, and in the case of MIMO systems, we may have several. Output variables should be independent of one another, and only dependant on a linear combination of the input vector and the state vector.

State Variables

The state variables represent values from inside the system that can change over time. In an electric circuit, for instance, the node voltages or the mesh currents can be state variables. In a mechanical system, the forces applied by springs, gravity, and dashpots can be state variables. We denote the input variables with a u, the output variables with y, and the state variables with x. In essence, we have the following relationship:
y = f ( x, u )

118

State Space System Representation Where f(u,x) is our system. Also, the state variables can change with respect to the current state and the system input:
x = g ( x, u )

Where x' is the rate of change of the state variables. We will define f(u,x) and g(u,x) in the next chapter. MIMO Systems Systems with more then one input and/or more then one output are known as MultiInput Multi-Output systems, or they are frequently known by the abbreviation MIMO. This is in contrast to systems that have only a single input and a single output (SISO), like we have been discussing previously. State-Space Equations In a state-space system representation, we have a system of two equations: an equation for determining the state of the system, and another equation for determining the output of the system. We will use the variable y(t) as the output of the system, x(t) as the state of the system, and u(t) as the input of the system. We use the notation x'(t) to denote the future state of the system, as dependant on the current state of the system and the current input. Symbolically, we say that there are transforms g and h that display this relationship: x (t ) = g[t 0 , t , x(t ), x(0), u (0)] y (t ) = h[t , x(t ), u (t )] The first equation shows that the system state is dependant on the previous system state, the initial state of the system, the time, and the system inputs. The second equation shows that the system output is dependent on the current system state, the system input, and the current time. Note: If x'(t) and y(t) are not linear combinations of x(t) and u(t), the system is said to be nonlinear. We will attempt to discuss non-linear systems in a later chapter. If the system state change x'(t) and the system output y(t) are linear combinations of the system state and input vectors, then we can say the systems are linear systems, and we can rewrite them in matrix form:
x (t ) = A (t )x(t ) + B(t )u(t ) y (t ) = C(t )x(t ) + D(t )u(t )

If the systems themselves are time-invariant, we can re-write this as follows:


x (t ) = A x(t ) + B u(t ) y (t ) = C x(t ) + D u(t )

These equations show that in a given system, the current output is dependant on the current input and the current state. The State Equation shows the relationship between the system's current state and its input, and the future state of the system. The Output Equation shows the relationship between the system state and the output. These equations show that in a given system, the current output is dependant on the current input and the current state.

119

State Space System Representation The future state is also dependant on the current state and the current input. It is important to note at this point that the state space equations of a particular system are not unique, and there are an infinite number of ways to represent these equations by manipulating the A, B, C and D matrices using row operations. There are a number of "standard forms" for these matrices, however, that make certain computations easier. Converting between these forms will require knowledge of linear algebra. Any system that can be described by a finite number of nth order differential equations or nth order difference equations, or any system that can be approximated by by them, can be described using state space equations. The general solutions to the state-space equations, therefore, are solutions to all such sets of equations. Digital Systems For digital systems, we can write similar equations, using discrete data sets:
x [k + 1] = A x[k ] + B u[ k ] y[k ] = C x[k ] + D u[k ]

We will show how to obtain all these equations below. Matrices: A B C D in our time-invariant state space equations:
x (t ) = A (t ) x(t ) + B(t )u(t ) y (t ) = C(t ) x(t ) + D(t )u(t )

We have 4 constant matrices: A, B, C, and D. We will explain these matrices below: Matrix A Matrix A is the system matrix, and relates how the current state affects the state change x'. If the state change is not dependant on the current state, A will be the zero matrix. The exponential of the state matrix, eAt is called the state transition matrix, and is an important function that we will describe below. Matrix B Matrix B is the control matrix (or input matrix), and determines how the system input affects the state change. If the state change is not dependant on the system input, then B will be the zero matrix. Matrix C Matrix C is the output matrix, and determines the relationship between the system state and the system output. Matrix D Matrix D is the feed forward matrix, and allows for the system input affecting the system output directly. Basic feedback systems like those we have previously considered do not have a feed forward element, and therefore for most of the systems we have already considered, the D matrix is the zero matrix. Matrix Dimensions Because we are adding and multiplying multiple matrices and vectors together, we need to be absolutely certain that the matrices have compatible dimensions, or else the equations will be undefined. For integer values p, q, and r, the dimensions of the system matrices and vectors are defined as follows:

120

State Space System Representation Vectors


x : p 1 x : p 1 u : q 1 y : r 1

Matrices
A: p p B: pq C:r p D:rq

If the matrix and vector dimensions do not agree with one another, the equations are invalid and the results will be meaningless. Matrices and vectors must have compatible dimensions of them can not be combined using matrix operations. The last thing in this section is block schemes of inner connections of the StateSpace representation (Fig. 4.1 and 4.2).

Fig. 4.1: Block scheme of continuous system in the state space

Fig 4.2 Block scheme of discrete system in the state space In figure 4.1 and 4.2 are demonstrated connections between matrices and vectors and clarify State-Space. Relating Continuous and Discrete Systems Continuous and discrete systems that perform similarly can be related together through a set of relationships. It should come as no surprise that a discrete system and a continuous
121

State Space System Representation system will have different characteristics and different coefficient matrices. If we consider that a discrete system is the same as a continuous system, except that it is sampled with a sampling time T, then the relationships below will hold. Here, we will use "d" subscripts to denote the system matrices of a discrete system, and we will use a "c" subscript to denote the system matrices of a continuous system. T is the sampling time of the digital system.
A d = e A CT
B d = A C1 ( Ad I )B C

Cd = CC Dd = DC

If the Ac matrix is singular, and we cannot find it's inverse, we can instead define Bd as:

B d = e A d
0

If A is nonsingular, this integral equation will reduce to the equation listed above. Obtaining the State-Space Equations The beauty of state equations is that they can be used to transparently describe systems that are both continuous and discrete in nature. Some texts will differentiate notation between discrete and continuous cases. Instead we will opt to use the generic coefficient matrices A, B, C and D. Other texts may use the letters F, H, and G for continuous systems and , and for use in discrete systems. However, if we keep track of our time-domain system, we don't need to worry about such notations. From Differential Equations Let's say that we have a general 3rd order differential equation in terms of input (u) and output (y): d 3 y (t ) d 2 y (t ) dy (t ) + a2 + a1 + a0 y (t ) = u (t ) 3 dt dt dt We can create the state variable vector x in the following manner:

x1 = y (t ) dy (t ) dt d 2 y (t ) x3 = dt 2 x2 = This now leaves us with the following 3 first-order equations:


x1 = x 2 x 2 = x3
3 dy (t ) x3 = dt 3

122

State Space System Representation

Now, we can define the state vector x in terms of the individual x components, and we can create the future state vector as well:

x1 x = x2 x3

x1 x x = 2 x3

And with that, we can assemble the state-space equations for the system:

1 0 0 0 0 x(t) + 0u(t ) x(t ) = 0 1 a 0 a1 a 2 1 y (t ) = [1 0 0]x(t ) Granted, this is only a simple example, but the method should become apparent to most readers. From Difference Equations Now, let's say that we have a third order difference equation that describes a discretetime system: y[n + 3] + a 2 y[n + 2] + a1 y[n + 1] + a 0 y[n] = u[n] From here, we can define a set of discrete state variables x in the following manner: x1 [n] = y[n] x 2 [n] = y[n + 1] x3 = y[n + 2] This in turn gives us 3 first-order difference equations: x1 [n + 1] = y[n + 1] x 2 [n + 1] = y[n + 2] x31 [n + 1] = y[n + 3] Again, we say that matrix x is a vertical vector of the 3 state variables we have defined, and we can write our state equation in the same form as if it were a continuous-time system:
1 0 0 0 0 x[n] + 0 u[n] 0 1 x[n + 1] = a0 a1 a2 1 y[n] = [1 0 0] x[n]

State-Space Representation As an important note, remember that the state variables x are user-defined and therefore are arbitrary. There are any number of ways to define x for a particular problem, each of which are going to lead to different state space equations.

123

State Space System Representation

Note: There are an infinite number of equivalent ways to represent a system using state-space equations. Some ways are better then others. Once the state-space equations are obtained, they can be manipulated to take a particular form if needed. Consider the previous continuous-time example. We can rewrite the equation in the form

d d 2 y (t ) dy (t ) + a2 + a1 y (t ) + a 0 y (t ) = u (t ) 2 dt dt dt
We now define the state variables
x1 = y (t ) dy (t ) dt d 2 y (t ) dy (t ) x3 = + a2 + a1 y (t ) 2 dt dt x2 = with first-order derivatives dy (t ) = x2 dt d 2 y (t ) x2 = = a1 x1 a 2 x 2 + x3 dt 2 x3 = a 0 y (t ) + u (t ) x1 = The state-space equations for the system will then be given by

0 x(t ) = a1 a 0

1 a2 0

y (t ) = [1 0 0]x(t )

0 0 1 x(t ) + 0u(t ) 1 0

x may also be used in any number of variable transformations, as a matter of mathematical convenience. However, the variables y and u correspond to physical signals, and may not be arbitrarily selected, redefined, or transformed as x can be.

Solved Example Example 4.1.1 Problem: Describe RLC circuit (Fig. 4.3) in state space.

124

State Space System Representation

Fig. 4.3: RLC circuit Solution: Relationships between current (i) and voltage (u) in inductor (L) and capacitor (C) are as follows
u L (t ) = L di (t ) 1 , u C (t ) = i (t )dt dt C

Resulting differential equations are (more solving in the previous chapter, chapter 2):
e1 (t ) = R i (t ) + L e2 (t ) = 1 i dt C d i (t ) 1 + i dt dt C

Next step: i (t ) = C e2 (t ) LC e2 (t ) + RC e2 (t ) + e2 (t ) = e1 (t ) Now choose state variables: x1 (t ) = e2 (t ), x2 (t ) = e2 (t ), And we get:


LC x2 (t ) + RC x2 (t ) + x1 (t ) = e1 (t ) x1 (t ) = x2 (t ) x2 (t ) = 1 R 1 x1 (t ) x2 (t ) + e1 (t ) LC L LC

Then choose input variables u (t ) = e1 (t ), and output variables y (t ) = x1 (t ) . The last step is to write State Matrices:
1 0 1 A= R L LC 0 B= 1 LC C = [1 0] D=0

Resulting State-Space equations are then:

125

State Space System Representation

x1 0 1 x1 0 = 1 R + 1 u x2 LC L x2 LC x1 y = [1 0] x2
And state diagram is

Fig.4.4. State diagram of the required system End of example. Solved Example Example 4.1.2 Problem: Solve these state-space equations in Matlab.

d x1 (t ) 3 5 x1 (t ) 2 = + u (t ) dt x2 (t ) 1 9 x2 (t ) 3 ,
1 u (t ) = 4, x (0) = 1 Solution: To solve these equations we can use library function ode23. Ode23 numerically solves non-stiff differential equations by Runge-Kutta method. We have to create m-file equation.m (or any other desired name) and write statespace equation into: function xx=rovnice(t,x)
A=[-3 -5;1 -9]; B=[2 4]; u=4; xx=A*[x(1);x(2)]+B*u;

In Matlab command-line we execute ode23 with these arguments:

126

State Space System Representation >> [t,x] = ode23('equation',0,20,[1;1] );

Input arguments are: filename (file with our system description), initial and final integration time and initial conditions vector x(0). End of example. Solved Example Example 3.1.2 Problem: Calculate state-space equations and matrices for this system:
G (s) = 2s + 1 . s + 5s + 4
2

Create block scheme in Simulink and verify identity of both two sytems (use step response). Solution: First of all, we set multinomial a and b of denominator and numerator of G(s). Then we use tf2ss function to transform it to state-space:
>> b=[2 1] >> a=[1 5 4] >> [A B C D]=tf2ss(b,a)

5 2 1 A= B = 0 C = [ 2 1] D = 0 1 0 Block scheme for step responses of both systems:

Fig. 4.5: Block scheme of required system in Simulink Step response of the required system set by transfer function is demonstrated in figure 4.6 and step response of the required system set by state-space equations is demonstrated in figure 4.7.

127

State Space System Representation

0.4 0.35 0.3 0.25 h(t) 0.2 0.15 0.1 0.05 0

0.5

1.5

2.5 t

3.5

4.5

Fig. 4.6: Step response of the required system set by transfer function
0.4 0.35 0.3 0.25 h(t) 0.2 0.15 0.1 0.05 0

0.5

1.5

2.5 t

3.5

4.5

Fig. 4.7: Step response of the required system set by state-space equations Results of simulation are saved in two-dimensional arrays ScopeData and ScopeData1. Following command sequence will draw these characteristics:
>> >> >> >> >> >> plot(ScopeData1(1:504,1),ScopeData1(1:504,2),'b') xlabel('t') ylabel('h(t)') plot(ScopeData(1:504,1),ScopeData(1:504,2),'r') xlabel('t') ylabel('h(t)')

Both two systems have the same step response. End of example. Solved Example Example 4.1.3 Problem: Calculate state-space equations and matrices for system with transfer G(z). Sampling period T = 1 second.
128

State Space System Representation


z 1 + 0,5 z 2 1 + 0, 4 z 1 + 0, 3 z 2

G( z) =

Create block scheme in Simulink and verify identity of both two systems (use step response). Solution: First of all, we set multinomial a and b of denominator and numerator of G(s). Then we use tf2ss function to transform it to state-space:
>> >> >> >> >> z=sym('z') b=[1 0.5] a=[1 0.4 0.3] g=tf(b,a,1) [E B C D]=tf2ss(b,a)

0, 4 0,3 1 E= B = C = [1 0,5] D = 0 0 1 0 Block scheme for step responses of both systems is demonstrated in figure 4.8.

Fig.4.8: Block scheme of required system in Simulink Discrete step response of the required system set by transfer function is demonstrated in figure 4.9 and discrete step response of the required system set by state-space equations is demonstrated in figure 4.10.
1.4 1.3 1.2 1.1 1 0.9 0.8 h(kT) 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 0 1 2 3 4 5 6 7 kT 8 9 10 11 12 13 14 15

Fig. 4.9: Discrete step response of the required system set by transfer function

129

State Space System Representation

1.4 1.3 1.2 1.1 1 0.9 0.8 h(kT) 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 0 1 2 3 4 5 6 7 kT 8 9 10 11 12 13 14 15

Fig. 4.10: Discrete step response of the required system set by state-space equations Results of simulation are saved in two-dimensional arrays ScopeData and ScopeData1. Following command sequence will draw these characteristics:
>> >> >> >> >> >> stem(ScopeData1(1:16,1),ScopeData1(1:16,2), 'b*:') xlabel('kT') ylabel('h(kT)') stem(ScopeData(1:16,1),ScopeData(1:16,2),'r*:') xlabel('kT') ylabel('h(kT)')

Both two systems have the same step response. End of example.

Summary of notions 4.1.


In a state-space system, the internal state of the system is explicitly accounted for by an equation known as the state equation. The system output is given in terms of a combination of the current system state, and the current system input, through the output equation. These two equations form a linear system of equations known collectively as state-space equations. The state-space is the linear vector space that consists of all the possible internal states of the system. Input variables are all inputs to the systems. Output variables are system outputs. The state variables represent values from inside the system that can change over time. In an electric circuit, for instance, the node voltages or the mesh currents can be state variables. In a mechanical system, the forces applied by springs, gravity, and dashpots can be state variables. State-Space equations: In a state-space system representation, we have a system of two equations: an equation for determining the state of the system, and another equation for determining the output of the system. For LTI systems we get:
x (t ) = A x(t ) + B u(t ) y (t ) = C x(t ) + D u(t ) x [k + 1] = A x[k ] + B u[k ] y[ k ] = C x[k ] + D u[k ]

Where x is state variable, u is input variable and y is output variable.

130

State Space System Representation

Matrix A is the system matrix, and relates how the current state affects the state change x'. Matrix B is the control matrix (or input matrix), and determines how the system input affects the state change. Matrix C is the output matrix, and determines the relationship between the system state and the system output. Matrix D is the feed forward matrix, and allows for the system input affecting the system output directly.

Questions 4.1.
1. What is state-space? 2. Which state-space equations are used for LTI system and which for general system? 3. What is meaning of matrices A, B, C, D? 4. What is meaning of variables vectors x, u, and y? 5. How can transform system from the transfer function into the state-space?

Example to solving 4.1.


Example 4.1.3 Problem: Two water tanks are connected from outflow of first into inflow of second displayed in figure 4.11. Equations describing this system are as follows
h1 h2 dh = q1 , C1 1 = q q1 , R1 dt h2 dh = q2 , C2 2 = q1 q2 . R2 dt

where Q steady flow [ m3/s] q deviation from steady flow [ m3/s] H steady surface level in tank [m] h deviation from steady surface level [m] C capacitance [ m2 ], which is defined as change of volume (capacity) [ m3 ] of fluid in a tank to surface level change [ m] R resistance in pipeline, which is defined as ratio of fluid surface level change [m] to change in quantity flow [ m3/s]. Describe this system in state-space and create state-space equations.

131

State Space System Representation

Fig. 4.11: Two interconnected tanks

4.2.

MIMO Systems Time of study: 2 to 3 hours

Goal After study this chapter you will know


MIMO systems basics State-Space representation of MIMO systems Transfer function matrix Describe continuous and discrete MIMO systems

Explication
Systems with more then one input and/or more then one output are known as MultiInput Multi-Output systems, or they are frequently known by the abbreviation MIMO. This is in contrast to systems that have only a single input and a single output (SISO), like we have been discussing previously. State-Space Representation MIMO systems that are lumped and linear can be described easily with state-space equations. To represent multiple inputs we expand the input u(t) into a vector u(t) with the desired number of inputs. Likewise, to represent a system with multiple outputs, we expand y(t) into y(t), which is a vector of all the outputs. For this method to work, the outputs must be linearly dependant on the input vector and the state vector.
x (t ) = A x(t ) + B u(t ) y (t ) = C x(t ) + D u(t )

Let's say that we have 2 outputs, y1 and y2, and 2 inputs, u1 and u2. These are related in our system through the following system of differential equations:

132

State Space System Representation


y1 + a1 y1 + a 0 ( y1 + y 2 ) = u1 (t ) y 2 + a 2 ( y 2 y1 ) = u 2 (t )

Now, we can assign our state variables as such, and produce our first-order differential equations: x1 = y1 x4 = y 2 x1 = y1 = x 2 x 2 = a1 x 2 a 0 ( x1 + x 4 ) + u1 (t ) x 4 = a 2 ( x 4 x1 ) + u 2 (t ) And finally we can assemble our state space equations:
0 0 0 1 0 u a0 1 x+ 0 0 u 2 0 0 0 0 0 a2 0 1 u1 y1 1 0 0 0 y = 0 0 0 1 x + [0 0]u 2 2 0 a x = 0 0 a2 1 a1 0 0

When we have multiple inputs or outputs, it is frequently common to use capital letters to denote vectors. For instance, we can say that Y is the vector of all outputs, and U is the vector of all inputs. Solved Example Example 4.2.1 Problem: The equivalent electrical circuit of a DC motor is illustrated in figure 4.12. Electrical characteristics are linear.

Fig. 4.12: The equivalent electrical circuit of a DC motor

133

State Space System Representation

Ua is a voltage source feeding the motor. La is the electrical equivalent of the armature coil. Ra is a resistance of coil. Uc is an induced voltage opposing the voltage source (Ua). The induced voltage is generated by the rotation of the electrical coil through the fixed flux lines of the permanent magnets. This voltage is often referred to as the back emf (electromotive force). Solution: First differential equation is derived by Kirchoff's voltage law around the electrical loop. Second differential equation qualifies energetic balance of all torques.
Ua = UR +U L +UC Ua = i R + L Te = T + T + TL K T i = di + KV dt

Jd + B + TZ dt

Now we have to modify these two equations to be able to create State-Space equations:
K d R 1 i (t ) = i (t ) V (t ) + U a (t ) dt L L L K B d 1 (t ) = T i (t ) (t ) TZ J J J dt

Where KV [Nm] is velocity constant, determined by the flux density of the permanent magnets, the reluctance of the iron core of the armature, and the number of turns of the armature winding. KT [Nm] is torque constant, depends on the same things as velocity constant TZ [Nm] is torque of mechanical load J [Kgm-2] is inertia of the motor and mechanical load B [Nms] is damping coefficient [rads-1] is rotation speed We can create state space. Only thing we have to do is to choose correct state variables: x1 (t ) = i (t ) x 2 (t ) = (t ) State-Space equations are as follows:
R i (t ) L (t ) = K T J KV 1 i (t ) L L + 0 (t ) 0 0 U (t ) a 1 Tz (t ) J

Output from DC motor is its rotation speed:

U a (t ) i(t ) [ y (t )] = [0 1] + [0 0] T (t ) (t ) Z

134

State Space System Representation

As can be seen DC motor model has two inputs (Fig. 4.13) source voltage and torque of load. Output is rotation speed.

Fig. 4.13: Block schema of the DC motor End of example.

Transfer Function Matrix


If the system is LTI and Lumped, we can take the Laplace Transform of the statespace equations, as follows:
L { x (t )} = L { Ax (t )} + L { Bu(t )} L { y (t )} = L {Cx (t )} + L { Du(t )}

This gives us the result:


sX ( s ) X (0) = AX ( s ) + BU ( s ) Y ( s ) = CX ( s ) + DU ( s )

Where x(0) is the initial conditions of the system state vector. If the system is relaxed, we can ignore this term, but for completeness we will continue the derivation with it. We can separate out the variables in the state equation as follows:
sX ( s ) AX ( s ) = X (0) + BU ( s )

Then factor out an X(s):

X ( s ) [ sI A] = X (0) + BU ( s )
And then we can multiply both sides by the inverse of [sI-A] to give us our state equation:
X ( s ) = [ sI A] X (0) + [ sI A] BU ( s )
1 1

Now, if we plug in this value for X(s) into our output equation, above, we get a more complicated equation:

Y ( s) = C [ sI A] X (0) + [ sI A] BU ( s ) + DU ( s)
1 1

And we can distribute the matrix C to give us our answer:


Y ( s ) = C [ sI A] X (0) + C [ sI A] BU ( s ) + DU ( s )
1 1

Now, if the system is relaxed, and therefore x(0) is 0, the first term of this equation becomes 0. In this case, we can factor out a U(s) from the remaining two terms:

135

State Space System Representation

Y ( s) = C [ sI A] B + D U ( s)
1

We can make the following substitution to obtain the Transfer Function Matrix, or more simply, the Transfer Matrix, G(s):
G ( s ) = C [ sI A ] B + D
1

And rewrite our output equation in terms of the transfer matrix as follows:
Y ( s ) = G ( s )U ( s )

Dimensions
If our system has q inputs, and r outputs, our transfer function matrix will be an r q matrix.

Relation to transfer function For SISO systems, the Transfer Function matrix will reduce to the transfer function as would be obtained by taking the Laplace transform of the system response equation.
For MIMO systems, with n inputs and m outputs, the transfer function matrix will contain n m transfer functions, where each entry is the transfer function relationship between each individual input, and each individual output. Through this derivation of the transfer function matrix, we have shown the equivalency between the Laplace methods and the State-Space method for representing systems. Also, we have shown how the Laplace method can be generalized to account for MIMO systems. Through the rest of this book, we will use the Laplace and State Space methods interchangeably, opting to use one or the other where appropriate.

Zero-State and Zero-Input


If we have our complete system response equation from above:

Y ( s) = C [ sI A] X (0) + [ sI A] BU ( s ) + DU ( s)
1 1

We can separate this into two separate parts: The Zero-input response:
C [ sI A] X (0)
1

The Zero-state response:

(C [ sI A]

B + D U (s)

These are named because if there is no input to the system (zero-input), then the output is the response of the system to the initial system state. If there is no state to the system, then the output is the response of the system to the system input. The complete response is the sum of the system with no input, and the input with no state.

Discrete MIMO Systems


In the discrete case, we end up with similar equations, except that the x(0) initial conditions term is proceeded by an additional z variable:

136

State Space System Representation

X ( z ) = [ zI A] zX (0) + [ zI A] BU ( z )
1 1

Y ( z ) = C [ zI A] zX (0) + C [ zI A] BU ( z ) + DU ( z )
1 1

If x(0) is zero, that term drops out, and we can derive a Transfer Function Matrix in the z domain as well:

Y( z ) = C [ zI A] B + D U ( z )
1

G ( z ) = C [ zI A ] B + D
1

Y ( z ) = G ( z )U ( z )

Pulse Response
For digital systems, it is frequently a good idea to write the pulse response equation, from the state-space equations:
x[ k + 1] = Ax[ k ] + Bu[ k ] y[k ] = Cx[ k ] + Du[ k ]

We can combine these two equations into a single difference equation using the coefficient matrices A, B, C, and D. To do this, we find the ratio of the system output vector, Y, to the system input vector, U:
Y( z ) -1 = G( z ) = C ( zI - A ) B + D U( z )

So the system response to a digital system can be derived from the pulse response equation by:
Y ( z ) = G ( z )U ( z )

And we can set U(z) to a step input through the following Z transform: Plugging this into our pulse response we get our step response:
u (t ) U ( z ) = z z 1

Y ( z ) = C [ zI A ] B + D
1

z ) z 1

Y ( z) = G( z)

z z 1

System Realization Realization is the process of taking a mathematical model of a system (either in the Laplace domain or the State-Space domain), and creating a physical system. Some systems are not realizable.
An important point to keep in mind is that the Laplace domain representation, and the state-space representations are equivalent, and both representations describe the same physical systems. We want, therefore, a way to convert between the two representations, because each one is well suited for particular methods of analysis.

137

State Space System Representation

The state-space representation, for instance, is preferable when it comes time to move the system design from the drawing board to a constructed physical device. For that reason, we call the process of converting a system from the Laplace representation to the state-space representation "realization".

Realization Conditions
A transfer function G(s) is realizable if and only if the system can be described by a finite-dimensional state-space equation.

[A B C D], an ordered set of the 4 system matrices, is called a realization of the system G(s).
A system G is realizable if and only if the transfer matrix G(s) is a proper rational matrix. In other words, every entry in the matrix G(s) (only 1 for SISO systems) is a rational polynomial, and if the degree of the denominator is higher or equal to the degree of the numerator. We've already covered the method for realizing a SISO system, the remainder of this chapter will talk about the general method of realizing a MIMO system.

Realizing the Transfer Matrix


We can decompose a transfer matrix G(s) into a strictly proper transfer matrix:
G ( s ) = G ( ) + Gsp ( s ) .

Where is a strictly proper transfer matrix Gsp(s). Also, we can use this to find the value of our D matrix:
D = G ( )

We can define d(s) to be the lowest common denominator polynomial of all the entries in G(s): d ( s) = s r + a1 s r 1 + + a r 1 s + a r

Remember, q is the number of inputs, p is the number of internal system states, and r is the number of outputs. Then we can define Gsp as:
Gsp ( s ) =

1 N (s) d ( s)
+ N r 1s + N r

Where
N ( s ) N1s r 1 +

And the Ni are p q constant matrices. If we remember our method for converting a transfer function to a state-space equation, we can follow the same general method, except that the new matrix A will be a block matrix, where each block is the size of the transfer matrix:

138

State Space System Representation

a1 I p I p A= 0 0

a2 I p 0 Ip 0

ar 1 I p 0 0 Ip

ar I p 0 0 0

I p 0 B=0 0 C = I p 0 0

Summary of notions 4.2.


Systems with more then one input and/or more then one output are known as MultiInput Multi-Output systems, or they are frequently known by the abbreviation MIMO. MIMO systems that are lumped and linear can be described easily with state-space equations. To represent multiple inputs we expand the input u(t) into a vector u(t) with the desired number of inputs. Likewise, to represent a system with multiple outputs, we expand y(t) into y(t), which is a vector of all the outputs. For this method to work, the outputs must be linearly dependant on the input vector and the state vector.
x (t ) = A x(t ) + B u(t ) y (t ) = C x(t ) + D u(t )

If the system is LTI and Lumped, we can take the Laplace Transform of the state-space equations, as follows:

G ( s ) = C [ sI A ] B + D
1

G ( z ) = C [ zI A ] B + D
1

Questions 4.2.
1. What are MIMO systems? 2. What is their state-space representation? 3. How is possible to obtain the Transfer Function Matrix?

Example to solving 4.2.


Example 4.2.2
Problem: Determine state space matrixes by calculation and also by Matlab.
139

State Space System Representation


G (s) = s +1 . s + 6s + 5
2

Determine transfer function by matrixes and compare results

Example 4.2.3
Problem: Discrete system with two input and two output is define by following differential equations x1 (k + 1) = x2 (k ) + u1 (k ) x2 (k + 1) = 2 x1 (k ) + 3 x3 (k ) x3 (k + 1) = 0, 6 x1 (k ) 2 x2 (k ) 0,8 x3 (k ) + u2 (k ) y1 (k ) = 2 x2 (k ) y2 (k ) = x3 (k ) Determine state space equations and the state diagram for the simulation.

140

You might also like