You are on page 1of 37

Digital Control Systems – Introduction Course Content Review of Continuous Control

Digital Control Systems – Automatique II


Introduction to Digital Control Systems

Dr. Bilal Komati

Lebanese University
Faculty of Engineering - Branch III - Hadath
Department of Electrical and Electronics Engineering

4th Year - Semester 7 - Fall 2020/2021

Dr. Bilal Komati (ULFG) Digital Control Systems-Chapter 1 Fall 2020/2021 1 / 37


Digital Control Systems – Introduction Course Content Review of Continuous Control

Table of Contents

1 Digital Control Systems – Introduction

2 Course Content

3 Review of Continuous Control

Dr. Bilal Komati (ULFG) Digital Control Systems-Chapter 1 Fall 2020/2021 2 / 37


Digital Control Systems – Introduction Course Content Review of Continuous Control

Table of Contents

1 Digital Control Systems – Introduction

2 Course Content

3 Review of Continuous Control

Dr. Bilal Komati (ULFG) Digital Control Systems-Chapter 1 Fall 2020/2021 3 / 37


Digital Control Systems – Introduction Course Content Review of Continuous Control

Control Systems – Introduction

A control system manages, commands, directs, or regulates the behavior


of other devices or systems using control loops.
Examples of control systems:
Home Heating Controller
Cruise Controller for the cars
Control of an aircraft
Large Industrial Use

Dr. Bilal Komati (ULFG) Digital Control Systems-Chapter 1 Fall 2020/2021 4 / 37


Digital Control Systems – Introduction Course Content Review of Continuous Control

Control Systems – Introduction

Disturbances

r(t) e(t) u(t) y(t)


+ Controller System

ŷ(t)

Measurements

r is the reference or the desired output that the system should reach
y is the output of the system
ŷ is the measured output
e is the error between the reference and the output
u is the control input or the output of the controller
Dr. Bilal Komati (ULFG) Digital Control Systems-Chapter 1 Fall 2020/2021 5 / 37
Digital Control Systems – Introduction Course Content Review of Continuous Control

Control Systems – Introduction – PID Control


P Kp e(t)
Disturbances
Kp is the proportional
r(t) e(t) Rt + u(t) y(t)
+

I Ki 0
e(τ )dτ +
+
System gain
ŷ(t) Ki is the integral gain
D Kd de(t)
dt

Measurements Kd is the derivative gain

Dr. Bilal Komati (ULFG) Digital Control Systems-Chapter 1 Fall 2020/2021 6 / 37


Digital Control Systems – Introduction Course Content Review of Continuous Control

How to implement continuous control?


We need electronic devices, basically:
Example of PID control implementation:
Operational Amplifiers

Resistors

Capacitors

Issue
Potentiometers Complication of the design especially with
advanced control
Dr. Bilal Komati (ULFG) Digital Control Systems-Chapter 1 Fall 2020/2021 7 / 37
Digital Control Systems – Introduction Course Content Review of Continuous Control

Digital Control
Digital control is a branch of control theory that uses digital computers
to act as system controllers. A digital control system can take the form
of a microcontroller, microprocessor or a standard desktop computer.
Digital Control Advantages
Accuracy: small errors compared to analog signals where noise and
power supply drift are present.
Implementation errors: The errors that result from digital
representation and arithmetic are negligible.
Flexibility: An analog controller is difficult to modify or redesign
once implemented in hardware.
Speed: digital controllers achieve performance that is essentially the
same as continuous controllers.
Cost
Dr. Bilal Komati (ULFG) Digital Control Systems-Chapter 1 Fall 2020/2021 8 / 37
Digital Control Systems – Introduction Course Content Review of Continuous Control

Digital Control

Continuous Control can be replaced


by Digital Control Systems

Dr. Bilal Komati (ULFG) Digital Control Systems-Chapter 1 Fall 2020/2021 9 / 37


Digital Control Systems – Introduction Course Content Review of Continuous Control

Digital Control
w(t)

r(kT ) ê(kT ) Digital u(kT ) u(t) y(t)


+ D/A System
− Controller

ŷ(kT ) Clock

A/D Sensor
ŷ(t)

v(t)

r is the reference ê = r − ŷ is the indicated error


u is the control or actuator input e = r − y is the system error
signal
w disturbance input to the plant
y is the controlled or output signal
w disturbance input to the plant
ŷ is the instrument or sensor output,
A/D is an analog to digital converter
usually an approximation to or
estimate of y D/A is an digital to analog converter
Dr. Bilal Komati (ULFG) Digital Control Systems-Chapter 1 Fall 2020/2021 10 / 37
Digital Control Systems – Introduction Course Content Review of Continuous Control

Examples of Digital Control Systems


Closed-loop drug delivery system

Dr. Bilal Komati (ULFG) Digital Control Systems-Chapter 1 Fall 2020/2021 11 / 37


Digital Control Systems – Introduction Course Content Review of Continuous Control

Examples of Digital Control Systems


Computer control of an aircraft turbojet engine

Dr. Bilal Komati (ULFG) Digital Control Systems-Chapter 1 Fall 2020/2021 12 / 37


Digital Control Systems – Introduction Course Content Review of Continuous Control

Examples of Digital Control Systems


Control of a robotic manipulator

Dr. Bilal Komati (ULFG) Digital Control Systems-Chapter 1 Fall 2020/2021 13 / 37


Digital Control Systems – Introduction Course Content Review of Continuous Control

Table of Contents

1 Digital Control Systems – Introduction

2 Course Content

3 Review of Continuous Control

Dr. Bilal Komati (ULFG) Digital Control Systems-Chapter 1 Fall 2020/2021 14 / 37


Digital Control Systems – Introduction Course Content Review of Continuous Control

Course Content
This course entitled ”Automatique II” will cover the following topics:
Part I - Digital Control Systems
Discrete Time System Analysis and Modeling (Z-Transform, difference
equations, transfer function, Stability)
Frequency Analysis of Discrete Systems
Design of Discrete Controller
Part II - State Space Control for Continuous and Discrete Systems
Control Law Design
Estimator Design
Reference Tracking and Disturbance Rejection
Multivariable and Optimal Control
The course will be based on two main textbooks:
G. Franklin and al., Digital Control of Dynamic Systems,
Addison-wesley, 1998.
G. Duc, Commande des Systèmes Linéaires par Variable d’Etats,
Supélec, 2005.
Dr. Bilal Komati (ULFG) Digital Control Systems-Chapter 1 Fall 2020/2021 15 / 37
Digital Control Systems – Introduction Course Content Review of Continuous Control

Table of Contents

1 Digital Control Systems – Introduction

2 Course Content

3 Review of Continuous Control

Dr. Bilal Komati (ULFG) Digital Control Systems-Chapter 1 Fall 2020/2021 16 / 37


Digital Control Systems – Introduction Course Content Review of Continuous Control

Dynamic Response
Differential Equations

Linear dynamic systems can be described by their differential equations.


Any set of differential equations can be transformed into a coupled set of
first order equations called the state-variable form or state-space.
x is a column vector. It is called the state
of the system.
( u is the m × 1 input vector to the system
ẋ = Ax + Bu y is the p × 1 output vector
where:
y = Cx + Du A is an n × n system state matrix
B is an n × m input matrix
C is a p × n output matrix
D is a p × m input matrix
Dr. Bilal Komati (ULFG) Digital Control Systems-Chapter 1 Fall 2020/2021 17 / 37
Digital Control Systems – Introduction Course Content Review of Continuous Control

Dynamic Response
Differential Equations

Simple RC Circuit Differentiating throughout with


t=0 R respect to t: (assuming V is
i
constant)

+ di i
V C R + =0
− dt C
Solving the equation gives us:
The voltage across the resistor and V −t/RC
capacitor are: Z e i=
1 R
vR = R · i and vC = i dt vR = Ve −t/RC
Z C Z
1  
KVL ⇒ Ri + i dt = V vC = i dt = V 1 − e −t/RC
C
Dr. Bilal Komati (ULFG) Digital Control Systems-Chapter 1 Fall 2020/2021 18 / 37
Digital Control Systems – Introduction Course Content Review of Continuous Control

Dynamic Response
Differential Equations

Example
Write the state-space representation of the 2nd-order differential equation:
ÿ + 2ζω0 ẏ + ω02 y = K0 u

Solution:
      

 ẋ1 0 1 x1 0

 ẋ2 = −ω 2 −2ζω + u
0 0 x2 K0
 

   x1

 y= 1 0
x2
where the state vector is:
   
x y
x= 1 =
x2 ẏ
Dr. Bilal Komati (ULFG) Digital Control Systems-Chapter 1 Fall 2020/2021 19 / 37
Digital Control Systems – Introduction Course Content Review of Continuous Control

Dynamic Response
Laplace Transform and Transfer Functions

The most important property of the Laplace Transform (with zero initial
conditions) is the transform of the derivative signal:
L [ẋ(t)] = sX (s)
Considering the differential equation of a second order system:
ÿ + 2ζω0 ẏ + ω02 y = K0 u
The Laplace Transform of this equation is: Transfer Function
 A transfer function is a
s 2 + 2ζω0 s + ω02 Y (s) = K0 U(s) mathematical function which
theoretically models the
The transfer function of this system is:
device’s output for each
Y (s) K0 possible input.
G (s) = = 2
U(s) s + 2ζω0 s + ω02
Dr. Bilal Komati (ULFG) Digital Control Systems-Chapter 1 Fall 2020/2021 20 / 37
Digital Control Systems – Introduction Course Content Review of Continuous Control

Dynamic Response
Laplace Transform and Transfer Functions

The general form of a transfer function is given as follows:


b0 s m + b1 s m−1 + · · · + bm
G (s) = , n is called the order of the system
a0 s n + a1 s n−1 + · · · + an
For system causality n ≥ m.
The transfer function can be written: Causality
Qm A causal system is a system
Q i=1 (s − zi ) where the output depends on
G (s) = K n
i=1 (s − pi ) past and current inputs but
where: not future inputs.
A causal signal is the one
K is the gain of the transfer function
which is zero for negative
zi are the zeros of the transfer function values of the independent
pi are the poles of the transfer function. variable.
Dr. Bilal Komati (ULFG) Digital Control Systems-Chapter 1 Fall 2020/2021 21 / 37
Digital Control Systems – Introduction Course Content Review of Continuous Control

Output Time Histories


Given the transfer function and the input, u(t), with the transform U(s),
the output is the product
Y (s) = G (s)U(s)
The transform of a time function can be found by use of a table. Typical
inputs considered in control system design are:
Steps:
R0
u(t) = R0 1(t) ⇒ U(s) =
s
Ramps:
V0
u(t) = V0 t1(t) ⇒ U(s) = 2
s
Sinusoids:

u(t) = B sin(ωt)1(t) ⇒ U(s) = 2
s + ω2
Dr. Bilal Komati (ULFG) Digital Control Systems-Chapter 1 Fall 2020/2021 22 / 37
Digital Control Systems – Introduction Course Content Review of Continuous Control

Output Time Histories

To find the output time histories of the output, we proceed in the


following:
The output Y (s) is computed using Y (s) = G (s)U(s)
Using Laplace transform, the output Y (s) is expanded into its
elementary terms using partial fraction expansion
The time function associated with each each term is found by looking
it up in the table
The total time function, y (t) is the sum of these terms
The system output histories is often solved numerically using
computer based methods such as Matlab

Dr. Bilal Komati (ULFG) Digital Control Systems-Chapter 1 Fall 2020/2021 23 / 37


Digital Control Systems – Introduction Course Content Review of Continuous Control

Final Value Theorem

Final Value Theorem


The final value theorem states that, if the system is stable and has a final
constant value:
lim x(t) = xss = lim sX (s)
t→∞ s→0

The theorem allows us to solve for that final value without solving for the
system’s entire response. This will be very useful when examining
steady-state errors of control systems.

Dr. Bilal Komati (ULFG) Digital Control Systems-Chapter 1 Fall 2020/2021 24 / 37


Digital Control Systems – Introduction Course Content Review of Continuous Control

Block Diagrams

Manipulating block diagrams is useful in the study of feedback control


systems.
The most common and useful result is that the transfer function of the
feedback system shown in the following reduces to
R(s) Y (s)
+ G(s)

Y (s) G (s)
=
R(s) 1 + H(s)G (s)
H(s)

Dr. Bilal Komati (ULFG) Digital Control Systems-Chapter 1 Fall 2020/2021 25 / 37


Digital Control Systems – Introduction Course Content Review of Continuous Control

Response versus Pole Locations


b(s)
Given the transfer function of a linear system: H(s) =
a(s)

Poles
The values of s such that a(s) = 0 will be the places where H(s) is
infinity, and these values of s are called poles of H(s).

Zeros
The values of s such that b(s) = 0 will be the places where H(s) is zero,
and these values of s are called zeros of H(s).

Since the Laplace transform of an impulse is unity, the impulse response


is given by the time function corresponding to the transfer function.
Each pole location in the s plane can be identified with a particular type of
response.
Dr. Bilal Komati (ULFG) Digital Control Systems-Chapter 1 Fall 2020/2021 26 / 37
Digital Control Systems – Introduction Course Content Review of Continuous Control

Response versus Pole Locations


First Order System

1 The impulse response will be:


H(s) =
s +σ
h(t) = e −σt 1(t)
First Order System Response
1

0.8
Stability
If σ > 0, the pole is located at
0.6
s < 0, the exponential decays and
h(t)

0.4 the system is said to be stable.


0.2 If σ < 0, the pole is to the right of
the origin, the exponential grows
0
0 1 2 3 4 5 6 with time and is referred to as
Time (s)
unstable.
1
t=τ =
σ
Dr. Bilal Komati (ULFG) Digital Control Systems-Chapter 1 Fall 2020/2021 27 / 37
Digital Control Systems – Introduction Course Content Review of Continuous Control

Response versus Pole Locations


Second Order System

Complex poles can be described in terms of their real and imaginary parts:

s = −σ ± jωd

Since complex poles always come in complex conjugate pairs for real
polynomials, the denomiator corresponding to a complex pair will be:

a(s) = (s + σ − jωd )(s + σ + jωd ) = (s + σ)2 + ωd2

When finding the transfer function form differential equations:

ωn2 ζ is called the damping


H(s) = ratio
s 2 + 2ζωn s + ωn2
p ωn is called the undamped
σ = ζωn , and ωd = ωn 1 − ζ 2 natural frequency
Dr. Bilal Komati (ULFG) Digital Control Systems-Chapter 1 Fall 2020/2021 28 / 37
Digital Control Systems – Introduction Course Content Review of Continuous Control

Response versus Pole Locations


Second Order System

ωn2 ωn2
H(s) = ⇒ H(s) =
s 2 + 2ζωn s + ωn2 (s + ζωn )2 + ωn2 (1 − ζ 2 )
θ = sin−1 ζ Im(s) Second Order Step Response
2
ζ=0
ζ = 0.2
ζ = 0.4
1.5
ζ = 0.6
ωn ζ = 0.8
y(t) ζ=1
1
Re(s)
ωd 0.5
σ

0
0 2 4 6 8 10 12
Time (s)
Dr. Bilal Komati (ULFG) Digital Control Systems-Chapter 1 Fall 2020/2021 29 / 37
Digital Control Systems – Introduction Course Content Review of Continuous Control

Response versus Pole Locations


Second Order System

Dr. Bilal Komati (ULFG) Digital Control Systems-Chapter 1 Fall 2020/2021 30 / 37


Digital Control Systems – Introduction Course Content Review of Continuous Control

Time Domain Specifications

Requirements for step response


Rise Time tr : the time it takes
to reach the vicinity of its new
set point.
Settling Time ts : the time it
takes the system transient to
decay.
Overshoot Mp : the maximum 
 1.8
amount that the system 
 t r ≈

 ωn
overshoots its final value divided 
4.6 4.6
by its final value.  ts ≈ =

 τ ωn σ

 √
Common used Approximations for  2
Mp ≈ e −πζ/ 1−ζ 0≤ζ<1
second order systems:
Dr. Bilal Komati (ULFG) Digital Control Systems-Chapter 1 Fall 2020/2021 31 / 37
Digital Control Systems – Introduction Course Content Review of Continuous Control

Stability
Disturbances

r(t) e(t) Compensation u(t) System y(t)


The dynamic characteristics and
+
− D(s) G(s) stability are determined by the poles
ŷ(t) of the closed-loop transfer function,
Sensor that is, the roots of
1

The dynamics characteristics of the 1 + D(s)G (s) = 0


open-loop system are determined by
the poles of G (s) and D(s). This equation is called
The transfer function of the characteristic equation.
closed-loop system: The roots of the characteristic
equation represent the type of
Y (s) D(s)G (s) motion that will be exhibited by the
=
R(s) 1 + D(s)G (s) feedback system.

Dr. Bilal Komati (ULFG) Digital Control Systems-Chapter 1 Fall 2020/2021 32 / 37


Digital Control Systems – Introduction Course Content Review of Continuous Control

Steady-State Errors
Disturbances
If r (t) is a step input and the system
r(t) e(t) Compensation u(t) System y(t)
+
− D(s) G(s) is stable, using the final value
ŷ(t)
theorem:
Sensor
1 1
ess =
The difference between the reference 1 + Kp
input r and the output y is the where Kp = lim D(s)G (s) is called
system error: s→0
the position-error constant.
E (s) 1 For type 0 system, D(s)G (s) has a
= = S(s)
R(s) 1 + D(s)G (s) denominator that does not have s as
a factor.
The transfer function S(s) is ⇒ Kp and ess are finite.
sometimes called the sensitivity.
Dr. Bilal Komati (ULFG) Digital Control Systems-Chapter 1 Fall 2020/2021 33 / 37
Digital Control Systems – Introduction Course Content Review of Continuous Control

Steady-State Errors
Disturbances
Velocity Constant:
r(t) e(t) Compensation u(t) System y(t)
+
− D(s) G(s) Kv = lim sD(s)G (s)
s→0
ŷ(t) Acceleration Constant:
Sensor
1
Ka = lim s 2 D(s)G (s)
s→0
Kv is finite ⇒ type 1 system.
The higher the forward loop gain of
K is finite ⇒ type 2 system.
DG , the lower the value of the error e. a
Step Ramp Parabola
An integrator has the property that a 1
zero steady input can produce a finite Type 0 ∞ ∞
1 + Kp
output, thus producing an infinite 1
gain. Type 1 0 ∞
Kv
If there is an integrator in D or G , 1
Type 2 0 0
the steady-state gain will be ∞ and Ka
the error will be zero.
Dr. Bilal Komati (ULFG) Digital Control Systems-Chapter 1 Fall 2020/2021 34 / 37
Digital Control Systems – Introduction Course Content Review of Continuous Control

PID Control

Proportional, Integral, and Derivative (PID) control contains three terms:


Proportional control: u(t) = Ke(t) ⇒ D(s) = K
Z
K t K
Integral control: u(t) = e(η)dη ⇒ D(s) =
Ti 0 Ti s
Derivative control: u(t) = KTD ė(t) ⇒ D(s) = KTD s
Ti is called the integral (or reset) time.
TD is called the derivative time.
K is the position feedback gain.
The combined transfer function is:
 
U(s) 1
D(s) = =K 1+ + TD s
E (s) Ti s

Dr. Bilal Komati (ULFG) Digital Control Systems-Chapter 1 Fall 2020/2021 35 / 37


Digital Control Systems – Introduction Course Content Review of Continuous Control

PID Control

Proportional feedback control can lead to reduced errors to


disturbances but still has a small steady-state error.
It can also increase the speed of response but typically at the cost of
a larger transient overshoot.
If the controller also includes a term proportional to the integral of
the error, the error to a step can be eliminated.
The integral term tends to further deteriorate the dynamic response.
The addition of a term proportional to the error derivative can add
damping to the dynamic response.
These three terms combined form the classical PID controller.
It is widely used in the process industries.

Dr. Bilal Komati (ULFG) Digital Control Systems-Chapter 1 Fall 2020/2021 36 / 37


Digital Control Systems – Introduction Course Content Review of Continuous Control

PID Control

Dr. Bilal Komati (ULFG) Digital Control Systems-Chapter 1 Fall 2020/2021 37 / 37

You might also like