0% found this document useful (0 votes)
12 views56 pages

Lecture1 2024

Uploaded by

renilalexander10
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views56 pages

Lecture1 2024

Uploaded by

renilalexander10
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 56

Digital Control - Lecture 1

SC42095

Azita Dabiri, Amin Sharifi Kolarijani

Delft Center for Systems and Control


Faculty of Mechanical Engineering
Delft University of Technology
The Netherlands

1 / 56
Lecture outline

Information about the course.


Introduction to computer-controlled systems.

2 / 56
Digital Control (SC42095)

Lecturers: Azita Dabiri, Amin Sharifi Kolarijani (Mekelweg 2,


C-3-300)
◮ Mondays 08:45 -10:45, Lecture Hall B
◮ Thursdays 13:45-15:45, Lecture Hall B
Teaching assistants:
◮ Filippo Airaldi
◮ Yun Li
◮ Giray Onur
◮ Arghya Mallick
Exercise sessions:
◮ Tuesdays, 13:45 - 15:45, Hall B
◮ Thursdays, 08:45-10:45, Hall B
◮ No exercise session in the first week

3 / 56
Digital Control (SC42095)

Lecturers: Azita Dabiri, Amin Sharifi Kolarijani (Mekelweg 2,


C-3-300)
◮ Mondays 08:45 -10:45, Lecture Hall B
◮ Thursdays 13:45-15:45, Lecture Hall B
Teaching assistants:
◮ Filippo Airaldi
◮ Yun Li
◮ Giray Onur
◮ Arghya Mallick
Exercise sessions:
◮ Tuesdays, 13:45 - 15:45, Hall B
◮ Thursdays, 08:45-10:45, Hall B
◮ No exercise session in the first week

Final grade based on project assignment

4 / 56
Project assignment
Purpose: learn to apply the design and analysis techniques and the
use of numerical tools
Procedure:
◮ check out the assignments from Brightspace from November 12, at
12:30,
◮ enroll in the corresponding group on Brightspace before November
18, at 12:30,

5 / 56
Project assignment
Purpose: learn to apply the design and analysis techniques and the
use of numerical tools
Procedure:
◮ check out the assignments from Brightspace from November 12, at
12:30,
◮ enroll in the corresponding group on Brightspace before November
18, at 12:30,
◮ if you are retaking the course, you should select a different assignment
from the one you submitted previously
◮ start with the continuous-time control task,
◮ gradually solve the discrete-time problems,
◮ answer the questions in the same order they were asked,
◮ write a short and decent report and submit on Brightspace, (deadline
January 8, 2025, at 14:00)

6 / 56
Project assignment
Purpose: learn to apply the design and analysis techniques and the
use of numerical tools
Procedure:
◮ check out the assignments from Brightspace from November 12, at
12:30,
◮ enroll in the corresponding group on Brightspace before November
18, at 12:30,
◮ if you are retaking the course, you should select a different assignment
from the one you submitted previously
◮ start with the continuous-time control task,
◮ gradually solve the discrete-time problems,
◮ answer the questions in the same order they were asked,
◮ write a short and decent report and submit on Brightspace, (deadline
January 8, 2025, at 14:00)
A design problem .. so no single correct solution ... but many
incorrect ones
Your report will be graded and form your final mark
7 / 56
Project assignment - Resit

the assignments will be available on Brightspace from February 18,


12:30
enroll in the corresponding group on Brightspace before February
25,12:30
submit your report on Brightspace (deadline 14:00, April 8, 2025)
select a different assignment from the one you submitted previously
there will be no exercise sessions during this period

8 / 56
Goals of the course

Main subject:
Computer-controlled systems, digital implementation
Analyze discrete-time systems.
Design sampled-data controllers (synthesis).
Identify implementation issues.
Apply the design methodology to a simulated process
(project assignment with Matlab and Simulink).

9 / 56
Contents of lectures

Introduction to computer-controlled systems


Sampling of signals and systems (aliasing, discrete-time models,
z-transform, zeros, and poles)
Discrete-time state-space and input-output models
Analysis of discrete-time systems (stability, controllability,
observability)
Design methods
(state-space, linear quadratic)
Observers, stochastic models
(Luenberger observer, Kalman-filter)

10 / 56
Course materials

Book:
Aström K.J. and Wittenmark B.:
Computer Controlled Systems
3rd ed., Prentice Hall, 1997.
Slides:
available through Brightspace( Inspired
by lecture materials from Tamas
Keviczky, Franky De Bruyne, Brian
Douglas).
Some parts of the book
will not be discussed in
the lectures and are left
for self-study
11 / 56
Supplementary textbook

Book:
L. Keviczky et. al:
Control Engineering, and
Control Engineering: MATLAB Exer-
cises,
Springer, 2019.

Selected chapters on the subject


of sampled data control and back-
ground material for project assign-
ment (e.g. PID design).

12 / 56
Prerequisites

Mathematical analysis
Linear algebra
Dynamical control systems, state-space theory (SC42015)
Working knowledge of Matlab and Simulink

13 / 56
Some important concepts to refresh

Differential equations, Laplace transform.


Transfer functions, state-space models.
Poles and zeros, stability, controllability, observability. . .
PID control, system type

14 / 56
Matlab and Simulink

Elementary Matlab commands ( plot, load, save, etc.)


Control System Toolbox:
◮ LTI class ( ss, tf, zpk)
◮ time-domain and frequency analysis ( step, bode)
◮ control design tools ( rlocus, place)
Simulink (implementing models, simulation methods)

15 / 56
Course information

Brightspace
Basic course information.
Important dates, messages.
Solutions manual, errata for the book.
Exercises, discussion forum, etc.
Course software (for Matlab and Simulink):
◮ Matlab scripts to generate figures in the book:
(see how examples are implemented, etc.)
Other supplementary references.

16 / 56
Roadmap

Output-
feedback
control

State-
feedback
Observer
control
State-space
representation
Sampling
theory
Analysis
Synthesis
Mapping (time-domain)
from s to z
Discretisation

Z-
transformation

17 / 56
Setting the stage; continuous-time design

In general, processes can be well-described in continuous-time


Classical and modern control theory for continuous-time control
systems have revolutionized the industrial processes, e.g. regulated
voltage and frequency of electric power, thermostat control of
refrigerators, control of engine pressure,...
Designed continuous-time controller can be represented by a set of
differential equations (for linear systems)

18 / 56
Setting the stage; continuous-time design

In general, processes can be well-described in continuous-time


Classical and modern control theory for continuous-time control
systems have revolutionized the industrial processes, e.g. regulated
voltage and frequency of electric power, thermostat control of
refrigerators, control of engine pressure,...
Designed continuous-time controller can be represented by a set of
differential equations (for linear systems)
The designed continuous-time controller used to be implemented
using pneumatic or hydraulic systems or analog electronics

19 / 56
Setting the stage; continuous-time design

In general, processes can be well-described in continuous-time


Classical and modern control theory for continuous-time control
systems have revolutionized the industrial processes, e.g. regulated
voltage and frequency of electric power, thermostat control of
refrigerators, control of engine pressure,...
Designed continuous-time controller can be represented by a set of
differential equations (for linear systems)
The designed continuous-time controller used to be implemented
using pneumatic or hydraulic systems or analog electronics
Today, digital processors are used
We have to take into account the discrete-time nature of signals

20 / 56
Setting the stage; continuous-time design

https://www.nutsvolts.com/magazine/article/the pid controller part 1


Different from how it’s implemented nowadays. Practically all control
systems that are implemented today are based on computer control
21 / 56
Computer-controlled systems
u(t) y(t)
Controller (computer) Process

The process is connected to a computer-based controller; a processor


This setting clearly brings flexibility (e.g. much more complicated
control laws). However, the signals to be processed are sampled. As
you will see in this course, the control laws are implemented using
difference equations
The implementation is not as simple as the above figure

22 / 56
Computer-controlled systems
u(t) y(t)
Controller (computer) Process

The process is connected to a computer-based controller; a processor


This setting clearly brings flexibility (e.g. much more complicated
control laws). However, the signals to be processed are sampled. As
you will see in this course, the control laws are implemented using
difference equations
The implementation is not as simple as the above figure
Naive idea: use a very high sampling frequency to reduce the effect
of sampling → very costly and in some cases infeasible (the used
processor is not compatible with that high frequency)

23 / 56
Computer-controlled systems
u(t) y(t)
Controller (computer) Process

The process is connected to a computer-based controller; a processor


This setting clearly brings flexibility (e.g. much more complicated
control laws). However, the signals to be processed are sampled. As
you will see in this course, the control laws are implemented using
difference equations
The implementation is not as simple as the above figure
Naive idea: use a very high sampling frequency to reduce the effect
of sampling → very costly and in some cases infeasible (the used
processor is not compatible with that high frequency)
Better idea: include the effects of sampling into the design.
Implementation is more complex than the above figure
24 / 56
Computer-controlled systems

r[k]
u(t) yt (t)
u[k]
Digital processor D/A+Hold Process

Clock

y[k] y(t)
A/D Anti-aliasing Sensor

DIGITAL ([k] / z) INTERFACE ANALOG (t / s)

Both continuous-time and sampled (discrete-time) signals:


(sampled-data systems) → may give some difficulties

25 / 56
Computer-controlled systems

r[k]
u(t) yt (t)
u[k]
Digital processor D/A+Hold Process

Clock

y[k] y(t)
A/D Anti-aliasing Sensor

DIGITAL ([k] / z) INTERFACE ANALOG (t / s)

Both continuous-time and sampled (discrete-time) signals:


(sampled-data systems) → may give some difficulties
The digital signals are denoted by y [k], r [k], u[k] where k represents
the sample number.

26 / 56
The Analog controller is replaced by
A digital processor (which takes a reference signal r [k] and the
process value y [k])
An interface between the analog process and the digital processor

27 / 56
The Analog controller is replaced by
A digital processor (which takes a reference signal r [k] and the
process value y [k])
An interface between the analog process and the digital processor
Note that
Usually, the hold block is a Zero Order Hold (ZOH), which keeps
the signal constant on the last sample value till the next sample value
is read
Frequency response of the sensor and the anti-aliasing filter is
supposed to be flat in the frequency band of interest

28 / 56
The Analog controller is replaced by
A digital processor (which takes a reference signal r [k] and the
process value y [k])
An interface between the analog process and the digital processor
Note that
Usually, the hold block is a Zero Order Hold (ZOH), which keeps
the signal constant on the last sample value till the next sample value
is read
Frequency response of the sensor and the anti-aliasing filter is
supposed to be flat in the frequency band of interest
What the digital processor sees is the process+the interface block →
Digital control should include the effect of the interface block into
the design problem

29 / 56
Designing a digital controller

Approach 2 Approach 1

P(s) P(s)
Discretise Design
(including the
effect of ZOH) P(z) C (s)

Design Discretise
C (z) C (z)

Approach 1: First design a controller in continuous time and then


discretise the controller
Approach 2: First discretise the plant and then design a controller in
discrete time

30 / 56
Computer-controlled systems - Approach 1

Using approach 1, C (z) should approximate C (s) as closely as


possible. This requires:
◮ High sampling frequency so that the output of ZOH and the aimed
continuous-time signal are close.
◮ High resolution (many bits) of the A/D and D/A converters to get
small quantization step
◮ Low noise level (extra requirements for sensor and anti-aliasing filter)

31 / 56
Computer-controlled systems - Approach 1

Using approach 1, C (z) should approximate C (s) as closely as


possible. This requires:
◮ High sampling frequency so that the output of ZOH and the aimed
continuous-time signal are close.
◮ High resolution (many bits) of the A/D and D/A converters to get
small quantization step
◮ Low noise level (extra requirements for sensor and anti-aliasing filter)
Hence: Approach 1 can be costly or even not realizable with the given
processor

32 / 56
Computer-controlled systems - Approach 2

r[k]
u(t) yt (t)
u[k]
Digital processor D/A+Hold Process

Clock

y[k] y(t)
A/D Anti-aliasing Sensor

DIGITAL ([k] / z) INTERFACE ANALOG (t / s)

Using Approach 2, C (z) is designed using digital design methods in


discrete time.
It requires a good description of how u[k] and y [k] relate to each
other. This includes a good representation of the interface block
(A/D & D/A + hold operation)

33 / 56
Computer-controlled systems - Approach 2

r[k]
u(t) yt (t)
u[k]
Digital processor D/A+Hold Process

Clock

y[k] y(t)
A/D Anti-aliasing Sensor

DIGITAL ([k] / z) INTERFACE ANALOG (t / s)

Using Approach 2, C (z) is designed using digital design methods in


discrete time.
It requires a good description of how u[k] and y [k] relate to each
other. This includes a good representation of the interface block
(A/D & D/A + hold operation)
Allows us to decrease the sampling frequency
Note that the sampling frequency should be high enough to avoid
undesirable inter-sample behaviour (safe to choose it well above the
closed-loop bandwidth)
Approach 2 is the one we follow in this course
34 / 56
Advantages of computer control

cheap hardware, no ageing


extra control performance (example later on)
include models, nonlinearities
signal processing, adaptation (‘learning’)
complex calculations, logical functions, sequencing, flexibility
user interface, data storage
ease of implementing & changing controls (no HW impact)

35 / 56
Limitations of computer control

limited performance of computers (speed)


◮ real-time aspects
◮ large-scale systems, networks

36 / 56
Limitations of computer control

limited performance of computers (speed)


◮ real-time aspects
◮ large-scale systems, networks
robustness, safety (faults)
◮ maintenance (e.g., cars)
◮ safety-critical applications (e.g., aircraft, reactors)
◮ potential ways in which they can be broken down

37 / 56
Limitations of computer control

limited performance of computers (speed)


◮ real-time aspects
◮ large-scale systems, networks
robustness, safety (faults)
◮ maintenance (e.g., cars)
◮ safety-critical applications (e.g., aircraft, reactors)
◮ potential ways in which they can be broken down
sampling → new phenomena (extra caution)
◮ time-dependence
◮ influence of sampling period
◮ sampling of high-frequency signals (noise)

38 / 56
Time-varying behavior

Implement a compensator using a computer-controlled system.

u y
1
Ts+1

u ys
A-D Computer D-A

Clock

39 / 56
Time-varying behavior – cont’d

dashed line: input step (u),


solid line: response of continuous filter (y ),
dotted line: response of digital filter (ys ) in response to the same input

40 / 56
Time-varying behavior – cont’d

dashed line: input step (u),


solid line: response of continuous filter (y ),
dotted line: response of digital filter (ys ) in response to the same input
→ The response depends on the time when the step occurs.

41 / 56
Influence of sampling period

A naive approach:
Design continuous-time controller.
Discretize this controller.
Implement on a computer.

42 / 56
Influence of sampling period – cont’d

Task: control of a disk drive arm (double integrator):


(s)
G (s) = YU(s) = Jsk2 (J is the moment of inertia)
Purpose: control the position of the arm so that the head follows a
given track.

y(t)

u(t)

43 / 56
Design continuous-time controller

A simple servo controller can be described by:


bK s +b
U(s) = Uc (s) − K Y (s) (1)
a s +a
With the controller parameters chosen as
a = 2ω0
b = ω0 /2
K = 2Jω02 /k

Closed loop characteristic polynomial is obtained as


P(s) = s 3 + 2ω0 s 2 + 2ω02 s + ω03

44 / 56
Design continuous-time controller – cont’d

From (1) after elementary manipulations we have

 
b a−b
U(s) = K Uc (s) − Y (s) + Y (s)
a s +a

 
b
u(t) = K uc (t) − y (t) + x(t)
a
dx(t)
= −ax(t) + (a − b)y (t)
dt

45 / 56
Discretize continuous-time controller

 
b
u(t) = K uc (t) − y (t) + x(t)
a
dx(t)
= −ax(t) + (a − b)y (t)
dt

46 / 56
Discretize continuous-time controller

 
b
u(t) = K uc (t) − y (t) + x(t)
a
dx(t)
= −ax(t) + (a − b)y (t)
dt
To obtain an algorithm for a computer, the derivative is approximated
with a difference equation; Approximate the derivative:

x(t + h) − x(t)
= −ax(t) + (a − b)y (t)
h

47 / 56
Discretize continuous-time
 controller 
b
u(t) = K uc (t) − y (t) + x(t)
a
dx(t)
= −ax(t) + (a − b)y (t)
dt

x(t + h) − x(t)
= −ax(t) + (a − b)y (t)
h
Hence, the approximation of the continuous algorithm is obtained as:

 
b
u(tk ) = K uc (tk ) − y (tk ) + x(tk )
a
 
x(tk + h) = x(tk ) + h (a − b)y (tk ) − ax(tk )

48 / 56
Discretize continuous-time
 controller 
b
u(t) = K uc (t) − y (t) + x(t)
a
dx(t)
= −ax(t) + (a − b)y (t)
dt

x(t + h) − x(t)
= −ax(t) + (a − b)y (t)
h
Hence, the approximation of the continuous algorithm is obtained as:

 
b
u[k] = K uc [k] − y [k] + x[k]
a
 
x[k + 1] = x[k] + h (a − b)y [k] − ax[k]

49 / 56
Implement discrete-time controller

 
b
u(tk ) = K uc (tk ) − y (tk ) + x(tk )
a
 
x(tk + h) = x(tk ) + h (a − b)y (tk ) − ax(tk )

Clock
y:= adin {read process value}
u:= K*(b/a*uc-y+x)
Algorithm dout(u) {output control signal}
x:= x+h*((a-b)*y - a*x)

Sampling period h = 0.2/ω0

50 / 56
Performance Comparison

1
Output

0
0 5 10
0.5
Input

−0.5
0 5 10
Time (ω0t)

solid line: digital controller,


dashed line: analog controller
51 / 56
Notes

Digital controller:
slightly higher overshoot
5.7
settling time to 5% is ω0
Analog controller:
5.52
settling time to 5% is ω0
Thus small difference! (The digital controller is slightly worse)

52 / 56
Longer sampling period
a) h = 0.5/ω0 , b) h = 1.08/ω0

(a) (b)
Output

Output
1 1

0 0
0 5 10 15 0 5 10 15
0.5 0.5
Input

Input
0 0

−0.5 −0.5
0 5 10 15 0 5 10 15
Time (ω t) Time (ω t)
0 0

solid line: digital,


dashed line: analog 53 / 56
Designing a controller in discrete time
Consider the following control policy (designed following digital
control theory)

u(tk ) = t0 uc (tk ) + t1 uc (tk−1 ) − s0 y (tk ) − s1 y (tk−1 ) − r1 u(tk−1 )

Lets choose h = 1.4/ω0 (!)

54 / 56
Designing a controller in discrete time
Consider the following control policy (designed following digital
control theory)

u(tk ) = t0 uc (tk ) + t1 uc (tk−1 ) − s0 y (tk ) − s1 y (tk−1 ) − r1 u(tk−1 )

Lets choose h = 1.4/ω0 (!)


1
Position

0
0 5 10

0.5
Velocity

0 5 10
0.5
Input

−0.5
0 5 10
Time (ω0t)

solid line: digital, dashed line: analog

55 / 56
Summary

Advantages and drawbacks of computer control.

Short sampling interval may be OK, but we can do better by using

discrete-time design.

56 / 56

You might also like