Vous êtes sur la page 1sur 8

Outline

What are state variables and why use


Modeling in the Time Domain them?
State-space models for physical systems.
M. Sami Fadali Electrical circuits.
Professor of Electrical Engineering Mechanical systems.
University of Nevada State-space models from transfer
functions.
1 2

Modeling in the Time Domain State-space Models


Input-output differential equations. State Equations: 1st order differential equation
governing the state variables.
State-space models: involve the inputs, the
outputs and state variables. nth order differential equation n initial
conditions needed n state variables needed
State variables: Minimal set of variables that
completely describe a dynamic system. Output Equation: algebraic equation relating
the output to the state variables and the inputs.
State-Space Representation: state and output
equations.
3 4
Procedure: Writing State Equations
Advantages of State Variables
1.Select a set of linearly independent system
Allow the use of vector-matrix formulation. variables. For physical state variables use
Allow numerical solution of differential (a) position and velocity with mechanical systems
equations (all numerical integration routines (b) inductor currents & capacitor voltages for
solve 1st order equations). circuits.
Allow the development of many control ( no. variables = no. of initial conditions
system design methodologies. = no. independent energy storage elements).

5 6

Example: point mass


Writing State Equations (cont.) 2nd order differential equation
2 state variables needed
2. Write a 1st order differential equation for
each state variable.
State equations
3. Write an output equation relating each
output to the state variables and inputs.
Output equation
Mechanical Systems
2 state variables /eqn. of motion
7 8
Example R-L-C Circuit
ExampleR-C Circuit 2 energy storage elements 2 state variables
KVL
R

dVc Vin Vc
ic C Vin C Vout
dt R
State equations
Vout R

L
Vin C
State equation iL Output equation
Output equation
9 10

Matrix Form Linear State Equations


L
x1 R x1 1 x2 1 u
L L
State Equation
x2 1 x
C1

Output Equation
y u Rx1 x2

state equation
= state (system) matrix
x1 R L 1 L x1 1 L
x 1 C
0 x 2 0
u = input matrix
2
= output matrix
x
y R 1 1 u output equation = direct transmission (feedforward) matrix
x2
11 12
Ex. 2.11 Equations of Motion
State-space Model
m 1 y1 b1 y 1 b 3 y 1 y 2 k 1 y 1 k 2 y 1 y 2 f m1 x3 k1 k 2 x1 k 2 x2 b1 b3 x3 b3 x4 u
m 2 y 2 b 2 y 2 b 3 y 2 y 1 k 3 y 2 k 2 y 2 y 1 0
m2 x4 k 2 x1 k 2 k3 x2 b3 x3 b2 b3 x4
x1 y1 , x2 y2 , x3 y1 , x4 y2 , u f 0 0 1 0
1

x x1 0
x 0
0 0 0 1
x k k k2 b1 b3 b3
x3 2 1 2
2 1 u
x3 x1 x2 x4 u x3 m1 m1 m1 m1 x3 m
x k 2 k 3 b2 b3 x 1
m1 y1 k1 k 2 y1 k 2 y2 b1 b3 y1 b3 y 2 f 4
k2 b3
4 0
m2 m2 m2 m2
m2 y2 k 2 y1 k 2 k3 y2 b3 y1 b2 b3 y 2
y1 1 0 0 0
y
x4 x1 x2 x3 x4
0 1 0 0 x
13 2 14

State Equations From Transfer Function Phase Variables


Ordinary Differenti al Equation
I. No TF Zeros: No input derivatives
dny d n1 y dy
a a1 a0 y
dt n n 1
dt n 1
dt dny d n1 y dy
a a a0 y b0u
dt n1
m 1 n 1 1
d um
d u du dt n dt
bm m bm1 m1 b1 b0u
dt dt dt x1 y x1 x2
Transfer Function
dy
Y ( s ) bm s m bm1s m1 b1s b0 x2 Use definitions
G( s) n
xn1 xn
dt
U ( s) s an1s n1 a1s a0
d n1 y xn an1 xn a1 x2 a0 x1 b0u
Write state-space equations from the xn
dt n1 y x1
differential equation or transfer function.
15 16
Simulation Diagram 1 Phase Variables
d y n
d n1 y dy
y(t) n
a n 1 n 1
a1 a0 y b0u
u(t) x n (t ) xn(t)
xn1(t)
x2(t)
x1(t)
dt dt dt
b0 + 1/s 1/s 1/s 1/s 1/s
d n yb d n1 yb dy
n
an1 n1 a1 b a0 yb u
a n1 dt dt dt
a n2 yb y b0
x1 yb x1 x2
a0
dyb
x2
dt xn1 xn
Simulation Diagram: Represent each state and xn an1 xn a1 x2 a0 x1 u
output equation in terms of summers, gains,
d n1 yb y b0 x1
and integrators (1/s). xn n1
17 dt 18

Simulation Diagram 2 Matrix Form


x n (t ) xn(t) x2(t)
u(t) x1(t) y(t)
+ 1/s 1/s 1/s 1/s 1/s b0

a n1

a n2

a 0

19 20
Phase Variable Form: No Zeros II. Input Derivatives (TF Zeros)
Y ( s) b s n1 b1s b0
b0 H (s) n n1 n1 d
H (s) n U ( s ) s an1s a1s a0
s an1s n1 a1s a0
X 1 (s) 1
n
U ( s ) s an1s n1 a1s a0
0 0 n11
Y ( s ) bn1s n1 b1s b0 X 1 ( s ) d U ( s )
I n1
x (t ) n11 x (t ) 1 u (t )

0 a a1 a n 1
y (t ) b0 01n1 x(t )
State-space equation: like transfer function
with no zeros
21 22

Output Equation Phase Variable Form: Zeros


Y ( s ) bn1s n1 b1s b0 X 1 ( s ) d U ( s )
Inverse Laplace transform bn 1s n 1 b1s b0
H (s) n d

y (t ) bn1
d n1 d
b1 b0 x1 (t ) d u (t )
s an 1s n 1 a1s a0
dt dt
1
d 0 I n1 0 n11
x n11 x 1 u
b0 b1 bn1 dt x1 (t ) d u (t )

d n1
0 a a1 a n 1

dt
y b0 b1 ... bn2 bn1 x du (t )
y (t ) b0 b1 ... bn2 bn1 x d u (t )
23 24
Example MATLAB
a = [0, 1; 5, 4];b=[0;1];c=[1,1];d=0;
Write state-space equations for the transfer p = ss(a, b, c, d)
a=
function x1 x2
x1 0 1
x2 -5 -4
b=
u1

0 1 0 0 x1
x2
0
1

x 0 0 1 x 0u
c=
x1 x2
y1 1 1
1 0 2 1 d=
u1
y 4 1 0x y1 0
Continuous-time system.
25 26

Phase Variable Form Simulation Diagram: Phase Variables


x1 x2 d

xn1 xn b2

xn an1 xn a1 x2 a0 x1 u xn
b1

xn1 x3 x2

y b0 x1 b1 x2 bn1 xn d u (t )
u x1 y
+ 1/ s 1/ s 1/ s 1/ s 1/ s +
b0

an 1

Simulation Diagram: Represent each state an 2

and output equation in terms of summers,


gains, and integrators. a0
27 28
Example 1 State-space Equations
s 2 2s 3
2 s 5s 12 s 5
3 2
G (s) 2 3
G(s) s 2 s 2 5s 1
s 3 2 s 2 5s 1
2 s 3 5s 2 12 s 5 2s 3 2 s 2 5s 1
= (column)
2
s 3 2 s 2 5s 1 0 21 I2 0 21
x x u
s 2 2s 3 1 5 2 1
G(s) 2 3
s 2 s 2 5s 1 y 3 2 1x 2u (t )
29 30

Example 2
s2 3
G( s) 3
s 2 s 2 5s 10
=

0 21 I2 0 21
x x u
10 5 2 1
y 3 0 1x
31

Vous aimerez peut-être aussi