Processing math: 100%

ECE 486 Control Systems
Lecture 2

State-Space Representation of a System

State-Space Model – a Unified Framework

Recall from last time, we introduced the basic concept of control diagram, where the terminology we used include

  • System input (R)
  • System output (Y)
  • Controller block (C)
  • Plant block (P or ˜P for plant and actuator combined)
  • Feedback loop (F)

We also discussed the situation where the controller gain C (at the moment proprotional gain only) is large, we can achieve good reference tracking since C implies YR. At the same time, the contribution of disturbance inputs D1 and D2 to the system output is minimal, we call it good disturbance rejection.

Now for a brief moment, we will look at another way of describing system dynamics – the state-space model. First off, a few quick examples.

Example 1: Consider the Mass-Spring system as in Figure 1. Derive the governing differential equation and rewrite it in matrix form by reducing a higher order ODE to a set of first order ones.

Correction: The displacement x in the figure should be interpreted as measured against the resting position (x=0) of the spring, not against the wall. Since a spring can be stretched also compressed.

Mass-Spring system

Figure 1: Example 1 – Mass-Spring system

Solution: By Newton’s second law, total force equals mass times acceleration. Therefore in this case,

Ftotal force=ma=spring force+friction+external force,

where

spring force =kx(by Hooke's law)friction force =ρ˙x(by Stokes' law, linear drag pegged to velocity),

i.e., we have the governing equation

kxρ˙x+u=m¨x.

We can move x,˙x,¨x to one side, leaving u on the other, and normalize the leading coefficient,

¨x+ρm˙x+kmx=um.

This gives us a second order linear ODE.

To rewrite it in canonical form, we convert it to a system of first order ODEs by introducing veloctiy variable v=˙x,

{˙x=v(by definition of velocity)˙v=ρmvkmx+1mu.

Equation (1) can also be written as (in order to see the matrix form more easily)

{˙x=(0)x+(1)v+(0)u˙v=(km)x+(ρm)v+(1m)u.

Finally, we can express it in matrix form,

(˙x˙v)=(01kmρm)(xv)+(01m)u.

Example 2: Consider RL circuit as in Figure 2. Derive the governing differential equation and rewrite it in matrix form by reducing a higher order ODE to a set of first order ones.

RL circuit

Figure 2: Example 2 – RL circuit

Solution: We can largely repeat what we did in Example 1 but instead apply Kirchhoff’s voltage law, total voltage drop along the circuit loop is 0.

VS+VR+VL=0,(by Kirchhoff's voltage law)VR=RI,(by Ohm's law)VL=L˙I.(by Faraday's law)

Therefore, we have VS+RI+L˙I=0.

˙I=RLI+1LVS.

Note this is a first order system.

General n-Dimensional State-Space Model

If we apply abstraction to both Example 1 and Example 2 above, for a system with n states and m inputs,

state x=(x1xn)Rn,input u=(u1um)Rm,

a linear state space representation is a set of ODEs in matrix form

(˙x1˙xn)=(An×nmatrix)(x1xn)+(Bn×mmatrix)(u1um).

Or for short,

˙x=An×nx+Bn×mu.

This is called the dynamics equation of the state-space representation. Sometimes we can augment this dynamics equation with output equation. Denote the p outputs as a vector y,

output y=(y1yp)Rp,y=Cx,

where C is a p×n matrix. For example, if we only care about (or can only measure) x1, then

y=x1=(100)(x1x2xn).

The state-space representation of a system can be written as

˙x=Ax+Bu,y=Cx.

State-space models are useful and convenient for writing down system models for different types of systems, in a unified manner.

We will use the classic example of a simple pendulum to illustrate how to work with state-space models.

Example 3: Consider the simple pendulum as in Figure 3. Derive the governing differential equation and write it in the state-space representation.

Simple pendulum

Figure 3: Example 3 – Simple pendulum

Solution: Similar to Example 1, we apply here Newton’s second law but in its rotational version. It says total torque equals moment of inertia times angular acceleration.

T=Jα(pendulum torque + external torque=inertia×angular acceleration),

where

pendulum torque=mgsinθforce×lever arm,moment of inertia J=m2.

By substitution,

¨θ=gsinθ+1m2Te.

It is a nonlinear equation though. Recall for small θ, use the approximation sinθθ in Equation (2),

sinxx

Figure 4: Overlaid sinx and x

We get

¨θ=gθ+1m2Te.

Repeat what we did at the end of Example 1 to rewrite Equation (3) in state-space form: we introduce θ1=θ,θ2=˙θ, then

˙θ2=gθ+1m2Te=gθ1+1m2Te.

So the state-space representation of a simple pendulum is

(˙θ1˙θ2)=(01g0)(θ1θ2)+(01m2)Te.

Question: What if θ is not small? say, θ is around π.

Answer: sinθπθ if θ is around π. (Why?)

Linearization of State-Space Models

Though in Example 3 we used the trick sinxx around x to obtain the linear state-space model, we are wondering if there is a general strategy to linearize state-space model. The answer is using Taylor series. Recall Taylor series expansion in one variable,

f(x)=f(x0)+f(x0)(xx0)+12f(x0)(xx0)2+f(x0)+f(x0)(xx0).(linear approximation around x=x0)

For a general nonlinear control system

˙x=f(x,u)(nonlinear state-space model)x=(x1xn),u=(u1um),f=(f1fn),

we can apply Taylor expansion in multivariables. Assume x=0,u=0 is an equilibrium point: f(0,0)=0, i.e., when the system is at rest and no control is applied, the system does not move. Around (x,u)=(0,0), for each fi(x,u) of f(x,u), i=1,,n,

fi(x,u)=fi(0,0)=0+fix1(0,0)x1++fixn(0,0)xn+fiu1(0,0)u1++fium(0,0)um.

After we assemble those n equations, we get the linearized state-space model

˙x=Ax+Bu, where Aij=fixj|x=0u=0,Bik=fiuk|x=0u=0. A is nothing but the Jacobian of f(x,u) w.r.t. x at equilibrium and similarly B is the Jacobian of f(x,u) w.r.t. u at equilibrium.

Important: Since we have ignored the higher-order terms, this linear system is only an approximation that holds only for small deviations from equilibrium.

Let’s use the general strategy instead of a trick to relinearize the nonlinear dynamics of a simple pendulum in Example 3.

Example 3 (revisted): Relinearize the state-space model of a simple pendulum in Example 3 above.

Solution: The original nonlinear state-space model:

˙θ1=f1(θ1,θ2,Te)=θ2,(already linear)˙θ2=f2(θ1,θ2,Te)=gsinθ1+1m2Te.

Linearize f2 around equilibrium (θ1,θ2,Te)=(0,0,0):

f2θ1=gcosθ1,f2θ2=0,f2Te=1m2,f2θ1|0=g,f2θ2|0=0,f2Te|0=1m2.

Therefore the linearized state-space model of the pendulum is

˙θ1=θ2,˙θ2=gθ1+1m2Te,

which is the same as Example 3.

General Linearization Procedure

Note that if systems have different equilibria other than (x,u)=(0,0), we may apply translation to shift nonzero equilibrium to the origin:

x_=xx0,u_=uu0,f_(x_,u_)=f(x_+x0,u_+u0)=f(x,u).

Since ˙x_=f_(x_,u_) is a system with origin as its equilibrium, we can apply the aforementioned linearization method we discussed for such systems. After we compute Jacobians and formulate the linearization in terms of x_ and u_, we substitute x_=xx0, u_=uu0 to get a linearized model in terms of x and u.

Observation: For any linear system, it must have an equilibrium point at (x,u)=(0,0) since if f is already linear

f(x,u)=Ax+Bux=0, u=0f(0,0)=A0+B0=0.



PDF slides by Prof M. Raginsky and Prof D. Liberzon
Edited and HTML-ized by Yün Han

Last updated: 2018-01-18 Thu 12:55