Upload
others
View
3
Download
0
Embed Size (px)
Citation preview
รายงาน
ปฎบตการท 11 : การประมวลสญญาณในโดเมน
ความถดวยโปรแกรม LabVIEWผจดทำา
นาย ธนพล ทาระพนธ 09571223 นาย ปยวฒน ศลาอาสน 09571256
เสนอ
ผชวยศาสตราจารย ดร.ชเกยรต สอดศร
รายงานนเปนสวนหนงของวชา 318326 การประยกตคอมพวเตอรสำาหรบวศวกร
(Computer Application for Engineers)หนา 1 จาก 17
ภาคการศกษาปลาย ปการศกษา 2559ปฏบตการท 11
การประมวลสญญาณในโดเมนความถดวยโปรแกรม LabVIEW
จดประสงค
ศกษาการแปลง Discrete Fourier Transform (DFT) และ Fast Fourier Transform (FFT) และ Short-time Fourier Transform ดวยการโปรแกรมใน LabVIEW
งานทมอบหมาย4.1) Build a VI to show the difference between the
FFT and STFT transformations on a 512-point composite signal consisting of the following four components added together:(i) a 215 Hz sinusoidal signal sampled at 1200 Hz, (ii) a 125 Hz sinusoidal signal sampled at 1200 Hz with a phase shift of 90 degrees,(iii) a chirp sampled at 1200 Hz with linearly increasing frequency from 150 Hz to 200 Hz, and (iv) an impulse signal having an amplitude of 5 at the 75th and 240th samples. Generate the composite signal with and without using the MathScript feature. For each case, compute and display both FFT and STFT. Observe the STFT output for varying levels of frequency bins and time window widths. Also, compare the STFT output for different user-defined windows such as Hanning and Humming windows.
หนา 2 จาก 17
Block Diagram จากการสรางไฟล Composite Signal
รปท 1 แสดง Block Diagram ของไฟล Composite Signal
กราฟ Output ทได
หนา 3 จาก 17
รปท 2 แสดงกราฟ Output ของไฟล Composite Signal
Block Diagram จากการสรางไฟล แสดงความแตกตางระหวาง FFT และ STFT
หนา 4 จาก 17
รปท 3 Block Diagram แสดงความแตกตางระหวาง FFT และ STFT
กราฟ Output ทไดท Time Window width #1 = 16 , # of Frequency bin #1 = 512, Time Window width #2 = 16 , # of Frequency bin #2 = 512 จะไดกราฟ
หนา 5 จาก 17
ท Time Window width #1 = 32 , # of Frequency bin #1 = 512, Time Window width #2 = 32 , # of Frequency bin #2 = 512 จะไดกราฟ
ท Time Window width #1 = 64 , # of Frequency bin #1 = 512, Time Window width #2 = 64 , # of Frequency bin #2 = 512 จะไดกราฟ
หนา 6 จาก 17
ท Time Window width #1 = 128 , # of Frequency bin #1 = 512, Time Window width #2 = 128 , # of Frequency bin #2 = 512 จะไดกราฟ
หนา 7 จาก 17
ท Time Window width #1 = 256 , # of Frequency bin #1 = 512, Time Window width #2 = 256 , # of Frequency bin #2 = 512 จะไดกราฟ
ท Time Window width #1 = 512 , # of Frequency bin #1 = 512, Time Window width #2 = 512 , # of Frequency bin #2 = 512 จะไดกราฟ
หนา 8 จาก 17
4.2) Build a VI to show the difference between the FFT and STFT transformations on a 512-point composite signal consisting of the following four components added together: (i) a 175 Hz sinusoidal signal sampled at 1500Hz, (ii) a 225 Hz sinusoidal signal at 1500 Hz with a phase shift of 90 degrees, (iii) a chirp signal sampled at 1500 Hz with linearly increasing frequency from 350-425 Hz, and (iv) an impulse signal having an amplitude of 10 at the 165th and 235th samples. Generate the composite signal with and without using the MathScript feature. For each case, compute and display both FFT and STFT. Observe the STFT output for varying levels of frequency bins and time window widths. Also, compare the STFT for different user-defined windows such as Chebychev and Kaiser-Bessel windows.
หนา 9 จาก 17
Block Diagram จากการสรางไฟล Composite Signal
รปท 4 แสดง Block Diagram ของไฟล Composite Signal
กราฟ Output ทได
รปท 5 แสดงกราฟ Output ของไฟล Composite Signal
Block Diagram จากการสรางไฟล แสดงความแตกตางระหวาง FFT และ STFT
หนา 10 จาก 17
รปท 6 Block Diagram แสดงความแตกตางระหวาง FFT และ STFT
กราฟ Output ทไดท Time Window width #1 = 16 , # of Frequency bin #1 = 512, Time Window width #2 = 16 , # of Frequency bin #2 = 512 จะไดกราฟ
หนา 11 จาก 17
ท Time Window width #1 = 32 , # of Frequency bin #1 = 512, Time Window width #2 = 32 , # of Frequency bin #2 = 512 จะไดกราฟ
หนา 12 จาก 17
ท Time Window width #1 = 64 , # of Frequency bin #1 = 512, Time Window width #2 = 64 , # of Frequency bin #2 = 512 จะไดกราฟ
ท Time Window width #1 = 128 , # of Frequency bin #1 = 512, Time Window width #2 = 128 , # of Frequency bin #2 = 512 จะไดกราฟ
หนา 13 จาก 17
ท Time Window width #1 = 256 , # of Frequency bin #1 = 512, Time Window width #2 = 256 , # of Frequency bin #2 = 512 จะไดกราฟ
หนา 14 จาก 17
ท Time Window width #1 = 512 , # of Frequency bin #1 = 512, Time Window width #2 = 512 , # of Frequency bin #2 = 512 จะไดกราฟ
หนา 15 จาก 17
วเคราะหผลการทดลอง4.1). คอการรวมกนของสญญาณ 3 สญญาณ ไดแก 1. Sine
โดยให gain มความถ 215Hz และ 125 Hz ความถ sampling rate เปน 1200Hz และ n เปน 512 2.สญญาณ Chirp 3.สญญาณ Impulse แลวนำามาบวกกนและสรางเปน Sub vi ขนมา แลวนำามาเปน Input โดยเปรยบเทยบ FFT กบ STFT ซงจะตดสญญาณใหสนลงเพอวเคราะหซงมการตอ Hanning Window กบ Initialize Array เพอทำาให Window มความสมทมากขนเละจะขนกบคา STFT แลวจากนนนำาไปเปรยบเทยบกบสญญาณ FFT จากกราฟของ Output คา Time Window width ท 16 จะเหนเสนของสเปกตรมไดออนมากแตเมอเพมคา Time Window width ไปจนถง 512 เหนสเปกตรมไดชดเจนมากขน
4.2). เปนการรวมกนของสญญาณ 3 สญญาณ ไดแก 1.สญญาณ Sine Waveform เปนการสรางสญญาณของคาทตองการนำามาใชงานโดยกำาหนดให gain ความถเทากบ 175Hz และ 225Hz ความถ sampling rate คอ 1500Hz และ number of sample คอ 512 2.สญญาณ Chirp 3.สญญาณ Impulse โดยมการ delay 165 ตว และ 240 ตว แลวนำามาบวกกนรวมเปน sub VI แลวนำามาเปน Input โดยเปรยบเทยบ FFT กบ STFT ซงในสวนของ STFT จะนำาไปเปรยบเทยบ Chebyshev Window กบ Kaiser-Bessel Window พบวาลกษณะกราฟทไดมลกษณะเหมอนกนแต Kaiser-Bessel
หนา 16 จาก 17
Window จะเหนแถบของสเปกตรมไดชดเจนมากกวาของ Chebyshev
Window
สรปผลการทดลองพบวา Output ทไดนนมความถทไมคงทจงทำาใหเสนสเปกตรมหลายเสน ซงคา Window ทเรากำาหนดมผลตอเสนสเปกตรมโดยทคา Window เลกจะสามารถจบการเปลยนแปลงได โดยทคาของ Window นอยๆ จะทำาให การเปลยนแปลงกบเวลาดขน และในทางตรงกนขามคา Window ทมากเกนไปจะทำาใหไมสามารถจบการเปลยนแปลงกบเวลาได
หนา 17 จาก 17