Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

AC Envelope Measurement

Solved!
Go to solution

Hi guys,

 

I have a cDAQ-9188 with a NI9205 analog input module. I am measuring 3 differential 10kHz AC signals and two of them are amplitude modulated at a low frequency of <1Hz through mechanical movement of a rotary transformer. Does anyone know a way to measure the envelope of the modulated signals in a simple way? 

 

I was thinking about sampling at ~25kHz and and calculate RMS values every 500 samples, however, in the time I get the 500 samples the mechanical system moves some 2° so the data is useless.

The brute force approach would be to sample at 25kHz for the whole turn of the mechanics, but that gives me a large amount of data and my buffers would get cluttered with it. Even with that data I would still need to extract the envelope somehow.

 

I'm happy about any inputs.

 

Thanks, Felix

0 Kudos
Message 1 of 5
(5,180 Views)

Felix,

 

RMS certainly does not give you the envelope, but if all you really need is the amplitude, then that should be fine.

 

Before you get into techniques or methods, you need to define exactly what the parameters and limitations are. 

 

First, you indicate that 2 degrees is too much. How often do you need to get a measurement of the amplitude to have an acceptable error? 1.9°? 0.0001°? Clearly any increment less than one cycle of the 10 kHz (~0.036°) will be difficult to measure.

 

Does the modulating frequency vary? If so, over what range and how fast? Do you need to measure that frequency as well?

 

Next, do you need the amplitude data immediately or can it be calculated somewhat later? How much time lag between the production of the signal and the measurement of the amplitude can you tolerate?  Is the data being used to control something or only for analysis?   For example suppose you collect 25000 samples (one second) and then process the data to produce an envelope which becomes available about 1.1 seconds after the beginning of the acquisition. Would that be accpetable?  You could do that with two 25000 sample buffers, which is easily managed by today's computers.

 

With that information the decisions about sampling rate, number of samples to read, and processing methods can be made.

 

Lynn

0 Kudos
Message 2 of 5
(5,130 Views)

Hi Lynn, 

 

thanks for your inputs.

 

I know that RMS doesn't give me the envelope, but it's a constant factor between the two. However, RMS can only be measured by averaging, while the amplitude would be available right away if you measure at the right time. This would make the timing pretty hard though.

 

The problem with the accuracy is connected to averaging: If I take an RMS value of the signal while the rotor traveled two degrees, the result is not really representing anything. The change of amplitude is a sinusoid and the slope is not linear. The resolution of the measurement, however, doesn't have to be very high, so it would be enough to measure every 0.1 degrees or even less.

 

The modulating frequency varies only slightly within the boundaries that my drive is able to get the motor to constant speed. I can define the modulation frequency by adjusting the speed of the motor, but I don't want to go slower than 20RPM unless it's really necessary. The acceleration and deceleration of the motor is during the measurement, so I would assume the speed as constant.

 

The setup I'm building is meant to qualify sensors and the data is only analysed, so time is not critical. It can take seconds between measurement and result. Theoretically, the brute force approach of just measuring during the 3 seconds it takes to spin the motor once is a solution (though not the most elegant one). That would require the buffer of the cDAQ to be able to hold 2x75000 samples (I actually don't know how much space I have available for buffering). The question remains of how to extract the envelope from the data. 

 

 I would be happy to read your thoughts on the problem.

 

Felix

0 Kudos
Message 3 of 5
(5,120 Views)
Solution
Accepted by topic author fgeldmacher

Felix,

 

Let's look at some numbers:  20 RPM is equivalent to 0.333 rev/s or 1200 (0.1° intervals)/s. So it takes 833 us for the device to rotate 0.1 degree. That is the time for 83 cycles of the 10 kHz signal.

 

The next question is: Can you get good amplitude information from 83 cycles?

 

When sampling a 10 kHz signal at 25 kHz you get 2.5 samples per cycle, or the samples are 144° apart. The image below shows what the sampled data looks like for a sample frequency of 25050. I adjusted the sample frequency slightly so that the sample points do not repeat exactly every other cycle as they do at exactly 10 kHz and 25 kHz. Unless both signals are derived from the same clock, there will be slight frequency offsets.

 

Sampled data.png

 

Note that none of the sample points shown occurs exactly at the peaks.

 

Extract Single Tone Information.vi accepts an input signal and returns the amplitude, frequency, and phase of the signal. I ran some tests to see how much data it requires to get good results.  The data set shown in the image above - 21 samples - gets the amplitudes with less than +/-1% error. It processes (simulated) 3 seconds of data in slightly more than half a second.

 

Let me know what version of LV you are using so I can post an example for you.

 

Lynn

Message 4 of 5
(5,098 Views)

Lynn,

 

thank you for your analysis! 

 

So it looks like i should be able to sample around 25times every 0.1°mech and extract the envelope from that - sounds very good!

 

I am using Labview 2014 SP1. Thanks very much for your efforts to deal with my problems!

 

Felix

0 Kudos
Message 5 of 5
(5,071 Views)