Easiest - Approximate Phase Angle Between Two 4 SNR Signals

Both signals have mostly the same noise. The noise is at least several times higher in frequency and usually several times lower in amplitude.

The phase angle will be less than 5 degrees.

The bad news is both the frequency of the fundamental and its waveform vary somewhat with time.

In this particular situation has anyone ever tried integrating both signals at least once reduce the noise and to eliminate multiple crossings and then to obtain several phase angles / cycle to average?

The accuracy doesn't need to be better than +/- 20% of the phase angle. In other words, in absolute terms the phase angle may need to be good down to 0.1 degrees but the error relative to the phase angle can be large.

Bret Cahill

Reply to
Bret Cahill
Loading thread data ...

Both signals have mostly the same noise. The noise is at least several times higher in frequency and usually several times lower in amplitude.

The phase angle will be less than 5 degrees.

The bad news is both the frequency of the fundamental and its waveform vary somewhat with time.

In this particular situation has anyone ever tried integrating both signals at least once reduce the noise and to eliminate multiple crossings and then to obtain several phase angles / cycle to average?

The accuracy doesn't need to be better than +/- 20% of the phase angle. In other words, in absolute terms the phase angle may need to be good down to 0.1 degrees but the error relative to the phase angle can be large.

Bret Cahill

Reply to
Bret Cahill

Then a lowpass filter will remove the noise.

Then you have to define "phase angle" before you can measure it. Phase of the fundamental? Zero crossings? Something else?

As noted, lowpass filter it.

There are all sorts of ways to measure phase differences accurately.

The problem is currently too poorly defined to make a bunch of suggestions worthwhile.

John

Reply to
John Larkin

Would a simple RC or higher order filter be any better than several integrations?

That seems to be what works graphically using sin curves instead of real noise.

Thanks.

Bret Cahill

Reply to
Bret Cahill

formatting link

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

Do you need to implement control loops in software?
"Applied Control Theory for Embedded Systems" was written for you.
See details at http://www.wescottdesign.com/actfes/actfes.html
Reply to
Tim Wescott

Correction:

Would a simple LC or higher order filter be any better than several integrations?

o
Reply to
Bret Cahill

Each integrator will add a -6 dB/octave frequency rolloff, and 90 degrees of phase lag, to your signal. A filter can leave your signal essentially unchanged, so long as you're not too close to the cutoff frequency. Integrators also have that little (or enormous) problem with zero offset, mathematically the "constant of integration."

John

Reply to
John Larkin

Both signals need to be integrated so the lags should cancel out when determining the phase angle.

Those constants should cancel out as well.

The problem with integration is it kind of like dead reckoning. If you try to go too far with too many integrations completely blind with no channel markers you might end up in the wrong ocean.

That won't be an issue if the number of cycles and integrations is low enough and landing anywhere between San Diego and LA is OK.

Bret Cahill

Reply to
Bret Cahill

Yes.

No.

Too abstract for me. What are you trying to do?

John

Reply to
John Larkin

in

Both can be re centered on the t axis after integration.

The waveforms are only slightly different.

Get the phase angle of the principle.

Bret Cahill

Reply to
Bret Cahill

If I understand correctly, two signals are A =3D a1 * sin( w*t + p1) + noise B =3D a2 * sin(w*t + p2) + noise2

and what is wanted is a measure of the phase difference, p1-p2, which is presumed to be small?

That's relatively easy. First, you need to know 'a1' and 'a2'; this can be done by computing the RMS average value of A and B (ignore noise for this part). Then, note that the average of the product

avg( A*B) =3D avg( a1 * a2 sin(w*t + p1) sin(w*t + p2) + noise terms)

we depend on the average of the noise terms to be zero... and on the constancy of a1 and a2, so

avg( A * B) =3D a1 * a2 * avg( sin (w*t + p1) sin(w*t + p2))

now using trig identities

avg( A*B) =3D a1 * a2 * avg( (sin(w*t) cos(p1) + sin(p1) cos(w*t) )

*(sin(w*t)cos(p2) + sin(p2)cos(w*t))

Expand the product; sines and cosines average to zero, so only two terms contribute

avg (A * B) =3D a1 * a2 * avg( sin**2(w*t)cos(p1) cos(p2) + cos**2(w*t) sin(p1) sin(p2))

now note that the average of sine-squared and cosine-squared are 1/2, and the phases p1 and p2 are constants, time-averaging doesn't change them

avg(A*B) =3D a1 * a2 * 1/2 * (cos(p1) cos(p2) + sin(p1)sin(p2))

now use trig identity

avg(A*B) =3D a1 * a2 * 1/2 * cos(p1 - p2)

and your answer for the phase difference is

(p1 - p2) =3D acos( avg(A*B) * 2/(a1* a2))

So, to find out the phase difference is a straightforward matter IF you can average (i.e. time-integrate over a known period) A*B as well as measure amplitudes (time-integrate over a known period A**2 and B**2).

Reply to
whit3rd

)

Thanks.

Correcting the amplitudes is the goal but some kind of iterative approach should home in to give a good phase angle as well as good amplitudes.

First you get a rough estimate of the amplitudes. Then you get an estimate of the phase angle and then use that to correct for the amplitudes and so on.

Actually once or twice will probably be good enough since it is a small correction, at most a few percent from the original.

Bret Cahill

Reply to
Bret Cahill

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.