Incorrect Impulse Train Waveform Fourier Representation

조회 수: 7 (최근 30일)
Obadah M.
Obadah M. 2020년 11월 20일
편집: Long He 2023년 8월 23일
As the title suggests, I'm trying to plot the impulse train waveform using its Fourier series complex coefficients. I'm using the Fourier series and Fourier coefficients equations shown below:
My issue is that when trying to plot the impulse train waveform using it's Fourier coefficient, , where A is the amplitude and is the time period of the signal, I end up with a signal that exhibits the same time period, but with N as my amplitude instead of A. See the screenshot below.
Here's the code I'm using.
%% Definition %%
N = 90000; % number of harmonics
t = -10:0.01:10;
T_0 = 4; % time period
w0 = 2 * pi * (1/T_0); % angular frequency
A = 2; % amplitude
%% Summation %%
f = 0;
for n = -N:1:N
c_n = A/T_0;
f_n = c_n * exp(1i*n*w0*t);
f = f + f_n;
end
%% Plotting %%
stem(t, f); % plot f(t)
% axis equal
grid on
line([0,0], ylim, 'Color', 'k', 'LineWidth', 1); % Draw line for Y axis.
line(xlim, [0,0], 'Color', 'k', 'LineWidth', 1); % Draw line for X axis.
xlabel('time (s)');
ylabel('f(t)');
title('Impulse Train')
Table 4.3 defines the Fourier coefficients for various signals. See signal number (7)

답변 (1개)

Long He
Long He 2023년 8월 23일
편집: Long He 2023년 8월 23일
I didn't see any problems or contradictions.
For impulse function , . As you increasing the number of terms, you should see the value becomes bigger and bigger since the impulse train will be better approximated.

카테고리

Help CenterFile Exchange에서 Spectral Measurements에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by