Mathcad - Butter Worth PLC
Mathcad - Butter Worth PLC
Mathcad - Butter Worth PLC
s + 2 s + 1
Tp1( s) := 1 s Tp2( s) := +1 1
s + 2 s + 1
n 2
n := 0 .. 256
hz := 10
n
64
))
bw2 :=
n
( (
))
M p1 := 20 log Tp1 2 j hz
n
( ( ( (
)) ))
p1 :=
n
( ( ( (
)) ))
M p2 := 20 log Tp2 2 j hz
n
p2 :=
n
1/4
11/24/200811:53 AM
Magnitude
0
20
Magnitude
40
60
80
100 0.01
0.1
1 Frequency
10
100
Phase
0 9 18 27 36 45 54 63 72 81 90 99 108 117 126 135 144 153 162 171 180 0.01
Phase
0.1
1 Frequency
10
100
2/4
11/24/200811:53 AM
:= 0.01
The coefficients below were computes using matched z transforms, MZT, Euler's identity,and a lot of substitution and simplification. The MZT technique does not introduce zeros in the z domain or require frequency warping. A2 := e
2
A2 = 0.914975803093201 A1 = 1.9111995199846044
2
A1 := 2 e
cos( ) cos( ) + e
B 0 := 1 2 e
A1 + A2 + B 0 = 1
Time := 2 Initialize filter, the first two filter values are assumed to be 0. n := 0 .. 1 n := 2 .. Time y := 0
n
x := sin( freq n )
n
x := sin( freq n )
n n
y := A1 y
n 1
+ A2 y
+ B0 x
3/4
11/24/200811:53 AM
Butterworth
1
0.5
0.5
1 Time
1.5
Input Output
4/4
11/24/200811:53 AM