Power factor/ frequency / true rms measurement of a 230V AC 50hz signal

C

chetanthegreat

Jan 1, 1970
0
hey People !
For my engg final year project i am in a dire
need of figuring out ways to measure power factor and the rest of these
paramaeters using a microcontroller ..the one i hav selected is
dsPIC30F6014 . Plz can somebdy direct me to the algorithms needed for
these?
For frequency i guess i can use the DFT
interpolation or zero crossing detection method and stuff ..but for the
power factor i hav absolutely no threads !!
I wud b really grateful if smbdy cud help me
out with this.
 
J

John Fields

Jan 1, 1970
0
hey People !
For my engg final year project i am in a dire
need of figuring out ways to measure power factor and the rest of these
paramaeters using a microcontroller ..the one i hav selected is
dsPIC30F6014 . Plz can somebdy direct me to the algorithms needed for
these?
For frequency i guess i can use the DFT
interpolation or zero crossing detection method and stuff ..but for the
power factor i hav absolutely no threads !!
I wud b really grateful if smbdy cud help me
out with this.
 
H

Homer J Simpson

Jan 1, 1970
0
I wud b really grateful if smbdy cud help me
out with this.

Start by not writing this like a text message - use grammatical English.

Then tell us what you actually need to accomplish.
 
M

Michael A. Terrell

Jan 1, 1970
0
chetanthegreat said:
hey People !
For my engg final year project i am in a dire
need of figuring out ways to measure power factor and the rest of these
paramaeters using a microcontroller ..the one i hav selected is
dsPIC30F6014 . Plz can somebdy direct me to the algorithms needed for
these?
For frequency i guess i can use the DFT
interpolation or zero crossing detection method and stuff ..but for the
power factor i hav absolutely no threads !!
I wud b really grateful if smbdy cud help me
out with this.


http://www.google.com/ Its called a earch engine. Learn how to use
it.


--
Service to my country? Been there, Done that, and I've got my DD214 to
prove it.
Member of DAV #85.

Michael A. Terrell
Central Florida
 
D

Dave

Jan 1, 1970
0
chetanthegreat said:
hey People !
For my engg final year project i am in a dire
need of figuring out ways to measure power factor and the rest of these
paramaeters using a microcontroller ..the one i hav selected is
dsPIC30F6014 . Plz can somebdy direct me to the algorithms needed for
these?
For frequency i guess i can use the DFT
interpolation or zero crossing detection method and stuff ..but for the
power factor i hav absolutely no threads !!
I wud b really grateful if smbdy cud help me
out with this.

With questions like these, are you sure you're a "engg final year" student?
(by-the-way, or BTW, "Engineer" is spelled with one 'g') These are
fundamental principles. Maybe you should have spent more time listening to
the instructor rather than texting your buddies. Power factor should be
defined in your "final year" text. Figure it out or don't bother trying to
be an "engg"...

Dave
 
S

Stanislaw Flatto

Jan 1, 1970
0
chetanthegreat said:
hey People !
For my engg final year project i am in a dire
need of figuring out ways to measure power factor and the rest of these
paramaeters using a microcontroller ..the one i hav selected is
dsPIC30F6014 . Plz can somebdy direct me to the algorithms needed for
these?
For frequency i guess i can use the DFT
interpolation or zero crossing detection method and stuff ..but for the
power factor i hav absolutely no threads !!

If you still remember the way to high school try to ask the math teacher
about "vectors".
I wud b really grateful if smbdy cud help me
out with this.

HTH

Stanislaw
 
P

Phil Allison

Jan 1, 1970
0
"Stanislaw Flatto"
If you still remember the way to high school try to ask the math teacher
about "vectors".



** Maybe YOU need to go look up the definition of " power factor " -
Mr Flatto.


Cos vectors have NOTHING to do with the task the OP has set himself.





......... Phil
 
C

chetanthegreat

Jan 1, 1970
0
First of all, I would like to start by
apologizing for my casual use of language, I always thought language
was just a tool of communication but if the way I am using it is
offending somebody then I am really sorry for that.
Anyway, I am reframing the problem I am facing.

Basically I am set out to build a power analyzer,
which will include :-
-1 phase supply monitoring-
-Surge detection capabilities of the order of 10 microseconds
-Data logging at configurable intervals
-Current harmonics distortion calculation
-Measurement of parameters -True rms I & V, KVA, KVAR , cos(phi)

I need to find out how to measure the power factor
from the AC mains supply using a DSP microntroller and MATLAB for
demonstration purpose. So far I have reached a stage where I can
acquire data using a conditioning circuit which includes a CT and a PT,
followed by Instru. Amp. I tried looking for algorithms for measurement
of these factors over the internet but didn't get any threads on the PF
front.
I would be really grateful if somebody could help
me out with this.
Thanking you in anticipation.

Chetan.
 
H

Homer J Simpson

Jan 1, 1970
0
J

John Larkin

Jan 1, 1970
0
First of all, I would like to start by
apologizing for my casual use of language, I always thought language
was just a tool of communication but if the way I am using it is
offending somebody then I am really sorry for that.
Anyway, I am reframing the problem I am facing.

Basically I am set out to build a power analyzer,
which will include :-
-1 phase supply monitoring-
-Surge detection capabilities of the order of 10 microseconds
-Data logging at configurable intervals
-Current harmonics distortion calculation
-Measurement of parameters -True rms I & V, KVA, KVAR , cos(phi)

I need to find out how to measure the power factor
from the AC mains supply using a DSP microntroller and MATLAB for
demonstration purpose. So far I have reached a stage where I can
acquire data using a conditioning circuit which includes a CT and a PT,
followed by Instru. Amp. I tried looking for algorithms for measurement
of these factors over the internet but didn't get any threads on the PF
front.
I would be really grateful if somebody could help
me out with this.
Thanking you in anticipation.

Chetan.


If you periodically, simultaneously digitize the instantaneous voltage
and current (or nab them sequentially closely in time, 10's of
microseconds apart) and scale each into a signed integer or float, you
can multiply sample pairs to get instantaneous power points. If you
average or lowpass filter these, you get true, signed power in watts.

If you then separately compute the RMS voltage and the RMS current,
and multiply them, the result is apparent power, in volt-amps. Power
factor is then just true power divided by apparent power. Note that we
lost the leading/lagging phase information here, so we know the pf but
not whether it's in the capacitive or in the inductive sense.

(To get RMS volts, just square the voltage samples, average a bunch of
them, and square root the average. Ditto current.)

A more fun way to do this is to do real power like in paragraph 1, and
compute imaginary power by phase-shifting the voltage waveform 90
degrees before multiplying by the current samples. So we get signed
real power and signed imaginary power, and we can compute the true
phase angle vector, hence lead/lag power factor. The 90 degree shift
can be done in a DSP or FPGA as a Hilbert transform, as an IIR allpass
network simulation, or you could be really tacky and just use an
integrator.

All that's basic. What's interesting is implementing it with any sort
of accuracy. Doing this the most obvious way will tend to be mediocre.
Getting as good as a $20 mechanical electric meter is hard work.

The 10 usec transient thing is another issue, as is harmonics.

John
 
chetanthegreat said:
hey People !
For my engg final year project i am in a dire
need of figuring out ways to measure power factor and the rest of these
paramaeters using a microcontroller ..the one i hav selected is
dsPIC30F6014 . Plz can somebdy direct me to the algorithms needed for
these?
For frequency i guess i can use the DFT
interpolation or zero crossing detection method and stuff ..but for the
power factor i hav absolutely no threads !!
I wud b really grateful if smbdy cud help me
out with this.

Since voltage and current are not always sinusoidal, this strikes me as
a difficult project. I would guess that you are also going to need some
sort of high-power, low-resistance, precision resister, like a short
steel bar or something. In addition, I suppose you would need an
expensive A/D converter and timer.

My advice would be to select an easier project.
 
P

Phil Allison

Jan 1, 1970
0
"John Larkin"
If you periodically, simultaneously digitize the instantaneous voltage
and current (or nab them sequentially closely in time, 10's of
microseconds apart) and scale each into a signed integer or float, you
can multiply sample pairs to get instantaneous power points. If you
average or lowpass filter these, you get true, signed power in watts.

If you then separately compute the RMS voltage and the RMS current,
and multiply them, the result is apparent power, in volt-amps. Power
factor is then just true power divided by apparent power. Note that we
lost the leading/lagging phase information here, so we know the pf but
not whether it's in the capacitive or in the inductive sense.


** But it need not be either.

Why does everyone keep forgetting this ???


(To get RMS volts, just square the voltage samples, average a bunch of
them, and square root the average. Ditto current.)

A more fun way to do this is to do real power like in paragraph 1, and
compute imaginary power by phase-shifting the voltage waveform 90
degrees before multiplying by the current samples. So we get signed
real power and signed imaginary power, and we can compute the true
phase angle vector, hence lead/lag power factor. The 90 degree shift
can be done in a DSP or FPGA as a Hilbert transform, as an IIR allpass
network simulation, or you could be really tacky and just use an
integrator.


** Computing cos(phi) can be easily done by comparing the time interval
between consecutive current and voltage maxima (or minima ) - but it is
important to know that the current waveform is not a distorted one.

Comparing zero crossings would result in erroneous readings with rectifier
/capacitor loads.



....... Phil
 
S

Stanislaw Flatto

Jan 1, 1970
0
Phil said:
** Maybe YOU need to go look up the definition of " power factor " -
Mr Flatto.

P'eff' = VxI cos(angle) reminds me of vectors. How to calculate other
derivatives of this is trivial.
 
P

Phil Allison

Jan 1, 1970
0
"Stanislaw Flatto de Fuckwit "



** YOU need to go look up THE definition of " power factor " - Mr
Flathead Fuckhead !!


Cos vectors have NOTHING to do with the task the OP has set himself.







....... Phil
 
J

John Larkin

Jan 1, 1970
0
"John Larkin"


** But it need not be either.

Why does everyone keep forgetting this ???





** Computing cos(phi) can be easily done by comparing the time interval
between consecutive current and voltage maxima (or minima ) - but it is
important to know that the current waveform is not a distorted one.


Which, nowadays, it usually is.

The classic steady-state definitions of things like power factor
become problematic with "modern" loads. Back when I was in the power
measurement business (alas, 60 Hz eventually becomes boring) I had
debates with users about the power factor of zero-crossing triac
heater controllers. The load is resistive, and while the triac is on
the pf is 1.00, but the triac cycles on/off in bursts, so longterm the
pf seems to be below unity. When they argued about cos(phi), it got
messy. True power/energy can be computed unambiguously, but other
measurements can be messy to define.

The line voltage waveform is usually pretty much a sine. If it is, the
only component of the current waveform that produces true power is the
50/60 Hz fundamental. So I guess we could always extract the 50/60 Hz
component of the current waveform and compare that to the voltage
waveform to get our best guess as to the sign of pf, if indeed we
agree that it has any meaning for nasty waveforms. That's exactly what
the Hilbert thing will do.

John
 
J

John Larkin

Jan 1, 1970
0
Since voltage and current are not always sinusoidal, this strikes me as
a difficult project. I would guess that you are also going to need some
sort of high-power, low-resistance, precision resister, like a short
steel bar or something. In addition, I suppose you would need an
expensive A/D converter and timer.

My advice would be to select an easier project.

I did a decent residential meter design using a manganin current
shunt, a couple of opamps, and a 90-cent MC68HC05 uP with onboard
mux'd 8-bit ADC. It passed the ANSI C12 electric meter accuracy specs.

This sounds like an excellent project to me. Mediocre
proof-of-principle results are easy to come by, and there's fertile
ground for insights and improvements.

Oh, steel makes a horrible current shunt.

John
 
C

chetanthegreat

Jan 1, 1970
0
Can somebody explain me what this steel current shunt stuff is ?? And
how is it related to the topic?
 
C

chetanthegreat

Jan 1, 1970
0
Also .. I guess I can measure power factor by a method I thought of. Of
course, based on only on the principles that I know.
In MATLAB, the stepped down and conditioned signal is aquired and
stored in an array. The voltage and current arrays are then phase
plotted and the phase plot is stored in another arrays. Then the
difference between the fundamentals of these are phase plots is
calculated. This difference when operated with cosine function should
give the normal PF.
Please suggest any inconsistancies or flaws in the method. As for the
implementation on the dsPIC itself I think the same principle can be
modified somehow and the task can be achieved.
 
P

Phil Allison

Jan 1, 1970
0
"chetanthegreat"
Also .. I guess I can measure power factor by a method I thought of. Of
course, based on only on the principles that I know.
In MATLAB, the stepped down and conditioned signal is aquired and
stored in an array. The voltage and current arrays are then phase
plotted and the phase plot is stored in another arrays. Then the
difference between the fundamentals of these are phase plots is
calculated. This difference when operated with cosine function should
give the normal PF.



** For ****'s sake, GO LOOK UP the **GENERAL** definition of Power
Factor.

It has got NOTHING to do with phase.

First of all, you gotta KNOW what you are trying to measure.


PLUS:

Try reading the info already supplied AND this URL.

http://www.microconsultants.com/tips/pwrfact/pfarticl.htm


Note - the bit about the amplitude of the fundamental frequency of a
square wave being 0.9 of the peak is wrong - that is the rms value of the
fundamental.




....... Phil
 
John said:
I did a decent residential meter design using a manganin current
shunt, a couple of opamps, and a 90-cent MC68HC05 uP with onboard
mux'd 8-bit ADC. It passed the ANSI C12 electric meter accuracy specs.

This sounds like an excellent project to me. Mediocre
proof-of-principle results are easy to come by, and there's fertile
ground for insights and improvements.

Oh, steel makes a horrible current shunt.

Yah, I'm not surprised--that was just off the hip. With a 3-minute
search, I found an example shunt at: http://www.elexp.com/tst_50a.htm.
I wonder if you have to rectify the current first? Oh, never mind. I
think I'm getting to deep into this :> :>

How would one measure true power, though? Maybe they sometimes do it
based on heat. Here's something I found on the internet:

"A thermal converter consists of a resistive heater in close thermal
contact with one or more thermocouples. When current flows through the
heater, the temperature rises. Thermocouples give an output voltage
proportional to the temperature difference between their junctions, in
this case proportional to the square of the current, and so make
suitable transducers for the construction of thermal wattmeters."

In any case, I imagine you could get a lot of information by simply
putting "wattmeter" into Google.

You can buy a watt meter now days, by the way, for about $25.00.

http://www.pricegrabber.com/p__P3_I...ower_Meter,__8968629/search=kill+a+watt/skd=1
http://www.safehomeproducts.com/SHP2/data/manuals/Kill-A-Watt_Meter_Report.pdf
 
Top