八度音是指在音响中人的可听频率范围内,通过对声谱进行一定的规则集中,使其达到与有限的几个频率点相对应的强度,从而便于记述的公约的记述形式。
使用1/3倍频程主要是由于人耳对声音的感知,其频率分辨率为频段而非单频,1/3倍频程曾被认为是一种符合人耳特性的频段划分方法,目前心理声学中提出了Critical
Band这样的频段划分方法,据说符合人耳的特性,但1/3八度音还在广泛使用。
分析频谱时,对于连续频谱,分析某一频率点的声功率是没有意义的,所以有必要统计某一频带内的声功率。 在频带分割中,倍频和1/3倍频是常用的分割方法之一,都是比较恒定的带宽,例如1/3倍频的带宽为中心频率的23%。
声学和振动测量仪器中的倍频和1/3倍频滤波主要用于对噪声和振动进行频谱分析,它们是等百分比带宽滤波器,与人耳频谱分析特性相似。 在噪声测量中,使用1/3oct主要是噪声频率分布的更加直观的表示。 便于今后工作的开展。
百分比=(2^(m/2 )-2^(-m/2 ) ) *100%
其中m是几个八度,1/3个八度m等于1/3。
首先,为了了解1/3倍频程的分割方法,相关书籍和国标有公式和现成的数据表,然后将时域音响信号fft变换到频域,针对定义的每1/3倍频带的声压计算等效连续声压级。 这就是1/3倍频程的声压级。
函数[ g,f]=
OCT3spec(b,a,Fs,Fc,s,n );
% OCT3SPEC Plots a
one-third-octavefiltercharacteristics
%
oct3spec(b,a,Fs,Fc ) plotstheattenuationofthefilterdefined
by
%
bandaatsamplingfrequencyfs.fcisthecenterfrequency
of
%
the one-third-octave filter.theplotcoversonedecadeonboth
sides
%
办公自动化。
%
%
OCT3spec(b,a,Fs,Fc,' ANSI ',n ) superposes the ANSI Order-N
analog
%
specificationforcomparison.default isn=3。
%
%
oct3spec(b,a,Fs,Fc,' IEC ',n ) superposes the characteristics of
the
%
iec 61260 classnspecificationforcomparison.default isn=
1.
%
%
[G,f]=oct3spec(b,a,Fs,Fc ) returns two 512-point vectors
with
%
thegain(indb ) ingandlogarithmicallyspacedfrequenciesin
F.
%
theplotcanthenbeobtainedbysemilogx (f,g ) )。
%
%
See also OCT3DSGN,OCTSPEC,OCTDSGN。
% Author: Christophe
Couvreur,Faculte Polytechnique de Mons ()
Belgium )
%
couvreur@thor.fpms.ac.be
% Last modification:
sept.4、1997和11:00am。
%
参考:
%
[1]ansis1.1-1986(asa65-1986 ) :规范s
for
%
octave-bandandfractional-octave-bandanalogand
%
数字过滤器,1993
%
[2]iec61260(1995-08 ) :电子访问- -
Octave-Band and
%
Fractional-Octave-Band Filters,1995年。
nargin
4 )|(nargin6) )。
error('Invalide
number of input arguments.');
end
ansi =
0;
iec =
0;
if nargin
> 4
if
strcmp(lower(s),'ansi')
ansi = 1;
if nargin == 5
n = 3;
end
elseif
strcmp(lower(s),'cei') | strcmp(lower(s),'iec')
iec = 1;
if nargin == 5
n = 1
end
if (n < 0) | (n >
3)
error('IEC class must be 0, 1, or 2');
end
end
end
N =
512;
pi =
3.14159265358979;
F =
logspace(log10(Fc/10),log10(min(Fc*10,Fs/2)),N);
H =
freqz(B,A,2*pi*F/Fs);
G =
20*log10(abs(H));
% Set output
variables
if nargout ~=
0
g = G; f =
F;
return
end
% Generate the
plot
if (ansi)
% ANSI Order-n specification
f =
logspace(log10(Fc/10),log10(Fc*10),N);
f1 =
Fc/(2^(1/6));
f2 =
Fc*(2^(1/6));
Qr =
Fc/(f2-f1);
Qd =
(pi/2/n)/(sin(pi/2/n))*Qr;
Af =
10*log10(1+Qd^(2*n)*((f/Fc)-(Fc./f)).^(2*n));
semilogx(F,G,f,-Af,'--');
legend('Filter',['ANSI order-' int2str(n)],0);
elseif (iec)
% CEI specification
semilogx(F,G);
hold
on
if n ==
0
tolup = [
.15 .15 .15 .15 .15 -2.3 -18.0 -42.5 -62 -75 -75
];
tollow = [ -.15 -.2 -.4 -1.1 -4.5 -realmax -inf -inf -inf -inf -inf
];
elseif n ==
1
tolup = [
.3 .3 .3 .3 .3 -2 -17.5 -42 -61 -70 -70 ];
tollow = [ -.3 -.4 -.6 -1.3 -5 -realmax -inf -inf -inf -inf -inf
];
elseif n ==
2
tolup = [
.5 .5 .5 .5 .5 -1.6 -16.5 -41 -55 -60 -60 ];
tollow = [ -.5 -.6 -.8 -1.6 -5.5 -realmax -inf -inf -inf -inf -inf
];
end
% Reference
frequencies in base 2 system
f = Fc * [1 1.02676
1.05594 1.08776 1.12246 1.12246 1.29565 1.88695
...
3.06955
5.43474 NaN ];
f(length(f)) =
realmax;
ff = Fc * [1 0.97394
0.94702 0.91932 0.89090 0.89090 0.77181 0.52996
...
0.32578
0.18400 NaN ];
ff(length(ff)) =
realmin;
semilogx(F,G,f,tolup,'--');
semilogx(F,G,f,tollow,'--');
semilogx(F,G,ff,tolup,'--');
semilogx(F,G,ff,tollow,'--');
hold
off
legend('Filter',['IEC
class ' int2str(n)],0);
else
semilogx(F,G);
end
xlabel('Frequency
[Hz]'); ylabel('Gain [dB]');
title(['One-third-octave filter: Fc
=',int2str(Fc),' Hz, Fs = ',int2str(Fs),' Hz']);
axis([Fc/10 Fc*10 -80
5]);
grid on
function [B,A] =
oct3dsgn(Fc,Fs,N);
%
OCT3DSGN
Design of a one-third-octave filter.
%
[B,A] = OCT3DSGN(Fc,Fs,N) designs a digital 1/3-octave filter
with
%
center frequency Fc for sampling frequency Fs.
%
The filter is designed according to the Order-N
specification
%
of the ANSI S1.1-1986 standard. Default value for N is
3.
%
Warning: for meaningful design results, center frequency
used
%
should preferably be in range Fs/200 < Fc
< Fs/5.
%
Usage of the filter: Y = FILTER(B,A,X).
%
%
Requires the Signal Processing Toolbox.
%
%
See also OCT3SPEC, OCTDSGN, OCTSPEC.
% Author: Christophe
Couvreur, Faculte Polytechnique de Mons (Belgium)
%
couvreur@thor.fpms.ac.be
% Last modification:
Aug. 25, 1997, 2:00pm.
%
References:
%
[1] ANSI S1.1-1986 (ASA 65-1986): Specifications
for
%
Octave-Band
and Fractional-Octave-Band Analog and
%
Digital Filters, 1993.
if (nargin
> 3) | (nargin < 2)
error('Invalide
number of arguments.');
end
if (nargin ==
2)
N =
3;
end
if (Fc
> 0.88*(Fs/2))
error('Design not
possible. Check frequencies.');
end
% Design Butterworth
2Nth-order one-third-octave filter
% Note: BUTTER is
based on a bilinear transformation, as suggested in
[1].
pi =
3.14159265358979;
f1 =
Fc/(2^(1/6));
f2 =
Fc*(2^(1/6));
Qr =
Fc/(f2-f1);
Qd =
(pi/2/N)/(sin(pi/2/N))*Qr;
alpha = (1 +
sqrt(1+4*Qd^2))/2/Qd;
W1 =
Fc/(Fs/2)/alpha;
W2 =
Fc/(Fs/2)*alpha;
[B,A] = butter(N,[W1,W2]);
function [p,f] =
oct3bank(x);
% OCT3BANK Simple
one-third-octave filter bank.
%
OCT3BANK(X) plots one-third-octave power spectra of signal vector
X.
%
Implementation based on ANSI S1.11-1986 Order-3
filters.
%
Sampling frequency Fs = 44100 Hz. Restricted
one-third-octave-band
%
range (from 100 Hz to 5000 Hz). RMS power is computed in each
band
%
and expressed in dB with 1 as reference level.
%
%
[P,F] = OCT3BANK(X) returns two length-18 row-vectors
with
%
the RMS power (in dB) in P and the corresponding preferred
labeling
%
frequencies (ANSI S1.6-1984) in F.
%
%
See also OCT3DSGN, OCT3SPEC, OCTDSGN, OCTSPEC.
% Author: Christophe
Couvreur, Faculte Polytechnique