LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to make a Phase lock loop program to track the resonant frequency of a vibration beam?

I am trying to make a Labview program to track continuously the resonant frequency of a vibration beam, attached is the program. I used NI certificated program on PLL and revise it by using a function generator and a oscilloscope. The function generator will send a sine wave to the beam and the beam will vibration, another sensor attached on the beam will output a sine wave that has the same frequency of the excitation sine wave. When these two signal has the same phase, resonance will happen. the issue now i have is the program could not "track" the resonance frequency, any one have a suggestion on how to fix it?

 

PLL.png

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

@zebro wrote:

... attached is the program.


You forgot you attach your program. (a diagram picture is not a program).

0 Kudos
Message 2 of 5
(1,888 Views)

when you say 'track', do you mean keep track of (record) frequency versus time, or do you mean automatically tune the Extract Single Tone Information to the expected frequency? If I guess the former, you could add a chart to start getting a feel for how fast your beam and your software implementation settles on a new frequency. If you mean tune the tone detection, try wiring the expected frequency into the approx. frequency element of advanced search input of the Extract Single Tone Information VI:

dsbNI_0-1651721284634.png

 

or do you mean that the phase difference never hits the expected zero? Does the function generator API allow you to continuously adjust the start frequency, or does it maintain continuous phase after starting generation? In any case, I wouldn't expect you to have to adjust the phase of the excitation. The beam will vibrate at the forced vibration frequency. You might want to measure the phase difference between excitation and response rather than expecting zero. Even for an ideal beam at resonance, response at an arbitrary point could be 0° or 180° out of phase with the excitation.

 

Good luck. If you do post back with your code, it would be great for you to save some of your data as well. Specifically, include data where your code does not return expected results. We can help with your measurement and analysis VIs, but most of us don't have access to hardware that can reproduce your experiment.  

 

Doug
Enthusiast for LabVIEW, DAQmx, and Sound and Vibration
0 Kudos
Message 3 of 5
(1,869 Views)

As already noted by dsb, the phase doesn't have to be zero, due to phase delays in your setup.

for a 'stable' beam you need to measure at different frequencies (at best with constant exitation 😉 ) . With the results you can determine the resonace and damping (Q) of your beam and phase for your setup.

 

Depending on your needed uncertainty, one draw back of tone detektion is that, due to noise, the tone detection will detect minor different frequencies (and phases) for both channels  ..

(Hey @NI : How about a tone detection vi that do the frequency detection on two(+x) channels?)

 

if you need to improve that:

 

If you can, sync the generator and the DAQ (scope)...

Do a 4 parameter RSME sine fit on both channels (RMS scaled)

I modified matrix 14 to fit both signal in this paper ,explains the linear 4 parameter sine fit.

 

If you really know the frequency (sync?) : do a 3 parameter sine fit. and always monitor the residuals .. if more than noise, check it.

   

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


Message 4 of 5
(1,827 Views)

@zebro wrote:

 The function generator will send a sine wave to the beam and the beam will vibration, another sensor attached on the beam will output a sine wave that has the same frequency of the excitation sine wave. When these two signal has the same phase, resonance will happen.


I think you should check your physics. I'll assume the beam is driven with a small amplitude and acts like a driven harmonic oscillator. At resonance, there should be 180 phase shift between the two signals.

 

It might be easier to use a Lissajous Curve to see when they are in resonance than a PLL. For two signals 180 degree out of phase you should get a straight line with a particular slope.

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