LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can i get constant sum from a portion of perfect sine wave

Hello

 

I'm trying to do a FIFO averaging filter based on the waveform frequency. I'm able to get the phase angle correctly for 50Hz but any other frequency the sum of array starts to vary and does not stay constant, my guess the reason for this is the averaging window doesn't match the number of samples from sine wave so. But I couldn't figure how my program is not sizing the averaging window correctly.

 

Kind regards

Richard

 

0 Kudos
Message 1 of 4
(1,227 Views)

I think the problem is the sampling frequency (12800) is an exact multiple of 50 Hz (every 256 points represents another cycle), but if you used, for example, 60 Hz, each cycle would be represented by 213.33333... points, tricky to do with a FIFO.

 

Bob Schor

0 Kudos
Message 2 of 4
(1,177 Views)

You can take 10 cycles of 50 Hz for your measurement or 12 cycles of 60 Hz for your measurement, both have a time period of 200ms. You can always cut in half, 5 and 6, if you need a faster response time (100ms).

 

mcduff

Message 3 of 4
(1,157 Views)

The averaging filter that I need to create is acquiring real power network frequency I mentioned perfect sine wave in the title is because I haven't got to the stage of adding IIR filters. I thought that by changing the length of data array and the averaging window that as long as they match before the summing occurs, maybe it could work that way, but the results proved me wrong

 

0 Kudos
Message 4 of 4
(1,130 Views)