1 in this lecture, a model based observer and a controller will be designed to a single-link robot

24
ECE 893 Industrial Applications of Nonlinear Control Dr. Ugur Hasirci Clemson University, Electrical and Computer Engineering Department Spring 2013 1 In this lecture, a model based observer and a controller will be designed to a single-link robot.

Upload: daniela-sims

Post on 18-Dec-2015

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1 In this lecture, a model based observer and a controller will be designed to a single-link robot

ECE 893 Industrial Applications of Nonlinear Control Dr. Ugur HasirciClemson University, Electrical and Computer Engineering Department Spring 2013

1

In this lecture, a model based observer and a controller will be designed to a single-link robot.

Page 2: 1 In this lecture, a model based observer and a controller will be designed to a single-link robot

ECE 893 Industrial Applications of Nonlinear Control Dr. Ugur HasirciClemson University, Electrical and Computer Engineering Department Spring 2013

We already designed a model based observer in Lecture 5 for a magnetic levitation train.

An observer is designed basically to estimate an unmeasurable state. For example, an induction motor has two unmeasurable states, which are the flux components. Actually there are some flux sensors but they produce noisy and unreliable signals. For this reason, it is better to estimate flux instead of measuring it.

Same case occurs in velocity measurement for electrical motor. To get velocity feedback, a control designer can either differentiate the position signal produced by an encoder, or directly use a velocity sensor. Differentiation always leads noisy signal, and velocity sensor does not produce so sensitive and reliable signals. In this lecture we will design an observer to estimate the velocity of the single-link robot manipulator.

Page 3: 1 In this lecture, a model based observer and a controller will be designed to a single-link robot

ECE 893 Industrial Applications of Nonlinear Control Dr. Ugur HasirciClemson University, Electrical and Computer Engineering Department Spring 2013

Remember that we used this maglev train example as a tool to demonstrate an important property of nonlinear systems : Finite Escape Time !

Linear systems has a useful principle named Separation Principle, which means that one can design observer and controller separately for a linear system. If the observer and controller are stable individually, then the overall system is also stable. But this is not the case for nonlinear systems. In a nonlinear system, even if the observer and controller are stable separately, the output of the overall system may escape to infinity in a finite time. We demonstrated it with an example (see the notes of lecture 5).

For this reason, we have to take both observer and controller dynamics into account during the stability analysis.

We will start with a simple example, and then we will design an observer and a backstepping controller for a single-link robotic manipulator.

Page 4: 1 In this lecture, a model based observer and a controller will be designed to a single-link robot

ECE 893 Industrial Applications of Nonlinear Control Dr. Ugur HasirciClemson University, Electrical and Computer Engineering Department Spring 2013

Consider a simple two-dimensinoal system in the form of

1 2

22 2 1

x x

x x x u

Control objective is to drive x1 to zero by using the control input signal, u, even though x2 is not available for measurement.

Observer Design

Let’s design a model based observer for unmeasurable state:

22 2 1ˆ ˆx x x u

where is the estimation of .2x̂ 2x

Just like the parameter estimation error, we define a state estimation error to quantify the observer performance:

2 2 2ˆx x x

Page 5: 1 In this lecture, a model based observer and a controller will be designed to a single-link robot

ECE 893 Industrial Applications of Nonlinear Control Dr. Ugur HasirciClemson University, Electrical and Computer Engineering Department Spring 2013

Note that

2 2 2

2 22 1 2 1

ˆ

ˆ

x x x

x x u x x u

2 2x x

Observation Error Dynamics (to be used in composite stability analysis)

Page 6: 1 In this lecture, a model based observer and a controller will be designed to a single-link robot

ECE 893 Industrial Applications of Nonlinear Control Dr. Ugur HasirciClemson University, Electrical and Computer Engineering Department Spring 2013

To prove the stability of the observer, following Lyapunov function can be used.

22

1

2V x

Its time derivative is

2 2

2 2 2

2 22 2 1 2 1

22

ˆ

ˆ

V x x

x x x

x x x u x x u

x

This means that the state estimation error goes to exponentially.2x

Page 7: 1 In this lecture, a model based observer and a controller will be designed to a single-link robot

ECE 893 Industrial Applications of Nonlinear Control Dr. Ugur HasirciClemson University, Electrical and Computer Engineering Department Spring 2013

Controller Design

1 2

22 2 1

x x

x x x u

1 2 2ˆx x x

2ˆh x

1 1 1

nonlinfeedback t ear dampe in ermrm g t

x d x

The term will be used to damp the effect of appears in x1 dynamics.

1 1d x 2x

1d Damping coefficient

Page 8: 1 In this lecture, a model based observer and a controller will be designed to a single-link robot

ECE 893 Industrial Applications of Nonlinear Control Dr. Ugur HasirciClemson University, Electrical and Computer Engineering Department Spring 2013

1 1 2 1 1x x x h d x

2ˆh x

Substituting the observer dynamics, , from the designed observer into h dynamics yields2x̂

22 1 1 1 2 1 1

22 1 1 2 1 1 1 1

ˆ 1

ˆ 1 1

h x x u d x x h d x

x x u d x d x h d x

Divide both sides of the equation above by (1+d1), which is the coefficient of .2x

22 1 2 1 1 1

1 1 1 1

1 1 1 1ˆ

1 1 1 1h x x u x x h d x

d d d d

Design the control input signal as

21 1 2 2 1 1 1 1

1 1

1 1ˆ1

1 1FB Te Cross Terrm ND Term

T r

m

FF e ms

u d h x d h x x x h d xd d

Page 9: 1 In this lecture, a model based observer and a controller will be designed to a single-link robot

ECE 893 Industrial Applications of Nonlinear Control Dr. Ugur HasirciClemson University, Electrical and Computer Engineering Department Spring 2013

2 1 21

1

1h h x x d h

d

Composite Stability Analysis

2d

2 2 21 2

1

1 1 1

2 2 1 2V x h x

d d

d

1 1 2 1 1

1 2 2

22

1

V x x h x d x

h h x x d h

xd

Page 10: 1 In this lecture, a model based observer and a controller will be designed to a single-link robot

ECE 893 Industrial Applications of Nonlinear Control Dr. Ugur HasirciClemson University, Electrical and Computer Engineering Department Spring 2013

2 21 1 1 2 1 1

2 21 2 2

2

2 22 2

1 1

2 22 2

2 2

2

1 1

4 4

1

4 4

1

1

V x x h x xd d

x xd d

x x d x

h hx hx d h

xd

2

1 1 21

1

2d x x

d

2

2 22

1

2d h x

d

Page 11: 1 In this lecture, a model based observer and a controller will be designed to a single-link robot

ECE 893 Industrial Applications of Nonlinear Control Dr. Ugur HasirciClemson University, Electrical and Computer Engineering Department Spring 2013

2 2 2 2 21 2 2 2

1 2

1 1 1

4 4V x h x x x

d d d

2 2 21 2

1 2

1 1 1

4 4V x h x

d d d

Select 1 2

1 1 1

d d d

2 2 21 2

1 2

3 1 1

4 4 4V x h x

d d

GES !!!

ASITCLSAB

Page 12: 1 In this lecture, a model based observer and a controller will be designed to a single-link robot

ECE 893 Industrial Applications of Nonlinear Control Dr. Ugur HasirciClemson University, Electrical and Computer Engineering Department Spring 2013

12

Now we will design an observer for a single-link robot by using the same algorithm.

The unmeasurable state is velocity of the robotic arm.

As said before, we could get velocity measurement by differentiating the position signal but this would lead a noisy signal.

For this reason we will design an observer for velocity.

Page 13: 1 In this lecture, a model based observer and a controller will be designed to a single-link robot

ECE 893 Industrial Applications of Nonlinear Control Dr. Ugur HasirciClemson University, Electrical and Computer Engineering Department Spring 2013

13

The dynamics of an n-link robot manipulator can be written as

( ) ( , ) ( ) ( )M q q H q q q G q F q where

( ) : Joint angle vector (n 1)

( ) : Inertia matrix (n n)

( , ) : Centripedal/Coriolis matrix (n n)

( ) : Gravity vector (n 1)

( ) : Friction vector (n 1)

: Input torque (n 1)

q t

M q

H q q

G q

F q

Without loss of generality, we consider a single-link (n=1) robot manipulator for simplicity. For a single-link robotic arm, M(q) is the inertia of the arm, H is the viscous friction, and G(q) is the gravitational torque due to weight of the arm.

Page 14: 1 In this lecture, a model based observer and a controller will be designed to a single-link robot

ECE 893 Industrial Applications of Nonlinear Control Dr. Ugur HasirciClemson University, Electrical and Computer Engineering Department Spring 2013

14

sin( )Jq Bq N q

: inertia

: position

: viscous friction coeffient

: load constant

: torque applied to the robotic arm.

J

q

B

N

By selecting the state variables as

1x q

x q

we get the state-space representation as

1 2

2 2 1

1sin( )

x x

B Nx x x

J J J

Page 15: 1 In this lecture, a model based observer and a controller will be designed to a single-link robot

ECE 893 Industrial Applications of Nonlinear Control Dr. Ugur HasirciClemson University, Electrical and Computer Engineering Department Spring 2013

15

1 2

2 2 1

1sin( )

x x

B Nx x x

J J J

Control objective is to drive x1 to a desired trajectory, x1d, by using the control input signal, τ, even though x2 is not available for measurement.

Observer Design

Let’s design a model based observer for unmeasurable state:

2 2 1

1ˆ ˆ sin( )

B Nx x x

J J J

where is the estimation of .2x̂ 2x

Just like the parameter estimation error, we define a state estimation error to quantify the observer performance:

2 2 2ˆx x x

Page 16: 1 In this lecture, a model based observer and a controller will be designed to a single-link robot

ECE 893 Industrial Applications of Nonlinear Control Dr. Ugur HasirciClemson University, Electrical and Computer Engineering Department Spring 2013

Note that

2 2 2

2 1 2 1

ˆ

1 1ˆsin( ) sin( )

x x x

B N B Nx x x x

J J J J J J

2 2

Bx x

J

Observation Error Dynamics (to be used in composite stability analysis)

Page 17: 1 In this lecture, a model based observer and a controller will be designed to a single-link robot

ECE 893 Industrial Applications of Nonlinear Control Dr. Ugur HasirciClemson University, Electrical and Computer Engineering Department Spring 2013

To prove the stability of the observer, following Lyapunov function can be used.

22

1

2V x

Its time derivative is

2 2

2 2 2

2 2 1 2 1

22

ˆ

1 1ˆsin( ) sin( )

V x x

x x x

B N B Nx x x x x

J J J J J J

Bx

J

This means that the state estimation error goes to exponentially.2x

Page 18: 1 In this lecture, a model based observer and a controller will be designed to a single-link robot

ECE 893 Industrial Applications of Nonlinear Control Dr. Ugur HasirciClemson University, Electrical and Computer Engineering Department Spring 2013

Controller Design

2 2 1ˆ de x x x

2ˆh x

1

1

feedforward term nonlinear damping terfee

e d

mdback term

K e x d e

The term will be used to damp the effect of appears in e dynamics.

1d e 2x

1d Damping coefficient

1 1de x x

1 1 2 1d de x x x x

Page 19: 1 In this lecture, a model based observer and a controller will be designed to a single-link robot

ECE 893 Industrial Applications of Nonlinear Control Dr. Ugur HasirciClemson University, Electrical and Computer Engineering Department Spring 2013

2 1ee K e x h d e

2ˆh x Substituting the observer dynamics, , from the designed observer into h dynamics yields2x̂

2 1 1 1 2 1

2 1 1 1 2 1 1

1ˆ sin( )

1ˆ sin( )

d e e

d e e e

B Nh x x x K d K e x h d e

J J JB Nx x x K d x K d K e h d e

J J J

Divide both sides of the equation above by (Ke+d1), which is the coefficient of .2x

2 1 1 2 11 1 1 1 1 1

1 1 1 1ˆ sin( ) d e

e e e e e e

B Nh x x x x K e h d e

K d J K d J K d J K d K d K d

Design the control input signal as

1 2 2 1

1

11

11

1ˆ sin( )e h d e

eND Term e eCro

FF T

FB

er

T ss Term me

m

r

s

B Nu J K d K h e d h x x x K e h d e

J K d J K d K d

Page 20: 1 In this lecture, a model based observer and a controller will be designed to a single-link robot

ECE 893 Industrial Applications of Nonlinear Control Dr. Ugur HasirciClemson University, Electrical and Computer Engineering Department Spring 2013

2 21

1h

e

h K h x e d hK d

Composite Stability Analysis

2d

2 2 2

21

1 1

2 2 2e

JV e h x

K d Bd

d

2 1 1

2 2

22

1

e

h

V e K e h x d x

h K h e x d h

xd

Page 21: 1 In this lecture, a model based observer and a controller will be designed to a single-link robot

ECE 893 Industrial Applications of Nonlinear Control Dr. Ugur HasirciClemson University, Electrical and Computer Engineering Department Spring 2013

2 22 2

1 1

2 22 2

2

22 1

2 22 2

2

22

1 1

4 4

1 1

4 4

1

e

h

x xd d

x x

V K e eh ex d e

K h he hx d hd

xd

d

2

1 21

1

2d e x

d

2

2 22

1

2d h x

d

Page 22: 1 In this lecture, a model based observer and a controller will be designed to a single-link robot

ECE 893 Industrial Applications of Nonlinear Control Dr. Ugur HasirciClemson University, Electrical and Computer Engineering Department Spring 2013

2 2 2 2 22 2 2

1 2

1 1 1

4 4V e h x x x

d d d

2 2 22

1 2

1 1 1

4 4V e h x

d d d

Select 1 2

1 1 1

d d d

2 2 22

1 2

3 1 1

4 4 4V e h x

d d

GES !!!

ASITCLSAB

Page 23: 1 In this lecture, a model based observer and a controller will be designed to a single-link robot

ECE 893 Industrial Applications of Nonlinear Control Dr. Ugur HasirciClemson University, Electrical and Computer Engineering Department Spring 2013

Linearization Backstepping Adaptive Control

Robust Control Observer + Controller(Nonlinear Damping ) (?)

Page 24: 1 In this lecture, a model based observer and a controller will be designed to a single-link robot

ECE 893 Industrial Applications of Nonlinear Control Dr. Ugur HasirciClemson University, Electrical and Computer Engineering Department Spring 2013

Exercise: Can you make this controller adaptive?