Skip to content Skip to navigation

Connexions

You are here: Home » Content » Matrix Representation of Systems

Navigation

Content Actions

  • Download module PDF
  • Add to ...
    Add the module to:
    • My Favorites
    • A lens
    • An external social bookmarking service
    • My Favorites (What is 'My Favorites'?)
      'My Favorites' is a special kind of lens which you can use to bookmark modules and collections directly in Connexions. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need a Connexions account to use 'My Favorites'.
    • A lens (What is a lens?)

      Definition of a lens

      Lenses

      A lens is a custom view of Connexions content. You can think of it as a fancy kind of list that will let you see Connexions through the eyes of organizations and people you trust.

      What is in a lens?

      Lens makers point to Connexions materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

      Who can create a lens?

      Any individual Connexions member, a community, or a respected organization.

    • External bookmarks
  • E-mail the authors

Recently Viewed

This feature requires Javascript to be enabled.

Matrix Representation of Systems

Module by: Thanos Antoulas, JP Slavinsky

Summary: Matrix representation of systems

State Equations

Knowing that a system's state describes its dynamics, or memory, it is also useful to examine how the state of a system evolves over time. A system's state will vary based on the current values of the state as well as the inputs to the system:

ddtyt+yt=0 t1 y t y t 0 (1)

Looking at an example will help to see why calculating the time-varying behavior of the state is important.

Example 1

A system is described by the following differential equation:

d2dt2yt+3d2dt2yt+2yt=0 t2 y t 3 t2 y t 2 y t 0 (2)

The state of this system is

xt=x1tx2t=ytddtyt x t x1 t x2 t y t t1 y t (3)

The state xtxt (a vector) is composed of two state variables x1t x1t and x2t x2t. We would like to be able to talk about the time-varying state in terms of these state variables. That is, we'd like an expression where ddtxt t1 x t can be written in terms of x1t x1 t and x2t x2 t . From state equation above, we see that ddtx1t t1 x1 t simply equals ddtyt t1 y t . In the same equation we also notice that ddtyt t1 y t equals ddtx2t t1 x2 t . Therefore, the derivative of the first state variable exactly equals the second state variable.

ddtx1t=ddtyt=x2t t1 x1 t t1 y t x2 t (4)

We can follow the same process for x2t x2 t . Again from state equation, we see that the first derivative of x2t x2 t equals the second derivative of yt y t . At this stage, we can bring in information from the system's differential equation. That equation (the first one in this example) also contains the second derivative of yt y t . If we solve for it we get

d2dt2yt=-3ddtyt-2yt+ut t2 y t -3 t1 y t 2 y t u t (5)

We already know that ddtyt t1 y t equals x2t x2 t and that yt y t equals x1t x1 t . Putting all of this together, we can get an expression for ddtx2t t1 x2 t in terms of the state variables and the input variable.

ddtx2t=d2dt2yt=-3ddtyt-2yt+ut=-3x2t-2x1t+ut t1 x2 t t2 y t -3 t1 y t 2 y t u t -3 x2 t 2 x1 t u t (6)

The important thing to notice here is that by looking at the time-varying behavior of the state, we have been able to reduce the complexity of the problem. Instead of one second-order differential equation we now have two first-order differential equations.

Think about a case where we might have 5, 10, or even 20 state variables. In such an instance, it would be difficult to work with so many equations. For this reason (and in order to have a more compact notation), we represent these state variable equations in terms of matrices. The set of equations above can be written as:

ddtx1tx2t=01-2-3x1tx2t+01ut t1 x1 t x2 t 01 -2-3 x1 t x2 t 0 1 u t (7)

By letting xt=x1tx2t xt x1t x2t , A=01-2-3 A 01 -2-3 , B=01 B 0 1 , we can rewrite this equation as:

ddtxt=Axt+But t1 x t A x t B u t (8)

This is called a state equation.

State equations are always first-order differential equations. All of the dynamics and memory of the system are characterized in the state equations. In general, in a system with nn state variables and mm inputs, AA is nn x nn, xtxt is nn x 11, BB is nn x mm, and utut is mm x 11.

Figure 1: State Equation Matrices
State Equation Matrices
State Equation Matrices (mr_fig1.png)

Output Equations

Now that we've seen how to examine a system with respect to its state equations, we can move on to equations defining the relationships between the outputs of the system and the state and input variables. The outputs of a system can be written as sums of linear combinations of state variables and input variables. If in the example above the output yt y t depended only on the first state variable, we could write yt y t in matrix form:

yt=x1t=10x1tx2t y t x1 t 10 x1 t x2 t (9)

More generally, we can express the output (or outputs) as:

yt=Axt+Dut y t A x t D u t (10)

In a system with mm inputs, nn state variables, and pp outputs, ytyt is pp x 11, CC is pp x nn, xtxt is nn x 11, DD is pp x mm, and utut is nn x 11. Output equations are only algebraic equations; there are no differential equations and therefore, there is no memory component.

If we assume that =m=p=1mp1 and D=0D0, we can elininate xtxt in a combination of the state equations and output equations to get the input/output relation q-tyt=p-tut q t y t p t u t . Here the degree of qq equals the degree of pp.

Example 2

Let's develop state and output equations for the following circuit diagram:

Figure 2: Example Circuit 1
Example Circuit 1
Example Circuit 1 (mr_fig2.png)

There are two energy-storage elements in this diagram: the inductor and the capacitor. As we know that energy-storage elements give systems memory, it makes sense that the state variables should be the current iLiL flowing through the inductor and the voltage vCvC across the capacitor. By using Kirchoff's laws around the left and center loops, respectively, we can find the following two equations:

u=iL+1-2ddtiL+vC u iL 12 t iL vC (11)
iL=vC-2+1-3ddtvC iL vC 2 1 3 t vC (12)

These equations can easily be rearranged to have the derivatives on the left-hand side equaling linear combinations of state variables and inputs on the right. These are the state equations. The figure also quickly tells us that the output yy is equal to the voltage across the capacitor, vCvC.

We can now rewrite the state and output equations in matrix form:

ddtiLddtvC=-2-23-3-2iLvC+20 t iL t vC -2-2 3-32 iL vC 2 0 (13)
y=01iLvC+0u y 01 iL vC 0 u (14)

Compact System Notation

We now introduce one more simple way to simplify the representation of systems. Basically, to better use the tools of linear algebra, we will put all four of the matrices from the state and output equations (i.e., AA, BB, CC, and DD) into one large partitioned matrix:

Figure 3: Compacty System Matrix Notation
Compact System Matrix Notation
Compact System Matrix Notation (mr_fig3.png)

Example 3

In this example we'll find the state and output equations for the following circuit, as well as represent the system using the compact notation described above.

Figure 4: Example Circuit 2
Example Circuit 2
Example Circuit 2 (mr_fig4.png)

Here, uu and yy are the input and output currents, respectively. x1x1 and x2x2 are the state variables. Using Kirchoff's laws and the ii-vv relation of a capacitor, we can find the following three equations:

u=y+x1 u y x1 (15)
x1=Addtx2 x1 A t x2 (16)
Ry=ddtx1+x2 R y t x1 x2 (17)

Through simple rearranging and substitution of the terms, we find the state and output equations:

 

State equations:

ddtx1=-1-Lx2+R-Lu-x1 t x1 -1L x2 RL u x1 (18)
ddtx2=1-Ax1 t x2 1A x1 (19)

Output equation:

y=-x1+u y x1 u (20)

This equations can be more compactly written as:

ABAD=-R-L-1-L1-A0R-L0100 AB AD RL -1L 1A 0 RL 0 10 0 (21)

Example 4

The simple oscillator is defined by the following differential equation:

d2dt2y+y=u t2 y y u (22)

The states are x1=y x1 y (which is also the output equation) and x2=ddty x2 t1 y . These can be rewritten in state equation form as:

ddtx1=x2 t x1 x2 (23)
ddtx2=-x1+u t x2 x1 u (24)

The compact matrix notation is:

ABAD=01-1001100 AB AD 0 1 -1 0 0 1 10 0 (25)

Comments, questions, feedback, criticisms?

Send feedback