Multifunction DAQ

cancel
Showing results for
Did you mean:

python Ni daqmx force ,displacement,and strain sine wave signal peak and valley

I am conducting a fatigue test on the structural parts with a fatigue testing machine. I used the NI9189 chassis NI9222 NI9235 NI9237 card to collect the force displacement and strain signal, which is a sine wave signal with noise. How can I analyze the number of sinusoidal cycles and the peak and valley values of each sine wave in real time during the acquisition process

Message 1 of 2
(213 Views)

Re: python Ni daqmx force ,displacement,and strain sine wave signal peak and valley

If you have data of one periode, I would do a sinefit.

Have a look at the python sinetools, should be available from PTB (Bruns/Seeger)  (I'm in the same domain, so I can't tell if these are really public)

If you can lock the timing of your DAQ to the gerenerator the frequency is (should) be known and constant and you can use a 3 parameter sinefit (mag/phase/offset).

Without locking the generator to the DAQ, the frequency is only nearly known and you should use the 4 parameter sine fit (incl also fitting the frequency).

I use LabVIEW, so I can't tell more about the python solution, but can provide some papers on sinefitting if needed. One link I posted here

If the max and min in a distorted sinewave are of more importance and you want to reduce the noise, I would go with a sliding square function fits over about 1/5-1/8(?) of the periode (If a Savitzky-Golay filter is in your python lib, you can (ab)use it for this purpose) and look for min/max. Hint: Result should be better if you apply a something like a hanning window instead of a rectangular one for the fit.

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 2 of 2
(175 Views)