Professional Documents
Culture Documents
• Simulation results
• Conclusions
Error Application
handling interface
+
I/F Setpoints Hc I/F
-
Integrated I/F
functions Hardware
interfaces
An introduction to Digital Control #10
F
m
k
1 DOF rigid-body model
mẍ + k ẋ = F ⇒ Fff = ma + kv
x is position, m is (equivalent) mass or inertia, k is viscous damp-
ing, F is actuator force and Fff is feedforward force.
ms 2
xs 1 x
K p Kv s
ms 2
−5
0 0.2 0.4 0.6 0.8 1
1.5
v [m/s]
1
0.5 Fff = ma + kv
0
0 0.2 0.4 0.6 0.8 1
1
x [m]
0.5
0
0 0.2 0.4 0.6 0.8 1
time [s]
a
m
Acceleration v
k
profile generator
F
1 1 1
PD x
s s m.s2+k.s
Velocity Position Controller 2nd order model
execution time
0
• Realizability: constrained
−5
0 0.2 0.4 0.6 0.8 1 dynamics (ā and v̄)
1.5
• Accuracy: trajectory ends at
v [m/s]
1
0.5 desired end position (x̄)
0
0 0.2 0.4 0.6 0.8 1
• Complexity: calculation time
1 • Reliability: always
x [m]
4. xā := 2 × 21 āt2ā ≤ x̄
(x̄−xā)
5. tv̄ = v̄
tv
0 determined by tā and tv̄
ta
−5 • Realizablity: guaranteed
0 0.2 0.4 0.6 0.8 1
1.5
by ā and v̄
v [m/s]
0.5
solution
0
0 0.2 0.4 0.6 0.8 1 • Implementation: later
time [s]
→ back to basics !
c
F
m 1 m 2
k 1 2
k 1 k 2
−1000
0 0.2 0.4 0.6 0.8 1 1.2
for 4th order
50
feedforward
j [m/s3]
−50
0 0.2 0.4 0.6 0.8 1 1.2
5
a [m/s2]
−5
0 0.2 0.4 0.6 0.8 1 1.2 q1 d + q2 + q3 a + q4 v
1.5 Fff =
1
k12s + c
v [m/s]
0.5
0
0 0.2 0.4 0.6 0.8 1 1.2
1
x [m]
0.5
0
0 0.2 0.4 0.6 0.8 1 1.2
Derivative of jerk
profile generator q2
q3
q4
1
k12.s+c
F
1 1 1 1 Motion
PD x
s s s s System
Jerk Acceleration Velocity Position Controller 4th order model
d [m/s4]
4th order trajectory 0
−1000
planner ?? 50
0 0.2 0.4 0.6 0.8 1 1.2
j [m/s3]
0
• Point-to-point move
(all derivatives zero −50
0 0.2 0.4 0.6 0.8 1 1.2
a [m/s2]
0
• Given: displacement x̄
and bounds d,¯ ̄, ā and v̄ −5
0 0.2 0.4 0.6 0.8 1 1.2
1.5
• Performance criteria !? 1
v [m/s]
0.5
0
0 0.2 0.4 0.6 0.8 1 1.2
1
x [m]
0.5
0
0 0.2 0.4 0.6 0.8 1 1.2
ta
−5
0 0.2 0.4 0.6 0.8 1
Fourth order trajectory profiles: 15 time periods, 4 sizes and max d
1000
t t t t
500 d d d d
t t t t t t t
d [m/s4]
j a j v j a j
0
−500 td td td td
−1000
0 0.2 0.4 0.6 0.8 1
time [s]
d [m/s4]
500
0
0.39 0.4 0.41 0.42 0.43 0.44 0.45 0.46
d(t) = d0 0
j [m/s3]
−20
−40 j0
(t) = d0t + 0 0.39 0.4 0.41 0.42 0.43 0.44 0.45 0.46
2
a [m/s2]
1 2 1 a0
a(t) = 2 d0 t + 0t + a0
0
0.39 0.4 0.41 0.42 0.43 0.44 0.45 0.46
1 1.5
v(t) = 6 d0 t
3
+ 12 0t2 + a0t + v0 v
v [m/s]
0
1.45
0.39 0.4 0.41 0.42 0.43 0.44 0.45 0.46
1 4 1 3
x(t) = 24 d0 t + 6 0 t + a0t2 0.35
x [m]
0.3
x0
+v0t + x0 0.25
0.39 0.4 0.41 0.42 0.43 0.44 0.45 0.46
time [s]
d [m/s4]
0
j [m/s3]
td¯ only depends on d¯ and x̄ 0
−100
q 0 0.2 0.4 0.6 0.8 1 1.2
x̄
⇒ td¯ = 4
8d¯
10
a [m/s2]
0
−10
q
3 v̄
v̄ violated: td¯ = 2d¯
0 0.2 0.4 0.6 0.8 1 1.2
v [m/s]
1
q
ā
ā violated: td¯ = d¯ 0
0 0.2 0.4 0.6 0.8 1 1.2
1
̄
̄ violated: td¯ =
x [m]
d¯ 0.5
0
0 0.2 0.4 0.6 0.8 1 1.2
time [s]
d [m/s4]
0
j [m/s3]
0
−50
0 0.2 0.4 0.6 0.8 1 1.2
Note:
2
a [m/s2]
• No bounds violated 0
−2
• Final td¯ always ≤ first td¯ 0 0.2 0.4 0.6 0.8 1 1.2
0.2
• Consequently: x̄ not reached
v [m/s]
0.1
0
0 0.2 0.4 0.6 0.8 1 1.2
0.04
x [m]
0.02
0
0 0.2 0.4 0.6 0.8 1 1.2
time [s]
d [m/s4]
0
j [m/s3]
Add periods of constant jerk 0
a [m/s2]
t̄ follows from: 0
v [m/s]
1
0
v̄ violated: t2̄ + 3td¯t̄ + 2t2d¯ − dt¯v̄ ¯ =0 1
0 0.2 0.4 0.6 0.8 1 1.2
d
x [m]
0.5
ā
ā violated: t̄ = − td¯
̄ 0
0 0.2 0.4 0.6 0.8 1 1.2
time [s]
d [m/s4]
0
j [m/s3]
0
−50
0 0.2 0.4 0.6 0.8 1 1.2
Note: 5
a [m/s2]
• No bounds violated 0
−5
• Final t̄ always ≤ first t̄ 0 0.2 0.4 0.6 0.8 1 1.2
0.8
0.6
• Consequently: x̄ not reached
v [m/s]
0.4
0.2
0
0 0.2 0.4 0.6 0.8 1 1.2
0.2
x [m]
0.1
0
0 0.2 0.4 0.6 0.8 1 1.2
time [s]
d [m/s4]
0
j [m/s3]
Add periods of constant 0
a [m/s2]
0
{t2d¯ + td¯t̄} t2ā +
−5
0 0.2 0.4 0.6 0.8 1 1.2
{6t3d¯ + 9t2d¯t̄ + 3td¯t2̄ } tā + 2
v [m/s]
1
{8t4d¯ + 16t3d¯t̄ + 10t2d¯t2̄ + 2td¯t3̄ − x̄d¯} = 0
0
0 0.2 0.4 0.6 0.8 1 1.2
1
¯ 3 −3dt
¯ 2 t̄ −dt
¯ ¯t2
x [m]
v̄−2dtd¯ d¯ d ̄ 0.5
v̄ violated: tā = ¯ 2 ¯
dt +dt ¯t̄
d¯ d 0
0 0.2 0.4 0.6 0.8 1 1.2
time [s]
d [m/s4]
0
j [m/s3]
0
−50
0 0.2 0.4 0.6 0.8 1 1.2
Note: 5
a [m/s2]
• No bounds violated 0
−5
• Final tā always ≤ first tā 0 0.2 0.4 0.6 0.8 1 1.2
1.5
• Consequently: x̄ not reached
v [m/s]
1
0.5
0
0 0.2 0.4 0.6 0.8 1 1.2
0.6
For final step:
x [m]
0.4
determine obtained position xā 0.2
0
0 0.2 0.4 0.6 0.8 1 1.2
time [s]
d [m/s4]
0
j [m/s3]
Final step: add period of 0
a [m/s2]
0
x̄ − xā
tv̄ = −5
v̄ 0 0.2 0.4 0.6 0.8 1 1.2
1.5
v [m/s]
1
0.5
0
Finished: trajectory completely 0 0.2 0.4 0.6 0.8 1 1.2
1
determined by 5 parameters !
x [m]
0.5
0
0 0.2 0.4 0.6 0.8 1 1.2
time [s]
Trajectory setpoint
GUI controller
generation interpol.
?? CPU
CPU
d [m/s4]
times 0
−500 td td td td
−1000
0 0.2 0.4 0.6 0.8 1
Switching times
1000
500
d [m/s4]
t2 t3 t4 t5 t8 t9 t14 t15
0
t0 t1 t6 t7 t10 t11 t12 t13
−500
−1000
0 0.2 0.4 0.6 0.8 1
Synchronisation with sampling instances at 100Hz?
1000
500
tj
d [m/s4]
t8 t9
0
t10
−500 td
−1000
0.65 0.7 0.75 0.8
time [s]
Example: r
x̄
td¯ = 4 ¯
8d
t¯
t0d¯ = ceil d × Ts
Ts
Correct d¯
x̄
d¯0 = 0 4
8td¯
Derivative of jerk
profile generator q2
q3
q4
1
k12.s+c
F
1 1 1 1 Motion
PD x
s s s s System
Jerk Acceleration Velocity Position Controller 4th order model
Normalized discrete time fourth order profiles, compared with continuous time profiles
a: not synchronized b: synchronized, delayed by 2Ts
Synchronization of
profiles:
d
d with 2Ts,
j with 1 12 Ts,
j
a with Ts,
v with 12 Ts.
a
→ 12 Ts ?
v
1
In1
1
0.5
z
Unit Delay 1
x
Out1
1
implementation u 1/k12
s
y
c/k12
Algebraic loop !!
Ts(z+1)
u 1/k12 --------
------- y
2(z-1)
ZOH
Discrete-Time
Integrator: Trapezoidal
c/k12
Algebraic loop !!
1
u 1/k12 Ts 1/2 y
z
ZOH
Transfer function:
c/k12
Ts
2k12 +cTs (z + 1) NO algebraic loop !!
y= 2k12 −cTs
u 1
z − 2k12+cTs u -K-
z
y
ZOH Ts/(2*k12+c*Ts)
-K-
(2*k12-c*Ts)/(2*k12+c*Ts)
parameters 2
−2
−4
−6
0 0.5 1 1.5 2 2.5 3
time [s]
2
Effect of order
of feedforward
0
−2
−4
−6
0 0.5 1 1.5 2 2.5 3
time [s]
8
results 3 6
4
2 2
Position error [m] 0
−2
1 −4
Discrete time 0.3 0.35 0.4 0.45
vs. continuous
0
time
−1
−2
−3
0 0.5 1 1.5 2 2.5 3
time [s]