Simulation, Block Diagrams and Feedback Control
Transcript of Simulation, Block Diagrams and Feedback Control
-
8/3/2019 Simulation, Block Diagrams and Feedback Control
1/35
ME 244L Prof. Raul G. LongoriaDynamic Systems and Controls Laboratory
Department of Mechanical EngineeringThe University of Texas at Austin
Simulation, Block Diagrams,
and Feedback Control
Prof. R.G. Longoria
Updated Fall 2009
-
8/3/2019 Simulation, Block Diagrams and Feedback Control
2/35
ME 244L Prof. Raul G. LongoriaDynamic Systems and Controls Laboratory
Department of Mechanical EngineeringThe University of Texas at Austin
Overview
Using block diagrams to describe system model
equations
How block diagrams are used in practice
LabVIEW implementation quick demo Feedback control concepts
NOTE: Some of these slides were/are covered in
lecture, others are for information only.
-
8/3/2019 Simulation, Block Diagrams and Feedback Control
3/35
ME 244L Prof. Raul G. LongoriaDynamic Systems and Controls Laboratory
Department of Mechanical EngineeringThe University of Texas at Austin
Example: Sphere in free fall
V
g
2
2
;
d b
d s
d
s
dpF p mV
dt
p F F mg
p mV K V gV mg
KV V g g
m
=
= += = +
= +
Newtons Law:
You can choosep (momentum) or V
(velocity) as your state variable. Here
we choose velocity.
2
3
1drag
2
1buoyancy
6
d D s
b s
F C AV
F gV g D
= =
= = =
Forces:
-
8/3/2019 Simulation, Block Diagrams and Feedback Control
4/35
ME 244L Prof. Raul G. LongoriaDynamic Systems and Controls Laboratory
Department of Mechanical EngineeringThe University of Texas at Austin
Sphere in free fall block diagram
( )
2
2
1
d D s
s
V V
K m C A m
g
= += =
=
NOTE: The ANALOG diagram shown here is a model that is nowimplemented in many commercial block diagram simulation languages. This
is a computational diagram that embodies the mathematical model. This is
also a form used in feedback control diagram descriptions.
Simplify for formulation of
a block diagram:
x V=
-
8/3/2019 Simulation, Block Diagrams and Feedback Control
5/35
ME 244L Prof. Raul G. LongoriaDynamic Systems and Controls Laboratory
Department of Mechanical EngineeringThe University of Texas at Austin
Block diagram algebraA pictorial representation of the functions performed
by each component and of the flow of signals.
Basic functions: gains, summers, integrators, etc.
Lines between blocks are signals, and blocks areoperators on the signals.
Can be used for linear or nonlinear dynamic systemsand controls descriptions.
-
8/3/2019 Simulation, Block Diagrams and Feedback Control
6/35
ME 244L Prof. Raul G. LongoriaDynamic Systems and Controls Laboratory
Department of Mechanical EngineeringThe University of Texas at Austin
Block Diagram AlgebraSumming point
a b
a
b
+
Branching point
In general, systems operate on inputs to give
outputs.
( )y g u=Here,
yu
In linear systems, the signal variables are assumed
to be s-domain forms, while ifnonlinear it isassumed these are strictly time domain functions
(and Laplace transform does not apply).
For linear, ( ) ( ) ( )Y s G s U s=
( )g i
( )Y s( )U s( )G s
-
8/3/2019 Simulation, Block Diagrams and Feedback Control
7/35
ME 244L Prof. Raul G. LongoriaDynamic Systems and Controls Laboratory Department of Mechanical EngineeringThe University of Texas at Austin
Implemented first in analog
mg +
pp
KdF
Gain
Sum Integrate
From H.S. Baeck, Practical Servomechanism Design,
McGraw-Hill, 1968.
-
8/3/2019 Simulation, Block Diagrams and Feedback Control
8/35
ME 244L Prof. Raul G. LongoriaDynamic Systems and Controls Laboratory Department of Mechanical EngineeringThe University of Texas at Austin
Electronic analog simulation
A system can be wired into a patch panel, and
the simulation is instantaneous.
The set up is extremely difficult and error
prone; changing parameters can be limited. Output of data can be limited.
Electronics were not always reliable.
-
8/3/2019 Simulation, Block Diagrams and Feedback Control
9/35
ME 244L Prof. Raul G. LongoriaDynamic Systems and Controls Laboratory Department of Mechanical EngineeringThe University of Texas at Austin
Dark PastThe figure to the left (courtesy of a simulationgroup at Boeing that developed EASY5)
illustrates the complexity required in analog
integration, particularly for very complex systems.
The patch panels were difficult to manage, and
could have intermittent/unreliable connections.
-
8/3/2019 Simulation, Block Diagrams and Feedback Control
10/35
ME 244L Prof. Raul G. LongoriaDynamic Systems and Controls Laboratory Department of Mechanical EngineeringThe University of Texas at Austin
Modern (digital) implementations
Dont have the advantage of speed, but much
more versatile, reliable, etc.
Many implementations:
Boeing EASY5 (now owned by MSC) Matrixx (now owned by National Instruments)
Matlab/Simulink
National Instruments LabVIEW (Sim. Module)
(others)
-
8/3/2019 Simulation, Block Diagrams and Feedback Control
11/35
ME 244L Prof. Raul G. LongoriaDynamic Systems and Controls Laboratory Department of Mechanical EngineeringThe University of Texas at Austin
-
8/3/2019 Simulation, Block Diagrams and Feedback Control
12/35
ME 244L Prof. Raul G. LongoriaDynamic Systems and Controls Laboratory Department of Mechanical EngineeringThe University of Texas at Austin
EASY5 allows you to integrate models built in different waysthey did this
early! (c. 1980s?)
-
8/3/2019 Simulation, Block Diagrams and Feedback Control
13/35
ME 244L Prof. Raul G. LongoriaDynamic Systems and Controls Laboratory Department of Mechanical EngineeringThe University of Texas at Austin
Matlab/Simulink
SourcesControllers
Basic linear Nonlinear Logical
Example: basic feedback diagram
The Matlab/Simulink environment
provides a way to implement block
diagram models directly for analysis
and simulation. These are just someof the basic elements available.
These types of operators are common in most
block diagram simulation environments (EASY5,
Simulink, LV Simulation. etc.)
-
8/3/2019 Simulation, Block Diagrams and Feedback Control
14/35
ME 244L Prof. Raul G. LongoriaDynamic Systems and Controls Laboratory Department of Mechanical EngineeringThe University of Texas at Austin
Quick LabVIEW Demo
-
8/3/2019 Simulation, Block Diagrams and Feedback Control
15/35
ME 244L Prof. Raul G. LongoriaDynamic Systems and Controls Laboratory Department of Mechanical EngineeringThe University of Texas at Austin
Building the sphere model
-
8/3/2019 Simulation, Block Diagrams and Feedback Control
16/35
ME 244L Prof. Raul G. LongoriaDynamic Systems and Controls Laboratory Department of Mechanical EngineeringThe University of Texas at Austin
How do you build a block diagram?
Derive the complete state equations (as you are
learning to do in ME 344)
Identify an integrator for each first order
equation have as many integrators as states
Use summers to form the algebra (add up the
RHS)
Form the terms that go into your summers byusing states being solved and inputs
-
8/3/2019 Simulation, Block Diagrams and Feedback Control
17/35
ME 244L Prof. Raul G. LongoriaDynamic Systems and Controls Laboratory Department of Mechanical EngineeringThe University of Texas at Austin
Example: Pushrod-lifter
State equations:
3 states1 input
-
8/3/2019 Simulation, Block Diagrams and Feedback Control
18/35
ME 244L Prof. Raul G. LongoriaDynamic Systems and Controls Laboratory Department of Mechanical EngineeringThe University of Texas at Austin
Block DiagramNOTE: Most block diagramsimulation programs include
a STATE-SPACE element
that can be used if you have
those equations.
-
8/3/2019 Simulation, Block Diagrams and Feedback Control
19/35
ME 244L Prof. Raul G. LongoriaDynamic Systems and Controls Laboratory Department of Mechanical EngineeringThe University of Texas at Austin
Feedback Control Systems
We introduce the basic concept of feedback
control, which takes advantage of measuredfeedback and error measurement to adjust
system action for a specified purpose.
E R Y = R
Y
+
-
8/3/2019 Simulation, Block Diagrams and Feedback Control
20/35
ME 244L Prof. Raul G. LongoriaDynamic Systems and Controls Laboratory Department of Mechanical EngineeringThe University of Texas at Austin
Identifying Feedback in Automatic
Feedback Control Systems*
The purpose of a feedback control system is to carry
out commands; the system maintains the controlledvariable equal to the command signal in spite of
external disturbances.
System operates as a closed loop with negativefeedback.
The system includes a sensing element and a
comparator, at least one of which can bedistinguished as a physically separate element.
*O. Mayr (1970)
-
8/3/2019 Simulation, Block Diagrams and Feedback Control
21/35
ME 244L Prof. Raul G. LongoriaDynamic Systems and Controls Laboratory Department of Mechanical EngineeringThe University of Texas at Austin
Float regulator (c. 280 B.C.)In his book, Mayr analyzes all types of
historical feedback control systems using
block diagrams.
-
8/3/2019 Simulation, Block Diagrams and Feedback Control
22/35
ME 244L Prof. Raul G. LongoriaDynamic Systems and Controls Laboratory Department of Mechanical EngineeringThe University of Texas at Austin
D. Macaulay (CD-ROM)
Does the governor in this toy control the mouse
speed in a feedback sense?
-
8/3/2019 Simulation, Block Diagrams and Feedback Control
23/35
ME 244L Prof. Raul G. LongoriaDynamic Systems and Controls Laboratory Department of Mechanical EngineeringThe University of Texas at Austin
Classification of control systems Open-loop the output has no effect on the control
action Closed-loop use of feedback to guide control action
Analog vs. Digital - refers to the difference in
implementing the controller, typically electronically Classical vs. Modern
Classical control usually refers to SISO (single-input/single-output) systems
MIMO (multiple-input/multiple-output) is concerned withcontrol of systems having more than one controlled variablewith possibly more than one control input
ME 364L
ME 384Q
-
8/3/2019 Simulation, Block Diagrams and Feedback Control
24/35
ME 244L Prof. Raul G. LongoriaDynamic Systems and Controls Laboratory Department of Mechanical EngineeringThe University of Texas at Austin
Open-Loop Control The output is not compared with the reference
(desired) signal/input
Susceptible to large errors due to:
Disturbances
Variation in the system parameters
Examples
Timed processes (e.g., toasters, most dryers, etc.)
In vehicle systems, many traction/braking systems
and steering systems are clearly open-loop
-
8/3/2019 Simulation, Block Diagrams and Feedback Control
25/35
ME 244L Prof. Raul G. LongoriaDynamic Systems and Controls Laboratory Department of Mechanical EngineeringThe University of Texas at Austin
Closed-Loop Control
Controller Plant
Sensor
Error
Signal
ReferenceSignal
+
++
Disturbance
Output
Feedback Signal
Plant any physical system to be controlledController can generate inputs to the plant to achieve a desired objective
Sensor means by which plant output is transformed to feedback information
We try to represent control systems using block diagram descriptions. This is
the standard form.
-
8/3/2019 Simulation, Block Diagrams and Feedback Control
26/35
ME 244L Prof. Raul G. LongoriaDynamic Systems and Controls Laboratory Department of Mechanical EngineeringThe University of Texas at Austin
Transfer functions Linear feedback controls make use of transfer functions. Note that SISO feedback does NOT have to be formed by linear
elements only. You can have nonlinear elements (later).
The transfer function of a linear, time-invariant, differentialequation system is defined as the ratio of the Laplace transformof the output to the Laplace transform of the input under theassumption that the initial conditions are zero.
zero initial conditions
1
1 1
11 1
[output]( )
[input]
( )
( )
m m
o m m
n no n n
G s
b s b s b s bY s
U s a s a s a s a
=
+ + + += =
+ + + +
L
L
A TF is aproperty of a system and independent of any input.
-
8/3/2019 Simulation, Block Diagrams and Feedback Control
27/35
ME 244L Prof. Raul G. LongoriaDynamic Systems and Controls Laboratory Department of Mechanical EngineeringThe University of Texas at Austin
Quick TF
Derivationfor MKD
Mass (M)
Spring (K)
Damper (D)
system
-
8/3/2019 Simulation, Block Diagrams and Feedback Control
28/35
ME 244L Prof. Raul G. LongoriaDynamic Systems and Controls Laboratory Department of Mechanical EngineeringThe University of Texas at Austin
Response of MKD to Force Input
2
1
ms bs k + +( )F t ( )x t
oF
onT
( )F t
t
Step function turns on at Ton
Implement in LV simulation
-
8/3/2019 Simulation, Block Diagrams and Feedback Control
29/35
ME 244L Prof. Raul G. LongoriaDynamic Systems and Controls Laboratory Department of Mechanical EngineeringThe University of Texas at Austin
Effect of Closing the Loop Advantages:
Provides for disturbance rejection
Reduces sensitivity to parameter variations
Use error signal for dynamic tracking
Enhance accuracy, extend bandwidth, etc.
Disadvantages:
Can lead to oscillation or instability
-
8/3/2019 Simulation, Block Diagrams and Feedback Control
30/35
ME 244L Prof. Raul G. LongoriaDynamic Systems and Controls Laboratory Department of Mechanical EngineeringThe University of Texas at Austin
Closed-Loop Control Model
r e u
-
+
( )cG s
errorcontroller
( )pG s+
( )H s
du
sy
mu
y
plant
measurement
1 1
p c p
d
c p c p
G G G y u r
G G H G G H = +
+ +
In ME 344 and ME 364L you learn how to analyze control systems, using block
diagram algebra to derive expressions for the closed-loop response in the form,
-
8/3/2019 Simulation, Block Diagrams and Feedback Control
31/35
ME 244L Prof. Raul G. LongoriaDynamic Systems and Controls Laboratory Department of Mechanical EngineeringThe University of Texas at Austin
Example:Closed-Loop Speed Control of a Gas Engine
( )R s e eT
-
+ 1
1 1
K
s +
Throttlecontroller
2 ( )G s
+
( )H s
dT
tT ( )C s
Engine Dynamics
measurement
1 2
1 21
C G G
R G G H = +
1( )G s
Speed
Ignore disturbance for now,
2
2 1
K
s +
1
1ms +
1
2
1sec
4sec
0.5secm
=
==
1
2
?
0.2
K
K
=
=
Note, sometimes the
values are easy tomeasure and form
basis of this
simplified model.
-
8/3/2019 Simulation, Block Diagrams and Feedback Control
32/35
ME 244L Prof. Raul G. Longoria
Dynamic Systems and Controls Laboratory Department of Mechanical EngineeringThe University of Texas at Austin
Basic Control Actions Proportional (P) control
Integral (I) control
Derivative (D) control
Combination: PI, PD, PID
( )cG s( )E s ( )U s
Most industrial controllers (well over 90 to 95%) you will
run across will be of a PID type.
-
8/3/2019 Simulation, Block Diagrams and Feedback Control
33/35
ME 244L Prof. Raul G. Longoria
Dynamic Systems and Controls Laboratory Department of Mechanical EngineeringThe University of Texas at Austin
Proportional Control( )cG s
( )E s ( )U s
( ) ( )
p
p
u K e
U s K E s
=
=
( ) constantc pG s K= =
2
1X
F ms bs k =
+ +
Plant model
2
stiffness
1
1 1 1
p p pc
R p p p
K G K X GH
X GH K G ms bs k K
= = =
+ + + + +
Closed-loop
Control
-
8/3/2019 Simulation, Block Diagrams and Feedback Control
34/35
ME 244L Prof. Raul G. Longoria
Dynamic Systems and Controls Laboratory Department of Mechanical EngineeringThe University of Texas at Austin
Other Basic Forms( ) ( )I II I
K Ku edt U s E s
T T s= =Integral control:
Integral control reduces or eliminates steady-state error, but has
reduced stability.
( ) ( ) D D D Dde
u K T U s K T sE sdt
= =Derivative control:
Derivative control yields an increase in effective damping,improving stability.
PID control:1
( ) 1 ( )DI
U s K T s E sT s
= + +
Most common in practical application.
Tuning required (Ziegler-Nichols)
Note on implementing
this with ODEs forsimulation.
-
8/3/2019 Simulation, Block Diagrams and Feedback Control
35/35
ME 244L Prof. Raul G. Longoria
Dynamic Systems and Controls Laboratory Department of Mechanical EngineeringThe University of Texas at Austin
Summary Reviewed block diagram descriptions of system
models and control systems Described examples of how these methods are
used in industry/military applications
A quick demonstration of the LabVIEW
Simulation Module environment