DSPRelated.com
Forums

Three-phase power: Phase Estimation

Started by lagoule October 22, 2009
Hello,

I'm working on a monitoring project of a three-phase power system, which
means my inputs are three sinusoïdal of 60Hz with 60 degres phase
difference between any two of them. Of courses, these inputs also include
noise and harmonics.

I would like to actually measure the phase between the three signals, to
make sure the 60 degres is there. Since it should be pretty accurate, I
have to be able to measure very small difference between phases, in the
tenth of degree.

The problem is, I don't know if and how such a precision can be acheived.

Under Matlab, I tried two different approach. The first one was to
multiply each input with a reference sin and cos, lowpass the result and
use arctan to get the phase in relation with my ref. The second was to use
a Kalman filter to estimate the in-phase and quadrature-phase of the 60Hz
present in the inputs. Then, the phase between two inputs is obtained by
difference of their instantaneous phase.

Both methods gave me noisy results, without the precision I require. So I
was asking if you think the precision of 0.1 degree can be acheive and what
would be the best way to measure the phase difference?

Thank you,

Jonathan Drolet
École Polytechnique de Montréal


On 22 Okt, 11:54, "lagoule" <zegh...@gmail.com> wrote:
> Hello, > > I'm working on a monitoring project of a three-phase power system, which > means my inputs are three sinuso&#4294967295;dal of 60Hz with 60 degres phase > difference between any two of them. Of courses, these inputs also include > noise and harmonics. > > I would like to actually measure the phase between the three signals, to > make sure the 60 degres is there. Since it should be pretty accurate, I > have to be able to measure very small difference between phases, in the > tenth of degree. > > The problem is, I don't know if and how such a precision can be acheived. > > Under Matlab, I tried two different approach. The first one was to > multiply each input with a reference sin and cos, lowpass the result and > use arctan to get the phase in relation with my ref. The second was to use > a Kalman filter to estimate the in-phase and quadrature-phase of the 60Hz > present in the inputs. Then, the phase between two inputs is obtained by > difference of their instantaneous phase. > > Both methods gave me noisy results, without the precision I require. So I > was asking if you think the precision of 0.1 degree can be acheive and what > would be the best way to measure the phase difference?
The first idea that comes to mind is to compute the cross spectra between pairs of channels and use them to estimate the phases. Rune
lagoule wrote:
> Hello, > > I'm working on a monitoring project of a three-phase power system, which > means my inputs are three sinuso&Atilde;&macr;dal of 60Hz with 60 degres phase > difference between any two of them.
A very unusual system! In most, the phases are 360/3 =120 degrees apart.
> Of course, these inputs also include noise and harmonics. > > I would like to actually measure the phase between the three signals, to > make sure the 60 degres is there. Since it should be pretty accurate, I > have to be able to measure very small difference between phases, in the > tenth of degree. > > The problem is, I don't know if and how such a precision can be acheived. > > Under Matlab, I tried two different approach. The first one was to > multiply each input with a reference sin and cos, lowpass the result and > use arctan to get the phase in relation with my ref. The second was to use > a Kalman filter to estimate the in-phase and quadrature-phase of the 60Hz > present in the inputs. Then, the phase between two inputs is obtained by > difference of their instantaneous phase. > > Both methods gave me noisy results, without the precision I require. So I > was asking if you think the precision of 0.1 degree can be acheive and what > would be the best way to measure the phase difference?
Can you use a linear-phase narrow filter around 60 Hz to remove the perturbations from noise and harmonics? That should work if latency isn't a problem. If the phases are balanced and you really have them at 0, 60, and 120 degrees, invert the one at 60, moving it to 240. Then the all harmonics not divisible by 3 will cancel in the sum. Residual 60 Hz will indicate either amplitude imbalance or phase shift. Jerry -- Engineering is the art of making what you want from things you can get. &macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;
lagoule wrote:
> Hello, > > I'm working on a monitoring project of a three-phase power system, which > means my inputs are three sinuso&iuml;dal of 60Hz with 60 degres phase > difference between any two of them. Of courses, these inputs also include > noise and harmonics. > > I would like to actually measure the phase between the three signals, to > make sure the 60 degres is there. Since it should be pretty accurate, I > have to be able to measure very small difference between phases, in the > tenth of degree. > > The problem is, I don't know if and how such a precision can be acheived. > > Under Matlab, I tried two different approach. The first one was to > multiply each input with a reference sin and cos, lowpass the result and > use arctan to get the phase in relation with my ref. The second was to use > a Kalman filter to estimate the in-phase and quadrature-phase of the 60Hz > present in the inputs. Then, the phase between two inputs is obtained by > difference of their instantaneous phase. > > Both methods gave me noisy results, without the precision I require. So I > was asking if you think the precision of 0.1 degree can be acheive and what > would be the best way to measure the phase difference? > > Thank you, > > Jonathan Drolet > &Eacute;cole Polytechnique de Montr&eacute;al > >
Jonathan, I don't know what your sample rate is..... Seems like that would be important. You'd need at least 7200 samples per cycle to get 0.1 degrees resolution I should think. So, let's think at least 10k samples per cycle or 600kHz. Otherwise I'm not sure you can do what you want. Well, I'm assuming that you want more or less instantaneous phase measurements. But, you might only want some time average that's reasonably short but multiple cycles long in response time? That's likely to give a better result. Still, I'm not sure you can live with a lower sample rate because the temporal resolution implied by your desired measurement is 4.63 msec or a bandwidth of around 260kHz. How does that ride on a 60Hz carrier? Because there's a type of spectral overlap which I'm sure a mathematician can figure out. Mind you, we're looking at a real temporal signal here and not very specifically about the spectral character. The specific spectral character likely has some particular features. So, we have a 60Hz carrier which presumably has positive and negative frequency components simply by expanding it into exponentials. And, because we're *interested* in very fine temporal characteristics, that implies a bandwidth whether it's really there or not. You really do want 0.1 degree resolution. Maybe think of it this way: Assume you want to see a "jump" in phase of one of the waveforms by 0.1 degrees from cycle to cycle. There's the bandwidth.... If that's not what you need then the bandwidth implication might be reduced. Also, what is the SNR? I might be tempted to detect the axis crossings. One method that gives some flexibility is this: 1) Generate 0,1 sets of samples using the axis crossings for each phase of the 60Hz or, more formally, sgn(f(t)) where sgn is "sign of" and has the values 0 for negative sign and 1 for positive sign. 2) XOR the two sequences to get a third 0,1 set of samples. The average of this is a direct measure of phase - you just have to be careful how the averages are calculated if you want the accuracy you desire here. 3) Average the XOR sequence using whatever bandwidth lowpass filter suits your purpose. The result is a measure of the phase. Of course, since you're trying to get to better than 0.03%, the averagers better be close enough to identical and maybe you need to measure over an integral number of periods to keep the averaging time reasonable, etc. An "instantaneous" version of this would be to measure the temporal difference between the changes from 0 to 1 between two sequences. That's a differerentiation process and is likely to be noisy. You could average these measurements as well. I'm not sure the last two approaches are really different but I think they are...... Philosophy: More time, better SNR, better "resolution" will be possible - assuming the temporal resolution is there in the first place. Fred
Fred Marshall wrote:
> lagoule wrote: >> Hello, >> >> I'm working on a monitoring project of a three-phase power system, which >> means my inputs are three sinuso&iuml;dal of 60Hz with 60 degres phase >> difference between any two of them. Of courses, these inputs also include >> noise and harmonics. >> >> I would like to actually measure the phase between the three signals, to >> make sure the 60 degres is there. Since it should be pretty accurate, I >> have to be able to measure very small difference between phases, in the >> tenth of degree. >> >> The problem is, I don't know if and how such a precision can be acheived. >> >> Under Matlab, I tried two different approach. The first one was to >> multiply each input with a reference sin and cos, lowpass the result and >> use arctan to get the phase in relation with my ref. The second was to >> use >> a Kalman filter to estimate the in-phase and quadrature-phase of the 60Hz >> present in the inputs. Then, the phase between two inputs is obtained by >> difference of their instantaneous phase. >> >> Both methods gave me noisy results, without the precision I require. So I >> was asking if you think the precision of 0.1 degree can be acheive and >> what >> would be the best way to measure the phase difference? >> >> Thank you, >> >> Jonathan Drolet >> &Eacute;cole Polytechnique de Montr&eacute;al >> >> > > Jonathan, > > I don't know what your sample rate is..... Seems like that would be > important. You'd need at least 7200 samples per cycle to get 0.1 > degrees resolution I should think. So, let's think at least 10k samples > per cycle or 600kHz. Otherwise I'm not sure you can do what you want. > > Well, I'm assuming that you want more or less instantaneous phase > measurements. But, you might only want some time average that's > reasonably short but multiple cycles long in response time? That's > likely to give a better result. Still, I'm not sure you can live with a > lower sample rate because the temporal resolution implied by your > desired measurement is 4.63 msec or a bandwidth of around 260kHz. > How does that ride on a 60Hz carrier? Because there's a type of > spectral overlap which I'm sure a mathematician can figure out. Mind > you, we're looking at a real temporal signal here and not very > specifically about the spectral character. The specific spectral > character likely has some particular features. > > So, we have a 60Hz carrier which presumably has positive and negative > frequency components simply by expanding it into exponentials. And, > because we're *interested* in very fine temporal characteristics, that > implies a bandwidth whether it's really there or not. You really do > want 0.1 degree resolution. > > Maybe think of it this way: > Assume you want to see a "jump" in phase of one of the waveforms by 0.1 > degrees from cycle to cycle. There's the bandwidth.... If that's not > what you need then the bandwidth implication might be reduced. > > Also, what is the SNR? > I might be tempted to detect the axis crossings.
Axis crossings don't reveal much unless the harmonics of 60 Hz normally found on power lines are removed. They can be significant even at 6 KHz. ...
> Philosophy: > More time, better SNR, better "resolution" will be possible - assuming > the temporal resolution is there in the first place.
Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
>Hello, > >I'm working on a monitoring project of a three-phase power system, which >means my inputs are three sinuso&iuml;dal of 60Hz with 60 degres phase >difference between any two of them. Of courses, these inputs also
include
>noise and harmonics. > >I would like to actually measure the phase between the three signals, to >make sure the 60 degres is there. Since it should be pretty accurate, I >have to be able to measure very small difference between phases, in the >tenth of degree. > >The problem is, I don't know if and how such a precision can be
acheived.
> >Under Matlab, I tried two different approach. The first one was to >multiply each input with a reference sin and cos, lowpass the result and >use arctan to get the phase in relation with my ref. The second was to
use
>a Kalman filter to estimate the in-phase and quadrature-phase of the
60Hz
>present in the inputs. Then, the phase between two inputs is obtained by >difference of their instantaneous phase. > >Both methods gave me noisy results, without the precision I require. So
I
>was asking if you think the precision of 0.1 degree can be acheive and
what
>would be the best way to measure the phase difference?
These phase angles are usually measured to rather better than 0.1 degrees. There are various approaches which work. Assuming you are working with a 4 wire system, here is one..... Measure the frequency of the mains. You can do this by counting samples between zero crossings, and passing the counts through a single pole filter to produce a finely interpolated result. If you want faster settling, interpolating between the samples just before and after a zero crossing can work well. A sine wave is changing quickly at that point, so noise doesn't disturb the interpolation very much. Noise spike detection logic can help here, to avoid interpolating with bogus samples. Calculate the dot product of 2 of the phase voltage signals. Now delay one of those signals by enough samples to represent about 60 degrees of phase, and calculate the dot product of the same 2 phases, but using the delayed signal for the relevant phase. The longer the period over which you calculate the dot products, the better you will suppress noise. You know the precise phase delay you introduced, as you know the sampling interval, and the precise mains frequency. You also have the dot product of two signals differing in phase by X, and the dot product of two signals differing in phase by X + your delay. A little trigonometry will give you X, the answer you seek. Regards, Steve
>>Hello, >> >>I'm working on a monitoring project of a three-phase power system,
which
>>means my inputs are three sinuso&iuml;dal of 60Hz with 60 degres phase >>difference between any two of them. Of courses, these inputs also >include >>noise and harmonics. >> >>I would like to actually measure the phase between the three signals,
to
>>make sure the 60 degres is there. Since it should be pretty accurate, I >>have to be able to measure very small difference between phases, in the >>tenth of degree. >> >>The problem is, I don't know if and how such a precision can be >acheived. >> >>Under Matlab, I tried two different approach. The first one was to >>multiply each input with a reference sin and cos, lowpass the result
and
>>use arctan to get the phase in relation with my ref. The second was to >use >>a Kalman filter to estimate the in-phase and quadrature-phase of the >60Hz >>present in the inputs. Then, the phase between two inputs is obtained
by
>>difference of their instantaneous phase. >> >>Both methods gave me noisy results, without the precision I require. So >I >>was asking if you think the precision of 0.1 degree can be acheive and >what >>would be the best way to measure the phase difference? > >These phase angles are usually measured to rather better than 0.1
degrees.
>There are various approaches which work. Assuming you are working with a
4
>wire system, here is one..... > >Measure the frequency of the mains. You can do this by counting samples >between zero crossings, and passing the counts through a single pole
filter
>to produce a finely interpolated result. If you want faster settling, >interpolating between the samples just before and after a zero crossing
can
>work well. A sine wave is changing quickly at that point, so noise
doesn't
>disturb the interpolation very much. Noise spike detection logic can
help
>here, to avoid interpolating with bogus samples. > >Calculate the dot product of 2 of the phase voltage signals. Now delay
one
>of those signals by enough samples to represent about 60 degrees of
phase,
>and calculate the dot product of the same 2 phases, but using the
delayed
>signal for the relevant phase. The longer the period over which you >calculate the dot products, the better you will suppress noise. > >You know the precise phase delay you introduced, as you know the
sampling
>interval, and the precise mains frequency. You also have the dot product
of
>two signals differing in phase by X, and the dot product of two signals >differing in phase by X + your delay. A little trigonometry will give
you
>X, the answer you seek. > >Regards, >Steve > >
Hello, Thank you all for your input. You gave me what I was looking for: a new approach to the problem. I'll start the simulation again, hopefully I'll be able to come up with the *optimal* solution. Jonathan &Eacute;cole Polytechnique de Montr&eacute;al
On Thu, 22 Oct 2009 11:57:22 -0400, Jerry Avins wrote:

> lagoule wrote: >> Hello, >> >> I'm working on a monitoring project of a three-phase power system, >> which means my inputs are three sinuso&Atilde;&macr;dal of 60Hz with 60 degres >> phase difference between any two of them. > > A very unusual system! In most, the phases are 360/3 =120 degrees apart. > >> Of course, these inputs also include noise and >> harmonics. >> >> I would like to actually measure the phase between the three signals, >> to make sure the 60 degres is there. Since it should be pretty >> accurate, I have to be able to measure very small difference between >> phases, in the tenth of degree. >> >> The problem is, I don't know if and how such a precision can be >> acheived. >> >> Under Matlab, I tried two different approach. The first one was to >> multiply each input with a reference sin and cos, lowpass the result >> and use arctan to get the phase in relation with my ref. The second was >> to use a Kalman filter to estimate the in-phase and quadrature-phase of >> the 60Hz present in the inputs. Then, the phase between two inputs is >> obtained by difference of their instantaneous phase. >> >> Both methods gave me noisy results, without the precision I require. So >> I was asking if you think the precision of 0.1 degree can be acheive >> and what would be the best way to measure the phase difference? > > Can you use a linear-phase narrow filter around 60 Hz to remove the > perturbations from noise and harmonics? That should work if latency > isn't a problem. > > If the phases are balanced and you really have them at 0, 60, and 120 > degrees, invert the one at 60, moving it to 240. Then the all harmonics > not divisible by 3 will cancel in the sum. Residual 60 Hz will indicate > either amplitude imbalance or phase shift. > > Jerry
But _no_ residual 60Hz will _either_ indicate no amplitude imbalance or phase shift, or _both_ amplitude imbalance _and_ phase shift. -- www.wescottdesign.com
On Thu, 22 Oct 2009 04:54:12 -0500, lagoule wrote:

> Hello, > > I'm working on a monitoring project of a three-phase power system, which > means my inputs are three sinuso&iuml;dal of 60Hz with 60 degres phase > difference between any two of them. Of courses, these inputs also > include noise and harmonics. > > I would like to actually measure the phase between the three signals, to > make sure the 60 degres is there. Since it should be pretty accurate, I > have to be able to measure very small difference between phases, in the > tenth of degree. > > The problem is, I don't know if and how such a precision can be > acheived. > > Under Matlab, I tried two different approach. The first one was to > multiply each input with a reference sin and cos, lowpass the result and > use arctan to get the phase in relation with my ref. The second was to > use a Kalman filter to estimate the in-phase and quadrature-phase of the > 60Hz present in the inputs. Then, the phase between two inputs is > obtained by difference of their instantaneous phase. > > Both methods gave me noisy results, without the precision I require. So > I was asking if you think the precision of 0.1 degree can be acheive and > what would be the best way to measure the phase difference?
So you took a couple of stabs at a theoretical problem with a practical tool, and you didn't find joy. Maybe it's time to break out the pencil and paper? Assuming that you have good sampling and all the time in the world, it should be trivial to get the information that you want from a long enough sample set, and either of your approaches sound valid on their faces. -- www.wescottdesign.com
Tim Wescott wrote:
> On Thu, 22 Oct 2009 11:57:22 -0400, Jerry Avins wrote: > >> lagoule wrote: >>> Hello, >>> >>> I'm working on a monitoring project of a three-phase power system, >>> which means my inputs are three sinuso&Atilde;&macr;dal of 60Hz with 60 degres >>> phase difference between any two of them. >> A very unusual system! In most, the phases are 360/3 =120 degrees apart. >> >>> Of course, these inputs also include noise and >>> harmonics. >>> >>> I would like to actually measure the phase between the three signals, >>> to make sure the 60 degres is there. Since it should be pretty >>> accurate, I have to be able to measure very small difference between >>> phases, in the tenth of degree. >>> >>> The problem is, I don't know if and how such a precision can be >>> acheived. >>> >>> Under Matlab, I tried two different approach. The first one was to >>> multiply each input with a reference sin and cos, lowpass the result >>> and use arctan to get the phase in relation with my ref. The second was >>> to use a Kalman filter to estimate the in-phase and quadrature-phase of >>> the 60Hz present in the inputs. Then, the phase between two inputs is >>> obtained by difference of their instantaneous phase. >>> >>> Both methods gave me noisy results, without the precision I require. So >>> I was asking if you think the precision of 0.1 degree can be acheive >>> and what would be the best way to measure the phase difference? >> Can you use a linear-phase narrow filter around 60 Hz to remove the >> perturbations from noise and harmonics? That should work if latency >> isn't a problem. >> >> If the phases are balanced and you really have them at 0, 60, and 120 >> degrees, invert the one at 60, moving it to 240. Then the all harmonics >> not divisible by 3 will cancel in the sum. Residual 60 Hz will indicate >> either amplitude imbalance or phase shift. >> >> Jerry > > But _no_ residual 60Hz will _either_ indicate no amplitude imbalance or > phase shift, or _both_ amplitude imbalance _and_ phase shift.
I don't intend to go through the math, but I can't off hand see those errors canceling. That makes no sense, but in practice: Show mw. Jerry -- Engineering is the art of making what you want from things you can get. &macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;