Analog Signal Measurement

MrChips

Joined Oct 2, 2009
34,841
Phase shift is relative to a given reference.
You cannot measure phase shift of a signal itself.

If you wish to determine the RMS value of a sine wave, you can either measure the signal amplitude or digitize N complete cycles.
 

joeyd999

Joined Jun 6, 2011
6,325
Phase shift is relative to a given reference.
You cannot measure phase shift of a signal itself.

If you wish to determine the RMS value of a sine wave, you can either measure the signal amplitude or digitize N complete cycles.
Oh, there's lots of tricks to do this. The choice of method hangs on the nature of the input signal, how much precision and accuracy is required, how much data is available, how much processing power one has, and how much time one has to complete a computation. Each method has its own trade-offs.
 

joeyd999

Joined Jun 6, 2011
6,325
I don't know what CPU/MCU you're using, but there are chips with dedicated hardware that do exactly this -- if you don't want to go the software math route.
 

crutschow

Joined Mar 14, 2008
38,534
Don't quite understand what you are doing.
Why is the phase-shift of interest?
Are you actually measuring both phase-shift and amplitude of the sinewave?
 

Futurist

Joined Apr 8, 2025
771
How does such a rough estimate help him to display the "phase shift" on a scope?
By doing precisely what he alluded to, put the original signal on ch1 and the regenerated (ADC-DAC) signal on ch2.

And how does knowing the resolution help?
What harm does it to ask? My personal approach is basically to do a lot of fact finding up front, especially easy questions that entail no effort. The more one knows about his problem space the better I think. Sometime an apparently unimportant detail learned early on can be valuable in unexpected ways, further into the problem.
 

schmitt trigger

Joined Jul 12, 2010
2,096
The below is the graphs i came up with, with 50uS delay the phase shift is
360Deg - 0.02 sec => for 50uS it is 0.9Deg is what i get. I plotted in Desmos as below.
After the replies i have come to understanding that the sampling time + conversion time is fixed irrespective of the frequency. And this delay will be fixed even if i use it for further processing.
I basically agree with your analysis.
But as others have already mentioned, since the sampling rate is not phase-locked to the sampled waveform, it may be in your best interest to make the sampling frequency a non-integral multiple of the sampled frequency.
Just my two yen worth of opinion.
 
Top