The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Simulators >> Circuit Simulators >> HSPICE behavioral VCO?
https://designers-guide.org/forum/YaBB.pl?num=1197498992

Message started by joel on Dec 12th, 2007, 2:36pm

Title: HSPICE behavioral VCO?
Post by joel on Dec 12th, 2007, 2:36pm

Can anyone tell me how to create a behavioral VCO in HSPICE?
The manual clearly describes the voltage-controlled-voltage-source syntax for this:

Evco out 0 VOL='sin( TwoPI * freq * v(control) * TIME)'

and then goes on to say that it doesn't work if v(control) is time-varying.
The manual is correct that it doesn't work...

Thanks in advance for any advice!  /jd

Title: Re: HSPICE behavioral VCO?
Post by Eugene on Dec 12th, 2007, 8:15pm

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.


The Designer's Guide Community Forum » Powered by YaBB 2.2.2!
YaBB © 2000-2008. All Rights Reserved.