Could someone please help me understand this ?

Could some electronics guru here please help me undestand the following.

I created the SPICE simulation for a common collector Colpitts oscillator. The target oscillation frequency is

500.0 MHz, and I am using the HFA3134 RF/microwave NPN transistor, with a Ft of 8 GHz. When the raw transient analysis data is plotted and the resolution adjusted to clearly see individual oscillations, the waveform looks approximately like a sine wave - 'approximately' as the top peak of each oscillation looks a bit distorted. Using the cursor feature of the plotting tool, the oscillation frequency is estimated as 507 MHz. So far so good. The transient analysis sampling interval is 25 picoseconds.

I have creted a aimple C program to compute the Discrete Fourier Transform of a given time dependent signal, based on sample code in Numerical Recipes in C. To test the DFT code, I created a 450 MHz sample signal, and from the generated power spectrum of this test signal, the main peak is at 453 MHz. This gives me confidence that the DFT code is working fine.

Now the interesting part. When the transient analysis data from the above Colpitts oscillator(target oscillation frequency 400 MHz) the highest signal peak(excluding the

0 frequency DC value) is at 1.16 GHz, which is approximately double the signal frequency obtained by plotting the transient analysis data - please see above.

So does this mean that most of the oscillator signal energy is concentrated at double the design oscillation frequency ? All ideas/suggestions are welcome. Thanks in advance.

Reply to
dakupoto
Loading thread data ...

If the signal looks like like a slightly clipped 453MHz sine wave, most of the energy is at 453MHz, much less energy at twice that. I'm sure you can visualise what it would look like if he 2 frequencies had equal energy.

NT

Reply to
tabbypurr

I'd be happier if it gave 450 MHz. Try feeding it a square wave at least that way you can recognise all the harmonic components easily.

I suspect what you are seeing is some 3rd harmonic distortion from the clipping of the sine waveform at nominally 400MHz x3 = 1.2GHz.

You might find it enlightening to display your raw waveform with a perfect sine wave of the fundamental frequency subtracted from it.

--
Regards, 
Martin Brown
Reply to
Martin Brown

If it looks anything like a sine wave, the FT should show a big spike at the obvious frequency. Maybe a bug in the FT code?

LT Spice does FFTs for you.

--

John Larkin         Highland Technology, Inc 

lunatic fringe electronics
Reply to
John Larkin

The first thing I look at in an oscillator simulation is the FFT. Bad oscillators are visible immediately.

Perhaps the OP can explain why that's not good enough?

Clifford Heath.

Reply to
Clifford Heath

LT Spice doesn't simulate oscillators very well in time domain.

At the default settings, it doesn't simulate a sine wave generator very well.

--

John Larkin         Highland Technology, Inc 

lunatic fringe electronics
Reply to
John Larkin

is data - please see above.

Works fine for me.

I wonder how John Larkin has managed to mangle his default settings.

Class C oscillators do depend on turning a single transistor on briefly, on ce per cycle, and the Gummmel-Poon model for transistors (which is what LTS pice mostly runs - if you could get the parameters for VBIC model you could run that but I've never been able to) isn't great in the relevant region.

My variant of the Wien Bridge simulates fine, but gains stay more or less t he same all the way through the cycle.

--
Bill Sloman, Sydney
Reply to
bill.sloman

The following is the output from the FFT program with the 450 MHz test signal and 0.1 nanosecond signal sampling time. 'out1' is the text file in which it dumps the power spectrum. ./fftnew test450MHzsignal out1 0.1

50003.000000 1.000000e-10 1.999880e+05 read input file data start read input file data end start FT real - imag value calculation end FT calculation search peaks and frequencies start search peaks and frequencies end 3 highest frequencies and peaks 4.501730e+08 Hz 82429.969444 4.701718e+08 Hz 253.629068 4.901706e+08 Hz 134.808409 number of data rows read in 50003

Clearly, the 450 MHz peak is huge compared to the others.

Reply to
dakupoto

I totally agree with you that FT is the best way to analyze the oscillator output. The output for the

450 MHz test signal with a 0.1 nano second sampling interval is: ./fftnew test450MHzsignal out1 0.1 50003.000000 1.000000e-10 1.999880e+05 read input file data start read input file data end start FT real - imag value calculation end FT calculation search peaks and frequencies start search peaks and frequencies end 3 highest frequencies and peaks 4.501730e+08 Hz 82429.969444 4.701718e+08 Hz 253.629068 4.901706e+08 Hz 134.808409 number of data rows read in 50003

Clearly the magnitude of the 450 MHz signal is huge compared to the others, and the program therefore correctly identified the frequency of the test signal.

Reply to
dakupoto

Right, but that's immediately visible in the LTSpice FFT spectrum display. There was no need to write your own program.

Reply to
Clifford Heath

Well, I use HSpice at work, and Ngspice at home, both of which use a test file input netlist.

The C language FT code is a straightforward application of the transform, and does any features such as radix 2 etc., Over the years I have learned the hard way that often writing one's own code gives very tight control over the problem at hand and avoids bothersome moments like sitting in front of the terminal, staring at some strange results and wondering what could be going wrong.

Reply to
dakupoto

If you sim an oscillator in time domain, you can look at the waveform and see the frequency. Cursor a full cycle or so and LT Spice will show the period and its reciprocal. If your private FFT shows a different frequency, it's wrong.

If phase noise matters, it's a pain to sim a high-Q oscillator in time domain. You need a tiny dT and many, many cycles to get to steady-state and have a good FFT. Crystal oscillators are really hard to sim in time domain. It's better to analyze in frequency domain, to maximize loop gain/freq slope, but then that misses the amplitude-limiting nonlinearities.

Nowadays I just buy XOs.

--

John Larkin         Highland Technology, Inc 

lunatic fringe electronics
Reply to
John Larkin

Yes, crystal oscillators are notoriously difficult to simulate, but there is the 'kick start" method, which, although brute force always works(as expected). It consists of a damped high amplitude(e.g., 750 V) sine wave signal placed in between the series capacitor and inductor of the RLC leg of the crystal. I have used it with HSpice at work a few years ago to analyze a 60 MHz crystal oscillator. HSpice also supports advanced tools as Periodic Steady State, Harmonic Balance, Periodic AC etc., All SPICE queries that post on this newsgroup are related solely to my work at home using Ngspice. damped

Reply to
dakupoto

You can set the initial conditions inside the crystal model so that it starts at full swing. Zoom the peaks to see if the amplitude is constant, and tweak a little. But you still need a tiny time step to even sim the steady-state accurately.

HP made a digital delay generator that kick-started an XO when an external trigger arrived. It was ugly.

Our DDGs kick start an LC oscillator at trigger time, which is much easier. That simulates well enough.

--

John Larkin         Highland Technology, Inc 

lunatic fringe electronics
Reply to
John Larkin

Switched DC on the crystal capacitance works too.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs 
Principal Consultant 
ElectroOptical Innovations LLC / Hobbs ElectroOptics 
Optics, Electro-optics, Photonics, Analog Electronics 
Briarcliff Manor NY 10510 

http://electrooptical.net 
http://hobbs-eo.com
Reply to
Phil Hobbs

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.