Spectrum Software
Industrial Strength Simulation




Spectrum Software has released Micro-Cap 11, the eleventh generation of our SPICE circuit simulator.

For users of previous Micro-Cap versions, check out the new features available in the latest version. For those of you who are new to Micro-Cap, take our features tour to see what Micro-Cap has to offer.




Questions and Answers


Question: I'm trying to create a VCO using an NFV source. I've defined the NFV source as:


and I then use a .define statement to define the FSweep variable as:

.define FSweep (1Meg * t + 1000)

When I run transient analysis for .01s, the frequency of the sine source seems to be erratic and high when it should steadily increase from 1kHz to 11kHz, but when I set FSweep to a constant number, it works as I expect. How do I get this to work correctly?

Answer: The VCO you created was actually our first draft for a VCO macro also and with the results we experienced we had to really look into the mathematics of it. The reason for the discrepancy is that the frequency of a sine wave is actually the derivative of the sine's argument (hence the integrator we have in the VCO macro) so if the expression is as follows:

sin(arg) = sin(2*PI*v*t)
f=d(arg)/dt = 2*PI*(v+t*dv/dt)

where v is also a time based equation.

f=2*PI*(v+t*dv/dt) is the actual frequency being produced but
f=2*PI*v is the theoretical frequency we want.

That is why, when the input is a constant, it will work fine since t*dv/dt goes to 0.

The best method for solving this is to use the VCO macro that comes with Micro-Cap. If you are intent on creating your own VCO, the derivative factor must be taken into account to produce a working model.

Return to the main Newsletter page