Anda di halaman 1dari 46

# Lecture – 37

A Robustifying Tool for Any Design

Asst. Professor
Dept. of Aerospace Engineering
Indian Institute of Science - Bangalore
Motivation
z Perfect system modeling is difficult
z Sources of imperfection
• Unmodelled dynamics (missing algebraic terms in the model)
• Inaccurate knowledge of system parameters
• Change of system parameters/dynamics during
operation
z “Black box” adaptive approaches exist. But,
making use of existing design is better!
z The adaptive design should preferably be
compatible with “any nominal control” design
Reference

Unnikrishnan and S. N. Balakrishnan,
Control Design for Non-square, Non-
affine Nonlinear Systems”, IET Control
Theory and Applications, Vol. 1 (6),
Nov 2007, pp.1650-1661.

## ADVANCED CONTROL SYSTEM DESIGN 3

Modeling Inaccuracy:
A Simple Example

x = 2sin ( x ) + 0.1sin ( x )

## Known part of Unknown part

actual system of actual
(nominal system) system

= 2sin ( x ) + Δc sin ( x )
Weight Basis Function

Objective:

## To increase the robustness of a “nominal

controller” with respect to parameter and/or
imperfections in the system model.

## ADVANCED CONTROL SYSTEM DESIGN 5

Problem Description and
Strategy
z Desired Dynamics: X d = f ( X d ,U d )

z Actual Plant: X = f ( X ,U ) + d ( X )
(unknown)

z Goal: X → X d , as t → ∞

z Approximate System: X a = f ( X ,U ) + dˆ ( X ) + K a ( X − X a )
( Ka > 0)
z Strategy: X → X a → X d , as t → ∞ NN Approx.

## ADVANCED CONTROL SYSTEM DESIGN 6

Steps for assuring X a → X d

## z Select a gain matrix K > 0 such that

Ed + K Ed = 0, Ed ( Xa − Xd )
{ f ( X ,U ) + dˆ ( X ) + K ( X − X )} − f ( X ,U ) + K ( X − X ) = 0
a a d d a d

f ( X ,U ) = { f ( X ,U ) − dˆ ( X ) − K ( X − X ) − K ( X − X )}
d d a a a d

i.e. f ( X ,U ) = h ( X , X a , X d ,U d )

## ADVANCED CONTROL SYSTEM DESIGN 7

Control Solution:
(No. of controls = No. of states)

z Affine Systems: f ( X ) + ⎣⎡ g ( X ) ⎦⎤ U = h ( X , X d , X a ,U d )

U = [ g( X )]
−1
{ h( X , X , X ,U ) − f ( X ) }
d a d

z Non-affine Systems: f ( X ,U ) = h ( X , X d , X a ,U d )
Use Numerical Method ⎧U d : k = 1 ⎫
(U ) guess k =⎨
=

(e.g. N-R Technique) ⎩ k −1
U : k 2,3,...⎭

## ADVANCED CONTROL SYSTEM DESIGN 8

Control Solution:
(No. of controls < No. of states)

z Modify X a dynamics:
X a = f ( X ,U ) + ⎡ dˆ ( X ) − Ψ ( X )U s ⎤ + Ψ ( X )U s + K a ( X − X a )
⎣ ⎦
= f ( X ,U ) + dˆ ( X ) + Ψ ( X )U + K ( X − X )
a s a a

## z Solve for the control from:

{ f ( X ,U ) + dˆ ( X ) + Ψ ( X )U + K ( X − X )} − f ( X ,U ) + K ( X − X ) = 0
a s a a d d a d

f ( X ,U ) + Ψ ( X )U = { f ( X ,U ) − dˆ ( X ) − K ( X − X ) − K ( X − X )}
s d d a a a a d

= h ( X , X a , X d ,U d )

## ADVANCED CONTROL SYSTEM DESIGN 9

Solution for affine systems:
(No. of controls < No. of states)

{ f ( X ) + g ( X )U } + Ψ ( X )U s = h ( X , X a , X d ,U d )
⎡U ⎤
f ( X ) + ⎣⎡ g ( X ) Ψ ( X ) ⎦⎤ ⎢ ⎥ = h ( X , X a , X d ,U d )
⎣U s ⎦

G ( X ) V = − f ( X ) + h ( X , X a , X d ,U d )

{− f ( X ) + h( X , X , X ,U )}
−1
V = ⎣⎡G( X ) ⎦⎤ a d d

Extract U from V

For simplicity, we will not consider this special case in our further discussion.

## ADVANCED CONTROL SYSTEM DESIGN 10

Steps for assuring X → Xa

z Error: Ea ( X − X a ) , eai (x − x )
i ai

## z Error Dynamics: Ideal neural network

xi = fi ( X , U ) + di ( X ) d i ( X ) = WiT ϕi ( X ) + ε i

## xai = fi ( X , U ) + dˆi ( X ) + kai eai Actual neural network

eai = xi − xai dˆ ( X ) = Wˆ T ϕ ( X )
i i i

## = {Wi T Φ i ( X ) + ε i } − Wˆi T Φ i ( X ) − kai eai

eai = Wi T Φ i ( X ) + ε i − kai eai (W i Wi − Wˆi )
Stable Function Learning
Lyapunov Function Candidate
Li =
1
2
(pi ea2i +) 1
2γ i
(
Wi T Wi ) ( pi , γ i > 0 )

## Derivative of Lyapunov Function

1
Li = pi eai eai + Wi T Wi
γi

(
= pi eai Wi T Φ i ( X ) + ε i − kai eai − ) 1
γi
Wi T Wˆi (∵W
i Wi − Wˆi )
⎛ 1 ⎞
= Wi T ⎜ pi eai Φ i ( X ) − Wˆi ⎟ + pi eai ε i − kai pi ea2i
⎝ γi ⎠
0
Stable Function Learning
Weight update rule (Neural network training)

Wˆi = γ i pi eai Φ i ( X )
Derivative of Lyapunov Function
Li = pi eai ε i − kai pi ea2i

Li < 0 if (
eai > ε i / kai )
The system is “Practically Stable”

## ADVANCED CONTROL SYSTEM DESIGN 13

Implementation of Controller
Weight update rule:

## Wˆi = γ i pi eai Φ i , Wˆi ( 0 ) = 0

where, γ i : Learing rate
eai = xi − xai
Φ i : Basis function
Estimation of unknown function:
dˆ ( X ) = Wˆ T Φ i

## ADVANCED CONTROL SYSTEM DESIGN 14

Implementation of Controller
z Desired Dynamics: X d = f ( X d ,U d )
(unknown)
z Actual Plant: X = f ( X ,U ) + d ( X )
In reality, X(t) should be available from sensors and filters!

## z Approximate System: NN Approximation

X a = f ( X ,U ) + dˆ ( X ) + K a ( X − X a ) , K a > 0 ( pdf )

## ADVANCED CONTROL SYSTEM DESIGN 15

Example – 1
A Motivating Scalar Problem

Asst. Professor
Dept. of Aerospace Engineering
Indian Institute of Science - Bangalore
Example – 1:
A scalar problem
z System dynamics xd = ( xd + xd 2 ) + (1 + xd 2 ) ud
(nominal system)
z System dynamics x = ( x + x 2 ) + (1 + x 2 ) u + d ( x )
(actual system) d ( x ) = sin (π x / 2 )

## * Nominal control design: xd → 0

* Adaptive control design: x → xd
Note: The objective x → xd should be achieved much faster than xd → 0

## ADVANCED CONTROL SYSTEM DESIGN 17

Example – 1:
A scalar problem
z Nominal control ( xd − 0 ) + (1/ τ d ) ( xd − 0 ) = 0 (τ d = 1)
(dynamic inversion)
z Nominal control ud = − (1 + xd )
2 −1
( d d + xd )
x + x 2

1 ⎢ ⎡ ( xd + xd
2
) + ( 1 + x d
2
) ud − k ( xa − xd )⎤⎥
1 + x 2 ⎢ − ( x + x 2 ) − dˆ ( x ) − ka ( x − xa ) ⎥
⎣ ⎦
z Design parameters
k = 2.5 ka = 1 p =1 γ = 30

3 T
Φ ( x ) = ⎡( x / x0 ) ( x / x0 ) ( x / x0 ) ⎤
2
⎣ ⎦

Example – 1:
A scalar problem

Example – 1:
A scalar problem

## ADVANCED CONTROL SYSTEM DESIGN 20

Example – 2
Double Inverted Pendulum:
A Benchmark Problem

Asst. Professor
Dept. of Aerospace Engineering
Indian Institute of Science - Bangalore
Example – 2:
Double inverted pendulum

## ADVANCED CONTROL SYSTEM DESIGN 22

Example – 2:
Double inverted pendulum
x11 = x12
z Nominal Plant:
⎛ u1max ⎞ ⎛ kr 2 ⎞
⎟ sin ( x2 )
kr
x = α1 sin( x ) +
2
1
1
1 (l − b) + ⎜ ⎟ tanh ( u1 ) + ⎜
1

2 J1 ⎝ J1 ⎠ ⎝ 4 J1 ⎠
x12 = x22
⎛u ⎞ ⎛ kr 2 ⎞
⎟ sin ( x1 )
kr
x = α 2 sin( x ) +
2
2
1
2 ( l − b ) + ⎜ 2max ⎟ tanh ( u2 ) + ⎜
1

2J2 ⎝ J2 ⎠ ⎝ 4J2 ⎠

## z Actual Plant: x11 = x12

u1max tanh ( u1 ) kr 2
x = (α1 + Δα1 )sin( x ) +
2
1
kr
1
1
2 J1
( )
l − b +
J1
+
4 J1
sin ( 2 ) m1
x1
+ K e a1 x11

x12 = x22
u2max tanh ( u2 ) kr 2
sin ( x11 ) + K m 2 e a2 x2
kr
x = (α 2 + Δα 2 )sin( x ) + (l − b) + +
1
2 1
2 2
2J2 J2 4J2

## ADVANCED CONTROL SYSTEM DESIGN 23

Example – 2:
Double inverted pendulum

⎛ mi gr kr 2 ⎞
αi ⎜ − ⎟
⎝ i J 4 J i ⎠

kr
βi (l − b)
2Ji
uimax
ξi
Ji
kr 2
σi
4Ji

## ADVANCED CONTROL SYSTEM DESIGN 24

Example – 2:
Double inverted pendulum
z Parameters in unknown function
Δα1 , Δα 2 : 20% off a1 = a2 = 0.01 K m = K m = 0.1
1 2

## z Control design parameters

K = 0.2 I 4 , K a = I 4
⎡ −10 10 0
T
0 ⎤
ψ (X ) = ⎢ ⎥
⎣ 10 −10 10 −10 ⎦
p2 = p4 = 1 Φ 2 ( X ) = ⎡⎣1 x1 /1! x117 /17! 1 x2 /1! x17 ⎤
2 /17!⎦
T

γ 2 = γ 4 = 20 Φ 4 ( X ) = ⎡⎣1 x3 /1!
T
x317 /17! 1 x4 /1! x17 ⎤
4 /17!⎦

## ADVANCED CONTROL SYSTEM DESIGN 25

Example – 2:
Double inverted pendulum
Position of Mass – 1 Velocity of Mass – 1

## ADVANCED CONTROL SYSTEM DESIGN 26

Example – 2:
Double inverted pendulum
Position of Mass – 2 Velocity of Mass – 2

## ADVANCED CONTROL SYSTEM DESIGN 27

Example – 2:
Double inverted pendulum

## ADVANCED CONTROL SYSTEM DESIGN 28

Example – 2:
Double inverted pendulum

Capturing d 2 ( X ) Capturing d 4 ( X )

## ADVANCED CONTROL SYSTEM DESIGN 29

Asst. Professor
Dept. of Aerospace Engineering
Indian Institute of Science - Bangalore
N-A for Robustness of
Output Dynamics

## Actual output dynamics:

Y = fYd ( X ) + GYd ( X )U + d ( X )

## ADVANCED CONTROL SYSTEM DESIGN 31

N-A for Robustness of
Output Dynamics
 Dynamics of auxiliary output:
Ya = fYd ( X ) + GYd ( X )U + dˆ ( X ) + K a (Y − Ya )

 Strategy: NN Approx.
Approximate state
Ya

Y Yd
Actual state Desired state
Steps for assuring Ya → Yd
z Enforce the error dynamics
Ed + KEd = 0 Ed (Ya − Yd )
z After carrying out the necessary algebra
f ( X , U ) = h( X , X a , X d , U d )
z In case of control affine system
f ( X ) + [ g ( X )]U = h( X , X d , X a , U d )
z The control is given by
U = [ g ( X )]−1{h( X , X d , X a , U d ) − f ( X )}
Steps for assuring Y → Ya
z The error in the output is defined as
Ea (Y − Ya ) ea ( y i − y ai )
i

## z Ideal neural network is given by:

d i ( X ) = Wi T ϕi ( X ) + ε i

## where Wi is the weight matrix and ϕi ( X ) is

Function Learning:
Define error eai Δ ( yi − yai )
From universal function
Output dynamics approximation property

## yai = fYi ( X ) + gYi ( X )U + dˆi ( X ) + kai eai dˆi ( X ) = WˆiT ϕi ( X )

Error dynamics
eai = d i ( X ) − dˆi ( X ) − kai eai
= Wi T Φ i ( X ) + ε i − kai eai

## ADVANCED CONTROL SYSTEM DESIGN 35

Lyapunov Stability Analysis
Lyapunov Function Candidate:

## Derivative of Lyapunov Function:

Li = eai pi eai + Wi T γ iWi

## = Wi T ⎡eai pi Φ i ( X ) − γ i−1Wˆi ⎤ + eai pi ε i − kai ea2 pi

⎢⎣ ⎥⎦ i
0
Weight Update Rule:

## ADVANCED CONTROL SYSTEM DESIGN 36

Lyapunov Stability Analysis
This condition leads to Li = ea piε i − k a ea pi
2
i i i

## Using the Lyapunov stability theory, we conclude

~
e
that the trajectory of a and i are pulled towards
W i

the origin.

## ADVANCED CONTROL SYSTEM DESIGN 37

Update Rule (with σ modification)

Asst. Professor
Dept. of Aerospace Engineering
Indian Institute of Science - Bangalore
with σ Modification
Weight update rule:

## Wˆi = γ i eai Φ i − γ iσ iWˆi , Wˆi ( 0 ) = 0

where, γ i : Learing rate, σ i > 0 : Stabilizing factor
eai = xi − xai
Φ i : Basis function
Estimation of unknown function:
dˆ ( X ) = Wˆ T Φ i

## ADVANCED CONTROL SYSTEM DESIGN 39

with σ Modification
Lyapunov function candidate:
1 2 1 T −1
vi = eai + Wi γ i Wi ( Note: pi = 1)
2 2
Then vi = eai eai + WiT γ i−1Wi

( )
= eai ε i − ea2i + σ iWiTWˆi (can be derived so, with kai = 1)
Consider the last term in vi
1
(
Wi Wi = × 2 WiTWˆi
T ˆ
2
)
1
2
T
( 1
)
= × 2Wi Wi − Wi = 2WiTWi − 2WiTWi
2
( )
with σ Modification
However, 2WiTWi = WiTWi + WiTWi
( ) ( )
T
= Wi T
Wˆi + Wi + Wi − Wˆi Wi

## = WiTWˆi + WiTWi + WiTWi − WˆiTWi

( i )
= Wˆ T W − W + W TW + W TW
i i i i i i

## = −WˆiTWˆi + WiTWi + WiTWi

(
Hence, σ WiTWˆi = σ 1 −WˆiTWˆi + WiTWi + WiTWi − WiTWi − WiTWi
2
)
1
(
= −σ WˆiTWˆi − σ WiTWi + σ WiTWi
2
)
1
2 ( 2
≤ −σ Wi − σ Wˆi + σ Wi
2 2
)
with σ Modification

## Hence, the equation for vi becomes

1 2 1 2 1
vi ≤ eai ε i − e − σ i Wi − σ i Wi + σ i Wi
2
2 ˆ
ai
2 2 2
ea2i ε i 2 1 2 1 2 1
≤ + − eai − σ i Wi − σ i Wi + σ i Wi
2
2 ˆ
2 2 2 2 2
eai ⎛ ε i 2 1
2
1 2 1 2⎞
≤ − +⎜ + σ i Wi − σ i Wi − σ i Wˆi ⎟
2

2 ⎝ 2 2 2 2 ⎠

## ADVANCED CONTROL SYSTEM DESIGN 42

with σ Modification

Defining βi
εi21
+ σ i Wi
2 2 ( 2
− Wi
2
− Wˆi
2
)
We have
2
e
vi < 0, whenever > βi
ai

2
i.e. vi < 0, whenever eai > 2βi

## ADVANCED CONTROL SYSTEM DESIGN 43

Summary:
z N-A Design: A generic model-following
nominal controller
z It is valid for both non-square and non-
affine problems in general
z Extensions:
• Robustness of output dynamics only
• “Structured N-A design” for efficient learning
References
z Padhi, R., Unnikrishnan, N. and Balakrishnan, S. N., “Model
Following Neuro-Adaptive Control Design for Non-square,
Non-affine Nonlinear Systems”, IET Control Theory and
Applications, Vol. 1 (6), Nov 2007, pp.1650-1661.
z Padhi, R., Kothari, M., “An Optimal Dynamic Inversion
Based Neuro-adaptive Approach for Treatment of Chronic
Myelogenous Leukemia”, Computer Methods and
Programs in Biomedicine, Vol. 87, 2007, pp. 208-224.
z Rajasekaran, J., Chunodkar, A. and Padhi, R., “Structured