How to measure phase of output signal for plotting instantaneous frequency


 

I am trying to design a pulse generator using Nonlinear transmission line. For the output signal, I am getting a Gaussian pulse shape like wave with some ringing for which I need to plot instantaneous frequency to understand what frequency has the main contribution in certain points. How do I measure the phase of the signal through LTspice so that I can export it to plot instantaneous frequency? 


 

abid asked how to determine phase (between two signals?) of a damped sine wave, I think.  That is not an easy thing to do.

If it was a linear circuit, you could use .AC analysis to get phase shift.  But you can't.

Defining "phase shift" is somewhat challenging when it is not a continuous sinusoid signal.

If you want to know "what frequency has the main contribution", how does phase matter?  And what is the phase measured with respect to?

Andy


 

Considering frequency as dphi/dt, start with a finite small time interval, during which the circuit  might be safely assumed to be linear. Reference phase is then the phase at the start of the time interval and dphi is phi(end) - phi(start). Now reduce the time interval to something small enough to be considered infinitesimal. The resulting dphi/dt is the 'instantaneous frequency'. The implementation of this in LTspice is, of course, left as an exercise for the reader.

On 2024-07-11 16:59, Andy I wrote:
abid asked how to determine phase (between two signals?) of a damped sine wave, I think.  That is not an easy thing to do.

If it was a linear circuit, you could use .AC analysis to get phase shift.  But you can't.

Defining "phase shift" is somewhat challenging when it is not a continuous sinusoid signal.

If you want to know "what frequency has the main contribution", how does phase matter?  And what is the phase measured with respect to?

Andy
-- 
OOO - Own Opinions Only
Best Wishes
John Woodgate
Keep trying

Virus-free.www.avg.com


 

I have uploaded a pic here. https://groups.io/g/LTspice/album?id=296338

 

I am trying to do pulse compression using NLTL. So, green pulse is an input Gaussian pulse and Blue wave is the output after 50 sections of NLTL. How can i measure the phase of the output with respect to either time or input signal?

 

For this type of output, can we know "what frequency has the main contribution" from FFT? To measure the instantaneous frequency, I need the phase information. The idea was to plot a 2D colored plot in Matlab with the axis having IF and time and the color signifying the intensity of the pulse. Let me know if there is an easier/correct way to determine the main frequencies.


 

I may be thick, but doesn't FFT provide the type of information you wish?
I would think that the ray that has the highest amplitude would indicate the "main contribution".

Le 11/07/2024 à 18:56, abid a écrit :

I have uploaded a pic here. https://groups.io/g/LTspice/album?id=296338

 

I am trying to do pulse compression using NLTL. So, green pulse is an input Gaussian pulse and Blue wave is the output after 50 sections of NLTL. How can i measure the phase of the output with respect to either time or input signal?

 

For this type of output, can we know "what frequency has the main contribution" from FFT? To measure the instantaneous frequency, I need the phase information. The idea was to plot a 2D colored plot in Matlab with the axis having IF and time and the color signifying the intensity of the pulse. Let me know if there is an easier/correct way to determine the main frequencies.


 

I have uploaded the FFT of the output signal as 2.png here.  https://groups.io/g/LTspice/album?id=296338

 

From the FFT, can we determine the main contributing frequency? The FWHM of the input pulse is 40n and time delay was 80n.


 

Using an FFT is a tricky situation, and you should be pretty familiar with how it works.  Likely the strongest signal in the FFT spectum is the repetition frequency of your input pulse.  If you simulated only one pulse, and simulated it for 1.0 us, then the FFT (like all FFTs) considers that this pulse repeats every 1.0 us, so it would have a fundamental frequency of 1.0 MHz and that should be prominent in its spectrum.  Depending on how well things line up for the FFT, the spectrum it shows could be either good or bad.  Spectral components can be spread out.  Also keep in mind the frequency resolution of the FFT.  When you get it right, then lines in the spectrum ought to correspond to ringing components, which you can then measure, subject to the resolution of the FFT.  OTOH, if some of the ringing components line up "just right", they could cancel themselves out, in the FFT's spectrum, but leave other components present.

How much do you know about the "signal" you want to look at, referring to the ringing?  Is it a constant frequency?  Is the frequency known?  Knowing this is essential to understand what is its absolute phase as a function of time.  If you were to take a random signal, or something that looks like ringing but is actually an amalgam of two, five, or 20 individual frequencies, or a signal whose frequency changes, then you can't truthfully tell its phase.  If the amplitude changes too - which it does - then that's another variable.  Too many unknowns.

Simple example:  If a signal's instantaneous voltage was v(t)=1.0 V at time t=4.0 us, and then later you observe v(t)=0.9 V at t=4.001 us, did the voltage go down because the phase was advancing that far, or was it because the amplitude (of the sine wave) changed?  Or both?  And how much of each?  Only if you know the amplitude didn't change, could you say that the change in v(t) was due to phase alone.

Andy