Skip to content

Commit

Permalink
Quartz sync: Nov 8, 2024, 12:42 AM
Browse files Browse the repository at this point in the history
  • Loading branch information
JunningHuang committed Nov 7, 2024
1 parent 3a08724 commit 02abd75
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions content/Math/Difference Equations and Z transform.md
Original file line number Diff line number Diff line change
@@ -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}
$$


0 comments on commit 02abd75

Please sign in to comment.