100% found this document useful (1 vote)
393 views60 pages

Part 2 State Space Control LTI Systems V3

The document discusses state space representation of linear time invariant (LTI) systems. It provides an outline of topics covered, which include general state space representation, converting between transfer functions and state space, time domain solutions, controllability and observability, state space design, and discrete-time state space equations. An example mechanical system is converted to state space form by selecting position and velocity as state variables and deriving the state equations.

Uploaded by

cmrwarmy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
393 views60 pages

Part 2 State Space Control LTI Systems V3

The document discusses state space representation of linear time invariant (LTI) systems. It provides an outline of topics covered, which include general state space representation, converting between transfer functions and state space, time domain solutions, controllability and observability, state space design, and discrete-time state space equations. An example mechanical system is converted to state space form by selecting position and velocity as state variables and deriving the state equations.

Uploaded by

cmrwarmy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 60

Part 2

State Space Control of LTI


Systems
State space representation of Linear Time
Invariant Systems
• Outline:
• 1- Introduction
• 2- General state space representation.
• 3. Converting transfer function to state space
• 4 State space representation to transfer function
• 5 Time domain solution of state equations
• 6 Controllability and observability
• 7 State Space Design
• 8 Discrete-time state space equations
• 9 Linearization of nonlinear systems
Modeling in The Time Domain
State-space Method
Two approaches are available for the analysis and design of feedback control systems.
1. Frequency domain approach (classical approach): based on converting a system’s differential equation to a transfer function.
• Advantage: rapidly providing stability and transient response information. Thus
we can immediately see the effects of varying system parameters.

• Disadvantage: limited application. It can be applied only for linear, time-invariant


systems or systems that can be approximated linearized around an equilibrium point.
• Initial condition problem: To calculate the transfer function of LTI in frequeny domain ,
all initial conditions should be zero.
2. State-space approach (time domain / modern approach):

Can be used: a) To represent non-linear systems that have backlash, saturation, dead zone.
b) It can handle systems with nonzero initial conditions.
c) Multiple-inputs, multiple-outputs systems can easily be represented.
d) Many commercial software packages are available.

State-space approach is rich in information (state variable) with regards to the transfer function
which is considered as a black Box
3
The General State-Space Representation

Some Terminology
none of the variables can be written as
• Linear combination: (of 𝑛 variables 𝑥𝑖 ) a linear combination of the others.

• Linear independence: S is zero if every 𝐾𝑖 is zero and no 𝑥𝑖 is zero: variables 𝑥𝑖 are linearly independent.
• System variable: Any variable that responds to an input or initial conditions in a system.
• State variables: The smallest set of linearly independent system variables that completely determines (knowing the value at
𝑡0) the value of system variables for 𝑡 ≥ 𝑡0
• State vector: A vector whose elements are state variables.

• State space: The 𝑛-dimensional space whose axes are the state variables.

• State equations: A set of 𝑛 simultaneous, first-order differential equations with 𝑛 variables (state variables).

• Output equation: The equation that expresses the output variables of a system as linear combinations of the state variables and
the inputs.

4
State-space Representation
• A system is represented in state-space by the following equations: 𝑥: 𝑠𝑡𝑎𝑡𝑒 𝑣𝑒𝑐𝑡𝑜r
𝑥:ሶ 𝑑𝑒𝑟𝑖𝑣𝑎𝑡𝑖𝑣𝑒 𝑜𝑓 𝑡ℎ𝑒 𝑠𝑡𝑎𝑡𝑒 𝑣𝑒𝑐𝑡𝑜𝑟 𝑤. 𝑟. 𝑡. 𝑡𝑖𝑚𝑒
𝑦: 𝑂𝑢𝑡𝑝𝑢𝑡 𝑣𝑒𝑐𝑡𝑜𝑟
𝑥ሶ = 𝐴 𝑥 + 𝐵 𝑢 State equation 𝑢: 𝑖𝑛𝑝𝑢𝑡 𝑜𝑟 𝑐𝑜𝑛𝑡𝑟𝑜𝑙 𝑣𝑒𝑐𝑡𝑜𝑟
ቊ 𝐴: 𝑠𝑦𝑠𝑡𝑒𝑚 𝑚𝑎𝑡𝑟𝑖𝑥
𝑦 = 𝐶 𝑥 + 𝐷 𝑢 Output equation 𝐵: 𝑖𝑛𝑝𝑢𝑡 𝑚𝑎𝑡𝑟𝑖𝑥
𝐶: 𝑜𝑢𝑡𝑝𝑢𝑡 𝑚𝑎𝑡𝑟𝑖𝑥
𝐷: 𝑓𝑒𝑒𝑑𝑓𝑜𝑟𝑤𝑎𝑟𝑑 𝑚𝑎𝑡𝑟𝑖𝑥
• This representation of a system provides complete knowledge of all variables of the system at any 𝑡 ≥ 𝑡0
• is not unique.
• The choice of state variables: • minimum number (equals the order of the differential equation).
• are linearly independent.
Problem:
Given the following system:
Set the system on the following state-space form:

Solution:
State-space model:

5
Example-1: State-space Representation
Problem:
Find a state-space representation of the following electrical network if
the output is 𝑖𝑅 the current through the resistor, (𝑣(𝑡) is the input).

Solution:
The following steps will yield a viable (practicable) representation of the network in state space.
Step 1: Label all the branch currents in the network (These include 𝑖𝐿 , 𝑖𝑅 , and 𝑖𝐶 ).
Step 2: Select the state variables (quantities that are differentiated 𝑣𝐶 and 𝑖𝐿 , energy-storage elements, the inductor L and the
capacitor C) and write derivative equations.
𝑠𝑡𝑎𝑡𝑒
𝑣𝑒𝑐𝑡𝑜r
𝑣𝐶 𝐷𝑒𝑟𝑖𝑣𝑎𝑡𝑖𝑣𝑒 𝑣ሶ𝑐
𝑥= 𝐼 𝑥ሶ =
𝐿 𝐼𝐿ሶ
Step 3: Express non-state variables (right-hand side: 𝑖𝐶 and 𝑣𝐿 ) as a linear combinations of the state variables (differentiated
variables: 𝑣𝐶 and 𝑖𝐿 ) and the input, 𝑣 𝑡 .
𝑣𝑅 = 𝑣𝐶 .
𝑖𝑐 = 𝑓(𝑣𝐶 , 𝑖𝐿 , 𝑣) Apply Kirchhoff’s voltage and current laws, to obtain 𝑖𝐶 and
𝑣𝐿 in terms of the state variables, 𝑣𝐶 and 𝑖𝐿 and the input 𝑣(𝑡).
𝑣𝐿 = 𝑓(𝑣𝐶 , 𝑖𝐿 , 𝑣)
6
Example-1: State-space Representation-contd.
Step 4: Obtain state equations: (by substituting the values and rearranging)

Matrix Form
𝑑𝑣𝐶 1 1
=− ∙ 𝑣𝐶 + ∙ 𝑖 + 0 ∙ 𝑣(𝑡)
𝑑𝑡 𝑅𝐶 𝐶 𝐿 State
𝑑𝑖𝐿 1 1 equation
=− ∙ 𝑣 + 0 ∙ 𝑖𝐿 + ∙ 𝑣(𝑡)
𝑑𝑡 𝐿 𝐶 𝐿

Step 5: Find the output equation: Matrix Form 1 output


𝑣𝑅 𝑖𝑅 = ∙ 𝑣𝐶 + 0 ∙ 𝑖𝐿 + 0 ∙ 𝑣(𝑡)
𝑅
equation

𝑖𝑅 = and 𝑣𝑅 = 𝑣𝑐
𝑅
Final result: Convert into vector-matrix form

𝑥ሶ = 𝐴 𝑥 + 𝐵 𝑢

𝑦 =𝐶𝑥+𝐷𝑢

7
Example-2: State-space Representation
(Translational Mechanical System)

For M1:
Time domain
(1)

For M2:
State vector State equations:

𝑥1 𝑥ሶ 1 (3)
(2)
𝑣 𝑣ሶ
𝑋 = 𝑥1 𝑋ሶ = 1 1 , (4)
2 𝑥ሶ 2
Let, 𝑣2 𝑣ሶ 2
(5)
(acceleration = derivative of velocity)
2 , (6)
Select x1, x2, v1, v2 as state variables. matrix form.
𝑑𝑥1 𝑑2 𝑥1 𝑑𝑣1 𝑥ሶ 1
0 1 0 0
𝑥1 0
= 𝑣1 (3) = = 𝑣ሶ1 (4) 𝑣ሶ 1 − 𝐾ൗ𝑀 − 𝐷ൗ𝑀 + 𝐾ൗ𝑀 0 𝑣 0
𝑑𝑡 𝑑𝑡 2 𝑑𝑡 = 1 1 1 1
+ 0 𝑓(𝑡)
𝑥ሶ 2 0 0 0 1 𝑥2
1ൗ
𝑋ሶ = 𝐴 𝑋 + 𝐵 𝑈
𝑑𝑥2 𝑑2 𝑥2 𝑑𝑣2 𝑣ሶ 2 𝐾ൗ
𝑀2 0 − 𝐾ൗ𝑀 0 𝑣2 𝑀2
= 𝑣2 (5) = = 𝑣ሶ 2 (6) 2
𝑑𝑡 𝑑𝑡 2 𝑑𝑡 8
Converting a Transfer Function to State Space
Phase variables: A set of state variables where each state variable is defined to be the derivative of the previous state variable.

Consider a differential equation,

Choose the output, y(t), and its derivatives as the state variables, 𝑥𝑖 .

9
Converting a Transfer Function to State Space
matrix form,
output 𝑥1
𝑥ሶ1 𝑥1 0 𝑥2
𝑥ሶ 2 𝑥2 0 𝑥3
𝑥ሶ 3 𝑥3 0 𝑢 𝑦= 1 0 0 … 0 ⋮
= ⋮ + ⋮
⋮ 𝑥𝑛−1
𝑥ሶ 𝑛−1 𝑥𝑛−1 0 𝑥𝑛
𝑥ሶ 𝑛 𝑥𝑛 𝑏0

PROBLEM: Find the state-space representation in phase-variable form for the transfer function

Step 1 Find the associated differential equation


inverse Laplace transform,

Step 2 Select the state variables.


the state equations. matrix form,

10
Converting a Transfer Function to State Space
Converting a Transfer Function to State Space
Converting a Transfer Function to State Space Cont.
Converting a Transfer Function to State Space Cont.
4. State Space Representation to Transfer Function

The Transfer Function is:


Example: How ton find an inverse matrix 2x2:
4. State Space Representation to Transfer Function
State Space Representation to Transfer Function
Continued
Stability - The values of the system's poles are equal to the eigenvalues of the system
in State
matrix, A.
- The eigenvalues of the matrix A were solutions of the equation det (sI - A) =
Space 0, which also yielded the poles of the transfer function.
- The characteristic equation of a state space is given by
det(sI - A) = 0.

Example: find out how many poles are in the left half-plane, in the right half-plane, and on the 𝑗𝜔-axis.
We have to determine the the characteristic equation of the system and afterwards, use the Routh Hurwitz creteria.

18
5- Time domain solution of state equations

In time domain, we have 𝒙 𝒕 = 𝓛∗𝟏 (𝑿 𝒔 ) y𝒕 = 𝑪 𝒙 𝒕 + 𝑫 𝒖(𝒕)

SOLUTION:
• 5- Time domain solution of state equations cont
5- Time Domain Solution of State Equations
5- Time Domain Solution of State Equations
Time Domain Solution of State Equations
6 - Controllability and Observability
• 6-1 Controllability

Note that The maximum number of linearly independent columns (or rows ) of a matrix is called the rank of a matrix.
Using MATLAB rank of Cm =rank(Cm)

Controllable system: Uncontrollable system:


• 6-1 Controllability
• Problem: Determine the controllability of the system:
6-2 Observability

Observable system: Unobservable system:


• 6-2 Observability
• 6.2 Observability
6.2 Observability

Note” The following transfer function: Can be transformed into:

1- Phase-variable form which is controllable. 2- Observable canonical form which is observable.


7- State Space Design
• Once the system is controllable and
observable, we can design a controller
that achieves the desired performances.

• One of the attractive features of the state-


space design method is that it consists of
a sequence of independent steps.
• Step 1: Control law: Determine K
𝑥ො1
𝑢 𝑡 = −𝐾 𝑋෠ 𝑡 + 𝑟 = − 𝐾1 ⋯ ⋯ 𝐾𝑛 ⋮ +𝑟
𝑥ො𝑛
Where r is the reference state, 𝑋෠ is the state estimator
of X(t) using the control vector u(t) and the output y(t).
• Step 2: Estimator design: Determine L
𝒅ෝ
𝒙
= 𝑭ෝ
𝒙 + 𝑮𝒖 + 𝑳(𝒚 − 𝑯ෝ
𝒙)
𝒅𝒕
7-State Space Design
Feedback Control using Pole Placement

Example:
Feedback Control using Pole Placement
• Solution

K=[640 172 16];


Feedback Control using Pole Placement

The closed-loop system is Or


With 𝑢 = −𝐾𝑥 + 𝑟

The closed-loop system

The desired characteristic equation is:

The closed-loop Transfer function is:


We solve the problem using two different approaches.
From the overshoot and the peak time we found:
𝜁 = 0.69 𝑎𝑛𝑑 𝜔𝑛 = 14.3. The desired poles are:
𝐴 ∗= −𝜁𝜔𝑛 ± 𝑗𝜔𝑛 1 − 𝜁 2 = −9.87 ±j 10.35
The desired C.E. 𝑠 2 + 19.74 𝑠 + 204.54. Since the degree
Of system is 3. We have to add a third pole. We will use:
1- The third pole is -49.35
2- The third pole is chosen -10 to eliminate the zero (-10).

1- The desired C. E. 𝑠 3 +69 𝑠 2 + 1179 𝑠 + 10094. 2- The third pole is chosen at (-10) to eliminate the zero. The
The C.E. with feedback control: 𝑢 𝑡 = −𝐾 𝑥 𝑡 + 𝑟 𝑡 Desired C.E. is 𝑠 3 + 29.74 𝑠 2 + 401.9 𝑠 + 2045.4= D𝑒𝑡(𝑆𝐼 −
D𝑒𝑡(𝑆𝐼 − 𝐴 − 𝐵𝐾 = 𝑠 3 + 15 + 𝐾3 𝑠 2 + 36 + 𝐾2 𝑠 + 𝐾1 𝐴 − 𝐵𝐾 = 𝑠 3 + 15 + 𝐾3 𝑠 2 + 36 + 𝐾2 𝑠 + 𝐾1
= 𝑠 3 +69 𝑠 2 + 1179 𝑠 + 10094 The gain K is 𝐾 = 2045.4 365.9 14.7
The gain K is 𝐾 = 10094 1143 54 ; We use MATLAB to check the obtained result:
We use MATLAB to check the obtained result: >>A=[0 1 0;0 0 1;0 -36 -5];B=[0;0;1];K= 2045.4 365.9 14.7
>>A=[0 1 0;0 0 1;0 -36 -15];B=[0;0;1];K=[10094 1143 54]; >> eig(A-B*K)-→poles are {-9.96, -986j 10.38}
>> eig(A-B*K)-→poles are {-49.2096, −9.89 ±j 10.35} The step response is given in the nest slide
The step response is given in the nest slide
Feedback Control using Pole Placement: MATLAB Simulation of the step response
MATLAB Code: MATLAB Code:
>> A=[0 1 0;0 0 1;0 -36 -15];B=[0;0;1];K=[10094 1143 54]; >> A=[0 1 0;0 0 1;0 -36 -15];B=[0;0;1];K= [2045.4 365.9 14.7]
>> C=[1000 100 0]; >> C=[1000 100 0]; [a,b]=ss2tf(A-B*K,B,C,0);
>> [a,b]=ss2tf(A-B*K,B,C,0); >> sys=tf(a,b)
>> sys=tf(a,b) sys =
sys =
100 s + 1000 100 s + 1000
-------------------------------- -------------------------------
s^3 + 69 s^2 + 1179 s + 1.009e04 s^3 + 29.7 s^2 + 401.9 s + 2045
Continuous-time transfer function. Continuous-time transfer function.
>> step(sys) >> step(sys)
The achieved overshoot is 21.6% and Tp=0.126s The achieved overshoot is4.99 % and Tp=0.3s
Feedback Control using Pole Placement for systems under general form
Assume that the physical system is not under the phase-variable form or canonical form, and it requires feedback from state
Variable. For these systems we have some choices for a design methodology:
1- Controller Design by Matching Coefficients
MATLAB Simulation:
>> sys=tf(10,conv([1 1],[1 2]));
>> [A,B,C,D]= tf2ss(10, conv([1 1],[1 2]));
>> p=roots([1 16 239.5]); % the desired poles
>> K=place(A,B,p);
>> sys_cl=ss(A-B*K,B,C,D);
>> step(sys_cl) % Step response of closed loop system
K= 13.0000 237.5000

where the characteristic equation is

The desired characteristic equation

We find the parameter controller: k2 =13 and k1=211.5.


Feedback Control using Pole Placement for systems under general form
2- Alternative Approaches to Controller Design
The second method consists of transforming the system to phase variables, designing the feedback gains, and transforming
the designed system back to its original state-variable representation.
Assume a plant is not represented in phase-variable form whose controllability matrix is
whose controllability matrix is

An nth-order plant whose state equation is ቊ𝒙ሶ = 𝑨𝒙 𝒙 + 𝑩𝒙 𝒖


𝒚 = 𝑪𝒙 𝒙

This system is under phase-variable form, that can be deduced


Characteristic equation: ∆ 𝑠 = det 𝑆𝐼 − 𝐴 = 0
where 𝐶𝑀𝑥 = 𝐵𝑥 𝐴𝑥 𝐵𝑥 𝐴2𝑥 𝐵𝑥 … 𝐴𝑛−1
𝑥 𝐵𝑥
Assume that the system can be transformed into the phase- Using the phase-variable to determine the gain K:
variable (x) representation with the transformation
𝒙ሶ = 𝑨𝒙 𝒙 + 𝑩𝒙 𝒖
ቊ u=-𝐾𝑥 x+r=-𝐾𝑥 𝑃 −1 𝑧 + 𝑟
𝒚 = 𝑪𝒙 𝒙
The closed-loop of the original system is
𝒛ሶ = 𝑨 − 𝑩𝑲𝒙 𝑷−𝟏 𝒛 + 𝑩𝒓
Feedback Control using Pole Placement for systems under general form
Alternative Approaches to Controller Design: Example The desired characteristic:

We write the phase-variable representation of the


system as

The desired closed-loop system is


Alternative Approaches to Controller Design: Example : Cont.
The state equations for the phase-variable form with
state-variable feedback
The state equations for the designed system shown in
Figure 12.10 with input r are

The characteristic equation for Eqs. (12.51) is

Using previous eq. to find the closed-loop transfer function,


we see that we obtain
6.2 Observer Design
The closed-loop system with observer: ▪ The plan SS is given by: • The estimation error is given by:

Or

• The control vector is given by:


𝑢 𝑡 = −𝐾 𝑥ො

• The observer is given by:


• The dynamic of the estimated error
depends on the eigenvalues of 𝐴 − 𝐿𝐶

If the eigenvalues of (A-LC) are all negative, the estimated state vector error ex, and output error will decay to
zero. Note that the poles of observer should be faster (10 times) than the control poles.
When the system is given under observable form with 𝑦 = 𝑥1

The solution is

The desired C.E. of the matrix (A-LC):


Where 𝑑𝑛−𝑖 is the coefficient of the desired
C.E. of the matrix (A-LC).
Observer Design: Example

From the previous equations,, we find l1 . =112; l2 = 2483, and l


= 49.990.

• Determine the matrices: A, B and C? • Simulink Implementation of the closed-loop system:

• The dynamic of the estimated error is

• The characteristic equation:

• The closed-loop controlled system has dominant second-


order poles at −1 ∓ 2𝑗. To make our observer 10 times
• aster, we design the observer poles to be at −10 ∓ 20𝑗.
Hence, the desired characteristic polynomial is
Observer Design: Example

Note that, when the system is not under the observable form,
we use the same steps as for the pole placement method.
The transformation
Observer Design: Example
RELATIONSHIP AMONG CONTROLLABILITY, OBSERVABILITY, AND TRANSFER FUNCTIONS

Given the SISO system


After simplification the TF becomes

This simple-minded example illustrates that a "minimum-order"


transfer function without pole-zero cancellation is the only
Because A is a diagonal matrix, the controllability and component that corresponds to a system that is controllable and
observability conditions of the four states are observable.
determined by inspection. They are as follows: Example: Let us consider the
transfer function

The transfer function is Check the controllability and


the observability conditions.
Steady-State Error for Systems in State Space
Analysis via Final Value Theorem Consider the closed-loop system represented in state space:
The Laplace transform of the error is But

where T(s) is the closed-loop transfer function. The error can be written as:

Or Applying the final value theorem, we have


Steady-State Error Design via Integral Control
The integrator increases the system type and reduces the previous finite error to zero. We will now derive the form of the
state equations for the system of Figure below and then use that form to design a controller. Thus, we will be able to
design a system for zero steady-state error for a step input as well as design the desired transient response. An additional
state variable, xN, has been added at the output of the leftmost integrator. The error is the derivative of this variable. Now,
from Figure below, Writing the state equations from Figure below, we have

These equations can be written as augmented vectors


and matrices. Hence

we obtain

But
Steady-State Error Design via Integral Control: Example
Steady-State Error Design via Integral Control: Example
8- Discrete-time state space equations
𝑡
The solution of state equation of is 𝒙 𝑡𝑓 = 𝑒 𝐴 𝑡𝑓 −𝑡0
𝒙 𝑡0 + ‫𝐴 𝑒 𝑓 𝑡׬‬ 𝑡𝑓 −𝜏
𝐵𝒖 𝜏 𝑑𝜏
0

Obtain difference equation from the solution of the analog state, over a sampling period 𝑇. Initial time 𝑡0 = 𝑘𝑇,
and final time 𝑡𝑓 = 𝑘 + 1 𝑇 :
𝑘+1 𝑇
𝒙 𝑘 + 1 = 𝑒 𝐴𝑇 𝒙 𝑘 + ‫𝑇𝑘׬‬ 𝑒𝐴 𝑘+1 𝑇−𝜏 𝐵𝒖 𝜏 𝑑𝜏 with 𝒙 𝑘 = 𝒙 𝑘𝑇 = state vector at time 𝑘𝑇

• Piecewise constant inputs over a sampling period.

𝒖 𝑡 =𝒖 𝑘 , 𝑘𝑇 ≤ 𝑡 ≤ 𝑘 + 1 𝑇
• Move input outside the integral
𝑘+1 𝑇
𝒙 𝑘+1 = 𝑒 𝐴𝑇 𝒙 𝑘 + න 𝑒𝐴 𝑘+1 𝑇−𝜏 𝐵𝑑𝜏 𝒖 𝑘
𝑘𝑇
• Discrete-time state equation
𝒙 𝑘 + 1 = 𝐴𝑑 𝒙 𝑘 + 𝐵𝑑 𝒖 𝑘
𝑇
𝐴𝑑 = 𝑒 𝐴𝑇 , 𝐵𝑑 = න 𝑒 𝐴𝜆 𝐵𝑑𝜆
0
Discrete-time state space equations
• Change of variable of integration
0, 𝜏 = 𝑘 + 1 𝑇
𝜆 = 𝑘 + 1 𝑇 − 𝜏, 𝜆 = ቊ ; 𝑑𝜆 = −𝑑𝜏
𝑇, 𝜏 = 𝑘𝑇
𝑘+1 𝑇 0 𝑇
න 𝑒𝐴 𝑘+1 𝑇−𝜏 𝐵𝑑𝜏 = න 𝑒 𝐴𝜆 𝐵 −𝑑𝜆 = න 𝑒 𝐴𝜆 𝐵𝑑𝜆
𝑘𝑇 𝑇 0
Or in compact form:
𝒙 𝑘 + 1 = 𝐴𝑑 𝒙 𝑘 + 𝐵𝑑 𝒖 𝑘 , 𝑘 = 0,1, …
𝑇
𝐴𝑑 = 𝑒 𝐴𝑇 , 𝐵𝑑 = ‫׬‬0 𝑒 𝐴𝜏 𝐵𝑑𝜏 ; 𝒚 𝑘 = 𝐶𝒙 𝑘 + 𝐷𝒖 𝑘

• Obtain 𝐴𝑑 using state-transition matrix of 𝐴; Integrate to obtain 𝐵𝑑 .

• 𝐴𝑑 = 𝑛 × 𝑛 discrete state matrix ; 𝐵𝑑 = 𝑛 × 𝑚 discrete input matrix (same orders as their continuous
counterparts).
• Discrete state matrix = state transition matrix of the analog system evaluated at the sampling period 𝑇.
• Properties of the matrix exponential: integral of the matrix exponential for invertible matrix 𝐴

𝑇
‫𝑡𝐴 𝑒 ׬‬ = 𝐴−1 𝑒 𝐴𝑡 = 𝑒 𝐴𝑡 𝐴−1 = −1 𝐴𝑡
𝐴 𝑒 ቚ = 𝐴−1 𝑒 𝐴𝑇 − 1
0

𝐵𝑑 = 𝐴−1 𝑒 𝐴𝑇 − 𝐼𝑛 𝐵 = 𝑒 𝐴𝑇 − 𝐼𝑛 𝐴−1 𝐵
Discrete-time state space equations
• Discrete state & output equation.
• Discrete-time state equation: approximately valid for a general input vector 𝒖 𝑡 provided that the sampling period 𝑇
is sufficiently short: 𝒙 𝑘 + 1 = 𝐴𝑑 𝒙 𝑘 + 𝐵𝑑 𝒖 𝑘
• Output equation evaluated at time 𝑘𝑇: 𝒚 𝑘 = 𝐶𝒙 𝑘 + 𝐷𝒖 𝑘
• Example: Find the discrete-time state space model of a continuous-time system
State-space to transfer function

The concepts of controllability, observability, and the design of


the feedback control using pole placement and the design of
the observer are the same as in continuous-time state space.
Only the stability of the system depends on the location of the
poles Z-Plane as follows:
Let the discrete-time system given by: Discrete-time observer design:
𝑥 𝑘 + 1 = 𝐴 𝑥 𝑘 + 𝐵 𝑢 𝑘 ; 𝑎𝑛𝑑 𝑦 𝑘 = 𝐶 𝑥(𝑘) 𝑥ො 𝑘 + 1 = 𝐴 𝑥ො 𝑘 + 𝐵 𝑢 𝑘 + 𝐿 𝑦 𝑘 − 𝐶 𝑥ො (𝑘)
The controllability matrix is: Find the gain L such that the estimating error converges to zero

𝑒 𝑘 + 1 = 𝐴 − 𝐿 𝐶 𝑒(𝑘) Where 𝑒 𝑘 = 𝑦 𝑘 − 𝑦(𝑘)


Note that the poles of observer should be faster (10 times)


The observability matrix is: than the control poles.

𝟏𝟎
Problem: Given a plant 𝑮 𝒔 = ; design a discrete
(𝒔+𝟏)(𝒔+𝟐)
state feedback to yield a 15% overshoot with a settling time
Of 0.5s.

Steps to find the solution:


POLE-PLACEMENT DESIGN WITH STATE FEEDBACK 1- Transfer function to state space
The state-feedback control is 𝑢 𝑘 = −𝐾 𝑥 𝑘 + 𝑟(𝑘) 2- Check the controllability and the observability
3- Convert the desired poles from s-domain to Z-domain
Find the coefficients of the K, such that: 4- Determine the feedback gain K
5- Dertemine the observer gain L
𝑍𝐼𝑛 − 𝐴 − 𝐵𝐾 = 𝐷𝑒𝑠𝑖𝑟𝑒𝑑 𝐶. 𝐸 𝑖𝑛 𝑍 − 𝑑𝑜𝑚𝑎𝑖𝑛.
6- Use Simulink to simulate the closed-loop system
Solution of DT State-Space Equation
Discrete-time state space equations: MATLAB
DT State Equation: state at time 𝑘 in terms of the
Obtain 𝐴𝑑 , 𝐵𝑑 , 𝐶, 𝐷 from 𝐴, 𝐵, 𝐶, 𝐷 initial condition vector 𝒙 0 and the input sequence
» A=[1,2;3,4]; B=[0;1];C=[1,1]; D=0; 𝒖 𝑘 , 𝑘 = 0,1,2, … , 𝑘 − 1.
» p=ss(A, B, C, D); % State-space matrices 𝒙 𝑘 + 1 = 𝐴𝑑 𝒙 𝑘 + 𝐵𝑑 𝒖 𝑘 , 𝑘 = 0,1, …
» pd = c2d(p,0.01) At 𝑘 = 0,1, we have
% piecewise constant input (default) 𝒙 1 = 𝐴𝑑 𝒙 0 + 𝐵𝑑 𝒖 0
Alternatively, use the MATLAB commands 𝒙 2 = 𝐴𝑑 𝒙 1 + 𝐵𝑑 𝒖 1
» ad = expm(A * 0.01) = 𝐴2𝑑 𝒙 0 + 𝐴𝑑 𝐵𝑑 𝒖 0 + 𝐵𝑑 𝒖 1
» bd = A\ (ad-eye(2) )* B 2−1

𝒙 2 = 𝐴2𝑑 𝒙 0 + ෍ 𝐴2−𝑖−1
𝑑 𝐵𝑑 𝒖 𝑖
a= >> ad = expm(A * 0.01)
𝑖=0
𝑘−1
x1 x2 𝒙 𝑘 = 𝐴𝑘𝑑 𝒙 0 + ෍ 𝐴𝑘−𝑖−1 𝐵𝑑 𝒖 𝑖
x1 1.01 0.02051 𝑑
x2 0.03076 1.041 ad = 𝑖=0 𝑘−1
𝑘−𝑘0
b= 𝒙 𝑘 = 𝐴𝑑 𝒙 𝑘0 + ෍ 𝐴𝑘−𝑖−1
𝑑 𝐵𝑑 𝒖 𝑖
u1 𝑖=𝑘0
x1 0.0001017 1.0104 0.0205
x2 0.0102 0.0308 1.0411 • State-transition matrix for the DT system.
c= >>bd = A\ (ad-eye(2) )* B • State-transition matrix for time-varying DT system:
x1 x2 • not a matrix power
y1 1 1 • dependent on both time 𝑘 and initial time 𝑘0 .
bd =
d= • Solution=zero-input response+ zero-state response
u1 • Substitute in output equation
y1 0 0.0001 𝑘−1

Sampling time: 0.01 0.0102 𝒚 𝑘 = 𝐶𝒙 𝑘 + 𝐷𝒖 𝑘 = 𝐶 𝐴𝑘𝑑 𝒙 0 + ෍ 𝐴𝑘−𝑖−1


𝑑 𝐵𝑑 𝒖 𝑖 + 𝐷𝒖 𝑘
• Discrete-time model. 𝑖=0
9- Linearization of nonlinear systems
We have to there are numerous physical devices that possess strong nonlinear characteristics. For these devices, a
linearized model is valid only for limited range of operation and often only at the operating point at which the
linearization is carried out. More importantly, when a nonlinear system is linearized at an operating point, the linear
model may contain time-varying elements.

9.1 Linearization of a given function f(x)


If we assume a nonlinear system operating at point A, (x0; f (x0). A small changes in the input can be related to changes in
the output about the point by way of the slope of the curve at the point A. Thus, if the slope of the curve at point A is ma,
then small excursions of the input about point A, δx, yield small changes in the output, δf .x., related by the slope at point A.
Thus,
from which

Thus, the system can be represented as f (x)= 5 δx for small excursions of x about π=2.
9.2 Linearization of a nonlinear system
𝑑𝑥(𝑡)
let us represent a nonlinear system by the following vector-matrix state equations: = 𝑓(𝑥 𝑡 , 𝑢(𝑡)
𝑑𝑡
where x(/) represents the n x l state vector; u(t), the p x 1 input vector; and 𝑓(𝑥 𝑡 , 𝑢(𝑡) ], an n x I function vector. In
general, f is a function of the state vector and the input vector.
2
As a simple example, the following nonlinear state equations are given: ቊ 𝑥ሶ 1 = 𝑥1 + 𝑥2
𝑥ሶ = 𝑥1 + 𝑢(𝑡)
Using the Taylor approximation, the system can be linearized around 𝑋0 , 𝑈0 2
𝑛 𝑝
𝜕𝑓𝑖 (𝑥, 𝑢) 𝜕𝑓𝑖 (𝑥, 𝑢)
∆𝑋ሶ = 𝐴 ∆𝑋 + 𝐵 ∆𝑈 or ∆𝑋ሶ = ෍ อ ∆𝑥𝑗 + ෍ อ ∆𝑢𝑗 +
𝜕𝑥𝑗 𝜕𝑢𝑗
𝑗=1 𝑥0 ,𝑢0 𝑗=1 𝑥0,𝑢0

𝜕𝑓𝑖 (𝑥,𝑢) 𝑝 𝜕𝑓𝑖 (𝑥,𝑢)


Where 𝐴 = σ𝑛𝑗=1 ฬ ; 𝐵 = σ𝑗=1 ฬ
𝜕𝑥𝑗 𝜕𝑢𝑗
𝑥0 ,𝑢0 𝑥0 ,𝑢0

For example for n=3 and p=2 may be written in vector-matrix form:
9.2 Linearization of a nonlinear system: Example
Solution: The nonlinear state space representation

The linearized system is

Another example:

Where
9.2 Linearization of a nonlinear system: Example
Ball-suspension system. The state equations are
Mathematical model:

Linearize the nonlinear system about X0=[0.5 0 0], v0=0


and analyze the linear system around the equilibrium point.

Solution:

The eigenvalues of A*, or the roots of the characteristic


equation, are s = –100 s–8.025 s = 8.025. The system is
Unstable around the equilibrium point

You might also like