0% found this document useful (0 votes)
113 views35 pages

L5 Show Feedforward

This document outlines a lecture on model following control and servo design. It discusses the servo problem of controlling a system with frequent set point changes. Model following control uses both feedforward and feedback control. The feedforward controller aims to drive the system output to exactly follow a reference model by using a reference trajectory planner and model following controller. The lecture covers both transfer function based and time domain based approaches to model following control and provides an example using a DC motor system in MATLAB.
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)
113 views35 pages

L5 Show Feedforward

This document outlines a lecture on model following control and servo design. It discusses the servo problem of controlling a system with frequent set point changes. Model following control uses both feedforward and feedback control. The feedforward controller aims to drive the system output to exactly follow a reference model by using a reference trajectory planner and model following controller. The lecture covers both transfer function based and time domain based approaches to model following control and provides an example using a DC motor system in MATLAB.
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/ 35

Dynamics and motion control

Lecture 5

Model following control


-servo design

Jan Wikander,Bengt Eriksson


KTH, Machine Design
Mechatronics Lab
e-mail: [email protected]

KTH MMK Mechatronics Lab


Date: 2009-08-27 Slide: 1(35)
File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2009\L5.fm
5.1. Lecture outline

• 1. Introduction
• 2. Transfer function based model following

• 3. Time domain based model following

• 4. An example

• 5. Matlab example for the dc motor

KTH MMK Mechatronics Lab


Date: 2009-08-27 Slide: 2(35)
File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2009\L5.fm
5.1.1. The servo problem
• The servo problem, here with error feedback.
Feed forward
controller Model following
u ff
control

Set point Trajectory r u Controlled Output


Feedback
rs planner controller system

• Characterized by frequent changes in set point (e.g in an industrial


robot)

• Control design mainly to follow (track) the reference (e.g. position or


velocity, or position, velocity, acceleration and jerk).

KTH MMK Mechatronics Lab


Date: 2009-08-27 Slide: 3(35)
File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2009\L5.fm
5.1.2. Feedback control properties
• The main principle in control engineering

• Typically model based (but not required to be)

• Produces control signals after an error has


occurred

• Disturbance rejection is achieved

• Effect of process parameter variations is reduced

• Leads to a closed loop

• Sensor noise may be amplified and deteriorate performance

• May lead to instability if designed incorrectly

KTH MMK Mechatronics Lab


Date: 2009-08-27 Slide: 4(35)
File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2009\L5.fm
5.1.3. Feed forward control properties
Disturbance
(measured or modelled) Disturbance

Reference signal Feed forward Process Output


control

• Model based (but fairly simple models typically helps a lot)

• Produces control signals before error has occurred

• Uses measured or modelled disturbance and compensates for it

• Uses carefully designed reference signals to make the process follow


the references “exactly” and without saturating the control signal.

KTH MMK Mechatronics Lab


Date: 2009-08-27 Slide: 5(35)
File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2009\L5.fm
5.1.4. The model based control concept
Control u ff
Model following
control

Output y
Setpoint r s
Trajectory S Controlled
---
planner R system
Reference r
Control u

0.6

0.4
rs
Amplitude

0.2

r Two tasks
0
1.) Design the reference signals in
−0.2
0 0.5 1 1.5 2 2.5 3 the trajectory planner, r ( t ) .
Time
2.) Design a model following
controller, u ff ( t ) .

KTH MMK Mechatronics Lab


Date: 2009-08-27 Slide: 6(35)
File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2009\L5.fm
5.1.5. The ultimate goal, Exact model following

Model following
control
uff

Set point
Trajectory Reference Controlled Output
planner system

• Design the trajectory planner and the model following controller such
that the feed forward input signal uff(t) drives the output to the desired
setpoint

• Note that the model following control part can be a nonlinear system

• Two main concepts, Transfer function and Time domain.

KTH MMK Mechatronics Lab


Date: 2009-08-27 Slide: 7(35)
File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2009\L5.fm
5.2. Lecture outline
• 1. Introduction

• 2. Transfer function based model following


• 3. Time domain based model following

• 4. An example

• 5. Matlab example for the dc motor

KTH MMK Mechatronics Lab


Date: 2009-08-27 Slide: 8(35)
File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2009\L5.fm
5.2.1. Model following TF-based
Feed forward 1/Gp(s)

setpoint r s r y
Gm(s) + Gp(s)

• Gm(s) is the reference model, i.e it is designed to provide reasonable


references to the controller, and to make Gm ⁄ G p proper.

• Gp(s) is the transfer function of the process. No feedback controller yet!

• Ideally the inverse of the process, i.e. 1/Gp(s), would provide exact
model following: 1/Gp(s) * Gp(s) = 1, and the closed loop y ⁄ rs = G m ( s )

• Clearly, the model following concept is directly dependent on the


accuracy of the process model.

KTH MMK Mechatronics Lab


Date: 2009-08-27 Slide: 9(35)
File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2009\L5.fm
5.2.2. The reference model Gm(s)
• The task of the reference model is to generate smooth references that
the process is able to follow.

• To implement complete model following, i.e a full process inverse, we


must require that the pole excess dm of the reference model is larger
than or equal to the pole excess d of the process, i.e if
B(s)
G p ( s ) = -----------
A(s)
is the pole excess of the process dp

d p = deg ( A ) – deg ( B )

and finally the requirement


Bm ( s )
dm ≥ dp G m ( s ) = --------------- d m = deg ( A m ) – deg ( B m )
Am ( s )

KTH MMK Mechatronics Lab


Date: 2009-08-27 Slide: 10(35)
File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2009\L5.fm
5.2.3. Model following TF-based cont.
• Since exact model following involves taking the inverse of the process
model, the inverse must be possible to implement. I.e. the inverse must
constitute a stable dynamic system.

• A stable dynamic system has no right half plane (RHP) poles. This
means for model following that the process must not have any RHP
zeros.

• Care must be taken when doing the discrete time implementation


because, as we know, a continuous time system with only LHP zeros
may become zeros outside the unit circle when transformed into
discrete time.
This often happens for very low sampling periods.

KTH MMK Mechatronics Lab


Date: 2009-08-27 Slide: 11(35)
File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2009\L5.fm
5.2.4. Implementing the TF based servo control

Gm ( s ) u ff
---------------
-
Gp ( s )

r u Controlled Output
Gm(s) Feedback
rs controller system

KTH MMK Mechatronics Lab


Date: 2009-08-27 Slide: 12(35)
File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2009\L5.fm
5.3. Lecture outline
• 1. Introduction

• 2. Transfer function based model following

• 3. Time domain based model following


• 4. An example

• 5. Matlab example for the dc motor

KTH MMK Mechatronics Lab


Date: 2009-08-27 Slide: 13(35)
File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2009\L5.fm
5.3.1. Model following Time domain (TD)
• Instead of the combined trajectory and model following transfer function
Gm ( s )
--------------- are the trajectory and model following implemented separately
Gp ( s )
and based on trajectories in time.

• Model following: If the inverse model (from y -> u) can be written as a


function of the output and n-times the derivatives of the output (n:th
order model).
⎛ dy d 2 y d y⎞
n
u ( t ) = f ⎜ y, ------, --------, …, --------⎟
⎝ dt dt 2 dt ⎠
n

2 n
dy d y d y
• Trajectory planner: Design y, ------, --------, …, -------- based on closed loop
dt 2 n
dt dt
specifications and process limitations, e.g., saturation.

KTH MMK Mechatronics Lab


Date: 2009-08-27 Slide: 14(35)
File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2009\L5.fm
5.3.2. The concept, an example
·· · ·
Process model DC-motor with non-linear friction Jϕ = u – dϕ – F c sgn ( ϕ ) .
·· · ·
Gives the feed forward control, u ff ( t ) = Jϕ r ( t ) + dϕ r + F c sgn ( ϕ r ) .

··
ϕr –1
d-
---- J G(s)
dt

d
·
ϕr
d-
---- sgn() Fc
dt

u ff
rs Trajectory Feedback u fb u ϕ
planner Controller Process
r(t)

KTH MMK Mechatronics Lab


Date: 2009-08-27 Slide: 15(35)
File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2009\L5.fm
5.3.3. Practical implementation
• We want to avoid to take the derivative of signals.
-> The Trajectory planner must provide the derivatives
–1
J G(s)

·· sgn() Fc
ϕr
·
ϕr u ff
rs Trajectory
planner r = ϕr Feedback u fb u ϕ
Controller Process

KTH MMK Mechatronics Lab


Date: 2009-08-27 Slide: 16(35)
File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2009\L5.fm
5.3.4. n-times differentiable reference signals
• The DC-motor is a second order diff. eq. from input to position
- The reference position must be two times differentiable (velocity and accel-
eration)
- Which is the same as: The acceleration reference must be finite
ex.

··
ϕr
1
0.8
·
0.6 ϕr ϕr
0.4
0.2
0
−0.2
−0.4
−0.6
−0.8
−1

0 0.5 1 1.5

KTH MMK Mechatronics Lab


Date: 2009-08-27 Slide: 17(35)
File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2009\L5.fm
5.3.5. How to choose the reference signals
• Fastest possible positioning (or specific time trajectories)
- Calculate max acceleration and velocity of the process, without saturating the
input to the motor.
- For the DC-motor: If max input torque is ± M max then max acceleration at zero
velocity is a max = ( ± M max ) ⁄ J .
Max velocity at zero acceleration is v max = ( ± M sat ) ⁄ ( d + F c )
a max
1
r pos
0.8

Example 0.6
v max
0.4
reference 0.2
trajectories 0
−0.2
−0.4
−0.6
−0.8
−1

0 0.5 1 1.5 2 2.5

KTH MMK Mechatronics Lab


Date: 2009-08-27 Slide: 18(35)
File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2009\L5.fm
5.3.6. Example: how to calculate the ref. traj.
v = at , zero initial condition!
v max
t 1 = ------------ , the time when maximum velocity is reached using maximum acceleration
a max
t1 2
1 2 v
1 max

y ( t 1 ) = a max t dt = --- a max t 1 = --- ------------ , position reached at time t 1
2 2 a max
0
rs v max
r s – 2y ( t 1 ) = v max ( t 2 – t 1 ) -> t 2 = ------------ – ------------ + t 1 is the latest time to start braking.
v max a max

80
Example::
60
40
20
t2 r s = 60,
0
v max = 55
−20 t1
−40 a max = 70
−60
−80
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2

KTH MMK Mechatronics Lab


Date: 2009-08-27 Slide: 19(35)
File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2009\L5.fm
5.3.7. General remarks
• The two concepts of servo control are often combined

• Some process models are inherently difficult to invert.


- Flexible links: Approximate the flexible model with a stiff model, the inertia and
the friction of the process is still fed forward.

• You need some margin to the theoretical maximum acceleration


and speeds.
- delays in computer implementation, flexibility.
- Maximum torque is a function of motor speed.

KTH MMK Mechatronics Lab


Date: 2009-08-27 Slide: 20(35)
File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2009\L5.fm
5.4. Lecture outline
• 1. Introduction

• 2. Transfer function based model following

• 3. Time domain based model following

• 4. An example
• 5. Matlab example for the dc motor

KTH MMK Mechatronics Lab


Date: 2009-08-27 Slide: 21(35)
File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2009\L5.fm
5.4.1. Model following control example I
• Consider a second order motion control system. The output is position.
The electrical motor (the coil inductance is neglected) is operating
against a linear spring with spring constant K

0 1 0 x1
x· = Kf K emk ⋅ K m + K m ⋅ u y = 1 0 ⋅
– ----- – 〈 -------------------------〉 -------- x2
J J J

• Or in transfer function form


Km ⁄ J
G p ( s ) = ----------------------------------------------------------
K m ⋅ K emk Kf
s + s ⎛ -------------------------⎞ + -----
2
⎝ J ⎠ J

KTH MMK Mechatronics Lab


Date: 2009-08-27 Slide: 22(35)
File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2009\L5.fm
5.4.2. Model following control example II
• Assuming
1
G p ( s ) = ----------------------------------
2
2s + 1.5s + 1

• We get the following principle model following control scheme

r Model
following
setpoint rs
u ff
Reference y
1
model,Gm(s)
2s2 + 1.5s +1

• Task: Design the reference model and the model following controller

KTH MMK Mechatronics Lab


Date: 2009-08-27 Slide: 23(35)
File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2009\L5.fm
5.4.3. Implementing the model following
• The perfect model following is the inverse of the model Gm ( s ) = 1

Gm ( s ) u ff ( s ) 2
2s + 15s + 1
--------------- = -------------- = --------------------------------- (not proper)
Gp ( s ) rs ( s ) 1

• Use a reference model with pole excess dm > 2 (version 1)


2 2
G m ( s ) = ω ⁄ ( s 2 + 2ξωs + ω )

u ff ( s ) 2
( 2s + 15s + 1 )ω
2
-------------- = --------------------------------------------- (proper)
rs ( s ) 2
s 2 + 2ξωs + ω

• Or use a trajectory planner, position, velocity and acceleration


(version 2)
2
u ff ( s ) = ( 2s + 15s + 1 )r s ( s )
·· ·
u ff ( t ) = 2r s ( t ) + 15r s ( t ) + r s ( t )

KTH MMK Mechatronics Lab


Date: 2009-08-27 Slide: 24(35)
File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2009\L5.fm
5.4.4. Output from the trajectory planner
150

100 acceleration
50
velocity
Amplitude

0
position
−50

−100

−150
0 0.5 1 1.5 2
Time

• The reference model provides acceleration, velocity and position


references (acceleration step, velocity ramp and a smooth position
reference)
1 1 1
r vel = --- r acc r pos = --- r vel = ---- r acc Observe, initial conditions
t t 2
t

KTH MMK Mechatronics Lab


Date: 2009-08-27 Slide: 25(35)
File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2009\L5.fm
5.4.5. Acceleration feed forward
300
control signal
200

100 position reference


Amplitude

0
system response
−100

−200

−300
0 0.5 1 1.5 2
Time

• Let’s start out with feed forward to cope better with the acceleration step
u ff = 2r·· .

• The process follows fairly good initially when the acceleration signal
dominates

KTH MMK Mechatronics Lab


Date: 2009-08-27 Slide: 26(35)
File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2009\L5.fm
5.4.6. Acceleration and velocity feed forward
400

300 control signal, u


200
position reference, r
100

0
system response, y
−100

−200

−300
0 0.5 1 1.5 2

• Next we add velocity feed forward which gives improved following of


the reference.
u ff = 2r·· + 15r·

KTH MMK Mechatronics Lab


Date: 2009-08-27 Slide: 27(35)
File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2009\L5.fm
5.4.7. Exact model following
400

300
control signal
200
Amplitude

100
system response
0
(equal to reference position
−100

−200

−300
0 0.5 1 1.5 2
Time

• Finally we add position feed forward which gives exact model following.
u ff = 2r·· + 15r· + r

• Note again, that we assume exact knowledge of the model!

KTH MMK Mechatronics Lab


Date: 2009-08-27 Slide: 28(35)
File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2009\L5.fm
5.4.8. Adding a zero to the model

Model
inverse

Reference
s+5 y
2s2 + 1.5s +1

• The process is extended with LHP zero.

• Exact model following is still possible since the inverse system is stable.

• The static gain of the process is 5.

KTH MMK Mechatronics Lab


Date: 2009-08-27 Slide: 29(35)
File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2009\L5.fm
5.4.9. Feed forward without numerator inverse
80 control signal
60

40
system response
Amplitude

20

−20 reference position


−40

−60
0 0.5 1 1.5 2
Time

• Let’s first have look on the response with only changing the gain of the
2r ·· + 15r· + r
feed forward controller. u ff = -.
----------------------------
5

• The added dynamics (model zeros) is clearly visible.

KTH MMK Mechatronics Lab


Date: 2009-08-27 Slide: 30(35)
File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2009\L5.fm
5.4.10. Exact model following for LHP zero
60

50

40
system response, y
30
and reference
Amplitude

20

10 control signal, u
0

−10

−20

−30
0 0.5 1 1.5 2
Time

• Exact model following is implemented by including also the inverse of


the numerator.
1
u ff = ( 2r·· + 15r· + r ) -----------
s+5

KTH MMK Mechatronics Lab


Date: 2009-08-27 Slide: 31(35)
File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2009\L5.fm
5.4.11. A non-minimum phase system

Model
inverse

Reference
model -s+5 y
2s2 + 1.5s +1

• Clearly, we have a RHP zero, making exact model following impossible.


That is, the inverse of the process model constitute an unstable dynamic
system.

• The static process gain is still 5.

KTH MMK Mechatronics Lab


Date: 2009-08-27 Slide: 32(35)
File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2009\L5.fm
5.4.12. Approximate model following (RHP zero)
80 control signal
60 reference position
40
Amplitude

20
system response
0

−20

−40

−60
0 0.5 1 1.5 2
Time

• An approximate model following can be implemented by taking the


1
inverse of the static portion of the numerator u ff = ( 2r·· + 15r· + r ) --- .
5

• Observe the typical response starting in the wrong direction.

KTH MMK Mechatronics Lab


Date: 2009-08-27 Slide: 33(35)
File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2009\L5.fm
5.4.13. Summary
Control u ff
Model following
control

Output y
Setpoint r s
Trajectory S Controlled
---
planner R system
Reference u c
Control u

Design the trajectory planner based on the performance of the motor.

Design the model following control based on an inverse model of the


process. Excellent for non-linear phenomena.

KTH MMK Mechatronics Lab


Date: 2009-08-27 Slide: 34(35)
File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2009\L5.fm
5.5. Lecture outline
• 1. Introduction

• 2. Transfer function based model following

• 3. Time domain based model following

• 4. An example

• 5. Matlab example for the dc motor

KTH MMK Mechatronics Lab


Date: 2009-08-27 Slide: 35(35)
File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2009\L5.fm

You might also like