0% found this document useful (0 votes)
53 views16 pages

Ch. 7: Independent Joint Control: 1. SISO Overview

The document describes the dynamics of a DC motor attached to a load. It presents the transfer function model of a DC motor as a second order system relating the input voltage to the output angular displacement. It then models the combined motor-load system by deriving differential equations for both the electrical and mechanical domains. Finally, it expresses the overall system dynamics as a second order differential equation where the input is the control voltage and the disturbance is the load torque.

Uploaded by

VienNgocQuang
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)
53 views16 pages

Ch. 7: Independent Joint Control: 1. SISO Overview

The document describes the dynamics of a DC motor attached to a load. It presents the transfer function model of a DC motor as a second order system relating the input voltage to the output angular displacement. It then models the combined motor-load system by deriving differential equations for both the electrical and mechanical domains. Finally, it expresses the overall system dynamics as a second order differential equation where the input is the control voltage and the disturbance is the load torque.

Uploaded by

VienNgocQuang
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/ 16

Ch.

7: Independent Joint Control

1. SISO overview

• Typical single input, single output (SISO) system:

• We want the robot tracks the desired trajectory and rejects external
disturbances
• We already have the desired trajectory, and we assume that we can
measure the actual trajectories
• Thus the first thing we need is a system description

2
1. SISO overview

• Need a convenient input-output description of a SISO system


• Two typical representations for the plant:
– Transfer function
– State-space
• Transfer functions represent the system dynamics in terms of the
Laplace transform of the ODEs that represent the system dynamics
• For example, if we have a 1DOF system described by:
τ (t ) = Jθ(t ) + Bθ(t )
• We want the representation in the Laplace domain:
τ (s ) = s 2Jθ (s ) + sBθ (s )
= s (sJ + B )θ (s )
• Therefore, we give the transfer function as:
θ (s )
P (s ) ≡
1 1/ J
= =
τ (s ) s (sJ + B ) s (s + B / J ) 3

1. SISO overview

• A generic 2nd order system can be described by the following ODE:


mx(t ) + bx (t ) + kx (t ) = F (t )
• And we want to get a transfer function representation of the system,
take the Laplace transform of both sides:
mL{x(t )} + bL{x (t )} + kL{x (t )} = L{F (t )}
( )
m s 2 x (s ) − sx (0 ) − x (0 ) + b(sx (s ) − x (0 )) + kx (s ) = F (s )
( )
ms 2 + bs + k x (s ) = F (s ) + mx (0 ) + (ms + c )x (0 )
• Ignoring the transient response, we can rearrange:
x (s ) 1
=
F (s ) ms + bs + k
2

• This is the input-output transfer function and the denominator is


called the characteristic equation

4
2. Motor dynamics

• DC motors are ubiquitous in robotics applications


• We develop a transfer function that describes the relationship
between the input voltage and the output angular displacement
• Physical description of the most common motor: permanent
magnet…

stator

rotor
(armature)

commutator
5

2. Motor dynamics

6
2. Motor dynamics

• When a conductor moves in a magnetic field, a voltage is generated


– The magnitude of torque:
τ m = K1φ ia
– Called back EMF:
Vb = K 2φωm ωm : rotor angular velocity
– Differential equation for the armature current
di a
L + Ri a = V − Vb R: armature resistance
dt L: armature inductance

2. Motor dynamics

• Since this is a permanent


magnet motor, the magnetic
flux is constant, we can write:
τ m = K1φi a = K m i a τ0 is the blocked torque
Km: torque constant when motor is stalled

• Similarly:

Vb = K 2φωm = K b m
dt
Kb: back EMF constant

• Km and Kb are numerically


equivalent, thus there is one
constant needed to
Torque-speed curves
characterize a motor

8
2. Motor dynamics

• Let’s take motor and connect it to a link


• Between the motor and link there is a gear such that: θ m = rθ L
• Lump the actuator and gear inertias: J m = J a + J g
• Now we can write the dynamics of this mechanical system:
d 2θ m dθ τ τ
Jm 2
+ Bm m = τ m − L = K m i a − L
dt dt r r

2. Motor dynamics

• Now we have the ODEs describing this system in both the electrical
and mechanical domains:
di a dθ d 2θ m dθ τ
L + Ri a = V − K b m Jm + Bm m = K m i a − L
dt dt dt 2
dt r
• In the Laplace domain:
τ L (s )
(Ls + R )Ia (s ) = V (s ) − K bsΘ m (s ) (J m )
s 2 + Bm s Θ m (s ) = K mIa (s ) −
r
• These two can be combined to define the input-output relationship
for the input voltage, load torque, and output displacement:

10
2. Motor dynamics

• Remember, we want to express the system as a transfer function


from the input to the output angular displacement
– But we have two potential inputs: the load torque and the
armature voltage
– First, assume τL = 0 and solve for Θm(s):

(J m )
s 2 + Bm s Θ m (s )
= Ia (s )
Km

(Ls + R )(J ms 2 + Bms )Θ (s ) = V (s ) − K sΘ (s )


m b m
Km
Θ m (s ) Km
=
V (s ) s[(Ls + R )(J m s + Bm ) + K b K m ]

11

2. Motor dynamics

• Now consider that V(s) = 0 and solve for Θm(s):


− K b sΘ m (s )
Ia (s ) =
Ls + R
− K m K b sΘ m (s ) τ L (s )
(J m )
s 2 + Bm s Θ m (s ) =
Ls + R

r
Θ m (s ) − (Ls + R ) / r
=
τ L (s ) s[(Ls + R )(J m s + Bm ) + K bK m ]

• Note that this is a function of the gear ratio


– The larger the gear ratio, the less effect external torques have
on the angular displacement

12
2. Motor dynamics

• In this system there are two ‘time constants’


– Electrical: L/R
– Mechanical: Jm/Bm
• For intuitively obvious reasons, the electrical time constant is
assumed to be small compared to the mechanical time constant
– Thus, ignoring electrical time constant will lead to a simpler
version of the previous equations:

Θ m (s ) Km / R
=
V (s ) s[J m s + Bm + K bK m / R ]

Θ m (s ) − 1/ r
=
τ L (s ) s[J m s + Bm + K bK m / R ]

13

2. Motor dynamics

• Rewriting these in the time domain gives:


Θ m (s ) Km / R J mθm (t ) + (Bm + K b K m / R )θm (t ) = (K m / R )V (t )
=
V (s ) s[J m s + Bm + K bK m / R ]
Θ m (s ) − 1/ r J mθm (t ) + (Bm + K b K m / R )θm (t ) = −(1/ R )τ L (t )
=
τ L (s ) s[J m s + Bm + K bK m / R ]

• By superposition of the solutions of these two linear 2nd order ODEs:


J mθm (t ) + (Bm + K b K m / R )θm (t ) = (K m / R )V (t ) − (1/ R )τ L (t )

J B u (t ) d (t )
• We can write the dynamics of a DC motor attached to a load as:
Jθ( t ) + Bθ ( t ) = u ( t ) − d ( t ) ( )
Js 2 + Bs Θ ( s ) = U ( s ) − D ( s )
– Note that u(t) is the input and d(t) is the disturbance (e.g. the
dynamic coupling from motion of other links)
14
3. Set-point Tracking

• We will first discuss two initial controllers: PD and PID


– Both attempt to drive the error (between a desired trajectory
and the actual trajectory) to zero
• The system can have any dynamics, but we will concentrate on
the previously derived system

15

3.1. PD controller

• Control law: u (t ) = K pe(t ) + K d e (t )


– Where e(t) = θd(t) - θ(t)
• In the Laplace domain: U (s ) = (K p + sK d )E (t )
(
U (s ) = (K p + sK d ) Θ d (s ) − Θ (s ))
Θ(s) =
U (s) − D(s)
=
( K p + sK d ) Θd ( s ) − D ( s )
Js 2 + Bs Js 2 + ( B + K d ) s + K p

• The closed-loop system:

16
3.1. PD controller

• The denominator is the characteristic polynomial


• The roots of the characteristic polynomial determine the
performance of the system

s2 +
(B + K d ) s + K p =0
J J
• If we think of the closed-loop system as a damped second order
system, this allows us to choose values of Kp and Kd
s 2 + 2ζωs + ω 2 = 0
• Thus Kp and Kd are:
K p = ω 2J
K d = 2ςωJ − B

• A natural choice is ζ = 1 (critically damped)

17

3.1. PD controller

• Limitations of the PD controller:


– for illustration, let our desired trajectory be a step input and our
disturbance be a constant as well:
Θ d (s ) = , D(s ) =
C D
s s
– Plugging this into our system description gives:
Θ (s ) =
(K p + sK d )C − D
(
s Js + (B + K d )s + K p
2
)
– The steady-state value of the displacement:
s (K p + sK d )C − sD (K + sK d )C − D K pC − D D
θ ss = lim = lim p
= =C −
s →0 (
s Js + (B + K d )s + K p
2
) s →0 Js + (B + K d )s + K p
2
Kp Kp

– Thus the steady state error is: –D/Kp


– Therefore to drive the error to zero in the presence of large
disturbances, we need large gains.
18
3.2. PID controller

• Control law: u (t ) = K pe(t ) + K d e (t ) + K i ∫ e(t )dt

• In the Laplace domain:


⎛ K ⎞
U (s ) = ⎜ K p + K d s + i ⎟E (s )
⎝ s ⎠

Θ (s ) =
(K sd
2
)
+ K ps + K i Θ d (s ) − sD(s )
Js + (B + K d )s 2 + K ps + K i
3

19

3.2. PID controller

• The integral term eliminates the steady state error that can arise from
a large disturbance
• How to determine PID gains
1. Set Ki = 0 and solve for Kp and Kd
(B + K d )K p
2. Determine Ki to eliminate steady state error K i <
J
• Stability
– The closed-loop stability of these systems is determined by the
roots of the characteristic polynomial
– If all roots (potentially complex) are in the ‘left-half’ plane, our
system is stable
– A description of how the roots of the characteristic equation
change (as a function of controller gains) is very valuable
• Called the root locus
20
4. Trajectory tracking

• Setpoint controllers are inappropriate for tracking time-varying


trajectories
• Thus we need alternative controllers
– Feedforward control
– Computed torque control
– State feedback control

21

4.1. Feedforward control

• If we want to track an arbitrary trajectory, and we know the system


dynamics, we can use the following architecture:

– Assumptions:
• G(s), H(s) are proper
• G(s) is open-loop stable
• G(s), H(s), F(s) are rational

22
4.1. Feedforward control

• Since the three polynomials are rational, we can write them as:
q (s ) c (s ) a(s )
G(s ) = , H (s ) = , F (s ) =
p(s ) d (s ) b(s )
• Where:
deg q (s ) < deg p(s ), degc (s ) < deg d (s )

• Again, call u(t) the input to the open loop plant:


U (s ) = F (s )Θ d + H (s )(Θ d − Θ )

• Next we can write the output:


Θ = G(s )[F (s )Θ d + H (s )(Θ d − Θ )]
• Solving this for Θ gives:

Θ=
(G(s )F (s ) + G(s )H (s ))Θ d
1 − G(s )H (s )
23

4.1. Feedforward control

• Rewriting this in terms of the rational functions gives:

T (s) =
Θ(s)
=
(G ( s ) F ( s ) + G ( s ) H ( s ))
Θd ( s ) 1− G (s) H (s)
q ( s ) ⎡⎣c ( s ) b ( s ) + a ( s ) d ( s ) ⎤⎦
=
b ( s ) ⎡⎣ p ( s ) d ( s ) + q ( s ) c ( s ) ⎤⎦

• Thus, if the feedforward system is to be stable, the closed loop


characteristic polynomial has to have poles in the left-half plane
– Closed-loop characteristic polynomial
– Therefore: b(s )[p(s )d (s ) + q (s )c (s )]
Re(roots(b(s ))) < 0
Re(roots(p(s )d (s ) + q (s )c (s ))) < 0

24
4.1. Feedforward control

• What is a good candidate for F(s)?


• Since we know the open loop dynamics G(s), choose F(s) = 1/G(s)
– i.e. a(s) = p(s), b(s) = q(s)
• Now we can rewrite the closed-loop transfer function:
Θ ( s ) q ( s ) ⎡⎣c ( s ) b ( s ) + a ( s ) d ( s ) ⎤⎦
T (s) = d =
Θ ( s ) b ( s ) ⎣⎡ p ( s ) d ( s ) + q ( s ) c ( s ) ⎦⎤
q ( s ) ⎡⎣c ( s ) q ( s ) + p ( s ) d ( s ) ⎤⎦
= =1
q ( s ) ⎡⎣ p ( s ) d ( s ) + q ( s ) c ( s ) ⎤⎦
• i.e. the tracking error is zero
• But we need to be careful: we can only do this when the plant is
minimum phase
– i.e. all zeros are in the left-half plane

25

4.1. Feedforward control

• If there is a disturbance, our system looks like:

• The transfer function:

(
Θ ( s ) = G ( s ) ⎡ D ( s ) + F ( s ) Θd ( s ) + H ( s ) Θd ( s ) − Θ ( s ) ⎤
⎣ ⎦ )
Θ ( s ) = G ( s ) ⎡ D ( s ) + F ( s ) Θd

( s) + H ( s)(Θ d
( s ) − Θ ( s ) )⎤⎦
= G ( s ) D ( s ) + G ( s ) F ( s ) Θd ( s ) + G ( s ) H ( s ) Θd ( s ) − G ( s ) H ( s ) Θ ( s )
G (s) G (s) F (s) + G (s) H (s) d
= D(s) + Θ (s)
1+ G (s) H (s) 1+ G (s) H (s)
26
4.1. Feedforward control

• Again defining the error as E = Θd - Θ gives us


E ( s ) = Θd ( s ) − Θ ( s )
G (s) G (s) F (s) + G (s) H (s) d
= Θd ( s ) − D(s) − Θ (s)
1+ G (s) H (s) 1+ G (s) H (s)
G (s) 1− G (s) F (s) d
=− D(s) + Θ (s)
1+ G (s) H (s) 1+ G (s) H (s)

• Since we defined F(s) = 1/G(s), the last term is zero


G (s)
E (s) = − D(s)
1+ G (s) H (s)

27

4.1. Feedforward control

• Example: Consider the system with the previous dynamics and a PD


compensator

G(s ) = F (s ) = Js 2 + Bs
1
H (s ) = K p + K d s
Js + Bs
2

28
4.1. Feedforward control

• Computed torque control

29

4.2. State space representations

• Another representation of dynamical systems allows us to use a


matrix form
• Consider the (open-loop) system described by the following ODE:
τ = Jθ + Bθ + Kθ
• Now choose:
x1 = θ
x 2 = x1 = θ
• We call x1 and x2 the states of our system, and we can now rewrite
our ODE in matrix form:
x = Ax + bu
⎡ 0 1 ⎤ ⎡0⎤
⎡ x ⎤
= ⎢ k −B ⎥ ⎢ ⎥ + ⎢ 1 ⎥ u
1
⎢− ⎥ ⎣ x2 ⎦ ⎢ ⎥
⎣ J J ⎦ ⎣J ⎦
30
4.2. State space representations

• This gives a two dimensional set of first order ODEs describing the
evolution of the state
• If we are interested in an output (for example θ), we make one last
definition:
y = θ = x1 = c T x
= [1 0]x

• What is the relationship to the transfer function representation?


– Calling u(t) the input, y(t) the output,
Y (s )
G(s ) = = c T (sI − A ) b
−1

U (s )

31

4.2. State space representations

• Further, the roots of the characteristic polynomial are the


eigenvalues of A
• State feedback control
– Control law: n
u (t ) = −k T x = ∑ k i xi
i =1

– Where the ki are gains to be determined


– i.e. the control is a linear combination of the states (typically
positions and velocities)
– Substituting this into our state space representation gives
( )
x = Ax + bu = Ax − bk T x = A − bk T x
– Thus, state feedback changes the eigenvalues of the closed-
loop system (i.e. the poles of the closed loop system)

32

You might also like