I have one noisy signal, and this signal is in the time domain. I want to draw this signal through the Fourier transform. As a result, what I expect is a Gaussian dispersion around 0. However, I don't know how to apply and draw the Fourier transform on my signal. I would be glad if you could help.
signalplusnoise=1x674
signalplusnoise=[0.0161,0.0308, 0.0112, ..., 0.3827]
Related
I have a problem in signal processing with Matlab.
I would like to analyze some signal using Matlab but there is a huge difference between the amplitude of signals.
The problem is that the shape of the signal in low amplitude is similar to the shape of the signal in high amplitude. but to analyse the signal, I have to have same range amplitude signal.
how can I have that without destroying the shape and properties of the signal?
Sorry I couldn't send an example plot to clear that.
Something like:
signal1;
signal2;
signal1=(signal1- min(signal1(:))/(max(signal1(:))-min(signal1(:)))
signal2=(signal2- min(signal2(:))/(max(signal2(:))-min(signal2(:)))
% Now both signals are 0-1 range
Without more information this is all what we can offer!
I want to smooth PSD. What I think is I calculated aurocorrelation via xcorr. Then I calculated fourier transform vit fft. Then convolved with gaussian windows. I get smoothed PSD.
According to fourier transform property instead of convolution, I can calculate ifft of PSD(which equal to autocorrelation) and ifft of gaussian window. I can multiply in time domain and I can calculate fourier transform. When I use this way I couldn't get smoothed PSD. Where is the problem?
s -> my signal
Rxx1=xcorr(s,288,'biased');%autocorrelation
w=gausswin(5)%gauss windows
F1=dftmtx(M)*(diag(ifft(w,M)))*Rx;%instead of frequency convoluiton I use time domain multiplation
plot(abs(F1));
So I have the samples (hex values) of a sinus signal and I know the sampling frequency. Using this I can plot an fft or periodogram but then I would like to find out the SNR ratio. What would be the most accurate way to calculate the noise and signal power? I would prefer doing it in frequency domain. Is there a way to do this also in time domain?
Thanks a lot in advance!!!
So if there is noise on your signal and you know that your underlying signal is a sine wave, you can easily get your signal parameters i.e. amplitude,frequency and phase by least squares. If y(t) is your signal just minimize the L2 norm of (y(t)-A.sin(wt+b)) over A,w and b. Then you can easily get signal power from the underlying signal and the noise power from the error signal (y(t)-A.sin(wt+b)).
I'm working on a control system that measures the movement of a vibrating robot arm. Because there is some deadtime, I need to look into the future of the somewhat noisy signal.
My idea was to use the frequencies in the sampled signal and produce a fourier function that could be used for extrapolation.
My question: I already have the FFT of the signal vector (containing 60-100 values e.g.) and can see the main frequencies in the amplitude spectrum. Now I want to have a function f(t) which fits to the signal, removes some noise, and can be used to predict the near future of the signal. How do I calculate the coefficients for the sine/cosine functions out of the complex FFT data?
Thank you so much!
AFAIR FFT essentially produces output as a sum of sine functions with different frequencies. The importance of each frequency is the height of each peak. So what you really want to do here is filter out some frequencies (ie. high frequencies for the arm to move gently) and then come back to the time domain.
In matlab this should be like going through the vector of what you got from fft, setting some values to 0 (or doing something more complex to it) and then use ifft to come back to time domain and make the prediction based on what you get.
There's also one thing you should consider while doing this - Nyquist frequency - this means that the highest frequency that you get on your fft is half of the sampling frequency.
If you use an FFT for data that isn't periodic within the FFT aperture length, then you may need to use a window to reduce spurious frequencies due to "spectral leakage". Frequency estimation techniques to better estimate "between bin" frequency content may also be appropriate. The phase of each cosine sinusoid, relative to the edge of the window, is usually atan2(imag[i], real[i]). The frequency depends on the sample rate and bin number versus the length of the FFT.
You might also want to look into using a Kalman filter instead of an FFT.
Added: If your signal isn't exactly integer periodic in the FFT length, then you may want to do an fftshift before the FFT to move the resulting phase measurement reference point to the center of your data vector, instead of a possibly discontinuous circular edge.
I have previous experience with MATLAB, but the problem that I face is some problems in applying a problem in (DSP: Digital signal processing) which is not my study field, but I must finish those problems in days to complete my project.
All I want is help with a method and steps of solving this problem in MATLAB and then I can write the code with myself.
The problem is about the signal
x(t) = exp(-a*t);
1) What's the discrete Fourier transform of the sampled signal with sample rate fs?
2) If a=1 and fs=1, plot the amplitude spectrum of the sampled signal
3) Fix the sampling frequency at fs = 1 (Hz) [what does it mean?] and plot the magnitude of the Fourier Transform of the sampled signal at various values of a
The DFT is used to bring a discrete (i.e. sampled) signal from the time domain to the frequency domain. It's an extension of the Fourier transform. It is used when you are interested in the frequency content of your data. The DFT { x(t) } yields an expression X(F); sample rate (fs) is a term in its expression... This will be your answer to part 1.
You can find tables for the example expression exp(-a*t), but you really should study the electrical engineering (and perhaps math) background for this concept. If you have ability in MATLAB AND you get the basics of the Fourier transform/discrete Fourier transform, then these problems will be straightforward.
MATLAB actually has a tutorial for this subject matter: http://www.mathworks.com/help/techdoc/math/brenr5t-1.html. Good luck...