0% found this document useful (0 votes)
2 views

21_DiscreteSystems

The lecture introduces discrete-time (DT) signals and systems, contrasting them with continuous-time (CT) signals, emphasizing the importance of sampling and discretization. It discusses the transition from continuous to discrete control theory, the characteristics of DT systems, and the implications of using digital platforms for control systems. Additionally, it covers various types of signals, the process of analog-to-digital conversion, and the Z-transform for analyzing DT systems in the frequency domain.

Uploaded by

Geri Veli
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)
2 views

21_DiscreteSystems

The lecture introduces discrete-time (DT) signals and systems, contrasting them with continuous-time (CT) signals, emphasizing the importance of sampling and discretization. It discusses the transition from continuous to discrete control theory, the characteristics of DT systems, and the implications of using digital platforms for control systems. Additionally, it covers various types of signals, the process of analog-to-digital conversion, and the Z-transform for analyzing DT systems in the frequency domain.

Uploaded by

Geri Veli
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/ 24

04LSLLN Automatic Control

Automotive Engineering

Lecture 21. Discrete Signals and Systems


Signals Studied Up To Now: Continuous-Time, or Analog
• Signal (by default) is a function of continuous (physical) time
• The value at each time is also “continuous” (varies in some range).
• Correspond to processes in classical (non-quantum) physics, chemistry, biology:
dynamics of temperature, humidity, voltage, current, charge, chemical
concentration, energy, power etc.
• Typical examples: impulse, step functions, harmonic functions, solutions of various
differential equations (step/frequency/impulse response etc.)

• In this series of lectures: first acquaintance with discrete-time signals (sequences)

• This lecture:
 Motivation to introduce DT signals and systems
 Sampling and “desampling” (digital to analog transform)
 DT signals in frequency domain
 Some basic facts about DT systems
Typical DT Signals

• Unit impulse sequence: 1.5

1
0 k ≠ 0
δ(k) =  0.5
1 k = 0 0
-10 -5 0 5 10
• Unit step sequence: 1.5

1
0 k < 0
ε(k) =  0.5
1 k ≥ 0 0
-10 -5 0 5 10
• Exponential sequence: 1

y(k) = Aα k 0.5

• Delayed (shifted) sequence: 0


-10 -5 0 5 10
y(k) = x(k − k o ) k (samples)
From Continuous-Time to Discrete-Time Control Theory
Up to know, we have considered continuous-time control theory

• Analogue signals defined on some interval [0,T];


• Relations between signals = differential equations;
• Measurements (state, output, reference signal) are performed continuously;

• Frequency-domain characteristics found via the integral Laplace transform.

Another class of systems – discrete-time systems


• Signals are sequences – functions of discrete time t=0,1,…;
• Dynamics are described by difference (recurrent) equations;
• Measurements (state, output, etc.) are available at discrete time instants;
• Properties of DT systems are like those of the CT systems, except for few
essential differences (to be discussed later);
• Frequency-domain characteristics found via the Z-transform (to be introduced).

Discrete-time control theory repeats many results in continuous time; hence, we


do not study it in separate and only give a brief overview.
Fibonacci Numbers

Fibonacci numbers: one of the first discrete-time dynamical


system, available in the literature.

Fibonacci’s Puzzle: A man put a male-female pair


of newly born rabbits in a field. Rabbits take a
month to mature before mating. One month
after mating, females give birth to one male-
female pair and then mate again. No rabbits die. Leonardo Pisano
How many rabbit pairs are there after one year? (Fibonacci),
1170-1240

• Variable (number of rabbits) is integer, differential equations make no sense;

• No continuous measurements and unknown dynamics between two consecutive


measurements. We neither observe (nor are interested in observing!) when each
rabbit is being born. Only their total population is estimated once a month.

• One motivation to work with discrete-time systems:


 system’s dynamics between two observations is fully unknown and/or
 the variables have discrete number of values (differential equations make no sense).
DT Systems – Examples, Linear and Nonlinear Systems

• Moving Average (linear system):


y(k) = [u(k) + u(k − 1) + u(k − 2) + u(k − 3)]/ 4

• Maximum (nonlinear system): y(k) = max[u(k), u(k − 1), u(k − 2)]

• Ideal Delay System (linear): y(k) = u(k − k 0 )

• Memoryless (static) block - nonlinear: 𝑦𝑦(𝑘𝑘) = 𝑓𝑓(𝑢𝑢 𝑘𝑘 )


Main Source of DT Signals and Systems: Sampling (Discretization)
• More often, DT arise from discretization of CT systems. In this case, signals
of the DT system are also discretized (sampled) CT signals.
 Simplified integration (numerical solution) of the equations
 Parameter identification is much simpler than in continuous time
 Today: the necessity of software implementation on digital platforms
(PC, microcontroller, programmable logic controller…)
• Next lecture (L22): a closer look at discretization (sampling) of signals. This
lecture: only general information.
• We have already seen time sampling: L04, discretization of the pendulum!
𝐽𝐽𝑦𝑦(𝑡𝑡)
̈ = −𝐾𝐾 sin 𝑦𝑦(𝑡𝑡) − 𝛽𝛽𝑦𝑦(𝑡𝑡)
̇ + 𝑢𝑢(𝑡𝑡)

𝑦𝑦 𝑘𝑘 = −𝑎𝑎1 𝑦𝑦 𝑘𝑘 − 1 − 𝑎𝑎2 𝑦𝑦 𝑘𝑘 − 2 − 𝑎𝑎3 sin 𝑦𝑦(𝑘𝑘 − 2) + 𝑏𝑏𝑏𝑏(𝑘𝑘 − 2)


𝑇𝑇𝑇𝑇 𝑇𝑇𝑇𝑇 𝑇𝑇 2 𝐾𝐾 𝑇𝑇 2
𝑎𝑎1 = − 2, 𝑎𝑎2 = 1 − , 𝑎𝑎3 = , 𝑏𝑏 =
𝐽𝐽 𝐽𝐽 𝐽𝐽 𝐽𝐽
Analog Signal to Discrete-Time Sequence
Usually, discrete-time signals arise from a continuous-time signal via time
sampling (discretization): informally, physical time (real number) replaced by
sequence of sampling instants, separated by some fixed sampling period.

10

-10
0 20 40 60 80 100 t (s)
10

-10
0 10 20 30 40 50 k (samples)
Sampling and Key Characteristics
• Sampling is a continuous-time to discrete-time conversion:

continuous time discrete time


x t ∈ [ 0, ∞ ) t kT, =
= k 0,1,2,
x (t) x (kT )

0 1 2 3 4 5 6 7 t for simplicity of notation x (kT ) = x (k )

T is the sampling period (or sampling time) (seconds, s)


fs = 1/T is the sampling frequency (Hertz, Hz)
ωs = 2πfs = 2π/T is the sampling frequency (rad/s)
All Information Around Us is Sampled
 Continuous signals are difficult to measure (very few sensors can monitor
variables continuously, e.g., analog oscilloscopes)
 You cannot keep infinite amount of measurements in memory!
 This necessitates to keep the important information as a discrete-time sequence
of values computed at discrete (sampled) timesteps t=kT (k=0,1,2,…) integer, T
is some period): annual, monthly, hourly, minutely etc. plots.
Important Remark: Information Loss
• Sampling is irreversible: you always lose some information
• Given a sampled signal there exist infinite continuous signals
which fit the samples:
x 1
0.5

-0.5

-1
0 20 40 60 80 t 100

• Mathematically, under certain conditions an analog signal can be sampled


without loss so that it can be reconstructed perfectly (sampling theorem)
• Practically, the perfect reconstruction is never possible.
• In control theory, this is NOT a problem: we are interested in the closed-
loop system’s behavior, not ideal correspondence of signals. In Signal
Processing, the goal is to reconstruct signals in a maximally accurate way!
From Discrete-Time to Digital
• At present, most control systems use digital platforms (computers,
microcontrollers) to implement the controllers, actuators, and sensors.
• At the dawn of control theory, controller were mechanical, hydraulic,
thermal, or (most often) based on analog electronics (resistors,
capacitors, inductors). The reason to use PID: simple to implement.
• Modern semi-conductor electronic circuit consist of logic gates (diodes
etc.) Digital platforms allow one to implement logic in software rather
than in hardware. This gives relevant advantages:
 Flexibility in making modifications to the control law after the
hardware design is fixed. Rapid prototyping, simpler debugging
 Hardware and software design can proceed almost independently,
saving a large amount of time.
 Logical and nonlinear operations can be easily included in the
controller.
• At the same time, digital electronics cannot work with continuous
variables. All data are binary, which means that the accuracy is limited.
Three Types of Signals
• Analog signals: continuous in time and amplitude.
 Example: voltage, current, temperature, mass position,…
• Digital signals: discrete both in time and magnitude (finite number of
possible values!)
 Examples: how many people attend the lecture (integer number of
people), number of rabbits in a farm…

• Theory for digital signals and purely digital controllers is complicated


(finite automata, quantized controllers etc.)

• Discrete-time signals: discrete in time, continuous in amplitude (result


from time sampling). A sort of compromise!
 Example: hourly change of temperature or humidity.

• Discrete-time signals give a number of advantages:


 Most convenient to develop theory.
 Good enough approximation in most practical applications.
 The effect of discrete amplitude (finite precision) can often be modeled
as disturbances and measurement noises.
Digital Controllers for Analog Plants
• Discrete-time control system are often obtained via redesign of
continuous-time controller.
• Plants are typically continuous-time (vehicles, robots, chemical reactors
etc.), so it is much easier to perform a CT design first.

1. Design of a continuous-time controller 𝐶𝐶𝐶𝐶𝐶𝐶(𝑠𝑠). This is what the main


part of our course was about. Continuous-time design is often
simpler and more convenient.
2. Discretize of the controller: 𝐶𝐶𝐶𝐶𝐶𝐶(𝑠𝑠) � 𝐶𝐶(𝑧𝑧). Many different discrete-
time approximations, Euler’s forward method is the simplest.
3. Verify the design using the discrete-time analysis and/or numerical
simulation.

• The discrete-time controller is implemented on the real system


to be controlled as follows:
Towards Digital Control

• Analog-to-digital converter (A/D): This device samples a


physical variable and converts it into a binary code (truncation).
The sampling is performed using a given sampling period T.
• At this point, some information is always lost due to the truncation
(without it, formally lossless sampling is possible for some signals).
• Digital-to-analog converter (D/A):
1. This device transforms the binary code into an analog signal.
2. This operation is always lossy; some interpolation, e.g.
 A zero-order hold (ZOH) hold maintains the same signal
value throughout the sample period (most typical case of
D/A). The resulting u(t) is a “staircase” (piecewise-constant)
signal
Typical D/A Transform: Zero-Order Hold (ZOH) reconstruction

1 0.8
e(t) u(k)
0.8
e(k) 0.6 u(t)
0.6
0.4
0.4
0.2
0.2

0 0
e

u
-0.2
-0.2
-0.4
-0.4
-0.6
-0.6
-0.8

-1 -0.8
0 1 2 3 4 5 0 1 2 3 4 5
t t

Discrete-time signals are often interpolated with “staircase” (piecewise-constant)


functions. Discrete instants are points where the function changes its value.
Other D/A Transforms: Impulses, First-Order Hold

“Dirac’s comb”: replacement of discrete-


time signal by sum of pulses, sampled First-order hold (FOH): linear
values = amplitudes. interpolation between consecutive
sample.

More general (and accurate) methods: spline approximation (approximation by


polynomial functions), Nyquist-Shannon method (can fully recover some signals).

In control theory, ZOH is usually enough, because ideal reconstruction of


signals is not needed – controllers should robust to small noises.
DT Signals in Frequency Domain: Z-transform.
Z-transform has almost all properties of the Laplace transform but works on
discrete-time signals (sequences). Traditionally, the variable is denoted z and
must be large enough in modulus. The inverse transform is available.

Main properties are:


• Linearity;
• Forward shift plays the role of derivative: if 𝑔𝑔(𝑘𝑘) = 𝑓𝑓(𝑘𝑘 + 1), then

• Backward shift plays the role of integral: if 𝑔𝑔(𝑘𝑘) = 𝑓𝑓(𝑘𝑘 − 1) (where f(-1)=0),
then

• Final value theorem also has a counterpart.


• Main examples:
DT Systems in Time- and Frequency-Domains

u(k) S y(k)

• Description of LTI DT system in state space form:

𝑥𝑥 𝑘𝑘 + 1 = 𝐴𝐴𝐴𝐴 𝑘𝑘 + 𝐵𝐵𝐵𝐵 𝑘𝑘
𝑦𝑦 𝑘𝑘 = 𝐶𝐶𝐶𝐶 𝑘𝑘 + 𝐷𝐷𝐷𝐷 𝑘𝑘
S : A, B, C , D

𝑥𝑥 𝑘𝑘 = 𝐴𝐴𝑘𝑘 𝑥𝑥 0 +𝐴𝐴𝑘𝑘−1 𝐵𝐵𝐵𝐵 0 +𝐴𝐴𝑘𝑘−2 𝐵𝐵𝐵𝐵 1 + ⋯ + 𝐴𝐴𝐵𝐵𝐵𝐵 𝑘𝑘 − 2 + 𝐵𝐵𝐵𝐵(𝑘𝑘 − 1)

• Description of LTI DT system in transfer function form (x(0)=0):

𝑌𝑌 𝑧𝑧 = 𝐺𝐺 𝑧𝑧 𝑈𝑈 𝑧𝑧 𝑺𝑺: 𝑮𝑮 𝒛𝒛

The matrix-valued function


𝐺𝐺 𝑧𝑧 = 𝐶𝐶 𝑧𝑧𝐼𝐼 − 𝐴𝐴 −1 𝐵𝐵 + 𝐷𝐷
is the transfer function (tf) of the DT state-space model (A,B,C,D).
L07: Finding Solutions in Time Domain – Diagonalizable Case
• Let’s first understand how it looks for a diagonal matrix:

• What if the matrix is not diagonal. A diagonalization trick:

• Don’t forget the meaning of V: columns = eigenvectors


L07: Finding Solutions in Time Domain – Jordan Form

• To find the Jordan form and matrix V, you can use the Matlab command jordan(), which has same argument and
output as eig(). This function requires Symbolic toolbox!
>> A=[2 1 0;0 2 0;1 0 2];
>> [V,J]=jordan(A)
V=
0 1 0
0 0 1
1 0 0

J=
2 1 0
0 2 1
0 0 2

Remember how the Jordan blocks look like for different dimensions:
L07: Powers of Jordan Cells
Power function (for the cell of dimension 4)

In general, it will be the upper-diagonal matrix whose j-th diagonal contains


L07: Behavior at Infinity – Entail Stability Criterion

Converges to 0 if Converges to 0 if

Bounded if Bounded if
Constant (=1) Constant (=1)

Unbounded - otherwise Unbounded - otherwise

The solution, after some transformation, is determined by these exponentials/powers!


Stability Criteria in Discrete Time

• All definitions for stability and unstability remain unchanged

• Asymptotic stability: replace 𝑅𝑅𝑅𝑅 𝜆𝜆𝑖𝑖 < 0 by |𝜆𝜆𝑖𝑖 | < 1 .


• Same for poles in the definition of stable TF:
|𝑝𝑝𝑖𝑖 | < 1 instead of 𝑅𝑅𝑅𝑅 𝑝𝑝𝑖𝑖 < 0

• In conditions of simple (marginal) stability: 𝑅𝑅𝑅𝑅 𝜆𝜆𝑖𝑖 ≤ 0 replaced


by |𝜆𝜆𝑖𝑖 | ≤ 1. Multiplicity condition remains same.

• In conditions for unstability: replace 𝑅𝑅𝑅𝑅 𝜆𝜆𝑖𝑖 > 0 by |𝜆𝜆𝑖𝑖 | > 1 and
𝑅𝑅𝑅𝑅 𝜆𝜆𝑖𝑖 ≥ 0 by |𝜆𝜆𝑖𝑖 | ≥ 1.

You might also like