Discrete Fourier Transform (DFT) of temporal signals are easy to compute since we make use of the temporal frequency. Given the the frequency f, sampling time T, sampling interval dt and hence total number of samples N=T*dt, hence we can solve for the DFT of the input signal defined by the parameters previously mentioned.
For instance we have a sinusoidal signal with the following parameters: f=5, T=2, N=256 and dt=T/256. The input and output signal is shown in the plots below.
For instance we have a sinusoidal signal with the following parameters: f=5, T=2, N=256 and dt=T/256. The input and output signal is shown in the plots below.
Figure 1. Sinusoidal input
Figure 2. DFT output of the input sinusoidal signal (peaks at f=5)
Figure 2. DFT output of the input sinusoidal signal (peaks at f=5)
For images, the frequency is now spatial. For simplest case, an image of black and white stripe has a frequency of n cycles if either the black or the white is repeated n times. The 2D FFT of this is an image of bright (near the center) and dim dots (far from the center) (see Figure 3). The frequency information of any image is utilized by FFT (use the function fft2d in Scilab) to produce the transformed image.
[Reference: http://www.cs.unm.edu/~brayer/vision/fourier.html]
Answers to questions (#5):
a. Given the frequency of the signal (120Hz), to get a good record of whatever information you are sampling, the sampling time of should be less than or equal to the reciprocal of the signal frequency of the bulb. Information is given out 120 times in a second. To get all the informations, we have to sample it at 1/120 seconds or less (if possible).
b. Increasing the number of samples should decrease the maximum frequency in the frequency axis and increase the value of the FT signal. Consistent with the simulations, the value of the peak(s) increases as can be observed from the plot. Also, this case involves a varying total time due to change in N but a fixed dt.
c. Decreasing the sampling interval should increase the maximum frequency. As verified in the simulations, the range of frequencies extend as we decrease the sampling interval. This case also has a varying total time T.
d. Fixing the total time T and increasing the number of samples would mean a decrease in the sampling interval. Hence, the maximum frequency in the frequency axis will decrease. we expect the results to the same as that of b and c. An increasing number of samples resulted to increase in the FT values and in effect, the decrease in the sampling interval increases the maximum frequency extending the range.
The Code: courtesy of Dr. Soriano
[Reference: http://www.cs.unm.edu/~brayer/vision/fourier.html]
Answers to questions (#5):
a. Given the frequency of the signal (120Hz), to get a good record of whatever information you are sampling, the sampling time of should be less than or equal to the reciprocal of the signal frequency of the bulb. Information is given out 120 times in a second. To get all the informations, we have to sample it at 1/120 seconds or less (if possible).
b. Increasing the number of samples should decrease the maximum frequency in the frequency axis and increase the value of the FT signal. Consistent with the simulations, the value of the peak(s) increases as can be observed from the plot. Also, this case involves a varying total time due to change in N but a fixed dt.
c. Decreasing the sampling interval should increase the maximum frequency. As verified in the simulations, the range of frequencies extend as we decrease the sampling interval. This case also has a varying total time T.
d. Fixing the total time T and increasing the number of samples would mean a decrease in the sampling interval. Hence, the maximum frequency in the frequency axis will decrease. we expect the results to the same as that of b and c. An increasing number of samples resulted to increase in the FT values and in effect, the decrease in the sampling interval increases the maximum frequency extending the range.
The Code: courtesy of Dr. Soriano
No comments:
Post a Comment