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

  • 大小: 5KB
    文件類(lèi)型: .m
    金幣: 1
    下載: 0 次
    發(fā)布日期: 2021-06-15
  • 語(yǔ)言: Matlab
  • 標(biāo)簽: DSSS??直擴(kuò)??2PSK??

資源簡(jiǎn)介

直接擴(kuò)頻序列擴(kuò)頻,2PSK調(diào)制,程序自己寫(xiě)的,分享給大家,為了更好的模擬模擬信號(hào),過(guò)低通用的卷積而沒(méi)有用IFFT,由于采樣點(diǎn)數(shù)過(guò)多,卷積耗時(shí)較長(zhǎng),請(qǐng)耐心等待:-)

資源截圖

代碼片段和文件信息

clear;
clc;
close?all;


%%?????基帶信號(hào)產(chǎn)生?擴(kuò)頻碼產(chǎn)生

N=20;?????????????????????????%碼元個(gè)數(shù)?????????????????????????
xn1=round(rand(1N));?????????%單極性碼,碼元周期為10ms,頻率為100Hz?
xn1=1-2*xn1;??????????????????%雙極性碼???
Xn1=zeros(1200000);
Cn1=zeros(1200000);
for?i=1:20
????for?j=1:10000
????????Xn1(j+10000*(i-1))=xn1(i);??????%采樣,采樣周期為0.001ms,一個(gè)基帶信號(hào)碼元采樣10000次,頻率為1000000Hz
????end
end
cn1=m_creat([1?0?0?0?0?1?0?0?0?1][0?0?0?0?0?0?0?0?1]);??%511擴(kuò)頻碼,雙極性碼,碼元周期為1ms頻率為1000Hz
cn11(1:200)=cn1(1:200);
for?i=1:200
????for?j=1:1000
????????Cn1(j+1000*(i-1))=cn11(i);
????end
end
figure?(1);
subplot(211);
plot(0:200/200000:200-200/200000Xn1);
axis([0?200?-1.5?1.5]);
xlabel(‘ms‘)
title(‘基帶信號(hào)‘);
f_Xn1=fft(Xn11000000)*1e-6;
subplot(212);
plot(0:1000000-1abs(f_Xn1));
axis([0?4000?0?0.1]);
xlabel(‘Hz‘);
title(‘基帶信號(hào)頻譜‘);
figure?(2);
subplot(211);
plot(0:200/200000:200-200/200000Cn1);
axis([0?200?-1.5?1.5]);
xlabel(‘ms‘);
title(‘m序列‘);
f_Cn1=fft(Cn11000000)*1e-6;
subplot(212);
plot(0:1000000-1abs(f_Cn1));
axis([0?4000?0?0.1]);
xlabel(‘Hz‘);
title(‘m序列頻譜‘);

%%???擴(kuò)頻

Zn1=Xn1.*Cn1;
figure(3);
subplot(211);
plot(0:200/200000:200-200/200000Zn1);
axis([0?200?-1.5?1.5]);
xlabel(‘ms‘)
title(‘?dāng)U頻序列‘);
f_Zn1=fft(Zn11000000)*1e-6;
subplot(212);
plot(0:1000000-1abs(f_Zn1));
axis([0?4000?0?0.1]);
xlabel(‘Hz‘)
title(‘?dāng)U頻序列頻譜‘);

%%???過(guò)低通

Wp=2*pi*990/1000000;??%通帶邊界頻率
Ws=2*pi*1010/1000000;?%阻帶截止頻率
Wc=(Wp+Ws)/2/pi;????%通帶截止頻率
Bt=Ws-Wp;??????%過(guò)渡帶寬
N=round(8*pi/Bt);??%濾波器長(zhǎng)度
LPF=fir1(N-1Wchanning(N));???%漢寧窗
figure(4);
plot(0:200000-1LPF);
title(‘漢寧窗‘)
Zn1_LPF=conv(LPFZn1);
Zn1_LPF1=Zn1_LPF(100000:300000-1);???%消除時(shí)移過(guò)低通之后的信號(hào)
figure(5);
subplot(211);
plot(0:200/200000:200-200/200000Zn1_LPF1);
xlim([0?200]);????%設(shè)置x軸范圍
xlabel(‘ms‘);
title(‘過(guò)低通之后的擴(kuò)頻序列‘);
f_Zn1_LPF1=fft(Zn1_LPF11000000)*1e-6;
subplot(212);
plot(0:1000000-1abs(f_Zn1_LPF1));
axis([0?4000?0?0.1]);
title(‘過(guò)低通之后的擴(kuò)頻序列頻譜‘);

%%??調(diào)制

Carrier=cos(2*pi*20000/1000000*(0:199999));???%載波頻率為20000Hz
Zn1_Mod=Zn1_LPF1.*Carrier;???%已調(diào)信號(hào)
%Zn1_Mod=Zn1.*Carrier;???%已調(diào)信號(hào)
figure(6);
subplot(211);
plot(0:200/200000:200-200/

評(píng)論

共有 條評(píng)論

相關(guān)資源