LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to measure power factor in FPGA

Hello,

 

I am acquiring analog signals of 50 Hz frequency using NI 9215 and cRIO 9073.

I am using DC and RMS measurement FPGA VI to get the RMS value of voltage and current in the FPGA.

Similarly, i need to measure the power factor taking the voltage and current values in the FPGA.

I am able to get the power factor in RT using the VI , which calculates phase angle.

 

But in FPGA, I guess it is not direct. Please can I know, how to obtain the power factor in FPGA itself.

 

Thank you.

Hema

 

 

 

0 Kudos
Message 1 of 8
(4,830 Views)
How exactly are you doing this? What do you mean when you say 'But in FPGA, I guess it is not direct'? Can you post your VIs? Also, what version of LabVIEW are you using?
Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 2 of 8
(4,814 Views)

I am able to get the power factor in RT using the VI , which calculates phase angle.

 

Using WHAT vi?

 

I'm not an expert on FPGA, but calculation VIs are basically the same between RT and normal desktop LabVIEW, It's hard to imagine why it's different in FPGA. 

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 3 of 8
(4,811 Views)

Certain mathematical functions are not available on the FPGA due to its more limited resources that typically have more dedicated purposes.  Depending on how the RT power factor VI is written, the mathematical functions may not currently be allowed or possible on the FPGA in their native form.  The FPGA also cannot handle floating point math (which I would assume the RT VI is using).  This may simply need to be converted to fixed point for it to work.  Like others have mentioned though, without knowing the original RT VI's contents it's hard to say exactly why it won't currently work on the FPGA, so these are some possible reasons to look into.

0 Kudos
Message 4 of 8
(4,800 Views)

Hello,

 

The VI , that i am using to measure power factor in RT or windows is attached here. It is called PhaseDiff.vi

 

When i try to use the same VI in FPGA, i get message as to the Fast Hilbert Transform.vi and AC DC Estimator.vi are

not executable. That is why, i meant that power factor measurement in FPGA is not direct.

 

I am using LabVIEW 8.6

 

Thank you.

Hema

0 Kudos
Message 5 of 8
(4,775 Views)

OK, I haven't used FPGA version, so I'm out of my cage. If it is indeed limited, as JamesBeams says above, then there's not much you can do except rework the math yourself.

 

I would think that such a VI would not be allowed to be transferred onto the FPGA in the first place, but that's just a guess.

 

 Perhaps there's a list of acceptable / unacceptable FPGA vi functions, and you could confirm that it's not available.

 

You might also ask the tech support folks:

http://sine.ni.com/apps/utf8/niae_asc.main 

Message Edited by CoastalMaineBird on 06-29-2009 05:14 AM
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 6 of 8
(4,767 Views)

Hi Hema,

 

As JamesBeans mentioned, the functions that are used in that VI should be supported on the FPGA. You will NEED to rework the math since floating point is not supported (but fixed point is). Also, have a look at the functions palette on the block diagram and you will notice that only those functions that are supported on the FPGA are exposed. You could go through the palette to understand what nodes and functions are supported on the FPGA. 

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 7 of 8
(4,762 Views)

Hema,

 

I took a brief look at your VI  and it seems that you will really have to reqork it to get it FPGA happy.  Arrays with undefined length will not work in FPGA as you are working and hardware and need to know how much space you need before runtime.  Also, as stated above, floating point math is not supported.  But this can be easily overcome using fixed point math (the toolbox for which is located here). Also,several of the functions that you are using (such as  the array min and max, Hilbert transform and AC DC estimator) are not supporte on the FPGA - for these you will have to come up with your own routines to fit onto the FPGA.  There is some info about Hilbert transforms on the FPGA in the forums.

 

Hope this helps a little.

 

Cheers, Matt

0 Kudos
Message 8 of 8
(4,752 Views)