View Single Post
  #4   Report Post  
Old April 17th 07, 12:08 AM posted to rec.radio.amateur.homebrew
Jessie Jessie is offline
external usenet poster
 
First recorded activity by RadioBanter: Apr 2007
Posts: 2
Default PSPICE frequency ananlysis

On Apr 13, 3:01 pm, "AF6AY" wrote:
On Apr 13, 7:04?am, "Jessie" wrote:

Hi everyone,


I have a small question aboutPSPICE. I'm usingPSPICEto simulate a
colpitts oscillator, and want to know the resonantfrequencyof the
circuit. What should I do to set up the simulation condition? I used
the transient simulation and FFT hoping to find the spectrum figure,
but it seems if I change the time step the spectrum also changes???
What should I do now? I'll appreciate any of your help!


Jessie


I haven't usedPSPICEfor several years and am unacquainted
with newer versions, preferring the LTSpice free package
available from Linear Technology Corporation. Both use the
same SPICE core routines-algorithms so it all depends on
how the variants "wrap" the core routines for human interfaces.

None of the SPICE variants can yield an "exact"frequency
of oscillation...but you can come close to that depending on
how many thousands of repetitive cycles it allows in memory
and the available memory of your computer. [I would carefully
check thePSPICEmanual for conditions necessary with
their "wrapper" controls]

With LTSpice I've not had a problem with oscillator circuit
simulation start-up...not with starting at t=0 or delayed.
For example, a 10 MHz crystal oscillator simulation might
take 50 mSec or thereabouts to reach a stable oscillatory
condition so one can't expect to see a sinusoid oscillation
very near 0 time. With L-C tuned oscillators the start-up
time is sooner than that due to lower Q of L-C versus a
simulated quartz crystal.

One of the difficult tasks in designing an oscillator circuit
ON Spice (as opposed to beginning on paper) is obtaining
proper feedback and the limiting conditions of voltage-current
swings. There isn't any "easy" answer for that. An
integrated schematic-net-list function (as in LTSpice) makes
it easy to twiddle values to get one going. More twiddling
with values gives one a "feel" for getting the right mix of
parts values. My suggestion is to do that twiddling of values
until oscillation is established and seems stable enough with
supply voltage variations. Once there the measurement
procedure for actual oscillationfrequencywould be rote work
of counting of oscillation cycles and their slight phase shifts
over the time intervals. The first step is insuring there IS an
oscillation happening.

In the beginning of SPICE (core entirely free from Berkeley)
it was a #$%^!!! job to introduce some kind of momentary
transient (or "noise") to disturb the simulation model ("shock"
it gently if you will) to begin oscillation. Most variants no
longer need that since their "wrappers" have been modified
to handle it.

The only question on various SPICE packages is their
numerical accuracy in regards tofrequencyof oscillation.
Few packages will say that directly. At minimum the
simulation calculations would be done with "single
precision" equivalent to 7 decimal digit calculation accuracy.
Most seem to use "double precision" or 14 decimal digit
equivalents so the simulated oscillationfrequencycould
be close to 1 part per million for a very large circuit model
(worst case with all errors adding up the same worst way).

MOST IMPORTANT of all is the simulation model and its
components, including the stray/parasitic parts of each
passive component as well as an accurate model of the
active parts (transistor, diode, or vacuum tube). Most
SPICE variants have a large active component library and
those are quite accurate to nominal operation of the real
parts. Failure to model the circuit correctly will result in
failed results...one just can't cobble together some parts
as on the bench and get some kind of action going.

OK, now that I've done the "spanking" [ :-) ] about basics,
it's time to get the model working. Once that is done, the
niceties of checking the harmonics is one of the last
jobs. The FFT check on harmonics inPSPICEis probably
different from LTSpice because the FFT routines are in the
"wrapper" of the SPICE routine's core. Those vary depending
on the variants program build.

Good luck on your model.

73, Len AF6AY




Hi Len,

Thank you very much for your detailed explanation on SPICE. I think a
very fast way to find the resonant frequency is to know the critical
resonant frequency first, and try to find the resonant period which is
corresponding to the highest voltage in the plot. After that, you can
do a FFT if you're lazy to convert the time period to frequency.
Although this is not very accurate, but this is the most direct way to
simulate resonant frequency I guess. Hope my final solution is not
too coarse...

Jessie