Unit 821
Unit 821
04/05/2025
UNIT - 8
04/05/2025
State-Space Modeling
• Alternative method of modeling a system than
– Differential / difference equations
– Transfer functions
• Uses matrices and vectors to represent the
system parameters and variables
04/05/2025
Motivation for State-Space Modeling
• Easier for computers to perform matrix algebra
– e.g. MATLAB does all computations as matrix math
• Handles multiple inputs and outputs
• Provides more information about the system
– Provides knowledge of internal variables (states)
04/05/2025
Transfer Functions vs. State-Space Models
• Transfer functions provide only input and output
behavior
– No knowledge of the inner workings of the system
– System is essentially a “black box” that performs some
functions
04/05/2025
Definitions
V – Input vector Y – Output vector
• Can be multiple inputs • A function of the input and the
• Written as a column vector present state of the internal
variables
v1 t y1 t
v t y t
vt 2 y t 2
vR t y M t
04/05/2025
Definitions
X – State vector X – “Next state” vector
• Information of the current • Derivative of the state vector
condition of the internal • Provides knowledge of where
variables the states are going
• N is the “dimension” of the state – Direction (+ or -)
model (number of internal state – How fast (magnitude)
variables) • A function fo the input and the
present state of the internal
variables
04/05/2025
DEFINITIONS
State:- The state of a dynamic system is the smallest set of
variables (called state variables) that must be known at any
given instant in order that, the future response of the system to
any specified input may be calculated from the given dynamic
equation. These are the set of variables such that the
knowledge of these variables at t=t0, together with the input
for t>=t0 completely determines the behaiour of the sytems for
any time t>=t0.
04/05/2025
DEFINITIONS
State Variables: The state variables of a dynamic system are the smallest set of
variables which determine the state of the dynamic system. If at least n variables
x1(t),x2(t),………., xn(t) are needed to completely describe the behaviour of a
dynamic system (such that once
the input is given for t>=t0 and the initial state at t=t0 is specified, the future
state of the system is completely determined), then such n variables x1(t), x2(t),
……., xn(t) are a set of variables called STATE variables. It can also be noticed that
the state variables need not be physically measurable or observable quantities.
Practically, however, it is convenient to choose easily measurable quantities for
the state variables because optimal control laws will require the feedback of all
state variables with suitable weight.
State Space The n-dimensional space whose coordinate axes consist of
the x1 axis, x2 axis, ….. xn axis is called a state space. Any state can be
represented by a point in the state space.
04/05/2025
State-Space Equations
General form of the state-space model
x t
Two equations –
y t
x t f xt , vt , t
y t g xt , vt , t
04/05/2025
Linear State-Space Equations
x t Axt Bvt
y t Cxt Dvt
If A, B, C, D are constant over time, then the system is also time invariant
→ Linear Time Invariant (LTI) system
04/05/2025
Construction of State Equations from a
Differential Equation
(Let there be no derivatives of the input)
• Let one state variable equal the (N-1)-th derivative of the output (where N
is the order of the differential equation)
• Find the derivative of each of the newly defined state equations
– In terms of the other state variables and the outputs
• Write the state equations
04/05/2025
The State Variables of a Dynamic System:
The time-domain analysis and design of control systems utilizes the concept
of the state of a system.
The state of a system is a set of variables such that the knowledge of these
variables and the input functions will, with the equations describing the
dynamics, provide the future state and output of the system.
04/05/2025
For a dynamic system, the state of a system is described in terms of a set of
state variables
[ x1 ( t ) x 2 ( t ) x n ( t )]
The state variables are those variables that determine the future behavior of
a system when the present state of the system and the excitation signals are
known. Consider the system shown in Figure 1, where y1(t) and y2(t) are the
output signals and u1(t) and u2(t) are the input signals. A set of state
variables [x1 x2 ... xn] for the system shown in the figure is a set such that
knowledge of the initial values of the state variables [x1(t0) x2(t0) ... xn(t0)] at
the initial time t0, and of the input signals u1(t) and u2(t) for t˃=t0, suffices to
determine the future values of the outputs and state variables.
x 1 a 11 x1 a 12 x 2 a 1n x n b11 u1 b1m u m
x 2 a 21x1 a 22 x 2 a 2 n x n b 21u1 b 2 m u m
x n a n1x1 a n 2 x 2 a nn x n b n1u1 b nm u m
04/05/2025
Thus, this set of simultaneous differential equations can be written in matrix
form as follows:
x1 a 11 a 12 a 1n x1
b11 b1m u1
d x 2 a 21 a 22 a 2n x 2
dt
b n1 b nm u m
x n a n1 a n2 a nn x n
The column matrix consisting of the state variables is called the state vector
and is written as
x1
x
x 2
04/05/2025
xn
The vector of input signals is defined as u. Then the system can be
represented by the compact notation of the state differential equation as
x A x B u
This differential equation is also commonly called the state equation. The
matrix A is an nxn square matrix, and B is an nxm matrix. The state differential
equation relates the rate of change of the state of the system to the state of the
system and the input signals. In general, the outputs of a linear system can be
related to the state variables and the input signals by the output equation
y C x D u
Where y is the set of output signals expressed in column vector form. The
state-space representation (or state-variable representation) is comprised of
the state variable differential equation and the output equation.
04/05/2025
We can write the state variable differential equation for the RLC circuit as
1
0 1
x C x u(t)
1 R
C
0
L L
and the output as
y 0 R x
The solution of the state differential equation can be obtained in a manner
similar to the approach we utilize for solving a first order differential equation.
Consider the first-order differential equation
x ax bu
Where x(t) and u(t) are scalar functions of time. We expect an exponential
solution of the form eat. Taking the Laplace transform of both sides, we have
04/05/2025
s X (s) x 0 a X (s) b U (s)
therefore,
x (0) b
X (s) U (s)
s a s a
t
x ( t ) e at x (0) e a ( t ) b u () d
0
We expect the solution of the state differential equation to be similar to x(t)
and to be of differential form. The matrix exponential function is defined
as
A2t 2 Ak t k
e At I At
2! k!
04/05/2025
which converges for all finite t and any A. Then the solution of the state
differential equation is found to be
t
x ( t ) e At x (0) e A ( t ) B u () d
0
t
x ( t ) ( t ) x (0) ( t ) B u () d
0
04/05/2025
THE TRANSFER FUNCTION FROM THE STATE EQUATION
x A x B u
y C x
where y is the single output and u is the single input. The Laplace transform
of the equations
04/05/2025
[sI A ] X (s) B U (s)
X (s) sI A BU(s) (s)BU(s)
1
Y (s) C(s)BU(s)
Therefore, the transfer function G(s)=Y(s)/U(s) is
G (s) C(s)B
Example:
Determine the transfer function G(s)=Y(s)/U(s) for the RLC circuit as described
by the state differential function
1
0 1
x C x u , y 0 R x
1 R C
0
L L
04/05/2025
R 1
1 1 s L
(s) sI A C
1
s C
sI A 1 (s) 1
R s
s L
L L
R 1
(s) s 2 s
L LC
Then the transfer function is
R
s
L 1 1
G (s) 0 R (s) C (s) C
0
1 s
L (s) (s)
R / LC R / LC
G (s)
(s) 2 R 1
s s
L LC
04/05/2025
State transition matrix
d
x(t ) Ax(t ) Bu (t )
dt
y (t ) Cx (t ) Du (t )
The behavior of x(t) et y(t) :
1. Homogeneous solution of x(t)
2. Non-homogeneous solution of x(t)
04/05/2025
Homogeneous solution
x (t ) Ax(t ) 1 1
x(t ) L [( sI A) ]x(0)
sX ( s ) x(0) AX ( s )
e At x(0)
X ( s ) ( sI A) 1 x(0)
State transition matrix
(t ) e At L 1[( sI A) 1 ]
x(t0 ) e At0 x(0)
At 0
x(0) e x(t0 )
At At 0 A( t t0 )
x(t ) e e x(t0 ) e x(t0 ) (t t0 ) x(t0 )
04/05/2025
Properties
(t ) e At L 1[( sI A) 1 ]
1. (0) I
1
2. (t ) ( t )
3. x(0) ( t ) x(t )
4. (t 2 t1 ) (t1 t0 ) (t 2 t0 )
k
5. (t ) (kt )
04/05/2025
Non-homogeneous solution
d
x(t ) Ax(t ) Bu (t )
dt
y (t ) Cx (t ) Du (t )
sX ( s ) x(0) AX ( s ) BU ( s )
( sI A) X ( s ) x(0) BU ( s )
1 1
X ( s ) ( sI A) x(0) ( sI A) BU ( s )
x(t ) L 1[( sI A) 1 ]x(0) L 1[( sI A) 1 BU ( s )]
t
x(t ) (t ) x(0) (t ) Bu ( )d
0
04/05/2025
t
x(t ) (t ) x(0) (t ) Bu ( )d
0
t
x(t ) (t t0 ) x(t0 ) (t ) Bu ( )d
t0
t
y (t ) C (t t0 ) x(t0 ) C (t ) Bu ( )d Du (t )
t0
04/05/2025
Example 1 x 1 0 1 x1 0
x 2 3 x 1 u (t )
2 2
x(0) 0 0
T
let
t 2t
2e e e 1 e 2t
(t ) L 1[( sI A) 1 ] e At t 2t
2 e 2 e e t 2e 2 t
t
x(t ) (t ) x(0) (t ) Bu ( )d
0
Ans: 1 3
x1 2e t e 2t
L 1[( sI A) 1 BU ( s )]
x 2 2
2 2e 2e 2t
t
04/05/2025
(t ) L 1[( sI A) 1 ]
x 1 0 1 0 x1 0 0
x 0 4 3 x 1 0 u1
2 2 u
x 3 1 1 2 x3 0 1 2
x1
y
1 ( t ) 1 0 0
y (t ) 0 0 1 x2
2 x
3
adj ( sI A)
( sI A) 1
sI A
s 2 6 s 11 s 2 3
1 2
3 s 2 3s
s ( s 4)( s 2) 3 3s
s4 s 1 s 4 s
2
04/05/2025