Previous SPTK Post: Practical Filters Next SPTK Post: TBD
In this Signal Processing ToolKit post, we look at the discrete-time version of the Laplace Transform: The Z Transform.
From the sampling theorem, we know that we can focus on regularly spaced samples of any bandlimited continuous-time signal and we will not lose any information about in doing so, provided we sample often enough. The impulse-sampled signal , given by
is therefore equivalent, in an information sense, to itself, and since this signal can be constructed from the set of samples, , the samples themselves are sufficient to describe the analog signal.
We can ask about the properties of . What does this signal look like through the lens of the Fourier and Laplace transforms? Let’s focus on the more general Laplace transform and apply it to . Straightforward application of the Laplace transform to (2) yields, due to the linearity of the transform,
We learned in the SPTK Laplace Transform post that . What about the closely related transform ? Let’s tackle it directly,
So our Laplace transform becomes
which doesn’t look too helpful, actually. But let’s define our way out of confusion or trouble by introducing a new variable ,
which, when used in our expression for leads to ,
That’s the Z transform.
Recall that a major preoccupation in the Laplace transform world is the convergence of the transform, which depends on the value of the real part of , which is . Laplace transforms convert (exist as regular functions) or diverge (do not exist) based on the value of –they exist in half-planes of the -plane for some value of such as . Sometimes , which means the transform exists for all values of .
For the Z transform, we can predict that the regions of convergence will consist of the interiors of circles in the -plane centered at the origin. This is because the mapping maps half-planes in the plane to circles centered at the origin in the plane. Let’s look at that in some detail. The mapping is
which means that
Keep in mind that in the -plane, which corresponds to the Laplace transform, the real part of is and the imaginary part is . So the plane is determined by along the x-axis and along the y-axis.
Now the function is a monotonically increasing function on , and and . Also, . Therefore, for and for . Just reviewing here.
Now consider all the points in the -plane for , which is , or the y-axis. (This is an important part of the -plane because it connects the Fourier transform to the Laplace transform.) For this set of points in the -plane, the variable is
and since can be any real number, in this case is a unit-magnitude number with any phase–a number on the unit circle in the -plane. So we see that the entire frequency axis in the -plane maps to the unit circle in the -plane.
When , then
which is a set of points on a circle with radius and centered at the origin. Similarly, for , the -plane points on the vertical line map to a -plane circle with radius and centered at the origin.
So consider the -plane half-plane . These points map to with , which are points in the interior of the circle with radius and centered at the origin (consider what happens as ).
Similarly, for the half-plane , the values map to the points outside of the -plane circle with radius (consider what happens as ).
Our intuition might be, then, that regions of convergence for the Z-transform sum (9) consist of regions inside or outside of circles centered at the origin in the plane. Let’s find out.
First though, we note that just as in the case of the Laplace transform, there are two kinds of Z transform: one-sided and two-sided. The two-sided transform is (9). The one-sided transform, which is appropriate for causal signals and systems, is simply
and it is this Z transform that will be our focus.
Examples of the Z Transform
Z Transform of an Impulse
Here the signal of interest is a discrete-time impulse, or Kronecker delta function, defined by
The (one-sided) Z transform is simple to evaluate in this case (and easy to guess)
which is clearly valid for all values of , so the transform exists over the entire -plane.
Z Transform of a Unit-Step Function
Here our discrete-time signal is defined as
as illustrated in Figure 2.
Applying the Z-transform definition leads to an infinite (geometric) sum,
Recall the finite geometric series
(which you can prove by subtracting and and canceling almost all terms). So the Z transform of the unit-step function is
Under what conditions on will this infinite sum converge? We already know that converges to under the condition that . Therefore we require
or . Perhaps more straightforwardly, , which is illustrated in Figure 3. The final result is then
It is worth recalling the prior two transforms we obtained for a unit-step function. These are (14) and (15) in the Laplace-transform post, reproduced here for fun:
Satisfyingly, the Z transform of a unit-step function is more similar to the Laplace transform of a unit-step than to the Fourier transform, and is a simple rational function of .
Z Transform of a Decaying Exponential
In the previous SPTK post on practical filters, we noted that several of the derived impulse-response functions took the form of decaying real-valued exponentials, or the impulse-response function involved a modulated exponential or an exponential combined with some other simple functions. Here then, when we look at the Z transform of a decaying real-valued exponential, we are building up to looking at transforms of impulse-response functions for discrete-time systems.
The function of interest is defined by a parameter as
which is nothing more than a sampled causal continuous-time decaying exponential.
Applying the definition of the Z transform yields the following sequence of equations,
or, reexpressing the convergence condition,
Since here, and the region of convergence includes the unit circle, as illustrated in Figure 5.
Z Transform of a Complex Exponential
Unlike the real-valued exponential, which either tends to zero or blows up as time tends to infinity, the complex-valued exponential is a periodic function. In particular, as we’ve seen many times, the complex exponential is the sum of two real-valued sine waves in phase quadrature,
In our current discrete-time setting, we have the following sampled complex exponential,
is our sine wave, and we can easily apply the one-sided Z transform here, making use of the infinite geometric series, as before. Skipping the step-by-step application of the definition yields a result similar to that for the real-valued exponential,
The region of convergence is the same as for the unit-step function, which is shown graphically in Figure 3. Why would it make sense that they are the same? Hint: One is a special case of the other.
The defining sum for the Z transform is a linear operation, which implies that the Z transform for the sum of signals is the sum of the Z transforms,
We can use this linearity property to easily compute the Z transforms for real-valued sine waves.
Z Transform of a Sine Wave
We can use Euler’s formula (31) to express in terms of complex exponentials,
Now we can use the Z transform result for a complex exponential together with linearity and some algebra to yield
The Z Transform and Linear Shift-Invariant Discrete-Time Systems [Preview]
Suppose we reconsider our first-order continuous-time system from the practical filters post, which has input and output signals related by the differential equation
We can examine this system in discrete time by simply sampling it every seconds, which yields
Now, if the sampling increment (reciprocal of the more familiar sampling rate, ) is small enough, the derivative is well-approximated by a difference
and the differential equation (40) becomes a difference equation,
Since the factor multiplying the input will just scale the system response (that is, we can just consider the new input ), we can consider the generic first-order difference equation defined by a single constant ,
Let’s analyze this discrete-time system with our Z-transform knowledge. Since the difference equation holds for all time, we’ll use the two-sided transform for convenience,
Let and switch variables in the sum to yield
Is this the discrete-time Z-transform-based analog to the transfer function for a continuous-time linear time-invariant system? If so, we expect that the output for a sine wave input is , where is related to in (52). We can check this directly,
This implies that indeed is the frequency response of the system when is constrained to lie on the unit circle, . We will investigate this more closely when we look at the relationship between the Z transform and convolution, because we already know that discrete-time convolution relates the input and output of linear shift-invariant systems.
The Z Transform and Signal-Processing Operations
In this section we look at how different mathematical operations on signals are reflected in their Z transforms. Of particular interest to us as signal processors aiming at using and understanding the statistics of communication signals are elementary signal-processing operations such as delaying, scaling, multiplying, and convolving.
Let the delayed signal be , where and . The delay operation is illustrated in Figure 6 for .
Since is causal and , then is causal. The Z transform for follows easily
If , then . That is, if a signal is delayed by one sample, then the Z transform of the delayed signal is just times the Z transform of the original signal. This is why you’ll see a delay in a signal-processing block diagram show delay elements as boxes with in them–this is just a short-hand way of saying ‘this block delays its input by samples. We’ll see some relevant-to-CSP examples at the bottom of the post.
Here the signal is moved to the left on the time axis, rather than to the right, so in
Proceeding carefully, we have the following sequence of equations
Since the Z transform is a sum involving multiplied by powers of , if we scale , we simply scale . This is simply a consequence of the linearity of the sum,
We’ve already established that discrete-time linear shift-invariant systems (the discrete-time analog to the usual continuous-time linear time-invariant systems) are characterized by their impulse-response and transfer functions, such that the output is the convolution of the input and the impulse response . The transfer function , or frequency response, is the discrete-time Fourier transform of .
So convolution is central to linear systems, and the Z transform is a powerful analysis tool for discrete-time systems–more powerful that the discrete Fourier transform–so it will pay us to look at the connection between the Z transform and convolution.
Let’s consider the convolution of two arbitrary discrete-time sequences and ,
What is the Z transform of ? Let’s use the two-sided Z transform to find out.
So, once again, the transform of a convolution is the product of the individual transforms. Converting convolutions into simpler products is a key reason to study and use transforms of various types.
Can you prove that the result holds for causal signals and the one-sided transform?
The Z Transform, Frequency Response, and the FFT
For a shift-invariant linear system, the system output corresponding to a input that is a impulse, or delta, function occurring at time is called the impulse response function,
Since the system is shift-invariant,
and we have already seen that we can represent any discrete-time signal as the sum of weighted shifted impulses,
Combining all these facts, we can see that the output for any input is just the convolution
and by the convolution result,
Suppose the input is a causal complex sine wave . Then
Therefore the output transform for this sine-wave input is
For our first-order system,
and it can be shown that (but not here)
Therefore, the output for a sine-wave input is just a scaled version of that sine-wave input.
In general, the frequency response of a linear discrete-time shift-invariant system is given by the Z transform of the impulse response evaluated at the frequency of interest,
which requires that the Z transform has a convergence region that includes the unit circle in the plane: The frequency response is evaluated on the unit circle. This is analogous to the continuous-time case in which the frequency response is equal to the Laplace transform evaluated on the axis, provided it exists there.
Let’s take a look at what evaluating the Z transform on the unit circle means in terms of operations we’ve already encountered.
which is the discrete-time continuous-frequency Fourier transform of . Now suppose that is non-zero only for . We then have
Now let’s sample the function at equispaced frequencies corresponding to one trip around the unit circle. For example, . This leads to the following function of frequency ‘bin’ ,
which is simply the discrete Fourier transform. So the frequency response for a discrete-time linear shift-invariant system is intimately related to the discrete Fourier transform, which is efficiently computed by the fast Fourier transform algorithm ubiquitous in signal processing.
Significance of the Z Transform in CSP
We’ve come a long way on the CSP Blog without needing the Z transform. So, it can’t be crucial. What it does help with, though, is understanding valuable signal-processing structures that can facilitate advanced CSP.
For example, consider what I call tunneling. This is a way to use CSP together with highly efficient and effective polyphase channelizers, such as the modified DFT filterbank (The Literature [R192]-[R194], My Papers [31,43]), or the polyphase FFT filterbank, that quickly break up a wideband sampled-data signal into a set of sampled signals with low bandwidth. This multiplicity of narrowband sampled signals at the output of a polyphase channelizer span the bandwidth of the input signal, and can be selected for further processing or arithmetically modified and recombined, performing, effectively, linear time-invariant system processing. Filtering in other words.
In tunneling, we apply spectral-correlation estimators to pairs of the narrowband outputs of the filterbank, looking for known cycle frequencies if we have that information or looking exhaustively for any cycle frequencies if we don’t.
So when we want to use, modify, extend, or just understand such structures, we often encounter their block diagrams which contain Z-transform-related notations and structures, as in Figures 7 and 8, which show the analysis and synthesis portions of the modified-DFT filterbank. Delays are indicated by notation, where is the delay. Now you know exactly why.
Previous SPTK Post: Practical Filters Next SPTK Post: TBD