1000字范文,内容丰富有趣,学习的好帮手!
1000字范文 > matlab dpsk 2DPSK调制与解调matlab(最新整理)

matlab dpsk 2DPSK调制与解调matlab(最新整理)

时间:2021-11-28 01:11:08

相关推荐

matlab dpsk 2DPSK调制与解调matlab(最新整理)

《2DPSK调制与解调matlab(最新整理)》由会员分享,可在线阅读,更多相关《2DPSK调制与解调matlab(最新整理)(5页珍藏版)》请在人人文库网上搜索。

1、- 2DPSK 调制与解调%-%参数初始化%-fs = 3600000;%采样频率为 36000 赫兹Time_Hold_On = 1/1200;%一个时钟周期为 1200 分之 1,对应比特率为 1200bps Num_Unit = fs * Time_Hold_On;%一个时钟周期内的采样点个数High_Level = ones ( 1, Num_Unit );%高电平(全 1 序列) Low_Level = zeros ( 1, Num_Unit );%低电平(全 0 序列) w = 1800;%载波角频率 1800HzA = 1;%载波幅值%-%信号初始化%-Sign_Set = 0,。

2、1,1,0,1,0,0,1;%原始序列Lenth_Of_Sign = length ( Sign_Set );%原始序列长度Sign_Sett = ones(1,Lenth_Of_Sign+1);%差分变换后的序列,初始化为长度为原始序列长度+1 的全 1 序列(第一个码元为 1)sign_orign = zeros ( 1, Num_Unit * (Lenth_Of_Sign+1) );%初始化基带信号为全 0 序列sign_result = zeros ( 1, Num_Unit * (Lenth_Of_Sign+1) );%初始化接收到的基带信号为全 0 序列st = zeros ( 1。

3、, Num_Unit *( Lenth_Of_Sign+1) );%初始化调制后的信号为全 0 序列t = 0 : 1/fs : Time_Hold_On * (Lenth_Of_Sign +1)- 1/fs;%信号采样时间点result=zeros(1,Lenth_Of_Sign+1);%初始化接收到的序列resultt=zeros(1,Lenth_Of_Sign);%初始化差分解调后的序列%-%求差分编码%-for I = 2 : Lenth_Of_Sign+1%差分变换后的序列第一个值为 1,从第 2 个开始计算Sign_Sett(I)= xor(Sign_Sett(I-1),Sign_。

4、Set(I-1);%用异或运算求差分码end%-%产生基带信号%-for I = 1 : Lenth_Of_Sign+1%考虑差分变换后序列中每一个值if Sign_Sett(I) = 1sign_orign( (I-1)*Num_Unit + 1 : I*Num_Unit) = High_Level;%序列值为 1,基带信号为高电平elsesign_orign( (I-1)*Num_Unit + 1 : I*Num_Unit) = Low_Level;%序列值为 0,基带信号为低电平endend%-%调制部分%-for I = 1 : Lenth_Of_Sign+1%考虑差分变换后序列中每一。

5、个值if Sign_Sett(I) = 1st( (I-1)*Num_Unit + 1 : I*Num_Unit) = A * cos ( 2 * pi * w * t( (I-1)*Num_Unit + 1 :I*Num_Unit ) + ( pi / 2 ) );%序列值为 1,相位调制为 /2 elsest( (I-1)*Num_Unit + 1 : I*Num_Unit) = A * cos ( 2 * pi * w * t( (I-1)*Num_Unit + 1 :I*Num_Unit ) );%序列值为 0,相位调制为 0 endendfiguresubplot ( 2,1,1 )。

6、 plot(t, sign_orign);axis( 0 , Time_Hold_On *( Lenth_Of_Sign + 2), - (A / 2), A + (A / 2) ); title ( 原始信号 );grid%画出基带信号subplot ( 2, 1, 2 );plot ( t, st );axis( 0 , Time_Hold_On *( Lenth_Of_Sign + 2), - 3*(A / 2), 3*(A / 2) ); title ( 调制后的信号 );grid%画出相位调制后的信号%-%相干解调%-dt= st .* cos ( 2 * pi * w * t );。

7、 %相干相乘figureplot ( t, dt );axis( 0 , Time_Hold_On *( Lenth_Of_Sign + 2), - 3*(A / 2), 3*(A / 2) ); title ( 相干相乘后的波形 );grid%-%低通滤波部分%-N,Wn = buttord( 2*pi*1500, 2*pi*3400,3,25,s); %临界频率采用角频率表示,计算低通滤波器参数b,a=butter(N,Wn,s); %产生 N 阶低通巴特沃斯滤波器bz,az=impinvar(b,a,fs); %映射为数字的dt = filter(bz,az,dt); %将相干相乘后的信。

8、号进行滤波figureplot ( t, dt );axis( 0 , Time_Hold_On *( Lenth_Of_Sign + 2), - 3*(A / 2), 3*(A / 2) ); title ( 低通滤波后的波形 );grid%-%抽样判决 & 逆码变换部分%-for I = 1 : Lenth_Of_Sign+1if dt(2*I-1)*Num_Unit/2) 序列生成与差分还原%-for I=1: Lenth_Of_Sign+1result(I)=sign_result(I* Num_Unit)%将接收到的信号生成(差分)序列endfor I = 1 : Lenth_Of_。

9、Signresultt(I)= xor(result(I),result(I+1) %将接收到的差分序列还原为原序列endwindow=boxcar(length(st); %矩形窗nfft=1024;Pxx,f=periodogram(st,window,nfft,fs); %求功率谱密度plot(f,10*log10(Pxx);“”“”At the end, Xiao Bian gives you a passage. Minand once said, people who learn to learn are very happy people. In every wonderful 。

10、life, learning is an eternal theme. As a professional clerical and teaching position, I understand the importance of continuous learning, life is diligent, nothing can be gained, only continuous learning can achieve better self. Only by constantly learning and mastering the latest relevant knowledge, can employees from all walks of life keep up with the pace of enterprise development and innovate to meet the needs of the market. This document is also edited by my studio professionals, there may be errors in the document, if there are errors, please correct, thank you。

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。