The inverse Z-transform with partial fractions
لم يُترجم بعد؛ يُعرض باللغة الإنجليزية
عن هذا الدرس
Go back from X(z) to the samples x[n]. Take X(z) = 1/(1 − 0.75z⁻¹ + 0.125z⁻²) with ROC |z| > 0.5: factor the bottom to find the poles 0.5 and 0.25, split it into two simple fractions with the cover-up rule, look each one up in the pair aⁿu[n] ↔ 1/(1 − az⁻¹), and let the region of convergence choose right-sided or left-sided. The answer x[n] = 2(0.5)ⁿ − (0.25)ⁿ is checked against the recursion the same X(z) describes, and against SciPy's residuez and lfilter. It builds on the lesson on the Z-transform and its region of convergence; the Laplace version of the same method is in the Circuits lesson on Laplace analysis.
From X(z) back to x[n]
The Z-transform turned a list of samples into a function of z. Now go back. Here X(z) = 1/(1 − 0.75z⁻¹ + 0.125z⁻²) with ROC |z| > 0.5. Which samples x[n] made it? Finding them is the inverse Z-transform.
given X(z) = 1 / (1 − 0.75z⁻¹ + 0.125z⁻²)
ROC (region of convergence): |z| > 0.5
wanted x[n] for every n
three ways back:
partial fractions + a pair table <- this lesson
long division (a power series in z⁻¹)
a contour integral (residues)
z⁻¹ = "one sample later"اقرأ الدرس خطوة بخطوة
From X(z) back to x[n]
The Z-transform turned a list of samples into a function of z. Now go back. Here X(z) = 1/(1 − 0.75z⁻¹ + 0.125z⁻²) with ROC |z| > 0.5. Which samples x[n] made it? Finding them is the inverse Z-transform.
given X(z) = 1 / (1 − 0.75z⁻¹ + 0.125z⁻²) ROC (region of convergence): |z| > 0.5 wanted x[n] for every n three ways back: partial fractions + a pair table <- this lesson long division (a power series in z⁻¹) a contour integral (residues) z⁻¹ = "one sample later"Factor the bottom: the poles
Factor the denominator: 1 − 0.75z⁻¹ + 0.125z⁻² = (1 − 0.5z⁻¹)(1 − 0.25z⁻¹). It is zero at z = 0.5 and z = 0.25, so X(z) blows up there: the poles. A zero is where X(z) equals 0; here z = 0, twice.
1 − 0.75z⁻¹ + 0.125z⁻² = (1 − 0.5z⁻¹)(1 − 0.25z⁻¹) check: 0.5 + 0.25 = 0.75, 0.5 × 0.25 = 0.125 X(z) = z² / ((z − 0.5)(z − 0.25)) poles (×) z = 0.5, z = 0.25 zeros (○) z = 0, twice poles = numbers that make the bottom 0Split into partial fractions
Two different poles, so X(z) can be written as a sum of two simple fractions, one pole each: A/(1 − 0.5z⁻¹) + B/(1 − 0.25z⁻¹). This works because the top (degree 0 in z⁻¹) is lower than the bottom (degree 2).
X(z) = A / (1 − 0.5z⁻¹) + B / (1 − 0.25z⁻¹) one fraction per pole (all poles different) needs: degree of top < degree of bottom top 1 degree 0 in z⁻¹ bottom ...z⁻² degree 2 -> fine (otherwise divide first; the leftover polynomial is the "k" part)Cover-up: find A and B
Cover up one factor and put its pole into what is left. For A, z = 0.5 so z⁻¹ = 2: A = 1/(1 − 0.25·2) = 2. For B, z = 0.25 so z⁻¹ = 4: B = 1/(1 − 0.5·4) = −1.
A = (1 − 0.5z⁻¹)·X(z) at z = 0.5 = 1 / (1 − 0.25z⁻¹), z⁻¹ = 2 = 1 / (1 − 0.5) = 2 B = (1 − 0.25z⁻¹)·X(z) at z = 0.25 = 1 / (1 − 0.5z⁻¹), z⁻¹ = 4 = 1 / (1 − 2) = −1 check: 2(1 − 0.25z⁻¹) − (1 − 0.5z⁻¹) = 2 − 0.5z⁻¹ − 1 + 0.5z⁻¹ = 1 ✓Look each piece up
One pair does all the work: aⁿu[n] ↔ 1/(1 − az⁻¹). Here u[n] is the unit step: 1 for n ≥ 0, 0 before. Piece one has a = 0.5, piece two has a = 0.25. Each fraction is a geometric sequence in disguise.
aⁿ·u[n] -> sum of aⁿz⁻ⁿ for n ≥ 0 = 1 / (1 − a·z⁻¹) (geometric series, needs |a·z⁻¹| < 1) u[n] = 1 for n ≥ 0, 0 for n < 0 piece 1: 2/(1 − 0.5z⁻¹) a = 0.5 piece 2: −1/(1 − 0.25z⁻¹) a = 0.25The ROC picks the answer
Two different sequences share the fraction 1/(1 − az⁻¹); only the ROC tells them apart. Our ROC |z| > 0.5 lies outside both poles, so both pieces are right-sided (causal). With |z| < 0.25, both would be left-sided.
same fraction, two sequences: aⁿ·u[n] ROC |z| > |a| −aⁿ·u[−n−1] ROC |z| < |a| the ROC never contains a pole our ROC |z| > 0.5: outside 0.5 and 0.25 -> both pieces use aⁿ·u[n] ROC 0.25 < |z| < 0.5 would mix them: −2(0.5)ⁿu[−n−1] − (0.25)ⁿu[n]Two shrinking sequences
Piece one is 2(0.5)ⁿu[n]: 2, 1, 0.5, 0.25 … Piece two is −(0.25)ⁿu[n]: −1, −0.25, −0.0625 … Each pole sets how fast its piece shrinks. The pole nearer 0 dies out faster.
n 0 1 2 3 2·(0.5)ⁿ 2 1 0.5 0.25 −(0.25)ⁿ −1 −0.25 −0.0625 −0.015625 each step multiplies by the pole: piece 1 halves, piece 2 quarters |pole| < 1 -> the piece decays to 0Add them, sample by sample
x[n] = 2(0.5)ⁿ − (0.25)ⁿ for n ≥ 0. So x[0] = 2 − 1 = 1, x[1] = 1 − 0.25 = 0.75, x[2] = 0.4375, x[3] = 0.234375. That is the inverse Z-transform.
x[n] = 2·(0.5)ⁿ·u[n] − (0.25)ⁿ·u[n] x[0] = 2 − 1 = 1 x[1] = 1 − 0.25 = 0.75 x[2] = 0.5 − 0.0625 = 0.4375 x[3] = 0.25 − 0.015625 = 0.234375 x[4] = 0.125 − 0.00390625 = 0.12109375 (cells show 4 decimals)Check with the recursion
Cross-multiply: X(z)(1 − 0.75z⁻¹ + 0.125z⁻²) = 1. In time that says x[n] = 0.75x[n−1] − 0.125x[n−2] + δ[n], where the unit impulse δ[n] is 1 at n = 0, else 0. Run it: 1, 0.75, 0.4375, 0.234375. Same numbers, so the split was right.
X(z) − 0.75z⁻¹X(z) + 0.125z⁻²X(z) = 1 z⁻¹ = one sample later, 1 <-> δ[n]: x[n] = 0.75x[n−1] − 0.125x[n−2] + δ[n] x[0] = 1 x[1] = 0.75·1 = 0.75 x[2] = 0.75·0.75 − 0.125·1 = 0.4375 x[3] = 0.328125 − 0.09375 = 0.234375 this is also "long division", one sample at a timePartial fractions in Python
In Python 3 with SciPy, signal.residuez(b, a) does the split: residues r = [−1, 2] (our B and A) at poles p = [0.25, 0.5]. signal.lfilter on an impulse runs the recursion. Both give x[n] = 1, 0.75, 0.4375 …
from scipy import signal b, a = [1], [1, -0.75, 0.125] r, p, k = signal.residuez(b, a) d = [1, 0, 0, 0, 0] x = signal.lfilter(b, a, d) >>> r, p, k (array([-1., 2.]), array([0.25, 0.5 ]), array([], dtype=float64)) >>> x array([1. , 0.75 , 0.4375 , 0.234375 , 0.12109375]) (Python 3, SciPy 1.18; p sorted by size)
أسئلة سريعة: 5
اختر إجابة واحدة لكل سؤال. يمكنك تغيير اختياراتك قبل التحقق منها.
01X(z) = 1/((1 − 0.5z⁻¹)(1 − 0.25z⁻¹)) = A/(1 − 0.5z⁻¹) + B/(1 − 0.25z⁻¹). What is A?
Cover up (1 − 0.5z⁻¹) and put its pole z = 0.5 (so z⁻¹ = 2) into what is left: A = 1/(1 − 0.25·2) = 1/0.5 = 2.
02Which sequence has the Z-transform 1/(1 − 0.8z⁻¹) with ROC |z| > 0.8?
aⁿu[n] ↔ 1/(1 − az⁻¹) for |z| > |a|. The left-sided −aⁿu[−n−1] has the same fraction but the ROC |z| < |a|.
03The same X(z) with poles 0.5 and 0.25 is given with ROC |z| < 0.25. What kind of sequence is x[n]?
The ROC lies inside both poles, so both pieces use −aⁿu[−n−1], which is zero for n ≥ 0. A ring 0.25 < |z| < 0.5 would give one piece each way.
04x[n] = 2(0.5)ⁿ − (0.25)ⁿ for n ≥ 0. What is x[2]?
2·0.25 − 0.0625 = 0.4375. The recursion x[n] = 0.75x[n−1] − 0.125x[n−2] + δ[n] gives the same: 0.75·0.75 − 0.125·1 = 0.4375.
05What does scipy.signal.residuez(b, a) return?
residuez expands b(z)/a(z) as r[i]/(1 − p[i]z⁻¹) plus a polynomial k; here r = [−1, 2], p = [0.25, 0.5], k empty. lfilter on an impulse gives the samples.
المسرد
- Inverse Z-transform
- Going from X(z), together with its region of convergence, back to the sequence x[n].
- Pole and zero
- A pole is a value of z where X(z) becomes infinite because its denominator is zero; here z = 0.5 and z = 0.25. A zero is a value of z where X(z) equals 0; a double zero is one that appears twice, here z = 0.
- Partial fractions
- Writing a ratio of polynomials as a sum of simpler fractions, one per pole (plus a polynomial if the top's degree is not lower).
- Cover-up rule (Heaviside)
- A shortcut for a coefficient: remove the pole's factor and evaluate what is left at that pole.
- Region of convergence (ROC)
- The set of z where the sum defining X(z) converges. It never contains a pole and decides which sequence a fraction stands for.
- Unit step u[n] and unit impulse δ[n]
- The unit step u[n] is 1 for n ≥ 0 and 0 for n < 0. The unit impulse δ[n] is 1 at n = 0 and 0 everywhere else; its Z-transform is 1.
- Residue
- The number on top of one partial fraction, such as A = 2 in 2/(1 − 0.5z⁻¹). SciPy's residuez returns these as r.
- Right-sided (causal) / left-sided
- A right-sided sequence is zero before some n; a causal one is zero for n < 0. A left-sided one is zero after some n.
الملاحظات والمصادر
- The example X(z) = 1/(1 − 0.75z⁻¹ + 0.125z⁻²) with ROC |z| > 0.5 is a standard textbook case; every number in the figure is computed from this model and checked against the recursion.
- The memory cells round to 4 decimals (x[3] = 0.234375 shows as 0.2344); the working shows the exact values.
- Repeated poles need extra terms such as 1/(1 − az⁻¹)², and complex poles come in conjugate pairs; the method is the same. The ROC and the forward transform are in the Z-transform lesson; poles and stability get their own lessons next.
- A. V. Oppenheim, A. S. Willsky, S. H. Nawab, Signals and Systems, 2nd ed., Pearson (ch. 10: the Z-transform, its ROC and the inverse Z-transform)
- A. V. Oppenheim, R. W. Schafer, J. R. Buck, Discrete-Time Signal Processing, 2nd ed. (course text listed on MIT OCW 6.341 readings)
- B. P. Lathi, R. A. Green, Linear Systems and Signals, Oxford University Press, 2018 (discrete-time system analysis using the z-transform; Internet Archive record)
- MIT OpenCourseWare 6.003 Signals and Systems (Fall 2011), lecture 5: Z transform
- MIT OpenCourseWare 6.003 lecture notes list (Fall 2011)
- Z-transform (Wikipedia): pair table and inverse methods (contour integral, power series, partial fractions)
- Heaviside cover-up method (Wikipedia)
- SciPy documentation: scipy.signal.residuez
- SciPy documentation: scipy.signal.lfilter
اختبار يتاح بعد الخطوة الأخيرة.