Matlab noise in frequency response function (FRF) - matlab

I am calculating the natural frequencies and the corresponding FRF of a test sample that is excited with a hammer with an accelerometer attached to the tip as input signal and another accelerometer attached to the test sample to measure the response. The calculation of the natural frequencies works fine, however, when I am plotting the normalized FRF of 40 independent measurements, the noise makes it impossible to discern the natural frequencies as you can see below.
Then I found out about the hanning window and I applied this to my data, which gave me the following FRF:
This is an upgrade, but still way too much noise :-(
I am hoping someone can help me what to do next to remove as much noise as possible! Any help would be appreciated!

I am not sure this is a StackOverflow question, but I will still try to help you:
I would try to use autocorrelation or fft. This question could also help you:Determine frequency from signal data in MATLAB

Related

Recognizing relevant signal frequencies

I am currently analyzing sensor signals in MATLAB.
As you see FFT is done for the raw and filtered signal.
This is just an exemplary filter, which I need to adjust.
However, I am having trouble deciding which signal frequencies are relevant and which should be filtered out.
I do know that the highest peaks in frequency spectrum depict the most important, however they are not always a clearly visible as on the screenshot which I sent you.
Do you know any methods of determining the most relevant frequencies or maybe you could recommend some articles/literature which would explain it ?
We can't tell you what the important frequencies are, that's for you to decide. Why are you doing an FFT? There must be something you're trying to evaluate. Whatever is driving you to run an FFT should give you hints about what frequencies to look at.
You could look for fundamental frequencies, but that's just a guess. The harmonics and their relative magnitudes are just as important - they determine the timbre of the sound. A saxophone, a clarinet, a trumpet, and a flute may all play the same fundamental frequency/note, but they sound different because their harmonics generate different timbres.

Get the envelope of a signal in Matlab

I don't know how to compute the envelope of a signal. I've already seen the mathwork solutions firstSolution secondSolution but they does not work in the signal I'm working with.
This signal provides from a pressure sensor and it's sampled at a frequency of 1kHz and it has 100000 samples.
I've read that with the hilbert transform I could get the envelope by doing abs(hilbert(data)) being data the values of the signal2.txt but it has not work. I've also tried with taking the absolute value of the analytic signal but it has not work either.
The solution I've tried is to find the peaks and put them together linearly but it does not work properly because I want a continuous and derivable function as result so as I need to derivate it.
I hope you knew the solution to my problem. :)

Envelope detection in Matlab

I am trying to get an envelope for a spectrum I measured.
I have used the hilbert function in MATLAB which works for a dummy function I wrote,
but it does not give the correct result for my spectrum. (I got back the exact same curve).
I am thinking the oscillation of my spectrum is too fast but not too sure on this.
Hope someone can tell me what is wrong here.
A=xlsread('test.xls');
y=A(:,2);
h1=imag(hilbert(y));
E=sqrt(y.^2+h1.^2);

If there any way to get frequency of sound.

I want to know the frequency of data. I had a little bit idea that it can be done using FFT, but I am not sure how to do it. Once I passed the entire data to FFT, then it is giving me 2 peaks, but how can I get the frequency?
Thanks a lot in advance.
Have a look at this page for an explanation on how to calculate it:
FFT Fundamentals
Please also check this answer (it's C# code but I think you can easily understand it)
How do I obtain the frequencies of each value in an FFT?
And finally have a look at this one, it uses DFT instead of FFT:
Determining the magnitude of a certain frequency on the iPhone
I also found this implementation that you can use in Objective-C:
A lib to find the frequency https://github.com/jkells/sc_listener
A example using the above library https://github.com/jkells/sc_listener_sample
Regards
An FFT will give you the frequency of all the sinusoidal components of a signal. If instead you want just the frequency of the periodicity of common waveforms (more interesting sounding and looking that a plain sinewave) such as produced by speech and music, then you may want to use a pitch detection/estimation algorithm instead of just an FFT peak.

How can i find a sound intensity by using Matlab?

I'm looking for some functions in MATLAB in order to find out some parameters of sound,such az intensity,density,frequency,time and spectral identity.
i know how to use 'audiorecorder' as a function to record the sampled voice,and also 'getaudio', in order to plot it.But i need to realize the parametres of a sampled recorded voice,that i mentioned above.i'd be so thankful if anyone could help me.
This is a very vague question, you may want to narrow it down (at first) and to add as much contextual details as you can, it will certainly attract a lot more answers (also as mentionned by Ion, you could post it at http://dsp.stackexchange.com).
Sound intensity: microphones usually measures pressure, but you can get the intensity from that quite easily (see this question). Your main problem is that microphones are not usually calibrated, this means that you cannot associate an amplitude with a pressure. You can get sound density from sound intensity.
Frequency: you can get the spectrum of your sound by using the Fast Fourier Transform (see the Matlab function fft).
As for spectral or time identity, I believe these are psychoacoustics notions, which is not really my area of expertise.
I'm no expert but I have played with Matlab a little in the past.
One function I remember was wavread() to input a sound signal into Matlab, which if executed in this form [Y, FS, NBITS]=WAVREAD("AUDIO.WAV") would return something like:
AUDIO.WAV:
Fs = 100 kHz
Bits per sample = 10
Size = 100000
(numbers from the top of my head)
Now about the other things you ask, I'm not really sure. You can expect a better answer from somebody else. I think this question should be moved to Signal Processing SE btw.