{"id":1170,"date":"2024-10-02T20:11:05","date_gmt":"2024-10-02T13:11:05","guid":{"rendered":"https:\/\/dosen.unila.ac.id\/ahmadzakaria\/?p=1170"},"modified":"2024-10-02T20:13:35","modified_gmt":"2024-10-02T13:13:35","slug":"menghitung-spektrum-data-seri-waktu-menggunakan-fft-macro-excel","status":"publish","type":"post","link":"https:\/\/dosen.unila.ac.id\/ahmadzakaria\/2024\/10\/02\/menghitung-spektrum-data-seri-waktu-menggunakan-fft-macro-excel\/","title":{"rendered":"Menghitung spektrum data seri waktu menggunakan FFT-Macro (Excel)"},"content":{"rendered":"<p>Dengan menggunakan fungsi FFT di Excel dan menggunakan Macro Excel, kita dapat menghitung spektrum dari data seri waktu (time series). Sintaks Macro nya dapat dilihat sbb:<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; fft-macro &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<p>Sub uji()<br \/>\nDim f(512), ff(512), A(512)<br \/>\nApplication.Run &#8220;ATPVBAEN.XLAM!Fourier&#8221;, _<br \/>\nActiveSheet.Range(&#8220;$B$2:$B$513&#8221;), _<br \/>\nActiveSheet.Range(&#8220;$C$2:$C$513&#8221;), _<br \/>\nFalse, False<\/p>\n<p>Range(&#8220;D3&#8221;).Select<br \/>\nApplication.CutCopyMode = False<\/p>\n<p>ActiveCell.FormulaR1C1 = &#8220;=IMREAL(RC[-1])&#8221;<br \/>\nRange(&#8220;D3&#8221;).Select<br \/>\nSelection.Copy<br \/>\nRange(&#8220;C3&#8221;).Select<br \/>\nSelection.End(xlDown).Select<br \/>\nRange(&#8220;D513&#8221;).Select<br \/>\nRange(Selection, Selection.End(xlUp)).Select<br \/>\nActiveSheet.Paste<br \/>\nCells(2, 5) = &#8220;period&#8221;<br \/>\nCells(2, 6) = &#8220;PSD&#8221;<\/p>\n<p>Cells(2, 7) = &#8220;period&#8221;<br \/>\nCells(2, 8) = &#8220;PSD&#8221;<\/p>\n<p>Cells(2, 9) = &#8220;period&#8221;<br \/>\nCells(2, 10) = &#8220;PSD&#8221;<br \/>\nL = 252<br \/>\nFor i = 1 To L<br \/>\nh = i<br \/>\nf(i) = h \/ L * 0.5<br \/>\nCells(2 + i, 5) = 1 \/ f(i)<br \/>\nCells(2 + i, 6) = Abs(Cells(2 + i, 4)) ^ 2 \/ L<br \/>\nNext<br \/>\nFor i = 2 To L<br \/>\nIf Cells(2 + i, 6) &gt; Cells(1 + i, 6) Then<br \/>\nIf Cells(2 + i, 6) &gt; Cells(3 + i, 6) Then<br \/>\nCells(2 + i, 7) = Cells(2 + i, 5)<br \/>\nCells(2 + i, 8) = Cells(2 + i, 6)<br \/>\nEnd If<br \/>\nEnd If<br \/>\nNext<br \/>\nj = 1<br \/>\nFor i = 2 To 255<br \/>\nIf Cells(2 + i, 6) &gt; Cells(1 + i, 6) Then<br \/>\nIf Cells(2 + i, 6) &gt; Cells(3 + i, 6) Then<br \/>\nCells(2 + j, 9) = Cells(2 + i, 5)<br \/>\nCells(2 + j, 10) = Cells(2 + i, 6)<br \/>\nj = j + 1<br \/>\nEnd If<br \/>\nEnd If<br \/>\nNext<br \/>\nEnd Sub<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; fft-macro &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<p>Tampilan excel FFT-macro adalah sebagai berikut,<\/p>\n<p><a href=\"https:\/\/dosen.unila.ac.id\/ahmadzakaria\/wp-content\/uploads\/sites\/21\/2024\/10\/paint0.jpg\"><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter size-full wp-image-1172\" src=\"https:\/\/dosen.unila.ac.id\/ahmadzakaria\/wp-content\/uploads\/sites\/21\/2024\/10\/paint0.jpg\" alt=\"\" width=\"1920\" height=\"1080\" srcset=\"https:\/\/dosen.unila.ac.id\/ahmadzakaria\/wp-content\/uploads\/sites\/21\/2024\/10\/paint0.jpg 1920w, https:\/\/dosen.unila.ac.id\/ahmadzakaria\/wp-content\/uploads\/sites\/21\/2024\/10\/paint0-300x169.jpg 300w, https:\/\/dosen.unila.ac.id\/ahmadzakaria\/wp-content\/uploads\/sites\/21\/2024\/10\/paint0-1024x576.jpg 1024w, https:\/\/dosen.unila.ac.id\/ahmadzakaria\/wp-content\/uploads\/sites\/21\/2024\/10\/paint0-768x432.jpg 768w, https:\/\/dosen.unila.ac.id\/ahmadzakaria\/wp-content\/uploads\/sites\/21\/2024\/10\/paint0-1536x864.jpg 1536w, https:\/\/dosen.unila.ac.id\/ahmadzakaria\/wp-content\/uploads\/sites\/21\/2024\/10\/paint0-210x118.jpg 210w\" sizes=\"(max-width: 1920px) 100vw, 1920px\" \/><\/a><\/p>\n<p>Dimana kolom B menunjukkan data seri hujan harian. Dengan menjalankan program macro ini maka akan didapat hasil berupa spektrum hujan.<\/p>\n<p>Hasil uji FFT-Macro dapat dilihat pada gambar screen shoot berikut,<\/p>\n<p><a href=\"https:\/\/dosen.unila.ac.id\/ahmadzakaria\/wp-content\/uploads\/sites\/21\/2024\/10\/paint.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-1171\" src=\"https:\/\/dosen.unila.ac.id\/ahmadzakaria\/wp-content\/uploads\/sites\/21\/2024\/10\/paint.jpg\" alt=\"\" width=\"1920\" height=\"1080\" srcset=\"https:\/\/dosen.unila.ac.id\/ahmadzakaria\/wp-content\/uploads\/sites\/21\/2024\/10\/paint.jpg 1920w, https:\/\/dosen.unila.ac.id\/ahmadzakaria\/wp-content\/uploads\/sites\/21\/2024\/10\/paint-300x169.jpg 300w, https:\/\/dosen.unila.ac.id\/ahmadzakaria\/wp-content\/uploads\/sites\/21\/2024\/10\/paint-1024x576.jpg 1024w, https:\/\/dosen.unila.ac.id\/ahmadzakaria\/wp-content\/uploads\/sites\/21\/2024\/10\/paint-768x432.jpg 768w, https:\/\/dosen.unila.ac.id\/ahmadzakaria\/wp-content\/uploads\/sites\/21\/2024\/10\/paint-1536x864.jpg 1536w, https:\/\/dosen.unila.ac.id\/ahmadzakaria\/wp-content\/uploads\/sites\/21\/2024\/10\/paint-210x118.jpg 210w\" sizes=\"(max-width: 1920px) 100vw, 1920px\" \/><\/a><\/p>\n<p>Gambar atas merupakan data seri hujan harian (domain waktu). Gambar di bawahnya merupakan spektrum hujan harian (domain frekuensi).<\/p>\n<p>File program di atas dapat didownload dari <a href=\"https:\/\/drive.google.com\/file\/d\/1SB70if-k-eiA3vU_vlpoBgSU3_7xxwhG\/view?usp=sharing\">Link ini<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Dengan menggunakan fungsi FFT di Excel dan menggunakan Macro Excel, kita dapat menghitung spektrum dari data seri waktu (time series). Sintaks Macro nya dapat dilihat sbb: &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; fft-macro &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; Sub &hellip; <a class=\"readmore\" href=\"https:\/\/dosen.unila.ac.id\/ahmadzakaria\/2024\/10\/02\/menghitung-spektrum-data-seri-waktu-menggunakan-fft-macro-excel\/\">Continue Reading &rarr;<\/a><\/p>\n","protected":false},"author":21,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1170","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/dosen.unila.ac.id\/ahmadzakaria\/wp-json\/wp\/v2\/posts\/1170"}],"collection":[{"href":"https:\/\/dosen.unila.ac.id\/ahmadzakaria\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dosen.unila.ac.id\/ahmadzakaria\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dosen.unila.ac.id\/ahmadzakaria\/wp-json\/wp\/v2\/users\/21"}],"replies":[{"embeddable":true,"href":"https:\/\/dosen.unila.ac.id\/ahmadzakaria\/wp-json\/wp\/v2\/comments?post=1170"}],"version-history":[{"count":3,"href":"https:\/\/dosen.unila.ac.id\/ahmadzakaria\/wp-json\/wp\/v2\/posts\/1170\/revisions"}],"predecessor-version":[{"id":1175,"href":"https:\/\/dosen.unila.ac.id\/ahmadzakaria\/wp-json\/wp\/v2\/posts\/1170\/revisions\/1175"}],"wp:attachment":[{"href":"https:\/\/dosen.unila.ac.id\/ahmadzakaria\/wp-json\/wp\/v2\/media?parent=1170"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dosen.unila.ac.id\/ahmadzakaria\/wp-json\/wp\/v2\/categories?post=1170"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dosen.unila.ac.id\/ahmadzakaria\/wp-json\/wp\/v2\/tags?post=1170"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}