EMRFD Message Archive 7153

7153 2012-01-05 05:59:49 Leon Heller SPICE simulation of an oscillator - getting it to start. Message Date From Subject I found a neat way to get a crystal oscillator to start in a SPICE simulation in an EDN article last night, which worked very well with a Hartley oscillator simulation. It involves placing a sine generator with a damped sine output of a few cycles at the oscillator frequency in series with the lower inductor. The parameters I used are: AC 1 0 Sine(0 1 5Meg 0.1n 8e+6) Here is my schematic: http://www.leonheller.com/images/Hartley.pdf Leon -- Leon Heller G1HSM My method is to add an initial condition to the current of some coil. For your circuit I first add a series resistor to L2 of say 0.1 Ohm. Then add a label (say 's') to the top of L2+L2Rs (or better L1). Then add the condition: .ic V(s) = 10m The starting voltage, together with the series resistance, determines the running current of the oscillator. The oscillator may start "instantly" depending on the circuit. Play with the voltage to see what value matches the final operati On 07/01/2012 12:35, joop_l wrote: > My method is to add an initial condition to the current of some coil. > For your circuit I first add a series resistor to L2 of say 0.1 Ohm. > Then add a label (say 's') to the top of L2+L2Rs (or better L1). > Then add the condition: > .ic V(s) = 10m > > The starting voltage, together with the series resistance, determines > the running current of the oscillator. The oscillator may start > "instantly" depending on the circuit. Play with the voltage to see what > value matches the final operation level of the tank circuit. Adding a pulse to the circuit is also supposed to work. I used to use that, but forgot the details, and subsequently couldn't get the things to start. The damped sine seems very reliable, it also worked with a Colpitts, and is nice and simple. It doesn't even have to be all that close to the oscillator frequency. Leon -- Leon Heller G1HSM Right, I tried several methods. But the "initial condition" was the only one that gave me instant start. Which is a big benefit if the circuit is quite complex. Else it might still take too much simulation time for my taste to reach the final operati I too use the "initial conditions" method of adding current to the oscillator inductor. You can even tune the magnitude of this current to be in a level that gives you a constant level oscillations at a time interval and be sure that this brings your simulation to be close to the final stabilisation level of oscillations of the oscillator. Victor - 4Z4ME