[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: designing band pass filters
Mark Bishop wrote:
>
> Well, this really has nothing to do with linux..YET
>
> I'm desiging a voice recognizer and I'm running into a problem designing
> the band pass filters. If anyone has any experience with this can you let
> me know.
>
Use linux and spice to design the circuit...
Install the spice3 rpms from ftp.redhat.com:
ftp.redhat.com has site exec locate xxx <- very handy IMHO
ftp> site exec locate spice
200-locate spice
....
200-/ftp/pub/contrib/grouped/glibc/i386/Applications/Engineering/spice-3f4-4.i386.rpm
200-/ftp/pub/contrib/grouped/glibc/i386/Applications/Engineering/spice-examples-3f4-4.i386.rpm
....
I installed the above two rpms and modified
/usr/lib/spice/examples/rc.cir to the following:
rc.cir
Basic RC circuit
* input on nodes 1 and 0
* output on nodes 2 and 0
* inductor and resistor in series between
* input node 1 and output node 2
* resistor is load on output
r 2 0 250.0
l 1 3 1uH
c 3 2 1000uF
vin 1 0 1 ac
* sweep from 1000Hz to 20000Hz divide plot into 40 steps
* graph output on node 2 in decibels
.ac dec 40 1000 20000
.plot ac vdb(2) xlog
.end
Roughly:
Center frequency = 1/(2*pi*(L * C)^0.5)
Bandwidth = R/L
spice3 < rc.cir produces this:
(Sorry if your mail agent breaks this into separate lines..)
Spice Output:
Circuit: Basic RC circuit
Date: Tue Mar 3 23:23:11 1998
--------------------------------------------------------------------------
Basic RC circuit
AC Analysis Tue Mar 3 23:23:11 1998
Legend: + = db(v(2))
--------------------------------------------------------------------------
frequency db(v(2))-2.00e-06 -1.00e-06
0.00e+00
----------------------|------------------------|------------------------|
1.000e+03 -1.624e-06 . + .
.
1.059e+03 -1.433e-06 . + .
.
1.122e+03 -1.263e-06 . + .
.
1.189e+03 -1.111e-06 . + .
.
1.259e+03 -9.759e-07 . +
.
1.334e+03 -8.557e-07 . . +
.
1.413e+03 -7.487e-07 . . +
.
1.496e+03 -6.534e-07 . . +
.
1.585e+03 -5.686e-07 . . +
.
1.679e+03 -4.933e-07 . . +
.
1.778e+03 -4.263e-07 . . +
.
1.884e+03 -3.668e-07 . . +
.
1.995e+03 -3.141e-07 . . +
.
2.113e+03 -2.673e-07 . . +
.
2.239e+03 -2.260e-07 . . +
.
2.371e+03 -1.895e-07 . . +
.
2.512e+03 -1.573e-07 . . +
.
2.661e+03 -1.291e-07 . . +
.
2.818e+03 -1.044e-07 . . +
.
2.985e+03 -8.296e-08 . . +
.
3.162e+03 -6.447e-08 . . +
.
3.350e+03 -4.868e-08 . . +
.
3.548e+03 -3.537e-08 . .
+.
3.758e+03 -2.438e-08 . .
+.
3.981e+03 -1.556e-08 . .
+.
4.217e+03 -8.788e-09 . .
+.
4.467e+03 -3.976e-09 . .
+.
4.732e+03 -1.061e-09 . .
+.
5.012e+03 -4.882e-12 . .
+.
5.309e+03 -7.926e-10 . .
+.
5.623e+03 -3.435e-09 . .
+.
5.957e+03 -7.967e-09 . .
+.
6.310e+03 -1.445e-08 . .
+.
6.683e+03 -2.297e-08 . .
+.
7.079e+03 -3.363e-08 . .
+.
7.499e+03 -4.659e-08 . . +
.
7.943e+03 -6.201e-08 . . +
.
8.414e+03 -8.009e-08 . . +
.
8.913e+03 -1.011e-07 . . +
.
9.441e+03 -1.253e-07 . . +
.
1.000e+04 -1.530e-07 . . +
.
1.059e+04 -1.845e-07 . . +
.
1.122e+04 -2.204e-07 . . +
.
1.189e+04 -2.610e-07 . . +
.
1.259e+04 -3.069e-07 . . +
.
1.334e+04 -3.587e-07 . . +
.
1.413e+04 -4.172e-07 . . +
.
1.496e+04 -4.830e-07 . . +
.
1.585e+04 -5.571e-07 . . +
.
1.679e+04 -6.404e-07 . . +
.
1.778e+04 -7.341e-07 . . +
.
1.884e+04 -8.393e-07 . . +
.
1.995e+04 -9.576e-07 . .+
.
----------------------|------------------------|------------------------|
frequency db(v(2))-2.00e-06 -1.00e-06
0.00e+00
CPU time since last call: 0.220 seconds.
Total CPU time: 0.220 seconds.
A better circuit could be designed using active components, but I'd have
to pull my EE textbook on Analysis of Linear Circuits. Perhaps a digital
filter would be more applicable, especially if you need to adjust the
bandwidth on the fly, but CPU utilization for the digital processing
would be a problem. :)
-----------------------------------------------
- Matthew Crawford - mattman@fastrans.net -
- PC Applications Development -
- Internet/Intranet Team -
- Enterprise Rent-a-Car -
-----------------------------------------------
--
To unsubscribe, send email to majordomo@silug.org with
"unsubscribe silug-discuss" in the body.