Lec 13
Lec 13
This is the 13th lecture on DSP and we continue our discussion of Z transforms today. In the last
lecture, we talked about the Inverse Z transform in terms of an integral. That integral is also a
special integral, because it is a contour integral, the variable being a complex one, z = rej omega, so
we have to choose the contour and then carry out the integration. If you have to evaluate the
integral, then Cauchy’s residue theorem can be used. Fortunately for us, z-transforms for LTI
systems of importance are rational functions and therefore we can evaluate the inverse Z
transform by either partial fraction expansion and then inverting term by term, or by long
division. The disadvantage of long division is that you may not be able to guess a general
formula for the inverse Z transform.
On the other hand, partial fraction expansion always gives you a closed form formula. I also
pointed out that if the rational function is P(z)/Q(z) with degree of P(z) greater than the degree of
Q(z), then this will be written as some polynomial in Z inverse + a proper rational function that
is A(z) + P1(z)/Q(z) where the degree of P1 is less than the degree of Q, that is, P1/Q is a proper
rational function. Then you invert A(z) term by term which is very easy. If you have term like
5z–5, then its inversion gives 5 delta (n – 5). For P1/Q you have to carry out partial fraction
expansion. I also pointed out that if there are multiple poles, then in general, you have to carry
out differentiation. But the differentiation can be avoided by using a simple trick that I have
asked you to follow. That is, write a set of linear equations by putting specific values of z and
then evaluate the required constants. We pointed out the importance of region of convergence
(ROC) and we showed that u(n) and – u(– n – 1) both have a z-transform 1/(1 – z–1). The ROC
for u(n) is mod(z) greater than 1 and ROC for u(–n – 1) is mod(z) less than 1.
1
(Refer Slide Time: 02:47-04:33)
We also took an example in which there were three possible ROC’s and three different
sequences. The Z transform is a one to one transformation only if ROC is specified. Otherwise
the answer can be non unique. We started with the properties of Z transform. Before that I had
introduced some notations that is, for G(z), the ROC is denoted by Rg and for H(z) the ROC is
denoted by Rh,Rg is the symbol for inequality: Rg1 is less than mod z less than Rg2. Then we also
used the notation 1/Rg which means 1/Rg2 less than mod z less than 1/Rg1. Also the meaning of
RgRh is: Rg1Rh1 less than mod z less than Rg2Rh2. And then we talked about several properties of
z-transforms.
2
(Refer Slide Time: 05:06-06:22)
Firstly, g*(n) has the transform G*(Z*). The region of convergence is the same as Rg, because
mod z* is same as mod z. Then g(–n) transforms to G(1/z) and the region of convergence is 1/Rg.
Alpha g(n) + beta h(n) transforms to alpha G(z) + beta H(z) and ROC includes the intersection of
Rg and Rh., but it can be wider. I explained why it can be wider; the possibility arises because
there can be cancellation of zeros and poles.
3
(Refer Slide Time: 06:27-07:47)
And then, if I shift a sequence by n0 that is, if I take g(n – n0), the corresponding z-transform is z–
n0
G(z) and region of convergence is Rg, except for either z = 0 or z = infinity depending on n0
and cancellations. Suppose your n0 is 1 and there is a term in the denominator which is z–1; they
may cancel. Therefore it is Rg with possible exception of z = 0 or z = infinity. If I multiply the
sequence by alphan, then we get G(z/alpha) and the region of convergence is mod alpha times Rg.
The next property is that of differentiation. That is, if you multiply a sequence by n then the
corresponding z-transform is – z[dG(z)/dz]. You have to carry out the differentiation and this
will give you a clue for inversion of 1/(1 – alpha z–1)r; that is the case of multiple poles. We shall
carry out an example a little later.
4
(Refer Slide Time: 07:51-09:44)
If you have a linear convolution of two sequences g(n) and h(n), the corresponding Z transform
is the product G(z)H(z). What is the region of convergence here? I did not mention this. It would
be the overlap of Rg and Rn, but it can be wider. There can be cancellations.
Finally, the modulation property: that is, if you multiply g(n) by h(n) the corresponding Z
transform is a contour integral. This is a convolution in the Z domain. The corresponding Z
transform is [1/(2pi j)] contour integral over some contour [G(v)H(z/v)v–1 dv; this is the formula
for modulation. And I strongly urge you to prove each of these properties. For the modulation
property, the clue is that you replace G(v) by its equivalent expression, that is, summation
[g(n)v–n]. Then interchange the summation and the integration. You should be able to prove it.
Obviously, the ROC has the product RgRh, in the sense that we have defined it; but again it
includes Rg Rh, it can be wider because there can be cancellations.
5
(Refer Slide Time: 09:57-12:26)
As a simple example of application of the table of z-transforms, let us consider, x(n) = rnsin(n
omega0)u(n). We write this as [(1/(2j)] [rn (ejnomega0 – e–jnomega0)u(n)]. The z-transform would be
[1/(2j)][summation(rn (ejnomega0 z–n)– summation(rn e–jnomega0 z–n)], where n = 0 to infinity. We can
calculate this; we can also view these two sequences rn (ejnomega0), and then rn (e–jnomega0) as
complex conjugates of each other. In other words we could write this as [1/(2j)] [(v(n)) – v*(n)],
where v(n) is (rn ejnomega0 )u(n).
6
(Refer Slide Time: 13:30-15:53)
If we apply the formula then my desired transform is X(z) = [1/(2j)] [(V(z)) – V*(z*)]. Let us see
what this is: [1/(2j)] [(1/(1 – rej omega 0 z–1)) – (1/(1 – rej omega 0 z*–1)) *]. Now what is this latter
quantity? Obviously this is 1/(1 – re–j omega 0 z–1). Now you can add the two quantities and get the
desired result. What is the result?
7
(Refer Slide Time: 16:01-17:32)
The result is (r cosine(omega0) z–1)/[1 – 2r cosine(omega0) z–1 + r2 z–2]. The transforms of sine,
cosine, delta n, u(n), ejnmega0 you should be able to write without consulting the table. You do not
have to turn the pages of the book to find these out. If it is cosine, then what is the modification
needed? The answer is (1 – r sine (omega0) z–1)/(the same denominator).
8
Now let us take an example of multiple poles and illustrate how we carry out the actual
calculations. X(z) = z4/[(z – 0.5)2(z – 0.2)(z + 0.6)]; the ROC must be specified and in this case it
is specified as mod z greater than 0.6 which means that it will be a right sided sequence and a
causal sequence. So, the first thing we do is to write X(z) as a rational function z–1 that is we
divide by z4 then we get X(z) = 1/[(1 – 0.5 z–1)2(1 – 0.2 z–1)(1 + 0.6 z–1)], Why do we do this?
We do this because we know the inverse transform of 1/[1 – (alpha)z–1]. We write X(z) = A/(1 +
0.6 z–1) + B/(1 – 0.2 z–1) + C/(1 – 0.5 z–1) + D/(1 – 0.5 z–1 )2 and this creates the problem. A is (1
+ 0.6 z–1) multiplied by X(z) with 0.6 z–1 = –1. Similarly, you can find B. You calculate D by
multiplying both sides by (1 – 0.5z–1)2 and by putting 0.5 z–1 = 1.
I have done this and the results are as follows: A = 27/121, B = 1/9, D = 25/33. There is a reason
why I have kept them as fractions, I have told you the reason earlier also. The reason is that we
do not truncate unless it is absolutely essential because in implementation we have to truncate
anyway and because of finite word length constraint, we cannot represent every number exactly.
So do not truncate till it is absolutely essential. Now the question of finding C. If you examine
the partial fraction expression for X(z) what would be a convenient value of z to put? I have to
write only one equation, because there is only one unknown. Convenient value of z obviously
9
would be z–1 = 0 that is z = infinity. What would be X(z) at infinity? From the given expression it
is 1; therefore 1 = A + B + C + D, you see it is as simple as that, you do not have to differentiate.
You know A, B and D, so you can find C = 1 – (A + B + D); unfortunately, this number comes
big but there is nothing to worry. You keep it as it is. The value is C = 116/1089. The problem
now is that of inversion.
Inverse of the A, B, C term would be A(– 0.6)nu(n) + B(0.2)nu(n) + C(0.5)nu(n). Now only the D
term remains. Let us look at the general formula, then I will leave the rest for your calculation.
General formula is that alphan u(n) has the transform 1/(1 – alpha z–1). If I multiply by n, then for
n(alphan)u(n) the z-transform would be – z(d/dz) (1/(1 – alpha z–1)). If I differentiate with respect
to z and simplify, the result is alpha z–1/1 – alpha z–1)2; what we want is that the numerator
should be 1. Therefore first thing I do is to divide by alpha and advance the sequence by one
sample. Hence the inverse of (1 – alpha z–1)–2 would be (n + 1) alphan u(n + 1).
10
(Refer Slide Time: 24:14-26:57min)
Here is something interesting that I want you to notice: 1/(1 – alpha z–1)2, has the inverse
transform (n + 1)alphan u(n + 1). Now this sequence at n = – 1 is 0. Therefore you can write this
as (n + 1)alphan u(n). The whole thing is to be written in terms of u(n). You can now collate the
final result and the expression that I get is x(n) = [0.2231(– 0.6)n + 0.1111(0.2)n – 0.0918(0.5)n +
0.7576(n + 1) (0.5)n ]u(n). I have truncated the numbers here and n + 1 is the multiple pole term.
11
(Refer Slide Time: 26:11-28:29)
We go back to the modulation theorem that is if x(n) = g(n)h(n), then the z-transform is [1/(2 pi
j)] contour integral[G(v)H(z/v)v–1dv]. I can write summation[g(n)h(n)z–n] = [1/(2 pi j)] contour
integral[G(v)H(Z/v)v–1dv] where n goes from – infinity to + infinity. In this expression, if I make
g(n) = h(n) and put z = 1 then the left hand side simply becomes the energy of the sequence and
the right hand side becomes [1/(2 pi j)] contour integral [G(v) G(v–1) v–1 dv]. Since v is a dummy
variable we can as well change it to z. So I can write the right hand side as: [1/(2 pi j)] contour
integral [G(z)G(z–1) z–1dz]. Now if the region of convergence includes the unit circle then we
know the Fourier transform exists. In other words the contour can be the unit circle. If FT of g(n)
exists, then we could put z = ejomega. A sufficient condition for the existence of Fourier transform
is that g(n) is absolutely summable.
12
(Refer Slide Time: 28:42 - 34:23)
However, we can apply the general modulation theorem in Z transform. Here g (n) was taken as
a real sequence and we took g(n) = h(n). If g(n) was complex, then we would have taken h(n) =
g*(n) and same result would have followed.
We have so far talked about signals. How do they interact with systems? That is, we take a
discrete time system and see how it can be characterized in the transform domain.
We have learnt about Fourier transform, DFT and z transform of signals. How do they help in
characterizing discrete time systems? One of the things you should appreciate is that any signal
can be decomposed into sinusoids. When you take a periodic signal in the continuous time
13
domain, we take Fourier serious which is a summation of sinusoids of frequencies which are
harmonically related. There is a fundamental frequency that is 1/period, then we have second
harmonic, third harmonic, fourth harmonic and so on. When the signal is not periodic, then what
do we do? We take Fourier transform which means that the spectrum consists of all frequencies
starting from 0 up to infinity. But it can also be looked upon as a continuum of sinusoids.
Therefore any signal, be it continuous time or discrete time, can be thought of as a superposition
of sinusoids. The separation between two adjacent sinusoids is infinitesimally small, d(omega),
and that is why we use integral. You also know that any sinusoid can be written as a sum of two
exponential signals by Euler’s theorem. Therefore an exponential signal is the most elementary
signal as far as characterization of a system is concerned. If we know the response to a sinusoid
or an exponential signal, then we know the response to all other signals. So we try to find out the
response to an exponential signal. We consider a Linear Time Invariant (LTI) system for which
you know that the output is given by the convolution of the input and the impulse response. For a
digital LTI system, the output is given as: y(n) = summation[x(n – k)h(k)], where k goes from –
infinity to + infinity.
14
Now, to this system we apply an input x(n) = ejomegan, so x(n – k) = ejomega (n – k); the ejomega n term
can be taken outside this summation because the variable of summation is k so I get the output as
(ejomegan) summation [h(k)e–jomegak] where k goes from – infinity to + infinity. You notice that
since this summation is independent of n, it can be simply replaced by a constant H(ejomega). So
y(n) is H(ejomega)(ejomegan); such functions which when supplied as an input to the system
produces an output which is a constant multiplied by the same function, are called
Eigenfunctions. So ejomegan is an Eigenfunction of a Linear Discrete Time Invariant system. You
notice that H(ejomega) = summation[h(k)e–jomegak] where k goes from – infinity to + infinity. This
is simply the Fourier transform of h(n).
The quantity H(ejomega) is known as the frequency response of the system. It is a characteristic of
the system just as h(n) is a characteristic of the system. It is the same characterization as h(n),
transformed to the frequency domain. It is called frequency response because it involves omega.
It shows the complete frequency behavior of the system. In general, you see that H is a complex
quantity. It can be written as H(ej omega) = magnitude[H(ejomega)]ej angle of H(ejomega). Magnitude must
be real and even. Similarly, the phase is odd but also a real quantity. Angle and phase are
15
equivalent terms. Now it is interesting to see that ejnomega leads to H(e j omega) ejomegan because this
system is linear. If we take the real parts in both sides they should correspond to each other.
j omega
In other words, cosine(n omega), will give the response |H(e )| cosine(omega n + angle of
H(jomega)). In a similar manner, if I have an input of sine (n omega) then all that differs is that
instead of cosine, I get a sine. This gives the steady state response of the system to either an
exponential signal or a cosine signal or a sine signal. So this signal, ejn omega is the most important
one in practice. In the time domain, the most important signal is delta n because if you know h(n)
then you know the total characteristic of the system. Correspondingly in the frequency domain, it
is ejn omega
; if you know the response to ejn omega
or you know H(ejomega) (they are equivalent
characterizations), you can find the response to any other signal. Let us take an example.
16
(Refer Slide Time: 44:31- 46:13)
The example that we take is the M point moving average system. We have taken this example
earlier also, in which the output at an instant n is the average of all inputs starting from the
present instance to the (M – 1)th instant; that is, it is the average of all x(n – k), k = 0 to M –
1.What kind of system is this, is it FIR or IIR response? This is FIR because h(n) =
(1/M)summation[delta (n – k)] where k = 0 to M – 1. So it is indeed an FIR system and for
frequency response all we have do is to take the Fourier transform of h(n). So we shall get a
summation, 1 + e– j omega + …. up to the Mth term, e(j omega)(M – 1) and the whole thing divided by
M.
17
(Refer Slide Time: 46:17 - 48:03)
So the frequency response is H(ejomega) = (1/M) [1 + e–jomega + e–j(M – 1)ω]. Since this is a geometric
series we can sum it up as (1/M) (1 – e– jomega M)/(1 – e– jomega). You know that this can be written
in terms of series and (1/M) [sine((omega M/2)/sine(omega/2)][e–jomega(M – 1)/2)
]. It is very
tempting to identify (1/M) × ratio of sines as the magnitude and the (power of e)/j as the phase,
but this is not correct because [sine(omega M/2)/sine(omega/2)] changes signs. Whenever it
changes sign, the phase changes by 180°.
18
(Refer Slide Time: 48:14 - 51:04)
For example, if I plot (1/M) [sine (omega M/2)/sine(omega/2)] versus omega, then the omega =
0 value is 1. Then it decreases, and then it executes damped oscillations. Now where does the
first 0 occur? It occurs when the numerator angle becomes equal to pi. That is, omega = 2pi/M.
The denominator remains non-zero at ω = 2pi/M. The next zero crossing would be at ω = 4pi/M
and so on. At every such transition, the phase increases by pi. So the magnitude is not [1/M]
[sine (omega M/2)/sine(omega/2)], but its magnitude. The negative halves of the ratio of sines
will flip over.
19
(Refer Slide Time: 51:13- 54:41)
Therefore the magnitude and phase of the frequency response can be written like this: |H(ejomega)|
= |[sine (omega M/2)/sine(omega/2)]|. And the angle of H would be – omega (M – 1)/2 added to
the phase transitions by pi. Wherever there is a 0 crossing there occurs a phase transition. So an
angle pi is added there. Therefore the general expression becomes – (omega(M – 1)/2) +
summation[pi u(omega – (2pi/M)k)]. There are many transitions. At each transition a step
function of magnitude pi is added to the previous phase. Step functions of magnitude pi occur at
omega = (2pi/M)k where k goes from 0 to M/2. Our range of vision is omega = 0 to pi and
therefore when k becomes M/2, then the transition stops. But M/2 may or may not be an integer.
So the last transition occurs at the integer closest to M/2 but less than M/2. For example, if M
was 5 then the last transition shall occur at k = 2. We indicate this by M / 2 with a special sign.
This sign is not the square bracket, the upper end is truncated. This M / 2 indicates that integer
closest to M/2 but less than M/2. Similarly, if I write a quantity M like M , it indicates an
20
(Refer Slide Time: 54:49- 57:43 min)
Figure shows the magnitude as well as phase for two values of M: one is M = 5 and the other is
14. If you have M = 5, then the first transition occurs at ω/π = 0.4. The next one shall occur at
0.8. There are only two transitions here because 5/2 is 2.5 and the integer closest to it is 2. Look
at the phase, the phase starts from 0 and goes down to the value – 0.8 π. At 0.4, it jumps up
exactly by 180°. Then the quantity [sine ((omega M/2)/sine(omega/2)] remains negative. Then it
comes down again in a linear manner. Then at the next transition ω/π = 0.8, another pi is added.
So the phase becomes a triangular waveform with a rising tendency. The phase is not – omega
(M – 1)/2; you have to state the phase within the range of vision. If M is 14, then you see the
transition occurs at less than 0.2. How many transitions now? Exactly 7; the 7th one is the end of
the vision at omega = pi. So the phase behaves in a very peculiar manner; while in specifying
magnitude we have no ambiguity. In specifying phase, the transition must be taken care of; it is
not phase simply going linearly negative.
21