Digital Signal Processing Reference
In-Depth Information
Tabelle 18-6
Inneres Rauschen eines Systems 2. Ordnung, siehe Bild 18-4, mit Zähler-
koeffizienten b 0 = 0.9375, b 1 = b 2 = 0, Polradius
; = 0.95, Polphase
: =
30° und Wortlängenverkürzung durch Runden
Wortlänge in Bits
10
12
14
16
Leistung des inneren
Rauschens in dB
80.1
Programmbeispiel 18-3 Untersuchung des inneren Rauschens eines Systems 2. Ordnung
% Estimation of round-off noise in 2nd order block with quantized
% coefficients and fixed-point arithmetic
% used functions: filt2_rc.m
% dsplab18_2.m * mw * 16Apr2011
w = 16; LSB = 2^(-w+1);
% word length
rho = .95; phi = 30*pi/180;
% pole magnitude and phase
N = 1e5;
% number of simulation cycles
c = 2^(-16+8);
% noise scaling factor
% Filter parameters
b = [.9375 0 0]; % numerator coefficients
a = [1 -2*rho*cos(phi) rho^2]; % denominator coefficients
si = [0; 0]; % initial values for state space variables
bq = LSB*round(b/LSB); % quantized coefficients
aq = [1 2*LSB*round((a(2)/2)/LSB) LSB*round(a(3)/LSB)];
% Input signal - noise
x = 2*rand(1,N)-ones(1,N); % uniformly distributed in ]-1,1[
xq = LSB*round(c*x/LSB); % scaled and quantized input signal
% referenz system : 2nd order block with MATLAB default arithmetic
[yref,sref] = filter(bq,aq,xq,si);
% 2nd order block with fixed-point arithmetic
[y,s,OC] = filt2_rc(bq,aq,xq,si,w); % rounding, two's-complement overf.
fprintf( '\nOverflow counter = %g\n' ,OC) % indicate overflow
r = yref - y; % error signal
Pr = sum(r.^2)/length(r); PrdB = 10*log10(Pr); % power estimates
% Theoretical estimation of noise power at the filter output
Ri0 = (1+aq(3))/((1-aq(3))*((1+aq(3))^2-(aq(2))^2)); % noise figure
Nb = length(find(bq));
% number of non-zero numerator coefficients
Na = 1;
if aq(2)~=0
Na = 5;
end
NP = (Nb+Na)*Ri0*(LSB^2)/12;
% Display results
fprintf( 'Pole: rho = %g Omega = %g°\n' ,sqrt(a(3)),...
(180/pi)*acos(-aq(2)/(2*sqrt(a(3)))))
fprintf( 'Round-off noise figure: %+6.2f dB\n' ,10*log10(Ri0))
fprintf( 'Round-off noise power \n' )
fprintf( '- Theory : %+6.2f dB\n' ,10*log10(NP))
fprintf( '- Estimation : %+6.2f dB\n' ,PrdB)
Search WWH ::




Custom Search