Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
39 views

Linearization Ss

This document discusses linear state-space models for modeling process dynamics and control. It provides examples of state variables for common systems like two tanks and defines states as variables that completely describe system dynamics. It also describes determining steady states, linearizing nonlinear models around operating points, and interpreting the resulting linear state-space models in terms of states, inputs, outputs, and system properties.

Uploaded by

MY PRACTICE
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views

Linearization Ss

This document discusses linear state-space models for modeling process dynamics and control. It provides examples of state variables for common systems like two tanks and defines states as variables that completely describe system dynamics. It also describes determining steady states, linearizing nonlinear models around operating points, and interpreting the resulting linear state-space models in terms of states, inputs, outputs, and system properties.

Uploaded by

MY PRACTICE
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

CH3050: Process Dynamics and Control

Linear State-Space Models

Arun K. Tangirala

Department of Chemical Engineering, IIT Madras

A.K. Tangirala, IIT Madras Process Dynamics and Control 1


State-space representations

Traditional representations of systems directly describe the input-output relationship. However, a different
and useful description of the system can be arrived by assuming the presence of an intermediary quantity
known as the state.

In a state-space description, the inputs are assumed to produce


changes in “states”, which in-turn transmit these changes to the
outputs instantaneously.

A.K. Tangirala, IIT Madras Process Dynamics and Control 2


States

▶ States of a system are a set of dynamically changing (usually fictitious) hidden


quantities, the knowledge of whose, provides a complete knowledge of the system.
▶ A given system may be characterized by several states. However, usually one works with a
minimal realization description, i.e., the minimal set of states that are sufficient to
describe the system.
▶ The common phrase “steady-state” refers to that condition of the process when all its
states have steadied out.

A.K. Tangirala, IIT Madras Process Dynamics and Control 3


Examples

1 Two tank system: input - inlet flow to Tank 1, output - liquid level reading in Tank 2
(h2 ), states - h1 , h2 .
2 Spring-damper-flywheels system: input - torque to flywheel 1 (connected to the
spring), output - angular position of flywheel 1 (θ1 ), states - θ1 , θ̇1 , θ̇2 .
3 RLC system: Two inductors, a single capacitor and a resistor. input - total current,
output - voltage across inductor 1, states - current through the inductors and voltage
across the capacitor.

A.K. Tangirala, IIT Madras Process Dynamics and Control 4


Two other scenarios

1 Inferential Sensing: Quite often, it happens that the measured variable is not the
physical variable of interest.
▶ For e.g., instead of measuring composition we measure temperature In such cases, it is useful
to write descriptions involving those “hidden” unmeasured quantities
▶ The “hidden” (directly unobserved) quantities can be termed as states of a process since
they internally characterize process conditions.

2 Mathematical Decomposition: In many applications, it is convenient to break-up a


higher-order system as an interconnection of first-order dynamical subsystems.
▶ Outputs of such coupled first-order subsystems are essentially internal variables and treated
as states.

A.K. Tangirala, IIT Madras Process Dynamics and Control 5


Important mathematical restriction on the definition

To summarize, states are those (usually “’internal”) variables that change dynamically and
whose trajectory provides the complete dynamic response of an input-output system. However,
this definition can give rise to technical ambiguities.

To establish a mathematical uniformity, states are defined as those “internal” dynamical


variables (of the input-output system) that are responses of internal first-order subsystems.

1 This new restriction can give rise to states that are not necessarily physically meaningful
(fictitious), but brings about a mathematical uniformity (not necessarily uniqueness).
2 Several such sets of internal variables may exist, but we are only interested in a minimum subset.

A.K. Tangirala, IIT Madras Process Dynamics and Control 6


State-space (SS) Models

A general non-linear state-space model is represented as:

ẋ = f (x, u, p) (State equation)


y = g(x, u, p) (Output equation)

where
x: States (Variables that completely describe the dynamics of the system
and not necessarily directly observed)
u: Inputs
y: Outputs
f & g: Non-linear functions of the inputs, states and parameters

A.K. Tangirala, IIT Madras Process Dynamics and Control 7


Solving non-linear state-space models

1 Analytical methods: Advantages - Gives a general solution in terms of known


parameters. Useful for simulation and analysis. Disadvantages - Quite impractical to use
since most of the equations are non-linear and therefore unsuitable for explicit solutions.
2 Numerical solutions; Advantages - Almost always suitable for any type of model
equation. Disadvantages - Solution sensitive to the choice of numerical algorithm. More
importantly, the design and analysis of controller becomes very difficult and complicated.
3 Linearization: Advantages - Analytical solution is made possible. Linear models are
simpler to understand and easier to analyze. Limitations - Resulting analysis is valid only
if the process is linear around the operating regime. Linear models may not be able to
explain the behaviour of several non-linear processes.

A.K. Tangirala, IIT Madras Process Dynamics and Control 8


Linearization

Approximate linear or linearized models are built using first-order expansions of non-linear ODEs
around a nominal or steady-state operating point.

Procedure:

1 Determine the steady-state (if the nominal point is not known). For this purpose, solve
the algebraic equations resulting from ODEs.
2 Develop the first-order approximation around the identified steady-state using Taylor’s
series expansion.

Note: There exist other linearization techniques too, such as exact linearization, feedback linearization,
and empirical linearization.
A.K. Tangirala, IIT Madras Process Dynamics and Control 9
Determining the steady-state

Form: f (x) = 0.

▶ Generally possesses multiple solutions. Number of solutions known exactly for

polynomials only. Reject those solutions which are not physically meaningful.

▶ Iterative techniques are employed. Require an initial guess.

▶ Solutions can be highly sensitive to initial guess.

▶ Final solutions depend on convergence tolerance (absolute and/or relative).

Matlab: fzero, root, fsolve; trim and findop (with SIMULINK models).

A.K. Tangirala, IIT Madras Process Dynamics and Control 10


Linearization of a general state-space model
Note that the linearized
A general state-space model models are always in
ẋ = f (x, u, p) terms of deviational
y = g(x, u, p) quantities. Hereafter, we

can be linearized to yield a linear state-space model (locally linear): remember this fact and
x̃˙ = Ax̃ + Bũ drop the bar notation for
ỹ = Cx̃ + Dũ convenience sake.

where the elements of matrices A, B, C and D are calculated as: Matlab: linmod and

∂fi

∂fi linearize (with
aij = ; bij =
∂xj xs ,us ∂uj xs ,us SIMULINK models).

∂gi ∂gi
cij = ; dij =
∂xj xs ,us ∂uj xs ,us

A.K. Tangirala, IIT Madras Process Dynamics and Control 11


Interpreting the state-space model

▶ The state equation describes the inertial part of the process. It tells us how the input
affects the internal quantities of a system.
▶ Each state equation is a first-order differential equation.

▶ The number of states (in a minimal realization) is said to be the order of the
system.

▶ In general, the states can be inclusive of process, sensor and actuator dynamics.

▶ Delays in the system manifest result in infinite-order (transcendental) state-space


models.

A.K. Tangirala, IIT Madras Process Dynamics and Control 12


Interpreting the SS model . . . contd.

▶ The output equation is an algebraic equation.


▶ It quantifies how the states affect measurements y[k] (thus, C could be thought of a
calibration matrix).

▶ The matrix D quantifies the direct effect of the input (e.g., bypass or recycle) and is
also known as the feedthrough term.

▶ For strictly causal systems, D = 0

Note: Only the matrix Ad is a square, while the remaining matrices are in general rectangular
with appropriate dimensions.

A.K. Tangirala, IIT Madras Process Dynamics and Control 13


Example: Two tanks in series

System: Two tanks in series with interaction. The outlet flow rate of the first tank is
proportional to the square root of the difference of the liquid levels, while the outlet flow rate
of the second tank is proportional to the square root of the liquid level in the second tank.

Assumptions: Constant density

Mass balance equations:

dh1 dh1 Fi Cv1 p


A1 = Fi − Fo1 =⇒ = − h1 − h2
dt dt A1 A1
dh2 dh2 Cv1 p Cv2 p
A2 = Fo1 − Fo2 =⇒ = h1 − h2 − h2
dt dt A2 A2

A.K. Tangirala, IIT Madras Process Dynamics and Control 14


Two tanks example . . . contd.

We shall now attempt to find a linear model of the form

ẋ = Ax + Bu
y = Cx + Du

that is good for small changes around the steady state.

States: h1 , h2 ; Inputs: Fi ; Outputs: h1 , h2 ; Parameters: A1 , A2 , β.

Size of the matrices: A is a 2 × matrix, B is a 2 × 1 array, C is a 2 × 2 matrix, and D is a


2 × 1 array.

A.K. Tangirala, IIT Madras Process Dynamics and Control 15


Two tanks example · · · continued

∂f1 C ∂f1 C
a11 = =− √ v1 a12 = = √ v1
∂x1 xs ,us 2A1 h1s − h2s ∂x2 xs ,us 2A1 h1s − h2s

∂f2 C ∂f2 C Cv2
a21 = = √ v1 a22 = =− √ v1 − √
∂x1 xs ,us
2A2 h1s − h2s ∂x2 xs ,us
2A2 h1s − h2s 2A2 h2s


∂f1 1 ∂f2
b11 = = ; b21 = =0
∂u1 xs ,us A1 ∂u1 xs ,us

while for the output equation


   
1 0 0
C=  D= 
0 1 0

Observe the structure of B and D matrices - are they physically meaningful?


A.K. Tangirala, IIT Madras Process Dynamics and Control 16
Non-uniqueness of SS models

Consider a state space representation of an input-output system


 
A B
G= 
C D

Suppose we choose a new set of states x = Tw, where T is a non-singular transformation


matrix. Then, the state-space model in the w space is
 
T−1 AT T−1 B
G=  (1)
CT D

Observe that the feedthrough matrix D remains invariant to choice of states, as is expected.
A.K. Tangirala, IIT Madras Process Dynamics and Control 17
Non-uniqueness of SS representations . . . contd.

▶ Transforming the states (rotating the state-space co-ordinates) leads to a new choice of
states and a different SS model.
▶ Since an infinite number of (non-singular) transformations are possible, SS representation
for a given system is not unique =⇒ states can be mere mathematical entities!
▶ Empirical modelling (models from sampled-data) gives only one such SS representation.
Therefore, (in general) such SS models cannot be necessarily given physical interpretation.
▶ Choosing a transformation matrix such that the A matrix is diagonal results in decoupled
ODEs and simplifies the solution procedure.

A.K. Tangirala, IIT Madras Process Dynamics and Control 18


Response Analysis of Models

A.K. Tangirala, IIT Madras Process Dynamics and Control 19


Determining the response

The linearized SS model can be solved analytically for determining the response to

1 Non-zero initial conditions (free or natural response)


2 Non-zero input (forced response)

The total response of a linear time-invariant system is the sum of these responses

Total response = Free response + Forced response (2)

Natural response can be easily determined using diagonalization of A. Forced response is derived
using techniques of differential calculus or using transform techniques.

Both forms of response are significantly influenced by the eigenvalues of transition matrix A.

A.K. Tangirala, IIT Madras Process Dynamics and Control 20


Diagonalization of state-space models
Consider new states w(t) such that Tw(t) = x(t), where T is a matrix of non-singular matrix.

d dw(t)
Then (Tw(t)) = A(Tw(t)) + Bu(t) =⇒ = T−1 ATx(t) + T−1 Bu(t)
dt dt
If we choose T to be the matrix of eigenvectors V, then the new SS model is,

dw(t)
= V−1 AVw(t) + V−1 Bu(t) = Λw(t) + V−1 Bu(t)
dt
For now, assuming u(t) = 0, the decoupled ODEs are:

ẇ1 = λ1 w1 (t) =⇒ w1 (t) = eλ1 t w1 (0)


ẇ2 = λ2 w2 (t) =⇒ w2 (t) = eλ2 t w2 (0)
.. .
. = ..
ẇn = λn wn (t) =⇒ wn (t) = eλn t wn (0)
A.K. Tangirala, IIT Madras Process Dynamics and Control 21
Solution via diagonalization · · · continued

Thus, the solution can be written as


 
eλ1 t 0 ··· 0
 
 0 eλ 2 t ··· 0
 
 w(0) = eΛt w(0)

w(t) =  .. .. 
 . . 
 
0 0 0 eλn t

We can now write the solution in terms of the original states x(t),

x(t) = Tw(t) = VeΛt w(0)

The final solution is therefore, x(t) = VeΛt V−1 x(0) = eAt x(0)

A.K. Tangirala, IIT Madras Process Dynamics and Control 22


Interpretation
1 Consequent to the foregoing result,
nx
X
x(t) = αi eλi t ; If T = V, αi = wi (0)vi (3)
i=1

2 The coefficient wi (0) determines the extent to which x(0) in the direction of vi since,
nx
X
x(t) = Vw(t) = wi (t)vi (4)
i=1

3 Eigenvalues of A determine the “slowness” or “fastness” and the stability of the


system’s response.
4 Eigenvectors of A determine the “slow” or “fast” directions of initial conditions for free
or natural response.
A.K. Tangirala, IIT Madras Process Dynamics and Control 23
Asymptotic or free-response stability of LTI systems

The system described by ẋ(t) = Ax(t) is asymptotically stable if and only if

All the eigenvalues of A are negative

i.e., if and only if λi (A) < 0 i = 1, · · · , nx (no. of states)

▶ Even if one of the eigenvalues λi is positive, the system’s response is unbounded.


▶ But what would happen if wi (0) associated with positive eigenvalues λi > 0, is
wi (0) = 0, i.e., the component of x(0) along the unstable directions is zero?

A.K. Tangirala, IIT Madras Process Dynamics and Control 24


Example: System I

Consider a system described by

ẋ1 = −0.5x1 + x2
ẋ2 = − 2x2

Analyze the stability of this system and its response to two different initial conditions, (i)
h iT h iT
x[0] = 1 0 and (ii) x[0] = −0.5547 0.8321 .

A.K. Tangirala, IIT Madras Process Dynamics and Control 25


MATLAB Script

1 % Generate the state - space object


2 A = [ -0.5 1; 0 -2]; B = [0 ; 0]; C = eye (2) ; D = 0
3 mod_ss = ss (A ,B ,C , D )
4 get ( mod_ss ) % Examine the attributes of the SS object
5

6 % Examine the eigenvalues and eigenvectors


7 [V , L ] = eig ( mod_ss . A )
8

9 % Simulate the free response


10 x0 = [1 0] ’;
11 initial ( mod_ss , x0 ) % Computes and plots free response , OR
12 ltiview ( mod_ss ) % Opens up LTI viewer , a GUI for responses

A.K. Tangirala, IIT Madras Process Dynamics and Control 26


Responses of System 1

T T
Response to non-zero initial conditions x(0) = [1 0] Response to non-zero initial conditions x(0) = [-0.5547 0.8321]
1 0

-0.2
x1 (t)

x (t)
0.5

1
-0.4

0 -0.6
0 2 4 6 8 10 12 14 16 18 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5

1 1

0.5
x2 (t)

x (t)
0 0.5

2
-0.5

-1 0
0 2 4 6 8 10 12 14 16 18 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5
Time Time

x(0) in the direction of “slow” eigenvector x(0) in the direction of “fast” eigenvector

A.K. Tangirala, IIT Madras Process Dynamics and Control 27


Example: System II

Consider another system described by

ẋ1 = 2x1 + x2
ẋ2 = 2x1 − x2

Analyze the stability of this system and its response to initial conditions in the directions of
eigenvectors.

A.K. Tangirala, IIT Madras Process Dynamics and Control 28


Responses

T T
10 24Response to initial conditions x(0) = [0.8719 0.4896] Response to initial conditions x(0) = [-0.2703 0.9628]
10 0

-0.1
x (t)

x (t)
5
1

1
-0.2

0 -0.3
0 5 10 15 20 25 0 1 2 3 4 5 6

24
10
6 1

4
x (t)

x (t)
0.5
2

2
2

0 0
0 5 10 15 20 25 0 1 2 3 4 5 6
Time Time

x(0) in the direction of “unstable” eigenvector x(0) in the direction of “stable” eigenvector

A.K. Tangirala, IIT Madras Process Dynamics and Control 29

You might also like