This session introduces the z-transform which is used in the analysis of discrete time systems. As for the Fourier and Laplace transforms, we present the definition, define the properties and give some applications of the use of the z-transform in the analysis of signals that are represented as sequences and systems represented by difference equations.
The material in this presentation and notes is based on Chapter 10 of Steven T. Karris, Signals and Systems: with Matlab Computation and Simulink Modelling, 5th Edition from the Required Reading List. Additional coverage is to be found in Chapter 12 of Benoit Boulet, Fundamentals of Signals and Systems from the Recommended Reading List.
In this session, we will see that a periodic and discrete time function results in a periodic and discrete frequency function.
For convenience we summarize these facts in a table:
Topic | Time Function | Frequency Function |
---|---|---|
Fourier Series | Continuous, Periodic | Discete, Non-Periodic |
Fourier Transform | Continuous, Non-Periodic | Continuous, Non-Periodic |
Z Transform | Discrete, Non-Periodic | Continuous, Periodic |
Discrete Fourier Transform | Discrete, Periodic | Discrete, Periodic |
In the following we shall denote a DT signal as $x[n]$ and its discrete frequency function as $X[m]$.
The value of this function on the unit circle in the Z-plane will be
$$F(e^{j\omega T}) = \sum_{n=0}^{\infty} f[n]e^{-jn \omega T}.$$
This is an infinite sum. So to compute it, we need to truncate it.
Let's assume that instead of an infinite number of points, we have $N$, equally distributed around the unit circle, then the truncated version will be:
$$X[m] = \sum_{n=0}^{N-1} x[n]e^{-j2\pi \frac{m n}{N}}$$
where
$$\omega = {\text{ }}\left( {\frac{{2\pi }}{{N}}} \right)m$$
and $m = 0,1,2,\ldots, N-1$.
We refer to the equation
$$X[m] = \sum_{n=0}^{N-1} x[n]e^{-j2\pi \frac{m n}{N}}$$
as the N-point Discrete-time Fourier Transform (DFT) of $x[n]$.
The inverse DFT is defined as
$$x[n] = \frac{1}{N} \sum_{m=0}^{N-1} X[m]e^{j2\pi \frac{m n}{N}}$$
for $n = 0,1,2,\ldots, N-1$.
Note the symmetry of the DFT and the Inverse DFT!
In general, the DFT is complex, and thus it can be expressed as
$$X[m] = \Re\left\{X[m]\right\} + \Im\left\{X[m]\right\}$$
for $m = 0,1,2,\ldots,N-1$.
Since
$$e^{-j2\pi \frac{m n}{N}} = \cos\left(\frac{2\pi m n}{N}\right) + j\sin\left(\frac{2\pi m n}{N}\right)$$
the DFT can be expresssed as
$$X[m] = \sum_{n=0}^{N-1} x[n]e^{-j2\pi \frac{m n}{N}} = \sum_{n=0}^{N-1}x[n]\cos\left(\frac{2\pi m n}{N}\right) + j\sum_{n=0}^{N-1}x[n]\sin\left(\frac{2\pi m n}{N}\right).$$
For $n=0$ this reduces to
$$X[m] = x[0].$$
Then the real part of $X[m]$ is
$$\Re \left\{ {X[m]} \right\} = x[0] + \sum\limits_{n = 1}^{N - 1} x [n]\cos \left( {\frac{{2\pi mn}}{N}} \right)\quad {\text{for}}\quad m = 0,1,2, \ldots ,N - 1$$
and the imaginary part is
$$\Im \left\{ {X[m]} \right\} = - \sum\limits_{n = 1}^{N - 1} x [n]\cos \left( {\frac{{2\pi mn}}{N}} \right)\quad {\text{for}}\quad m = 0,1,2, \ldots ,N - 1$$.
A discrete time signal is defined by the sequence $x[0] = 1$, $x[1] = 2$, $x[2] = 2$, $x[3] = 1$, and $x[n]=0$ for all other values of $n$. Compute the frequency components $X[m]$.
Use the inverse DFT to compute the discrete-time sequence $x[n]$ from $X[m]$.
See dft_ex10_1.slx
dft_ex10_1
xn = [1, 2, 2, 1];
open dft
Xm = dft(xn,4)
Xm = 6.0000 + 0.0000i -1.0000 - 1.0000i 0.0000 - 0.0000i -1.0000 + 1.0000i
open idft
xn = idft(Xm,4)
xn = 1.0000 - 0.0000i 2.0000 - 0.0000i 2.0000 + 0.0000i 1.0000 + 0.0000i
The term $$e^{-j(2\pi)}/N$$ is a rotating vector where the range $0 <= \theta <= 2\pi$ is divided into $360/N$ equal segments.
It is convenient to represent this as $W_N$, that is $$W_N = e^{-\frac{j2\pi}{N}}$$ and consequently, $$W_N^{-1} = e^{\frac{j2\pi}{N}}.$$
Compute the complex numbers represented by the rotating vector $W_8$
Using this notation, the DFT and inverse DFT pairs are represented as:
$$X[m] = \sum_{n=0}^{N-1} x[n]W_N^{nm}$$ and $$x[n] = \frac{1}{N}\sum_{n=0}^{N-1} x[n]W_N^{-nm}$$
In the remainder of these notes, the correspondence between $x[n]$ and $X[m]$ will be written
$$x[n] \Leftrightarrow X[m]$$
In example 2, we found that, although the DT sequence $x[n]$ was real, the discrete frequency (DF) sequence was complex. However, in most applications we are interested in the magnitude and phase of the DF, that is $$|X[m]|$$ and $$\angle X[m]$$.
Use MATLAB to compute the magnitude of the frequency components of the following DT function:
$n$ | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
$x[n]$ | 1.0 | 1.5 | 2.0 | 2.3 | 2.7 | 3.0 | 3.4 | 4.1 | 4.7 | 4.2 | 3.5 | 3.6 | 3.2 | 2.9 | 2.5 | 1.8 |
We will compute this in class and make some comments afterwards.
xn = [ 1, 2, 3, 2.5, 1.5, 0.5,...
-0.5, -1.5, -2.5, -0.5,...
0.25, 1.25, 2, 1.5, 1, 0.5];
stem([0:15],xn),xlabel('n'),ylabel('x[n]'),title('Discrete Time Sequence')
Xm = dft(xn,16);
stem([0:15],abs(Xm)),xlabel('m'),ylabel('|X[m]|'),title('Discrete Frequency Sequence')
The discrete time and discrete frequency functions are defined as even or odd in according to the following relations:
Even time function: $f[N - n] = f[n]$
Odd time function: $f[N - n] = -f[n]$
Even frequency function: $F[N - m] = F[m]$
Odd frequency function: $F[N - m] = -F[m]$
Even and odd properties of the DFT
Discrete time sequence $f[n]$ | Discrete frequency sequence $F[m]$ |
Real | Complex Real part is Even Imaginary part is Odd |
Raal and Even | Real and Even |
Raal and Odd | Imaginary and Even |
Imaginary | Complex Real part is Odd Imaginary part is Even |
Imaginary and Even | Imaginary and Even |
Imaginary and Odd | Real and Odd |
We denote the DFT and inverse DFT using as follows:
$$X[m] = \mathcal{D}\left\{x[n]\right\}$$
and
$$x[n] = \mathcal{D}^{-1}\left\{X[m]\right\}$$
We then state the following useful properties. For proofs, see Karris, 10.3. Not examined.
$$a x_1[n] + b x_2[n] + \cdots \Leftrightarrow a X_1[m] + b X_2[m] + \cdots$$
$$x[n-k] \Leftrightarrow W_n^{km} X[m]$$
$$W_n^{-km} x[n] \Leftrightarrow X[m-k]$$
$$x[n]*h[n] \Leftrightarrow X[m] H[m]$$
$$x[n]y[n] \Leftrightarrow \frac{1}{N}\sum_{k=0}^{N-1} X[k] Y[m - k] \Leftrightarrow X[m] * Y[m]$$
The relationships between these quantities are:
$$t_t = \frac{T_t}{N}$$
$$f_s = \frac{1}{t_t}$$
$$t_f = \frac{T_f}{N}$$
$$t_t = \frac{1}{T_f}$$
$$f_f = \frac{1}{T_t}$$
We will add these quantities to the results of Example 4 in class.
The period of a periodic DT function is 0.125 ms and it is sampled at 1024 equally spaced points. It is assumed that with this number of samples, the sampling theorem is satisfied and thus there will be no aliasing.
Next session
(without the mathematics)
Try Exercise 1 and Exercise 2 in Karris 10.8 by hand.
For the exam, I wouldn't expect you to compute the whole sequence for a signal with more than 4 samples. However, you will need to be able to compute the DFT $x[n]$ and IDFT $X[m]$ of an 8-point sequence for any single value $n$ or $m$.