> > People, > > This questions sounds pretty basic for someone who has been around SPICE > as long as I have. I first ran SPICE when I had to submit the circuit > on punched cards for simulation on an IBM 7074. Had to wait about a day > to get the results back on line printer paper. Well, on to gEDA > questions. > > 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? > > Sounds dumb, huh?
Actually, no. I think you're being too modest. SPICE isn't really set up to make this kind of excitation easy. Here are two ways which come to mind, neither is really that straightforward: 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. 2. Use a voltage controlled switch to connect an AC voltage source to your filter for the desired time, and then disconnect it afterwards. Drive the voltage controlled switch from a PWL voltage source. Peter Kaiser contributed a SPICE voltage controlled switch symbol to gschem, so you can use it on your schematic. I believe that ngspice will support voltage controlled switches too. However, I don't have first-hand experience with this. HTH, Stuart
