通信原理 课程设计 全由刀豆文库小编整理,希望给你工作、学习、生活带来方便,猜你可能喜欢“通信原理的课程设计”。
第一题 clear echo off t0=0.15;ts=0.001;fc=250;snr=20;fs=1/ts;t=(0:ts:t0);dt=0.01;df=0.3;snr_lin=10^(snr/10);
m=[ones(1,t0/(3*ts)),-2*ones(1,t0/(3*ts)),zeros(1,t0/(3*ts)+1)];c=cos(2.*pi.*fc.*t);u=[2+0.85*m].*c;clf figure(1)
%(1)m(t)和u(t)的波形 subplot(2,1,1)plot(t,m(1:length(t)))xlabel('Time')title('基带信号m(t)')subplot(2,1,2)plot(t,u(1:length(t)))xlabel('Time')title('调制信号u(t)')
[M,m,df1]=fftseq(m,ts,df);
%(2)m(t)和u(t)的频谱图 M=M/fs;[U,u,df1]=fftseq(u,ts,df);U=U/fs;[C,c,df1]=fftseq(c,ts,df);f=[0:df1:df1*(length(m)-1)]-fs/2;figure(2)
subplot(2,1,1)plot(f,abs(fftshift(M)))xlabel('frequency')title('基带信号频谱M(f)')subplot(2,1,2)plot(f,abs(fftshift(U)))xlabel('frequency')title('调制信号频谱U(f)')
signal_power=sum(u.*u)*dt/(length(t).*dt);%(3)周期T0=t0,求已调信号的功率 signal_power noise_power=signal_power/snr_lin;
%(4)噪声功率 noise_power noise_std=sqrt(noise_power);n=noise_std*randn(1,length(u));r=u+n;
figure(5)的波形;
subplot(2,1,1)
plot(t,n(1:length(t)))title('噪声信号')subplot(2,1,2)
plot(t,r(1:length(t)))title('信号加噪声信号')
[N,n,df1]=fftseq(n,ts,df);
N = N/fs;
[R,r,df1]=fftseq(r,ts,df);
R = R/fs;
figure(6)
频谱图;
subplot(2,1,1)
plot(f,abs(fftshift(N)))axis([-200 200 0 0.15])title('噪声信号频谱')axis([0 0.15-3 3])subplot(2,1,2)
plot(f,abs(fftshift(R)))title('信号加噪声信号频谱')axis([-500 500 0 0.15])
M文件
function [M,m,df]=fftseq(m,ts,df)fs=1/ts;n1=fs/df;n2=length(m);n=2^(max(nextpow2(n1),nextpow2(n2)));M=fft(m,n);m=[m,zeros(1,n-n2)];df=fs/n;
%(5)
噪声n(t)和已调信号加噪声(u(t)+ n(t))
%噪声时域显示
%加噪调制信号时域显示
%对噪声进行fft
%频率采样
%对最后的信号进行fft %(6)噪声n(t)和已调信号加噪声(u(t)+ n(t))的%噪声频域显示
%加噪调制信号频域显示
第二题 clear echo off b=3000;sn0=-20;sn1=30;ns=0.01;N=(sn0:ns:sn1);snrlin=10.^(N/10);ct=b.*log2(1+snrlin.*(1/b));clf subplot(2,1,1)plot(snrlin,ct)xlabel('s/n0')title('高斯信道容量')clear echo off n1=25;sn1=10.^(n1/10);bs=10;B=(3000:bs:300000);b=1./B;ct=B.*(log2(1+sn1.*b));subplot(2,1,2)plot(B,ct)xlabel('B')title('B无限增加时信道容量')ct=(1/log(2)*sn1)
ct = 456.2202
第三题 clear all;clf;Tb=1;f1=1000/Tb;f2=f1+1/Tb;phi=pi/4;N=12000;n=N/4;t=0:Tb/(n-1):Tb;%t=0:1/(n-1):1;T=0:4*Tb/(N-1):4*Tb;%T=0:4*1/(N-1):4*1;s1=[cos(2*pi*f1*t+phi)cos(2*pi*f1*t+phi)cos(2*pi*f1*t+phi)cos(2*pi*f1*t+phi)];s2=[cos(2*pi*f2*t+phi)cos(2*pi*f2*t+phi)cos(2*pi*f2*t+phi)cos(2*pi*f2*t+phi)];% aume the transmit signal is “1010”, ie.u2 u1 and u2 a=[cos(2*pi*f2*t+phi)cos(2*pi*f1*t+phi)cos(2*pi*f2*t+phi)cos(2*pi*f1*t+phi)];% a is the received signal b=a.*s1;c=a.*s2;
for j=1:4
for i=1:n;
d((j-1)*n+i)=sum(b((j-1)*n+1:(j-1)*n+i));
end;end;%求积分 for j=1:4
for i=1:n;
e((j-1)*n+i)=sum(c((j-1)*n+1:(j-1)*n+i));
end;end;%求积分
for j=1:4;
if d(j*n)>e(j*n);
f((j-1)*n+1:j*n)=zeros(1,n);%输出0
else
f((j-1)*n+1:j*n)=ones(1,n);%输出1
end;end;%比较器 figure(1)plot(T,a);xlabel('时间');ylabel('幅度');title('figure a');hold on figure(2)subplot(2,1,1);plot(T,b);ylabel('幅度');title('figure b');subplot(2,1,2)plot(T,c);ylabel('幅度');xlabel('时间');ylabel('幅度');title('figure c');hold on figure(3)subplot(3,1,1);plot(T,d);ylabel('幅度');title('figure d');subplot(3,1,2);plot(T,e);ylabel('幅度');title('figure e');subplot(3,1,3);plot(T,f);xlabel('时间');ylabel('幅度');title('figure f');
第四题 n=15;k=5;g=[1 0 1 0 0 1 1 0 1 1 1];m=mMatrix(k);for i=0:2^k-1
nkm=[m(i+1,:)zeros(1,n-k)];
[q r]=deconv(nkm,g);
r=mod(r,2);
len_r=length(r);
r=[zeros(1,n-len_r)r];
c(i+1,:)=mod(nkm+r,2)end;
for i=1:2^k
weight(i)=sum(c(i,:));end;minW=weight(2)for i=3:2^k;
if weight(i)
minW=weight(i);
else
end;end;c =
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0 1
00
0 10
01
0
0 01
0 01
0 0
01
0
0 0
0 10
0
0 1
00
0 0
0
0 0
000
0 11
0 1
0
0 1
01
0 11
01
0
0 0
00
0
0 0
0 01
0
0 0
0
0 1
001
0 0
0 10
01
0
0 1
00
0
0 1
0 010
0 1
0
0 0
01
0 0
0 11
0 010
0 01
0 1
0 00
0 101
0 10
0 1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
minW = clear all;n=15;k=5;g=[1 0 1 0 0 1 1 0 1 1 1];m=[1 0 0 0 0
0 1 0 0 0
0 0 1 0 0
0 0 0 1 0
0 0 0 0 1];for i=1:5;
nkm=[m(i,:)zeros(1,n-k)];
[q r]=deconv(nkm,g);
r=mod(r,2);
len_r=length(r);
r=[zeros(1,n-len_r)r];
c(i,:)=mod(nkm+r,2);end;G=c H=[(G(:,k+1:n))' eye(n-k,n-k)] B=[1 1 0 0 1 0 1 0 0 1 1 0 1 1 0];S=mod(B*H',2)
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
00
0 1
0 00
0 1
G =
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
H =
0
0
0
0
0
0
0
0
0
0
S =
0
0
M文件
function m=mMatrix(k)% m(1,:)=[0 0 0 0 0];m(2,:)=[0 0 0 0 1];for i=2:2^k-1;
t=i;
e=1;
d=2^e;
a=[0 0 0 0 0];
while 1;
if t>d;
e=e+1;
d=2^e;
else
break;
end;1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0 0
0
0 0
0
0 0
0
0 0
0
0 0
0
0 0
0
0 0
0
0 1
0
0 0
0 0
0
end;
if t
e=e-1;
end;
while 1;
if t-2^e==0;
a(k-e)=1;
break;
end;
if t-2^e>0;
a(k-e)=1;
t=t-2^e;
e=e-1;
else
a(k-e)=0;
e=e-1;
end;
end;
m(i+1,:)=a;
a=[0 0 0 0 0];end;
数字幅度调制的抗噪声性能摘要:多进制数字振幅调制又称多电平调制。这种方式在原理上是通断键控(OOK)方式的推广。近几年它成了十分引人注目的一种高效率的传输方式。所谓高效......
课设一一、设计题目信号特性分析(如正弦波信号的波形与频谱)二、设计目的通信原理课程设计是《通信原理》理论课的辅助环节。着重体现通信原理教学知识的运用,培养学生主动研究......
通 题目:信 原 理课程设计基于MATLAB的系统的2ASK仿真- 1五、设计心得和体会„„„„„„„„„„„„„„„„„„„„„„„1、心得和体会………………………………………......
通 信 原理课程 设计班级:姓名:学号:任课教师:Simulink建模仿真实现频分复用 设计目的1 掌握频分复用工作原理2 学会使用Simulink建模仿真 设计题目涉及的理论知识当一条物理信......
通信原理课程设计姓名______ 学号_______ 班级_____目录一、目录 …………………………………………………………………2 二、任务书……………………………………………………………………......