Mathcad - Hw-5

Mathcad - Hw-5 - Step #1 : Defineing the Finite Length...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
Step # 1 : Defineing the Finite Length Sequence Sec 1 = Hz 1 = N 64 = N point Sequence dB 1 = dBW 1 = f s 1000 = Sampling Frequency -Hz f s N 15.625 Hz = Analog spectrum Resolution f s 2 500 = Maximum Positive Frequency N 2 1 + 33 = Positive samples (Independent samples) Amp READPRN "C:\Documents and Settings\kn16\Desktop\PavanDSP5\DSPHW5\HW5_data.txt" ( ) = n 0 N 1 - .. = bin 0 N 1 - .. = k 0 N 1 - .. = freq bin bin f s N = x k 2 π N k = i 1 - = 0 20 40 60 2 - 1 - 0 1 2 Input Signal Amplitude Amp n n
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
STEP 2 : DFT of x[n] X k 0 N 1 - m Amp m e i - x m k = = P_X k 20 log X k ( 29 20 log X k ( 29 80 - if 80 - otherwise = 0 200 400 600 800 1 10 3 × 10 - 0 10 20 30 DFT-Leakage Effect Analog Frequency-Hz Power in db P_X k k f s N
Background image of page 2
max1 max P_X ( ) = max1 26.839 = P_X k P_X k max1 - = 0 200 400 600 800 1 10 3 × 30 - 20 - 10 - 0 Normalized Power Spectrum frequency in hertz Magnitude in db P_X k k f s N
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
STEP 3: PEAK FINDING ALGORITHM !!! STEP a--- Find the max spectrum power using a simple maximum seeking function MFFT1 max P_X ( ) = maximum power in the spectrum MFFT1 0 = STEP b--- Program for finding the index of the of all spectral component exceeding LIM LIM1 MFFT1 4 dB - = LIM1 4 - = Max1 i 0 U 0 U i j i i 1 + P_X j LIM1 if j 0 rows P_X ( ) 2 .. for U = NOTICE THAT I AM ONLY SCANNING THE POSITIVE FREQUENCIES Vector containing the index of spectral components that meets the condition set by LIM Max1 20 21 = FREQUENCIES FOUND CORRESPONDING POWER f_1 f s N 20 = f_1 312.5Hz = P_X 20 1.066 - 10 13 - × dBW =
Background image of page 4
STEP c--- Display the spectrum around the peaks found in step b 200 400 600 800 1 10 3 × 40 - 30 - 20 - 10 - 0 Leakage Effect (Zoom) Analog Frequency-Hz Power in dBW
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 27

Mathcad - Hw-5 - Step #1 : Defineing the Finite Length...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online