LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Resample Captured DAQ data to variable Dt and back to Constant Dt

I have a unique need to scale the Dt between samples for an analog data capture. I am capturing the BEMF of a 3 Phase DC Brushless motor as it spins down from operating speed. This signal decays in amplitude and the frequency slowly decreases as the RPM's decrease. My goal is to manipulate the data so that the captured waveform will appear that the motor continued to spin at it's operational speed. The motor is operating at 7200 RPM so the three BEMF signals have a frequency of 120 Hz and are phase shifted by 120 degrees relative to the other voltages. The motor has 12 magnetic poles yielding 6 electrical cycles for each phase. This results in 36 zero crossings per revolution. 

 

I am capturing 3 ch's at 100KHz for a period of 5-10 seconds streaming the data to disc. Using the timing between zero crossings of the three BEMF signals, I am able to plot the RPM's as the motor spins down. I have done this by generated a curve fit of the zero crossing timing data and converting it to the same 100KHz sample rate that the original data was sampled at.  By taking the inverse of the Operating Speed divided by the instantaneous speed, I am able to multiply the BEMF waveform by that value to get the corrected amplitude of the waveform. After this correction the amplitude remains constant, but the frequency is still changing. Now I need to manipulate the Dt between samples to maintain a constant Frequency of the signal. This is the part that has me stumped. I am thinking I can use the speed error (Operating speed vs. measured speed) to calculate what the Dt needs to be to maintain the frequency at a constant 120 Hz. I can create an array that contains the new Dt data and plot of a XY graph.  What I need to do is get it back to a constant Dt  so that I can do FFT analysis of the results. 

 

I am curious if anyone has attempted something like this and has a simpler solution.

0 Kudos
Message 1 of 3
(2,710 Views)

Hi John,

 

 

I am not very sure what you are trying to do. Is your goal to transform the data you acquired into a 120Hz sine wave with a constant amplitude? It sounds like you have figured out how to do this with the XY graph. 

 

It sounds like you want to have a waveform with a variable dt for each sample. That is not possible with the waveform data type. You mentioned that you need to to a FFT of the data. You can perform the FFT on the original Waveform. 

 

What are you trying to accomplish by normalizing the frequency and amplitude of the signal?

Trevor B.
PSE
National Instruments
0 Kudos
Message 2 of 3
(2,687 Views)

As I indicated I am attempting to measure BEMF of a Brushless DC motor. Classicly, this is done by spinning the motor at a constant speed with an additional motor. The motor under test acts a generator creating the 120 Hz signal. In my case I am unable to drive externally so am attempting to measure BEMF as it spins down. Because both the amplitude and frequency changes as a function of speed, doing a FFT on the raw data gives smeared results of the spectral peaks. One could possibly use JTFA methods but I don't have access to that software.

 

My goal is to manipulate the captured data stream so that the both the amplitude and frequency are constant in both amplitude and frequency to simulate the condition where the motor is spun at a constant speed with an external motor.

 

I actually accomplished my goal yesterday.  Using the curve fit speed data I was able to re-sample the data at variable Dt's to get an XY plot of the waveforms. I then did a curve fit of the voltage waveforms at a constant Dt to produce a waveform datatype from which I could do a FFT. I used a variation of a vi I found on NI's websight called "Compute Y's for equidistant Xn's.vi". This worked quite well. I have attached a front panel view.

0 Kudos
Message 3 of 3
(2,672 Views)