0% found this document useful (0 votes)
86 views73 pages

Feedforward Control

This document discusses feedforward control and trajectory planning for motion systems. It presents a simple example of moving a mass from position 0 to 1 using a PD controller. It shows that tracking error depends on the setpoint trajectory and its derivatives. Smoother trajectories with restricted acceleration and jerk can achieve near-perfect tracking with a simple controller. The key idea is to shape the trajectory in a way that limits acceleration, jerk, etc. to reduce oscillations and control effort. Equations are presented that model the error dynamics between the actual and desired trajectories as a function of the desired acceleration.

Uploaded by

sathya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
86 views73 pages

Feedforward Control

This document discusses feedforward control and trajectory planning for motion systems. It presents a simple example of moving a mass from position 0 to 1 using a PD controller. It shows that tracking error depends on the setpoint trajectory and its derivatives. Smoother trajectories with restricted acceleration and jerk can achieve near-perfect tracking with a simple controller. The key idea is to shape the trajectory in a way that limits acceleration, jerk, etc. to reduce oscillations and control effort. Equations are presented that model the error dynamics between the actual and desired trajectories as a function of the desired acceleration.

Uploaded by

sathya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 73

4CM00: Control Engineering

FeedForward control
Dr.ir. Gert Witvoet

September 22, 2015


Where innovation starts
Influence of the setpoint 2/33

Consider a simple motion system

F
m

x
Objective: Move the mass move from position 0 to 1
Question 1: How does the error depend on the setpoint trajectory xs ?
I.e. how do we get from 0 to 1?
Question 2: Can we obtain (nearly) perfect tracking using just a simple
PD-controller?

/w
Closed loop response: 0th order setpoint 3/33

1
1.6

0.8
1.4

0.6
1.2

1 0.4
setpoint

error
0.8 0.2

0.6 0

0.4 −0.2

0.2 −0.4

0 −0.6
0 2 4 6 8 10 12 0 2 4 6 8 10 12
time time

/w
Closed loop response: 0th order setpoint 3/33

1
1.6

0.8
1.4

0.6
1.2

1 0.4
setpoint

error
0.8 0.2

0.6 0

0.4 −0.2

0.2 −0.4

0 −0.6
0 2 4 6 8 10 12 0 2 4 6 8 10 12
time time
Maximal error / overshoot: 0.6

/w
Closed loop response: 1st order setpoint 4/33

0.01

1 0.008

0.006
0.8
0.004

0.002
setpoint

0.6

error
0

0.4 −0.002

−0.004
0.2
−0.006

0 −0.008

−0.01
0 2 4 6 8 10 12 0 2 4 6 8 10 12
time time

/w
Closed loop response: 1st order setpoint 4/33

0.01

1 0.008

0.006
0.8
0.004

0.002
setpoint

0.6

error
0

0.4 −0.002

−0.004
0.2
−0.006

0 −0.008

−0.01
0 2 4 6 8 10 12 0 2 4 6 8 10 12
time time
Maximal error / overshoot: 0.009

/w
Closed loop response: 2nd order setpoint 5/33

−4
x 10

1 4

3
0.8
2

1
setpoint

0.6

error
0

0.4
−1

−2
0.2
−3

0 −4

0 2 4 6 8 10 12 0 2 4 6 8 10 12
time time

/w
Closed loop response: 2nd order setpoint 5/33

−4
x 10

1 4

3
0.8
2

1
setpoint

0.6

error
0

0.4
−1

−2
0.2
−3

0 −4

0 2 4 6 8 10 12 0 2 4 6 8 10 12
time time
Maximal error / overshoot: 0.0004
/w
Trajectory planning 6/33

Very good tracking results can be obtained


I using a simple (low bandwidth) controller
I using a ‘smart’ trajectory for xs
I basic idea: shape trajectory → restrict ẋs , ẍs , etc

/w
Trajectory planning 6/33

Very good tracking results can be obtained


I using a simple (low bandwidth) controller
I using a ‘smart’ trajectory for xs
I basic idea: shape trajectory → restrict ẋs , ẍs , etc

Advantages of trajectory planning:


I less oscillations
I possibly faster settling times
I smaller control signals (less saturation issues)

/w
Trajectory planning 6/33

Very good tracking results can be obtained


I using a simple (low bandwidth) controller
I using a ‘smart’ trajectory for xs
I basic idea: shape trajectory → restrict ẋs , ẍs , etc

Advantages of trajectory planning:


I less oscillations
I possibly faster settling times
I smaller control signals (less saturation issues)

One can wonder...


I Can we quantify the tracking error?
I Is there a way to further reduce this tracking error?

/w
2nd order trajectory 7/33

For now, assume only xs , ẋs and ẍs are restricted


1
xs
0.5

0
0 2 4 6 8 10 12

0.2

0.15
ẋs

0.1

0.05

0
0 2 4 6 8 10 12

0.05
ẍs

−0.05

0 2 4 6 8 10 12
t

/w
Tracking example 1: error dynamics 8/33

Equation of motion: F
m

m ẍ = F x
PD-controller:

F = Kp e + Kv ė
= Kp (xs − x) + Kv (ẋs − ẋ)

Hence

m ẍ + Kv (ẋ − ẋs ) + Kp (x − xs ) = 0
m (ẍs − ẍ) + Kv (ẋs − ẋ) + Kp (xs − x) = m ẍs

Using e = xs − x, the tracking error dynamics becomes

m ë + Kv ė + Kp e = m ẍs
/w
Tracking example 1: error dynamics 9/33

m ë + Kv ė + Kp e = m ẍ
| {z } |{z}s
mass - spring - damper force on mass

Does e go to zero?

Kv mẍs
m
Kp
e

I Iff ẍs = 0 then e → 0


I Tracking error whenever ẍs 6= 0
Whenever the mass needs to be accelerated, there is a tracking error!

/w
Tracking example 1: error dynamics 10/33

−20
Kv mẍs
m −25
Kp
e −30

1/Kp

Magnitude [dB]
−35

m ë + Kv ė + Kp e = u −40
q
Kp
−45 m

1
I DC-gain: Kp
−50

q
Kp −55
I Eigenfrequency: m
−60
I u = m ẍs 10
−1
10
0

Frequency [Hz]
1
10

/w
Tracking example 1: error dynamics 10/33

Kv mẍs mẍs /Kp


m 0.1
error
Kp
e 0.05

m ë + Kv ė + Kp e = u

error e
0

1
I DC-gain: Kp
−0.05

q
Kp
I Eigenfrequency: m
−0.1

I u = m ẍs 0 2 4 6
time t
8 10 12

/w
Tracking example 2: error dynamics 11/33

Suppose the mass encounters friction:

b F
m

e
Equation of motion:

m ẍ + b ẋ = Kp (xs − x) + Kv (ẋs − ẋ)


| {z }
PD-controller
Hence, the error dynamics becomes

m (ẍs − ẍ) + (Kv + b ) (ẋs − ẋ) + Kp (xs − x) = m ẍs + b ẋs


m ë + (Kv + b ) ė + Kp e = m ẍs + b ẋs
/w
Tracking example 2: error dynamics 12/33

m ë + (Kv + b ) ė + Kp e = m ẍ + b ẋ
| {z } | s {z }s
mass - spring - damper force on mass

Does e go to zero?

Kv +b
mẍs +bẋs
m
Kp
e
I Iff ẍs = 0 and ẋs = 0, then e → 0
I Tracking error whenever ẍs 6= 0 and/or ẋs 6= 0

/w
Tracking example 2: error dynamics 13/33

−25
Kv +b
mẍs +bẋs
m −30
Kp
e −35
1/Kp

Magnitude [dB]
m ë + (Kv +b ) ė + Kp e = u
−40
q
Kp
m
−45

1
I DC-gain: Kp
−50

q
Kp −55
I Eigenfrequency: m
−60
I u = m ẍs + b ẋs 10
−1
10
0

Frequency [Hz]
1
10

/w
Tracking example 2: error dynamics 13/33

Kv +b 0.12 (mẍs + bẋs ) /Kp


mẍs +bẋs error
m
0.1
Kp
e 0.08

0.06

m ë + (Kv +b ) ė + Kp e = u 0.04

error e
0.02

1
I DC-gain: Kp
−0.02

q −0.04
Kp
I Eigenfrequency: m −0.06

I u = m ẍs + b ẋs 0 2 4 6
time t
8 10 12

/w
Error dynamics 14/33

How can we decrease this error?

/w
Error dynamics 14/33

How can we decrease this error?

I Using feedback
• increase Kp

/w
Error dynamics 14/33

How can we decrease this error?

I Using feedback
• increase Kp
0.12 error with Kp = 40
error with Kp = 200
0.1

0.08

0.06

0.04
error e

0.02

−0.02

−0.04

−0.06

0 2 4 6 8 10 12
time t

There is still a (steady-state) error. . .


/w
Error dynamics 14/33

How can we decrease this error?

I Using feedback I Using feedforward


• increase Kp
m ë + Kv ė + Kp e = m ẍ
|{z}s
0.12 error with Kp = 40

0.1
error with Kp = 200 is known!
0.08

0.06
I Given xs , can we compensate
0.04 the error beforehand?
error e

0.02

−0.02

−0.04

−0.06

0 2 4 6 8 10 12
time t

There is still a (steady-state) error. . .


/w
Feedback vs feedforward 15/33

Feedback:
I Controller responds to an error
I Error thus already exists
I Feedback = looking back
• you’re always lagging behind

/w
Feedback vs feedforward 15/33

Feedback:
I Controller responds to an error
I Error thus already exists
I Feedback = looking back
• you’re always lagging behind

/w
Feedback vs feedforward 15/33

Feedback:
I Controller responds to an error
I Error thus already exists
I Feedback = looking back
• you’re always lagging behind

Feedforward:
I Use knowledge about the input
I Correct before the error can occur
I Feedforward = looking ahead
• anticipate what happens or what is needed

/w
The inverse problem (1) 16/33

How does feedforward work?

F
m

I Goal: zero error for t → ∞ for all xs :

m ë + Kv ė + Kp e = 0

/w
The inverse problem (1) 16/33

How does feedforward work?

F
m

I Goal: zero error for t → ∞ for all xs :

m ë + Kv ė + Kp e = 0

I Since m ẍ = F , we can obtain this when

F= m ẍ −Kv ė − Kp e
|{z}s | {z }
feedforward PD-controller
/w
Feedforward in the loop (1) 17/33

Note that xs is known and


L {m ẍs } = ms 2 L {xs }

/w
Feedforward in the loop (1) 17/33

Note that xs is known and


L {m ẍs } = ms 2 L {xs }

ms 2

xs 1 x
K p  Kv s
ms 2

/w
Feedforward in the loop (1) 17/33

Note that xs is known and


L {m ẍs } = ms 2 L {xs }

ms 2

xs 1 x
K p  Kv s
ms 2

Forward feed / prescribe in advance . . .


I . . . the force necessary to accelerate the rigid mass.

/w
The inverse problem (2) 18/33

b F
m

e
I Goal: zero error for t → ∞ for all xs :

m ë + Kv ė + Kp e = 0

/w
The inverse problem (2) 18/33

b F
m

e
I Goal: zero error for t → ∞ for all xs :

m ë + Kv ė + Kp e = 0

I Since m ẍ + b ẋ = F , we can obtain this when

F = m ẍs + b ẋs −Kv ė − Kp e


| {z } | {z }
feedforward PD-controller

/w
Feedforward in the loop (2) 19/33

Note that xs is known and


L m ẍs + b ẋs = ms 2 + bs L {xs }
 

/w
Feedforward in the loop (2) 19/33

Note that xs is known and


L m ẍs + b ẋs = ms 2 + bs L {xs }
 

ms2 +bs

1 x
xs
Kp +Kv s ms2+bs

/w
Feedforward in the loop (2) 19/33

Note that xs is known and


L m ẍs + b ẋs = ms 2 + bs L {xs }
 

ms2 +bs

1 x
xs
Kp +Kv s ms2+bs

Forward feed / prescribe in advance . . .


I . . . the force necessary to accelerate the rigid mass,
I . . . the force required to overcome the friction.
/w
Pure feedforward 20/33

In theory, a feedback controller is not necessary:

xs x
H -1 (s) H(s)

Ideal feedforward:
I Cff (s) = H −1 (s)
I x = H (s)H −1 (s)xs = xs
I use the plant inverse to compute the plant input in advance
x

/w
Combination feedback and feedforward 21/33

In practice, feedback is needed to compensate disturbances around xs :

H -1 (s)

xs x
C(s) H(s)

/w
Combination feedback and feedforward 21/33

In practice, feedback is needed to compensate disturbances around xs :

H -1 (s)

xs x
C(s) H(s)

However,
I what if H −1 (s) is unstable?
I what if H (s) is unknown?
Then we try to approximate H −1 (s) in time domain.
/w
General feedforward (1) 22/33

Forward feeding the force required to. . .


I . . . accelerate the rigid body mode of the plant: Fa = Kfa ẍs
I . . . overcome the viscous friction with the fixed world: Fv = Kfv ẋs

/w
General feedforward (1) 22/33

Forward feeding the force required to. . .


I . . . accelerate the rigid body mode of the plant: Fa = Kfa ẍs
I . . . overcome the viscous friction with the fixed world: Fv = Kfv ẋs

xs
K fa

x s
K fv

xs x
C(s) H(s)

/w
Coulomb friction 23/33

What if Coulomb friction (dry friction) is present?


I constant force, opposing direction of motion
I direction dependent

Fc

−Fc

Hence, to overcome this force in advance, we need a feedforward

Fc = Kfc · sign (ẋs )

/w
General feedforward (2) 24/33

sign( x s )
K fc

xs
K fa

x s
K fv

xs x
C(s) H(s)

/w
General feedforward (2) 24/33

sign( x s )
K fc

xs
K fa

x s
K fv

xs x
C(s) H(s)

Fff = Kfa ẍs + Kfv ẋs + Kfc sign (ẋs )

/w
Error profile 25/33

Feedforward tuning is based on error profile in time domain


error

time

forward motion backward motion

There is an error due to:

/w
Error profile 25/33

Feedforward tuning is based on error profile in time domain


error

time

forward motion backward motion

There is an error due to:


I lack of force to accelerate (Kfa )

/w
Error profile 25/33

Feedforward tuning is based on error profile in time domain


error

time

forward motion backward motion

There is an error due to:


I lack of force to accelerate (Kfa )
I lack of force to compensate viscous friction (Kfv )

/w
Error profile 25/33

Feedforward tuning is based on error profile in time domain


error

time

forward motion backward motion

There is an error due to:


I lack of force to accelerate (Kfa )
I lack of force to compensate viscous friction (Kfv )
I lack of force to compensate Coulomb friction (Kfc )
/w
Feedforward tuning procedure 26/33

I Define a suitable (2nd or higher order) setpoint trajectory


• both forward and backward movement (with a small pause)
• rather ‘challenging’ (it must generate some error profile)
• approx 1/3 acceleration, 1/3 constant velocity, 1/3 deceleration

/w
Feedforward tuning procedure 26/33

I Define a suitable (2nd or higher order) setpoint trajectory


• both forward and backward movement (with a small pause)
• rather ‘challenging’ (it must generate some error profile)
• approx 1/3 acceleration, 1/3 constant velocity, 1/3 deceleration
I Monitor the error
• the error should be large enough
• each feedforward component should be recognizable
• maybe feedback bandwidth should be lowered?

/w
Feedforward tuning procedure 26/33

I Define a suitable (2nd or higher order) setpoint trajectory


• both forward and backward movement (with a small pause)
• rather ‘challenging’ (it must generate some error profile)
• approx 1/3 acceleration, 1/3 constant velocity, 1/3 deceleration
I Monitor the error
• the error should be large enough
• each feedforward component should be recognizable
• maybe feedback bandwidth should be lowered?
I Tune Kfc
• deceleration forward movement and acceleration backward
movement should have same error

/w
Feedforward tuning procedure 26/33

I Define a suitable (2nd or higher order) setpoint trajectory


• both forward and backward movement (with a small pause)
• rather ‘challenging’ (it must generate some error profile)
• approx 1/3 acceleration, 1/3 constant velocity, 1/3 deceleration
I Monitor the error
• the error should be large enough
• each feedforward component should be recognizable
• maybe feedback bandwidth should be lowered?
I Tune Kfc
• deceleration forward movement and acceleration backward
movement should have same error
I Tune Kfv
• remove slopes during acceleration and deceleration
• no error during constant velocity phase when Kfc and Kfv are correct

/w
Feedforward tuning procedure 26/33

I Define a suitable (2nd or higher order) setpoint trajectory


• both forward and backward movement (with a small pause)
• rather ‘challenging’ (it must generate some error profile)
• approx 1/3 acceleration, 1/3 constant velocity, 1/3 deceleration
I Monitor the error
• the error should be large enough
• each feedforward component should be recognizable
• maybe feedback bandwidth should be lowered?
I Tune Kfc
• deceleration forward movement and acceleration backward
movement should have same error
I Tune Kfv
• remove slopes during acceleration and deceleration
• no error during constant velocity phase when Kfc and Kfv are correct
I Tune Kfa
• minimize error during acceleration and deceleration

/w
Feedforward tuning procedure 26/33

I Define a suitable (2nd or higher order) setpoint trajectory


• both forward and backward movement (with a small pause)
• rather ‘challenging’ (it must generate some error profile)
• approx 1/3 acceleration, 1/3 constant velocity, 1/3 deceleration
I Monitor the error
• the error should be large enough
• each feedforward component should be recognizable
• maybe feedback bandwidth should be lowered?
I Tune Kfc
• deceleration forward movement and acceleration backward
movement should have same error
I Tune Kfv
• remove slopes during acceleration and deceleration
• no error during constant velocity phase when Kfc and Kfv are correct
I Tune Kfa
• minimize error during acceleration and deceleration
I If desired, tune up the feedback controller
/w
Feedforward tuning 27/33

0.025

0.02 I No FF
0.015

0.01

0.005
error

−0.005

−0.01

−0.015

−0.02

−0.025
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5
time

/w
Feedforward tuning 27/33

0.025

0.02 I No FF
0.015 I Kfc
0.01
tuned
0.005
error

−0.005

−0.01

−0.015

−0.02

−0.025
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5
time

/w
Feedforward tuning 27/33

0.025

0.02 I No FF
0.015 I Kfc
0.01
tuned
0.005
I Kfv
tuned
error

−0.005

−0.01

−0.015

−0.02

−0.025
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5
time

/w
Feedforward tuning 27/33

0.025

0.02 I No FF
0.015 I Kfc
0.01
tuned
0.005
I Kfv
tuned
error

0
I Kfa
−0.005 tuned
−0.01

−0.015

−0.02

−0.025
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5
time

/w
Feedforward tuning 27/33

0.025

0.02 I No FF
0.015 I Kfc
0.01
tuned
0.005
I Kfv
tuned
error

0
I Kfa
−0.005 tuned
Maximal error reduced from 2.5 · 10−2 to
−0.01
3.5 · 10−4
−0.015

−0.02

−0.025
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5
time

/w
Integral controller action 28/33

To tune feedforward, don’t use a high performance feedback controller!


With PD-controller
With PID-controller
0.1

0.05
error e

−0.05

−0.1

0 5 10 15 20 25
time t

/w
Feedforward issues to be aware of 29/33

Feedforward tuning is time domain trial and error.

/w
Feedforward issues to be aware of 29/33

Feedforward tuning is time domain trial and error.


I Stability

• Can a stable closed loop be destabilized by feedforward?


• Can an unstable closed loop be stabilized by feedforward?

/w
Feedforward issues to be aware of 29/33

Feedforward tuning is time domain trial and error.


I Stability

•Can a stable closed loop be destabilized by feedforward? No.


•Can an unstable closed loop be stabilized by feedforward? No.
⇒ Feedforward is open loop, in parallel with closed loop

/w
Feedforward issues to be aware of 29/33

Feedforward tuning is time domain trial and error.


I Stability

•Can a stable closed loop be destabilized by feedforward? No.


•Can an unstable closed loop be stabilized by feedforward? No.
⇒ Feedforward is open loop, in parallel with closed loop
I Over-tuning
• What happens if we over-tune feedforward parameters?

error

time

/w
Feedforward issues to be aware of 29/33

Feedforward tuning is time domain trial and error.


I Stability

•Can a stable closed loop be destabilized by feedforward? No.


•Can an unstable closed loop be stabilized by feedforward? No.
⇒ Feedforward is open loop, in parallel with closed loop
I Over-tuning
• What happens if we over-tune feedforward parameters?

⇒ Over-compensation of required forces reverses the error


error

time

/w
Feedforward issues to be aware of 29/33

Feedforward tuning is time domain trial and error.


I Stability

•Can a stable closed loop be destabilized by feedforward? No.


•Can an unstable closed loop be stabilized by feedforward? No.
⇒ Feedforward is open loop, in parallel with closed loop
I Over-tuning
• What happens if we over-tune feedforward parameters?

⇒ Over-compensation of required forces reverses the error


error

time

I Trajectory dependence
• Do the feedforward terms change when the trajectory changes?

/w
Feedforward issues to be aware of 29/33

Feedforward tuning is time domain trial and error.


I Stability

•Can a stable closed loop be destabilized by feedforward? No.


•Can an unstable closed loop be stabilized by feedforward? No.
⇒ Feedforward is open loop, in parallel with closed loop
I Over-tuning
• What happens if we over-tune feedforward parameters?

⇒ Over-compensation of required forces reverses the error


error

time

I Trajectory dependence
• Do the feedforward terms change when the trajectory changes? No.

⇒ Terms represent system parameters, which do not change

/w
Smoothing feedforward 30/33

Second order trajectory may not be sufficient


I jump in ẍs ⇒ jump in feedforward force
I can excite parasitic (higher order) dynamics
I can introduce oscillations
I can cause actuator saturation

/w
Smoothing feedforward 30/33

Second order trajectory may not be sufficient


I jump in ẍs ⇒ jump in feedforward force
I can excite parasitic (higher order) dynamics
I can introduce oscillations
I can cause actuator saturation

How to solve this?


I Higher order setpoints

• gradual increase of feedforward forces (smoothing)


• by limiting higher derivatives (e.g. jerk)
I Here: using 3rd order setpoints

/w
3rd order setpoint 31/33

xs
0.5

0
0 0.2 0.4 0.6 0.8 1

1.5

1
ẋs

0.5

−0.5
0 0.2 0.4 0.6 0.8 1

5
ẍs

−5
0 0.2 0.4 0.6 0.8 1
t

/w
Higher order setpoints 32/33

Momentum = mass × velocity

Force = mass × acceleration

Yank = mass × jerk

Tug = mass × snap

Snatch = mass × crackle

Shake = mass × pop

/w
More advanced methods 33/33

Other advanced techniques:


I Model-based input shaping
I Iterative Learning Control (ILC)
• adapt the feedforward signal after each trial
I Learning input shaping
• adapt the trajectory after each trial

See other courses (4CM60 Advanced Motion Control) and current


research.

/w

You might also like