双极性根升余弦信号qpsk_QPSK信号的调制和解调

该博客详细介绍了QPSK信号的解调过程,包括demodulation、匹配滤波、采样和决定阈值等步骤。通过MATLAB代码展示了I通道和Q通道的频谱变化,并最终得到了经过决策阈值后的星座图和二进制接收数据的频谱。
摘要由CSDN通过智能技术生成

1 %%---------------------------------------------------------------------------------------------------------------------------------------------------------2 %QPSK receiver3 %demodulation4 fori=1:zero*data+N5 Idem(i)=sum(i)*sqrt(2)*cos(2*pi*fc*t(i));6 Qdem(i)=sum(i)*(-sqrt(2)*sin(2*pi*fc*t(i)));7 end8 %matched filter9 mtf=rcosfir(rf,NT,zero,fs,'sqrt');10 Imat=conv(Idem,mtf);11 Qmat=conv(Qdem,mtf);12 %data selection13 fori=1:zero*data14 Isel(i)=Imat(i+N);15 Qsel(i)=Qmat(i+N);16 end17 %sampler%提取码元18 fori=1:data19 Isam(i)=Isel((i-1)*zero+1);20 Qsam(i)=Qsel((i-1)*zero+1);21 end22 %decision threshold23 threshold=0.2;24 fori=1:data25 ifIsam(i)>=threshold26 Ifinal(i)=1;27 else28 Ifinal(i)=-1;29 end30 ifQsam(i)>=threshold31 Qfinal(i)=1;32 else33 Qfinal(i)=-1;34 end35 end36 %parallel to serial37 fori=1:data38 ifrem (i,2)==139 ifIfinal(i)==140 final(i)=1;41 else42 final(i)=0;43 end44 else45 ifQfinal(i)==146 final(i)=1;47 else48 final(i)=0;49 end50 end51 end52 %%-----------------------------------------------------------------------------------------------------绘图53 figure(5)54 subplot(221);55 plot(20*log(abs(fft(Idem))));56 axis([0zero*data-200150]);57 grid on;58 title('spectrum of I-channel after demodulation');59 subplot(222);60 plot(20*log(abs(fft(Qdem))));61 axis([0zero*data+N-200150]);62 grid on;63 title('spectrum of Q-channel after demodulation');64 subplot(223);65 plot(20*log(abs(fft(Imat))));66 axis([0zero*data-400200]);67 grid on;68 title('spectrum of I-channel after matched filter');69 subplot(224);70 plot(20*log(abs(fft(Qmat))));71 axis([0zero*data-400200]);72 grid on;73 title('spectrum of Q-channel after matched filter');74 figure(6)75 subplot(221);76 plot(20*log(abs(fft(Isam))));77 axis([0data-40150]);78 grid on;79 title('spectrum of I-channel after sampler');80 subplot(222);81 plot(20*log(abs(fft(Qsam))));82 axis([0data-40150]);83 grid on;84 title('spectrum of Q-channel after sampler');85 subplot(223);86 plot(20*log(abs(fft(Ifinal))));87 axis([0data-40150]);88 grid on;89 title('spectrum of I-channel after decision threshold');90 subplot(224);91 plot(20*log(abs(fft(Qfinal))));92 axis([0data-40150]);93 grid on;94 title('spectrum of Q-channel after decision threshold');95 figure(7)96 plot(Isel,Qsel);97 axis([-1.61.6-1.61.6]);98 grid on;99 title('constellation of matched filter output');100 figure(8)101 plot(Isam,Qsam,'X');102 axis([-1.21.2-1.21.2]);103 grid on;104 title('constellation of sampler');105 figure(9)106 subplot(211)107 stem(final);108 axis([0data-22]);109 grid on;110 title('final received binary data');111 subplot(212)112 plot(20*log(abs(fft(final))));113 axis([0data0100]);114 grid on;115 title('aspectrum of final received binary data');

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值