2PSK数字信号的调制与解调 联系客服

发布时间 : 星期一 文章2PSK数字信号的调制与解调更新完毕开始阅读

参考文献

[1] 董邵平,陈世庚,王洋.数字信号处理基础[TN].哈尔滨:哈尔滨工业大学出版社,2003 [2] John G.Proakis,MasoudSalehi.Communication Systems

Engineering./www.phei.com.cn/,

2002

[3] 樊昌信,曹丽娜. 通信原理(第六版)[TN]. 北京:国防工业出版社, 2006 [4] 韩利华,王华.MATLAB电子仿真与应用[TN].北京:国防工业出版社, 2003

致谢

这次软件课程设计过程中,非常感谢我们的^^^^老师,从一开始的大框架的搭建,以及相关选题的决定过程中的指导。同样也感谢我的室友以及同学,他们在我的这次设计过程中给了我很大的帮助。

- 12 -

附录(见电子文档)

clc;

clear all; close all;

fs=8e5;%抽样频率 fm=20e3;%基带频率 n=2*(6*fs/fm);

final=(1/fs)*(n-1); fc=2e5; % 载波频率 t=0:1/fs:(final); Fn=fs/2;%耐奎斯特频率

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % 用正弦波产生方波

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% twopi_fc_t=2*pi*fm*t; A=1; phi=0;

x = A * cos(twopi_fc_t + phi); % 方波 am=1;

x(x>0)=am; x(x<0)=-1;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % 信源信号

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% figure(1) subplot(321); plot(t,x);

axis([0 2e-4 -2 2]); title('信源信号'); grid on

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % PSK调制信号

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% car=sin(2*pi*fc*t);%载波 ask=x.*car;%载波调制 subplot(322); plot(t,ask);

axis([0 200e-6 -2 2]); title('PSK信号'); grid on;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % 噪音信号

- 13 -

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% vn=0.1;

noise=vn*(randn(size(t)));%产生噪音 subplot(323); plot(t,noise); grid on;

title('噪音信号'); axis([0 .2e-3 -1 1]);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % 调制后加噪

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% askn=(ask+noise);%调制后加噪 subplot(324); plot(t,askn);

axis([0 200e-6 -2 2]); title('加噪后调制信号'); grid on;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % 带通滤波器

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% fBW=40e3;

f=[0:3e3:4e5]; w=2*pi*f/fs; z=exp(w*j); BW=2*pi*fBW/fs;

a=.8547;%BW=2(1-a)/sqrt(a) p=(j^2*a^2); gain=.135;

Hz=gain*(z+1).*(z-1)./(z.^2-(p)); subplot(325); hh=abs(Hz); plot(f,hh);

title('带通滤波器'); grid on;

Hz(Hz==0)=10^(8);%avoid log(0) subplot(326); hhb=20*log10(hh); plot(f,hhb); grid on;

title('Receiver -3dB Filter Response'); axis([1e5 3e5 -3 1]);

set (gcf, 'num', 'off', 'name', ['系统信号调制波形'... blanks(10)]);

- 14 -

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % 带通滤波后输出

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% a=[1 0 0.7305];%[1 0 p]

b=[0.135 0 -0.135];%gain*[1 0 -1] faskn=filter(b,a,askn); figure(2) subplot(321); plot(t,faskn);

axis([0 100e-6 -2 2]);

title('通过带通滤波后输出'); grid on;

cm=faskn.*car;%解调 subplot(322); plot(t,cm);

axis([0 100e-6 -2 2]); grid on;

title('通过相乘器后输出');

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % 低通滤波器

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% p=0.72;

gain1=0.14;%gain=(1-p)/2 Hz1=gain1*(z+1)./(z-(p));

subplot(323);

Hz1(Hz1==0)=10^(-8);%avoid log(0) plot(f,20*log10(abs(Hz1))); grid on;

title('LPF -3dB response'); axis([0 5e4 -3 1]);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % 滤波器系数

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% a1=[1 -0.72];%(z-(p))

b1=[0.14 0.14];%gain*[1 1] so=filter(b1,a1,cm); so=so*10;-d gain

so=so-mean(so);%removes DC component subplot(324); plot(t,so);

axis([0 8e-4 -3.5 3.5]);

title('通过低通滤波器后输出'); grid on;

- 15 -