(x) f(x,u) u x f(x, (x) x. Example: Using feed-forward, what should be canceled?

110
(x) f(x,u ) u x f(x, (x) x

Transcript of (x) f(x,u) u x f(x, (x) x. Example: Using feed-forward, what should be canceled?

Page 1: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

(x)

f(x,u)u x

f(x, (x)x

Page 2: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?
Page 3: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?
Page 4: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?
Page 5: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

2 4 2

2 2

It may be helpful to reduce the "negativity" in our analysis:

( )

( )

V x x x L x

V x b x L x

Page 6: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

2 3

2

( )

1

2

( ) ( )

x f x ax x u

V x

V VV x f x xf x

x x

2

2 4

1

2V x

V x x

Page 7: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Example: Using feed-forward, what should be canceled?

2

3

3

2

( )

1

2

( )

what are some favorable terms in ( )?

, , , sin( ) (local result)

what are some unfavorable terms in ( )?

, , ,sin( )

constant, , ,cos( ) (local result)

odd

odd

even

x x u

V x

V xx x x xu

x

x x x x

x

x x x x

x x x

3 5, , , sin( )x x x x

2

2 4 6

1

2, , , sin( )

V x

V xx x x x x x

3 5, , ,sin( )x x x x 2

2 4 6

1

2, , , sin( )

V x

V xx x x x x x

Page 8: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Example: Using feed-forward, what should be canceled?

2

2

( )

1

2

( )

what are some unfavorable terms in ( )?

constant, , , cos( )even

x x u

V x

V xx x x xu

x

x x x

2 42, , , cos( )x x x

2

3 5

1

22 , , , cos( )

V x

V xx x x x x x

2 42, , cos( )x x x

2

3 5

1

22 , , , cos( )

V x

V xx x x x x x

Page 10: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Electrical Subsystem (Motor Winding)

q(t) is the angular load positioni(t) is the coil current

Mechanical Subsystem (Pendulum-like arm)

Torque

Motivating Example: Brushed DC Motor

Overview1. Apply voltage2. Produces current3. Produces Torque4. Rotates Mechanical Link

Page 11: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Motivating Example: Brushed DC Motor

where is the torque constantK I K

Mechanical subsystem

Electrical subsystem

Connection between subsystems

Page 12: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Motivating Example: Brushed DC Motor

Traditional velocity control design using feedback linearization considering only the mechanical dynamics with an inertial load, like a wheel or fan (not a pendulum, N=0 in general model)

q

M B

Design control using Lyapunov analysis tools to drive speed to zero

2

2

MV

V M

B

2

design

GES

K

V B K

Note that the motor would actually slow to zero even if there is no torque (control) input

1B

M M

Propose a quadratic Lyapunov function(could use any function that works with our Theorems)M just to simplify the algebra (but it does affect the control)

The term will already stabilize

the system even if 0

Page 13: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Motivating Example: Brushed DC Motor

2

2

2 2

P

M B BP

Design control to drive same system to a non-zero speed P (P is the desired speed) using a change of variables

22

2 2

2 2

2

MV

V M

B BP

2

22

design

GES

BP K

V B K

2 2 0P P

Shift system so that the new zero corresponds to the desired speed.

BP K P BP KP K What to you applyto your "real motor"?

2 2

B BP

M M

Page 14: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Motivating Example: Brushed DC Motor

Position control of the motor with robotic load but ignoring the electrical dynamics

sin( )Mq Bq N q

1

1 2

2 2 1

1sin( )

x q

x x

x q Bx N xM

2 21 2

1 1 2 2

21 2 2 1

1 1

2 2

sin( )

V x x

V x x x x

xx x Bx N x

M

1 1 2

22

design sin( )

1

N x Mx Kx

V B K xM

Problem: need -x12 here

Address this using Integrator Backstepping

Torque indirectly affects the position x1

State space form

Page 15: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Motivating Example: Brushed DC Motor

Address this using Integrator Backstepping

Page 16: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Motivating Example: Brushed DC Motor

Most electric motors fit into this same framework such as brushless DC, wound field DC, AC, stepper motor, induction motor

Complication is that the other motor types have multiple windings (phases)

An electronic or mechanical commutation is required to switch between phases to produce torque

Page 17: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Consider this first

x

Design ( ) based on this equation.x

Page 18: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Original System

x

u

Could control if where

the actual system input (but it is not).

x Could control

using .u

Big Idea: Use Backstepping to combine

these two controllers.

This interconnection has

to be addressed.

Page 19: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

i.e. add zero to (7)

x

System after adding and subtracting

5

u

Can think of this as the error between

what you want ( ) and what is generated

by the connected subsystem .

x

If ( ) then this term is zero, but it means that ( )

is applied to the first subsystem.

x x

Page 20: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Change of variables:

x

Recall that (x) is the controller that we proposed for the first sub-system

(the one connected directly to the state of interest)

Page 21: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

x

Change of variables:You can think of this new variable as the error between the j(x) that you would like to apply and the x that actually is applied, i.e. a tracking error

xz

u

z

z u

Backstepping : Have moved x backwards through

the integrator, we now are working with ( ).x

Page 22: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

v v

Now design v to stabilize the system (with states z, x)

No control input in (15)

Recall:

Page 23: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

The transformed system (with states z,x) is now stabilized; however, v is not the input to our real system (can’t apply v to our system)

(7)(8)

We have embedded the problem that we said we could solve (first-order system)

Page 24: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Derivative of the control for the first subsystem

This is now a formula for solving the problem of the specific form given in (7) and (8)

Page 25: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?
Page 26: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

We already solved a similar problem in Example 1:

We are embedding the control design approach, “Basic Feedback Linearization”, into the Integrator Backstepping. Other control design techniques could be used here.

Page 27: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Formula for u

Formula for V

PD? YesRadially Unbounded? yes

Page 28: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Desired trajectory that we can specify to control x1

Error between actual trajectory x2 and the desired trajectory

Motivated by tracking error:

(See Example 4)

2 2 2

2 2 2

d

d

x x

x x

-

Alternate Solution to Example 4 (Handcrafted Backstepping)

21 1

2 31 1 1 1 1 1 2 2

1

2

d

V x

V x x x ax x x

To this point: We have stabilized x1 if we know that the tracking error η2 goes to zero. Must now work with the input u to make certain that η2 goes to zero.

Page 29: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Alternate Solution to Example 4 (Handcrafted Backstepping)

2 32 1 1 1 1 1 1 2 2

2 2

2 2 2 2 2

We designed from

Why can't we include in to cancel that term?

if ... ... would have an algebraic loop, i.e. defined in terms of itself.

d d

d

d d d

x V x x x ax x x

x

x x x x

Page 30: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Note: This is a dynamic system that describes the tracking error - we want to prove that the state of this system will to go to zero (is stable at zero) just like the systems we analyzed in Chapters 3.

2 2 2dx x

+

Stabilizing term

Additional requirements in the composite Lyapunov analysis

- +

-

=

1

1

Alternate Solution to Example 4 (Handcrafted Backstepping)

2

2 2 2dx x

212 2 2 2 2 2 1 22 ; ( , )V V x x u

Page 31: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Could not remove this interconnection term earlier because it allowed us to introduce x2d into the x1 dynamics.

1

1 2 2

2 31 1 1 2 2 2 1

2 3 21 1 1 2 2 1 1 1

2 3 4 2 3 21 1 1 2 1 1 2 2 1 1 1

4 2 3 21 1 1 1 2 1 2

( , )

2 1

2 1

2 2 2

2 1 2 2 2 2 2

aux

d

u x x u

ax ax x x x x x

ax ax x x x ax x x

a x ax ax x ax x x x ax x x

ax a x ax x x ax x

(same result as Example 4 with k=1)

Alternate Solution to Example 4 (Handcrafted Backstepping)

Page 32: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

1 2

1 2 1 2

1 2

2 1 2

2 2

Is everything bounded? Does go to zero? Does go to zero?

Using ( , ) we can concluded that and are globablly exponentially stable

i.e 0 and 0

= function( ) 0

0 & d d

d

x x

V x x

x

x x x

x

2

2 2 2

1 2

1 2 1

2

0 0

0; 0 0

function( , ) 0

, 0 0

0 0

All signals are bounded.

d

x

x x

u x x

x x x

u x

Alternate Solution to Example 4 (Handcrafted Backstepping)

2 2 2

22 1 1

4 2 3 21 1 1 1 2 1 22 1 2 2 2 2 2

d

d

x x

x ax x

u ax a x ax x x ax x

Page 33: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

We have solved the backstepping problem for a specific class of systems:

No other terms but u

Scalar

Showed a general approach that provides formulas for u and VShowed a handcrafted approach.

Page 34: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?
Page 35: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Solution of the more complicated problem in this form can be solved as a recursion of the simple solution (one coupled subsystem)

Design ( )xDesign u

x

Design u Design " ( )"x

x

Design u Design " ( )"x3 u

2

3

n u

x

1n u

Design u

n

Design " ( )"x

Design u Design " ( )"x

4

Must now apply the control through 2 subsystems

Page 36: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?
Page 37: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?
Page 38: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?
Page 39: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Homework K part 1: Find u and evaluate V

Page 40: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

21 1 2

2 3

3

x ax xx xx u

21 1 2

2 2 2

21 1 2 2

2

211 12

21 1 1 2 2

22 1 1 1 1 2

21 1 1 2

Define intermediate tracking error:

Design to linearize and stabilize

specify

which results in

d

d

d

d

d

x ax x

x x

x ax x

x

V x

V x ax x

x ax x x x

V x x

2

2

2

Can't cancel because it would

mean defining in terms of itself.

We will cancel this term when we

design the control for the dynamics.

dx

Alternate Solution to Example 6 (Handcrafted Backstepping)

Page 41: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

2 3

3 3 3

2 3 3

3

212 1 22

22 1 1 2 2 2

2

2 2 2 3 3 2

2 2 3 22 1 1 1 1 2 1 1 1 2

Design to linearize, stabilize, and cancel interconnection

Find

2 1 2 1 2 2

d

d

d

d d d

d

x x

x x

x x

x

V V

V x x

x x x x

x ax x ax ax x a x ax ax x

2

2 3 22 1 1 1 2 2 3 3

2 3 23 1 1 1 2 2 2 1

2 2 1 3

2 22 1 2 2 3

2 2

2 2

d

d

x

a x ax ax x x x

x a x ax ax x x x

x

V x

2 21 1 2 2 2 2 2 1 1

2 211 1 2 1 1 1 1 1 22

; ;

&

d dx ax x x x x ax x

x x V x V x x

Alternate Solution to Example 6 (Handcrafted Backstepping) -cont

Page 42: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

3

321

3 2 22 2

3 1 2 2 3 3 3

3 3

2 23 1 1 1 1 1 2 1 2 2 2 1

2 21 1 2 1 1 2 2

2 2 21 1 2 1 2 1 3 2 1 3

6 2 2 2

6 2 2 1 2 1

6 2 2 1 2 1

Design to li

d

d

x uV V

V x

x u

x a x x ax x ax x ax x x x

a x ax ax x ax x

a x ax ax ax x ax x x

u

2 2 21 1 2 1 2 1 3 2 1 3 2 3

2 2 23 1 2 3

nearize and stabilize

6 2 2 1 2 1u a x ax ax ax x ax x x

V x

2 21 1 2 2 2 2 2 1 1

2 211 1 2 1 1 1 1 1 22

; ;

d dx ax x x x x ax x

x x V x V x x

2 3

3 3 3 2 2 1 3

2 2 212 1 2 2 1 2 2 32

2 3 23 1 1 1 2 2 2 1

;

&

2 2

d

d

x x

x x x

V V V x

x a x ax ax x x x

Alternate Solution to Example 6 (Handcrafted Backstepping) -cont

Page 43: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

1

1 2 3 1 2 3

1 2 1

2 2 2

1 2 2 3

3 3

Is everything bounded? Does go to zero?

Using ( , , ) conclude that , , are globablly exponentially stable (i.e 0)

0 function( ) 0

0 & 0 0

, , 0 0

0 &

d

d

d

x

V x x

x x x

x x

x x x

x

3

1 2 2 3 1 2 2 3

1 2 1

3 2

3

0 0

, , , 0 function( , , , ) 0

, 0 0

0 0

0 0

All signals are bounded.

d x

x x u x x

x x x

x x

u x

21 1 2

2 3

3

x ax xx xx u

22 2 2 2 1 1; d dx x x ax x

3 3 3 2 2 1 3

2 3 23 1 1 1 2 2 2 1

;

2 2

d

d

x x x

x a x ax ax x x x

2 2 213 2 3 3 1 2 32

2 2 21 1 2 1 2 1 3 2 1 3 2 3

&

6 2 2 1 2 1

V V V x

u a x ax ax ax x ax x x

Alternate Solution to Example 6 (Handcrafted Backstepping) -cont

Page 44: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Alternate Solution to Example 6 (Handcrafted Backstepping) -cont

2 2

1 1

2 1

3 3

2 2

2

1. Introduce and

2. Find dynamics ( )

3. Design to stabilize dynamics

4. Introduce and

5. Find dynamics ( )

6. Design to stabilize and remove interconnection to

d

d

d

Summary

x

x x

x x

x

x

1

3 3

3 2

7. Find dynamics ( )

8. Design to stabilize and remove interconnection to

9. Show all signals are bounded

u

21 1 2

2 3

3

x ax xx xx u

21 1 2

2 3

3

x ax xx xx u

Control design Operation of Control

Page 45: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

x1

x2

x3

Alternate Solution to Example 6 (Handcrafted Backstepping) - Simulation1

2

3

1

Initial conditions 0

0.5

x

x

x

1a

Page 46: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Alternate Solution to Example 6 (Handcrafted Backstepping) - Simulation

Eta 2

Eta 3

Page 47: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

If g(x)=0 the system is not controllable

Electric MotorMechanical DynamicsElectrical Dynamics

Page 48: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?
Page 49: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?
Page 50: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

22

2

Note: If this was (1 ) then

the system would not be

controllable at 1

x

x

Control goes to constant as we reach x1=0

?

Page 51: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

2 2

1 1 1 1 2

22 1 2 21

x ax x x x

x x x x u

2 2 2

2 2 21 1 1 1 2 1 2

211 12

2 2 21 1 1 1 1 1 1 2 1 2

2 1

2 4 31 1 1 1 2

design

d

d

d

d

x x

x ax x x x x

V x

V x x x ax x x x x

x a x

V x x x

Note: Design control assuming full-state feedback and exact model knowledge

Statement of control problem: make x1 go to zero and have all other signals remain bounded

Alternate Solution to Example 7 (Handcrafted Backstepping)

Page 52: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

22 1 2 2

1 2 122

2 1

2 2 2 1 2

2 22 1 1 1 1 2

2 22 1 1 1 2 1

2 21 1 1 1 2 2 2

2 2 2

212 1 22

2 1 2 2

2 4 3 21 1 1 2 2 2 2

1

1let

1

let

design

d d

d

x x x x u

u x x ux

x u

x x u x

x x ax x x x

ax x x x u

u ax x x x u

u

V V

V V

x x x u

u

32 1

2 4 2 2 22 1 1 2 1 2

x

V x x x

Alternate Solution to Example 7 (Handcrafted Backstepping) - cont

Page 53: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

1 2

2 1 2 1 2

2 2 2 2

32 1

Is everything bounded? Does go to zero? Does go to zero?

Using ( , ) we can concluded that and are globablly exponentially stable (i.e 0)

0 is bounded

is bound

d

x x

V x x

x x a x

u x

2 21 1 1 1 2 2 2

1 2 122

2

2 1 2 2 2 2

1 2 1 1 2

ed

is bounded

1 is bounded

1

All signals are bounded

goes to1

= function( ) bounded; bounded & bounded

0 function( ) 0; , 0 d d d

d

u ax x x x u

u x x ux

au

a

x x x x x

x x x x x

2

1 2

0

function( , ) is bounded

All signals are bounded.

u x x

Statement of control problem: make x1 go to zero and have all other signals remain bounded

Alternate Solution to Example 7 (Handcrafted Backstepping) - cont

Page 54: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Summary of Chapter 5

Used integrator backstepping to design a generalized controller for three general cases:

2) Chain of Integrators:

3) Strict Feedback Systems:

Used Lyapunov analysis to drive the design of the control u for the nonlinear system:

1) Single Integrator:Depending on the system type and complexity, a handcrafted backstepping approach may possible.This approach will be helpful later when designing other controllers, e.g. an adaptive controller.

Stabilizing the origin.

Stabilizing to other points requires shift of the system.

Single input( ) ( )x f x g x u

Page 55: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Summary of Chapter 5Categorizing a System into One of the three General Backstepping Forms

1 1 1 1

2 2 2 2

3 3 3 3

4 4 4 4

5 5 5 5

y f g u

y f g u

y f g u

y f g u

y f g u

Backstepping a signal through a dynamic system adds to the complexity of the control design.• First goal is to identify the largest

block that would be controllable with a single input from the remaining subsystems.

• The list of equations may be rearranged as needed.

Single input controllable system (not a backstepping problem)

3) Strict Feedback Systems:

Second, identify the format of the remaining equations

1) Single Integrator:

2) Chain of Integrators:3) Strict Feedback Systems:

Note that cases 1) and 2) are just a simplified subset of 3), i.e. 3) always works but will require more work.

Page 56: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

1 1

2 2

3 3 3

4 4

5 5

y y

y y

y y u

y y

y y

Examples of Categorizing Systems

Not a backstepping problem

12

1 1 2 2 3 3 4 4 5 5

2 2 2 21 2 3 3 3 4 5

3 3 3 3

2 2 2 2 21 2 3 4 5

Design 2

TV x x

V x x x x x x x x x x

x x x x u x x

u x x x

V x x x x x

1

2

3 3

4

5

0

0

1

0

0

x

x

x x u

x

x

( ) ( )x f x g x u

1 1

2 2

3 3 4

4 4

5 5

y y

y y

y y y

y u

y y

2 2 2 21 2 3 3 4 4 5

3 42 2 2 2 21 2 3 4 5

Could create

Design V x x x x x x u x

u x xV x x x x x

1

2

3

4

4

0

0

1

0

x

xx

x

x

u

1

2

3 4 4

5

0

0

0

0 1

0

x

x

x x x u

x

Not useful

1) Single Integrator:

Example 2

Example 1

Page 57: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Homework 5.1Problem 5.1 (Use Simulink to simulate the states, control law, Lyapunov function and its derivative)

Note on Simulink:

(0,0) is an equilibrium point if u=0Need to change an initial condition to see a response

Response to (.1,0)

Page 58: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Homework 5.1 (sol)

12 )x

Solution

Page 59: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Homework 5.1 (sol)

x1,x2,u

1

u1

3

u

In1 Out1

V

t

Sine

Scope

Product

1s

Integrator1

1s

Integrator

2

Gain

du/dt

Derivative

t

Cosine1

t

Cosine

1

Constant

x1dot

x1

x1

x1

x1

x1

x1

x1

ux2

V

V

Vdot

(5.1) solution (cont)

Page 60: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Response to (.1,0)

2x

1x

2 1 2( , )V x x

2 1 2( , )V x x

u

Homework 5.1 (sol)(5.1) solution (cont)

Page 61: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Homework 5.1(5.1 HC) Design a handcrafted backstepping controller for Marquez problem 5.1

1 1 1 2

2

cos( ) 1x x x xx u

Page 62: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Homework 5.1 (sol)(5.1 HC) Design a handcrafted backstepping controller for Marquez problem 5.1

1 1 1 2

2

cos( ) 1x x x xx u

1 1 1 2 2 2 1 1 2 2 2 2 2cos( ) 1 cos( ) 1 where d d d dx x x x x x x x x x x

2 1 1 1design cos( ) 1dx x x x 1 1 2 x x

2 2 2 2 1 1 1 1 1 22 sin( ) 2 sin( ) d dx x u x u x x x u x x

1 2

22

Design to:1) Cancel cross term 2) Promote negative definiteness of 2 ) Add - 2 ) Cancel everything that doesn't support 0

ux

Vab V

Inject a control term and following error into top equation (one without control input)

Lyapunov analysis

Find error dynamics

Could design part of u at this point(we will wait until later here)

2 21 11 22 2

1 1 2 2

21 1 2 2 1 1 2

1 2 1 1 2

2 21 2

2 sin( )

2 sin( )

V x

V x x

x x u x x

u x x x

V x

Page 63: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

1 2 2 1 1 2 2

1 2 1 1 1 1 2 1 1

1 1 2 1 1 2 1 1

2 sin( )

2 cos( ) 1 2 sin( ) 2 cos( ) 1

2 sin( ) cos( ) 1 1 cos( ) 2

d du x x x x x x x

x x x x x x x x x

x x x x x x x x

Same as previous backstepping result

(5.1 HC) Design a handcrafted backstepping controller for Marquez problem 5.1

Homework 5.1 (sol)

Page 64: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Homework 5.1

1 1 2 1

2 1 2

sin( )

cos( )

x x x x

x x x u

Design a controller (without using backstepping) to stabilize the origin of the following system

5.1.b) Src:TCB

Only have 1 input and two states, may not be able to solve this control problem in general

Page 65: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Homework 5.1 (sol)

1 1 2 1

2 1 2

sin( )

cos( )

x x x x

x x x u

Design a controller (without using backstepping) to stabilize the origin of the following system

1

1 1 2 1

2 1 2

12

12

1 2 11 2

1 2

21 2 1 1 1 2 2 2 2

2 2

1

sin( ) 0( ) ( )

cos( ) 1

sin( )

cos( )

sin( ) cos( )

Design cos( )

T

T T T

x x x xx u f x g x u

x x x

V x x

V x x x x x x

x x xx x

x x

x x x x x x x x x x u

u x x

V x

2 21 1 2sin( )x x x

5.1.b) Src:TCB

Only have 1 input and two states, may not be able to solve this control problem in general

1(Locally) AS for x

Page 66: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

1 1 2 1

2 1 2

sin( )

cos( )

x x x x

x x x u

Design a controller (using backstepping) to stabilize the origin of the following system

Src:TCB Homework 5.1

Page 67: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

1 1 2 1

2 1 2

sin( )

cos( )

x x x x

x x x u

Design a controller (using backstepping) to stabilize the origin of the following system

Src:TCB Homework 5.1

1 1 2 1 2 2 1 1 2 2

2 2 2

211 12

1 1 1 1 2 2

2 1

21 1 1 2

212 1 22

22 1 1 2 2 1 2 2

sin( ) sin( )

where

sin( )

design sin( ) (which is optional)

cos( )

d d d

d

d

d

d

x x x x x x x x x

x x

V x

V x x x x

x x

V x x

V V

V x x x x u x

Page 68: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

1 1 2 1

2 1 2

sin( )

cos( )

x x x x

x x x u

Design a controller using backstepping to stabilize the origin of the following system

Src:TCB-BSTP1 Homework 5.1 (sol)

22 1 1 2 2 1 2 1

21 1 2 2 1 2 1 1 2 1

21 1 2 2 1 1 2 1 1 1 1 2

21 2 1 1 1 2 1 1 1

cos( ) cos( )

cos( ) cos( ) sin( )

( cos( ) cos( ) sin( )cos( ) cos( ) )

( cos( ) cos( ) sin( )cos(

V x x x x u x x

x x x x u x x x x

x x x x x x x x x x u

x x x x x x x x

1 2

1 1 2 1 1 1 2 2

2 22 1 2

) cos( ) )

design cos( ) cos( ) sin( )cos( ) cos( )

x x u

u x x x x x x x

V x

GAS

Show all signals remain bounded

Page 69: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Homework 5.2Problems 5.2, Also solve 5.2 using a handcrafted backstepping solution, 5.3

Page 70: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Homework 5.2 (sol)

Page 71: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Homework 5.2 (sol)

1 2

2 2 2

1 2 2

2

211 12

1 1 2 2

2 1 1 1 2

21 1 1 2

Define intermediate tracking error:

Design to linearize and stabilize

specify

which results in

d

d

d

d

d

x x

x x

x x

x

V x

V x x

x x x x

V x x

1 2

32 1 1 3

3

x x

x x x x

x u

Page 72: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Homework 5.2 (sol)

32 1 1 3

3 3 3

32 1 1 3 3

3

212 1 22

22 1 1 2 2 2

2

32 2 2 1 1 3 3 2

2 1 2

32 1 1 2

Design to linearize, stabilize, and cancel interconnection

Find

d

d

d

d d d

d

x x x x

x x

x x x x

x

V V

V x x

x x x x x x

x x x

x x x

3 3

33 1 1 2 2 1

2 2 1 3

2 22 1 2 2 3

d

d

x

x x x x x

x

V x

1 2 2 2 2 2 1

2 211 1 2 1 1 1 1 1 22

; ;

d dx x x x x x

x x V x V x x

Page 73: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

3

321

3 2 22 2

3 1 2 2 3 3 3

3 3 3 3

23 1 1 2 2

2 31 2 1 1 3 2 1 3

2 31 2 1 1 3 2 1 3 2 3

3

2 2

2 2

Design to linearize and stabilize

2 2

d d

d

x uV V

V x

x x u x

x x x x

x x x x x x

u

u x x x x x x

V

2 2 21 2 3x

Alternate Solution to Example 6 (Handcrafted Backstepping) -cont

1 2 2 2 2 2 1

2 211 1 2 1 1 1 1 1 22

; ;

d dx x x x x x

x x V x V x x

32 1 1 3

3 3 3 2 2 1 3

2 2 212 1 2 2 1 2 2 32

33 1 1 2 2 1

;

&

d

d

x x x x

x x x

V V V x

x x x x x

Page 74: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

1

1 2 3 1 2 3

1 2 1

2 2 2

1 2 2 3

3

Is everything bounded? Does go to zero?

Using ( , , ) conclude that , , are globablly asymptotically stable (i.e 0)

0 function( ) 0

0 & 0 0

, , 0 0

0 &

d

d

d

x

V x x

x x x

x x

x x x

x

3 3

1 2 2 3 1 2 2 3

1 2 1

3 2

3

0 0

, , , 0 function( , , , ) 0

, 0 0

0 0

0 0

All signals are bounded.

d x

x x u x x

x x x

x x

u x

21 1 2

2 3

3

x ax xx xx u

22 2 2 2 1 1; d dx x x ax x

3 3 3 2 2 1 3

33 1 1 2 2 1

; d

d

x x x

x x x x x

2 2 213 2 3 3 1 2 32

2 31 2 1 1 3 2 1 3 2 3

&

2 2

V V V x

u x x x x x x

Alternate Solution to Example 6 (Handcrafted Backstepping) -cont

Page 75: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Homework 5.2 (sol)

1

ErrorsCai si =x3

Page 76: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Prey-Predator System (normalized system)

1 1 1 2

2 2 1 2

1

, are positive constants

x x x ax

x bx x x

a b

x1 ' = x1 (1 - x1 - a x2)x2 ' = b x2 (x1 - x2)

a = 1b = .5

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2

0

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8

2

x1

x2

1 1 1 2

2 2 1 2

1

, are positive constants

x x x ax

x bx x x u

a b

Reduce population of prey to zeroby +/- predators (a=1, b=0.5)

Find u

Homework 5.2

Page 77: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Solution to the Predator Prey SystemHomework 5.2 (sol)

( ) ( )

21 1 1 1 2

2 2 1 2

( )( )

(1)aa

f x g x

g xf x

x x x ax x

x bx x x u

1 1 2 1 2

( ) ( )

21 1 1 1 2

2 1

1let ( ) , then

( ) aa

f x g x

u u f x u bx x xg x

x x x ax x

x u

2112

2 21 2 1 1 1 1 2 1 1 2

1

( ) ( ) 1

1design 2

V x

V x f x g x x x x x ax x x x a x

xa

11 1

1 1 2 1 1 1 2 1

( ) ( ) ( )

1 11 ( )( ) 2

Vu f x g x g x k

x x

x x ax x ax k x xa a

Page 78: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Solution to the Predator Prey SystemHomework 5.2 (sol)

k1=10

1 1

2

1 2

2 1

goes to zero (as our would suggest)Note that goes to a constant, why?The total will show that 0 and

1 2which means 2 .

We are not guaranteed to regulate the state in the conn

x VxV x x

x xa a

ectedsubsystem to zero.

Page 79: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Homework 5.3Solve Problems 5.4 using a handcrafted backstepping solution, simulate using Simulink

2

1 1 1 1 2

22 1 21

x x x x x

x x x u

31 1 2

2 42 1 2 1

x x x

x x x x u

Solve 5.5 using a handcrafted backstepping solution

Need to configure a compiler. In MATLAB:>mex –setup> Would you like mex to locate installed compilers [y]/n? y> [1] Lcc-win32 C 2.4.1 in C:\PROGRA~2\MATLAB\R2010a\sys\lcc (Note you can also use a Microsoft Visual C++ Express, Windows 64 bit Matlab complicates things)

Page 80: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Homework 5.3 (sol)Solve Problems 5.4 using a handcrafted backstepping solution

2

1 1 1 1 2

22 1 21

x x x x x

x x x u

21 1 1 1 2

21 1 1 1 2 1 2 1 2

2 2 2

21 1 1 1 2 1 2

2

211 12

21 1 1 1 1 2 1 2

2 1

Define intermediate tracking error:

Design to linearize and stabilize

specify

2

d d

d

d

d

d

d

x x x x x

x x x x x x x x x

x x

x x x x x x

x

V x

V x x x x x x

x x x

1 1 1 2

2 21 1 1 2

which results in

x x

V x x

22 1 2 2

22 1 1 1 1 2

2 22 1 2 1 1 1 2

212 1 22

2 2 2 22 1 1 2 2 1 2 1 1 2

2 21 1 1 2 2 12

2

2 22 1 2

1

1

1

12

1

d

d

x x u x

x x x x x x

x x u x x x x

V V

V x x x x u x x x

Design

u x x x x xx

V x

Page 81: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Homework 5.3 (sol)Solve Problems 5.4 using a handcrafted backstepping solution

2

1 1 1 1 2

22 1 21

x x x x x

x x x u

1 2

2 1 2 1 2

1 2 2 2 1 2 2

Is everything bounded? Does go to zero? Does go to zero?

Using ( , ) we can concluded that and are globablly asymptotically stable (i.e 0)

, 0 2 2 and are bound d

x x

V x x

x x x x x x

2 21 2 1 1 1 2 2 12

2

21 2 2 1 1 1 1 2

21 2 2 2 1 2

ded

1, 0 2 0

1

All signals are bounded.

, , 0 0

, , , 0 1 0

x u x x x x xx

x x x x x x x

x x u x x x u

2 2 2

2 1

2 21 1 1 2 2 12

2

2

12

1

d

d

x x

x x

u x x x x xx

Page 82: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Homework 5.3 (sol)Solve Problems 5.5 using a handcrafted backstepping solution

31 1 2

31 1 2 2 2

2 2 2

31 1 2 2

2

211 12

31 1 1 2 2

32 1 1 1 1 2

Define intermediate tracking error:

Design to linearize and stabilize

specify

which results in

d d

d

d

d

d

d

x x x

x x x x x

x x

x x x

x

V x

V x x x

x x x x x

21 1 1 2V x x

2 42 1 2 1 2

2 2 32 1 1 1 1 2

2 4 2 32 1 2 1 1 1 2

212 1 22

2 2 2 4 2 32 1 1 2 2 1 2 1 1 1 2

2 4 2 3 21 2 1 1 1 2 2 1

2 22 1 2

3 1 3 1

3 1

3 1

3 1

d

d

x x x u x

x x x x x x

x x x u x x x

V V

V x x x x x u x x x

Design

u x x x x x x x

V x

31 1 2

2 42 1 2 1

x x x

x x x x u

Page 83: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Homework 5.3 (sol)Solve Problems 5.4 using a handcrafted backstepping solution

1 2

2 1 2 1 2

31 2 2 2 1 1 2 2

Is everything bounded? Does go to zero? Does go to zero?

Using ( , ) we can concluded that and are globablly asymptotically stable (i.e 0)

, 0 0 and are boud d

x x

V x x

x x x x x x x

1 2 2

31 2 2 1 1 2

2 41 2 2 2 1 2 1

nded

, , 0 0

All signals are bounded.

, , 0 0

, , , 0 0

The system is bounded

x x u

x x x x x

x x u x x x x u

2 2 2

32 1 1

2 4 2 3 21 2 1 1 1 2 2 13 1

d

d

x x

x x x

u x x x x x x x

31 1 2

2 42 1 2 1

x x x

x x x x u

Page 84: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Using a handcrafted backstepping solution to ensure x1=-1, simulate using Simulink

21 1 2

2 1

( 2)

3

x x x

x x u

Homework 5.4

Page 85: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

1 1 1 1

2 22 2

2

22 2 2

2 2 2

22 2

2

Define a change of variables 1 ( 1 0) then and 1

( 1 2) ( 1)

1 3

( 1)

Define intermediate tracking error:

( 1)

Design to

d d

d

d

d

z x x z z x x z

z z x z x

x z u

z z x x x

x x

z z x

x

21

1 2

21 2 2

2 22 1 2 2 1 2

21 1 2

linearize and stabilize

( 1)

specify ( 1) ( 1)

which results in

d

d d

V z

V z z x

x z K z z z x K z

V K z z

Homework 5.4 (sol)

Page 86: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

2 2 2 2

22 1 1 1 2

22 1 2

212 1 22

2 22 1 2 2 1 2

113

1 3

2( 1) (2 2 ) (2 2 ) ( 1)

1 3 (2 2 ) ( 1)

1 3 (2 2 ) ( 1)

1 (2 2 ) (

d d

d

x x z u x

x z z K z z K z z K z x

z u z K z x

V V

V K z z z u z K z x

Design

u z z K z

2 1 12 2 23 3

2 22 1 1 2 2

1) x z K

V K x K

Homework 5.4 (sol)

Page 87: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

2

2 2 2

22 2 2 1 2 2

Is everything bounded? Does go to zero? Does go to zero?

Using ( , ) we can concluded that and are globablly asymptotically stable (i.e 0)

, 0 ( 1) 1 and are bod d

z x

V z z

z x x z K z x x

21 1 1 12 2 1 2 2 23 3 3 3

22 2 2

1 12 2 23 3

unded

, 0, 1 1 (2 2 ) ( 1)

All signals are bounded.

, 0, 1 ( 1) 0

, 0, 1, 1 3 0

The (transformed) system is bounded

z x u z z K z x z K

z x z z x

z x u x z

2 2 2

22 1

21 1 11 2 2 23 3 3

( 1)

1 (2 1 ) ( 1)

d

d

x x

x z K z

u z z K z x z K

Homework 5.4 (sol)

Page 88: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

1 1

1

21 1 11 1 1 1 2 13 3 3

Now, what does this mean for the original system?

0, 1 1

In order to apply the result to the original system, ransform the control u using +1:

(2 4 ) ( 2) 1

z x z x

z x

u x x K x x x K

2 2

22 1 1 1( 2) 1dx x K x

Homework 5.4 (sol)

Page 89: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Homework 5.5

1 2

32 1 1 2

1

Given the following system:

2

1 3

3where is an unknown constant.

Use a handcrafted backstepping approach to design a controller so that the state goes to zero

x x

x ax x x u

a

u x

(0).

Prove that the controller will work and that all signals remain bounded.

Page 90: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Homework 5.5 (sol)

1 2

32 1 1 2

Given the following system:

2

1 3

3where is an unknown constant.

x x

x ax x x u

a

Outline of solution

x1 subsytem

x2 subsytem

u

Want x1 to go to zero

SINCE we have exact model knowledge of the x1 subsystem,IF we could directly specify x2 weCould Design x2 as an exact model knowledge controller

x2

x1

Use backstepping to design x2

UNKNOWN Constant Parameter in x2 subsytem -> design an adaptive controller for u.

Page 91: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Homework 5.5 (sol)1 2

1 2 2 2 2 2 2 2 2

2

211 12

1 1 1 1 2 2

12 1 12

21 1 1

Given the following system: 2

Introduce the embedded control:

2 2 2 2 2 where

Design "control input" :

( 2 2 )

Design

d d d d

d

d

d

x x

x x x x x x x

x

V x

V x x x x

x k x

V k x

1 2

1 1 1 2

2

Note the closed-loop system is now 2

x

x k x

Page 92: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Homework 5.5 (sol)

12 1 12

21 1 1 1 2

32 1 1 2

3 12 2 2 1 1 2 1 12

3 312 1 1 2 1 2 1 1 2 1 22

22 1 2

22 1 2 2 1 1 1

Design

2

1Now consider the subsystem: 3

31

a 33

1 1a 3 2 3

3 3

2

d

d

x k x

V k x x

x ax x x u

x x x x x u k x

x x x k x u ax x x k x u

V V

V V k x x

32 2 1 1 2 1 2

31 2 1 2 1 1 2 2

2 22 1 1 2 2 2 1 1

13

3

1ˆDesign 3 a 2

3

ˆa -a

ax x x k x u

u x x k x x x k

V k e k x x

Page 93: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Homework 5.5 (sol)

22 1 2

2 22 1 1 2 2 2 1 1

23 2

3 2

2 23 1 1 2 2 2 1

2 23 1 1 2 2 2 1

2 2 2 1

2 22 1 1 2

ˆa -a

Now design adaptation mechanism:

1ˆ where

2

ˆ

ˆ

ˆ

ˆDesign

signal

V V

V k e k x x

V V a a a a

V V aa

V k x ak x aa

V k e a k x a

a k x

V k x

2 1 1 2 2 2 1

s are bounded

is bounded 0V x x V x

Page 94: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Homework 5.6

1 2

32 1 1 2

1 1

Given the following system:

2

1 a 3

3where is an unknown constant. Design a tracking controller so that the state follows .

Assume that the desired trajectord

x x

x x x x u

a u x x

y and the first two derivatives exist and are bounded.

Prove that the controller will work and that all signals remain bounded.

Page 95: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Homework 5.6 (sol)

1 2

32 1 1 2

Given the following system:

2

1 3

3where is an unknown constant.

x x

x ax x x u

a

Outline of solution

x1 subsytem

x2 subsytem

u

Want x1 to follow xd

SINCE we have exact model knowledge of the x1 subsystem,IF we could directly specify x2 weCould Design x2 as an exact model Knowledge tracking controller

x2

x1

Use backstepping to design x2

UNKNOWN Constant Parameter in x2 subsytem -> design an adaptive controller for u.

Same as previous problem

Same as previous problem

Page 96: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Homework 5.6 (sol)1 2

1 1 1

1 1 1 1 2

1 1 2 2 2 1 2 2 2 2 2

2

11 12

Given the following system: 2

Tracking error:

2

Introduce the embedded control:

2 2 2 2 2 where

Design "control input" :

d

d d

d d d d d d

d

x x

e x x

e x x x x

e x x x x x x x x

x

V e

2

1 1 1 1 1 2 2

12 1 1 12

21 1 1 1 1 1 2

( 2 2 )

Design

2

d d

d d

V e e e x x

x x k e

V e e k e e

Page 97: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Homework 5.6 (sol)

211 12

12 1 1 12

21 1 1 1 1 1 2

32 1 1 2

3 1 12 2 2 1 1 2 1 1 12 2

3 1 12 1 1 2 1 1 1 22 2

22 1 2

2 1 2 2 1

Design

2

1Now consider: 3

31

a 33

1a 3 2

3

d d

d d

d d

V e

x x k e

V e e k e e

x ax x x u

x x x x x u x k e

x x x x k x x u

V V

V V k e

2 3 1 11 1 2 2 1 1 2 1 1 1 22 2

3 1 11 2 1 1 1 2 1 1 22 2

2 22 1 1 2 2 1 1

12 a 3 2

3

1ˆDesign 3 2 a 2

3

ˆa -a

d d

d d

e x x x x k x x u

u x x x k x x x e

V k e x x

Page 98: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Homework 5.6 (sol)

2 22 1 1 2 2 1 1

23 2

3 2

2 23 1 1 2 2 1

2 23 1 1 2 2 1

2 2 1

2 22 1 1 2

2 1 2 2 2 1

ˆa -a

1ˆ where

2

ˆ

ˆ

ˆ

ˆDesign

signals are bounded

is bounded

V k e x x

V V a a a a

V V aa

V k e ax aa

V k e a x a

a x

V k e

V e e V e

0

Page 99: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Homework 5.71 2

32 1 1 2

1

A. Given the following system:

1 a 3

3where is an unknown constant. Design a tracking controller so that the state goes to zero.

Prove that the controller wil

x bx

x x x x u

a u x

l work and that all signals remain bounded.

1 2

32 1 1 2

1

C. Given the following system:

1 a 3

3where and b are unknown constants and 0. Design a controller so that the state goes to zero.

Prove that the controller

x bx

x x x x u

a b u x

will work and that all signals remain bounded.

1 2

32 1 1 2

1 1

B. Given the following system:

1 a 3

3where is an unknown constant. Design a tracking controller so that the state follows .

Assume that the desired trajecd

x bx

x x x x u

a u x x

tory and the first two derivatives exist and are bounded.

Prove that the controller will work and that all signals remain bounded.

Page 100: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

1 2

32 1 1 2

1 2 2 2

2 2 2

1 2 2

2

211 12

1 1 2 2

Problem 5.6.A.

1 a 3

3where is unknown

Define intermediate tracking error:

Design to linearize and stabilize

spe

d d

d

d

d

d

x bx

x x x x u

a

x bx b x x

x x

x bx b

x

V x

V x bx b

12 1 1 1 1 1 2

21 1 1 1 2

cify

which results ind bx k x x k x b

V k x bx

Homework 5.7 (sol)

Page 101: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Homework 5.7 (sol)

312 1 1 23

312 2 2 1 1 2 23

12 1 1 1 2

312 1 1 2 1 23

212 1 22

2 312 1 1 2 2 1 1 2 1 23

311 2 1 2 1 13

Problem 5.6.A. (cont)

3

3

3

3

ˆ3

d d

d b

x ax x x u

x x ax x x u x

x k x k x

x x x u k x

V V

V x bx ax x x u k x

Design

u x x k x bx ax

2 2

2 22 1 1 2 2 2 1 1

2 22 1 1 2 2 2 1 1

2 22 1 1 2 2 2 2

ˆ

ˆ

ˆdefine

k

V k x k ax ax

V k x k ax ax

a a a

V k x k a x

Page 102: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Homework 5.7 (sol)

2 22 1 1 2 2 2 2

213 2 32

2 23 2 1 2 2 2

2 23 1 1 2 2 2 2 3

2 23

2 23 1 1 2 2

Problem 5.6.A. (cont)

ˆ ˆ

ˆ

1ˆdesign

Finish using Barbalat's lemma

V k x k a x

V V k a

V V aa x a x aa

V k x k a x k a

a xk

V k x k

Page 103: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

1 2

32 1 1 2

1 1 1

1 1 1

1 1 2 2 2

2 2 2

1 1 2 2

2

Problem 5.6.B.

1 a 3

3where is unknown.

Define tracking error

Define intermediate tracking error:

Design t

d

d

d d d

d

d d

d

x bx

x x x x u

a

e x x

e x x

e x bx b x x

x x

e x bx b

x

211 12

1 1 1 2 2

1 12 1 1 1 1 2

21 1 1 2

o linearize and stabilize

specify

which results in

d d

d db b

V e

V e x bx b

x x e e e b

V e be

Homework 5.7 (sol)

Page 104: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Homework 5.7 (sol)31

2 1 1 23

312 2 2 1 1 2 23

1 1 1 1 1 1 12 1 1 2 1 1 1 1 1 1 1 1 1 2

31 12 1 1 2 1 1 23

2

Problem 5.6.B. (cont)

3

3

=

3

d d

d d d d d d d d db b b b b b b

d db

x ax x x u

x x ax x x u x

x x e x x e x e x x x x x bx

x x x u x x bx

V

211 22

2 31 12 1 1 2 2 1 1 2 1 1 23

31 11 2 1 1 2 1 1 23

2 22 1 2 2 1 1

2 22 1 2 2 1 1

2 22 1 2 2 2

3

ˆ3

ˆ

ˆ

ˆdefine

d db

d db

V

V e be ax x x u x x bx

Design

u x x x x bx be ax

V e ax ax

V e ax ax

a a a

V e a x

Page 105: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Homework 5.7 (sol)

2 22 1 2 2 2

213 2 2

2 23 2 1 2 2 2

2 23 1 2 2 2

2 2

2 23 1 2

Problem 5.6.B. (cont)

ˆ ˆ

ˆ

ˆdesign

Finish using Barbalat's lemma

V e a x

V V a

V V aa x a x aa

V e a x a

a x

V x

Page 106: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

1 2

32 1 1 2

1 2 2 2

2 2 2

1 2 2

2

211 12

1 1

Problem 5.6.C.

1 a 3

3where and are unknown, 0

Define intermediate tracking error:

Design to linearize and stabilize

d d

d

d

d

x bx

x x x x u

a b b

x bx b x x

x x

x bx b

x

V x

V x

2 2

2 1 1 1 2

21 1 1 2

specify

which results in

d

d

bx b

x x x bx b

V bx bx

Homework 5.7 (sol)

Page 107: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Homework 5.7 (sol)

312 1 1 23

312 2 2 1 1 2 23

2 1 2

312 1 1 2 23

212 1 22

2 312 1 1 2 2 1 1 2 23

311 2 1 2 2 13

Problem 5.6.C. (cont)

3

a 3

3

3

ˆ ˆ ˆˆ3

d d

d

x ax x x u

x x x x x u x

x x bx

x x x u bx

V V

V bx bx ax x x u bx

Design

u x x ax bx bx bx

2

2 22 1 2 2 1 1 2 2 1 2 1 2

2 22 1 2 2 1 1 2 1 2 2 1 2

2 22 1 2 2 2 2 1 2

ˆ ˆˆ

ˆˆ

ˆˆdefine and

V bx ax ax bx bx bx bx

V bx ax ax b x x b x x

a a a b b b

V bx a x b x x

Page 108: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Homework 5.7 (sol)

2 22 1 2 2 2 2 1 2

2 21 13 2 2 2

2 23 2 1 2 2 2 2 1 2

2 23 1 2 2 2 2 1 2

2 2 2 1 2

3

Problem 5.6.C. (cont)

ˆ ˆˆ ˆ

ˆˆ

ˆˆdesign and

V bx a x b x x

V V a b

V V aa bb x a x aa b x x bb

V bx a x a b x x b

a x b x x

V b

2 21 2

Finish using Barbalat's lemma

x

Page 109: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

Old Test Problem1

1 1 2

2

2 2 21 1 1 11 1 1 1 ` 2 1 22 2 2 2

1. Use a hand-crafted backstepping control to make go to zero in the system:

where is an unknown constant.

ˆFirst use where and then use

x

x ax x

x u

a

V x a a a a V V a

22 2 2

1 2

1 2 1 2 2

1 1 2 2 2

ˆ where

2. Use Simulink to simulate the system. Use the intial condition 1 and 1.

Plot and on one plot, , on one plot, and on one plot .

Define intermed d

a a a

x x

x x a a

x ax x x x

2 2 2

1 1 2 2

2

2 21 11 1 12 2

1 1 1 2 2 1 1

2 1 1 1 1 1 1 1 2

1

diate tracking error:

Design to linearize and stabilize

ˆ

specify

ˆ

ˆ

d

d

d

d

d

x x

x ax x

x

V x a

V x ax x a a

x x a x x x a x

a x

Page 110: (x) f(x,u) u x f(x,  (x) x. Example: Using feed-forward, what should be canceled?

1

21 1 1 2

2 2 2 2

22 1 1 1 1 1 1 2 1 1 1 1 2

22 1 2 1 1 1 1 2

2 21 12 1 2 2 2 22 2

2 22 1 1 2 2 1 2 1

ˆ

which results in

ˆ ˆ ˆ ˆ

ˆ ˆ

ˆ where

ˆ

d d

d

a x

V x x

x x u x

x x a x a x ax x x a ax a x

u ax x x a ax a x

V V a a a a

V x x u ax x x

1 2

22 1 2 1 2 1 2 2 1

2 22 1 2 2 1 2 1 1 1 1 2 1 2 2

2 22 1 2 2 1 1 1 2 2 1 1 1 2 2

2 22 1 2 2 2 1 1 1 2 2

2 1 1 1

2

ˆ

ˆ ˆ ˆ ˆ

ˆ ˆ ˆ ˆ ˆ

ˆ ˆ ˆ ˆ

ˆ ˆ

ˆ ˆdesign

aax ax

Design

u a x x x aa x ax x

V x ax a x a ax a a x a a

V x a x a x a x a x a a

V x a x a x a a

a x a x

V

2 21 2x

Old Test Problem (cont)