02-28-2024 09:00 PM
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
02-29-2024 05:53 AM - edited 02-29-2024 06:00 AM
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.