Continue to Site

# Plotting phase difference between two sinusoidal signals

Status
Not open for further replies.

#### soi34

##### Newbie
Dear all,

I want to plot the phase difference between two sinusoidal waveforms. I am running a transient simulation and plotting input and output waveforms. The systems adds a specific amount of phase shift in some time interval. I want to observe the phase shit by plotting phase of Vin-Vout. I am not able to do it by using suggested calculator functions such as phase, phased or delay functions.

Any Ideas?

Maybe if you told us what software you're using, somebody could help you out.

Use FFT Function and plot Phase of each signal.

Use FFT Function and plot Phase of each signal.
That won’t do it. First of all, OP wants input phase vs output phase, not individual phases. Second, and it’s not completely clear from OP’s statement “The systems adds a specific amount of phase shift in some time interval”, if the phase is varying over time. If it IS time-varying phase I think it gets very complex and an FFT isn’t going to give the required information. (I am not an expert on this, so might be totally wrong).

I understand the question as simulation software operation problem. In so far it's different from a real design problem where we e.g. want to measure phase difference of noisy signals.

In transient simulation, measurement functions can determine zero crossings and calculate frequency and phase shift. FFT can do too, but fundamental has to be chosen suitably.

The Exclusive-OR gate is a method that might provide some result.
Come to think of it, you might get a measurement from any Boolean logic function. Example, AND gate.

First convert each signal into a square wave via Schmitt trigger. Condition each waveform to yield duty cycle 50 pct.

Delay×frequency×360 is your phase shift between cycles. You can do it by Viva function called delay.

Hi,

I assume you can implement mathematical calculations, like it is possible in LTspice, see below.

BR

Status
Not open for further replies.