7.3.3 The Z-Transform

7.3.3 The Z-Transform

If you continue to work in digital signal processing, you need to be familiar with the z-transform, a mathematical operation that converts a discrete time domain signal into a frequency domain signal represented as real or complex numbers. The formal definition is below.

Let $$\mathbf{x}\left ( n \right )$$ be a sequence of discrete values for $$n=0,1,\cdots $$. The one-sided z-transform of $$\mathbf{x}\left ( n \right )$$, $$\mathbf{X}\left ( z \right )$$, is a function that maps from complex numbers to complex numbers as follows:

[equation caption=”Equation 7.5 The one-sided z-transform”]

$$!\begin{matrix}\mathbf{X}\left ( z \right )=\sum_{n=0}^{\infty }\mathbf{x}\left ( n \right )z^{-n}\\\textit{where z is a complex number}\end{matrix}$$

[/equation]

A full z-transform sums from -∞ to ∞, but the one-sided transform suffices for us because n isan index into an array of audio samples and will never be negative.

In practice, our sector of time domain audio samples, has a finite length N. Thus, if we assume that for $$\mathbf{x}\left ( n \right )=0\; for\; n\geq N$$, then we can redefine the transform as

$$!\mathbf{X}\left ( z \right )=\sum_{n=0}^{N-1}\mathbf{x}\left ( n \right )z^{-n}$$

$$\mathbf{X}\left ( z \right )$$ is a discrete function from complex variables to complex variables. Now, look at what results if we set $$z=e^{\frac{i2\pi k}{N}}$$ and apply the z-transform to a vector of length N (applying the equation N times for $$0\leq k< N$$). This yields the following:

[equation caption=”Equation 7.6 The discrete Fourier transform as a special case of the z-transform”]

$$!for\; 0\leq k< N,\mathbf{X}\left ( Z_{k} \right )=\sum_{n=0}^{N-1}\mathbf{x}\left ( n \right )\left ( e^{i2\pi k} \right )^{-n}=\sum_{n=0}^{N-1}\mathbf{x}\left ( n \right )e^{\frac{-i2\pi kn}{N}}=\sum_{n=0}^{N-1}\mathbf{x}\left ( n \right )\cos ^{\frac{2\pi kn}{N}}-i\mathbf{x}\left ( n \right )\sin ^{\frac{2\pi kn}{N}}$$

[/equation]

The idea of Equation 7.6 is that we are evaluating the equation for each $$k^{th}$$ frequency component $$\left ( \frac{2\pi k}{N} \right )$$ to determine N frequency components in the audio data. You can see that this equation is equivalent to the definition of the discrete Fourier transform given in Chapter 2. The Fourier transform transforms from the time domain (real numbers) to the frequency domain (complex numbers), but since real numbers are a subset of the complex numbers, the Fourier transform is an instance of a z-transform.