Continue to Site

# Finding the phase difference between digital signals

#### FreshmanNewbie

##### Full Member level 6
I have 3 digital signals of different phases in a Simetrix simulation.

Can someone tell me how to measure the phase difference between the signals from the simulation?

Use cursors in plot of signals to measure delay, you know period,

Maybe a script probe......

Here XNOR used as phase detector, sources were set at 0, 120, 240 degrees equivalent
via delay parameter in pulse3 gen source config. Note phase detector only good for
180 degrees, and then warps, so ref for each phase is phase to phase to phase, not to
origin phase.

Regards, Dana.

Last edited:

Hi,

to messure phase you need a signal and a reference.

You say you have three signals, but whet is the reference:

***
Phase measurement is a frequent topic here. Do a forum search.
There are fully digital solutions using counters,
and there digital/analog solutions, like the (digital) XOR followed by an (analog) low pass filter.

We don´t know what output you expect, also we don´t know about frequency, expected accuracy, resolution...

Klaus

Use cursors in plot of signals to measure delay, you know period,

Maybe a script probe......

View attachment 184459

Here XNOR used as phase detector, sources were set at 0, 120, 240 degrees equivalent
via delay parameter in pulse3 gen source config. Note phase detector only good for
180 degrees, and then warps, so ref for each phase is phase to phase to phase, not to
origin phase.

Regards, Dana.

The delay between the phases is 6.6ms. Can you tell me how to convert to radians/phase?

Hi,

Otherwise post a picture of your signals, and tell us what's the periodic time and de time difference.

BR

Capture the Signals:
Ensure you have access to the three digital signals in your Simetrix simulation. You'll need the waveform data for each signal.

Identify a Reference Signal:
Choose one of the three signals as your reference signal. This will be the baseline against which you'll measure the phase differences of the other two signals.

Extract Signal Periods:
Divide each signal's waveform into individual periods. This is particularly important if the signals are not perfectly periodic. For instance, if you have square waves, identify rising or falling edges that mark the start of each period.
I have 3 digital signals of different phases in a Simetrix simulation.

Can someone tell me how to measure the phase difference between the signals from the simulation?

All recent circuit analysis programs have measurement features that can extract parameters from the simulation output, e.g. the transient analysis waveforms.

As the question is specific to Simetrix, do you know what the Simetrix Measurement GUI is? If not, suggest to review the user manual.

The delay between the phases is 6.6ms. Can you tell me how to convert to radians/phase?

So you have a signal period of Tperiod. In Tperiod the signal, depending on point
of origin, say an edge, to next edge is 360 degrees.

So Phase (in degrees) = ( 360 degrees / Tperiod ) x Tdelay, time in identical units like
mS, uS......... You can then convert to radians if so needed. So one signal is the reference,
the others are measured against that edge. You pick the reference of interest, the signal
to use as the reference phase, as Klaus mentioned earlier.

Note you can have phase measurements that exceed 360 degrees, if Tdelay is > Tperiod.
Eg. you are in next period(s) or cycle(s) of a pulse train.

Lastly keep in mind this is for signals that all have the same Frequency. The discussion
becomes more complicated when this is not case for non integer Frequency relation-
ships between the signals, and the "traditional" concept of phase takes on a time
varying relationship because edges are no longer fixed in relationship to the reference
phase.

Regards, Dana.

Last edited:

Since this is "digital" you'd be working from detected edges
(like .measure statement in ngspice, cross() in Cadence
ADE/Spectre calculator, etc.) and then figure phase from the
time results against whatever is your reference edge.