diff --git a/content/Math/Difference Equations and Z transform.md b/content/Math/Difference Equations and Z transform.md new file mode 100644 index 0000000..bb910d5 --- /dev/null +++ b/content/Math/Difference Equations and Z transform.md @@ -0,0 +1,53 @@ +--- +title: Difference Equations and Z transform +draft: false +tags: + - DifferenceEquation + - ZTransform +--- +Let's recall a bit some basic foundations of differential equations and Laplace transform, the simplest linear ODE: +$$ +\begin{aligned} +\dot{x}=ax+bu +\end{aligned} +$$ +Laplace transform is invented to solve such a DE, take the Laplace transform, we have +$$ +\begin{aligned} +sX(s)=aX(s)+bU(s) +\end{aligned} +$$ +Rearrange we have +$$ +\begin{aligned} +\frac{X(s)}{U(s)}=\frac{b}{s+a} +\end{aligned} +$$ +we can see that the Laplace transform helps us to ease the computation of convolution into product and then do inverse Laplace transform. + +Now let's move on to difference equations +$$ +\begin{aligned} +x[n]=ax[n-1]+bu[n] +\end{aligned} +$$ +Take the z transform, +$$ +\begin{aligned} +X(z)=az^{-1}X(z)+bU(z) +\end{aligned} +$$ +Rearrange we have, +$$ +\begin{aligned} +\frac{X(z)}{U(z)}=\frac{b}{1-az^{-1}} +\end{aligned} +$$ +let $b=1-\gamma$ and $a=\gamma$, the difference equation becomes +$$ +\begin{aligned} +x[n]=\gamma x[n-1]+(1-\gamma) u[n] +\end{aligned} +$$ + +