Docsity

Nonlinear Compensation, Trajectory Generation - Notes | ECSE 4962, Exams of Algorithms and Programming

Toggle sidebar
bg1
More on Control: nonlinear
compensation, trajectory generation.
2/19/03
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15

Partial preview of the text

Download Nonlinear Compensation, Trajectory Generation - Notes | ECSE 4962 and more Exams Algorithms and Programming in PDF only on Docsity!

More on Control: nonlinear

compensation, trajectory generation.

Agenda

Last time: basic linear controller designToday: •^

recap SISO linear controller design

-^

nonlinear compensation: make a nonlinear systemappear linear through feedback

-^

trajectory generation

0

0 .0 2

0 .0 4

0 .0 6

0 .0 8

0 .1 2

0 .1 4

0 .1 6

0 .1 8

(^2) 1 .5 (^1) 0 .5 (^0) -0 .5 -

tim e (s e c )

Effect of Zero

Zero within system bandwidth strongly affectsresponse

Stable zero increases overshoot, unstable zerogives rise to undershoot

fast stable andunstable zerosslow unstable

zero

slow stable

zero

2

2

2 2

) 1 / ( ) (

n

n

n

s

s

s

s H

ω

ζω

α

ω

=

×××× ××××

Classical Control Design Tools

  • Fix controller structure (e.g., PID) and adjust

gain to achieve desirable pole location (rootlocus) and steady state error

  • Robustness (gain/phase margins)• Loop shaping (lead/lag compensation)• Disturbance rejection, trajectory tracking

Tim e (s e c. )

Am plitude

S te p R e s p o n s e

0

0 .0 5

0.^

0 .1 5

0.^

0 .2 5^

0.^

0 .3 5

0.^

0 .4 5

0 .7 0 .6 0 .5 0 .4 0 .3 0 .2 0 .1^0

Fro m: U(1 )

To : Y( 1 )

Steady State Error

  • Steady state error under step

d

a

G(s)

⊕

d^ a

u^

y

) (^0) (

) (^0) (

1

) (^0) (

G

G K

y

ss

=

K(s)

⊕

yd

−

output under stepdisturbance

Remedy:• Cancel

d

a^

if possible

  • High DC loop gain

Integral control

d

c

fbk

k

F

u

u

θ

θ

cos

)

sgn(

comp

friction

−

−

=

"

"

$

%

!

Will discussfrictionidentification later

PID Control

• Infinite loop gain at DC:

K(0)=

k^ s

s k

k

s K

dt

y y k y k y y k u

i

d

p

d

i

d

d

p

−

−

=

− − − − − =

) (

)

(

)

(^

!

s G s

K

s G s k s G s K

s G s k s K s G s k k s k

pd

i

pd

i

pd

i

p

d

loop gain for control design

Limitation of PID

Higher order systems, e.g.,

Nonminimum phase zeros

Robustness (uncertain plant parameters,unmodeled dynamics)

Other performance consideration, e.g.,disturbance rejection, trajectory tracking

)

(

1

) (^

2

2

2

0 ω

=

s

s

s G

Addition Considerations

  • Velocity Estimation
    • washout filter– finite difference + low pass filter– Kalman predictor (state observer based on

assumed plant

 

^ 

=

1

) (

s p

s

s G

u

y

!^ =
  • Sampling:

3 to 10

times faster thanclosed loopbandwidth

R e a l Ax is

Im a gina ry Axis

Ny q u is t Dia g ra m s

-^

-0.

0

0.^

1

1.^

2

1 .5^1 0 .5^0 -0 .5 -1 -1.

Fro m: U(1 )

To: Y(1)

F re q u e n c y (ra d /s e c )

P ha s e (d e g); Ma gn itu de (d B)

B o d e Dia g ra m s

G m = 1 9 .5 5 4 d B (a t 3 .1 6 2 3 ra d /s e c ), P m = 1 1 7. 9 4 d e g. (a t 0. 1 7 7 2 4 ra d /s e c )2 0 (^0) -20 -40 -60 1 0

-^

-11 0

(^0) 1 0

(^1) 1 0

-10 0 -20 0 -30 0

0

Robustness (Gain/Phase Margins)

phasemargin

gain margin

Add phase lead for phasestabilization

reduce gain forgain stabilization

k

is nominally 1

use

margin

command in MATLAB

F re q u e n c y (ra d /s e c )

P ha s e (de g); Ma gnitu de (d B )

B o d e Dia g ra m s

(^0) -5 -1 0 -1 5

Fro m: U(1 )

(^1) 1 0

(^2) 1 0

(^3) 1 0

(^4) 1 0

5 0 4 0 3 0 2 0To : Y(1 )1 0^0

Lead/Lag Compensator^ Lead Filter^ ××××

F re q u e n c y (ra d /s e c )

P h a s e (d e g ); Ma g n itu d e (d B )

B o d e Dia g ra m s

2 0 1 5 1 0^50

Fro m: U(1 )

(^2) 1 0

(^3) 1 0

(^4) 1 0

(^5) 1 0

(^0) -2 0 To : Y(1 )-4 0 -6 0

××××

Lag Filter

1

)

(

)

(

) ( <

=

a

p s

ap s k

s

G

lead

1

)

(

)

(

) ( >

=

a

p s

ap s k

s

G

lag

Improve phase margin, increase bandwidth

Increase DC gain, improve gain margin

Back to Pan-Tilt: Linearization

•^

Full equation of motion:

-^

Open loop linearization about

-^

Con: Only valid in the neighborhood of

-^

Pro: Does not require detail nonlinear modelinformation

)^
M
B
C
G
!^
(^

d

)^
M
B
C
G
!^
(^

d

Feedback Linearization

•^

Full equation of motion:

-^

If we have a good model, we can just cancel all thenonlinear terms! Choosewe get

-^

Now set

, then

or

•^

In general, for low speed application, and friction notvery well known, we just use

)^
M
B
C
G
!^

1

(^
)^
B
C
G
!^

1

M

1

M

u

u

1

1

2

2

u

u

G
M

u

Given

T, v

max

, a

max

find a smooth curve

y

d

(t)

such that

y

d

(0)=0, y

d

(T)=y

target

Given

T, v

max

, a

max

find a smooth curve

y

d

(t)

such that

y

d

(0)=0, y

d

(T)=y

target

Trajectory Generation

•^

So far, all the point-to-point motions are implementedas steps. For smoother motion (and lower torquerequirement), trajectory generation is almost alwaysused.

max

max

( )

,^

( )

y t

v

y t

a

≤

≤

!

!!

Common TG Algorithms

0

  1. 2^

  2. 4^

  3. 6^

  4. 8^

1

  1. 2^

  2. 4

(^1) 0. 5 0

x

0

  1. 2^

  2. 4^

  3. 6^

  4. 8^

1

  1. 2^

  2. 4

2 1 0

v

0

  1. 2^

  2. 4^

  3. 6^

  4. 8^

1

  1. 2^

  2. 4

(^50) -

a

spline, e.g.,

used) be

also

can

basis

(other

3 3 2 2 1 0 t t t ) t ( λ

λ

λ

λ

λ

  • trapezoid (bounded acceleration)• s-curve (bounded jerk)• others: sinusoid, sigmoid

0

  1. 1^

  2. 2^

  3. 3^

  4. 4^

  5. 5^

  6. 6^

  7. 7^

  8. 8^

  9. 9^

1

(^1) 0. 5 0 0

  1. 1^

  2. 2^

  3. 3^

  4. 4^

  5. 5^

  6. 6^

  7. 7^

  8. 8^

  9. 9^

1

2 1 0 0

  1. 1^

  2. 2^

  3. 3^

  4. 4^

  5. 5^

  6. 6^

  7. 7^

  8. 8^

  9. 9^

1

1 0^0 -1 0^0

  1. 1^

  2. 2^

  3. 3^

  4. 4^

  5. 5^

  6. 6^

  7. 7^

  8. 8^

  9. 9^

1

(^1) 0. 5 0

x

0

  1. 1^

  2. 2^

  3. 3^

  4. 4^

  5. 5^

  6. 6^

  7. 7^

  8. 8^

  9. 9^

1

2 1 0

v

0

  1. 1^

  2. 2^

  3. 3^

  4. 4^

  5. 5^

  6. 6^

  7. 7^

  8. 8^

  9. 9^

1

(^50) -

a

0 0. 0 2

  1. 0 4

  2. 0 6

  3. 0 8

  4. 1

  5. 1 2

  6. 1 4

  7. 1 6

  8. 1 8

  9. 2

(^1) 0. 5 0

x

0 0. 0 2

  1. 0 4

  2. 0 6

  3. 0 8

  4. 1

  5. 1 2

  6. 1 4

  7. 1 6

  8. 1 8

  9. 2

1 0^50

v

0 0. 0 2

  1. 0 4

  2. 0 6

  3. 0 8

  4. 1

  5. 1 2

  6. 1 4

  7. 1 6

  8. 1 8

  9. 2

2 0 0^0 -2 0 0

a

0

  1. 0 5^

  2. 1^

  3. 1 5^

  4. 2^

  5. 2 5

(^1) 0. 5 0

x

0

  1. 0 5^

  2. 1^

  3. 1 5^

  4. 2^

  5. 2 5

1 0^50

v

0

  1. 0 5^

  2. 1^

  3. 1 5^

  4. 2^

  5. 2 5

2 0 0^0 -2 0 0

a

MATLAB code for trapezoid and s-curve on-line (see

trajgen.m

), but you must convert them to Simulink if you’d

like to use them