You are on page 1of 9

Dynamic Effects of Feedback Control

Robert Stengel Robotics and Intelligent Systems MAE 345, Princeton University, 2011

Outer-to-Inner-Loop Control Hierarchy

Inner Loop
Small Amplitude Fast Response High Bandwidth

Inner, Middle, and Outer Feedback Control Loops Step Response of Linear, TimeInvariant (LTI) Systems Position and Rate Control Transient and Steady-State Response to Sinusoidal Inputs

Middle Loop
Moderate Amplitude Medium Response Moderate Bandwidth

Outer Loop
Large Amplitude Slow Response Low Bandwidth

Feedback
Error between command and feedback signal drives next inner-most loop

Copyright 2011 by Robert Stengel. All rights reserved. For educational use only. http://www.princeton.edu/~stengel/MAE345.html

Outer-to-Inner-Loop Control Hierarchy of an Industrial Robot


Inner Loop
Focus on control of individual joints

Inner-Loop Feedback Control


Feedback control design must account for actuator-system-sensor dynamics

Middle Loop
Focus on operation of the robot

Single-Input/Single-Output Example, with forward and feedback control logic (compensation)

Outer Loop
Focus on goals for robot operation

Thermostatic Temperature Control

Thermostat Control Logic

Dynamics
Delays Dead Zones Saturation Coupling

Structure
Layout Insulation Circulation Multiple Spaces

External Effects
Solar Radiation Air Temperature Wind Rain, Humidity

Control Law [i.e., logic that drives the control variable, u(t)]

... all controlled by a simple on/off switch

" $ 1 (on ), e(t ) > 0 u (t ) = # $ 0 (off ), e(t ) ! 0 % where e(t ) = yc (t ) & y(t ) = uc (t ) & ub (t )

yc: Desired output variable (command) y: Actual output u: Control variable (forcing function) e: Control error

Thermostat Control Logic


" $ 1 (on ), e(t ) > 0 u (t ) = # $ 0 (off ), e(t ) ! 0 %

Thermostat Control Logic with Hysteresis


Hysteresis introduces a lag in the response System response is called a limit cycle Cooling controlled with sign reversal

...but control signal would chatter with slightest change of temperature Solution: Introduce hysteresis to slow the switching cycle

# % 1 (on ), e(t ) ! T > 0 u (t ) = $ 0 (off ), e(t ) + T " 0 % &

Speed Control of Direct-Current Motor

Characteristics of the Model


Simplied Dynamic Model
Rotary inertia, J, is the sum of motor and load inertias Internal damping neglected Output speed, y(t), rad/s, is an integral of the control input, u(t) Motor control torque is proportional to u(t) Desired speed, yc(t), rad/s, is constant

Angular Rate

Control Law (c = Control Gain)

u (t ) = c e(t ) where e(t ) = yc (t ) ! y(t )

How would y(t) be measured?

Model of Dynamics and Speed Control


First-order LTI ordinary differential equation

Step Response of Speed Controller


Step input :

Solution of the integral

" $ 0, t < 0 yC (t ) = # $ 1, t ! 0 %

dy(t ) 1 c c = u (t ) = e(t ) = [ yc (t ) ! y(t )], y ( 0 ) given dt J J J


Integral of the equation, with y(0) = 0

" c% !$ ' t + ( .t (1 ! exp ! t / + y(t ) = yc *1 ! exp # J & - = yc ( )1 ! exp + , = yc * ) , * ) ,

1 c c y(t ) = ! u (t ) dt = ! e(t ) dt = J0 J0 J

! [ y (t ) " y(t )] dt
c 0

where
! = c/J = eigenvalue or root of the system (rad/sec) " = J/c = time constant of the response (sec)

Direct integration of yc(t) Negative feedback of y(t)

What does the shaft angle response look like?

Angle Control of Direct-Current Motor

Model of Dynamics and Angle Control

Angular Position

Simplied Dynamic Model


Rotary inertia, J, is the sum of motor and load inertias Output angle, y(t), is a double integral of the control, u(t) Desired angle, yc(t), is constant

Output angle, y(t), as a function of time

y(t ) =

1 c u (t ) dt dt = ! J! J 0 0

t t

! ! e(t ) dt dt =
0 0

t t

c J

! ![y
0 0

t t

" y(t )] dt dt

Feedback Control Law

u (t ) = c e(t ) where e(t ) = yc (t ) ! y(t )


How would y(t) be measured?

Associated 2nd-order, linear, time-invariant ordinary differential equation

d 2 y(t ) c = !! y(t ) = [ yc ! y(t )] 2 dt J

Model of Dynamics and Angle Control


Corresponding set of 1st-order equations, with
Angle: Angular rate: x1(t) = y(t) x2(t) = dy(t)/dt

State-Space Model of the DC Motor


Open-loop dynamic equation

! x !1 (t ) # !2 (t ) x # "

$ ! 0 1 $ ! x1 (t ) &=# &# 0 0 % # x2 (t ) & % " "

$ ! 0 $ &+# & u (t ) 1/ J % & % "

Feedback control law

!1 (t ) = x2 (t ) x u (t ) c c !2 (t ) = = [ yc ! y(t )] = [ yc ! x1 (t )] x J J J

u (t ) = c [ yc (t ) ! y1 (t )] = c [ yc (t ) ! x1 (t )]

Closed-loop dynamic equation

! x !1 (t ) # !2 (t ) x # "

$ ! 0 &=# 'c / J & % "

1 $ ! x1 (t ) &# 0 % # x2 (t ) "

$ ! 0 $ &+# & yc c/J % & % "

Step Response with Angle Feedback


! x !1 (t ) # ! x (t ) # " 2 $ ! 0 &=# 'c / J & % " 1 $ ! x1 (t ) &# 0 % # x2 (t ) " $ ! 0 $ &+# & yc c/J % & % "

What Went Wrong?


Control law with rate feedback No damping! Solution: Add rate feedback in the control law

u (t ) = c1 [ yc (t ) ! y1 (t )] ! c2 y2 (t )

% Step Response of Undamped Angle Control F1 G1 F2 G2 F3 G3 Hx = = = = = = = [0 1;-1 0]; [0;1]; [0 1;-0.5 0]; [0;0.5]; [0 1;-0.25 0]; [0;0.25]; [1 0;0 1]; = ss(F1,G1,Hx,0); = ss(F2,G2,Hx,0); = ss(F3,G3,Hx,0);

c/J = 1, 0.5, and 0.25

Closed-loop dynamic equation

! y (t ) # 1 # y2 ( t ) "

$ ! x (t ) &=# 1 & # x2 ( t ) % "

$ & & %

Sys1 Sys2 Sys3

! # # "

!1 (t ) $ ! x 0 &=# ' c ! x2 (t ) & # 1 / J % "

$ ! x1 (t ) &# ' c2 / J & # x2 (t ) %" 1

$ ! 0 &+# c /J & " 1 % #

$ & yc & %

step(Sys1,Sys2,Sys3)

Alternative Implementations of Rate Feedback


u( t ) = c1 [ y c ( t ) ! y1 ( t )] ! c 2 y 2 ( t ) = c1 [ y c ( t ) ! y1 ( t )] ! c 2
One input, two outputs

Step Response with Angle and Rate Feedback


c1 /J = 1 c2 /J = 0, 1.414, 2.828
% Step Response of Damped Angle Control F1 = [0 1;-1 0]; G1 = [0;1]; F1a = [0 1;-1 -1.414]; F1b = [0 1;-1 -2.828];

dy1 ( t ) dt

One input, one output

Hx = [1 0;0 1]; Sys1 Sys2 Sys3 = ss(F1,G1,Hx,0); = ss(F1a,G1,Hx,0); = ss(F1b,G1,Hx,0);

step(Sys1,Sys2,Sys3)

LTI Model with Feedback Control


Command input, uc, has dimensions of u

Effect of Feedback Control on the LTI Model


Hu = 0 Hx : r x n

u(t ) = u c (t ) ! Cy(t )

( t ) = F x ( t ) + Gu( t ) + Lw( t ) x y ( t ) = H x x ( t ) + H u u( t )

u(t ) = u c (t ) ! Cy(t )

! (t ) = F x(t ) + G u(t ) = F x(t ) + G [ u c (t ) ! Cy(t )] x = Fopen loop x(t ) + G {u c (t ) ! C [ H x x(t )]}

= [ F ! GCH x ] x(t ) + G u c (t ) ! Fclosed loop x(t ) + G u c (t )

Feedback modies the stability matrix of the closed-loop system


Convergence or divergence Envelope of transient response

LTI Model with Feedback Control and Command Gain


Command input, yc, is shaped by Cc

Effect of Command Gain on LTI Model


With L = Hu = 0

u(t ) = C c y c (t ) ! Cy(t )

! (t ) = F x(t ) + G u(t ) = F x(t ) + G {C c y c (t ) ! Cy(t )} x = F x(t ) + G {C c y c (t ) ! C [ H x x(t )]} = [ F ! GCH x ] x(t ) + GC c y c (t )

! (t ) = 0 Steady-state response of the system x

u(t ) = u c (t ) ! Cy(t ) = C c y c (t ) ! Cy(t )

x * (t ) = ! [ F ! GCH x ] GC c y c * (t )
!1

Command gain adjusts the steady-state response Has no effect on the stability of the system

LTI Control with Forward-Loop Gain


u(t ) = C [ y c (t ) ! y(t )]

Response to Sine Wave Input with Angle Feedback: No Damping


yc (t ) = sin (! t ) = sin ( 6.28 t ) , deg
c1 /J = 1; c2 /J = 0
Why are there 2 oscillations in the output?
Undamped transient response to the input Long-term dynamic response to the input

( t ) = F x ( t ) + Gu( t ) + Lw( t ) x y ( t ) = H x x ( t ) + H u u( t )

System has a natural frequency of oscillation, #n Long-term response to a sine wave is a sine wave

With Cc = C, command input, yc, has dimensions of y

Response to Sine Wave Input with Rate Damping


c1 /J = 1; c2 /J = 1.414

yc (t ) = sin (! t ) = sin ( 6.28 t ) , deg

System Dynamics Produces Differences in Amplitude and Phase Angle of Input and Output
Amplitude Ratio ( AR) = Phase Angle = !360 y peak yC peak , deg

c1 /J = 1; c2 /J = 2.828

"t peak Period

Amplitude ratio and phase angle characterize the system model

With damping, transient response decays In this case, damping has negligible effect on long-term response

Effect of Input Frequency on Output Amplitude and Phase Angle y (t ) = sin ( t / 6.28 ) , deg
c

At Higher Frequency, Phase Angle Lag Increases


c1 /J = 1; c2 /J = 1.414

c1 /J = 1; c2 /J = 1.414

y c ( t ) = sin( t ), deg

With low input frequency, input and output amplitudes are about the same Lag of angle output oscillation, compared to input, is small Rate oscillation leads angle oscillation by ~90 deg

c1 /J = 1; c2 /J = 1.414

yc (t ) = sin ( 6.28 t ) , deg

At Even Higher Frequency, Amplitude Ratio Decreases

Frequency Response of the DC Motor with Feedback Control


! Long-term response to sinusoidal inputs over range of frequencies
! Determine experimentally or ! from the transfer function

! Transfer function based on the Laplace transform of the system = Bode Plot

Bode Plot Depicts Frequency Response

Hendrick Bode

% Frequency Response of DC Motor Angle Control F1 = [0 1;-1 0]; G1 = [0;1]; F1a = [0 1;-1 -1.414]; F1b = [0 1;-1 -2.828]; Hx = [1 0;0 1]; Sys1 Sys2 Sys3
20log AR and ! vs. log "

Next Time: Analog and Digital Control Systems

= ss(F1,G1,Hx,0); = ss(F1a,G1,Hx,0); = ss(F1b,G1,Hx,0);

w = logspace(-2,2,1000); bode(Sys1,Sys2,Sys3,w), grid

You might also like