12-07-2007 10:43 PM
12-08-2007 04:13 PM
You can measure frequencies using an analog channel, but it takes a bit more programming. If you search for zero crossings, you should be able to calculate the frequency.by measuring the time between zero crossings and inverting it.
Bruce
12-10-2007 12:50 PM
Hello,
I am assuming that you want to measure analog frequency, since you have analog input and output hardware. There is a useful LabView Help file titled Measuring Analog Frequency. You will be able to measure analog frequency using just software and no counters. However, this involves using Fast Fourier Transform (FFT) functions that are only available in LabView Full and Professional versions. Please also take a look at the examples in the Example Finder. Some helpful ones are titled … Signal Generation and Processing.vi, Spectrum Measurements.vi, and Simple Spectrum Analyzer (sim).vi. These example’s block diagrams are a little busy, however you can see how they are using simulated signals with the FFT Power Spectrum.vi. Note that the example titled Spectrum Measurements.vi uses express functions. These functions are going to involve less programming, but offer lower program efficiency.
12-10-2007 01:07 PM
I don't know where my brain was. I would also suggest using FFT analysis to measure the frequency. The only problem is there would be a little more delay that way. You have to collect a block of data then analyze it afterwards.
The main advantage of the zero crossing method is that you can detect frequency changes very quickly (within one or two cycles). It really depends on your application which approach is better to use.
Bruce
06-18-2012 01:39 PM
Hi,
I am acquiring a signal with a NI 9225 at a high sample freq. I setuped my DAQ assist to sample 1k of data at a data rate of 10kHz. I need to measure the frequency of this signal at the same sample rate. Is the crossing zero method is the best way to acheive this? Or is there a better way to do it?
Thank you
Eric
06-18-2012 08:54 PM
Any idea what frequency range the signal is in that you will be measuring? Any idea how accurately you need to measure the frequency?
1K blocks with 10KHz sampling will give you FFT peaks at 10 Hz intervals. Interpolation should get you about 1 Hz accuracy. That is about the best you will be able to do with FFT.
Zero crossing might give a little more resolution at lower frequencies. I wouldn't expect it to work any better at higher frequencies due to the shorter periods.
Bruce
06-19-2012 05:45 AM
A fast and quite reliable way to measure the frequency is the tone detection vi.
Since I just had made a demo for phase detection, iI modified it.
Start that vin in continous run mode , play with the controls and have a look at the deviation (distribution) if that solution fit your needs 🙂
Play around witht the noise, number of samples and periodes ..
06-19-2012 07:09 AM
Thank you both for answering. I will explain a bit more the real problem I have. We are testing generator sets at our factory. I'm building a test bench and one of those test is what I call a ''STEP LOAD''.
Basically, the test goes as fellow:
We run the generator with no load. When ready, we apply a load (example: 90% of it rated power) and we measure/record the voltage and frequency drop.
Normally, the frequency here is at 60Hz, and I want to measure the RMS value of the voltage. I got myself a NI 9225 which can measure 300V RSM at approx 52kHz (I need high data sample rate).
I set the # of sample at 1000 sampled at 10kHz. The problem I have is the following:
All the VI's I found yet take my 1000 samples and return 1 value (for either rms and freq). So, I am going from a 10000kHz sampling rate to 10Hz... I cannot go over a 10kHz/1k sample ratio because when I do, the queue is filling, fast, and I need to see real time data. Futhermore, below 1000 samples, the rms and freq calculation is very poor, which is normal at 60Hz.
Is there anything I can do I did not think to? Or am I doomed with my low 10Hz final ''data sample''
Thank you, from Canada
Eric
06-19-2012 07:27 AM
Eric,
You should be able to do better. Some general comments:
1. Posting your VI will let us make suggestions for improvement.
2. Use a Producer/Consumer Design Pattern to separate the data acquisition from the analysis and display.
3. RMS is only meaningful when applied to complete cycles of the signal being measured. Analyzing 1000 sample blocks does not get you good accuracy.
4. If you are using FFT techniques for frequency measurement, you need to have data sets with several, preferably 10s of cycles to get good results. This is inconsistent with wanting rapid measurements and will not effectively capture transient frequency changes. Time domain measurements such as zero-crossing methods may be better.
5. Transient measurement in power systems is a complex field where not everyone agrees even on the definitions of the measurements. Do you have a well-defined specification for the measurements you are making?
Lynn
06-19-2012 08:12 AM
@ethibault123 wrote:
...
I need to see real time data.
Is there anything I can do I did not think to? Or am I doomed with my low 10Hz final ''data sample''
Thank you, from Canada
Eric
Well your eye won't do more than 20 updates a second. and 10Hz is real time for a human 😉
All math needed is written down in the according standards, which are usually taken to define properties and specs.
Some papers on RMS for power quality I found at ZES.com