While sorting through some very old papers I came across a solution to an interesting problem that I I struggled with when I was learning DSP. I have no idea where the original problem came from so I've replicated it here, as best I can remember, along with the solution:
The following first order direct form II filter :
w(n)
x(n) -->+-------------------+-->y(n)
^ | ^
| +----+ |
| |z^-1| |
| +----+ |
| | |
| v |
----*-----------*----
a1 w(n-1) b1
Is defined by the following equations:
y(n) = w(n) + b1.w(n-1) (1)
w(n) = x(n) + a1.w(n-1) (2)
Question: Show the difference equation in terms of y and x ?
Hint: Rearranging to a direct form I filter structure will help.
Solution
Diagramatically
x(n) -------------+-------------->y(n)
| ^ |
+----+ | +----+
|z^-1| | |z^-1|
+----+ | +----+
| | |
v | v
----*----+----*----
b1 a1
Hence:
y(n) = x(n) + b1.x(n-1) + a1.y(n-1)
Mathematically
From (2):
w(n-1) = x(n-1) + a1.w(n-2) (3)
Substituting (2) and (3) into (1), to compute the output:
y(n) = x(n) + a1.w(n-1) + b1.[x(n-1) + a1.(w(n-2)] (4)
Rearranging to combine w terms:
y(n) = x(n) + b1.x(n-1) + a1.[w(n-1) + b1.w(n-2)] (5)
From (1): y(n-1) = w(n-1) + b1.w(n-2) (6)
Substituting (6) into (5) gives:
y(n) = x(n) + b1 x(n-1) + a1 y(n-1)
No comments:
Post a Comment