Discrete-Time Modeling and Difference Equations
In questa pagina 7
This note reviews discrete-time modeling, the counterpart of the continuous-time modeling seen before (see Continuous-Time Modeling of Dynamic SystemsWhy control engineers need a model, white-box versus black-box modeling, the assumptions behind linear time-invariant lumped models, linear ODEs with constant coefficients, and the classification of lumped elements as passive or active.Continuous-Time Modeling of Dynamic Systems → and System ModelingA mathematical model (parameters, variables, relations) describes a system quantitatively; models are classified as static or dynamic, causal, linear, time-invariant, SISO or MIMO, and the course focuses on SISO continuous-time causal dynamic LTI systems described by a constant-coefficient input-output ODE.System Modeling →). The mathematical background is in Difference EquationsRecursive constant-coefficient linear difference equations (ARMA models) are the discrete-time counterpart of ODEs: the delay operator replaces the derivative, the modes are k^m lambda^k with lambda a root of the characteristic polynomial, and the solution splits into a natural and a forced response.Difference Equations → and Bilateral Z-TransformThe bilateral Z-transform X_B(z) = sum x(k) z^{-k} is the discrete-time counterpart of the Laplace transform; it converges only on a region of convergence (an annulus-type region), extends the DTFT when the unit circle is in the ROC, has an inversion formula and properties such as linearity, shift, time reversal and convolution.Bilateral Z-Transform → of the Signals and Systems course; the transform properties and tables used below are collected in Z-Transform Properties and Elementary Signalsdefinition of the unilateral Z-transform for causal LTI models, its ten properties, and the table of transforms of elementary signals (impulse, step, ramps, exponentials, sinusoids).Z-Transform Properties and Elementary Signals →.
1. Modeling assumptions
As in the continuous-time case, the models are:
- dynamic;
- single-input single-output (SISO);
- discrete-time;
- linear;
- time-invariant;
- causal;
and are based on linear difference equations with constant coefficients.
2. Difference equations
A linear difference equation (DE) with constant coefficients is
- , are the model parameters;
- is the model order;
- is the input signal ();
- is the output signal.
Note: if the model is causal, because the current output depends only on the past values of and (and on the current input).
Moving-average (MA) model
If :
The output is a weighted combination of present and past inputs only.
Autoregressive (AR) model
If :
ARMA model
A model based on a difference equation is also called an ARMA (Auto Regressive - Moving Average) model, because it can be implemented as the cascade of an MA model and an AR model:
MA model AR model
u[k] --> z[k] = sum_{m=0}^{M} b_m u[k-m] --> z[k] --> sum_{n=0}^{N} a_n y[k-n] = z[k] --> y[k]that is, first , then .
Solving an ARMA model
Solving means finding the signal that satisfies the difference equation, given:
- the input signal for (the input is causal, i.e. equal to zero for );
- the initial conditions (i.c.) .
The memory of an ARMA model is the number of past samples required to compute .
3. Why the -transform
The -transform converts time-shift operations applied to the samples of a sequence (advance and delay) into algebraic operations (multiplication and division by the variable ) applied to its transform : a unit advance of the sequence becomes a multiplication by .
Together with linearity, this turns a linear difference equation with constant coefficients (difficult to "solve") into an algebraic equation in the complex variable (easy to solve).
Solution procedure:
- apply the -transform to the DE in the unknown , obtaining an algebraic equation in with unknown ;
- solve it algebraically for ;
- apply the inverse transform to the "transformed" solution to get the solution of the original DE.
Only algebraic manipulations and tables of -transforms of elementary signals are needed.
4. Solving the difference equation with the -transform
Start from the DE and transform both sides:
By linearity:
Use the time-delay property (the samples are the initial conditions and appear in the formula; the input is causal, so its extra sum vanishes):
(The slides print for the samples in the first formula; they are the samples of .) Substituting,
Multiply both sides by (assuming ; if multiply by ):
That is , so
Degrees (assuming ): , , and (the latter when ).
- is the transform of the natural response: it depends on the initial conditions and is obtained with zero input.
- is the transform of the forced response: it depends on the input and is obtained with zero initial conditions.
5. Transfer function
The transform of the forced response is . The quantity
is the transfer function of the system. For systems described by linear DEs with constant coefficients it is always a rational function of the complex variable .
The transfer function completely characterises the forced response: .
6. Impulse response
For a unit impulse input (the slide writes ), and therefore : the transfer function is the -transform of the impulse response .
The impulse response also completely characterises the forced response. From , transforming back and using the convolution property:
u[k] ---> [ h[k] ] ---> y_f[k] = sum_{n=0}^{k} h[k-n] u[n]7. Inverse -transform of rational functions
The "transformed" solution of the DE is
is a rational function, provided that is rational (true for all the elementary signals considered in practice, see the tables in Z-Transform Properties and Elementary Signalsdefinition of the unilateral Z-transform for causal LTI models, its ten properties, and the table of transforms of elementary signals (impulse, step, ramps, exponentials, sinusoids).Z-Transform Properties and Elementary Signals →). To compute the inverse transform, perform a partial fraction decomposition, then invert each term of the decomposition, whose inverse is known from the tables.
Versione ripasso
- Models: dynamic, SISO, discrete-time, linear, time-invariant, causal, based on linear DEs with constant coefficients.
- DE: , ; is the order; causal if .
- MA (): . AR (): . ARMA = cascade of MA () and AR ().
- To solve: input , , and i.c. . Memory = number of past samples needed for .
- -transform turns shifts into multiplication by , so the DE becomes algebraic: transform, solve for , invert.
- With and multiplying by ():
- : natural response (i.c., zero input) plus forced response (input, zero i.c.). , .
- Transfer function , always rational.
- gives : is the transform of the impulse response ; .
- Inverse transform of rational : partial fractions, then table.
Procedura:
- Trasformare ambo i membri della DE usando linearità e proprietà del ritardo.
- Moltiplicare per (o per se ) per ottenere , , .
- Scrivere .
- Antitrasformare con fratti semplici e tabella.
Dove compaiono le condizioni iniziali: entrano solo in , quindi la risposta naturale dipende solo da loro (con ingresso nullo). La forzata dipende solo da con condizioni iniziali nulle.
Risposta impulsiva: con si ha , quindi e . Per un ingresso generico (convoluzione).
Errori tipici:
- Scambiare per : descrive solo la risposta forzata.
- Dimenticare e quindi le condizioni iniziali.
- Moltiplicare per quando (in quel caso serve ).