%%html
<iframe width="560" height="315" src="https://www.youtube.com/embed/pkY3RfUrGsM" frameborder="0" allow="accelerometer; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
The z-Transform is a more general transform than the Fourier transform, and we will use it to obtain perfect reconstruction in filter banks and wavelets. Hence we will now look at the effects of sampling and some more tools in the z-domain.
Since we usually deal with causal systems in practice, we use the 1-sided z-Transform, defined as
X(z)=∞∑n=0x(n)z−nObserve this simply takes our sequence x(n) and turns it into the polynomial X(z).
First observe that we get our usual frequency response (the Discrete Time Fourier Transform for a causal signal, starting at n=0) if we evaluate the z-tranform along the unit circle in the z-domain,
z=ejΩThis connects the z-Transform with the DTFT, except for the sample index n, which for the so-called one-side z-Tranform starts at n=0, and for the DTFT starts at n=−∞.
In general, we can write complex variable z with an angle and a magnitude,
z=r⋅ejΩwhere we can interpret the Ω as the normalized angular frequency, and the r a damping factor for an exponentially decaying oscillation, if r<1 (or exponentially growing if r>1.
Observe: This damping factor is not in the DTFT. This means in the z-Transform we can have a converging sum of the transform even for unstable signals or system, by just choosing r large enough! This means the Region of Convergence (ROC) just becomes smaller. Remember, in the z-transform sum we have z−1=1r⋅e−jΩ.
%%html
<iframe width="560" height="315" src="https://www.youtube.com/embed/SCsSYp91CA0" frameborder="0" allow="accelerometer; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
Recommended reading: Alan V. Oppenheim, Ronald W. Schafer: “Discrete Time Signal Processing”, Prentice Hall.
%%html
<iframe src='https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-341-discrete-time-signal-processing-fall-2005/', width=900, height=400></iframe>
z-Transform definition:
x(n)→∞∑n=0x(n)⋅z−n=:X(z)The z-transform turns a sequence into a polynomial in z.
Example: x(n)=[2,4,3,1]
X(z)=2+4z−1+3z−2+z−3%%html
<iframe width="560" height="315" src="https://www.youtube.com/embed/YPU8FB3qSgY" frameborder="0" allow="accelerometer; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
Take two causal sequences (causal means sample value 0 for negative indices): Sequence x(n), and x(n-1), which is the same sequence but delayed by one sample. Then their z-transforms are:
x(n)→∞∑n=0x(n)⋅z−n=:X(z)Use the index substitution, n′←n−1 or n′+1←n to get rid of the "n−1" in the transform:
=∞∑n′=0x(n′)⋅z−(n′+1)=z−1⋅∞∑n′=0x(n′)⋅z−n′=X(z)⋅z−1This shows that a delay by 1 sample in the signal sequence (time domain) corresponds to the multiplication with z−1 in the z-domain:
x(n)→X(z)%%html
<iframe width="560" height="315" src="https://www.youtube.com/embed/U17KDyOI58I" frameborder="0" allow="accelerometer; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
Example: Signal: x0=[1,2,3] => X0(z)=1+2z−1+3z−2
Signal, delayed by 1 sampling period:
x1=[0,1,2,3]=>X1(z)=0+1z−1+2z−2+3z−3=
In the z-domain the delay shows up as multiplication with z−1,
=X0(z).z−1Related to the shift property is the z-transform of the shifted unit pulse. The unit pulse is defined as
Δ(n)=(1,ifn=00,else)so it is just a zero sequence with a 1 at time 0.
Its z-Transform is then:
Δ(n)→1The z-transform of the shifted unit pulse is:
Δ(n−d)→z−dShifted by d samples.
The “unit step” function is defined as:
u(n)=(1,ifn≥00,else)The z-transform turns a convolution into a multiplication.
Remember: the convolution is defined as:
x(n)∗y(n)=∞∑m=−∞x(m)⋅y(n−m)This is because the convolution of 2 sequences behave in the same way as the multiplication of 2 polynomials (the z-transform) of these sequences. This is one of the main advantages of the z-Transform, since it turns convolution into a simpler multiplication (which is in principle invertible).
%%html
<iframe width="560" height="315" src="https://www.youtube.com/embed/9XRlk27e9zU" frameborder="0" allow="accelerometer; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
Exponential decaying sequence: x(n)=pn for n=0,1,..., meaning the sequence
1,p,p2,p3,...Remember: we had a closed form solution for this type of geometric sums:
S=N−1∑k=0ckits solution was:
S=cN−1c−1Now we have an infinite sum, which means N goes towards infinity. But we have the expression cN in the solution. If ∣c∣<1, then this goes to zero cN→0. Now we have c=p⋅z−1. Hence, if ∣p⋅z−1∣<1 we get
→X(z)=11−p⋅z−1=zz−pObserve that this fraction has a pole at position z=p, and a zero at position z=0. Hence if know the pole position, we know p, and if we know p we know the time sequence. So the location of the pole gives us very important information about the signal.
Keep in mind that this solution is only valid for all p which fullfill ∣p⋅z−1∣<1. We see that this is true for ∣z∣>∣p∣. This is also called the “Region of Convergence” (ROC). The ROC is connected to the resulting stability of the system or signal.
The region of convergence is outside the pole locations. If the region of convergence includes the unit circle, we have a stable system. This means: if the poles are inside the unit circle, we have a stable system.
The sum of x(n) converges (we get the sum if we set z=1) if abs(p)<1. In this case we also say that the signal or system is stable (meaning we obtain a bounded output for a bounded input, so-called “BIBO stability”). In this case we see that the resulting pole of our z-transform is inside the unit circle. If abs(p)>1, we have an exponential growth, which is basically an “exploding” signal or system (meaning the output grows towards infinity), hence unstable.
In general we say that a system or a signal is stable, if the poles of its z-transform are inside the unit circle in the z-domain, or unstable if at least one pole is outside the unit circle (it will exponentially grow).
These are basic properties, which can be used to derive z-transforms of more complicated expressions, and they can also be used to obtain an inverse z-transform, by inspection.
For instance if we see a fraction with a pole in the z-Transform, we know that the underlying time sequence has an exponential decay or oscillation in it.
Observe that we can obtain a real valued decayed oscillation if we have 2 poles, each the conjugate complex of the other, or one with +Ω and one with −Ω. In this way, we cancel the imaginary part.
One of the main differences compared to the Discrete Time Fourier Transform (DTFT): With the z-transform we can see if a signal or system is stable by looking at the position of the poles in the z-domain. This is not possible for the DTFT, since there we don't know the positions of the poles.
Now take a look at our down sampled signal from a previous notebook: xd(n)=x(n)⋅ΔN(n)=x(n)⋅1NN−1∑k=0ej2πN⋅k⋅n
Now we can z-transform it
∞∑n=0xd(n)⋅z−n=∞∑n=0x(n)⋅1NN−1∑k=0ej2πN⋅k⋅n⋅z−nHence the effect of multiplying our signal with the delta impulse train in the z-domain is
Xd(z)=1NN−1∑k=0X(e−j2πN⋅k⋅z)Observe that here the aliasing components appear by multiplying z with e−j2πN⋅k, which in effect is a shift of the frequency.
Remember from last time, the effect of the removal or re-insertion of the zeros (changing the sampling rate) from or into the signal xd(n) at the higher sampling rate and y(m) at the lower sampling rate in the z-domain is
Y(z)=Xd⋅(z1N)%%html
<iframe width="560" height="315" src="https://www.youtube.com/embed/Nf2QBWC0hCQ" frameborder="0" allow="accelerometer; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
z-Transform using Python
%%html
<iframe width="560" height="315" src="https://www.youtube.com/embed/n4keW_vluJA" frameborder="0" allow="accelerometer;
encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
Frequency Response: z-Transform and the DTFT
%%html
<iframe width="560" height="315" src="https://www.youtube.com/embed/NMGtwYE8veQ" frameborder="0" allow="accelerometer; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>