Definition
For a sequence h ( t ) h(t) h ( t ) , t ∈ N t\in\mathbb{N} t ∈ N , the z-transform is
H ( z ) = Z [ h ( t ) ] ( z ) = ∑ t = 0 + ∞ h ( t ) z − t , z ∈ C H(z)=\mathcal{Z}[h(t)](z)=\sum_{t=0}^{+\infty}h(t)z^{-t},\qquad z\in\mathbb{C} H ( z ) = Z [ h ( t )] ( z ) = t = 0 ∑ + ∞ h ( t ) z − t , z ∈ C
(the Laplace transform in continuous time is L [ x ( t ) ] ( s ) = ∫ 0 + ∞ x ( t ) e − s t d t \mathcal{L}[x(t)](s)=\int_0^{+\infty}x(t)e^{-st}\,dt L [ x ( t )] ( s ) = ∫ 0 + ∞ x ( t ) e − s t d t ).
Solution in the frequency domain
Take x ( t + 1 ) = F x ( t ) + G u ( t ) x(t+1)=Fx(t)+Gu(t) x ( t + 1 ) = F x ( t ) + G u ( t ) , multiply by z − t z^{-t} z − t and sum over t ≥ 0 t\ge0 t ≥ 0 :
∑ t = 0 + ∞ x ( t + 1 ) z − t = ∑ t = 0 + ∞ F x ( t ) z − t + ∑ t = 0 ∞ G u ( 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}. t = 0 ∑ + ∞ x ( t + 1 ) z − t = t = 0 ∑ + ∞ F x ( t ) z − t + t = 0 ∑ ∞ G u ( t ) z − t .
In the left-hand side set τ = t + 1 \tau=t+1 τ = 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). τ = 1 ∑ + ∞ x ( τ ) z − τ + 1 = z τ = 1 ∑ + ∞ x ( τ ) z − τ = z [ τ = 0 ∑ + ∞ x ( τ ) z − τ − x ( 0 ) ] = z ( X ( z ) − x ( 0 ) ) .
Therefore
z X ( z ) − z x ( 0 ) = F X ( z ) + G U ( z ) ⟹ ( z I − F ) X ( z ) = z x ( 0 ) + G U ( z ) , zX(z)-zx(0)=FX(z)+GU(z)\ \Longrightarrow\ (zI-F)X(z)=zx(0)+GU(z), z X ( z ) − z x ( 0 ) = FX ( z ) + G U ( z ) ⟹ ( z I − F ) X ( z ) = z x ( 0 ) + G U ( z ) ,
X ( z ) = z ( z I − F ) − 1 x ( 0 ) + ( z I − F ) − 1 G U ( z ) . X(z)=z(zI-F)^{-1}x(0)+(zI-F)^{-1}GU(z). X ( z ) = z ( z I − F ) − 1 x ( 0 ) + ( z I − F ) − 1 G U ( z ) .
Comparing with the time-domain solution x ( t ) = F t x ( 0 ) + F t − 1 G ∗ u ( t ) x(t)=F^tx(0)+F^{t-1}G*u(t) x ( t ) = F t x ( 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 [ F t ] ( z ) = z ( z I − F ) − 1 , Z [ F t − 1 G ] ( z ) = ( z I − F ) − 1 G \mathcal{Z}[F^t](z)=z(zI-F)^{-1},\qquad\mathcal{Z}[F^{t-1}G](z)=(zI-F)^{-1}G Z [ F t ] ( z ) = z ( z I − F ) − 1 , Z [ F t − 1 G ] ( z ) = ( z I − F ) − 1 G
(the board writes the second without G G G , presumably a slip). Output:
Y ( z ) = z H ( z I − F ) − 1 x ( 0 ) + ( H ( z I − F ) − 1 G + J ) U ( z ) , Y(z)=zH(zI-F)^{-1}x(0)+\Big(H(zI-F)^{-1}G+J\Big)U(z), Y ( z ) = zH ( z I − F ) − 1 x ( 0 ) + ( H ( z I − F ) − 1 G + J ) U ( z ) ,
so the transfer matrix is W ( z ) = H ( z I − F ) − 1 G + J W(z)=H(zI-F)^{-1}G+J W ( z ) = H ( z I − F ) − 1 G + J , and Y f ( z ) = W ( z ) U ( z ) Y_f(z)=W(z)U(z) Y f ( z ) = W ( z ) U ( z ) for the forced response.
In continuous time L [ e F t ] ( s ) = ( s I − F ) − 1 \mathcal{L}[e^{Ft}](s)=(sI-F)^{-1} L [ e Ft ] ( s ) = ( s I − 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" z z z in z ( z I − F ) − 1 z(zI-F)^{-1} z ( z I − F ) − 1 accounts for the one-step lag of the difference equation.
Computing z ( z I − F ) − 1 z(zI-F)^{-1} z ( z I − F ) − 1
Consider J = d i a g ( M 1 , … , M κ ) J=\mathrm{diag}(M_1,\dots,M_\kappa) J = diag ( M 1 , … , M κ ) with Jordan blocks M i M_i M i (eigenvalue λ \lambda λ , ones on the superdiagonal). Then z I − M i zI-M_i z I − M i has z − λ z-\lambda z − λ on the diagonal and − 1 -1 − 1 on the superdiagonal, and
if λ = 0 \lambda=0 λ = 0 : z ( z I − M i ) − 1 z(zI-M_i)^{-1} z ( z I − M i ) − 1 is upper triangular with 1 1 1 on the diagonal, z − 1 z^{-1} z − 1 on the first superdiagonal, z − 2 z^{-2} z − 2 on the next, and so on;
if λ ≠ 0 \lambda\ne0 λ = 0 : z ( z I − M i ) − 1 z(zI-M_i)^{-1} z ( z I − M i ) − 1 is upper triangular with z z − λ \dfrac z{z-\lambda} z − λ z on the diagonal, z ( z − λ ) 2 \dfrac z{(z-\lambda)^2} ( z − λ ) 2 z on the first superdiagonal, and so on.
In the time domain Z − 1 [ z ( z I − M i ) − 1 ] = M i t \mathcal{Z}^{-1}\big[z(zI-M_i)^{-1}\big]=M_i^t Z − 1 [ z ( z I − M i ) − 1 ] = M i t , which gives the pairs
Z [ λ t ] ( z ) = z z − λ , 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 Z [ λ t ] ( z ) = z − λ z , Z [ t λ t ] ( z ) = ( z − λ ) 2 z , …
and, for λ = 0 \lambda=0 λ = 0 , Z [ δ ( t − k ) ] ( z ) = z − k \mathcal{Z}[\delta(t-k)](z)=z^{-k} Z [ δ ( 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)} S ( z ) = ( z + 1 ) ( z − 1 ) 1 and find its modes. A decomposition A z + 1 + B z − 1 \tfrac A{z+1}+\tfrac B{z-1} z + 1 A + z − 1 B is not enough: we need terms of the form A z z + 1 \tfrac{Az}{z+1} z + 1 A z , so expand S ( z ) / z S(z)/z S ( z ) / z instead:
S ( z ) z = 1 z ( z + 1 ) ( z − 1 ) = A z + B z + 1 + C z − 1 , \frac{S(z)}z=\frac1{z(z+1)(z-1)}=\frac Az+\frac B{z+1}+\frac C{z-1}, z S ( z ) = z ( z + 1 ) ( z − 1 ) 1 = z A + z + 1 B + z − 1 C ,
A = 1 ( 0 + 1 ) ( 0 − 1 ) = − 1 , B = 1 ( − 1 ) ( − 1 − 1 ) = 1 2 , C = 1 1 ⋅ ( 1 + 1 ) = 1 2 . A=\frac1{(0+1)(0-1)}=-1,\qquad B=\frac1{(-1)(-1-1)}=\frac12,\qquad C=\frac1{1\cdot(1+1)}=\frac12 . A = ( 0 + 1 ) ( 0 − 1 ) 1 = − 1 , B = ( − 1 ) ( − 1 − 1 ) 1 = 2 1 , C = 1 ⋅ ( 1 + 1 ) 1 = 2 1 .
Hence S ( z ) = − 1 + 1 2 z z + 1 + 1 2 z z − 1 S(z)=-1+\tfrac12\tfrac z{z+1}+\tfrac12\tfrac z{z-1} S ( z ) = − 1 + 2 1 z + 1 z + 2 1 z − 1 z and
s ( t ) = Z − 1 [ S ( z ) ] ( t ) = − δ ( t ) + 1 2 ( − 1 ) t + 1 2 1 t . s(t)=\mathcal{Z}^{-1}[S(z)](t)=-\delta(t)+\tfrac12(-1)^t+\tfrac12\,1^t . s ( t ) = Z − 1 [ S ( z )] ( t ) = − δ ( t ) + 2 1 ( − 1 ) t + 2 1 1 t .
Warning: s ( t ) ≡ 0 s(t)\equiv0 s ( t ) ≡ 0 for t < 0 t<0 t < 0 . The correct way of writing the result is
s ( t ) = [ − δ ( t ) + 1 2 ( ( − 1 ) t + 1 ) ] δ − 1 ( t ) , s(t)=\Big[-\delta(t)+\tfrac12\big((-1)^t+1\big)\Big]\delta_{-1}(t), s ( t ) = [ − δ ( t ) + 2 1 ( ( − 1 ) t + 1 ) ] δ − 1 ( t ) ,
where δ − 1 ( t ) \delta_{-1}(t) δ − 1 ( t ) (also written 1 ( t ) \mathbb{1}(t) 1 ( t ) ) is the unit step: 0 0 0 for t < 0 t<0 t < 0 and 1 1 1 for t ≥ 0 t\ge0 t ≥ 0 .
Example: impulse response, transfer matrix and output
F = ( 0 0 0 1 ) , G = ( 1 1 ) , H = ( 1 − 1 ) , J = 1 , x ( 0 ) = ( 1 0 ) , 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). F = ( 0 0 0 1 ) , G = ( 1 1 ) , H = ( 1 − 1 ) , J = 1 , x ( 0 ) = ( 1 0 ) , u ( t ) = ( − 1 ) t δ − 1 ( t ) .
Compute w ( t ) w(t) w ( t ) , W ( z ) W(z) W ( z ) and y ( t ) y(t) y ( t ) .
Impulse response w ( t ) w(t) w ( t ) (response to u ( t ) = δ ( t ) u(t)=\delta(t) u ( t ) = δ ( t ) with x ( 0 ) = 0 x(0)=0 x ( 0 ) = 0 ). From x ( t ) = F t x ( 0 ) + F t − 1 G ∗ u ( t ) x(t)=F^tx(0)+F^{t-1}G*u(t) x ( t ) = F t x ( 0 ) + F t − 1 G ∗ u ( t ) :
w ( t ) = H F t − 1 G ∗ δ ( t ) + 1 ⋅ δ ( t ) = H F t − 1 G + δ ( 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}). w ( t ) = H F t − 1 G ∗ δ ( t ) + 1 ⋅ δ ( t ) = H F t − 1 G + δ ( t ) ( t ≥ 1 for the first term ) .
F t = ( δ ( t ) 1 ) F^t=\begin{pmatrix}\delta(t)&\\&1\end{pmatrix} F t = ( δ ( t ) 1 ) , so
H F t − 1 G = ( 1 − 1 ) ( δ ( t − 1 ) 1 ) ( 1 1 ) = δ ( 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, H F t − 1 G = ( 1 − 1 ) ( δ ( t − 1 ) 1 ) ( 1 1 ) = δ ( t − 1 ) − 1 ,
w ( t ) = ( H F t − 1 G ) δ − 1 ( t − 1 ) + δ ( t ) = ( δ ( t − 1 ) − 1 ) δ − 1 ( t − 1 ) + δ ( t ) = { 0 t < 0 1 t = 0 δ ( t − 1 ) − 1 t > 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} w ( t ) = ( H F t − 1 G ) δ − 1 ( t − 1 ) + δ ( t ) = ( δ ( t − 1 ) − 1 ) δ − 1 ( t − 1 ) + δ ( t ) = ⎩ ⎨ ⎧ 0 1 δ ( t − 1 ) − 1 t < 0 t = 0 t > 0.
Transfer matrix. ( z I − F ) − 1 = ( z z − 1 ) − 1 = ( z − 1 1 z − 1 ) (zI-F)^{-1}=\begin{pmatrix}z&\\&z-1\end{pmatrix}^{-1}=\begin{pmatrix}z^{-1}&\\&\tfrac1{z-1}\end{pmatrix} ( z I − F ) − 1 = ( z z − 1 ) − 1 = ( z − 1 z − 1 1 ) , so
W ( z ) = H ( z I − F ) − 1 G + J = z − 1 − 1 z − 1 + 1. W(z)=H(zI-F)^{-1}G+J=z^{-1}-\frac1{z-1}+1 . W ( z ) = H ( z I − F ) − 1 G + J = z − 1 − z − 1 1 + 1.
Check that Z [ w ( t ) ] = W ( z ) \mathcal{Z}[w(t)]=W(z) Z [ w ( t )] = W ( z ) : since 1 z − 1 = z z ⋅ 1 z − 1 \tfrac1{z-1}=\tfrac z{z}\cdot\tfrac1{z-1} z − 1 1 = z z ⋅ z − 1 1 and 1 z ( z − 1 ) = − 1 z + 1 z − 1 \tfrac1{z(z-1)}=-\tfrac1z+\tfrac1{z-1} z ( z − 1 ) 1 = − z 1 + z − 1 1 , we get 1 z − 1 = − 1 + z z − 1 \tfrac1{z-1}=-1+\tfrac z{z-1} z − 1 1 = − 1 + z − 1 z , so Z − 1 [ 1 z − 1 ] ( t ) = − δ ( t ) + 1 t δ − 1 ( t ) \mathcal{Z}^{-1}\big[\tfrac1{z-1}\big](t)=-\delta(t)+1^t\delta_{-1}(t) Z − 1 [ z − 1 1 ] ( t ) = − δ ( t ) + 1 t δ − 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). Z − 1 [ W ( z )] ( t ) = δ ( t − 1 ) − ( − δ ( t ) + δ − 1 ( t ) ) + δ ( t ) = 2 δ ( t ) + δ ( t − 1 ) − δ − 1 ( t ) .
Output with x ( 0 ) = ( 1 , 0 ) T x(0)=(1,0)^T x ( 0 ) = ( 1 , 0 ) T and u ( t ) = ( − 1 ) t δ − 1 ( t ) u(t)=(-1)^t\delta_{-1}(t) u ( t ) = ( − 1 ) t δ − 1 ( t ) :
y ( t ) = H F t x ( 0 ) + ( H F t − 1 G δ − 1 ( t ) + J ) ∗ u ( t ) . y(t)=HF^tx(0)+\Big(HF^{t-1}G\,\delta_{-1}(t)+J\Big)*u(t). y ( t ) = H F t x ( 0 ) + ( H F t − 1 G δ − 1 ( t ) + J ) ∗ u ( t ) .
Free part: H F t x ( 0 ) = ( 1 − 1 ) ( δ ( t ) 1 ) ( 1 0 ) = δ ( 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) H F t x ( 0 ) = ( 1 − 1 ) ( δ ( t ) 1 ) ( 1 0 ) = δ ( t ) .
Forced part in the z z z -domain: Y f ( z ) = W ( z ) U ( z ) Y_f(z)=W(z)U(z) Y f ( z ) = W ( z ) U ( z ) with U ( z ) = z z + 1 U(z)=\tfrac z{z+1} U ( z ) = z + 1 z :
Y f ( z ) = ( z − 1 − 1 z − 1 + 1 ) z z + 1 = 1 z + 1 − z ( z + 1 ) ( z − 1 ) + z z + 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}. Y f ( z ) = ( z − 1 − z − 1 1 + 1 ) z + 1 z = z + 1 1 − ( z + 1 ) ( z − 1 ) z + z + 1 z .
Use 1 z + 1 = 1 − z z + 1 \tfrac1{z+1}=1-\tfrac z{z+1} z + 1 1 = 1 − z + 1 z and z ( z + 1 ) ( z − 1 ) = − 1 2 z z + 1 + 1 2 z z − 1 \tfrac z{(z+1)(z-1)}=-\tfrac12\tfrac z{z+1}+\tfrac12\tfrac z{z-1} ( z + 1 ) ( z − 1 ) z = − 2 1 z + 1 z + 2 1 z − 1 z . Then
Y f ( z ) = 1 + 1 2 z z + 1 − 1 2 z z − 1 → Z − 1 y f ( t ) = ( δ ( t ) + 1 2 ( − 1 ) t − 1 2 1 t ) δ − 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). Y f ( z ) = 1 + 2 1 z + 1 z − 2 1 z − 1 z Z − 1 y f ( t ) = ( δ ( t ) + 2 1 ( − 1 ) t − 2 1 1 t ) δ − 1 ( t ) .
Full output:
y ( t ) = δ ( t ) + ( δ ( t ) + 1 2 ( − 1 ) t − 1 2 ) δ − 1 ( t ) = 2 δ ( t ) + ( 1 2 ( − 1 ) t − 1 2 ) δ − 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). y ( t ) = δ ( t ) + ( δ ( t ) + 2 1 ( − 1 ) t − 2 1 ) δ − 1 ( t ) = 2 δ ( t ) + ( 2 1 ( − 1 ) t − 2 1 ) δ − 1 ( t ) .