You are on page 1of 18

9/17/2015

Contents
ELEC-E8101 Digital and Optimal Control
(5 cr), autumn 2015 • Introduction, discrete-time control problem, the z-transform
• Discrete-time systems, properties and analysis
Lectures • Controller design: pole placement by state space methods
Fridays at 12.15-14.00, room AS2 • PID-controller and its discretized versions, the sampling theorem,
choosing the sampling interval
Lecturer: Kai Zenger, TuAS-house, room 3567,
• Discrete approximations of continuous-time controllers
kai.zenger(at)aalto.fi • Stochastic disturbance models
Exercise hours • Optimal prediction and minimum variance control
Wednesdays at 14.15-16.00 room Tu 1 AND • Dynamic programming
Thursdays at 16.00 – 18.00 room AS3 (problem solving help, • Linear quadratic controllers (LQ, LQG); discrete-time and
continuous-time cases
questions, doing exercises with friends., informal,
”Laskutupa”)

Assistants:
Juho Lindholm, e-mail: juholind(at)mappi.helsinki.fi
Jyrki Parkkinen, jyrki.parkkinen(at)aalto.fi

• Intermediate exams are suggested to pass the course. They are


• Passing the course: Final exam or two intermediate exams.
organised during the last week of each lecture period (2 hours).
• Final exam: maximum 30 points (5 problems, max 6p. each).
• During the second exam time you can choose, after seeing the
Alternatively two intermediate (Mid term) exams. Each has three
problems, whether you want to do intermediate exam or full exam.
problems, max. 5p./problem. Maximum of the two intermediate exams
30 p.
• The full exams later are three hours in lenght; otherwise they are
similar to the full exam during the lecture period. In the full exam
• Bonus points of (not mandatory) homeworks.
8.2.2016 you can (re)do intermediate exam 1 or 2.
6 homework problems, altogether max 6 p.
• Bonus points and intermediate exam results are valid one year, until
• The bonus points are added to determine the final grade. The bonus
the course lectures start again (autumn 2016).
points are ”true bonus”, because the grade limits are not scaled up
because of the possibility to get bonus points.
Exams: Fri 23.10.2015 at 12:00-14:00 AS2 (intermediate exam 1)
• To pass the course 15 points is always enough. Otherwise the grade
Wed 9.12.2015 at 14:00-16:00 AS2 (intermediate 2, full exam)
limits can vary a bit.
Mon 8.2.2016 at 16:30-19:30 AS2 (full exam)
Mon 9.5.2016 at 16:30-19:30 (full exam)

Department of Automation and Systems


Technology

1
9/17/2015

• Please register to the course (oodi), if you have not done that already.
ELEC-E8101 Introduction
• You do not have to register to intermediate exams. Study material
• Lecture slides (in English, ordinary and print versions) in MyCourses
• You have to register to full exams, starting from the exam 8.2 2016. (mycourses.aalto.fi)
• Exercises with solutions (English) in MyCourses
• Important: Course substitutions: • Web learning environment (in Finnish):
- if you have done the old courses AS-74.2112 Digital control http://autsys.aalto.fi/pub/control.tkk.fi/Kurssit/Verkkokurssit/AS-
74.2112/index.html
AND AS-74.3123 Model-Based Control Systems, you do not have to do
ELEC-E8101 Digital and Optimal Control (it will be substituted by those two Note: The above old web course material is a good introduction, but does not
courses) cover the whole ELEC-E8101. It also contains some material (e.g. polynomial
controllers), which are not discussed in ELEC-E8101.
- if you have done only AS-74.2112 Digital control or only AS-74.3123 Model-
Based Control Systems, you have to do ELEC-E8101 Digital and Optimal • The lectures, lecture slides and exercises with solutions cover the whole
Control in a normal manner. The first part is however very similar to course. It is not absolutely necessary to purchase the book.
Digital Control course. If you know Digital control well, you can relax in • In each lecture, topics to read for the following session are given. Note: not all
the first period; it is suggested however that you do the homework slides are presented during the lectures; some are left for home study.
problems to get bonus points. • Homework assignments (six altogether) are given regularly. They appear in
MyCourses

Department of Automation and Systems


Technology

ELEC-E8101 Introduction Analog (continuous time) control


system
Books for support:
Process controlled by an analog controller
• Åström K. J., Wittenmark B.: Computer Controlled Systems
- Theory and Design (3rd ed.), Prentice-Hall, 1997. (textbook)

• Franklin, Powell, Workman: Digital Control of Dynamic


Systems. Third edition, Addison Wesley, 1998.
• Ogata: Discrete-Time Control Systems, 2nd ed., Prentice-Hall, 1994
• Kuo, B. C. : Digital Control Systems (2nd ed.), Oxford
University Press, 1992.
• Santina, M. S., Stubberud, A. R., Hostetter, G. H.:
Digital Control System Design, Saunders College Publishing, 1994.

2
9/17/2015

Digital (discrete, discrete-time) control


system To think about...

• The system contains both analog and discrete


u(tk ) u(t)
signals (a hybrid system)
r(tk ) +
e(tk ) y(t) • Basic problem already in analog control: how do you
_
Controller D/A Process treat these kinds of systems analytically?
• Are the traditional time domain and frequency
domain methods available now? Can they be
A/D modified?
y(tk ) y(t) • How do you design digital controllers? What should
be taken into account in implementation?

In A/D-block the analog signal is sampled ; in D/A-block the discrete-


time signal is changed into an analog one (hold).

To think about... An example of controller design (only an


• Is it so that a digital controller only imitates the example:no need to learn very carefully)
corresponding analog controller and the result is
somewhat worse then (due to loosing information in
discretization)? Controller design of a switched-mode power supply
(Buck-type; output voltage smaller than input)
• Do discrete-time systems have properties that the
corresponding analog systems do not have? The switch operates at high frequency, e.g. 100 kHz. By changing
the on/off time ratio of the switch (duty cycle) power is transferred
into load and the output voltage level is controlled.
• Yes, but this is not so simple: sometimes a discrete
controller can perform better than the analog one; on
the other hand dicrete-time systems have anomalies
that do not have a correspondence in the analog
world.

Department of
Automation and
Systems
Technology

3
9/17/2015

By connecting AC/DC power supplies in parallel, and providing


a battery for back-up a suitable power system for a Telecom load
(for example) is obtained.

Modern industrial power systems are complex and difficult;


System blocks are connected in series and in parallel. They are
provided with input filters (EMI), loads are changing and complex.

Systematic methods are needed = theory is needed!


A difficult multivariable system, MIMO = multiple Today’s magic buzzword is digitalization!
input, multiple output. C.f. SISO = single input, single output

Systems can be described by block diagrams PWM (pulse width


Negative feedback = feedback control, RC-circuit is the load. modulation) transforms the controller output signal to the duty
The output voltage is compared to reference, and a discrete-time cycle of the switch; basically that belongs to the operation of the
PID-controller is used to control the switch. actuator Input voltage. Vg and load current iload are disturbances
from control viewpoint. Robustness means the ability of the
controller to tolerate disturbances and modeling errors.

4
9/17/2015

By writing the dynamic equations of the system blocks the A lead/lag compensator has been designed for the process by using
performance can be studied. the Bode diagram as a design tool. The insufficient phase margin
(2 degrees) of the open loop has been improved to (50 degrees).
Stability must always be guaranteed.

   
1 s 1 l
 z  s 
Gc (s)  Gcm
s
1
p
Gcm  33.8, z10681 ( rad/ s)
l 1257 (rad / s), p 91106 (rad / s)

But the compensator can be approximated by a PID-controller: The control algorithm can be discretized directly for computer based
control (details are presented later in the course)

The operating frequency of the measurement and control are now


”new” concepts that must be considered. Here the sampling frequency
is 20 kHz meaning that the sampling time is 1/20000 s.

5
9/17/2015

The performance of the controller can be simulated. Below the


output voltage and inductor current are shown. The zoomed The performance can be made faster by changing the tuning of
figures show clearly the operation of the switch. the PID controller. That leads to increasing oscillations however.

Simulation
Controller design procedure
• To be used: Matlab/Simulink with different
toolboxes....
• Construction of the process model from • Control System Toolbox
physical equations or by identification. • Identification Toolbox
• The model analysis and linearisation when • Optimization Toolbox
needed; construction of the transfer functions • Model Predictive Toolbox
• Formulation of the control problem • Fuzzy Toolbox
• Controller design in time or frequency domain • Neural Networks Toolbox
• Discretization and implementation of the • Symbolic Toolbox
controller e.g. by a digital signal processor • Statistical Toolbox
(DSP)
• Comsol Multiphysics
• Alternatively: discretization of the process
model and controller design directly in discrete
time directly

6
9/17/2015

Challenges History of discrete-time systems


•2. world war, radars, computers, numerical computation
• Process knowledge
• Measurement technology •Pioneering period ~1955
• Computer technology –1 - 40 (1961) - 160 (1962) applications (supervisory-mode,
• Control Theory where setpoint values etc. are calculated to help the operator )
•DDC ~ 1962 (Direct Digital Control = computer controls the process
directly)
• in 1975 the first digital automation system (Honeywell TDC 2000)
•Programmable logic controllers (PLC) from the 70’s.
•Efficient signal procesors (DSP) from 90’s, embedded systems,
mechatronics
•Wireless automation, networks, energy technology, digitalization =
current trends
•New era: today and tomorrow belong to the digital age!

Process controlled by an analog controller Process controlled by a digital controller

u(tk) u(t)
e(tk) y(t)
r(tk) +
Controller D/A Process
_

A/D

y(tk) y(t)

7
9/17/2015

Two main design approaches: a. discretize the


Example (a): How to design a digital controller
analog controller, b. discretize the process and
do the design totally in discrete time based on an analog controller

Servoproblem, control of robot arm


a.
Process (double integrator):

Simple servo controller:

b.
Department of
Automation and
Systems
Technology

Example: How to design a digital controller


Example: How to design a digital controller based on an analog controller …
based on an analog controller …
A digital controller is derived from the analog one by replacing the
differential with difference By using the definition of the derivative

Multiplying by the Laplace-variable s corresponds to derivation Now t = kh and ∆t = h. Let us further use the shift operator
in time domain (derivation operator p) q (multiplying by q corresponds to moving forward in time;
division by q corresponds to moving backwards in time)

8
9/17/2015

Example: How to design a digital controller Example: How to design a digital controller
based on an analog controller … based on an analog controller …

The following approximative relationship between The “imitating” controller becomes


Laplace and Z domains is obtained

From the transfer function in Laplace domain an


approximative pulse transfer function in Z-domain is
obtained by replacing the Laplace-variable s with

Example: How to design a digital controller Example: How to design a digital controller
based on an analog controller … based on an analog controller …

Let us include also the dead-


beat-controller, which is Analog
based on digital control theory controller
and simulate the operation of compared to
the robot arm by each digital
controller. imitating
controller in
(Dead-beat-controller will be different
discussed during the course). sampling
frequencies

9
9/17/2015

Example: How to design a digital controller


based on an analog controller … Example (b): Synchronization

Continuous process (1. order low pass filter)


Analog
controller
compared to
the dead-
beat- The corresponding discrete-time filter by using the sampling
controller in time h = 1
different Details on how to obtain
H(z) are shown later
sampling
frequencies

Department of
Automation and
Systems
Technology

Example: Synchronization … Example: Synchronization …


Let us simulate both filters with the same input signal

10
9/17/2015

Example: Synchronization … z-transformation


With impulse and pulse inputs synchronization is even more
important A sequence for short or

The z-transformation is defined

Continuous systems: (differential equations/Laplace-


transformation)
Discrete systems: (difference equations/Z-transformation)

Example. Discrete time impulse Example. Discrete (unit) step function

The sequence
Sequence

In the terms

is an impulse (pulse) with the strength f0


k is a time index (0,1,2,...) . The absolute time at time
where instant k is kT, where T is the sampling interval

Z-transformation: Z-transformation:

(sum of a geometric series)

11
9/17/2015

Example.
Movement in time (”right”=delay,
”left”=prediction)
Pulse sequence

Pulse sequence f(k):

The sum converges in the complex plane region


or
It is not necessary to consider the convergence regions
in what follows.

Delay with one sampling interval:


Prediction by one sample interval:

One sample delay thus means multiplication by Compare to the derivative of Laplace-transformation
in the continuous time case.
; correspondingly by when the delay is n steps

12
9/17/2015

The final value theorem


Consider a pulse sequence f(k) and its z-transform F(z).

If f(k) approaches a limit value as k approaches infinity, it


holds

This is the final value theorem. Compare to the continuous


time case

Discrete-time system Note that the difference equation

Example. A first order difference equation


means in absolute time

Initial conditions e.g. y(0)=0, u(0)=1, u(k)=0, k >0 Take the Z-transformation
Calculation directly from the equation (which is directly
an algorithm)
Result is the pulse sequence Initial conditions are considered to be zero when deriving
the pulse transfer function, leading to

13
9/17/2015

The pulse transfer function


z-transformation is used to make the analysis and
calculations of discrete-time systems more tractable.
Compare again to the continuous time case.

The results are meaningful only at sampling instants

With a unit impulse as input Note the following transformation pairs (the latter
the output (pulse response) is the inverse transformation deviates somewhat from the continuous time analogue)
of the pulse transfer function.
1. ;

Compare to the continuous time case. 2. ;

In the inverse transformation similar ideas as in the


continuous time case are applied (dividing terms into
sums of smaller entities and then using tables)
The inverse transformation of the bracketed term is
Example.

No inverse transformation is found from the tables;


so let us modify Taking the delay
into account gives finally

or

14
9/17/2015

Stability
We can operate with pulse transfer functions Stability region:
as with transfer functions. E.g. the closed loop pulse
transfer function can be calculated, the denominator of
which is the characteristic polynomial. Its
zeros are the system poles. The zeros of the numerator
are the system zeros.
The pulse transfer function can be divided into a sum
of terms like
A discrete-time system is stable , when the poles
;the inverse transformation stays bounded (b, c, d) are located inside the unit disc. Compare to the
when left half plane for continuous time systems.
If even one term ”explodes”, the system is unstable.

Shift-operators
Example. A difference equation (input-output
representation of a system )
A forward shift operator q (in time)

can be written
A backward shift operator (in time)

in which
Correspondingly

(Compare to the continuous time differential operator p) are operator polynomials. A similar equation can also
be written as a function of

15
9/17/2015

From state-space-representation to pulse


Note the formal relationship
transfer function
continuous time
A discrete state-space-representation is defined in an analog
discrete time manner to the continuous time case; derivatives are replaced
with a shift in time.

However, when using p or q, we operate in time domain.


When using s or z a transformation to Laplace or Z-domain
has been done to deal with transfer functions.

This can sound theoretical. However, in control Let us try to find the pulse transfer function. Take the
engineering there are many design methods, in which Z-transformation and eliminate x. The derivation is quite
either time domain or frequency domain (transfer functions) analogous to the continuous time case.
are used.

From input-output representation to state-space


equations

A similar method as in the continuous time case is available

Example.

The pulse transfer function is obtained as


-state-space?
-pulse transfer function?
Write the equation as a function of the q-operator
compare to the continuous time case:

16
9/17/2015

Move q terms to the left side The following state representation is obtained

Develop the left side as factors according to q and


choose the state variables as follows

and in matrix form

Pulse transfer function Is there a need for discrete-time control


theory?

•Analog systems can be imitated


•There exists discrete-time systems without an analog
correspondence
•Sampling can cause problems to discrete-time systems
Zeros: •Digital controller can even beat the analog controller
(fastness)
Poles:
•Discrete-time control theory is needed !
The poles are inside the unit circle, and the system is
therefore stable.

17
9/17/2015

Grounds and basic building blocks Grounds and basic building blocks …

•Sampling theorem (Shannon -49) • Optimal control (Bellman -57)


•Difference equations (-48) • Stochastic control, LQG (Kalman -65)
•Integral transformations • Algebral system theory (Rosenbrock -70)
•Z-transformation (Hurewicz -47) • Identification, Adaptive control
• Robust control (-80)
•State-space-representation (Kalman -55)
,
• Soft computing -80, fuzzy control, neural networks,
cloud computing, computational sciences (-2000)...

18

You might also like