01-29-2023 10:27 AM
Problem with example D, is usage of trigger function.
If i use equivalent function from ULx library, it doesn't work, because my DAQ hardware (Redlab 1208LS) dosen't support that function.
Only thing that cross my mind how to avoid this signal cutoff, is when trigger is happened, then this package of samples is saved in array, and then next new set of samples are appended to array. Then maybe i will have complete signal, and then background sound can be cut out. I will try this tomorrow..
I very appreciate your help and advices. Thanks everyone.
01-30-2023 01:20 AM
The position of the peak within the capture window is not the issue really. Try experimenting with FFT on simulated signals. The fundamental problem I see is that FFT is designed for (or works optimally with) stable harmonic signals. Your interest is signal which is not harmonic or periodic.
You might be getting a little piece of data which has a 5 kHz component but few ms later you get an another little piece of data which has 5 kHz component as well, but with opposite phase. The FFT offers a limited insight into these data. Also try expanding the measurement window to double - suddenly the FFT values of a single click drops to half in magnitude as there is less useful signal compared to the measurement window.
The spectrogram is the solution for these data as it splits the original data in small same size windows in which you can kind of expect data to have a constant spectrum.
Simulated sine waves with their FFTs. The top one has half-cycle pause in it. On the right original signal, on the left their FFT up to 100 Hz. Note the dB scaling.
01-30-2023 06:21 AM - edited 01-30-2023 06:24 AM
So, FFT not suitable for this kind of signals.
I also noticed that when I put 1KHz signal from youtube, FFt is just perfect.
And now, as i'm not familiar with spectrogram, can you help me how to setup the diagram.
Because i have sound arround 12khz, and spectrogram shows 200Hz.
Edit:
In attachemnt, i tried to add data set before and after trigger, to have triggered signal in a middle of diagram, but this also doesn't work, as you explained already.
Also spectrogram has been added from some NI Example.
Thank you
01-30-2023 07:29 AM - edited 01-30-2023 07:30 AM
That's the correct example 👍
I don't have the ULx toolkit so I can't say for sure but I think your Fs = 50 kSps. It is just the axis multiplier issue, wire your sampling freq instead of the 1000 Sps and you should be good to go.
04-11-2023 10:06 AM
How do you subtract the FFT results ?
Do you have to break the FFTs down to their complex components and then subtract ?
I am running a condition-monitoring test on some machinery with a mic, I would like to record an FFT of the background noise for 10-15 mins first without turning my machine on, then turn my machine on and measure the sound FFT and then finally subtract the two (what would be the best way to do this ?)
I would be really grateful for your help.
04-11-2023 10:29 AM
@milan87 wrote:
I manage to find what was the issue about different signals from 2 mics.
One of resistor in mic circuit has different value. And now the diagrams are pretty the same.
I think it could not be better with this hardware.
But now i noticed, that click sound isn't the same every time. I made a couple of pictures in pdf in att.
Currently i check if there is a pick at one frequency, more specific 12kHz +/-10% in this case.
Amplitude level is sometimes weaker and sometimes is stronger at that frequency.
If you're sampling at 25kHz, 12kHz is the maximum frequency you can capture, as per the Nyquist theorem.