All signals we have dealt with so far have been continuous-time signals, i.e., they are defined for all −∞<t<+∞
Each device in the system such as the controller, plant or a sensor can be viewed as a signal processor or filter.
The relation between input and output is described by a transfer fucntion in the s-domain or a differential equation in the time-domain.
Analog computers can be made by RLC (Resistor, Inductor, Capacitor) circuits plus OP-AMPs (Operational Amplifiers).
However, the cost of these devices are high, they’re heavy and bulky, and sensitive to noise. Too many drawbacks.
From Continuous to Discrete
Previously, all signals have been continuously variables (analogue) and defined for all instants in time.
Because controllers are now usually implemented on computers, we must deal with signal which are discrete in nature.
Discrete-time
Signals are determined only at certain instants in time (multiple of TU).
Discrete-value
Signals are allowed only to have certain discrete values at any time step (multiples of ΔV.
Discrete values levels arise because of fixed resolution of A-to-D (and D-to-A) converters.
Discrete times arise because of fixed update rate of computer-based controllers.
A/D Converter (ADC)
A/D converter is a device that converts a continuous-time signal e(t) into a discrete-time signal.
Assume,
e(t)={cos(t)t≥00t<0
Then, the discrete-time signal is,
e(kT)={cos(kT)k=0,1,2,…0k=−1,−2,−3,…
where T>0 is called the sample period in seconds, T1>0 is called the sample rate in Hz.
Note that e(kT) is only defined for integer values of k. It is undefined between kT<t<(k+1)T, k=0,±1,±2,….
Thus, e(kT) is called discrete-time (DT) signal. We usually just write e(k).
A digital processor is a discrete-time device that takes a discrete-time signal as input and produces a discrete-time signal as output according to a certain algortihm (difference equation, more on this later).
D/A Converter (DAC)
A D/A converter is a device that converts a DT signal into a CT signal.
An example is the zero-order hold DAC, in which the output is held constant between samples.
Difference Equation and Discrete-Time System
A discrete-time system is described by a difference equation of the form,
The Z-transform is a discrete counterpart of the Laplace transform.
Let’s first recall an important property of the Laplace transform.
With continuous systems, s is an *operator. Multiplying a signal by sdifferentiates that signal in the time domain.
Division by sintegrates the signal.
With discrete-time systems, z is also an operator. Multiplying a signal by zadvance that signal one “tick” in time.
Division by zdelays the signal by one “tick”.
Assume {f(k)} is a discrete-time signal with f(k)=0,k<0. Then,
F(z)=k=0∑∞f(k)z−k≜Z{f(k)}
where z is a complex variable, and is called the Z-transform of f(k).
Remark: F(z) is a power series of z−1, which usually converges to a rational function.
Examples
Let’s start easy with the impulse function,
f(k)={10k=0k=0
Then,
F(z))k=0∑∞f(k)z−k=1
Another example is the unit step function,
f(k)={10k=0,1,2,…k<0
Then,
F(z)=k=0∑∞f(k)z−k=k=0∑∞z−k=1−z−11=z−1z,
since the power series of 1+x+x2+… is 1−x1.
Remark
We will assume that the discrete-time signal f(k) is obtained by sampling a continuous-time signal f(t), i.e., f(k)≜f(kT) where T is the sample period.
We will use the notation Z{f(t)} or Z{F(s)} or Z{f(k)} to mean ∑k=0∞f(kT)z−k.
Properties of the Z-transform
Linearity:
Assume Z{f1(k)}=F1(z) and Z{f2(k)}=F2(z). Then,
Z{af1(k)+bf2(k)}=aF1(z)+bF2(z)
for any constants a and b.
Shifting Theorem:
Assume Z{f(k)}=F(z). Then for any positive integer n,
Z{f(k−n)}≜k=0∑∞f(k−n)z−k=z−nF(z)
Final Value Theorem:
Assume X(z)=Z{x(k)} and all the poles of (1−z−1)X(z) are inside the unit circle. Then,
If this transfer function represents the relationship between an output signal C(z) and an input signal E(z), then the expression,
E(z)C(z)=(z+3)(z+31)
We can rewrite this as,
C(z)(z+3)=E(z)(z+31)=zC(z)+3C(z)=zE(z)+31E(z)
This is the difference equation of the system. Let’s take the inverse z-transform of this equation.
c(k+1)+3c(k)=e(k+1)+31e(k)
Controller Design
Given a continuous plant G(s), a reference input r(t), and some control specifications, find a digital controller (A/D, difference equation, D/A), such that the control specifications are satisfied.
One can do this in two following ways.
Emulation
Design a continuous controller D(s) (differential equation).
Approximate D(s) by a difference equation.
Discrete Design
Design difference equation directly without designing D(s) first.
Design by Emulation
Given an analog controller D(s), find T and D(z) such that the digital implementation of D(s) has an input-output relation similar to that of D(s).
In other words, T and D(z) are subject to ud(t)≈u(t) for the same e(t),t≥0
There are two methods to do this
Tustin’s Method (as we have seen)
Matched Pole-Zero (MPZ) Method
Tustin’s Method
Tustin’s method is defined as,
D(z)=D(s)s=T2z+1z−1
We call s=T2z+1z−1 as a bilinear transformation or Tustin’s transformation.
We also call the above equation as Tustin’s method for designing digital controllers.
Remark: For Tustin’ts method, the task at each step is to use a trapezoidal integration, that is, to approximate e(t) by a straight line between two samples.