Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Matlab Script for ADC SNR Post-Processing

Status
Not open for further replies.

pseudockb

Member level 5
Joined
Aug 4, 2004
Messages
89
Helped
8
Reputation
16
Reaction score
1
Trophy points
1,288
Activity points
908
adc snr matlab

Hi, I have some question regarding the script I got. Part of it is as follows:

.
.
.
% Create the minimum, 4-term Blackman-Harris window for FFT
pwr_win=0;
for i=1:Nt %where Nt is the no. of FFT bins
window(1,i)=0.35875-0.48829*cos(2*pi*(i-1)/Nt)+0.14128*cos(4*pi*(i-1)/Nt)-0.01168*cos(6*pi*(i-1)/Nt);
pwr_win=pwr_win+window(1,i)*window(1,i);
end

xn=xn.*window; %add window
yn=fft(xn); %DFT
pyy=yn.*conj(yn)/Nt/pwr_win; %compute power spectrum (1~Nt)
pyy(2:(Nt/2))=2*pyy(2:(Nt/2)); %add the negative freq. to positive freq.
pyy((Nt/2+2):Nt)=[]; %eliminate the negative freq.
.
.
.

Could someone please explain to me what is the use of pwr_win? I don't quite understand what "pyy=yn.*conj(yn)/Nt/pwr_win;" is trying to do. Please help me. Thanks!
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top