• No results found

4.5.1 *The Discrete Fourier Transform (OFT)

To complete the DFf. we need the inverse transform. which. by analogy with the standard Fourier transform. we guess to be the sum

where amplitude is plotted in decibels (dB), or [mag,phase,w]

=

bode(sysD)

subplot(2, 1,1), loglog(w,mag) subplot(2,1 semilogx(w,phase)

The analysis developed above based on the z-transform is adequate for con-sidering the theoretical frequency response of a linear, constant system or the corresponding difference equation, but it is not the best for the analysis of real-time signals as they occur in the laboratory or in other experimental situations.

For the analysis of real data, we need a transform defined over a finite data record, which can be computed quickly and accurately. The required formula is that of the Discrete Fourier Transform. the DFf, and its numerical cousin. the Fast Fourier Transform, the FFf. Implementation of a version of the FFf algo-rithm is contained in all signal-processing software and in most computer-aided control-design software.

To understand the DFf, it is useful to consider two properties of a signal and its Fourier transform that are complements of each other: the property of being periodic and the property of being discrete. In ordinary Fourier analysis, we have a signal that is neither periodic nor discrete and its Fourier transform is also neither discrete nor periodic. If, however, the time function f(t) is periodic with period To. then the appropriate form of the transform is the Fourier series, and the transform is defined only for the discrete frequencies = To. In other words, if the function in time is periodic, the function in frequency is discrete.

The case where the properties are reversed is the z-transform we have just been studying. In this case, the time functions are discrete. being sampled, and the z-transform is periodic in for if =

e

iwT,corresponding to real frequencies, then replacing =

+

kiT leaves

z

unchanged. We can summarize these results with the following table:

which can be evaluated and plotted by MATLAB'sbode.mwith the scripts sysD

=

tf(num,den,T)

bode(sysD)

where amplitude is plotted as a ratio as in the figures in this text.Ifthe system is described by the state-space matrices, the scripts above can be invoked with

sysD

=

ss(F,G,H,J,T).

4.5.1 *The Discrete Fourier Transform (OFT)

Fourier Transform

Chapter 4 Discrete Systems Analysis

=Ill

= II.

4.6 PropertIes of the z-Transfonn 137

Z{a!1 (kT)

+

fJ!,(kT)}= la!,(k)

+

= aZlfl(k)}

+

= FI

+

1. Linearity: A function fix) linear if

+

= a!(xl)

+

fJf(x,).

Applying this result to the definition of the z-transform, we find immediately that

Dividing these results. we see that with sinusoidal input and output, the frequency response at the frequency = (21f /NTisgiven by

We have the z-transform to show that linear, constant, discrete systems can be described by a transfer function that is the z-transform of the system's unit-pulse response, and we have studied the relationship between the pole-zero patterns of transfer functions in the and the corresponding time responses.

We began a table of z-transforms, and a more extensive table is given in Appendix B. In Section 4.6.1 we turn to consideration of some of the properties of the z-transform that are essential to the effective and correct use of this importanl1001.

In Section 4.6.2 convergence issues concerning the z-transform are discussed and in Section 4.6.3 an alternate derivation of the transfer function is given.

H (e1 =

£,

where

=

F and £,

=

F each evaluated atn

=

We will

discuss Chapter 12 the general problem of estimation of the total frequency response from experimental data using the DFTlFFT as well as other tools.

4.6 Properties of the z-Transform

4.6.1 Essential Properties

In order to make use of a table of z-transforms, one must be able to use a few simple properties of the z-transform which follow directly from the definition. Some of these, such as linearity, we have already used without making a formal statement of it, and others, such as the transform of the convolution, we have previously derived. For reference, we will demonstrate a few properties here and collect them into Appendix B for future reference. In all the properties listed below, we assume that =

=Ill

= I

t:

= - F , \ .

lV }]

II=(]

= {

Equations (·U II) and comprise the OFT

The is periodic with periodN.With this evaluation, we see that the sum we been considering is and thus we have the sum

The DFT of the output is

Because there are N terms in the in Eq. (4.111). it would appear that to compute the OFT for one frequency it will take on the order ofN multiply and add operations; and to compute the OFT for allN frequencies, it would take on the order of multiply and add operations. However. several authors, especially Cooley and Tukey (1965). have showed how to take advantage of the circular nature of the exponential so that allN values of F" can be computed the order ofNlog(N)operation, ifNis a power of 2. ForN = 1024. this is a saving of a factor of lOO. a very large value. Their algorithm and related schemes are called the Fast Transform or FFT.

To use the DFTlFFT in evaluating frequency response. consider a system by Eq. (4.105) and where the input a at frequency = NTso thate(kT) = A /NT).We apply this input to the system alld all transients died At this time. the output given by u(kTj = B N

+

The DFT ofelk)is

136 Discrete

(4.115)

Izi > I.

limI(k)= lim(z - I)F(z).

BecauseV(z)satisfies the conditions of Eq.(4.115).we have T

+

1

limliCk)= lim(z

- 0.5 2

-

1

= lim T

+

I)

C = lim(z - 1)F(z).

However, because all other terms inI(k)tend to zero. the constantCis the final value ofI(k),and Eq.(4.115)results. QED

As an illustration of this property. we consider the signal whose transform is given by

4,6 Properties of the

z-

Transfonn 139

As an illustration of this property. we consider the z-transform of the unit step. I(k).which we have computed before

The conditions onF(z)assure that the only possible pole of not strictly inside the unit circle is a simple pole atz= I.which is removed in (z

-I)F(z). Furthermore. the fact that FCz) converges as the magnitude ofz gets arbitrarily large ensures thatI(k)is zero for negativek..Therefore. all components of

I

(k)tend to zero askgets large. with the possible exception of the constant tenn due to the pole at z= 1.The size of this constant is given by the coefficient ofI/(z - I) in the partial-fraction expansion of F(z).namely

Z{l(k)}= =

- I By property4we have immediately that

Z{r-k1(k)}= r- =

-rz-I z-(llr)

As a more general example. if we have a polynomiala(z)=

+

alZ

+

with roots then the scaled polynomial

+ +

has This is an example of radial projection whereby roots of a polynomial can be projected radially simply by changing the coefficients of the polynomial. The technique is sometimes used in pole-placement de-signs as described in Chapter8.and sometimes used in adaptive control as described in Chapter 13.

5. Final- Value Theorem: If F(z) converges for Izi> I and all poles of(z 1)F(z)are inside the unit circle. then

(4.114) (4.113)

= I(k)(rz)-k

k=-oc

= F(rz). QED Z{r-kI(k)} = F(rz).

Z{r- kI(k)}= r- k ZIf(k

+

n)}= z+" F(z).

ZIf(k+Il)}= I()z-(J-n, J=-oc

= F(z). QED

Z{f(k

+

n)}= I(k

+

n)z-k.

We demonstrate this result also by direct calculation:

By direct substitution, we obtain Ifwe letk

+

n= then

This property is the essential tool in solving linear constant-coefficient dif-ference equations by transforms. We should note here that the transform of the time shift is not the same for the one-sided transform because a shift can introduce terms with negative argument which are not included in the one-sided transform and must be treated separately. This effect causes initial conditions for the difference equation to be introduced when solution is done with the one-sided transform. See Problem 4.13.

4. Scalingillthe z-Plane:

Thus the z-transform is a linear function. It is the linearity of the transform that makes the partial-fraction technique work.

2. Convolution 01 Time Sequences:

We have already developed this result in connection withEq.(4.32).It is this result with linearity that makes the transform so useful in linear-constant-system analysis because the analysis of a combination of such dynamic systems can be done by linear algebra on the transfer functions.

3. Time Sh ift:

138 Chapter 4 Discrete Systems

(4.119) (4,118)

> I.

=

= - 0.5 I

Transform InversionbyPartialFraction

Repeat Example4.12 using the panial fraction expansion method,

4,6 Properlles of the z-Transform

(4.120) Bydirect comparison withV = we conclude that

= T/2.

The second special method for the inversion of is to decompose by partial-fraction expansion and look up the components of the sequence f(k)in a previously prepared table.

Clearly, the use of a computer will greatly the speed of this in all but the simplest of cases, Some may prefer to use synthetic division and omit copying all the extraneous in the division. The process is identical to convening tothe equivalent difference equation and for the unit-pulse response,

and divideasfollows

Equation(4, (18)represents the transfonn of the system output.lI(k).Keeping out the factor ofT/2. we write as a ratio of polynomials in

T

= I +

Solution. The of the output is

• Example 4.13

The right-hand side of Eq, (4.117) is a expansion of about infinity or about = 0. Such an expansion is especially easy ifF(::.)is the ralio of two polynomials in We need only divide the numerator by the denominator in the correct way. and when the division is done. the coefficient of is automatically the sequence valuef(k).An example we worked out before will illustrate the process.

Ifany value off(k) for negativek nonzero. then there will be a in Eq.(4.116) with a positive power of This will be unbounded if the magnitude of is and thus ifF(::.)converges as1::.1approaches infinity. we know that f(k) is zero fork <0. In this case, Eq. (4.116) is one-sided. and we can write

I T

= - - - ( I

+

I)

1-0.52

= 2T.

This result can be checked against the closed form for u(k) given Eq,(4.121) below.

6. As with the Laplace transfonn. the is actually one of pair of transfonns that connect functions of timetofunctions of the complex

The computes a function of from a sequence ink.

(We identify the sequence numberk with time in our analysis of dynamic systems. but there is nothing in the transform per se that requires this.) The inverse is a meansto compute a sequence ink from a given function of We first examine two elementary schemes for inversion of a given which can be used if we know beforehand thatF(::.)is rational and converges as approaches infinity. For a sequence

f

(k),the ::.-transfonn has been defined

z- Tmn.lform Long Diviswn

The system for trapezoid-rule integration has the transfer function by Eq,14,14)

= _I' >

Determine the output for an input which is the geometric series representedby with

r= That is

-• Example 4.12

Chapter 4 Discrete Systems Analysis

(4.123) (4122)

The argument of the integral has no pole inside the contour ifk -I I, and it has zero residue at the pole at = 0 ifk - I < O.Only ifk= Idoes the integral have a residue. and that isI.By Eg. (4.123), the integral is zero ifk Iand is

ifk= I. Thus =

f

(k),which demonstrates Eg. (4.122).

If knownthat f(k) that is.i(k)=0 for then the regiun of convergence is outside the circle' that all the poles ofF(:}for rational It that

by and long

We assume that the series for converges uniformly on the contour of inte-gration. so the series can be integrated term by term. Thus we have

The residue ofF(:) is

First we will use Cauchy's formula to verify Eq. (4.123). If is the off(k), then we write

4.6 Propertles of the z-Trans[orm 143

In Eq. (4.123), means the residue ofF at the singularity at We. will be considering only rational functions, and have only poles as smgulantles.

If has a pole of order11 at then is regular at andean be expanded in a Taylor near as

( - )"F(-)= A +A I(-

--

+....

(4.124)

f(k)= I

where the contour is circle in the region of convergence of To demonstrate the correctness of the integral and to it to compute inverses, it is useful to apply residue calculus Churchill and Brown (1984)]. Cauchy's result that a closed integral of a function which analytic on and inside a closed contour C except at a finite number of isolated singularities is given by is obviously essential to the proper inversion of the transform to obtain the time sequence. The inverse is the closed. complex integral"

=

{-I

k<O0

= Ae2(k)+Be,{k)

= 2Te2{k) - 3T

= (2T -

I(k)

(4.121) Evaluation of Eg. (4.121) for k=O.I.2.... will. naturally, give the same values foru(k)as we found in Eq. (4.120).

T1+2 3T

Looking back now al e2and which constitute our "table" for the moment, we can copy down that

Solution. Consider again Eg. (4.118) and expand as a function of as follows

T I 1 A B

= - - - = - -+

2 1- I - 1- I - O.5z I '

We multiply both sides by I - let = I, and compute

T 2 20.5 Similarly. at =2. we evaluate

has the transform

We now examine more closely the role of the region of convergence of the :-transform and present the inverse-transform integral. We begin with another example. The sequence

This transform is exactly the same as the transform of the unit stepI(k),Eq. (4.95), except that this transform converges inside the unit circle and the transform of the I(k)converges outside the unit circle. Knowledge of the region of convergence