You are on page 1of 12

ECE

EE 8443
3512 – PatternContinuous
– Signals: Recognition
and Discrete

LECTURE 38: THE STATE EQUATIONS

• Objectives:
Motivation
Differential Equations
Applications to Circuits
Solutions to the State Equations

• Resources:
Wiki: State Variables
YMZ: State Variable Technique
Wiki: Controllability
SHS: State Equation Solutions
MIT: State Equation Solutions

URL: Audio:
Motivation
• Thus far we have dealt primarily with the input/output characteristics of linear
systems. State variable, or state space, representations describe the internal
state of the system.
• State variables represent a way to describe ALL linear systems in terms of a
common set of equations involving matrix algebra.
• Many familiar properties, such as stability, can be derived from this common
representation. It forms the basis for the theoretical analysis of linear systems.
• State variables are used extensively in a wide range of engineering problems,
particularly mechanical engineering, and are the foundation of control theory.
• The state variables often represent internal elements of the system such as
voltages across capacitors and currents across inductors.
• They account for observable elements of the circuit, such as voltages, and
also account for the initial conditions of the circuit, such as energy stored in
capacitors. This is critical to computing the overall response of the system.
• Matrix transformations can be used to convert from one state variable
representation to the other, so the initial choice of variables is not critical.
• Software tools such as MATLAB can be used to perform the matrix
manipulations required.
EE 3512: Lecture 38, Slide 2
State Equations
• Let us define the state of the system by an N-element column vector, x(t):
 x1 (t ) 
 x (t ) 
x(t )   2   x1 (t ) x2 (t )  xN (t )
t

  
 
x
 N ( t )
Note that in this development, v(t) will be the input, y(t) will be the output, and
x(t) is used for the state variables.
• Any system can be modeled by the following state equations:
x (t )  Ax(t )  Bv(t ) x : Nx1 A : NxN B : Nxp p : number of inputs
y (t )  Cx(t )  Dv(t ) y : qx1 C : qxN D : qxp q : number of outputs
• This system model can handle
single input/single output systems,
or multiple inputs and outputs.
• The equations above can be
implemented using the signal flow
graph shown to the right.
• Works for ALL linear systems!
EE 3512: Lecture 38, Slide 3
Differential Equations
• Consider the CT differential equations:
y (t )  a1 y (t )  a0 y (t )  b0 v(t )
• A second-order differential equation requires two state variables:
x1 (t )  y (t ) x2 (t )  y (t )
• We can reformulate the differential equation as a set of three equations:
x 1 (t )  x2 (t )
x 2 (t )  a0 x1 (t )  a1 x2 (t )  b0v(t )
y (t )  x1 (t )
• We can write these in matrix form as:
 x 1 (t )   0 1   x1 (t )   0 
 x (t )   a 
 a1   x2 (t ) b0 
v(t )
 2   0
 x (t ) 
y (t )  1 0 1 
 x2 (t )
• This can be extended to an Nth-order differential equation of this type:
N 1
y N 
(t )   ai y i  (t )  b0 v(t )
i 0
• The state variables are defined as: xi (t )  y ( i 1) t , i  1, 2, ..., N
EE 3512: Lecture 38, Slide 4
Differential Equations (Cont.)
• The resulting state equations are:
x 1 (t )  x2 (t )
 0 1 0  0  0
x 2 (t )  x3 (t )  0  0
 0 1    
 A       B   
x N 1 (t )  xN (t )    
N 1
 0 0 0  1  0
x N (t )   ai xi 1 (t )  b0 v(t )  a0  a1  a2   a N 1  b0 
i 0
C  1 0 0  0 D0
y (t )  x1 (t )
• Next, consider a differential equation with a more complex forcing function:
y (t )  a1 y (t )  a0 y (t )  b1v (t )  b0 v(t )
• The state model is:
 x1 (t )   0 1   x1 (t )  0  x (t ) 
 x (t )  a  a   x (t )  1 v(t )
 y (t )  b0 b1  1 
 2   0 1 2     x2 (t )
• We can verify this by expanding the matrix equation:
x 1 (t )  x2 (t )
x 2 (t )  a0 x1 (t )  a1 x2 (t )  v(t )
y (t )  b0 x1 (t )  b1 x2 (t )
EE 3512: Lecture 38, Slide 5
Differential Equations (Cont.)
• To construct the original equation, differentiate the last equation:
y (t )  b0 x1 (t )  b1 x 2 (t )
 b0 x2 (t )  b1  a0 x1 (t )  a1 x2 (t )  v(t )
 a1 y (t )  a1b0  a0b1 x1 (t )  b0 x2 (t )  b1v(t )
• Differentiate the last equation again and substitute:
y (t )  a1 y (t )  a1b0  a0b1 x 1 (t )  b0 x 2 (t )  b1v (t )
 a1 y (t )  a1b0  a0b1 x2 (t )
 b0  a0 x1 (t )  a1 x2 (t )  v(t )  b1v (t )
 a1 y (t )  b0 a0 x1 (t )  a0b1 x2 (t )  b0 v(t )  b1v (t )
 a1 y (t )  a0 b0 x1 (t )  b1 x2 (t )   b0 v(t )  b1v (t )
 a1 y (t )  a0 y (t )  b0 v(t )  b1v (t )
y (t )  a1 y (t )  a0 y (t )  b0 v(t )  b1v (t )
• Hence, given a general LTI system:  0 1 0  0  0 
 0 0 1   0 
   
N 1 N 1
A       B   
   
y N 
(t )   ai y (t )   bi v i  (t )
i 
 0 0 0  1  0 
i 0 i 0  a0  a1  a2   a N 1  1
C  b0 b1 b2  bN  D  0
EE 3512: Lecture 38, Slide 6
Application to Circuits (Using Slide #3)

dy (t ) 1 1 d 2 y (t )  R  dy(t ) 1 1
 y (t )  v (t )     y (t )  v(t )
dt RC RC dt 2
 L  dt LC LC
 1 
A   a0     0 1   0 1 
 RC  A  
 R / L 
 a0  a1   1 / LC
 1 
B  b0     C  1 D  0 0  0 
 RC  B  
b0  1 / LC 
 x 1 (t )  1   x (t )  1  C  1 0 D  0
    RC   1    RC  v(t )
   
   
  x 1 (t )   0 1   x1 (t )   0 
 x (t )  1 / LC  R / L   x (t )  1 / LC  v(t )

x1 (t )  2    2   
y (t )  1  
   x (t ) 
y (t )  1 0 1 
 x2 (t )
EE 3512: Lecture 38, Slide 7
Solutions to the State Equations – Preliminaries
• Recall our state equations:
x (t )  Ax(t )  Bv (t )
y (t )  Cx(t )  Dv(t )
• To solve these equations, we will need a few mathematical tools. First:
At A 2t 2 A 3t 3
e  I  At   
2! 3!
where I is an NxN identity matrix. Ak is simply AxAx…A.
• For any real numbers t and :
e A ( t   )  e At e A
• Further, setting  = -t:
e A ( t   )  e At e  At  I
• Next:
d At d  A 2 t 2 A 3t 3  2 A 3t 2
e  I  At      A  A t  
dt dt  2! 3!  2 !
 A 2t 2 A 3t 3 
 A I  At       Ae At
 2! 3! 
• We can use these results to show that the solution to x (t )  Ax(t )
is: x(t )  e At x(0), t  0
EE 3512: Lecture 38, Slide 8
Solutions to the Forced Equation
• If: x(t )  e At x(0), t  0
d
dt
   
x(t )  d e At x(0)  d e At x(0)  Ae At x(0)  Ax(t )
dt dt
• e is referred to as the state-transition matrix.
At

• We can apply these results to the state equations:


x (t )  Ax(t )  Bv (t )
x (t )  Ax(t )  Bv (t )
e  At x (t )  Ax(t )  e  At Bv (t )
• Note that:

dt

d  At
 d 
e x(t )  e  At x (t )   e  At  x(t )  e  At x (t )  Ae  At x(t )  e  At x (t )  Ax(t )
 dt 

d  At
dt

e x(t )  e  At Bv(t )

• Integrating both sides:


t
e  At
x(t )  x(0)   e  A Bv ( )d Generalization of our
0 convolution integral
t
x(t )  e x(0)   e  A t  Bv ( )d , t  0
At

EE 3512: Lecture 38, Slide 9 0


Solution to the Output Equation
• Recall:
 At t

y (t )  Cx(t )  Dv(t )  Ce x(0)   e  A t  Bv ( )d   Dv(t ), t  0
 0 
t
 Ce x(0)   Ce  A t  Bv ( )d  Dv(t ), t  0
At

• Using the definition of the unit impulse:


t
 
y (t )  Ce At x(0)   Ce  A t  Bv( )  D t   v ( ) d , t  0
   
y zi t  0              
y zs t 

• Recall our convolution integral for a single-input single-output system:


t
y zs t   h(t ) * v(t )   h(t   )v( )d , t  0
0

• Equating terms:
t t

 Ce 
Bv( )  D t   v( ) d   h(t   )v( )d
 A t   

0 0

h(t )  Ce At B  D t  The impulse response can be computed


directly from the coefficient matrices.
EE 3512: Lecture 38, Slide 10
Solution via the Laplace Transform
• Recall our state equations:
x (t )  Ax(t )  Bv (t )
y (t )  Cx(t )  Dv(t )
• Using the Laplace transform on the first equation:
sX( s )  x(0)  AX( s )  BV ( s )
sI  A X( s)  x(0)  BV ( s)
X( s )  sI  A  x(0)  sI  A  BV ( s )
1 1

• Comparing this to:


t
x(t )  e x(0)   e  A t  Bv ( )d , t  0
At

0
reveals that:

e At  L1 sI  A 
1

• Continuing with the output equation:
y (t )  Cx(t )  Dv(t )
The transfer function
Y( s )  CX( s )  DV ( s ) can be computed
1

 sI  A  x(0)  CsI  A  B  D V ( s )
1
 directly from the
• For zero initial conditions: system parameters.


Y( s )  H( s ) X( s ) where H( s )  CsI  A  B  D
1

EE 3512: Lecture 38, Slide 11
Summary
• Introduced the concept of a state variable.
• Described a linear system in terms of the general state equation.
• Demonstrated a process for deriving the state equations from a differential
equation with a simple forcing function.
• Generalized this to an Nth-order differential equation with a more complex
forcing function.
• Demonstrated these techniques on a 1st-order (RC) and 2nd-order (RLC) circuit.
• Observation: We have now encapsulated all passive circuit analysis (RLCs)
into a single matrix equation. In fact, we now have a unified representation for
all linear time-invariant systems.
• Introduced the time-domain and Laplace transform-based solutions to the
state equations.
• Even nonlinear (and non-time-invariant) systems can be modeled using these
techniques. However, the resulting differential equations are more complex.
Fortunately, we have powerful numerical modeling techniques to handle such
problems.

EE 3512: Lecture 38, Slide 12

You might also like