Opening the book…
- Usefulness with discrete data
- Also possible to use complex exponential and Euler formula \[ \mathbf{e}^{\pm i\theta} =\cos\theta \pm i\sin\theta \] \[\cos \theta = \frac{[\mathbf{e}^{i\theta}+\mathbf{e}^{-i\theta}]}{2} \] \[ \sin \theta = \frac{[\mathbf{e}^{i\theta}-\mathbf{e}^{-i\theta}]}{2}\]
- Complex formulation simplifies multiplication of real and imaginary components through complex conjugates
- When the integration is expanded beyond single period to \(\infty\), then conversion of data from time domain to frequency domain possible \[Y(\omega) = \int_{-\infty}^{+\infty}y(t)\mathbf{e}^{-i\omega t}dt \]
-
What does plot of simple periodic appear in frequency domain?
- Answer
-
Show single stem plot.
-
What happens if multiple frequencies are present?
- Answer
-
Image of multiple stems of multi-frequency image.
-
- Tool for discrete data is fast Fourier transform (FFT)
- developed in 1940s when computation was laborious
- divides data in half and sums over \(N/2\) steps instead of \(N^{2}\) process
- Simple fft call in Matlab
- Using the FFT
- Input is the real data array collected of length \(N\) points
- Output is equal length complex (real + imaginary) array
- similar to \(A_{n}\) and \(B_{n}\) of Fourier coefficients when \(y(t)\) was known
- BUT exists at ALL frequency points, not just harmonics of integer frequency value \(n\omega\)
- Displaying the data on plot
- Horizontal axis is now cyclic frequency (\(f\))
- Lowest frequency: at \(f_{min} = 0 \) the peak represents mean value
- Largest frequency is resolution of smallest time step \(f_{max} =1/ \delta t\)
- Frequency increment is total time of collection \[ df = \frac{1}{N \delta t} = \frac{1}{t_{end}-t_{0}}\]
- Which part to plot, real or imaginary?
- Can use both through absolute value: \[z = |x + yi| = \sqrt{x^{2} + y^{2}} \] \[C = |Y(\omega)| = \sqrt{\Re(Y(\omega))^{2} + \Im(Y(\omega))^{2}} \]
- Since no data are known between the \(df\), acts as a comb function (stem plot in Matlab) rather than continuous curve
- Note that the FFT causes a folding symmetry about the \(N/2\) point
- Hence, magnitude of stem is half of amplitude at that particular frequency
- Introduces potential for amplitude ambiguity
- When full period is collected, single peak appears AT particular frequency
- Portions of periods cause spread of peak to adjacent frequencies
Figures need to be incorporated through example
- Answer
-
Add texts here. Do not delete this text first.
- Acts similarly to the statistics functions from Section 2.1 where time range affected value
- How to reduce ambiguity? Increase total time to make ambiguity a smaller percentage of overall data collected (i.e., have MORE total periods).
- What about signals with discontinuities (i.e., \(\infty\) frequencies)? There will always be spreading.
- Filtering in frequency domain
- With raw data in temporal or spatial domain, the Fourier Transform converts to a frequency
- Recall types of filtering from MEE 321 (vibrations) and/or MEE 322 (dynamic systems and control)
- Describe a band-pass filter in terms of low-pass versus high-pass conditions
- Analogy of window of visibility into a room
- Using the FFT data, user may select either:
- particular frequencies that stand out (include side shoulders for amplitude ambiguity described from Section 6.2.E)
- amplitudes above some noise level
- Practical considerations that must be implemented:
- Must utilize FFT symmetry though
- every \(f_{r}\) retained, must also include \(f_{max}-f_{r}\)
- other frequency domain values made zero in both real and imaginary domains
- Use the inverse fast Fourier transform (ifft) to return to time domain
- Output will retain complex number elements, but only the real portion has value (imaginary should be \(\rightarrow 0\))
- Plotting noisy versus filtered data in Matlab examples
clear all; close all;
Input_freq = 78; % Hz
num_cycs = 5;
mth_order = 10;
omega = Input_freq*2*pi;
T = 1/Input_freq;
final_time = num_cycs*T+0*T;
dt = final_time/(2^mth_order);
t = dt:dt:final_time;
N = length(t);
V_org = (sin(omega*t));
V = V_org+1.5*randn(1,N);
plot(t,[V;V_org],'.');
pause; % all of the previous stuff is just building data;
% Yours will come from the digital data acquisitionvbar = mean(V); % simple statistics
sigma_vbar = std(V);X = 1/N*fft(V); % Converting to frequency domain
df = 1/final_time; % step sizes for frequency plotting
f = df*(0:N-1); % creating the frequency array
Xvals = abs(X); % Combining the real and imaginary components
figure(2);
stem(f,Xvals); % Plotting in frequency domain
hold on;low_end = 0.4*Input_freq; % Defining range of frequencies to be kept
high_end = 1.8*Input_freq;
I = find(f<low_end | (f >high_end & f < df*N/2) | ...
(f>(max(f)-low_end)& f>=df*N/2) | (f>=df*N/2 & f<(max(f)-high_end)));
% This selection of the frequencies is critical. You want values in the
% window both for range f<N/2 and the range f>N/2;
stem(f([I]),Xvals([I]),'g');
xlabel('Frequency (Hz)');
pause;
xlim([0,high_end*2.5]);
pause;filtered_X = X;
filtered_X(I) = 0+0i;
filtered_V = real(N*ifft(filtered_X)); % inverting back to the time domain
figure(1); hold on;
plot(t,filtered_V,'ro'); % plotting the filtered data
ylim([-2,2]);
- Must utilize FFT symmetry though
6.3: Discrete data conversion and filtering is shared under a CC BY-NC 4.0 license and was authored, remixed, and/or curated by LibreTexts.
The book could not be loaded just now.