91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 3KB
    文件類型: .m
    金幣: 1
    下載: 0 次
    發布日期: 2021-05-28
  • 語言: Matlab
  • 標簽:

資源簡介

參考信號為寬帶與窄帶信號,利用FxLMS算法進行控制,可作為參考程序進行修改。demo1。

資源截圖

代碼片段和文件信息

%?ANC?of?the?primary?noise?with?both?broadband?signal?and?narrowband?signal
Fs=8000;???%Sampling?frequency
%?Design?the?Secondary?Path?TF
Fd=fdesign.lowpass(‘NF3db‘220.4);
Hd=design(Fd‘Fir‘);
%?Hd.Numerator=Hd.Numerator/norm(Hd.Numerator);
%?Estimaiting?the?Secondary?Path?TF
ntrS=10000;?s=randn(1ntrS);
dS=filter(Hd.Numerator1s)+sqrt(0.1)*randn(1ntrS);
M=31;??muS=0.01;
lms=dsp.LMSFilter(‘StepSize‘‘M‘‘StepSizeSource‘‘Input?port‘);
[y?errw]?=?lms(s‘dS‘muS);
%?Design?the?Primary?Path?TF
Fd2=fdesign.lowpass(‘NF3db‘420.4);
Hd2=design(Fd2‘FIR‘);
%?The?noise?to?be?cancelled
ntrW=30000;?n=1:ntrW;
%?Sine?components?angular?frequencise?and?DFCs
wsin=[0.03?0.06?0.09];
ar=[2?1?0.5];
br=[-1?-0.5?0.1];
%?Generate?the?narrowband?component
narrow=zeros(1ntrW);
for?k=1:length(wsin)
????narrow=narrow+ar(k)*cos(pi*wsin(k)*n)+br(k)*sin(pi*wsin(k)*n);
end
%?Wideband?component?with?variance?1
wide=randn(1ntrW);
white=1;???%?Leave?the?wideband?noise?white
if?white~=1
????Fdbp=fdesign.bandpass(0.010.050.150.2560160);
????Hdbp=design(Fdbp‘equiripple‘);
????wide=filter(Hdbpwide);
????wide=wide/sqrt(var(wide));
end
x=narrow+wide;
%?Filter?the?primary?noise?through?the?primary?path?TF?and?additional?noise
%?with?variance?0.1;
d=filter(Hd2.Numerator1x)+sqrt(0.1)*randn(1ntrW);
%?Calculate?the?PSD?for?the?plot
Hp=spectrum.welch;
Hp.SegmentLength=4444;
Pd=psd(Hpd(ntrW-10000:ntrW)‘NFFT‘8192‘Fs‘Fs);
%?Active?noise?control?using?the?FxLMS?a

評論

共有 條評論