02-19-2013 04:51 PM
Am adquiring continuious sine signals but they dont start at zero, when i insert those signal in Power.vi the numerics array give me diferent values each time, like increment and decrement.
Whatcanidotosolvethis?
Thanks a lot
Esto adquiriendo señales senoidales continuamente, no empiezan de cero, cambian constantemente, cuando insterto estas señales a Power.vi me arrojan valores diferentes cada vez, las cuales se incrementan y decrementan.
Como puedo resolver esto?
Gracias
02-19-2013 05:01 PM
DiegoBonilla,
You should try to extract segments of the signal which start and end at zero crossings. You will lose some of your signal but will have complete cycles for the calculations. If the signal is noisy, try fitting a straight line to several points near the zero crossing and calculate the zero-crossing of the line.
From the appearance of the the signals in your image I think you also have some baseline shift or a lowfrequency signal superimposed on the signals. That may also affect the accuracy of your power calculations.
Lynn
02-19-2013 07:14 PM
Im trying to do that!, but i cant yet. Im getting a cycle but it dosent start or finish at zero, because its changing its position each time, i need to detect when is crossing by zero and graph them. Can you tell me how to fix it. I really need a solution.
02-19-2013 07:19 PM
Please post some of your data so I have something on which to work. Run the VI to get some data like the images you posted. Then Edit >> Make Current Values Default. Save. Post that VI.
Lynn
02-19-2013 07:42 PM
There is...
02-19-2013 08:21 PM
Here is a VI which will find and separate one-cycle segments.
I took the Waveform Graph 2 from your VI and converted it to a control to use as a source of data. The VI uses these steps:
- Extract array component from waveform.
- Find zero crossings using Threshold Detector.vi with the threshold set to zero.
- Use a loop with a shift register and Array Subset to break array into segments containing one cycle each.
- Create an array of one-cycle segments. Note that I did not use autoindexing and a 2D array because not all segments have the same length. The array of clusters with an array in each cluster allows the arrays in the clusters to be of different lengths. A 2D array must have all rows the same length.
- Remove the first element in the array of clusters because it represents a segment which will not have a complete cycle unless the acquisition was triggered exactly at the zero crossing.
- Plot a segment of the user's choice to show that one cycle is included.
Lynn
02-20-2013 07:17 PM
Good good answer.. but i see that is not starting or finishing at zero only get near like picture, can i do something to fix it??,..something to insure o warrant to start and finish at zero always
And im losing too much data because its getting only one cycle, can you tell me how to get all the cycles and make a mean or average.
Help me. Thanks
02-20-2013 08:08 PM
You will never get the endpoints to be exactly at zero because the data is sampled by a clock which is not precisely synchronized with the signal. Even if the synchronization was exact, it is still possible that the none of the samples would be zero due to phase shift or noise.
To get a longer dataset, just concatenate the 1-cycle segments,
Lynn
02-22-2013 06:14 PM
thanks a lot, you are right, i have been doing the actions you said, it works. Im getting "rms values to calculate apparent power" but i need "power factor too" to calculate "real power", how can i measure the difference of time between signals get crossing by cero, to calculate power factor or maybe something else.
Can you help me?
02-22-2013 08:16 PM
The VI I posted obtains the zero crossings of one signal. If you have two signals which are sampled at the same times, simply find the zero crossings of both. The array called Indices lists the index in the array of each zero crossing. When you have two signals, you will have two arrays of Indices. The difference between the values in the two arrays represents the phase shift between the voltage and current. The differenc between successive zero crossings in either array represents the period of the signal. The phase shift in degrees is (phase shift in index difference/period in index units) multiplied by 360 degrees.
It looks like you have about 30 samples per cycle so your phase resolution will be about 12 degrees. If you need finer resolution, you will need to sample faster.
Lynn