University of Kwazulu-Natal School of Electrical, Electronic and Computer Engineering Systems and Simulation - Enel3Ss 0) Introduction
University of Kwazulu-Natal School of Electrical, Electronic and Computer Engineering Systems and Simulation - Enel3Ss 0) Introduction
0) INTRODUCTION
This is a first contact course in control systems. The broad aim of the course is to develop skills in
understanding the behaviour of physical dynamic systems and to understand the engineering tools
required for design of control systems. Specifically, we will cover the following main sections:
1) Modelling: We will develop the model of a physical system by writing down sets of first
order differential equations. The time varying variables of such a model are called the state
variables. The study of systems that are represented as state space models allows a very
fundamental understanding of system behaviour to be developed. State space
representations are used for system modelling and understanding, for computer simulation
and for controller design. We will start of with general (non-linear, time varying) models
but will focus on linear or linearised, time invariant systems.
3) Linearisation and linear systems: Many problems either are linear or can be linearised. Our
interest in obtaining linear problems is that there are very powerful methods available for
analysing and designing linear systems. We will investigate the time response of linear
systems and the application of the Laplace transform to solving the differential equations.
4) Input-output descriptions of linear systems: In many cases we are more interested in the
input and output variables of a system than in the internal (or state) variables. As a result
we will investigate the input-output properties of systems and the output response of
systems to sinusoidal input signals. We will develop some understanding of the
relationship between the time domain behaviour and the frequency domain behaviour of
systems.
5) Discrete time and sampled data systems: The very widespread use of computer hardware
means that it is important to understand the behaviour of systems when part of the system is
digital hardware interfaced to the “real world” by A/D (analogue-digital) and D/A
converters.
A fundamental principle in nature is that of conservation. Certain quantities in nature such as mass
and energy are conserved in the sense that they do not vanish without explanation. If we define a
physical system that is of interest to us by means of its boundary, the law of conservation is that the
rate of increase of a conserved quantity within the system is the rate at which that quantity crosses
the system boundary plus the rate of manufacture/transformation of the conserved quantity within
the system.
System
Crossing boundary
boundary
manufacture/
transformation
dQ
= Γboundary + Γmanufacture
dt
Q is the conserved quantity of interest. Γboundary is the rate at which the conserved quantity crosses
the boundary into the system (Γboundary<0 ⇔ conserved quantity is leaving the system). Γmanufacture is
the rate at which the conserved quantity is manufactured/transformed from other quantities within
the system. In many processes there is no manufacture but we should look out for both
mechanisms.
Examples of conserved quantities: mass (of components or total), energy (kinetic, potential, heat,
chemical or total), sum of total mass and energy (generalised energy) in nuclear reactions, number
(of people, bank balances etc.).
Examples of unconserved quantities: temperature, pressure, value of money, social worth of people.
From
Workspace1
time_out
Clock To Workspace1
Modelling is an important interest of this course and like most things, it is best learned by practice,
the main learning of system modelling will be by tutorial work. We will apply knowledge from
many branches of science and engineering and the final model will be based on exact conservation
laws and empirical/phenomenological observations. The model can usually be refined if it is found
that the reality and the model do not have satisfactory agreement and can simplified by omitting
secondary effects if it is found too cumbersome for the application and if the application can
tolerate lower fidelity. We will use the modern simulation tools that are available to validate and
visualise our model.
We will generally obtain for lumped parameter systems models in the form,
t is the time
x is the [n×1] state vector (of state variables)
u is the [m×1] input vector
y is the [p×1] output vector
f is an [n×1] non-linear, time varying vector equation with elements fi
g is a [p×1] non-linear, time varying equation with elements, gi
When we develop models of dynamical systems in this course, the model equations should always
be given in the form of eq(1) with the state, input and output variables clearly identified.
uin
Example 2 - Level in a cylindrical drum
An example would be a boiler drum.
R h uout
L
Systems & Simulation - ENEL3SS 3
SS1_1.DOC
The volume is, (show this!)
V = L R 2 arcsin(1 − h / R ) − ( R − h) 2 Rh − h2
also,
dV = 2 L 2 Rh − h2 dh
We can write the model using either the height or the volume as the state variable. (Remember
dh dV dV
that the mass and therefore the volume, is the conserved variable.) Recall that = and
dt dt dh
because solving for h as a function of V may be messy, we would prefer to use h as the state
variable. We get,
dh
= ( uin − uout ) 2 L 2 Rh − h2 state differential equation
dt
h=h algebraic output equation
1/sqrt(2*1*u-u^2)
From
Workspace1 1/(dV/dh)
time_out
Clock To Workspace1
(v air − v ball )2
The ball experiences upward force as a result of drag, f up = c d Aρ . A is the ball
2
cross sectional area, cd is the drag coefficient, ρ is the density of the air. This is also an empirical
law, supported by theoretical investigations. We do not necessarily have to understand the cross-
disciplinary engineering behind empirical laws but they must be plausible i.e. they must make
sense!
u(t)
2
− v ball
dv ball 1 (h + α )2
= c d Aρ − mg
dt m 2
state differential equation
dh
= v ball
dt
(m is the mass and g the acceleration due to gravity.) Let us say that we are interested in the kinetic
energy of the ball and its height as outputs:
mv2ball
E= algebraic output equation
2
h=h
f(u) k_energy
Fcn2 To Workspace4
velocity
To Workspace3
height
To Workspace1
time
Clock To Workspace
Fcn = u(1)/(u(2)+0.02)^2-u(3)
Fcn1 = 0.44*1.205*0.01875^2*pi/2.5e-3*u^2*sgn(u)/2-9.8
dC S/V
= µ max C cell growth
dt S / V + Ks
dS S/V
= − γ µ max C + uin substrate conservation
dt S / V + Ks
-0.1*u(1) 1/s
Fcn1 substraste
Graph1
Simple model is a predator-prey model (human CD4+ cells are the prey) and anti-retroviral drugs
are a control. The drugs are never 100% effective and the real system is very complicated.
Model:
dT
= s + pT (1 − T / Tm ) − δ T T − βVT
dt
dT1
= q1 βVT − δ 1T1 − kT1
dt
dT2
= q 2 βVT − δ 2 T2 + kT1
dt
dV
= Nδ 2 T2 − cV1
dt
State variables, x = [T, T1, T2, V]T are concentrations of uninfected CD4+ cells, latently infected
CD4+ cells, actively infected CD4+ cells, and free virus particles respectively.
The two classes of commonly used anti-retroviral agents are Reverse Transcriptase (RT) Inhibitors
and Protease Inhibitors (PI). Both agents work within the CD4+ T cell because they cannot prevent
the virus from entering the cell. Reverse Transcriptase Inhibitors reduce successful infection of the
CD4+ T cell by the virus by reducing the values of q1 and q2. Perfect inhibition would occur if the
rates were zero but in practice, perfect inhibition is not attainable. Protease Inhibitors block the
protease enzyme so that the virus particles that are produced are mostly non-infectious. There are
therefore two types of virus particles when protease inhibitors are used. The first type is the
infectious virus particles that still continue to infect CD4+ T cells and the other is the non-
infectious type. Similarly, perfect inhibition occurs when all virus particles that are produced are
noninfectious. Current therapies use a combination of Reverse Transcriptase and Protease
Inhibitors and the combined therapy model can be presented as,
Comments
1) Build the model in Simulink and test its performance at various values of 0 < µ• ≤ 1.
2) No drug has µ• = 0 and µ• depends on patient, drug and virus.
3) CD4+ cell counts of around 200/mm3 are regarded as critically low levels.