Anda di halaman 1dari 383

Introduction

1
Course information

Recommended references
R. L. Williams II & D. A. Lawrence, Linear State-Space
Control Systems Wiley, 2007.
Chi-Tsong Chen, Linear System Theory and Design

2
Foundations in Control Engineering
In this course, we learn a basic theory of
automatic feedback control systems.
What is control?
What is automatic control? And why?
What is feedback control? And why?

3
What is Control?
Make some object (system, plant) behave as
we desire.
Imagine control around you!
Room temperature control
Car/bicycle driving
Balance of bank account
Control (move) the position of the pointer
Laundry machine
Automobile direction and speed control
Airplane, rocket, satellite control

4
What is Automatic Control?
Not manual!
Why do we need automatic control?
Convenient (room temperature control, laundry
machine)
Dangerous (hot/cold places, space, bomb removal)
Impossible for human (nanometer scale precision
positioning, work inside the small space that human
cannot enter)
It exists in nature. (human body temperature control)
Low cost, high efficiency, etc.
Many examples of automatic control around us
5
Open-loop & closed-loop control
Open-loop Disturbance

Reference Input Output


Controller Actuator Plant

Less expensive, weak against uncertainty


Closed-loop (feedback)
Disturbance
Error
Reference Input Output
Controller Actuator Plant

Sensor

More expensive, strong against uncertainty


6
Control system design objective in
automatic feedback control systems
Error Disturbance
Reference Input Output
Controller Actuator Plant

Sensor

To design a controller s.t. the output follows


the reference in a satisfactory manner
even in the face of uncertain disturbance,
reference and plant.
7
Systematic controller design process
Disturbance
Reference Input Output
Controller Actuator Plant

Sensor

4. Implemenation 1. Modeling

Controller Mathematical model

2. Analysis
3. Design
8
Goal of classical control course
To learn basics of feedback control systems
Modeling as a transfer function and a block diagram
Laplace transform (Mathematics!)
Mechanical, electrical, electromechanical systems
Analysis
Time response, frequency response
Stability: Routh-Hurwitz criterion, Nyquist criterion
Design
Root locus technique, frequency response technique,
PID control, lead/lag compensator

9
Weak points of classical control
Classical control theory deals with only
Single-input single-output (SISO) systems
Linear time-invariant (LTI) systems
No optimality concept in controller design
No robustness consideration, except gain
margin and phase margin

Advanced control theories are necessary !


Multivariable control
Nonlinear and time-varying control These often use
Robust and optimal control state-space models.

10
Brief history of Control Engineering
Classical control (-1950)
Transfer function
Frequency domain
Modern control (1960-) (contents in this course)
State-space model
Time domain
Optimality
Post-modern control (1980-)
Robust control
Hybrid control, etc.

11
Linear state-space models
Continuous-time Discrete-time

x : state vector
u : input vector
y : output vector

System System
u y u y
12
Advantages of state-space models
State-space models can represent fairly general
systems, such as
Multivariable systems
Time-varying systems
Nonlinear systems
Under certain conditions, variables inside the
system (=states) can be
controlled without actuators,
observed without sensors.
Analysis and design can be done in a
numerically reliable manner.
13
Goals of the course
To learn control
theory with
theorylinear
withstate -space
linear statemodels
Modeling as a state-space model
Differential or difference equation (instead of TF)
Linear algebra (instead of Laplace transform)
Analysis
Stability, controllability, observability
Realization, minimality
Design
State
Statefeedback,
feedback,observer
observer

Matlab simulation

14
Course plan

Topics CT DT

Modeling
Stability
Controllability/observability
Realization
State feedback/observer

15
Summary
Introduction
This course gives foundations for advanced
control theory.
nonlinear control
robust and optimal control
adaptive control
digital control, sampled-data control
hybrid control
system identification
Next, model classification

16
Model classification

17
Controller design procedure (review)
Disturbance
Ref. Input Output
Controller Actuator plant

Sensor

4. Implemenation 1. Modeling
Controller Mathematical model
2. Analysis
3. Design

What is the mathematical model?


Model classification
18
Mathematical model
Representation of the input-output (signal)
relation of a physical system

Input
Physical Output
system

Modeling

Model

19
Important remarks on models
No mathematical model exactly represents a physical
system.

Do not confuse models with physical systems!


Selecting a model close enough to a physical system and
yet simple enough to be studied analytically is the most
important and difficult task in control system design.
In this course, we may use the term system to mean a
mathematical model.

20
Model classification
Continuous-time and discrete-time
Memoryless, causal and noncausal
Lumped and distributed
Time-invariant and time-varying
Linear and nonlinear

21
Model classification
Continuous-time and discrete-time
Continuous-time system
Input/output vectors are continuous-time signals.

System

Discrete-time system
Input/output vectors are discrete-time signals.
22
Example
Continuous-time system K B
Mass-spring-damper system M

f(t) y(t)
RLC circuit

v(t)
i(t) R L
C
Discrete-time system
Digital computer
Daily balance of a bank account y[k] : balance at k-th day
u[k] : deposit/withdrawal
a : interest rate

23
Model classification
Continuous-time and discrete-time
Memoryless, causal and noncausal
Lumped and distributed
Time-invariant and time-varying
Linear and nonlinear

24
Model classification
Memoryless, causal, and noncausal
Memoryless system : Current output depends on only
current input.
Causal system : Current output depends on current
and past input.
Noncausal system : Current output depends on future
input.

past future System past future


current current
25
Example
Memoryless system
Spring: input f(t), output x(t)
Resistor: input v(t), output i(t)
Causal system
Input: acceleration, output: position of a car
Current position depends on not only current
acceleration but also all the past accelerations.
Noncausal system does not exist in real world; It
exists only mathematically. (From now on, we
consider only causal systems.)

26
Model classification
Continuous-time and discrete-time
Memoryless, causal and noncausal
Lumped and distributed
Time-invariant and time-varying
Linear and nonlinear

27
Model classification
Lumped and distributed
For a causal system,

To memorize this info, we use a state vector

System

Lumped system: State vector is finite dimensional.


Distributed system: State vector is infinite dimensional.
28
Example
Lumped system
Q: For the left system,
M what are the states?

Distributed system
Unit time delay system y(t)=u(t-1)

For this system, to determine {y(t), t>t0},


we need {u(t), t0-1<t<t0}.

29
Model classification
Continuous-time and discrete-time
Memoryless, causal and noncausal
Lumped and distributed
Time-invariant and time-varying
Linear and nonlinear

30
Model classification
Time-invariant and time-varying
For a causal system,

Time-invariant system : For any time shift T,

Time-varying system : Not time-invariant

System

31
Example
Car, rocket etc.

M M(t)

If we regard M to be If we regard M to be
constant (even though M changing (due to, e.g., fuel
changes very slowly), then consumption), then this
this system is time-invariant. system is time-varying.

(Laplace applicable) (Laplace not applicable)

32
Model classification
Continuous-time and discrete-time
Memoryless, causal and noncausal
Lumped and distributed
Time-invariant and time-varying
Linear and nonlinear

33
Model classification
Linear and nonlinear
For a causal system,

Linear system: A system satisfying superposition property

Nonlinear system: A system that does not satisfy


superposition property

34
Remarks
All systems in real world are nonlinear.
This linear relation holds
only for small y(t) and f(t).

However, linear approximation is often good


enough for control purposes.
Linearization: Approximation of a nonlinear
system by a linear system around some
operating point (We will study this later.)

35
Summary
Model classification
Continuous-time and discrete-time
Memoryless, causal and noncausal
Lumped and distributed
Time-invariant and time-varying
Linear and nonlinear
In this course, we will not consider noncausal,
distributed, nonlinear systems in this course.
Next, state-space models

36
State-space models

37
Review and todays topic
Last lecture was about model classification
Continuous-time and discrete-time
Memoryless, causal and noncausal
Lumped and distributed
Time-invariant and time-varying
Linear and nonlinear
Today, we introduce linear state-space models
to describe causal lumped linear systems.

38
Linear state-space models
Continuous-time Discrete-time

x : state vector
u : input vector
y : output vector

System System
u y u y
39
Remarks
The first equation, called state equation, is a first
order ordinary differential (CT case) and
difference (DT case) equation.
The second equation, called output equation, is
an algebraic equation.
Two equations are called state-space model.
If a system is time-invariant, the matrices A, B,
C, D are constant (independent of time).
Pay attention to sizes of matrices and vectors.
They must be always compatible!

40
Examples
Mass with a driving force
Mass-spring-damper system
RLC circuit
DC motor

41
Mass with a driving force
By Newtons law, we have
My(t)=u(t) M
u: input force,
y: output position
Define state variables
Then,

42
Mass-spring-damper system
By Newtons law
K B
M

Define state variables u(t) y(t)

43
RLC circuit
u(t): input voltage u(t)
i(t) R L
y(t): output voltage
C y(t)
By Kirchhoffs voltage law
Current for inductor
Voltage for capacitor

Define state variables

44
Model of DC motor
La Output
ia(t) Ra

ea(t) eb(t) Jm
Input Bm

Armature circuit Mechanical load

45
Modeling of DC motor
Armature circuit

Connection between mechanical/electrical parts


Motor torque
Back EMF

Mechanical load

Angular position

46
DC motor: output = speed
By substitution

Define state variables

47
DC motor: output = position
By substitution

Define state variables

48
DC motor: two outputs
Output vector

Define state variables

49
Summary
Linear state-space models
Examples
Mechanical systems
Electrical systems
DC motor
Next, linearization

50
Linearization

51
Why linearization?
Real systems are inherently nonlinear. (Linear
systems do not exist!) Ex. f(t)=Kx(t), v(t)=Ri(t)
Nonlinear systems are difficult to deal with
mathematically.
Many control analysis/design techniques are
available for linear systems.
Linear approximation is often good enough for
control system analysis and design purposes.
How to linearize nonlinear systems?

52
Todays outline
Examples of nonlinear systems
Linearization of simple functions (1-dim, 2-dim)
Linearization of nonlinear systems
Examples revisited

53
A pendulum
Input torque
Motion of a pendulum

Define state variables

Nonlinear!

54
Water level control
Mass flow rate equation

55
Todays outline
Examples of nonlinear systems
Linearization of simple functions (1-dim, 2-dim)
Linearization of nonlinear systems
Examples revisited

56
Linearization: 1-dim case
Linearize a function y=f(x) around x=x0 (scalar)
Consider a solution (x0,y0)

If x perturbs from x0, then


y also perturbs from y0.

(Taylor expansion) Negligible for small x

57
Example of 1-dim case
Linearize a function around x=1

58
Linearization: 2-dim case
Linearize a function y=f(x) around x=x0
Consider a solution

If x perturbs from x0, then


y also perturbs from y0.

Negligible for small x

Jacobian
59
Example of 2-dim case
Linearize a function below around

Jacobian computation

60
Todays outline
Examples of nonlinear systems
Linearization of simple functions (1-dim, 2-dim)
Linearization of nonlinear systems
Examples revisited

61
Linearization of nonlinear system
Nonlinear system (possibly time-varying)

Suppose that (x0(t),u0(t),y0(t)) satisfies

If u(t) perturbs from u0(t), then x(t) and y(t) also


perturb from (x0,y0).
Note that this is a trajectory (not a point) perturbation!

62
Linearization of state equation

Negligible for small


x(t) & u(t)

A(t) B(t)

Finally, remove . Then,


63
Linearization of output equation

Negligible for small


x(t) & u(t)

C(t) D(t)

Finally, remove . Then,


64
Todays outline
Examples of nonlinear systems
Linearization of simple functions (1-dim, 2-dim)
Linearization of nonlinear systems
Examples revisited

65
A pendulum revisited
Nonlinear model

Linearization around
Note that this function satisfies state-space model.

66
Water level control revisited
Nonlinear model

Linearization around
Note that this function satisfies state-space model.

67
Summary
Linearization of nonlinear systems
Examples
Pendulum
Water level control
Inverted pendulum (Appendix)
Next, solution to state-space models

How to compute x(t) & y(t)?

68
Homework
1-3: Consider a state-space model (see next
page) for a satellite:

Satellite (m)
Earth

69
Homework (contd)
Nonlinear state-space model

i-th element

70
Homework (contd)
(a) Verify that the following is a solution to the
state-space equation.

(b) Linearize the nonlinear state-space model


around the operating trajectories x0(t) and u0(t)
given in (a).

71
Another nonlinear example
Cart with an inverted pendulum
Motion of a pendulum

Define state vector

Nonlinear!
Explicit form
omitted here
72
Solution to continuous-time
LTI systems

73
Some acronyms and notation
SS : State-space
CT : Continuous-Time
DT : Discrete-Time
LTI : Linear Time-Invariant
LTV : Linear Time-Varying
A:=B : A is defined by B.
: Set of real numbers
: Set of complex numbers

74
Todays topic
How to solve state-space model equation

Why do we need to solve?


To understand the behavior of state & output
trajectory for given input trajectory and initial state.
Analysis and design results will be derived by using
the explicit solution to the state-space model.
Useful in discretization

75
Solution to CT LTI SS model
CT LTI state-space model

Memorize this!
Solution

where

76
Remarks
We can see the linearity of the system from this
equation.
Verification :

For LTV case, the solution looks similar, but


more complicated. (not covered in this course)

77
Matrix exponential
Definition

Property

How to compute analytically?


1. Definition of matrix exponential
2. Laplace transform
3. Diagonal form or Jordan form
4. Cayley-Hamilton Theorem
(Numerically, in Matlab, use expm.m)

78
1. Definition of matrix exponential
Nilpotent matrix

=0
Diagonal matrix

79
2. Laplace transform
Formula
cf. scalar case: Partial fraction expansion

Ex:

Ex

80
3. Diagonal form
Suppose that we have distinct eigenvalues and
corresponding eigenvectors as

Then,

Similarity transformation

Remark: Diagonalization of A by nonsingular


(i.e. invertible) matrix T is NOT always possible!

81
Diagonal form: proof
Suppose that we have eigenvalues/vectors as

which can be written in a matrix form as

If T is nonsingular
By definition,

82
Diagonal form: example
Ex

Eigenvalue computation

Eigenvector computation

Important:
in Matlab, use expm for
matrix exponential, and 83
not just exp
Summary
Solution to CT LTI systems
Computation of matrix exponential
By definition
By Laplace transform
By diagonal form or Jordan form
By Cayley-Hamilton Theorem
Next,
Discretization
Solution to discrete-time LTI systems

84
Homework
1-4. Solve the state equation

For an initial condition


compare in Matlab the following two trajectories:
Analytical trajectory of x(t) obtained above
Numerical trajectory of x(t) obtained via some ODE
solver (for example, ode45.m)

85
Jordan form
For any matrix A, there is a nonsingular T s.t.

Matrix exponential

86
Cayley-Hamilton Theorem
For a matrix A, the following holds:

where characteristic polynomial of A is

This implies that every polynomial of A (n-by-n)


can be expressed as a linear combination of

This can be a polynomial of very high order.


87
C-H Theorem: example
Ex

How to compute these?


Compute eigenvalues of A

Solve the following linear equation w.r.t

(If there are repeated eigenvalues, derivative conditions will appear.)

88
Discretization
Solution to DT LTI systems

89
What is discretization?
Approximation of a CT system by a DT system.

CT system

DT system

90
Why discretization?
Digital control : For realization of a controller in a
digital computer, we need a DT controller.
Design
CT system CT controller

Discretization Discretization

DT system DT controller
Design

Digital simulation : Simulation of a CT system is


done in discrete-time.

91
Digital control system

DT controller
D/A Actuator CT system
Stabilization,
Disturbance
and noise
rejection, A/D Sensor
Regulation,
Tracking etc.

Digital signals Analog signals

92
Advantages of digital control
Reduced cost
A single digital computer can replace numerous
analog controllers. ( Reduction in cost!)
Flexibility in response to design changes
Any modifications that are required in the future can
be implemented with simple software changes rather
than expensive hardware modifications.
High reliability

93
Analog controller inflexibility
Lead compensator using operational amplifiers
To modify the controller,
we need to physically replace
C1 C2 electrical elements.
R4
R2
R1
R3
- -
vi(t) + + vo(t)

94
Discretization by ZOH
Given CT system & sample T, find DT system:

ZOH CT sys Sampling


From digital To digital
controller controller

Same input/output relation!

DT sys

95
ZOH by state-space model
Continuous-time system

Discrete-time system obtained by ZOH with


sampling time T (c2d.m in Matlab)

where

(C&D: unchanged!)

96
An example
Mass with a driving force
M=1

Discretization by ZOH with sampling time T

97
Simulation with Matlab
Code for discretization 0.7
Step responses
StepResponse
for
CT & DT systems
0.6

CT system Responses match


0.5
at kT, k=0,1,2,
for staircase CT inputs
0.4

Amplitude
Sampling time
Discretization 0.3

0.2

0.1

0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Time(sec)

98
Derivation (optional)
Solution to state equation

For piecewise constant input

x[k+1]

(by a variable change)


Ad x[k] Bd
99
Exact Discretisation
An exact discrete model of the continuous time system may be
obtained by using the PVF. Note that the output of the zero order
hold (D/A) is kept constant during each sampling period T until
the new sample arrives,

u(t) = u(kT ) , u[k] para t : kT t < (k + 1)T .

Now, for this sectionally constant input, we evaluate the state of


the continuous-time system at the sampling instant t = (k + 1)T ,
Z (k+1)T
x[k + 1] , x((k + 1)T ) = eA(k+1)T x(0) + eA((k+1)T ) Bu()d
0
Z kT Z (k+1)T
= eAT eAkT x(0) + eA(kT ) Bu()d + eA((k+1)T ) Bu[k]d
0 kT
| {z }
x[k]
Z T
= eAT x[k]+ eA d Bu[k]. (where we used = (k + 1)T ).
0
100
Lecture 11: State Space Equations p. 34/41
Solution to DT LTI SS model
DT LTI state-space model

Solution

This matrix will appear later


(for controllability).
101
Derivation
Solve recursively

k=0:
k=1:

k=2:

By induction

102
Summary
Discretization (Zero-Order Hold)
Digital control
Formula of discretized state-space model
Example with Matlab simulation
Solution to DT LTI SS models

103
1-5. Discretize the following continuous-time
system by ZOH with a sampling period T=1:

Verify the correctness of your calculation by


Matlab c2d.m. (Or verify the correctness of
Matlab calculation by your result.)

104
BIBO stability

105
Course plan

Topics CT DT

Modeling 9 9
Stability
Controllability/observability
Realization
State feedback/observer
LQR/Kalman filter

106
Stability
Utmost important specification in control design!
After stability, performance (tracking,
disturbance/noise attenuation, etc.)
Unstable systems to be stabilized by feedback
Unstable closed-loop systems are useless.
Unstable system may hit mechanical/electrical
stops (saturation), may break down or burn out.
In this course, we learn two types of stability:
BIBO stability
Internal stability

107
Bounded signal
Definition: A signal u(t) is called bounded if there
exists a um such that

u(t) u(t)
bounded unbounded
um

-um

A vector u(t) is bounded if every entry is bounded.

108
BIBO stability
Definition: A system is called BIBO stable if
every bounded (possibly vector) input u(t)
excites bounded (possibly vector) output y(t).
u(t) y(t)
ym
um

-um -ym

System

109
BIBO stability for CT LTI systems
Im
An CT LTI system G(s) is BIBO stable
if and only if
all the poles of G(s) are in the open Re
left half of the complex plane.

Ex. Poles are s=-1,-3


BIBO stable!
Ex. Poles are s=1,-3
Not BIBO stable!
(One can use Routh-Hurwitz criterion.)
110
Transfer function (review)
A transfer function is defined by

Laplace transform of system output

Laplace transform of system input

A system is assumed to be at rest. (Zero initial


condition)

111
Simple criteria for BIBO stability
1st order polynomial

2nd order polynomial

Higher order polynomial

112
Examples
G(s) stable?

Yes / No

Yes / No

Yes / No

Yes / No

Yes / No

113
BIBO stability for DT LTI systems
Im
An DT LTI system G(z) is BIBO stable
j
if and only if
1
all the poles of G(z) are in the open Re
unit disc of the complex plane.

Ex. Pole is z=0.5


BIBO stable!
Ex. Pole is z=-1
Not BIBO stable!
(One can use Jurys test.)

114
From SS to TF (Continuous-time)
CT LTI SS model

Laplace transform with x(0)=0

Memorize this!

115
BIBO stability for CT LTI SS model
Example
SS model

TF

Pole is s=-1
(After pole/zero cancellation) BIBO stable!

116
Important remark
In this example, CT LTI system is BIBO stable.
However, from the state equation,

For nonzero initial condition of x2, the state x2


goes unbounded, which is often not good.
For state-space models, BIBO stability is not
good enough.
Stability concept that can deal with nonzero
initial condition? (Internal stability)
117
BIBO & internal stability
BIBO stability Is y(t) bounded?

u(t) x(0)=0 y(t)

System

Internal stability
Does x(t) converge to 0?
x(0): nonzero y(t)

u(t)=0 System

118
Summary
BIBO stability
Definition
Conditions for both CT and DT LTI systems
Examples
Transform from state-space model to transfer
function model
Next, internal stability

119
Homework
2-1. Consider a feedback system:
r(t) y(t)
k

where k is a positive constant. Find the range of


k for which the transfer function from r to y
becomes BIBO stable.

120
Z-transform (review)
Definition: For a sequence {f[k]: k=0,1,2,.}

Shift property

121
From SS to TF (Discrete-time)
DT LTI SS model

Z-transform with x[0]=0

Memorize this!

122
Internal stability

123
Course plan

Topics CT DT

Modeling 9 9
Stability
Controllability/observability
Realization
State feedback/observer
LQR/Kalman filter

124
Review & todays topic
Last lecture was about BIBO stability.
BIBO stability cannot deal with stability for state-
space model with nonzero initial states.
Today, we study internal stability for
LTI CT:

LTI DT:

(Note that input is set to be zero.)

125
Issue in BIBO stability
Consider three BIBO stable open-loop systems:

Pole/zero cancellation in unstable region by series


connection is VERY BAD!
Unstable system MUST be stabilized by feedback!!!

126
Issue in BIBO stability (contd)
Why is unstable cancellation by series
connection not allowed?
Plant model is never exact! (and hence cancellation
will not occur in real world.)
Neither nonzero initial condition nor input disturbance
is allowed. (very fragile)
Some internal signal may go unbounded, even if
output is bounded.
BIBO stability cannot detect such cancellation,
but internal stability can!

127
Internal stability: Mechanical example
Imagine what will happen if we start near x=0.

Can we explain the difference of the state


behavior with the difference of A-matrix?

128
Phase plot
Plot of state trajectory in state-space

129
Definition of internal stability
Consider system (no input): (DT case is analogous.)

The system is marginally stable


(stable in the sense of Lyapunov),
if the following holds for some
M>0:

The system is asymptotically


stable if it is stable and

130
Eigenvalue criteria
Eigenvalue of A :
Stability CT DT

Asymptotically
stable
Marginally
stable For For

Otherwise, the system is unstable, i.e.,


for some x0, x(t) is unbounded. Multiplicity of

131
Idea of stability condition
CT DT

Examples Examples

For some x0, x(t) diverges.


132
Important examples
System is marginally stable.

Eigenvalue: 0,0 (m=2)


0 0
In fact,

System is unstable.

Eigenvalue: 0,0 (m=2)


2
1 0
In fact, Diverges
if x20 is nonzero.
133
A mechanical example: revisited
For simplicity, m=k=b=1

All the eigs are of


multiplicity one.

Asymptotically stable
Marginally stable Unstable

134
Examples
Are systems with the following A-matrices
asymptotically stable, marginally stable, or
unstable?
CT DT CT DT CT DT

135
Remark on stability for LTV system
Example:

Eigenvalues of A-matrix are -1 and -1 for any t.


However, this LTV system is unstable!!!
Why: Solve the differential equation.

For an initial state

Eigenvalue criteria do not work for LTV systems !


136
Summary
Internal stability
Definition of asymptotic stability, marginal stability,
and instability.
Eigenvalue criteria
Examples, phase plot
Next, Lyapunov Theorem for internal stability

137
Homework
2-2: Are systems with the following A-matrices
asymptotically stable, marginally stable, or
unstable?
CT DT CT DT CT DT

138
Lyapunov Theorem

139
Review & examples
Last time, eigenvalue criteria for internal stability.
CT : asymptotically stable
DT : asymptotically stable

Pendulum Inverted
pendulum

Marginally
Unstable
stable

140
Todays topic & Outline
We will study another condition for internal
stability, called Lyapunov Theorem.
Outline
Positive definite matrix
Lyapunov Theorem
Theorem
Example
Idea of the theorem

141
Positive definite matrix
A symmetric matrix P (n-by-n) is called positive
definite if

We write P>0 to mean P is positive definite.

Example

142
Facts on positive definite matrix
Fact 1:
Fact 2 (Sylvesters criterion):

Ex.

Ex.

Note: Positive entries do NOT mean P.D.!


143
Facts on positive definite matrix
Fact 3:

Ex. i-th entry

Check diagonal elements first!


If there is non-positive diagonal element, the matrix
is NOT positive definite.
If all the diagonal elements are positive, the matrix
may or may not be positive definite.
144
Outline
Positive definite matrix
Lyapunov Theorem
Theorem
Example
Idea of the theorem

145
Lyapunov Theorem (CT case)
All the eigenvalues of a matrix A have negative
real parts (in the open left-half plane)
if and only if
solution P of the following Lyapunov equation

is positive definite when Q>0.

Note: We solve the Lyapunov equation by solving the


corresponding linear equation. Use lyap.m in Matlab.
146
Lyapunov Theorem (DT case)
All the eigenvalues of a matrix A have absolute
values less than one (inside the unit disc)
if and only if
solution P of the following discrete Lyapunov
equation

is positive definite when Q>0.

Note: Use dlyap.m in Matlab.

147
Remarks
Normally, Q is taken to be the identity matrix.
For LTI SS model, Lyapunov Theorem has no
advantage over eigenvalue criteria.
In this course, we want to understand the idea of
the theorem, which will be useful in studying
advanced control.

148
Outline
Positive definite matrix
Lyapunov Theorem
Theorem
Example
Idea of the theorem

149
Example

CT case

Eigs. are all in the open left-half plane!


DT case

Not unique!
NOT all eigs. are in the unit disc!

150
Outline
Positive definite matrix
Lyapunov Theorem
Theorem
Example
Idea of the theorem

151
Idea of Lyapunov Theorem
1. For a fixed P>0, define
a (Lyapunov) function
V(x)

152
Idea of Lyapunov Theorem (contd)
2. Consider the trajectory
V(x(t)), where the
behavior of x(t) is
subject to

V(x(t))
(Altitude of
your position)

x(t) 153
Idea of Lyapunov Theorem (contd)
3. Take a derivative of
V(x(t)) w.r.t. t:

In DT case, take

x(t) 154
Idea of Lyapunov Theorem (contd)
4. If AP+PA=:-Q<0, then

V(x(t)) goes down as t increases.

x(t) approaches to zero, i.e.,


asymptotically stable!

x(t) 155
Idea of Lyapunov Theorem (contd)
Solving the Lyapunov
equation w.r.t. P

is equivalent to finding a
(Lyapunov) function V(x)
s.t.

Useful in advanced control!


(nonlinear/robust/time-varying)

x(t) 156
Summary
Lyapunov Theorem
Positive definite matrix
Lyapunov equation
Main idea of the theorem

157
Appendix: Who is Lyapunov?
Aleksandr Lyapunov (1857-1918)
Russian mathematician
University of Saint Petersburg
Stability analysis
Year: 1892
Lyapunov method
Applicable to nonlinear, time-
varying systems, too.
(Normally taught in
Nonlinear Control Course.)

158
Controllability

159
Controllability & observability
Consider a system with state vector:

(we control, actuate) System (we observe, measure)

x : neither controllable nor observable in general

Controllability: How much can we control x by


controlling u?
Observability: How much can we observe x by
observing y?
160
Very simple example
Three cars with one input and one output

x1: position
Car1
x2: velocity Intuitively, we cannot
Control x3-x6
x3: position
Car2 Observe x1-x4
x4: velocity

x5: position
Car3
x6: velocity

161
Model of three car example
State-space model

How can we explain controllability &


observability of the system from (A,B,C,D)?

162
Why controllability & observability
important?
Clarify essential/redundant sensors/actuators
Clarify the structure of the system
Which state is controllable, uncontrollable,
observable, unobservable?
Which state is redundant from input-output viewpoint?
(Minimality of a realization)
Clarify possibilities and limitations in
Control (state-feedback, linear quadratic regulator)
Estimation (observer, Kalman filter)

163
A mechanical example
Mass-spring-damper

164
Some questions
If I want to transfer any initial positions &
velocities to any final positions & velocities in a
specified time, is it possible?
What if we use only one actuator? (because the other
actuator broke down)
What if we set some spring and/or damper to be
zero?
Can you answer these questions by intuition?
If yes, how about the system that has 100 (instead of
two) mass-spring-damper subsystems?

165
Controllability for LTI system
Consider a state equation

Definition: The system above,


or (A,B), is called controllable
if, for any initial state x0 and x1
any final state x1, there is an
input u which transfers from x0
to x1 in a finite time. x0

166
Necessary and sufficient condition
for controllability
Controllability matrix
has full row rank, i.e.,

Note: One can use rank.m to compute rank of


a matrix. However, be careful when computing
rank of a matrix with computers!!!

Rank = 1 or 2 ???

167
Examples
Size of A-matrix
Ex

Uncontrollable!

Ex

Controllable!

Ex
Uncontrollable!

168
Three car example
State-space model (m1=1)

Controllability matrix
Uncontrollable!

This number indicates


the degree of controllability.

This matrix indicates which states are


controllable and which are not. (next lecture)
169
Mechanical example: revisited
Controllability test Matlab code
Various k1 & k2
Various b1 & b2
With and without
u1 & u2

170
Controllability test: results
b1 b2 k1 k2 Rboth Ru1 Ru2

1 1 1 1 4 4 4

0 1 1 1 4 4 4

1 0 1 1 4 4 4

1 1 0 1 4 4 3

1 1 1 0 4 3 4

0 1 1 0 4 4 4

1 0 0 1 4 4 3

171
Uncontrollable cases
k1=0, u1=0

k2=0, u2=0

b2=k1=0, u1=0

172
Summary
Controllability
Definition
Necessary and sufficient condition
Rank computation
Mechanical example
Next,
when (A,B) is controllable, minimum energy control
when (A,B) is uncontrollable, what can we do and
what cannot we do?

173
Homework
2-3: Read and understand Example 3-8, pp 86-
88 of Ogatas book.
Derive a SS model for inverted pendulum from (3.55)
& (3.56), with friction of the cart (with coefficient b),
1 inputs: u
4 output: Position & velocity of the cart, angle and
angular velocity of the pendulum.
Parameter values are given in the next slide.
Using Matlab, check the controllablity.
Attach Matlab code in your report.

174
Homework (contd)
Parameter values

175
EXAMPLE 3-7 Obtain the transferfunctionsX(s)/U(s) and X2$)/U(s) of the mechanicalsystemshownin
unT;"1lnr"tions
of motion for the systemshownin Figure3-19 are

mrir: - k t x r - k r l * , * x 2 )- b \ * y - i 2 ) + u

mzlz: -k*z - kr(*, - xt) - U(*, - *t)

Simplifying,we obtain
mri, + bit + (kt * k)x1 : b*z * k2x2I u

m2i2 * b*2 + (k2 * k1)x2= bit + k2xy

assumingzeroinitial conditions,we obtain


Takingthe Laplacetransformsof thesetwo equations,

lmrs2+ bs + (k, + kr)]xl(s): (rs + 6)xr1s1+ u(s) (344)

fm2s2+ bs + (k, + h))x21): (rs + k2)xr1) (3-45)

SolvingEquation(3-45)for X2(s) andsubstitutingit into EquationQa$ and simplifying,we get


.r -
l(mrsz+ bs * k,+ k2)(m2s2bs * kz+ h) (rs + 4)'?)x,1s1
: (m2s2 * bs * k2 + h)U (s)

from which we obtain

xr(s) m r s z+ b s + k r + k ,
(346)
u(s) ( m r s 2+ b s + k r + k 2 ) ( m 2 s* 2b s * k 2 + h ) - ( u s + *r)2

From Equations(3-45) and (3-46) we have

XzG) bs+k2
(347)
u(s) + bs + k2 + t < r ) - ( o s + * r ) 2
(m,sz + bs * k1 + kr)(m2s2

Equations(3-46)and (347) arethe transferfunctionsX 1$)/U (s) andX r(s)/ U (s), respectively.

Figure F19
Mechanicalsystem.

EXA,IVIPLE 3-8 An inverted pendulum mounted on a motor-driven cart is shown in Figure 3-20(a).This is a model
of the attitude control of a space booster on takeoff. (The objective of the attitude control prob-
lem is to keep the space booster in a vertical position.) The inverted pendulum is unstable in that
it may fall over any time in any direction unless a suitable control force is applied. Here we consider

86 Chapter 3 / Mathematical lvlodeling of Dynamic Systems


176
ln

.1)

r5'l

get
(a)

-46)

\4'7)

.ivelY.

figure 3-20
r a) Inverted
g'endulumsystem;
r h ) free-bodY
(b)
Jiagram.

only a two-dimensional problemin whichthe pendulummovesonly in the planeof the page'The


gravity of the pendulum rod is at
control force a is applied to the cart.Assumethat the center of
its geometriccenter.Obtain a mathematical model for the system'
g. the (x, y) coordinatesof
Define the angleof the rod from the verticalline as Define also
the centerof gravityof the pendulumrod as ('16,yo)'Then
a model
xc : x + / sinO
ol prob-
e in that yo -- I cos4
consider
87
Section 3-7 / MechanicalSYstems
177
To derive the equations of motion for the system,consider the free-body diagram shown in
Figure 3-20(b). The rotational motion of the pendulum rod about its center of gravity can be
describedby

Id - Vlsinl - Hlcosl (3+8)


where 1 is the moment of inertia of the rod about its center of gravity.
The horizontal motion of center of gravity of pendulum rod is given by

^ * O +' t s i n o ) = u (34e)
dt'

The vertical motion of center of gravity of pendulum rod is

d2 .,
rn*(tcos9):V-mg (3-50)

The horizontal motion of cart is describedby

M4::: U_ H (3-s1)
dt'
Sincewe mustkeepthe invertedpendulumvertical,we canassume thatg(r) ande(r) are
suchthatsin0 = 0,cosd -- L, and002: 0.Then,Equations
smallquantities (3+gj througrrid_sol
canbelinearized.The linearizedequationsare
I(i:Vt|-Ht (3-s2)
m ( i + t 6 1= n (3-s3)
0:V-mg (3-s4)
From Equations(3-51) and (3-53),we obtain

(M+m)i+ml(i :u (3-ss)
From Equations (3-52), (3-53), and (3-54), we have
I(): mgl| - Ht
: mgl| - l(mi + mtd)
or

(t+mt2)6+mti:msto (3-s6)
Equations (3-55) and (3-56) describethe motion of the inverted-pendulum-on-the-cartsystem.
They constitutea mathematicalmodel of the system.

EXAMPLE 3-9 Considerthe invertedpendulumsystemshownin Figure3-21.Sincein this systemthe massis con-


centratedat the top of the rod, the center of gravity is the center of the pindulum ball. For this
case,the moment of inertia of the pendulum about its center of gravity is small,and we assume
1 : 0 in Equation (3-56).Then the mathematicalmodel for this systembecomesas follows:
(M+m)i+ml(i :u (3-s7)
m t 2 (+
) mli:mglo (3-58)
Equations (3-57) and (3-58) can be modified to
Ml6:(M+m)sT_u (3-se)
MI:u_mg1 (3-60)

@ Chapter3 / MathematicalModelingof DynamicSystems


178
Minimum energy control
Decomposition

179
Review
Controllability

System
(A,B) is controllable if, for any x0 and any x1,
there is u(t) which transfers from x0 to x1 in a
(specified) finite time.
Nec. and suf. condition for controllability
Controllability matrix has full row rank, i.e.,

180
Todays topics
If (A,B) is controllable
Minimum energy control
If (A,B) is uncontrollable
Decomposition into controllable part and
uncontrollable part

181
Example
M
Consider a controllable system:

Suppose that we want to transfer states as

Start time Final time


At rest at position 0 At rest at position 1

Intuitively, there are many inputs achieving this objective!


What is the minimum energy control input?

182
Nec & suf conditions for controllability
Controllability matrix has full row rank, i.e.,

Equivalently, the following controllability


Grammian is nonsingular (in fact, positive
definite) for any t>0:

(by a variable change)

Note: The proof is in recommended references.


183
Minimum energy control
If (A,B) is controllable, there exist, in general,
many inputs that transfer

where x0, xf, tf are specified.


Find the input with minimum energy, i.e., solve

Ans.
(Proof given
in Appendix)

184
Example revisited
System: (M=1)

Initial & final conditions:

Minimum energy control:

185
Example (contd)
1

position
0.5
x1

0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
t
2

1
velocity
x2

0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
t
10

0
acceleration
u

-10
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
t

186
Remarks
Minimum energy control is an open-loop control.

System

Open-loop control works only when there is no


significant uncertainty in the real system and its
environment, and therefore, not practical!
Later in this course, we will learn optimal
feedback controller design.

187
Todays topics
If (A,B) is controllable
Minimum energy control
If (A,B) is uncontrollable
Decomposition into controllable part and
uncontrollable part

188
Coordinate transformation
System

Coordinate transformation

Does not change transfer function, stability,


controllability, observability. (Next slide)
Can be used to clarify the structure, and to improve
numerical property.
189
Some proofs
Transfer function is not affected by T.

Stability is not affected by T.

Controllability is not affected by T.

190
Decomposition
If (A,B) is not controllable with
then there exists a coordinate transformation
(i.e., nonsingular T) that decomposes states into
controllable part and the uncontrollable part:

191
How to find T? (Check ctrbf.m)
We use image space of controllability matrix.

Ex.
Uncontrollable!

192
Image space
For a matrix M (q-by-p):

Im M

A basis of Im M

193
Summary
Controllability
If controllable, minimum energy control
If not controllable, decomposition
Next, observability

194
Homework
2-4: Consider a controllable system

Compute minimum energy control that transfers


state as

Using Matlab (lsim.m, or ODE solver, or


Simulink), plot x(t) & u(t) for tf =2,4,10. Can you
see the tendency the larger tf is, the smaller u
is. Attach Matlab code in your report.
195
Appendix: Proof of min energy control
Proof of state transition

Check the state transfer by substitution!

196
Appendix (contd)
Proof of minimality
A
Suppose that other u satisfies the state transition.
B

A-B

Cauchy-Schwartz inequality

197
Decomposition for controllability

198
Coordinate transformation (review)
System

Coordinate transformation

Does not change transfer function, stability,


controllability, observability.
Can be used to clarify the structure, and to improve
numerical property.
199
Decomposition (review)
If (A,B) is not controllable with
then there exists a coordinate transformation
(i.e., nonsingular T) that decomposes states into
controllable part and the uncontrollable part:

200
Why is decomposition important?
We can see what is not possible by using control
input u. (We cannot affect at all the
uncontrollable part.)
If uncontrollable part is unstable, then we cannot
stabilize the system by feedback. (We will learn
this in more detail later.)
This may suggest addition of actuators, or
change of plant parameters and actuator
locations.

201
Image space
For a matrix M (q-by-p):

Im M

A basis of Im M

202
How to find T? (proof omitted)
We use image space of controllability matrix.

Ex.
Uncontrollable!

203
Another example
Ex

Controllability matrix
Uncontrollable!

Transformation matrix

204
Matlab command ctrbf.m

Note the reverse order


of the states!

205
Matlab command (contd)
Example

206
Mechanical example: revisited
Mass-spring-damper with k1=u1=0

207
Mechanical example: contd
Controllability matrix

Coordinate transformation matrix

208
Remarks
Rank of controllability matrix indicates the
number of controllable new states (z).
In the example, z4 is the uncontrollable state. In
fact, z4 is constant for any input, since

This means that, in the original state (x)

Position of mass 1 Position of mass 2


Velocity of mass 1

209
Exercise
Using Matlab, for the following two systems,
compute T which decomposes states into
controllable and uncontrollable parts, and figure
out which state is not controllable (Set all the
parameters (k,b,m) to be one.)

210
Summary
Decomposition for controllability
Image space
Examples
Matlab command for decomposition
Next, observability

211
Observability

212
Review & todays topic
Controllability: How much can we control x by
controlling u? (Done)
Nec. & suf. condition
Minimum energy control
Decomposition
Observability: How much can we observe x by
measuring y? (Todays topic)

(we control, actuate) System (we measure, observe)

213
Very simple example: revisited
Three cars with one input and one output

x1: position
Car1
x2: velocity Intuitively, we cannot
Control x3-x6
x3: position
Car2 Observe x1-x4
x4: velocity

x5: position
Car3
x6: velocity

214
Model of three car example
State-space model

How can we explain observability of the system


from (A,B,C,D)?

215
Observability for LTI system
System equations (no input)

Assumptions: y(t): measurable, x(0): unknown.


Definition: The system above, or (A,C), is called
observable if, there is a finite t1>0 such that y
over time interval [0,t1] determines uniquely x(0).

System
216
Remarks
If a system is observable, then we can
determine x(0), and therefore, {x(t), t>0}.
However, this is possible after future time (t1)
comes, and it is not practical.
In practice, we want to estimate x(t).
Later in this course, we will learn design of state
estimator, called observer.
Observability is necessary to construct a
successful observer.

217
Necessary and sufficient condition
for observability
Observability matrix

has full column rank, i.e.,

Remark: Observability depends only on A and C


matrices.
218
Simple examples
Ex.

Unobservable!
Ex.

Observable!

219
Three car example: revisited
Model

Observability matrix
Unobservable!

This number indicates


the degree of observability.

This matrix indicates which states


are observable and which are not.
220
Three car example (contd)
If the measurement is velocity of 3rd car:

221
Duality
Control Estimation

System

There is mathematical duality between:


Controllability & Observability
State feedback & Observer
Linear quadratic regulator & Kalman filter
Importance of duality is that result for one will
lead to, and will be led by, the other.

222
Mathematical duality
(A,B) is controllable (A,B) is observable.

Proof: Since rank M = rank M,


(A,B) is controllable

(A,B) is observable

223
Decomposition
If (A,C) is not observable with
then there exists a coordinate transformation
(i.e., nonsingular T) that decomposes states into
observable part and the unobservable part:

224
Kernel space
For a matrix M (q-by-p):

ker M

A basis of ker M
225
How to find T? (proof omitted)
We use kernel space of observability matrix.

Ex. Unobservable!

226
Summary
Observability
Definition
Condition by observability matrix
Duality between controllability and observability
Decomposition (Matlab command obsvf.m)
(We can use duality for decomposition.)
Next, Kalman decomposition

227
2-5: Check the controllability and observability
1. System

2. System

228
Kalman decomposition

229
Review & Todays topic
So far, we have learned controllability and
observability:
Condition
Decomposition
Duality
Today, we will study the combination of
decompositions for controllability and
observability, called Kalman decomposition.

230
Rudolf Emil Kalman (1930-)
American-Hungarian
Mathematical system theorist
During 1950s & 60s, he developed
state-space control theory
Controllability, observability
Linear quadratic regulator
Kalman filter
etc.
Most of the theory in this course
have been established by Kalman!
231
Two decompositions
SS model

System
Decomposition for Decomposition for
controllability observability

Controllable part Observable part


Uncontrollable part Unobservable part

232
Kalman decomposition (idea)
SS model

System

Controllable & observable part


Controllable & unobservable part
Uncontrollable & observable part
Uncontrollable & unobservable part

233
Kalman decomposition (idea)
Conceptual figure (Not block diagram!)
System

234
Kalman decomposition
Every SS model can be transformed by z=Tx for
some appropriate T into a canonical form:

235
Remarks
(Aco,Bco): controllable & (Aco,Cco): observable
Transfer function is determined by ONLY
controllable & observable parts.

If uncontrollable and/or unobservable parts are


unstable, we need to change the structure
(actuators/sensors) of the system, because no
output feedback control can stabilize the system.

236
How to find T? (review)
For controllability, we used image space of
controllability matrix.

For observability, we used kernel space of


observability matrix.

237
How to find T?
For Kalman decomposition,

238
Very simple example: revisited
Three cars with one input and two outputs

x1: position
Car1
x2: velocity

x3: position Guess which state is


Car2 x4: velocity controllable and/or observable!

x5: position
Car3
x6: velocity

239
Model of three car example
State-space model

240
Derivation of T
Controllability matrix

Observability matrix

(Inverse of T)=[e2,e1,{e5,e6},{e3,e4}](=T in this case)

241
Example (contd)
After transformation,

242
Matlab command minreal.m

Matlab returns matrices corresponding the states


(Verify this by yourselves.)

243
Summary
Kalman decomposition
Next, controllability and observability for
discrete-time systems

244
Homework
3-1. Using Matlab, do Kalman decomposition of the
following systems. Write explicitly which states are
controllable / uncontrollable and observable /
unobservable. If possible, do hand-calculations too.

245
Decomposition (review)
If (A,C) is not observable with
then there exists a coordinate transformation
(i.e., nonsingular T) that decomposes states into
observable part and the unobservable part:

246
Kernel space
For a matrix M (q-by-p):

ker M

A basis of ker M
247
How to find T? (proof omitted)
We use kernel space of observability matrix.

Ex. Unobservable!

248
Controllability and observability
Discrete-time case

249
Why contollability & observability?
Definitions of controllabiltiy (open-loop) and
observability (estimation of past) are not so
practical.
They are important properties in many feedback
controller and state estimator design techniques.
The lack of these properties limits achievable
performance. (later in this course.)
Note that stability, controllability, and
observability are independent properties.

250
Review & todays topic
So far, for CT systems, we learned controllability
and observability:
Definitions
Conditions
Duality
Kalman decomposition
Today, we study discrete-time counterpart
(which is almost the same as CT results; actually
easier than CT cases!).

251
An example
Mass-spring-damper

Controllable and observable CT system


If we discretize it (by ZOH) with period T, is it still
controllable and/or observable?
Definitions of ctrb & obsv for DT systems?

252
Controllability for DT LTI system
Consider a state equation

Definition: The system above,


or (A,B), is called controllable
if, for any initial state x0 and x1
any final state x1, there is an
input sequence u[0],u[1], of
finite length which transfers x0
from x0 to x1.

253
Observability for DT LTI system
System equations (no input)

Assumptions: y(t): measurable, x(0): unknown.


Definition: The system above, or (A,C), is called
observable if, there is a finite k1>0 such that y
over time interval [0,k1] determines uniquely x[0].

System
254
Conditions

Controllable if and only if the controllability


matrix Cd has full row rank:

Observable if and only if the observability matrix


Od has full column rank:

255
Derivation for controllability condition
Solve recursively

For any x[n] and x[0], this has a solution


u[0],,u[n-1] if and only if

256
Simple examples

Uncontrollable case

No solution.
Controllable case

There is a solution.
257
Derivation for observability condition
Solve recursively

Substitute this into

given

There is a unique x[0] if and only if

258
Simple examples
(Unknown)
Unobservable case

Non-unique solutions.
Observable case

Unique solution.
259
Minimum energy control
If controllable, find the input with minimum
energy (least-squares sum), i.e., solve

LS solution

260
Remark
Recall that, for CT systems, if (A,B) is
controllable, then any state transfer is possible in
any (epsilon) time.
However, this is NOT the case for DT systems.
Ex.

1-step state transfer is possible only when

2-step state transfer is always possible in this


example.

261
An example: revisited
Set m=1, k=4, b=0.

Discretize the system with sampling period T.

262
An example (contd)
Is the discretized system controllable?

if Uncontrollable for some T!

How about observability?

263
Summary
DT controllability and observability (very similar
to CT results.).
Duality & Kalman decomposition apply to DT
systems, too.

264
Realization

265
Motivation
Now, we have learned two ways to describe LTI
systems, i.e., TF and SS models.

TF: SS:

To use analysis & design techniques for SS


models, one may want to transform a TF model
to an equivalent SS model. How?
More generally, what is the relationship between
two models?
266
From SS to TF (review)
CT LTI SS model

Laplace transform with x(0)=0

Memorize this!

267
Realization: From TF to SS
Given a rational proper transfer matrix
find matrices (A,B,C,D) s.t.

Rationality: (polynomial)/(polynomial)
Rational Non-rational

Properness: deg(num)<=deg(den)
Proper Non-proper

268
Remarks
For one SS model, there is a unique TF.
For one TF model, there are infinitely many SS!

unique

(A,B,C,D) G(s)
infinitely many Coordinate transformation T
Order difference

After realization, check the correctness by


recovering the original transfer matrix.

269
First step for realization
Always extract D-matrix first!

constant Strictly proper

Ex

constant Strictly proper

After extracting D, find (A,B,C) s.t.

270
Controllable canonical form
SISO example

or equivalently

271
Companion matrix
The following form (and its transpose) of a
matrix is called companion matrix (form):

Important property of a companion matrix

272
SISO example
Ex.1

Ex.2

273
Controllable canonical form
MIMO case

Least common denominator

274
MIMO example
Transfer matrix

Note that the size of A-matrix is four.

275
Remark
Controllable canonical realization is always
controllable (but not always observable). Why?

276
Derivation of
controllable canonical form
TF

Introduce a variable x(s)

We have

277
Derivation (contd)
Introduce state variables

Then,

By inverse Laplace transform, done!

278
Summary
Realization (In Matlab, tf2ss.m)
Controllable canonical form
Next,
Observable canonical form
Diagonal form

279
Homework
3-2. Obtain controllable canonical realizations
for the following transfer matrices. By hand-
calculation, check the correctness of your
answers.

280
Realization II

281
Realization (review)
Given a rational proper transfer matrix
find matrices (A,B,C,D) s.t.

1. Always extract D-matrix first!

2. After extracting D, find (A,B,C) s.t

282
Review
In the last lecture, we learned a realization,
called a controllable canonical form.

Today, we study dual realization, called an


observable canonical form.
form
283
Observable canonical form
SISO example

or equivalently

284
Companion matrix (review)
The following form (and its transpose) of a
matrix is called companion matrix (form):

Important property of a companion matrix

285
SISO example
Ex.1

Ex.2

286
Observable canonical form
MIMO case

Least common denominator

287
MIMO example
Transfer matrix

Note that the size of A-matrix is two, not four!


Q: What is the smallest size of A?
(Minimal realization: next lecture)
288
Remark
Note the duality between controllable and
observable canonical form.
Observable canonical realization is always
observable (but not always controllable). Why?

289
Derivation of
observable canonical form
TF

Rewrite I/O relation as

290
Derivation (contd)
Draw block-diagram

By introducing state variables as in the figure,


done!

291
Parallel connection of SS models
Formula

292
Series connection of SS models
Formula

293
An example
Series connection

BIBO stable but not internally stable!


294
Summary
Observability canonical realization
Parallel and series connections of SS models
Next, minimal realization

295
Homework
3-3: Obtain realizations in observable canonical
forms for the following transfer matrices.

3-4: Using the obtained realizations above, find


realizations of the following TFs.

By hand-calculation, check the correctness by


recovering the original transfer matrix.

296
Minimal realization

297
Review
In the last lecture, we considered the realizations
of the following transfer matrix:

Controllable canonical form Observable canonical form


with order 4 with order 2

298
Todays topic
Realization of the smallest order
How to characterize such realization?
How to obtain such realization?
Some terminologies:
Minimal realization of G(s):
Realization (A,B,C,D) of G that has the smallest
dimension of A-matrix.
McMillan degree of G(s):
The dimension of A of the minimal realization. (This
indicates the complexity of a system G(s).)

299
Why minimal realization?
Easy to
Analyze (understand) the system
Design a controller
Implement a controller
Computationally less demanding in both design
and implementation
Higher reliability
Few parts to go wrong in the hardware
Few bugs to fix in the software

300
Two important facts on minimal
realization
Fact 1: A realization (A,B,C,D) is minimal
if and only if
(A,B) is controllable and (A,C) is observable.

Fact 2: All minimal realizations of G(s) are


related by coordinate transformations.

(Sketches of proofs are given in the appendix.)

301
Nonminimal realization examples
Ex

Controllable canonical form Is it observable? No!

Observable canonical form


Is it controllable? No!

302
How to obtain minimal realization
SISO (Single-Input-Single-Output) case
Remove common factors from numerator and
denominator of G(s). Then, realize G in a controllable
(or observable) canonical form.

C.C.F.

Observable! Minimal! McMillan degree 2

303
How to obtain minimal realization
SIMO case (G(s) is a column vector)
Use the controllable canonical form.

MISO case (G(s) is a row vector)


Use the observable canonical form.

304
How to obtain minimal realization
MIMO (Multiple-Input-Multiple-Output) case
1. Realize G(s) in some non-minimal canonical form.
2. Use the Kalman decomposition to remove
uncontrollable/unobservable parts. (minreal.m)

Remark: Unfortunately, it is generally hard to


compute the Kalman decomposition by hand.
Remark: There is another famous algorithm,
called Hos algorithm, to compute a minimal
realization. (Not covered in this course.)

305
Kalman decomposition (review)
Every SS model can be transformed by z=Tx for
some appropriate T into a canonical form:

306
Kalman decomposition (review)
Conceptual figure (Not block diagram!)
System

307
Example
TF

Order 6
308
Example (contd)
Minimal realization

Controllable!

Observable!

Order 3 Minimal!

309
Example (contd)
After realization, check
the correctness by
recovering the original (1,1)
transfer matrix.
(2,1)

(1,2)

(2,2)

310
Summary
Minimal realization
Realization for DT systems is exactly the same
as that for CT systems.

311
3-5: By both hand-calculation and Matlab, obtain
minimal realization for:

312
Appendix: Proof of Fact 1
only if-part : If (A,B) is not controllable or (A,C) is not
observable, due to Kalman decomposition theorem,
there is a realization with less state dimension.
if-part : Suppose (A,B,C) controllable & observable.

Contradiction!

313
Appendix: Proof of Fact 2
Given a rational proper transfer matrix, assume two
minimal realizations:

Define T as (by )

Then, due to

One can verify the following by using

314
Rank computation
Rank of a matrix can be computed by Singular
Value Decomposition (SVD): For any real matrix
M (m-by-n), we can decompose M as

Singular values

315
State feedback

316
Controller design process (review)
Disturbance
Reference Input Output
Controller Actuator Plant

Sensor

4. Implemenation 1. Modeling

Controller Mathematical model

2. Analysis
3. Design
317
Design of control systems
Objective: Find a feedback control so that
The feedback system is internally stable, and
The plant output y(t) follows as closely as possible to
the reference r(t).

u: control input y: plant output


r: reference signal

? plant

318
Example: Cruise control
http://www.engin.umich.edu/group/ctm/examples/
Modeling Force
(input)

friction

Speed
(output)

319
Cruise control (contd)
Specifications: For initial velocity 10m/s,
r(t)=0
Rise time < 5sec 10

Overshoot < 10% 8

Steady state error < 2%

Velocity (m/s)
6

Open-loop system 4

Pole: -0.05
2
Takes too much time.
0
0 20 40 60 80 100
Time (sec)

Feedback control for performance improvement!


320
State feedback
Given an LTI system

design a state feedback control law

so that all the specifications are satisfied.


internal stability
time domain specs (steady state, transient)
frequency domain specs (bandwidth,
gain/phase property etc.)

321
State feedback (contd)
Block diagram Plant

Open-loop and closed-loop systems

322
Assumptions
D=0
Just for simplicity
This assumption holds in most practical problems.
State vector x is available.
This assumption does not hold in many applications,
and will be removed later.
State estimator (observer and Kalman filter)
Reference r
Regulation: r=0 (will be considered during this week.)
Tracking or servo: nonzero r (will be considered later.)

323
Pole placement theorem
If (A,B) is controllable, the eigenvalues of (A-BK)
can be placed arbitrarily (provided that they are
symmetric with respect to the real axis).
Im

K
Re

: Closed-loop poles (design parameters)


324
State feedback design: Direct method
Ex.

Note that (A,B) is controllable. Hence, any pole


placement is possible. Note also that
eigenvalues of A are 4, -2, i.e., unstable!

Let us stabilize the system by placing poles at

325
Direct method (contd)
Desired characteristic polynomial

Characteristic polynomial of CL system

326
Feedback cruise control
State equation

A B

Note that (A,B) is obviously controllable. Hence,


any pole placement is possible.

327
Feedback cruise control (contd)
pole = -0.5 pole = -1 pole = -1.5
10 10 10

Velocity (m/s)

Velocity (m/s)
Velocity (m/s)

5 5 5

0 0 0
0 2 4 6 8 10 0 2 4 6 8 10 0 2 4 6 8 10
Time(sec) Time(sec) Time(sec)

0 0 0
Control input (kN)

Control input (kN)


Control input (kN)

-5 -5 -5

-10 -10 -10

-15 -15 -15


0 2 4 6 8 10 0 2 4 6 8 10 0 2 4 6 8 10
Time(sec) Time(sec) Time(sec)

328
Exercise
Try the simulation by yourselves! (Matlab code is
on the course homepage.) Change the pole
location, and get a feeling how responses are
affected by the pole location.
For the system below, design a state feedback
u=-Kx so that the closed-loop system has -1 and
-2 as its eigenvalues, by using the direct
method.

329
Summary
State feedback
Pole placement theorem
Direct method for calculating state feedback gain
Suitable only for problems with n=1,2,3.
Cruise control example
As the pole is moved to the left, the convergence
becomes faster, at the price of large control input.
Next, canonical form method for designing the
state feedback gain

330
State feedback design
Canonical form method

331
Review & todays topic
In the last lecture
State feedback
Arbitrary pole placement is possible by a state
feedback u=-Kx if and only if (A,B) is controllable
A direct method to compute the feedback gain K
(applicable to only problems of small sizes)
In todays lecture
A canonical form method for state feedback with a
scalar input (Extension to multi-input cases is
possible, but complicated.)

332
DC motor speed control
http://www.engin.umich.edu/group/ctm/examples/

333
DC motor speed control (contd)
State-space model

334
DC motor speed control (contd)
Specifications: For initial condition
r(t)=0
1
Settling time < 1 sec
Overshoot < 5% 0.8

Angular velocity (rad/s)


Steady state error < 1% 0.6

Open-loop system 0.4

Poles = -9.9975, -2.0025


0.2
Too slow
0
0 0.5 1 1.5 2 2.5 3
Time (sec)

Feedback control for performance improvement!


335
State feedback (review)
Block diagram Plant

Open-loop and closed-loop systems

336
Pole placement theorem (review)
If (A,B) is controllable, the eigenvalues of (A-BK)
can be placed arbitrarily (provided that they are
symmetric w.r.t. the real axis).
Im

K
Re

: Closed-loop poles (design parameters)


337
State feedback design
Canonical form method
Step 0: Check if (A,B) is controllable. If it is, go to
Step 2.
Step 1: Compute the characteristic polynomial of
the open-loop system:

Step 2: Set

338
Canonical form method (contd)
Step 3: Specify the desired closed-loop poles, i.e.,
the desired characteristic polynomial

Step 4: State feedback gain is computed by

(desired CL) (OL)


The more you want to move the poles,
the larger K, as well as the input, will be.

339
Idea of canonical form method
If (A,B) is in a controllable canonical form

then CL characteristic polynomial will be

340
Idea (contd)
If (A,B) is not in a controllable canonical form,
the matrix T in Step 2 transforms A & B as

Provable by using Cayley-Hamilton Theorem!

As explained, for a controllable canonical form,

Note that

341
DC motor speed control: revisited
SS model

Step 0: (A,B) controllable


Step 1: Ch. Polynomial
Step 2: Set

Step 3: Specify the desired CL poles at p1 & p2

Step 4:
342
Speed control (contd)
pole = -5+j, -5-j pole = -5+5j, -5-5j
1 1
Ang. velo. (rad/s)

Ang. velo. (rad/s)


0.5 0.5

0 0

-0.5 -0.5
0 0.5 1 1.5 2 2.5 3 0 0.5 1 1.5 2 2.5 3
Time (sec) Time (sec)

10 10

Control input (volt)


Control input (volt)

0 0

-10 -10

-20 -20
0 0.5 1 1.5 2 2.5 3 0 0.5 1 1.5 2 2.5 3
Time (sec) Time (sec)

343
Exercise

For the system below, design a state feedback


u=-Kx so that the closed-loop system has -1 and
-2 as its eigenvalues, by using the canonical
form method.

344
Multi input example
Matrices

BK =

A-BK =

345
Summary
State feedback
Canonical form method to design state feedback gain
place.m in Matlab
DC motor speed control example
As the pole is moved away from the real axis, the
overshoot becomes larger.
Next,
Lyapunov method to design state feedback gain
How to select desired pole locations
Stabilizability

346
State feedback design
Lyapunov equation method

347
Review & todays topics
In the last two lectures
State feedback
Pole placement theorem: Arbitrary pole placement is
possible by a state feedback u=-Kx if and only if (A,B)
is controllable
Direct method & canonical form method to compute
the feedback gain K (place.m)
Todays topics
Lyapunov equation method
Where to place closed-loop poles
Stabilizability

348
State feedback (review)
Block diagram Plant

Open-loop and closed-loop systems

349
Pole placement theorem (review)
If (A,B) is controllable, the eigenvalues of (A-BK)
can be placed arbitrarily (provided that they are
symmetric w.r.t. the real axis).
Im

K
Re

: Closed-loop poles (design parameters)


350
Review & todays topics
In the last two lectures
State feedback
Pole placement theorem: Arbitrary pole placement is
possible by a state feedback u=-Kx if and only if (A,B)
is controllable
Direct method & canonical form method to compute
the feedback gain K (place.m)
Todays topics
Lyapunov equation method
Where to place closed-loop poles
Stabilizability

351
Lyapunov equation method
Step 0: Check if (A,B) is controllable. If it is, go to
Step 1.
Step 1: Select a matrix F with desired eigenvalues
s.t.
Step 2: Select a matrix
Step 3: Solve the Lyapunov equation w.r.t. T

Step 4: If T is singular, redo from Step 3 with


different
Step 5: If T is nonsingular,
352
Remarks on Lyapunov eq. method
How to construct F
Suppose that the desired closed-loop poles are

Then, F can be chosen as

How to construct : Select randomly!


Condition for the unique solution of the
Lyapunov equation:

353
Idea of Lyapunov eq. method
From Steps 3 & 5,

If T is nonsingular

Conditions
are necessary for the Lyapunov equation to
have a nonsingular solution. (Proof omitted.)

354
An example
SS model

CL poles
Step 1:

Step 2:

Step 3:

Step 5:

355
DC motor position control
http://www.engin.umich.edu/group/ctm/examples/

356
DC motor position control (contd)
State-space model

357
DC motor position control (contd)
Specifications: For
r(t)=0 1.02

Settling time < 40 ms


Overshoot < 16% 1.015

Position (rad)
Zero steady state error
1.01
Open-loop system
y(t) does not
Poles = 0, -59.226 1.005
go to zero!
-1.4545E+6
Not asymptotically stable! 1
0 0.02 0.04 0.06 0.08 0.1
Time (sec)

Feedback control for stability & performance!


358
State feedback position control
1 1

Position (rad)
Position (rad)

0.5 0.5

0 0

-0.5 -0.5
0 0.02 0.04 0.06 0.08 0.1 0 0.02 0.04 0.06 0.08 0.1
Time (sec) Time (sec)

10 10

Control input (volt)


Control input (volt)

0 0

-10 As the pole is moved away from-10the real axis, the overshoot
0 0.02 0.04 0.06 0.08 0.1 0 0.02 0.04 0.06 0.08 0.1
becomes larger
Time (sec)
and the response becomes faster.
Time (sec)

359
Exercise

For the system below, design a state feedback


u=-Kx so that the closed-loop system has -1 and
-2 as its eigenvalues, by Lyapunov eq. method.

360
Review & todays topics
In the last two lectures
State feedback
Pole placement theorem: Arbitrary pole placement is
possible by a state feedback u=-Kx if and only if (A,B)
is controllable
Direct method & canonical form method to compute
the feedback gain K (place.m)
Todays topics
Lyapunov equation method
Where to place closed-loop poles
Stabilizability

361
Rules of thumbs
Move the poles for improvement of stability and
performance.
Do not try to move poles farther than necessary.
Control input should not be too large.

(desired CL) (OL)


Place the poles in similar distances from the
origin, to make the control effort efficient.
Control effort depends on the farthest poles, while
speed depends on the closest poles to the origin.
362
Butterworth configuration
1930 Stephen Butterworth

363
Review & todays topics
In the last two lectures
State feedback
Pole placement theorem: Arbitrary pole placement is
possible by a state feedback u=-Kx if and only if (A,B)
is controllable
Direct method & canonical form method to compute
the feedback gain K (place.m)
Todays topics
Lyapunov equation method
Where to place closed-loop poles
Stabilizability

364
Stabilizability
Suppose that (A,B) is NOT controllable.
If the uncontrollable part of A-matrix is stable,
then the system is called stabilizable.

Controllable pair

Eigenvalues of this cannot be changed by state feedback.

365
Summary
State feedback
Lyapunov eq. method to design state feedback gain
Where to place closed-loop poles (one always needs
trial-and-error)
Rules of thumbs
Butterworth configuration

Stabilizability
Next,
Tracking (servo) control

366
Servo control

367
Review & todays topic

State feedback
Pole placement theorem
Methods to compute state feedback gain K
Regulation problem, i.e., r(t)=0
Today
Servo (tracking) problem, i.e., nonzero r(t)
We also consider disturbance rejection.
For simplicity, we only deal with SISO cases (but
there are similar results for MIMO cases.)

368
DC motor position control
http://www.engin.umich.edu/group/ctm/examples/

Torque
disturbance

369
DC motor position control (contd)
State-space model

370
DC motor position control (contd)
Specifications: For zero initial condition
r(t)=1 rad
Settling time < 40 ms
Overshoot < 16%
Zero steady state error for
Step reference
Step disturbance
Open-loop system
Poles = 0, -59.226, -1.4545E+6
Not asymptotically stable!

371
DC motor position control (contd)
Standard state feedback structure does not
work, as shown in the next slide.
Plant

372
DC motor position control (contd)
Closed-loop poles:
Response to step r(t) Response to step w(t)
800 35

700 30

600
25
Position (rad)

Position (rad)
500
20
400
15
300
10
200

5
100

0 0
0 0.01 0.02 0.03 0.04 0.05 0 0.01 0.02 0.03 0.04 0.05
Time (sec) Time (sec)
Not satisfactory!
373
Robust tracking
Given
design a feedback control law s.t.
feedback system is internally stable
y(t) will track asymptotically any step r(t) even
with small plant parameter variations
with step disturbance w(t) of unknown magnitude

374
State feedback with an integrator
Block diagram
Plant

375
Closed-loop system
SS model

Closed-loop A-matrix

Any pole placement possible!


376
DC motor position control (revisited)
Closed-loop poles:
Response to step r(t) Response to step w(t)
10
1

8
0.8
Position (rad)

Position (rad)
6
0.6

0.4 4

0.2
2

0
0
0 0.01 0.02 0.03 0.04 0.05 0 0.01 0.02 0.03 0.04 0.05
Time (sec)
Satisfactory! Time (sec)

377
Why no steady state error to any
step disturbance?
Transfer function from w to y:

When w(t)=w, the steady state value of the


output y is obtained by final value theorem:

This holds robustly against (A,B,C) variations as


long as the closed-loop system is stable.
378
Why no steady state error to any
step reference?
Transfer function from r to y:

When r(t)=r, the steady state value of the output


y is obtained by final value theorem:

This holds robustly against (A,B,C) variations as


long as the closed-loop system is stable.
379
Transfer function derivation
Subsystem

380
Transfer function derivation (contd)
Total system

To obtain closed-loop transfer functions, use the formula:

381
Internal model principle
For robust tracking (y tracks r even with w &
plant perturbation), the controller must contain
the dynamics of the exogenous system.

Controller Plant

382
Summary
Servo control
State feedback with an integrator
Reduction to standard pole placement technique
Internal model principle

383

Anda mungkin juga menyukai