Hi All,
I will try to phrase my problem here but please do refer to the enclosed 4 slides: they contain snapshots of the circuit and setup concerning this question.
I need to get a good grasp on how the ENV simulation works, as it could potentially save a lot of time when dealing with complex/modulated signals in a frequency shifting system.
However, I preferred to start from the very basic stuff and in the following my signal - although bandpass - is not the classic few tones and a carrier which get mixed down or up...It is actually just a sum of sinusoids coming from a vsin source.
I am simulating with ENV a vsin with two tones, 1V at 7.9MHz and 0.5V at 6.9MHz
The aim of the exercise is to get acquainted with the different ENV parameters and be able to plot the power spectrum of the signal.
To this end, I then set the simulation time according to the frequency resolution I want to obtain: in my case I wanted 10KHz, therefore I simulate for 100us or multiples thereof.
Since I know I'll end up doing FFTs and those need/want number of samples which are a power of 2, I then set up the "Fund Frequency" parameter in the ENV setup accordingly, as 2048 times my resolution frequency.(This gives a Nyquist frequency of 10.24MHz, which is enough for my test).
Also, to avoid the psd() function to interpolate my signal, I also force a strobe time equal to twice my "Fund Frequency" period.
I have "tested" all this "theory" in normal TRAN simulations, with dft and psd, so I am confident that I am not making too many mistakes here.
However, what IS really surprising to me is that the same circuit, with the same frequency/sim time/strobe period setup, gives DIFFERENT results as far as the harmonic time components are concerned, if I set up for "shooting" or "Harmonic Balance".
In the attached slides, you could see that the x-axis points stay the same, since those are the strobing times, but the y-values of the two harmonic time (h=0) waveforms largely differ.
This also has the effect of giving a wrong absolute value for the psd peaks in the case of shooting. The HB case gives the correct absolute values for PSD. Both psd() do preserve ratios.
I cannot figure out why the same circuit, under same parameters of accuracy, simulation time, frequency...Would give such wildly differing results.
I am clearly missing something here...Any hints?
Thanks,
Michele
P.S. my connection to CAD environment is down so I will report later about Virtuoso version :)
(Please visit the site to view this file)