01-26-2023 12:05 PM
Hi,
yes, i totally agree with you. This is what i'm going to.
But even if mic1 hear the sound and mic2 doesn't, that doesn't mean that is proper sound.
Manipulation around mic1, produce different sounds which are not click (what i search for),
so VI should be able to make the difference, is it click or something else.
That's why i need qualitative FFT analysis, to differ click from sound which could be present only around mic1.
So i create basic VI, to make AD conversion, trigger and FFT, so i could see freq of my click. And now problem pops-up, because couple clicks have different spectral diagram.
So i need to solve this first.
Can you advise something about this?
Thanks a lot.
01-26-2023 02:45 PM
I am interested in your problem, but I am a bit confused with the example images for your post today. On them your "click" signal is way above the noise. It seems to me that it shouldn't be too difficult to detect. Also, active noise cancellation with a second microphone will be (in my opinion, I'm no expert on it) very difficult to achieve. I think there are easier ways to improve the detection with just one microphone.
Anyway, here are a couple thoughts that cross my mind:
- detecting signals in noisy environments can be very hard, and the better you know your signal the easier it will be
- you can try to characterize your signal ("clicks") as best as possible by sampling them better, both in time and amplitude. Make sure their length is fully contained in the waveform you save, and that they are well sampled horizontally and vertically, without being clipped. Then you can focus on windowing and FFT of the signal.
- you can do a similar characterization with the noise by recording long stretches of background noise without clicks, then use Power Spectrum Density or something similar.
- once you have both signal and noise well characterized, you can filter you waveform fairly aggressively in order to keep only the bandwidth of interest where your click lies.
- you can also look into comparing a potential click to one (or more) reference waveforms containing the click, either in the time or frequency domain.
Best of luck!
01-27-2023 12:01 AM
Replying to the FFT issue - for VISUALISATION purposes (so that YOU learn about the signal), the direct FFT provides just little insight. Two improvements I suggest:
I am a little afraid that for making reliable spectrogram, you need pretty high sampling rate wrt click length.
01-27-2023 03:48 AM
In attachment there is VI where you can find captured waveform values in block diagram as constants.
Additional there is a anaise.pdf whit screenshots of 5 clicks.
I tried spectrogram, but i don't have much better results. And to be honest, not sure if i applied spectrogram correctly at all, and how to use it correctly. Anyway you will see in block diagram.
@blum22,
better sampling signal is not possible because max. sampling is 50000. Which is already set.
So i think this is top quality i can get, at least regarding sampling.
I also made version LV2018, please try and tell if something doesn't work.
Thanks
01-27-2023 04:17 AM
@NIquist wrote:What you are trying to do is collect two signals of the same source and then try to subtract them thinking that since one mic is closer to an offensive sound it will go away but you will probably just reverse its polarity and still hear it. Along with a ton of processing crap.
🤓
That sounds a lot like Independent component analysis (Wikipedia)..
Basically, the theory (in my layman terms) is that n signals can be separated from each other if you have n+1 samplers (of course there are restrictions). ICA is a way to do this, based on difference in amplitude, although delays can be used as well (but that gets way more complicated).
I have the book the wiki refers to: "Amazon.com: Independent Component Analysis: A Tutorial Introduction (A Bradford Book): Stone, by Jam...". You can get most of the complex matter without hardly any background. It's explained really well, which is quite rare. You'd learn a lot more than ICA, it also explains principle component analysis, and a few other algorithms, in a way it's actually clear.
01-27-2023 05:11 AM
Thanks for advice.
I will check the book.
Furthermore, i believe that my FFT analysis is different because sometimes trigger is capture at the middle and sometimes at the end of the sample array.
And because this HW doesnt have internal trigger, i don't see how i can capture signal at the middle of the array.
01-27-2023 08:01 AM
You can try to acquire the trigger with the signal(s).
Then you can truncate the data based on the trigger data.
01-27-2023 08:38 AM
I have some old code for an LMS filter I used it to filter out MRI noise from vocal responses during some clinical trials. If you send me some files recorded from both microphones, I can see if it works for your application. About 30 seconds should be all I need.
01-27-2023 08:42 AM - edited 01-27-2023 09:14 AM
If your click signals are similar but not at the same position in the full acquisition, it will only affect the phase of the frequency content but not the magnitude. However the problem I see is with your second signal that is cut at the end before going back to background noise. That could cause an issue with the FFT analysis, and to minimize it you need to apply a window, but even then you don't capture the full "click".
If you don't have an internal trigger, you can instead try to do a continuous acquisition with a buffer and set a threshold to trigger a save. That way you can ensure that you have your click in the middle of your saved waveform. This link describes what I have in mind, and this one describes how to implement it with DAQmx (example D).
01-27-2023 09:31 AM
You need to pre-process this signal and use a threshold to determine when the signal actually begins and ends. Then, slice the array with those indexes to leave just the signal. Even then, it will probably be best to use a window to avoid artifacts in your resulting spectra. Play around with a few but the Exponential and Force windows are designed for times where the signal is generated from an impact (like a clap) and then gradually fades out.