• 大小: 3KB
    文件类型: .m
    金币: 1
    下载: 0 次
    发布日期: 2021-05-20
  • 语言: Matlab
  • 标签: matlab  信道化  

资源简介

实现对信号的信道化接收。且具有良好的可拓展性,可修改信道数、滤波器阶数、自由改变输入信号

资源截图

代码片段和文件信息


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          parameters
m=16; %channels
N=8192; %data length
fs=512; %sampling rate
f1=N/m*7+35; %freq. of signal_1
f2=N/m*13-20; %freq. of signal_2
x1=cos(2*pi*(0:(N-1))*f1/N);
x2=3*cos(2*pi*(0:(N-1))*f2/N);
clength=18;



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% input signal
xx=x1+x2;              %signal
figure(1)
subplot(211)
plot(xx(1:200));
grid
title(‘input signal‘)
ww=kaiser(fs8)‘;
ww=ww/sum(ww);
subplot(212)
plot((0:(N-1))/Nabs(fft(xx))); %Spectrum of input signal
grid on
title(‘Spectrum of input signal‘)
hold on 
a=0.5/m:1/m:1+0.5/m;
for i=1:m
plot([a(i) a(i)][0 20000]‘r--‘) %divide into m_channels
end
hold off

%%%%%%%%%%%%%%%%%%%%%%%%% M_path resampled signal


xs=zeros(mN/m+m);
for p=1:m
for q=1:N/m
xs(pq)=xx(m*(q-1)+m-p+1);
end
end


%%%%%%%%%%%%%%%%%%%%%%%%%%%%% original LP_filter
dh=m*clength; %lenghe of LP_filter
h=fir1(dh-11/m); %coefficient vector of LP_filter
[Hw]=freqz(h1);
figure(2)
subplot(211)
plot(h) %Impulse Response
grid
title(‘Impulse Response: Prototype Filter‘)
xlabel(‘Normalized time nT/T‘)
ylabel(‘Amplitude‘)
subplot(212)
plot(w/pi20*log10(abs(H))); %amplitude-frequency response
grid
title(‘Amplitude-frequency Response‘)
xlabel(‘Frequency ‘)
ylabel(‘|H|db‘)
%%%%%%%%%%%%%%%%%%% channels
gg=zeros(mdh);
plot((-0.5:1/512:.5-1/512)*2*pifftshift(20*log10(0.000001+abs(fft(h512)))))
grid on
title(‘m channels‘)
axis([-pi pi 

评论

共有 条评论