Question: 3/6 MAE 2381 S1S Homework 2, Key Assignment, is due at 10AM March 7,2018 3 Discrete Fourier Analysis .75 s a) Discretize y(r) (y(ron given

 3/6 MAE 2381 S1S Homework 2, Key Assignment, is due at

3/6 MAE 2381 S1S Homework 2, Key Assignment, is due at 10AM March 7,2018 3 Discrete Fourier Analysis .75 s a) Discretize y(r) (y(ron given in problem 2 to y, y 2, yJ, N over the interval 4.0 to 3 ,y for a time increment05 s. What is M? The table below will guide your calculation o L. ie, one frequency component. Notation same as texthook, DFT Eq 2 336 ed, 2.38 5" ed trr)ytr1 Perform the sum and scale for sinusoidal amplitude as indicated in the corrected textbook DFT equation. b) MatL AB code for a DFT is given below. You need to enter the total number of "data" points, time and signal data from the table above in the areas marked with (provide value). You may work froma script or in the command window % DFT written in mostly standard code format for any language N (provide value) %%%%%%%%%%% Section 1 % ntalize variables, enter data confirm correct values entered % number of data signal samples %create vector (1p array) containing the N sampling Smesest % find dt pro de values) t112 t3 IN : % create time index vector (1D array) (Matlab only code) yN I: % create vector1D array) contaning the N signal values y(ran yt-lpronde values) y1 y2 y3 % review t and signal values create data table rMatab only code) trme-table . [r %%%%%%%%%%% Seton 2% calculate each coeficient Y(k) Store resuts of alculatos a ve fork 0 (N 2-1) %frequereyndex controllod Tor" la saves amplitude (magnitude) for each frequency yt) % table of ndices discrete times and associated signal amplitudes (for data plot) % temporary variable to hold running sum % tme index controlled-for" loop Set up to access each signal value n vector (1D array)t for r-ON-1) %-r test for k not zero. DC value (f-0-k) calculated separately Nr h rexpl- 2rxni: x funring sum of scaed ytrFFr+1) for 1 frequency. N times eise % alternate instruction for-ir test notrue (k- % running sum of scaled yttr+1)'s, k . 0 f (DC), N time values end of "ir block % end of time index controled for loop Yfall(k+1)= absIYn store magnitudes in a vector (1D array), contains N 2 magnitudes (real numbers) end %%%%%%%%%%%Section 3 % create vector rray) containing le sequences % find fundamental frequency, df % create % create discrete index vector (1 D array) Matlab only code) vector (1D array) % table for frequency spectrum (Matlab only code) freq table -f Yfailn % tab leof indices discrete frequencies and associated magnitudes % store tables in asc text fies save freq table txt-ascil freq table%(Matlab only code) save time-table txt-asci time table%/Matlab only code c) Use Excel or MatLAB to find the FFT for the discrete data set yl, y2, y3 part a). Scale FFT results for half plane. Submit copy of Excel worksheet or MatLAB code and output d) Calculate the percentage enor in the DFT magnitude as compared with the Fourier series magnitude e) On one graph, plot the spectrums of the DFT coefficient magnitudes, the FFT magnitudes, and the magnitudes of the Fourier coefficients from problem 2 part b). Magnitudes can be calculated for Fourier series with (A.+ B,)05 and (real(Y)+imag( X/) 15 or a program function for DFT and FFT 3/6 MAE 2381 S1S Homework 2, Key Assignment, is due at 10AM March 7,2018 3 Discrete Fourier Analysis .75 s a) Discretize y(r) (y(ron given in problem 2 to y, y 2, yJ, N over the interval 4.0 to 3 ,y for a time increment05 s. What is M? The table below will guide your calculation o L. ie, one frequency component. Notation same as texthook, DFT Eq 2 336 ed, 2.38 5" ed trr)ytr1 Perform the sum and scale for sinusoidal amplitude as indicated in the corrected textbook DFT equation. b) MatL AB code for a DFT is given below. You need to enter the total number of "data" points, time and signal data from the table above in the areas marked with (provide value). You may work froma script or in the command window % DFT written in mostly standard code format for any language N (provide value) %%%%%%%%%%% Section 1 % ntalize variables, enter data confirm correct values entered % number of data signal samples %create vector (1p array) containing the N sampling Smesest % find dt pro de values) t112 t3 IN : % create time index vector (1D array) (Matlab only code) yN I: % create vector1D array) contaning the N signal values y(ran yt-lpronde values) y1 y2 y3 % review t and signal values create data table rMatab only code) trme-table . [r %%%%%%%%%%% Seton 2% calculate each coeficient Y(k) Store resuts of alculatos a ve fork 0 (N 2-1) %frequereyndex controllod Tor" la saves amplitude (magnitude) for each frequency yt) % table of ndices discrete times and associated signal amplitudes (for data plot) % temporary variable to hold running sum % tme index controlled-for" loop Set up to access each signal value n vector (1D array)t for r-ON-1) %-r test for k not zero. DC value (f-0-k) calculated separately Nr h rexpl- 2rxni: x funring sum of scaed ytrFFr+1) for 1 frequency. N times eise % alternate instruction for-ir test notrue (k- % running sum of scaled yttr+1)'s, k . 0 f (DC), N time values end of "ir block % end of time index controled for loop Yfall(k+1)= absIYn store magnitudes in a vector (1D array), contains N 2 magnitudes (real numbers) end %%%%%%%%%%%Section 3 % create vector rray) containing le sequences % find fundamental frequency, df % create % create discrete index vector (1 D array) Matlab only code) vector (1D array) % table for frequency spectrum (Matlab only code) freq table -f Yfailn % tab leof indices discrete frequencies and associated magnitudes % store tables in asc text fies save freq table txt-ascil freq table%(Matlab only code) save time-table txt-asci time table%/Matlab only code c) Use Excel or MatLAB to find the FFT for the discrete data set yl, y2, y3 part a). Scale FFT results for half plane. Submit copy of Excel worksheet or MatLAB code and output d) Calculate the percentage enor in the DFT magnitude as compared with the Fourier series magnitude e) On one graph, plot the spectrums of the DFT coefficient magnitudes, the FFT magnitudes, and the magnitudes of the Fourier coefficients from problem 2 part b). Magnitudes can be calculated for Fourier series with (A.+ B,)05 and (real(Y)+imag( X/) 15 or a program function for DFT and FFT

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!