[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: gEDA-user: How to?
On Tuesday 12 July 2005 11:05 am, Harold D. Skank wrote:
> I have created a state variable BP filter. I can run the ac
> analysis using ngspice, and that seems to work very well. It
> has allowed me to specifiy the circuit values to get the band
> shape that I need. Now though, I would like to see the
> circuit response to a 5-cycle truncated sine wave input,
> since this is the "real" signal that the filter will see in
> operation. How do I specify this as a voltage input and how
> do I actually run the simulation?
Why don't you try gnucap?
Gnucap has a "generator" that lets you set up things like this.
.generator freq=1k delay=.001 width=.005
vin (1 0) generator
On Tuesday 12 July 2005 11:18 am, Stuart Brorson wrote:
> 1. Model the truncated sine wave as a piecewise linear
> signal, use a PWL voltage source as the excitation, and then
> use a .tran analysis to examine the result. This will give
> you a bunch of spurious harmonics whose magnitude and
> frequency will depend upon how finely you discretize the
> signal, but perhaps you don't need to worry about them in
> your analysis.
That's really rough unless you use lots of points. Gnucap adds
a "FIT" that is like "PWL" except that you can specify the
order of interpolation. Specifying an order of 3 makes it fit
with cubic splines. You can also specify the boundary
conditions. You can specify a knot by giving the same point
twice. Still, I don't recommend this for what you are doing.
On Tuesday 12 July 2005 11:18 am, Stuart Brorson wrote:
> 2. Use a voltage controlled switch to connect an AC voltage
> source to your filter for the desired time, and then
> disconnect it afterwards.......
>....... I believe that ngspice will support
> voltage controlled switches too. However, I don't have
> first-hand experience with this.
Of course it does. It starts with "S". Spice 3 does, so as far
as I know all Spice derivatives except some really old ones do.
Another possibility is to use a poly or a "B" device as a
multiplier.
On Tuesday 12 July 2005 11:29 am, Gene Heskett wrote:
> Just off thet op of my head, Harold, a state variable BP
> filter is usually going to have too high a Q factor to
> adequately respond to a 5 cycle burst. ............
Tone burst tests are often used to evaluate the performance of
filters. A state variable filter can have any Q you want, even
very low. I might use a cheaper design for low Q, but nothing
beats the 3-op-amp design for ease of tuning.