Sei sulla pagina 1di 59

ACS124 Modelling, Analysis and

Control (Week 1)
Concepts used in modelling
Anthony Rossiter
Department of Automatic Control and
Systems Engineering
1
REMARKS
Students to modelling in ACS125 so these
notes are simply a summary of some good
practice that may be useful.
The modelling required for ACS124 is
relatively simple and thus short cuts the need
for much of this.

2
SYSTEMATIC APPROACHES
TO SYSTEMS MODELLING
NOTE: ACS124 discusses modelling briefly and takes a
broad perspective looking for analogies between different
systems as this underpins systems’ behaviour. The main aim
is for students to understand where models have come from,
even if the fine detail is not understood immediately.

Detailed modelling of specific systems is a learning outcome


of other modules and students will cover those in due course.

NEXT FEW SLIDES ARE TYPICAL BOOKWORK


PARTS TO EXAM QUESTIONS 3
Types of system
1. Physical
2. Chemical Could this be an
3. Biological aeroplane?
4. Ecological
5. Economic
6. Computer What about artificial
7. Control limbs?
8. Etc.
Systems involve interconnections of different subsystems.
Broad based knowledge is essential.
This module focuses on understanding the smallest parts.
While main examples in ACS124 are mechanical/
electrical/ fluid systems, the general principles can be
applied very widely. 4
ENVIRONMENT

A typical
system
architecture Input Disturbances

Manipulable System
Inputs Entity 1 Entity 3

Entity 2 Entity 4

Characterise the
different Initial
attributes that Controller
Conditions

may appear in a
system.
Outputs
5
System attributes
1. Entities or components
2. Interconnections
3. Inputs (adjustable or uncontrolled)
4. Dependent variables
5. Initial conditions
6. Outputs and states
7. Reasons for existence
8. Control (e.g. adjust 3 so 6 achieves 7)

A logical 1st step when analysing or designing a system is to


identify all its attributes. 6
Inputs and outputs
Inputs Outputs
Dynamic System:
Parameters
State Variables

System interacts with environment through two group variables:

1. INPUT VARIABLES or INPUTS originate outside the system and


are not directly dependent on what happens in the system.

2.OUTPUTS generated by the system as it interacts with the


environment
In mathematical terms, inputs are ‘independent variables’ and7
outputs are ‘dependent variables’.
Environment
1. Everything outside the system which affects the system
but is unaffected by the system.
2. Where to separate the system from the environment is
not always clear and requires judgement.
Give some examples here:

8
Environment examples
• A spacecraft is affected by the gravitational pull of a
nearby planet but its pull on the planet, although real, is
sufficiently small to be ignored for spacecraft trajectory
prediction.
• A short-circuit to earth of a mains cable from an
electricity generator may be considered to have negligible
effect on the potential of the earth itself.
• Power consumption of a freezer is effected by the
environment, the freezer system can not be treated in
isolation from the external temperature. Although a
freezer does heat up its environment, this effect is usually
negligible.
• A aeroplane is affected by the wind but does not change
the wind pattern.

What other examples can you think of? 9


Attributes
List the components,
inputs, outputs, states,
purpose, connections
and environment for
the following systems.
1. Artificial heart
2. Car
3. Robot arm
4. Aileron
10
Summary of physical modelling
1. Fundamental laws of physics apply to ideal
entities.
2. Real system usual comprise physical entities and
connections, but are imperfect.
3. Approx. is essential to decide on numbers of
interconnections, entities, etc. that might
represent the system.
4. Formulate all the equations describing the
‘ideal’ system and manipulate into a suitable
form.
11
What are models used for?
1. To predict behaviour of real system
2. To avoid risk and expense

Models take many forms: Scaled physical


models, laboratory models, pilot plant,
computer models, mathematical models,
etc.
ACS124 focuses on mathematical models.
12
Independent work for students
How would you derive simple models for the following to analyse
behaviours and tracking?
1. A human leg?
2. A DC servo (work horse of industry).
3. A robotic arm?
4. An autonomous vehicle?
5. Children’s toy car with gearing.
6. Blood flow in a series of arteries driven by an artificial heart.
7. Flap position on an aircraft in flight [see foxton].

Text books (e.g. Nise chapter 3 and others) are full of examples of
models for real scenarios. Have a look at some of these. 13
Typical exam questions
What are the analogies between mechanical systems
and electrical systems. Give several examples to back
up your answer.

Why are modelling skills important for engineers?

Model simple systems from first principles.

What are the key attributes of a model to consider?

14
Cruise control
Cruise control allows a driver (or
indeed a pilot) to focus on other Perhaps I’ll
aspects of the road. make it up to
20mph today!
How do we model car speed and
hence design the appropriate
control law?
Assume fixed gear.

15
Cruise control - modelling
Acceleration depends on mass and supplied engine torque and drag.
Torque is translated to linear force on the road. Drag depends on speed
and don’t forget the slope of road!
Let mass M be 1000kg and drag be 100v, where v is the speed and
maximum engine force be 5M.
dv
M  Bv  Kf  Mg sin  ; 0  f  1; g  10
dt

dv
10  v  50 f  10 sin 
dt

16
Cruise control - modelling
Earlier slides gave a model for vehicle velocity as follows (assuming
M=1000kg and drag force is 100v).

M dv M
 v  50 f  10 sin  ;  10
B dt B
5 sin 
v( s)  f
s  0.1 s  0.1

What is the impact of


encountering a slope or
extra passengers?

17
Equivalent block diagram
representation
Ki 1
F ( s)  ( K p  ); G( s)  ; K ( s)  K ; H ( s)  1
s Ms  B
disturbance  Mg sin 

18
Questions on cruise control
• How fast do we need the • Does the vehicle track speed
system velocity to move demands with just
(respond)? proportional control.
• Is overshoot or oscillation – How is this affected by
allowable? changes in slope?
• What limits are there on – How is this affected by
supplied power? changes in engine power?
• How do you design a feedback – With a non-zero slope,
loop to help modify the what is the impact of
dynamics? mass?
• What are differences with and • What is the impact of integral?
without an integrator? • How does engine power effect
• How does uncertainty (e.g. response shapes with same
slope) affect the behaviour? compensator? 19
Scenario
Cruise control is used to control the engine power output to
achieve a desired speed.
1. Model dependence of vehicle speed on engine output.
2. Model impact of control law on engine output.
3. Allow variability on car mass, engine size (max power)
and slope of road.
Speed change should be smooth and not oscillatory. Assume
a simple dynamics with an accelerating inertia M, some
friction with constant B and gravity effects (depends on
slope of road θ).
Let engine max power be K.

20
Impact of pain relief medicine
A severely injured patient is on an
intravenous drip to deliver pain relief.

The pain relief R delivered is proportional to


the concentration C of drug in the blood. R  aC
The drug is absorbed at a rate proportional dC
 S  kC
to its concentration minus the rate of supply. dt

Derive a model for this system and propose


a control law to maintain constant relief of
R=3 given a=6000, k=7200.
21
How do we model the rate of
pitch of an Aircraft?
Key data and equations are likely to be:
1. Moment of inertia of aircraft J.
2. Lift generated by different wing surfaces and
distance from centre of gravity. [Ignore air
friction]

More details in 22
lecture. C of G
How do we model the rate of
pitch of an Aircraft?
1. Angular acceleration α is given by. J  
2. Torque is given as lift times
d 2
distance from C of G.  2
3. Net torque must be returned to zero dt
or plane cannot settle at a fixed
pitch! Vary lift at
tail plane
to achieve
desired
torque
balance.
23
How do we model the rate of
pitch of an Aircraft?
Space for student notes.

24
Model the rate of climb (or
descent) of an Aircraft?
1. Entities or components
2. Interconnections
3. Inputs
4. Dependent variables
5. Initial conditions
6. Outputs and states
7. Reasons for existence
8. Control.
25
How do we model the rate of
climb (or descent) of an Aircraft?
Key data and equations are likely to be:
1. Mass of aircraft M.
2. Dependence of lift L on forward speed v, angle

L  kv
of attack, profile and air density. 2

If lift exceeds weight, aircraft climbs (vertical


speed is z) using Newton’s law.
Bz is friction term. dz
Do a free body diagram to
M  Mg  Bz  L
confirm this.
dt 26
How do we model the rate of
climb (or descent) of an Aircraft?
Find model given the data:
Key data and equations are: M=20000kg, v=150m/s,
kρ=1, B=30000Ns/m.

dz 200 dz 152  2000 17.75


M  Bz  kv  Mg
2
300 dt
z
300

3
dt 27
Model the temperature of a
baby in an incubator?
1. Entities or components
2. Interconnections
3. Inputs
4. Dependent variables
5. Initial conditions
6. Outputs and states
7. Reasons for existence
8. Control.
28
Model the temperature of a
baby in an incubator?
We need to know:
1. The external temperature Te.
2. The rate of heat transfer through the walls of the
incubator. [Likely given as k(T-Te)]
3. The heat generated by the baby and any heater inside
the incubator. [Inputs=B+We]
4. The mass/specific heat of the incubator and the baby.
[heat stored = CT].
Heat flow in – Heat flow out = Rate of change of heat stored
dT
B  We  k (Te  T )  C
dt 29
Model the temperature of a
baby in an incubator?
Analyse the temperature profile given the data;
Te=20, T(0)=30, B=50W, k=10W/deg,
C=8000J/deg, We=100W.
Is the baby comfortable? If the baby was cold,
would they warm up quickly enough?
dT 8000 dT
50  100  10(Te  T )  8000   T  15  Te
dt 10 dt

30
Aeroplane roll
Derive the ‘expected’ model for aeroplane roll.
You can use that the lift on each wing is affine
in the angle of the ailerons (which move in
opposite directions). It is probably easier to use
deviation variables, that is
distance from steady-state.

31
Aeroplane roll (continued)

32
Aeroplane roll (continued)
You have shown that the model for roll is:
φ is roll angle d δa is aileron
rate in radians T    k a angle in radians
dt
where k, T depend on the airplane inertia and the relative change in
lift when moving the ailerons. For different types of aeroplane,
what values would you expect T, k to take and why? What is the
impact of different aileron areas?

33
Analogies
• What analogous systems can you come up
with?
• Why are these analogous?
• Why does it help to understand analogies?
• Which variables and components are
analogous and why?

34
Analogies
What analogies are there between 1st order electrical and mechanical
systems?

dq q
Resistor+capacitor (in series) vR 
dt C
dx
Damper+spring (parallel) f  B  kx
dt
di
Resistor+inductor (in series) v  L  iR
dt
dv
Damper +mass (parallel) f M  Bv
dt
The models have the same structure, and only differ because
they have different variables (states, inputs, outputs). 35
Reminders of analogies
Force Voltage
Velocity Current
Displacement Charge
Spring Capacitance
Mass Inductance
Damper Resistance
Parallel Series
Series Parallel
36
Analogous first order Systems
Mass under action of force F and friction
dV b 1
 V  F
dt m m

dq q U C
  U
dt CR R

dTin
Ch 
1
Tout  Tin   u(t)
dt R
dTin T T
Ch  in  out  u(t)
dt R R
Generic 1st order ODE models
These dx
models can cf  b  ax
be re- dt
formatted
into standard b dx a dx
forms. f   x   x
c dt c dt
The most
c b dx dx
appropriate
standard
f   x or kf  T x
form will
a a dt dt
depend on c dx a dx
what analysis f   x or Kf   px
is desired. b dt b dt 38
Normal procedure
1. Convert model to a standard form.
2. Apply known solutions for standard forms.
3. Scale solution if required back into original
variable space.
dx dx
kf  T  x or Kf   px
dt dt
Time constant form Pole/zero form

More on this in later lectures! 39


Modelling case studies
MOLE includes a large number of slides of
different engineering systems. These are
provided to encourage students to think more
about modelling in general and, how and where
as an engineer, they might need to do this?
This module does not have space to teach or assess
so many different case studies, but instead
focuses on what is common – where systems
have analogous models they will have analogous
behaviour!
40
Loop analysis question for class
You are given that a process can be represented by G(s) and
feedback control law by K(s). Find the closed-loop transfer function
between the target and the output.
3
G( s)  ; K ( s)  4;
( s  1)( s  2)
How do we model the rate of
climb (or descent) of an Aircraft?
Taking the model from earlier slides, you are given
that the angle of attack θ is a control input and kρ =
1+25θ. [Assume v is constant]

200 dz k152  2000


 Bz 
300 dt 300
First change the model into deviation variables and
hence draw a block diagram with transfer function
models to represent this scenario.

2 dh 152       o
h ; 42
3 dt 12 h  z  zo
How do we model the rate of
climb (or descent) of an Aircraft?
Analyse the impact of a control law θ =K(r-z),
where r is the desired rate of climb.
What K would you choose and why? Does this lead
to realistic values for angle of attack?

43
Model the temperature of a
baby in an incubator?
Given the model derived earlier, a control law is
added of the form We=k(Td-T), where Td is the
desired temperature. Analyse this control law and
comment. [Deviation variables may help.]

8000 dT We
T   5  Te ; Te  25
10 dt 10

44
Model the temperature of a
baby in an incubator?
It is decided to use purely integral control.
Propose a suitable integral control law of the
form We(s)=k(Td-T)/s.

45
Level control

Modelling, analysis and control

Taken from slides provided for essay


assignment

46
Modelling 1
1. The flow out will depend
upon the pressure in the tank f out  [ Rg ]h
which depends upon the
dh
 f in  f out
depth (and a constant linked
to density and pipe shape). A
2. The rate of change of depth dt
will depend on the cross-
dh
sectional area.
3. The rate of change of depth
A  [ Rg ]h  f in
will depend on the difference dt
between flow in and out.
4. Resulting transfer function,
0.02
assuming some numbers
h( s )  f (s)
(A=50 and rg=1).
47 s  0.02
Adding control
An observer monitors the depth and modifies the
flow in to keep the depth at the target level.
Hence the flow in is determined from the
standard proportional law (Use Kp=1) .

f in  K p (r  h)

48
Closed-loop dynamics
The control law needs to be included in the model.

GK 0.02 0.02
 
1  GK 0.02  ( s  0.02) s  0.04
The time constant is 25 seconds which is OK, but clearly
the closed-loop steady-state gain is only 0.5, and thus
there is a large offset.
Try this on the GUI to confirm.

49
50
Adding integral control
Hence the flow in is determined from the
standard proportional + integral law (Use
Kp=1, Ki=0.1) .
t
f in  K p (r  h)  K i  (r  h)dt
0

Ki ( s  0.1)
f ( s )  ( K p  )( r  h)  ( r  h)
s s

51
Closed-loop dynamics
The control law needs to be included in the model.

GK 0.02( s  0.1)

1  GK 0.02( s  0.1)  s( s  0.02)
The closed-loop poles are given from

pc  0.02( s  0.1)  s( s  0.02)  s 2  0.04s  0.002

Complex poles – behaviour covered in semester 2.


However GUI can be used to show that offset has been removed.
52
Also clear that closed-loop steady-state gain is now 1!
53
Temperature control

Modelling, analysis and control

Taken from slides provided for essay


assignment

54
Modelling
Model in terms of offset variables,
that is measure everything relative
T  Ti  To
to the external temperature. dT
C  Win  Wout
Use C=4000000, k=1000, dt
Wout  kT
1
T (s)  Win
4000000s  1000
OFFSET:
55 If To=10, then T of 10 is equivalent to Ti of 20 degrees!
Control law
With Kp=600, Ki=0.3;
Use a PI control law
t
Win  K p (Td  T )  K i  (Td  T )dt
0

600 s  0.3
K (s) 
s

56
Using Laplace approaches
1 Ki
T ( s)  Win ; Win  ( K p  )(Td  T )
Cs  k s
(K p s  Ki ) (600 s  0.3)
GK  
s (Cs  k ) s (4 106 s  103 )
GK K
T Td ; Win  Td
1  GK 1  GK
(600s  0.3)
Gc 
s (4 106 s  103 )  (600s  0.3)
(600 s  0.3)
Gc  2
s (4 106 )  s (600  103 )  0.3
57
Running simulation yourself
On the foxton folder run the file
housetempanimation.m

Investigate the effects of having no integral


component as well as with a PI!
Also, does the behaviour given match what you
expect from the closed-loop? Experiment with
different parameters.
58
59

Potrebbero piacerti anche