Matlab FFT. A recorded understanding between frequency and outcome

We are trying to analyze the flow around a circular cylinder, and we have a set of Cp values ​​that we obtained from a wind tunnel experiment. Initially, we started with a sampling frequency of 20 Hz and tried to find the vortex spill frequency using FFT in the matrix. We got a frequency of about 7 Hz. Then we did the same experiment, but the only thing we changed was the sampling rate - from 20 Hz to 200 Hz. We got the vortex discharge frequency at about 70 Hz (here the peak is on the graph). The graph does not change regardless of the Cp data that we enter. The only time the peak is different is when we change the sampling rate. It seems that increasing the vortex discharge frequency is proportional to the sampling frequency, and this does not seem to make sense. Any help in establishing a connection between the sampling frequency and the vortex discharge frequency would be significantly reduced.

+6
matlab fft
source share
7 answers

The problem you see is “data smoothing” due to FFT restrictions that can detect frequencies higher than the Nyquist frequency (half the sampling frequency).

When smoothing the data, the peak at the real frequency will be centered (the real frequency modulo the Nyquist frequency). In your sample with a frequency of 20 Hz (assuming that 70 Hz is the true frequency, which leads to a zero frequency, which means that you do not see real information. One thing that can help you with this is to use the "window" FFT

Another problem you may encounter is the creation of noisy data using a single FFT measurement. It’s better to take a lot of data, use windows with overlap and make sure that you have at least 5 FFTs that you average to find the result. As Stephen Lowe said, you should also try faster bets, if possible. I would recommend sampling at the maximum speed that your tools can try.

Finally, I would recommend you read some excerpts from Numerical Recipes in C (<- link):

You do not need to read the C source code - just explanations. Numeric recipes for C have excellent concise information on this.

If you have more questions, leave them in the comments. I will try to do my best by answering them.

Good luck

+11
source share

this is probably not a programming problem, it sounds like a problem measuring experiment

I think that the sampling rate should be at least twice the oscillation frequency, otherwise you get artifacts; this may explain the difference. Note that the ratio of the FFT frequency to the sampling frequency is 0.35 in both cases. Can you repeat the experiment with a higher sampling rate? I think that if it is a narrow cylinder with strong winds, it can vibrate / oscillate faster than the sampling rate can determine.

I hope this helps - the probability is 97.6% that I don’t know what I'm talking about -)

+4
source share

If this is not a problem with an alias, it looks like you could build a frequency response on a normalized frequency scale that will change with the sampling frequency. Here is an example of a reasonably good way to build the frequency response of a signal in Matlab:

Fs = 100; Tmax = 10; time = 0:1/Fs:Tmax; omega = 2*pi*10; % 10 Hz signal = 10*sin(omega*time) + rand(1,Tmax*Fs+1); Nfft = 2^8; [Pxx,freq] = pwelch(signal,Nfft,[],[],Fs) plot(freq,Pxx) 

Note that the sampling frequency must be explicitly passed to the pwelch to output “real” frequency data. Otherwise, when you change the sampling frequency, the bit in which the resonance occurs will shift, which is similar to the problem you are describing.

+2
source share

Think you need to do some serious reading in digital signal processing before you can even understand all the nuances of DFT (FFT). If I were you, I would first settle in this great book:

Discrete Time Signal Processing

If you want more math treatment that really expands your abilities,

Körner Fourier Analysis

+2
source share

Take a look at this related question. Although he was initially asked about the VB asked, the answers mostly concern FFT

0
source share

I tried to use the frequency response code as above, but it seems that I do not have the appropriate tools in Matlab. Is there a way to do the same without using the fft command? So far this is what I have:

  % FFT Algorithm Fs = 200; % Sampling frequency T = 1/Fs; % Sample time L = 65536; % Length of signal t = (0:L-1)*T; % Time vector y = data1; % Your CP values go in this vector NFFT = 2^nextpow2(L); % Next power of 2 from length of y Y = fft(y,NFFT)/L; f = Fs/2*linspace(0,1,NFFT/2); % Plot single-sided amplitude spectrum. loglog(f,2*abs(Y(1:NFFT/2))) title(' y(t)') xlabel('Frequency (Hz)') ylabel('|Y(f)|') 

I think there might be something wrong with the code I'm using. I'm not sure what.

0
source share

My colleague wrote some good GPL-licensed functions for spectral analysis: http://www.mecheng.adelaide.edu.au/~pvl/octave/

( Update : this code is now part of one of the Octave modules:
http://octave.svn.sourceforge.net/viewvc/octave/trunk/octave-forge/main/signal/inst/ .
But it can be difficult to extract exactly the parts you need.)

They are written for both Matlab and Octave and serve mainly as a replacement for similar functions in the Toolbox Toolbox. (Thus, the code above should work fine.)

This can help with data analysis; better than folding your own with fft etc.

0
source share

All Articles