Eugene
|
Many years ago, before we had VerilogA, we wrote macro models. There was a paper in one of the power electronics journals back then that described a motor model that used a VCO to convert a voltage representing instantaneous shaft angular velocity into instantaneous shaft position. The motivation for computing position was to insert a detent torque. Anyway, you could vary the frequency of that VCO model. The VCO model consisted of two ideal integrators in a simple feedback loop. Each integrator was preceded by a multiplier that multiplied the output of the other integrator with the desired frequency. You have to introduce a sign inversion in the loop too. If you write out the equations, you see the differential equation that defines sine and cos functions. In short, you can create a simple VCO out of two integrators. The pre-VerilogA integrators were constructed from controlled current sources and capacitors. The multipliers were made from non-linear polynomial controlled sources.
One thing to watch out for is numerical decay of the oscillations. One solution to that problem is to use a Van der Pol oscillator, perhaps followed by a filter if you want a nice sinusoid. Another solution is to leak a small amount of current onto one of the caps through a resistor.
|