Ztransform
From Academic Kids

In mathematics and signal processing, the Ztransform converts a discrete time domain signal, which is a sequence of real numbers, into a complex frequency domain representation.
The Ztransform and advanced Ztransform were introduced (under the Ztransform name) by E. I. Jury in 1958 in SampledData Control Systems (John Wiley & Sons). The idea contained within the Ztransform was previously known as the "generating function method".
Ztransform is a placeholder name, akin to calling the Laplace transform the "stransform". More accurate would be "Laurent transform", because it is based on the Laurent series.
Contents 
Definition
The Ztransform of a discretetime signal x[n] is the function X(z) defined by
 <math>Z(\{x[n]\}) = X(z) = \sum_{n=\infty}^{\infty} x[n] z^{n} \ <math>
where n is an integer and z is a complex circular number of the form <math> z=r \ e^{j\omega} <math>.
Sometimes we are only interested in the values of the signal x[n] for nonnegative values of n. If such is the case, the Ztransform is defined as
 <math>Z(\{x[n]\}) = X(z) = \sum_{n=0}^{\infty} x[n] z^{n} \ <math>
The former, with limits from negative to positive infinity, is known as the bilateral or doubly infinite Ztransform. The latter, with limits from 0 to <math> + \infty \ <math>, is sometimes called the unilateral Ztransform. In signal processing, the latter definition is used when the signal is causal in nature.
An important example of the unilateral Ztransform is the probabilitygenerating function, where the component x[n] is the probability that a discrete random variable takes the value n, and the function X(z) is usually written as X(s), in terms of s = z^{−1}. The properties of Ztransforms (below) have useful interpretations in the context of probability theory.
Region of convergence
The region of convergence (ROC) is where the Ztransform of a signal has a finite sum for a region in the complex plane.
 <math>ROC = \{z : \sum_{n=\infty}^{\infty}x[n]z^{n} < \infty\}\ <math>
Example 1 (No ROC)
Let <math>x[n] = 0.5^n\ <math>. Expanding <math>x[n]\ <math> on <math>(\infty, \infty)\ <math> it becomes
 <math>x[n] = \{..., 0.5^{3}, 0.5^{2}, 0.5^{1}, 1, 0.5, 0.5^2, 0.5^3, ...\} = \{..., 2^3, 2^2, 2, 1, 0.5, 0.5^2, 0.5^3, ...\}\ <math>
Looking at the sum
 <math>\sum_{n=\infty}^{\infty}x[n]z^{n} < \infty\ <math>
There are no such values of <math>z\ <math> that satisfy this condition.
Example 2 (causal ROC)
Let <math>x[n] = 0.5^n u[n]\ <math>. Expanding <math>x[n]\ <math> on <math>(\infty, \infty)\ <math> it becomes
 <math>x[n] = \{..., 0, 0, 0, 1, 0.5, 0.5^2, 0.5^3, ...\}\ <math>
Looking at the sum
 <math>\sum_{n=\infty}^{\infty}x[n]z^{n} = \sum_{n=0}^{\infty}0.5^nz^{n} = \sum_{n=0}^{\infty}\left(\frac{0.5}{z}\right)^n = \frac{1}{1  0.5z^{1}}\ <math>
The last equality arises from the infinite geometric series and the equality only holds if <math>\left0.5 z^{1}\right < 1\ <math> which can be rewritten in terms of <math>z\ <math> as <math>\leftz\right > 0.5\ <math>. Thus, the ROC is <math>\leftz\right > 0.5\ <math>. In this case the ROC is the complex plane with a disc of radius 0.5 at the origin "punched out".
Example 3 (anticausal ROC)
Let <math>x[n] = (0.5)^n u[n1]\ <math> (where <math>u<math> is the Heaviside step function). Expanding <math>x[n]\ <math> on <math>(\infty, \infty)\ <math> it becomes
 <math>x[n] = \{..., (0.5)^{3}, (0.5)^{2}, (0.5)^{1}, 0, 0, 0, ...\}\ <math>
Looking at the sum
 <math>\sum_{n=\infty}^{\infty}x[n]z^{n} = \sum_{n=\infty}^{1}0.5^nz^{n} = \sum_{n=\infty}^{1}\left(\frac{z}{0.5}\right)^{n}\ <math>
 <math>= \sum_{m=1}^{\infty}\left(\frac{z}{0.5}\right)^{m} = \frac{0.5^{1}z}{1  0.5^{1}z} = \frac{z}{z  0.5} = \frac{1}{1  0.5z^{1}}\ <math>
Using the infinite geometric series, again, the equality only holds if <math>\left0.5^{1}z\right < 1\ <math> which can be rewritten in terms of <math>z\ <math> as <math>\leftz\right < 0.5\ <math>. Thus, the ROC is <math>\leftz\right < 0.5\ <math>. In this case the ROC is a disc centered at the origin and of radius 0.5.
Examples conclusion
Examples 2 & 3 clearly show that the Ztransform <math>X(z)\ <math> of <math>x[n]\ <math> is unique only when specifying the ROC. Creating the polezero plot for the causal and anticausal case show that the ROC for either case does not include the pole that is at 0.5. This extends to cases with multiple poles: the ROC will never contain poles.
In example 2, the causal system yields an ROC that includes <math>\left z \right = \infty\ <math> while the anticausal system in example 3 yields an ROC that includes <math>\left z \right = 0\ <math>.
In systems with multiple poles it is possible to have an ROC that includes neither <math>\left z \right = \infty\ <math> nor <math>\left z \right = 0\ <math>. The ROC creates a circular band. For example, <math>x[n] = 0.5^nu[n]  0.75^nu[n1]\ <math> has poles at 0.5 and 0.75. The ROC will be <math>0.5 < \left z \right < 0.75\ <math>, which includes neither the origin nor infinity. Such a system is called a mixedcausality system as it contains a causal term <math>0.5^nu[n]\ <math> and an anticausal term <math>(0.75)^nu[n1]\ <math>.
The stability of a system can also be determined by knowing the ROC alone. If the ROC contains the unit circle (i.e., <math>\left z \right = 1\ <math>) then the system is stable. In the above systems the causal system is stable because <math>\left z \right > 0.5\ <math> contains the unit circle.
If you are provided a Ztransform of a system without an ROC (i.e., an ambiguous <math>x[n]\ <math>) you can determine a unique <math>x[n]\ <math> provided you desire the following:
 Stability
 Causality
If you need stability then the ROC must contain the unit circle. If you need a causal system then the ROC must contain infinity. If you need an anticausal system then the ROC must contain the origin.
The unique <math>x[n]\ <math> can then be found.
Properties
 Linearity. The Ztransform of the linear combination of two signals is the linear combination of the individual Ztransforms.
 <math>Z(a_1 x_1[n] + a_2 x_2[n]) = a_1 Z(x_1[n]) + a_2 Z(x_2[n]) \ <math>
 Shift. Timeshifting the signal by a distance of k to the right results in multiplying the Ztransform by z^{−k}.
 <math>Z(x[nk]) = z^{k}Z(x[n]) \ <math>
 Convolution. The Ztransform of the convolution of two sequences is the product of the individual Ztransforms.
 <math>Z(\{x[n]\} \bigodot \! \! \! \! \! \! \star \ \ \{y[n]\}) = Z(\{x[n]\}) Z(\{y[n]\}) \ <math>
 Differentiation.
 <math>Z(\{nx[n]\}) = \ z \frac{dZ(\{x[n]\})}{dz} \ <math>
The inverse Ztransform can be computed as follows:
 <math>x[n]=\frac{1}{2\pi i}\oint_CX(z)z^{n1}\,dz\ <math>
where <math>C \ <math> is any closed curve around the origin and lying in the region of convergence of <math>X(z) \ <math>.
The (unilateral) Ztransform is to discrete time domain signals what the Laplace transform is to continuous time domain signals.
Ztransform with a finite range of n and a finite number of uniformlyspaced z values can be computed efficiently via Bluestein's FFT algorithm. The discrete Fourier transform is a special case of such a Ztransform obtained by restricting z to lie on the unit circle.
Relationship to Laplace
The bilateral Ztransform is simply the twosided Laplace transform of the ideal sampled function
 <math> x(t) \sum_{n=\infty}^{\infty} \delta(tnT) = \sum_{n=\infty}^{\infty} x[n] \delta(tnT) \ <math>
where <math> x(t) \ <math> is the continuoustime function being sampled, <math> x[n]=x(nT) \ <math> the n^{th} sample, <math> T \ <math> is the sampling period, and with the substitution: <math> z = e^{sT} \ <math>.
Likewise the unilateral Ztransform is simply the onesided Laplace transform of the ideal sampled function. Both assume that the sampled function is zero for all negative time indices.
Relationship to Fourier
The Ztransform is a more generalization of the discrete fourier transform (DFT). The DFT can be found by evaluating the Ztransform <math>X(z)\ <math> at <math>z=e^{j\omega}\ <math> or, in other words, evaluated on the unit circle. In order to determine the frequency response of the system the Ztransform must be evaluated on the unit circle.
LCCD equation
Linear constant coefficient difference (LCCD) equation is a representation for a linear system based on the ARMA equation.
 <math>\sum_{p=0}^{N}y[np]\alpha_{p} = \sum_{q=0}^{M}x[nq]\beta_{q}\ <math>
Both sides of the above equation can be divided by <math>\alpha_0 \ <math>, if it is not zero, normalizing <math>\alpha_0 = 1\ <math> and the LCCD equation can be written
 <math>y[n] = \sum_{q=0}^{M}x[nq]\beta_{q}  \sum_{p=1}^{N}y[np]\alpha_{p}\ <math>
This form of the LCCD equation is favorable to make it more explicit that the "current" output <math>y[{n}]\ <math> is a function of past outputs <math>y[{np}]\ <math>, current input <math>x[{n}]\ <math>, and previous inputs <math>x[{nq}]\ <math>.
Transfer function
Taking the Ztransform of the equation yields
 <math>Y(z) \sum_{p=0}^{N}z^{p}\alpha_{p} = X(z) \sum_{q=0}^{M}z^{q}\beta_{q}\ <math>
and rearranging results in
 <math>H(z) = \frac{Y(z)}{X(z)} = \frac{\sum_{q=0}^{M}z^{q}\beta_{q}}{\sum_{p=0}^{N}z^{p}\alpha_{p}} = \frac{\beta_0 + z^{1} \beta_1 + z^{2} \beta_2 + ... + z^{M} \beta_M}{\alpha_0 + z^{1} \alpha_1 + z^{2} \alpha_2 + ... + z^{N} \alpha_N}\ <math>
Zeros and poles
From the fundamental theorem of algebra the numerator has M roots (called zeros) and the denominator has N roots (called poles). Rewriting the transfer function in terms of poles
 <math>H(z) = \frac{(1 + q_1 z^{1})(1 + q_2 z^{1})...(1 + q_M z^{1})}{(1 + p_1 z^{1})(1 + p_2 z^{1})...(1 + p_N z^{1})}\ <math>
Where <math>q_k\ <math> is the <math>k^{th}\ <math> zero and <math>p_k\ <math> is the <math>k^{th}\ <math> pole. The zeros and poles are commonly complex and when plotted on the complex plane it is called the polezero plot.
By factoring the denominator, partial fraction decomposition can be used, which can then be transformed back to the time domain. Doing so would result in the impulse response of the system.
Output response
If such a system <math>H(z)\ <math> is driven by a signal <math>X(z)\ <math> then the output is <math>Y(z) = H(z)X(z)\ <math>. By performing partial fraction decomposition on <math>Y(z)\ <math> and then taking the inverse Ztransform the output <math>y[n]\ <math> can be found.