Salta al contenuto
Note per Studenti Unilateral Z-Transform and Difference Equations Report

Unilateral Z-Transform and Difference Equations

In questa pagina 4

Definition

Definition (unilateral Z\mathcal{Z}-transform). Assume x(k)=0x(k)=0 for all k<0k<0. Then

Z ⁣:x(k)↦X(z),X(z)=∑k=0+∞x(k) z−k.\mathcal{Z}\colon x(k)\mapsto X(z),\qquad X(z)=\sum_{k=0}^{+\infty}x(k)\,z^{-k}.

(The assumption x(k)=0x(k)=0 for k<0k<0 is imposed for Z\mathcal{Z} to be invertible: the sum only sees the samples with k≥0k\ge0.)

Why a one-sided version? Because it gives the shift formulas with initial conditions. For a signal that is not zero for negative kk, the sum ∑k≥0\sum_{k\ge0} still only involves k≥0k\ge0, and the samples at negative times reappear as initial conditions when shifting:

∑k=0+∞x(k−1)z−k=z−1∑k=0+∞x(k−1)z−(k−1)=ℓ=k−1z−1∑ℓ=−1+∞x(ℓ)z−ℓ=z−1x(−1) z+z−1∑ℓ=0+∞x(ℓ)z−ℓ,\sum_{k=0}^{+\infty}x(k-1)z^{-k}=z^{-1}\sum_{k=0}^{+\infty}x(k-1)z^{-(k-1)}\overset{\ell=k-1}{=}z^{-1}\sum_{\ell=-1}^{+\infty}x(\ell)z^{-\ell}=z^{-1}x(-1)\,z+z^{-1}\sum_{\ell=0}^{+\infty}x(\ell)z^{-\ell},

hence

Z[x(k−1)]=z−1X(z)+x(−1).\boxed{\mathcal{Z}[x(k-1)]=z^{-1}X(z)+x(-1)}.

For the advance:

z∑k=0+∞x(k)z−k=z x(0)+∑k=1+∞x(k)z−k+1=ℓ=k−1z x(0)+∑ℓ=0+∞x(ℓ+1)z−ℓ,z\sum_{k=0}^{+\infty}x(k)z^{-k}=z\,x(0)+\sum_{k=1}^{+\infty}x(k)z^{-k+1}\overset{\ell=k-1}{=}z\,x(0)+\sum_{\ell=0}^{+\infty}x(\ell+1)z^{-\ell},

hence

Z[x(k+1)]=z X(z)−z x(0).\boxed{\mathcal{Z}[x(k+1)]=z\,X(z)-z\,x(0)}.

These will be the tricks to solve difference equations, together with the property x1∗x2↦X1(z)X2(z)x_1*x_2\mapsto X_1(z)X_2(z). (Compare with the two-sided version in Bilateral Z-TransformThe bilateral Z-transform X_B(z) = sum x(k) z^{-k} is the discrete-time counterpart of the Laplace transform; it converges only on a region of convergence (an annulus-type region), extends the DTFT when the unit circle is in the ROC, has an inversion formula and properties such as linearity, shift, time reversal and convolution.Bilateral Z-Transform →.)

Fundamental properties of the unilateral Z-transform

  • X(z)=∑k=0+∞x(k)z−kX(z)=\sum_{k=0}^{+\infty}x(k)z^{-k}. The ROC of XX is always a neighbourhood of the improper point, i.e. the exterior of a circle ∣z∣>R|z|>R. The radius of convergence can be computed as R=lim sup⁡k→+∞∣x(k)∣k.R=\limsup_{k\to+\infty}\sqrt[k]{|x(k)|}.
  • x1∗x2↦X1(z)X2(z)x_1*x_2\mapsto X_1(z)X_2(z), with ROC⊇ROC1∩ROC2\mathrm{ROC}\supseteq\mathrm{ROC}_1\cap\mathrm{ROC}_2.
  • k x(k)↦−z dX(z)dzk\,x(k)\mapsto-z\,\dfrac{dX(z)}{dz}.
  • x(k−1)↦z−1X(z)+x(−1)x(k-1)\mapsto z^{-1}X(z)+x(-1).
  • x(k)−x(k−1)↦(1−z−1)X(z)−x(−1)x(k)-x(k-1)\mapsto(1-z^{-1})X(z)-x(-1).
  • x(k+1)↦zX(z)−zx(0)x(k+1)\mapsto zX(z)-zx(0).
  • x(k+1)−x(k)↦(z−1)X(z)−zx(0)x(k+1)-x(k)\mapsto(z-1)X(z)-zx(0).
  • Delay by k0k_0 steps: this seems crucial to solve difference equations. Iterating the one-step shift gives, for k0∈Nk_0\in\mathbb{N}:

Z[x(k−k0)]=z−k0X(z)+x(−1)z−k0+1+⋯+x(−k0+1)z−1+x(−k0),\mathcal{Z}[x(k-k_0)]=z^{-k_0}X(z)+x(-1)z^{-k_0+1}+\dots+x(-k_0+1)z^{-1}+x(-k_0),

x(k−k0) ↦ z−k0X(z)+∑ℓ=1k0x(−ℓ) z−k0+ℓk0∈N.\boxed{x(k-k_0)\ \mapsto\ z^{-k_0}X(z)+\sum_{\ell=1}^{k_0}x(-\ell)\,z^{-k_0+\ell}}\qquad k_0\in\mathbb{N}.

The notes call this relation "the ultimate weapon".

Some basic unilateral Z-transforms

Z[ak1(k)]=11−az−1=zz−a(∣z∣>∣a∣),Z[δ(k)]=1(∀z∈C).\mathcal{Z}[a^k\mathbb{1}(k)]=\frac1{1-az^{-1}}=\frac z{z-a}\quad(|z|>|a|),\qquad\mathcal{Z}[\delta(k)]=1\quad(\forall z\in\mathbb{C}).

Z[−ak1(−k−1)]\mathcal{Z}[-a^k\mathbb{1}(-k-1)]: one might expect zz−a\frac z{z-a}, but no: it does not exist as a unilateral transform, because the signal is non-zero for k<0k<0, so we cannot apply the definition of Z\mathcal{Z} (the bilateral transform assigns it the same expression with a different ROC).

Transfer function of a discrete-time convolutional LTI system

ARMA model:

∑n=0Nan y(k−n)=∑m=0Mbm u(k−m) ⟺ Σ ⁣:u→h→y,  h(k)=0  ∀k<0,\sum_{n=0}^{N}a_n\,y(k-n)=\sum_{m=0}^{M}b_m\,u(k-m)\ \Longleftrightarrow\ \Sigma\colon u\to\boxed{h}\to y,\ \ h(k)=0\ \ \forall k<0,

i.e. a convolutional causal LTI system.

Disregard the initial conditions (x(−1)=x(−2)=⋯=x(−N)=0x(-1)=x(-2)=\dots=x(-N)=0): then the unilateral Z\mathcal{Z}-transform behaves as the bilateral one for switch-on signals. Transforming both sides,

Y(z)∑n=0Nanz−n=U(z)∑m=0Mbmz−m.Y(z)\sum_{n=0}^{N}a_nz^{-n}=U(z)\sum_{m=0}^{M}b_mz^{-m}.

Definition (transfer function) of the LTI system Σ\Sigma:

H(z):=Y(z)U(z)=∑m=0Mbmz−m∑n=0Nanz−n\boxed{H(z):=\frac{Y(z)}{U(z)}=\frac{\sum_{m=0}^{M}b_mz^{-m}}{\sum_{n=0}^{N}a_nz^{-n}}}

It is the Z\mathcal{Z}-transform of the causal impulse response h+(k)h_+(k). It makes no sense if the system is not LTI.

Interpretation. The transfer function H(z)H(z) generalizes the frequency response H(ejθ)H(e^{j\theta}) and uniquely captures the input-output relation for the LTI causal system Σ\Sigma while neglecting the effect of initial conditions.

Theorem (BIBO stability of discrete-time LTI systems). Σ\Sigma is BIBO stable   ⟺  \iff all the remaining poles of H(z)H(z) after cancellations belong to the interior of the unit circle {z:∣z∣<1}\{z:|z|<1\}.

Observation. To achieve BIBO stability M≤NM\le N is not necessary. Example (moving average, an FIR filter, see FIR and IIR FiltersDiscrete-time (digital) filters are described by ARMA difference equations; FIR filters have finite impulse response (moving average, no auto-regression), IIR filters have auto-regression and a rational frequency response; worked examples of a first-order IIR low-pass/high-pass filter and a moving-average FIR low-pass filter.FIR and IIR Filters →): y(k)=∑m=0Mbm u(k−m)y(k)=\sum_{m=0}^{M}b_m\,u(k-m) is BIBO-stable even though M>N=0M>N=0.

Solution of difference equations through the Z-transform

Apply the general shift relation to ARMA systems, now keeping the initial conditions. For n≥1n\ge1 the term an y(k−n)a_n\,y(k-n) transforms to an(z−nY(z)+∑ℓ=1ny(−ℓ)z−n+ℓ)a_n\left(z^{-n}Y(z)+\sum_{\ell=1}^{n}y(-\ell)z^{-n+\ell}\right). Hence

Y(z)∑n=0Nanz−n+∑n=1Nan∑ℓ=1ny(−ℓ) z−n+ℓ=U(z)∑m=0Mbmz−mY(z)\sum_{n=0}^{N}a_nz^{-n}+\sum_{n=1}^{N}a_n\sum_{\ell=1}^{n}y(-\ell)\,z^{-n+\ell}=U(z)\sum_{m=0}^{M}b_mz^{-m}

(the notes write the upper limit of the inner sum as KK; it is the shift amount nn of each term). Solving for Y(z)Y(z):

Y(z)=− ∑n=1Nan∑ℓ=1ny(−ℓ) z−n+ℓ∑n=0Nanz−n⏟=: M(z) (Z-transform of the natural response)+H(z) U(z)⏟Z-transform of the forced response.Y(z)=\underbrace{-\,\frac{\sum_{n=1}^{N}a_n\sum_{\ell=1}^{n}y(-\ell)\,z^{-n+\ell}}{\sum_{n=0}^{N}a_nz^{-n}}}_{=:\,M(z)\ \text{(Z-transform of the natural response)}}+\underbrace{H(z)\,U(z)}_{\text{Z-transform of the forced response}} .

The denominator ∑n=0Nanz−n\sum_{n=0}^{N}a_nz^{-n} is the characteristic polynomial. Hence difference equations are solved as

y(k)=Z−1[M(z)]+Z−1[H(z)U(z)]for k≥0,y(k)=\mathcal{Z}^{-1}[M(z)]+\mathcal{Z}^{-1}[H(z)U(z)]\qquad\text{for }k\ge0,

where Z−1\mathcal{Z}^{-1} is obtained by looking at pairs (x(k),X(z))(x(k),X(z)) we already know. Note: the one-sided Z\mathcal{Z} does not allow us to reconstruct/interpolate y(k)y(k) for k<0k<0 (there it is just given by the initial conditions).

Example (causal ARMA)

Solve through the Z\mathcal{Z}-transform

{y(k)+5 y(k−1)+6 y(k−2)=u(k)y(−1)=0,  y(−2)=2u(k)=δ(k),\begin{cases}y(k)+5\,y(k-1)+6\,y(k-2)=u(k)\\ y(-1)=0,\ \ y(-2)=2\end{cases}\qquad u(k)=\delta(k),

and analyze its BIBO stability.

Transform of the left side.

Y(z)+5(z−1Y(z)+y(−1))+6(z−2Y(z)+z−1y(−1)+y(−2))=(1+5z−1+6z−2)Y(z)+12,Y(z)+5\left(z^{-1}Y(z)+y(-1)\right)+6\left(z^{-2}Y(z)+z^{-1}y(-1)+y(-2)\right)=\left(1+5z^{-1}+6z^{-2}\right)Y(z)+12,

using y(−1)=0y(-1)=0, y(−2)=2y(-2)=2 (so the constant is 6⋅2=126\cdot2=12). The factor 1+5z−1+6z−21+5z^{-1}+6z^{-2} is the characteristic polynomial. With u(k)↦U(z)u(k)\mapsto U(z):

(1+5z−1+6z−2)Y(z)+12=U(z) ⇒ Y(z)=−121+5z−1+6z−2⏟M(z)+U(z)1+5z−1+6z−2⏟H(z)U(z).\left(1+5z^{-1}+6z^{-2}\right)Y(z)+12=U(z)\ \Rightarrow\ Y(z)=\underbrace{\frac{-12}{1+5z^{-1}+6z^{-2}}}_{M(z)}+\underbrace{\frac{U(z)}{1+5z^{-1}+6z^{-2}}}_{H(z)U(z)}.

Transfer function and stability.

H(z)=11+5z−1+6z−2=z2z2+5z+6=1−5z+6z2+5z+6=1−[Az+3+Bz+2],H(z)=\frac1{1+5z^{-1}+6z^{-2}}=\frac{z^2}{z^2+5z+6}=1-\frac{5z+6}{z^2+5z+6}=1-\left[\frac A{z+3}+\frac B{z+2}\right],

with poles z1=−3z_1=-3 and z2=−2z_2=-2. There is no cancellation in H(z)H(z) and its poles are not inside the unit circle ⇒\Rightarrow not BIBO stable.

Partial fractions: A+B=5A+B=5 and 2A+3B=62A+3B=6, so A=5−BA=5-B, 10−2B+3B=610-2B+3B=6, giving B=−4B=-4, A=9A=9. Then

H(z)=1−[9z+3+−4z+2]=1−z−1[91−(−3)z−1−41−(−2)z−1].H(z)=1-\left[\frac9{z+3}+\frac{-4}{z+2}\right]=1-z^{-1}\left[\frac9{1-(-3)z^{-1}}-\frac4{1-(-2)z^{-1}}\right].

The inverse Z\mathcal{Z}-transform of 11−az−1\frac1{1-az^{-1}} is ak1(k)a^k\mathbb{1}(k) because of the causality assumption; also Z[δ(k)]=1\mathcal{Z}[\delta(k)]=1 and the factor z−1z^{-1} delays by one step. So

h+(k)=δ(k)−9(−3)k−11(k−1)+4(−2)k−11(k−1)  ∀k≥0,h+(k)=0  ∀k<0.h_+(k)=\delta(k)-9(-3)^{k-1}\mathbb{1}(k-1)+4(-2)^{k-1}\mathbb{1}(k-1)\ \ \forall k\ge0,\qquad h_+(k)=0\ \ \forall k<0.

Response to u(k)=δ(k)↦U(z)=1u(k)=\delta(k)\mapsto U(z)=1. For k≥0k\ge0:

y(k)=Z−1[M(z)+H(z)U(z)]=−12 h+(k)+h+(k)=−11 h+(k),y(k)=\mathcal{Z}^{-1}[M(z)+H(z)U(z)]=-12\,h_+(k)+h_+(k)=-11\,h_+(k),

that is

y(k)={−11 δ(k)−33 (−3)k 1(k−1)+22 (−2)k 1(k−1),k≥00,k=−12,k=−2.y(k)=\begin{cases}-11\,\delta(k)-33\,(-3)^k\,\mathbb{1}(k-1)+22\,(-2)^k\,\mathbb{1}(k-1),&k\ge0\\[2pt]0,&k=-1\\[2pt]2,&k=-2.\end{cases}

(Check from the equation: y(0)+5y(−1)+6y(−2)=1y(0)+5y(-1)+6y(-2)=1 gives y(0)=1−12=−11y(0)=1-12=-11, in agreement with −11 h+(0)=−11-11\,h_+(0)=-11.)

Versione ripasso

  • X(z)=∑k=0+∞x(k)z−kX(z)=\sum_{k=0}^{+\infty}x(k)z^{-k} (for x(k)=0x(k)=0, k<0k<0, to be invertible). ROC: exterior of a circle, ∣z∣>R|z|>R, R=lim sup⁡k∣x(k)∣kR=\limsup_k\sqrt[k]{|x(k)|}.
  • Shifts: x(k−1)↦z−1X+x(−1)x(k-1)\mapsto z^{-1}X+x(-1); x(k+1)↦zX−zx(0)x(k+1)\mapsto zX-zx(0); x(k)−x(k−1)↦(1−z−1)X−x(−1)x(k)-x(k-1)\mapsto(1-z^{-1})X-x(-1); x(k+1)−x(k)↦(z−1)X−zx(0)x(k+1)-x(k)\mapsto(z-1)X-zx(0).
  • General delay (k0∈Nk_0\in\mathbb{N}): x(k−k0)↦z−k0X(z)+∑ℓ=1k0x(−ℓ)z−k0+ℓx(k-k_0)\mapsto z^{-k_0}X(z)+\sum_{\ell=1}^{k_0}x(-\ell)z^{-k_0+\ell}.
  • Other properties: x1∗x2↦X1X2x_1*x_2\mapsto X_1X_2 (ROC ⊇ROC1∩ROC2\supseteq\mathrm{ROC}_1\cap\mathrm{ROC}_2); kx(k)↦−zX′(z)kx(k)\mapsto-zX'(z).
  • Pairs: ak1(k)↦zz−aa^k\mathbb{1}(k)\mapsto\frac z{z-a} (∣z∣>∣a∣|z|>|a|); δ(k)↦1\delta(k)\mapsto1. −ak1(−k−1)-a^k\mathbb{1}(-k-1) has no unilateral transform (non-zero for k<0k<0).
  • Transfer function of an ARMA causal LTI system: H(z)=∑bmz−m∑anz−nH(z)=\frac{\sum b_mz^{-m}}{\sum a_nz^{-n}} = Z[h+]\mathcal{Z}[h_+]; generalizes H(ejθ)H(e^{j\theta}); ignores initial conditions.
  • BIBO stability: iff all poles of H(z)H(z) (after cancellations) lie in ∣z∣<1|z|<1; M≤NM\le N is not necessary (FIR is always BIBO stable).
  • Solving a difference equation: Y(z)=M(z)+H(z)U(z)Y(z)=M(z)+H(z)U(z), with M(z)=−∑n≥1an∑ℓ=1ny(−ℓ)z−n+ℓ∑anz−nM(z)=-\frac{\sum_{n\ge1}a_n\sum_{\ell=1}^{n}y(-\ell)z^{-n+\ell}}{\sum a_nz^{-n}} the natural response (denominator = characteristic polynomial) and HUHU the forced response; y(k)=Z−1[M]+Z−1[HU]y(k)=\mathcal{Z}^{-1}[M]+\mathcal{Z}^{-1}[HU] for k≥0k\ge0 only.
  • Example: y(k)+5y(k−1)+6y(k−2)=δ(k)y(k)+5y(k-1)+6y(k-2)=\delta(k), y(−1)=0y(-1)=0, y(−2)=2y(-2)=2: H=z2z2+5z+6H=\frac{z^2}{z^2+5z+6}, poles −3,−2-3,-2 (not BIBO stable), h+(k)=δ(k)−9(−3)k−11(k−1)+4(−2)k−11(k−1)h_+(k)=\delta(k)-9(-3)^{k-1}\mathbb{1}(k-1)+4(-2)^{k-1}\mathbb{1}(k-1), y(k)=−11h+(k)y(k)=-11h_+(k) for k≥0k\ge0, i.e. −11δ(k)−33(−3)k1(k−1)+22(−2)k1(k−1)-11\delta(k)-33(-3)^k\mathbb{1}(k-1)+22(-2)^k\mathbb{1}(k-1).
  • Typical mistakes: forgetting the initial-condition terms in the shift formulas; reading the unit-circle criterion backwards (stable means poles INSIDE); forgetting that y(k)y(k) for k<0k<0 is not given by the transform; cancelling poles and zeros before judging stability is required (use the poles remaining after cancellations).

Teoria collegata