Salta al contenuto
Note per Studenti Z-Transform and Transfer Function of Discrete-Time Systems Report

Z-Transform and Transfer Function of Discrete-Time Systems

In questa pagina 5

Definition

For a sequence h(t)h(t), t∈Nt\in\mathbb{N}, the z-transform is

H(z)=Z[h(t)](z)=∑t=0+∞h(t)z−t,z∈CH(z)=\mathcal{Z}[h(t)](z)=\sum_{t=0}^{+\infty}h(t)z^{-t},\qquad z\in\mathbb{C}

(the Laplace transform in continuous time is L[x(t)](s)=∫0+∞x(t)e−st dt\mathcal{L}[x(t)](s)=\int_0^{+\infty}x(t)e^{-st}\,dt).

Solution in the frequency domain

Take x(t+1)=Fx(t)+Gu(t)x(t+1)=Fx(t)+Gu(t), multiply by z−tz^{-t} and sum over t≥0t\ge0:

∑t=0+∞x(t+1)z−t=∑t=0+∞Fx(t)z−t+∑t=0∞Gu(t)z−t.\sum_{t=0}^{+\infty}x(t+1)z^{-t}=\sum_{t=0}^{+\infty}Fx(t)z^{-t}+\sum_{t=0}^{\infty}Gu(t)z^{-t}.

In the left-hand side set τ=t+1\tau=t+1:

∑τ=1+∞x(τ)z−τ+1=z∑τ=1+∞x(τ)z−τ=z[∑τ=0+∞x(τ)z−τ−x(0)]=z(X(z)−x(0)).\sum_{\tau=1}^{+\infty}x(\tau)z^{-\tau+1}=z\sum_{\tau=1}^{+\infty}x(\tau)z^{-\tau}=z\Big[\sum_{\tau=0}^{+\infty}x(\tau)z^{-\tau}-x(0)\Big]=z\big(X(z)-x(0)\big).

Therefore

zX(z)−zx(0)=FX(z)+GU(z) ⟹ (zI−F)X(z)=zx(0)+GU(z),zX(z)-zx(0)=FX(z)+GU(z)\ \Longrightarrow\ (zI-F)X(z)=zx(0)+GU(z),

X(z)=z(zI−F)−1x(0)+(zI−F)−1GU(z).X(z)=z(zI-F)^{-1}x(0)+(zI-F)^{-1}GU(z).

Comparing with the time-domain solution x(t)=Ftx(0)+Ft−1G∗u(t)x(t)=F^tx(0)+F^{t-1}G*u(t) (Solution of Discrete-Time LTI SystemsA discrete-time LTI system is solved by iterating the difference equation, which gives a free evolution F to the power t times the initial state plus a convolution with F to the power t minus one times G, and the matrix power is computed through the diagonal or Jordan form with binomial coefficients.Solution of Discrete-Time LTI Systems →):

Z[Ft](z)=z(zI−F)−1,Z[Ft−1G](z)=(zI−F)−1G\mathcal{Z}[F^t](z)=z(zI-F)^{-1},\qquad\mathcal{Z}[F^{t-1}G](z)=(zI-F)^{-1}G

(the board writes the second without GG, presumably a slip). Output:

Y(z)=zH(zI−F)−1x(0)+(H(zI−F)−1G+J)U(z),Y(z)=zH(zI-F)^{-1}x(0)+\Big(H(zI-F)^{-1}G+J\Big)U(z),

so the transfer matrix is W(z)=H(zI−F)−1G+JW(z)=H(zI-F)^{-1}G+J, and Yf(z)=W(z)U(z)Y_f(z)=W(z)U(z) for the forced response.

In continuous time L[eFt](s)=(sI−F)−1\mathcal{L}[e^{Ft}](s)=(sI-F)^{-1} (Transfer Matrix of Continuous-Time LTI SystemsThe Laplace transform turns an LTI state-space model into the transfer matrix W(s) equal to H times the inverse of sI minus F times G plus J, which is invariant under a change of state basis, has the modes of the system as poles, and can hide modes through zero-pole cancellations.Transfer Matrix of Continuous-Time LTI Systems →). The "extra" zz in z(zI−F)−1z(zI-F)^{-1} accounts for the one-step lag of the difference equation.

Computing z(zI−F)−1z(zI-F)^{-1}

Consider J=diag(M1,…,Mκ)J=\mathrm{diag}(M_1,\dots,M_\kappa) with Jordan blocks MiM_i (eigenvalue λ\lambda, ones on the superdiagonal). Then zI−MizI-M_i has z−λz-\lambda on the diagonal and −1-1 on the superdiagonal, and

  • if λ=0\lambda=0: z(zI−Mi)−1z(zI-M_i)^{-1} is upper triangular with 11 on the diagonal, z−1z^{-1} on the first superdiagonal, z−2z^{-2} on the next, and so on;
  • if λ≠0\lambda\ne0: z(zI−Mi)−1z(zI-M_i)^{-1} is upper triangular with zz−λ\dfrac z{z-\lambda} on the diagonal, z(z−λ)2\dfrac z{(z-\lambda)^2} on the first superdiagonal, and so on.

In the time domain Z−1[z(zI−Mi)−1]=Mit\mathcal{Z}^{-1}\big[z(zI-M_i)^{-1}\big]=M_i^t, which gives the pairs

Z[λt](z)=zz−λ,Z[tλt](z)=z(z−λ)2, …\mathcal{Z}[\lambda^t](z)=\frac z{z-\lambda},\qquad\mathcal{Z}[t\lambda^t](z)=\frac z{(z-\lambda)^2},\ \dots

and, for λ=0\lambda=0, Z[δ(t−k)](z)=z−k\mathcal{Z}[\delta(t-k)](z)=z^{-k}.

Example: modes from the frequency domain

Compute the inverse z-transform of S(z)=1(z+1)(z−1)S(z)=\dfrac1{(z+1)(z-1)} and find its modes. A decomposition Az+1+Bz−1\tfrac A{z+1}+\tfrac B{z-1} is not enough: we need terms of the form Azz+1\tfrac{Az}{z+1}, so expand S(z)/zS(z)/z instead:

S(z)z=1z(z+1)(z−1)=Az+Bz+1+Cz−1,\frac{S(z)}z=\frac1{z(z+1)(z-1)}=\frac Az+\frac B{z+1}+\frac C{z-1},

A=1(0+1)(0−1)=−1,B=1(−1)(−1−1)=12,C=11⋅(1+1)=12.A=\frac1{(0+1)(0-1)}=-1,\qquad B=\frac1{(-1)(-1-1)}=\frac12,\qquad C=\frac1{1\cdot(1+1)}=\frac12 .

Hence S(z)=−1+12zz+1+12zz−1S(z)=-1+\tfrac12\tfrac z{z+1}+\tfrac12\tfrac z{z-1} and

s(t)=Z−1[S(z)](t)=−δ(t)+12(−1)t+12 1t.s(t)=\mathcal{Z}^{-1}[S(z)](t)=-\delta(t)+\tfrac12(-1)^t+\tfrac12\,1^t .

Warning: s(t)≡0s(t)\equiv0 for t<0t<0. The correct way of writing the result is

s(t)=[−δ(t)+12((−1)t+1)]δ−1(t),s(t)=\Big[-\delta(t)+\tfrac12\big((-1)^t+1\big)\Big]\delta_{-1}(t),

where δ−1(t)\delta_{-1}(t) (also written 1(t)\mathbb{1}(t)) is the unit step: 00 for t<0t<0 and 11 for t≥0t\ge0.

Example: impulse response, transfer matrix and output

F=(0001), G=(11), H=(1−1), J=1, x(0)=(10), u(t)=(−1)tδ−1(t).F=\begin{pmatrix}0&0\\0&1\end{pmatrix},\ G=\begin{pmatrix}1\\1\end{pmatrix},\ H=\begin{pmatrix}1&-1\end{pmatrix},\ J=1,\ x(0)=\begin{pmatrix}1\\0\end{pmatrix},\ u(t)=(-1)^t\delta_{-1}(t).

Compute w(t)w(t), W(z)W(z) and y(t)y(t).

Impulse response w(t)w(t) (response to u(t)=δ(t)u(t)=\delta(t) with x(0)=0x(0)=0). From x(t)=Ftx(0)+Ft−1G∗u(t)x(t)=F^tx(0)+F^{t-1}G*u(t):

w(t)=HFt−1G∗δ(t)+1⋅δ(t)=HFt−1G+δ(t)(t≥1 for the first term).w(t)=HF^{t-1}G*\delta(t)+1\cdot\delta(t)=HF^{t-1}G+\delta(t)\quad(t\ge1\text{ for the first term}).

Ft=(δ(t)1)F^t=\begin{pmatrix}\delta(t)&\\&1\end{pmatrix}, so

HFt−1G=(1−1)(δ(t−1)1)(11)=δ(t−1)−1,HF^{t-1}G=\begin{pmatrix}1&-1\end{pmatrix}\begin{pmatrix}\delta(t-1)&\\&1\end{pmatrix}\begin{pmatrix}1\\1\end{pmatrix}=\delta(t-1)-1,

w(t)=(HFt−1G)δ−1(t−1)+δ(t)=(δ(t−1)−1)δ−1(t−1)+δ(t)={0t<01t=0δ(t−1)−1t>0.w(t)=\big(HF^{t-1}G\big)\delta_{-1}(t-1)+\delta(t)=\big(\delta(t-1)-1\big)\delta_{-1}(t-1)+\delta(t)=\begin{cases}0&t<0\\1&t=0\\\delta(t-1)-1&t>0.\end{cases}

Transfer matrix. (zI−F)−1=(zz−1)−1=(z−11z−1)(zI-F)^{-1}=\begin{pmatrix}z&\\&z-1\end{pmatrix}^{-1}=\begin{pmatrix}z^{-1}&\\&\tfrac1{z-1}\end{pmatrix}, so

W(z)=H(zI−F)−1G+J=z−1−1z−1+1.W(z)=H(zI-F)^{-1}G+J=z^{-1}-\frac1{z-1}+1 .

Check that Z[w(t)]=W(z)\mathcal{Z}[w(t)]=W(z): since 1z−1=zz⋅1z−1\tfrac1{z-1}=\tfrac z{z}\cdot\tfrac1{z-1} and 1z(z−1)=−1z+1z−1\tfrac1{z(z-1)}=-\tfrac1z+\tfrac1{z-1}, we get 1z−1=−1+zz−1\tfrac1{z-1}=-1+\tfrac z{z-1}, so Z−1[1z−1](t)=−δ(t)+1tδ−1(t)\mathcal{Z}^{-1}\big[\tfrac1{z-1}\big](t)=-\delta(t)+1^t\delta_{-1}(t) and

Z−1[W(z)](t)=δ(t−1)−(−δ(t)+δ−1(t))+δ(t)=2δ(t)+δ(t−1)−δ−1(t).\mathcal{Z}^{-1}[W(z)](t)=\delta(t-1)-\big(-\delta(t)+\delta_{-1}(t)\big)+\delta(t)=2\delta(t)+\delta(t-1)-\delta_{-1}(t).

Output with x(0)=(1,0)Tx(0)=(1,0)^T and u(t)=(−1)tδ−1(t)u(t)=(-1)^t\delta_{-1}(t):

y(t)=HFtx(0)+(HFt−1G δ−1(t)+J)∗u(t).y(t)=HF^tx(0)+\Big(HF^{t-1}G\,\delta_{-1}(t)+J\Big)*u(t).

Free part: HFtx(0)=(1−1)(δ(t)1)(10)=δ(t)HF^tx(0)=\begin{pmatrix}1&-1\end{pmatrix}\begin{pmatrix}\delta(t)&\\&1\end{pmatrix}\begin{pmatrix}1\\0\end{pmatrix}=\delta(t).

Forced part in the zz-domain: Yf(z)=W(z)U(z)Y_f(z)=W(z)U(z) with U(z)=zz+1U(z)=\tfrac z{z+1}:

Yf(z)=(z−1−1z−1+1)zz+1=1z+1−z(z+1)(z−1)+zz+1.Y_f(z)=\Big(z^{-1}-\frac1{z-1}+1\Big)\frac z{z+1}=\frac1{z+1}-\frac z{(z+1)(z-1)}+\frac z{z+1}.

Use 1z+1=1−zz+1\tfrac1{z+1}=1-\tfrac z{z+1} and z(z+1)(z−1)=−12zz+1+12zz−1\tfrac z{(z+1)(z-1)}=-\tfrac12\tfrac z{z+1}+\tfrac12\tfrac z{z-1}. Then

Yf(z)=1+12zz+1−12zz−1 →Z−1 yf(t)=(δ(t)+12(−1)t−12 1t)δ−1(t).Y_f(z)=1+\frac12\frac z{z+1}-\frac12\frac z{z-1}\ \xrightarrow{\mathcal{Z}^{-1}}\ y_f(t)=\Big(\delta(t)+\tfrac12(-1)^t-\tfrac12\,1^t\Big)\delta_{-1}(t).

Full output:

y(t)=δ(t)+(δ(t)+12(−1)t−12)δ−1(t)=2δ(t)+(12(−1)t−12)δ−1(t).y(t)=\delta(t)+\Big(\delta(t)+\tfrac12(-1)^t-\tfrac12\Big)\delta_{-1}(t)=2\delta(t)+\Big(\tfrac12(-1)^t-\tfrac12\Big)\delta_{-1}(t).

Versione ripasso

  • Definition: H(z)=Z[h(t)](z)=∑t≥0h(t)z−tH(z)=\mathcal Z[h(t)](z)=\sum_{t\ge0}h(t)z^{-t} (the discrete analog of the Laplace transform ∫0∞x(t)e−stdt\int_0^\infty x(t)e^{-st}dt).
  • Frequency-domain solution of x(t+1)=Fx(t)+Gu(t)x(t+1)=Fx(t)+Gu(t): the shift gives Z[x(t+1)]=z(X(z)−x(0))\mathcal Z[x(t+1)]=z\big(X(z)-x(0)\big), so (zI−F)X(z)=zx(0)+GU(z)(zI-F)X(z)=zx(0)+GU(z) and X(z)=z(zI−F)−1x(0)+(zI−F)−1GU(z)X(z)=z(zI-F)^{-1}x(0)+(zI-F)^{-1}GU(z). Compare with x(t)=Ftx(0)+Ft−1G∗u(t)x(t)=F^tx(0)+F^{t-1}G*u(t) (Solution of Discrete-Time LTI SystemsA discrete-time LTI system is solved by iterating the difference equation, which gives a free evolution F to the power t times the initial state plus a convolution with F to the power t minus one times G, and the matrix power is computed through the diagonal or Jordan form with binomial coefficients.Solution of Discrete-Time LTI Systems →): Z[Ft]=z(zI−F)−1\mathcal Z[F^t]=z(zI-F)^{-1} and Z[Ft−1G]=(zI−F)−1G\mathcal Z[F^{t-1}G]=(zI-F)^{-1}G.
  • Output: Y(z)=zH(zI−F)−1x(0)+(H(zI−F)−1G+J)U(z)Y(z)=zH(zI-F)^{-1}x(0)+\big(H(zI-F)^{-1}G+J\big)U(z). The transfer matrix is W(z)=H(zI−F)−1G+JW(z)=H(zI-F)^{-1}G+J, and Yf(z)=W(z)U(z)Y_f(z)=W(z)U(z). The extra zz in z(zI−F)−1z(zI-F)^{-1} comes from the one-step lag. Continuous-time comparison: Transfer Matrix of Continuous-Time LTI SystemsThe Laplace transform turns an LTI state-space model into the transfer matrix W(s) equal to H times the inverse of sI minus F times G plus J, which is invariant under a change of state basis, has the modes of the system as poles, and can hide modes through zero-pole cancellations.Transfer Matrix of Continuous-Time LTI Systems →.
  • Jordan blocks: Z[λt]=zz−λ\mathcal Z[\lambda^t]=\frac z{z-\lambda}, Z[tλt]=z(z−λ)2\mathcal Z[t\lambda^t]=\frac z{(z-\lambda)^2}, Z[δ(t−k)]=z−k\mathcal Z[\delta(t-k)]=z^{-k}.
  • Inverse transform: expand S(z)/zS(z)/z in partial fractions. Example: S(z)=1(z+1)(z−1)S(z)=\frac1{(z+1)(z-1)} gives s(t)=[−δ(t)+12((−1)t+1)]δ−1(t)s(t)=\big[-\delta(t)+\tfrac12\big((-1)^t+1\big)\big]\delta_{-1}(t), with s≡0s\equiv0 for t<0t<0.
  • Example F=diag(0,1)F=\mathrm{diag}(0,1), G=(1,1)TG=(1,1)^T, H=(1 −1)H=(1\ -1), J=1J=1: (zI−F)−1=diag(z−1,1z−1)(zI-F)^{-1}=\mathrm{diag}(z^{-1},\tfrac1{z-1}), so W(z)=z−1−1z−1+1W(z)=z^{-1}-\frac1{z-1}+1. Impulse response: w(t)=(δ(t−1)−1)δ−1(t−1)+δ(t)w(t)=(\delta(t-1)-1)\delta_{-1}(t-1)+\delta(t), which is 00 for t<0t<0, 11 at t=0t=0, and δ(t−1)−1\delta(t-1)-1 for t>0t>0. Check: Z−1[W]=2δ(t)+δ(t−1)−δ−1(t)\mathcal Z^{-1}[W]=2\delta(t)+\delta(t-1)-\delta_{-1}(t).
  • Output with x(0)=(1,0)Tx(0)=(1,0)^T and u(t)=(−1)tδ−1(t)u(t)=(-1)^t\delta_{-1}(t): free part δ(t)\delta(t), forced part Yf(z)=W(z)zz+1=1+12zz+1−12zz−1Y_f(z)=W(z)\frac z{z+1}=1+\frac12\frac z{z+1}-\frac12\frac z{z-1}. Total: y(t)=2δ(t)+(12(−1)t−12)δ−1(t)y(t)=2\delta(t)+\big(\tfrac12(-1)^t-\tfrac12\big)\delta_{-1}(t).
  • Typical errors: forgetting the extra zz in z(zI−F)−1z(zI-F)^{-1}; expanding S(z)S(z) instead of S(z)/zS(z)/z.

Teoria collegata