-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3a08724
commit 02abd75
Showing
1 changed file
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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} | ||
$$ | ||
|
||
|