Digital Signal Processing Reference
In-Depth Information
1
0.5
0
-0.5
-1
0
5
10
15
20
25
30
35
40
45
50
l o
1
0.5
0
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
: / S o
Bild 20-46 Schätzungen der Zeit-AKF und der Leistungsübertragungsfunktion zum System H 2 ( z ) mit
dem Programm dsplab15_1
% Estimation of the auto-correlation function (acf) and computation
% of the power density spectrum (pds) using the estimated acf and
% the dft with zero-padding
% dsplab15_1.m * mw * 06/12/2008
M = 51; % number of acf coefficients
N = 1e6; % number of signal samples per block
Ndft = 256; % dft length
b = [0.06 0.12 0.06]; % numerator coefficients H2
a = [1 -1.3 0.845]; % denominator coefficients H2
% b = [0.845 -1.3 1]; % numerator coefficients H3
% a = [1 -1.3 0.845]; % denominator coefficients H3
x = randn(1,N); % normally distributed random signal
y= filter(b,a,x); % filtering
Ryy = xcorr(y,M,'unbiased'); % auto-correlation sequence
%% Compute pds from acf estimates with zero-padding to length Ndft
Syy = fft([Ryy zeros(1,Ndft-2*M+1)]);
Syy = abs(Syy);
% compensate for numerical impairments
%% Compute analytical values
h = impz(b,a,M); % impulse response
Rhh = conv(h,flipud(h)); % time acf
Phi = abs(freqz(b,a,Ndft,'whole')').^2; % power transmission function
%% Graphics
FIG1=figure('Name','dsplab15_1: estimates of acf and
pds','NumberTitle','off',...
'Units','normal','Position',[.4 .4 .45 .45]);
subplot(2,1,1), plot(0:M-1,Rhh(M:2*M-1)/Rhh(M),0:M-
1,Ryy(M+1:2*M)/Ryy(M+1),'o'), grid
axis([0 M-1 -1 1]);
xlabel('{\itl} \rightarrow'),ylabel('{\itR}[{\itl}] / {\itR}[0]
\rightarrow')
hold on
Search WWH ::




Custom Search