Download as pdf or txt
Download as pdf or txt
You are on page 1of 29

StateSpaceDesign

N.H.Jo,H.Shim,Y.I.Son

Lecture Topics
DSP

State space representation Stability Controllability & Observability


RHP pole/zero cancellation

State feedback Observer Integral controller Internal model principle

State Variables
DSP

Electrical circuit example

Differential equations in terms of energy storage variables


Inductor currents capacitor voltages

State Variables
DSP

Inverted pendulum

State variables

State space representation

SS Representation is NOT Unique


DSP

State space representation is NOT unique

State variables x1, x2 x1: inductor current x2: capacitor voltage

SS Representation is NOT Unique


DSP

State space representation is NOT unique (continued)

State variables
: inductor current : capacitor voltage

SS Representation from Transfer Function


DSP

How to write a state space representation from given transfer function ?

Control canonical form Observer canonical form

Control/Observer Canonical Form


DSP

Control canonical form

Observer canonical form

Phase Variable Form


DSP

Phase variable form

Transfer Function from SS Representation


DSP

How to obtain the transfer function from state space representation ?


Matlab commands
[nu,de]=ss2tf(a,b,c,d) [A,B,C,D]=tf2ss(num,den)

Example: Single-input single-output system

Transfer Function from SS Representation


DSP

Example: Multi-input multi-output system

State Transformations
DSP

State Transformation How can we go from one state space realization to another ? New state vector z :
P : nonsingular matrix

Transformed equation

Two important properties Transfer function is NOT changed by state transformation


Eigenvalues are NOT changed by state transformation

State Transformations
DSP

State Transformation into Modal Canonical Form State transformation


i , vi : eigenvalue & eigenvector of A, i.e.,

New state space representation

Eigenvalues and Eigenvectors Eigenvalue


Eigenvector xi

For x 0, x = A x Characteristic equation : det (I A) = 0 For each eigenvalue i , i xi = A xi

State Transformations
DSP

State Transformation into Control canonical Form State transformation

New state space representation Controllability is NOT affected by the state transformation

State Transition Matrix


DSP

Time domain response Linear system


Laplace transform

State transition matrix Time domain response

State Transition Matrix


DSP

Example
The linear system

The state transition matrix

Stability
DSP

BIBO Stability Based on transfer function representation A system is BIBO stable if system output is bounded for all bounded inputs Necessary and Sufficient Condition
All the transfer function poles must be in the LHP

Asymptotic Stability (A.S.) Based on the state space representation is asymptotically stable if all the states approach zero with time, i.e.,

Necessary and Sufficient Condition


All eigenvalues must be in the LHP

Stability
DSP

What is the difference between BIBO stability and A.S. ? Does one imply the other ?
Transfer function In the absence of pole-zero cancellations, BIBO stability and Asymptotic stability are equivalent

Two stabilities differ only when RHP pole-zero cancellations occur (including imaginary axis pole-zero cancellation)
Example

Asymptotic stability Eigenvalues = 1, -2 unstable BIBO stability Pole= -2 stable

Stability
DSP

Two stabilities are different for the system

BIBO stable but not asymptotically stable

Why does this happen ? Diagonalization by state transformation

The unstable mode at +1 is not connected to the output


So, even if the first state may blow up, you will not be aware of it

Stability - Lyapunov Theorem


DSP

Positive definiteness A symmetric matrix M is said to be positive definite, denoted by M >0, if xMx > 0 for every nonzero x Lyapunov theorem All eigenvalues of A have negative real parts for any positive definite matrix N, the Lyapunov equation
has a unique solution M and M is positive definite
The solution can be expressed as

The sketch of the proof

Internal Stability
DSP

Motivating exam.

Is it O.K. to cancel RHP plant poles by compensator zero, for example, BIBO stability of TYR(s) How about BIBO stability of TYD(s) ?
The slightest disturbances in the system will grow unbounded

A design lesson
We must NEVER cancel the RHP plant poles by RHP compensator zeros, for this will render the closed-loop system internally unstable A controller example

Internal Stability
DSP

Block diagram of a feedback system


Plant, controller, sensor dynamics Reference input, sensor noise, disturbance inputs are included

Internal stability
All signals within the feedback system should remain bounded for all bounded inputs All possible Transfer function between all inputs and outputs should be stable
Only nine Transfer function between (R,D,N) and (U,Y,W) are sufficient

How to check this ? The product of KGH has NO pole-zero cancellations in the RHP (including jw-axis) Transfer function (1+KGH) has NO zeros in the RHP (including jw-axis) KGH has RHP pole-zero cancellation at +1 Unstable !!

Necessary and sufficient condition


Previous example revisited :


Controllability
DSP

Motivating example 1 Can the input u control x2 ?

Open circuit across y cannot control x2

Motivating example 2 Can the input u transfer x1 and x2 to any values ? If, x1(0)=x2(0)=0 x1(t)=x2(t), t 0
x1 and x2 cannot be controlled independently

Controllability
DSP

Definition
The system is controllable if there exists a control u(t) that will take the state of the system from any initial state x0 to any desired final state xf in a finite time interval The system (A,B) is controllable iff the controllability matrix C has full row rank

Theorem: Controllability

PBH rank test: The system (A,B) is controllable iff the matrix has full row rank at every eigenvalue of A The system (A,B) is controllable iff K can be chosen s.t. (A-BK) are arbitrary

How to find an uncontrollable mode ?

The modes associated with are uncontrollable

Controllability
DSP

Theorem: Controllability

The system (A,B) is controllable the controllability Gramian

is nonsingular for any t>0

How to transfer x0 to x1 at time t1 ?

A control input, that transfers x0 to x1 at time t1, is given by


Why ?

Observability
DSP

Motivating example 1
Can we estimate the behavior of x1 by measuring y ?

The current passing through 2- resistor always equals the current source u
The response excited by the initial state x1 will not appear in y The initial state x1 cannot be observed from the output

Motivating example 2
Can we estimate the behavior of x by measuring y ? If, u(t) = 0, t 0 y(t) = 0, t 0
No matter what x(t) is

x(t) cannot be estimated by measuring y

Observability
DSP

Definition
The system is observable if, for any x(0), there is a finite time such that x(0) can be determined from u(t) and y(t) for 0 t Roughly speaking, observability condition is required in order to design an observer

Theorem: Observatility

The system (A,C) is observable iff the observability matrix O has full column rank

PBH rank test: The system (A,C) is observable iff the matrix has full column rank at every eigenvalue of A The system (A,C) is observable iff L can be chosen s.t. (A-LC) are arbitrary

Controllability, Observability
DSP

Theorem of duality

The pair (A,B) is controllable The pair (AT,BT) is observable Kalman decomposition theorem
Controllable and observable Controllable and unobservable Uncontrollable and observable Uncontrollable and unobservable

Canonical decomposition

Controllability vs. Observability


Controllability: whether or not the state can be controlled from the input Observability: whether or not the initial state can be observed from the output

Lack of Controllability or Observability


DSP

Example

Transfer function If b1=0 If c1=0

The mode at 1: uncontrollable, The mode at 1: unobservable, The mode at 2: uncontrollable, The mode at 2: unobservable,

pole 1: canceled out pole 1: canceled out pole -2: cancelled out pole -2: cancelled out

If b2=0 If c2=0

Lack of either controllability or observability pole-zero cancellation in the transfer function

Unstable Pole-Zero Cancellation


DSP

When an unstable pole is canceled by a zero,


it does not really disappear, it simply becomes either uncontrollable or unobservable
If uncontrollable, you will observe the state blow up, but you can do nothing about it If unobservable, you will not even be aware that something is wrong because the unstable state does not appear at the output

In either case, the results are disastrous

Inverted Pendulum Example


DSP

Transfer function

Measuring alone
Unstable pole/zero cancellation (at 0) A.S.: unstable stabilization is NOT possible by measuring alone

Measuring x alone
No pole/zero cancellation A.S.: stable Stabilization is possible by measuring cart position x alone

Inverted Pendulum Example


DSP

State space representation

Controllable ?

Full row rank

controllable

Inverted Pendulum
DSP

Stabilizable by measuring pendulum angle only ? Observability check


Sensing pendulum angle Observability matrix C=[1 0 0 0]

: singular unobservable
Unobservability can be expected by pole/zero cancellation

Stabilizable by measuring cart positioin x only ? Sensing cart position : C=[0 0 1 0]


: nonsingular observable

Sensor location problem It makes a big difference which state variable we measure !!

State Feedback Control Law


DSP

Control-law design for


Reference input is set to zero at this time

Choose K so that eigenvalues of (A-BK) are in desirable locations, e.g., LHP

MATLAB
K=acker(a,b,p)
Calculation of K for u = -K x Useful for small( 10 ) number of state variables

K=place(a,b,p)
Numerically more reliable than acker Restriction : NONE of the desired poles may be repeated

Pole Placement Theorem


DSP

Example 1

Desired pole location : -4, -4, -5 K=[75 49 10]

Example 2
Desired pole location : -2, -3 No such controller exist !

Mode at -1 cannot be moved

Pole Placement Theorem


For arbitrary pole placement, system must be controllable

Stabilizability
DSP

For uncontrollable systems, which poles can be moved ? Previous example


Mode at 1 : cannot be moved uncontrollable mode Mode at 2 : can be placed anywhere controllable mode

PBH rank test


Uncontrollable modes are fixed Controllable modes can be shifted

Is the controllability necessary for a system to be stabilized by using state feedback ?


Stabilizability condition is sufficient !!

Stabilizability A system is stabilizable if


The unstable modes are controllable, or The uncontrollable modes are stable

Observer Design
DSP

A weak point of state feedback control


Not all the states are measurable
Some sensors are very expensive Physically impossible to measure all the states

How to reconstruct all the states from a few measurements ?

Observer Design

When does

Observer error go to zero

(A-LC) is a stable matrix

If (A,C) observable L can be chosen s.t.

(A-LC) are arbitrary

Observer Design
DSP

Observer Design Example


DSP

Example: a simple pendulum

An observer is given by

How to compute an observer gain


Duality
Observer gain can be computed using state feedback design procedure [(A-LC)] = [(AT-CTLT)] LT = [state feedback gain for (AT,CT) system]

Separation Principle
DSP

Control using observers


How to stabilize the system when all the states are not available ? Combined control law
State feedback control law is combined with an observer

Separation principle
Plant equation with feedback The overall system dynamics (plant + observer error)

Characteristic Equation Closed-loop poles = controller poles + observer poles

The designs of the control law & the observer can be carried out independently, yet when they are used together in this way, the poles remain unchanged

Observer-Based Controller
DSP

Observer-based controller
Observer-based controller = Control using observers (= Output feedback controller) Observer-based controller can be used when full state are not available But, No guaranteed stability margins

A simple Pendulum System


State feedback control
Desired control roots: -2, -2

Observer
Desired observer roots: -10, -10

Observer-based controller

Observer-Based Controller
DSP

Observer-Based Controller
DSP

Robustness & Stability Margins


DSP

Robustness & Stability Margins


Usually, we have imperfect model of our systems Stability margins provide some protection against model uncertainties
System designed with low margins
are inherently sensitive to model errors and may become unstable in actual operation

High margins provide good robustness properties

Robustness of LQR design


Return-difference inequality Stability margins of open loop system
GM : < GM < PM : PM 60
LQR gain matrix K can be multiplied by a large scalar or reduced by half with guaranteed closed-loop systems stability

Integral Control
DSP

How to handle tracking problem ?


Adding an integrator will increase the system type

Integral control
New state variable The augmented plant The Integral controller
K0 & KI should be chosen s.t.

is stable System type is increased (+1) input)

Tracking error = 0 is guaranteed (step

Integral Control
DSP

The double integrator system example

Desired pole location : -1j, -5 Control gain

Integral controller Tracking error verification


SS output due to unit step reference input

Integral Control
DSP

Internal Model Principle


DSP

Internal Model Principle


DSP

Disk-drive Servomechanism

Because the data on the disk is not exactly on a centered circle, the servo must track a sinusoid of radian frequency w0 determined by the spindle speed

Internal Model Principle


DSP

Objective
Tracking a non-decaying input (with zero SSE) such as
step ramp sinusoidal input

Rejecting a non-decaying disturbance (with zero SSE)

The key idea


including the equations satisfied by these external signals as part of the problem formulation and solving the problem of control in an error space
so we are assured that the error approaches zero even if the output is following a non-decaying command

Internal Model Principle


DSP

System equation

Assumption Reference input & disturbance satisfy differential equations of order 2

The extension to more complex signals are not difficult

Initial conditions on the 2nd order differential equations (of reference input and disturbance) are unknown
For example, the input could be a ramp whose slope and initial value are unknown

Internal Model Principle


DSP

Tracking error

Error-space The state in error space


The control in error space Overall system

Internal Model Principle


DSP

Control law in the error space


Assumption : is controllable
In fact, it is controllable if (A,B) is controllable and (A,B) does not have a zero at any of the roots of the reference-signal characteristic equation

Control law

Robustness: the state z will tend to zero for all perturbations as long as is stable

Disk-Drive Servomechanism
DSP

A simple normalized model of a computer disk-drive servomechanism


Tracking reference input r (t) = A sin w0t with zero SSE

Controller Design
Error space representation

Characteristic Equation of (A-BK) Controller

Internal Model Principle


DSP

Internal Model Principle


DSP

DSP

END

You might also like