Professional Documents
Culture Documents
Setiap fungsi periodik dapat dinyatakan sebagai penjumlahan dari sejumlah suku
1
harmonik yang frekuensi-frekuensinya adalah n x frekuensi fundamental, f=
𝑇
dimana T = perioda fungsi tersebut
1
f(t) = 𝐴 + 𝐴1 cos 𝜔𝑡 + 𝐴2 cos 2𝜔𝑡 + ⋯ + 𝐴𝑛 cos 𝑛𝜔𝑡 + ⋯
2 0
+ 𝐵1 sin 𝜔𝑡 + 𝐵2 sin 2𝜔𝑡 + ⋯ + 𝐵𝑛 sin 𝑛𝜔𝑡 + ⋯
2𝜋 2 𝑇
dimana ω = dan 𝐴𝑛 = න 𝑓 𝑡 cos 𝑛𝜔𝑡 𝑑𝑡
𝑇 𝑇 0
2 𝑇
𝐵𝑛 = න 𝑓 𝑡 sin 𝑛𝜔𝑡 𝑑𝑡
𝑇 0
Contoh
gelombang square: 𝐴𝑛 = 0
4
𝐵𝑛 = ; n = 1,3,5,……
𝑛𝜋
4 1 1 1
f(t) = (sin 𝜔𝑡 + sin 3𝜔𝑡 + sin 5𝜔𝑡 + ⋯ + sin 𝑛𝜔𝑡 + ⋯ )
𝜋 3 5 𝑛
Pasangan
∞
መ
𝑓(𝑓) = න 𝑓 𝑡 𝑒 −𝑗𝜔𝑡 𝑑𝑡 [Hz]
−∞
∞
መ
𝑓(𝑡) = න 𝑓(𝑓)𝑒 𝑗𝜔𝑡
𝑑𝑓 [s]
−∞
atau
∞
መ
𝑓(𝜔) = න 𝑓 𝑡 𝑒 −𝑗𝜔𝑡 𝑑𝑡 [rad/s]
−∞
1 ∞
𝑓(𝑡) = መ
න 𝑓(𝜔)𝑒 𝑗𝜔𝑡
𝑑𝜔 [s]
2𝜋 −∞
atau
∞
1
መ
𝑓(𝜔) = න 𝑓 𝑡 𝑒 −𝑗𝜔𝑡 𝑑𝑡 [rad/s]
2𝜋 −∞
∞
1
𝑓(𝑡) = መ
න 𝑓(𝑓)𝑒 𝑗𝜔𝑡
𝑑𝑓 [s]
2𝜋 −∞
MATLAB
>> n = 2^p;
>> y = fft(x,n); % DFT using FFT
S = 0.7*sin(2*pi*50*t) + sin(2*pi*120*t);
plot(1000*t(1:500),S(1:500))
title(‘Signal’)
xlabel(‘t (milliseconds)')
ylabel(‘S(t)’)
P2 = abs(Y/L);
P1 = P2(1:L/2+1);
P1(2:end-1) = 2*P1(2:end-1);
f = Fs*(0:(L/2))/L ;
plot(f,P1)
title('Single-Sided Amplitude Spectrum of S(t)')
xlabel('f (Hz)')
ylabel('|P1(f)|')
Tugas
Fs = 5000; % Sampling frequency
T = 1/Fs; % Sampling period
L = 5000; % Length of signal
t = (0:L-1)*T; % Time vector
f1 = 697; f2 = 1336;
x1 = sin(2*pi*f1*t);
x2 = sin(2*pi*f2*t);
x = x1+x2;
plot(1000*t(1:500),x(1:500))
title(‘Signal’)
xlabel(‘t (milliseconds)')
ylabel(‘S(t)’)