matlab课作业仿真.docxVIP

  1. 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
  2. 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  3. 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
  4. 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
  5. 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们
  6. 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
  7. 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
matlab课后作业报告 姓 名 李聪 学 号 指导教师 姚冬萍 时 间 2014年5月25日 18.1 (1)在非时延色散信道中N=4,16,128解扩前后的信号 产生PN码序列的程序 function y = PN(G, Ain, N); % % This function generates the Pseudo Noise sequnece of length (N) % according to Generation Polynomial and input state. % Inputs: G - Generation Polynom % Ain - Initial state of SR % N - The length of required PN sequence % Outputs: y - The resulting PN sequence L = length(G); A = Ain; % initiate the state of the SR y = zeros(N, 1); for i=1:N y(i)=A(L); SR_in=mod(sum(G.*A),2); A=[SR_in,A(1:L-1)]; End 用8个移位寄存器产生长的序列,两个不同的用户使用两个不同偏移的子序列,用matlab程序产生接收的序列 ,并且解扩出来 clear all; s1=[1,-1,1,1]; s2=[-1,1,-1,1]; 92 %h1=1; % qestion (a) %h2=1; %h1=[1, 0.5, 0.1]; % qestion (b) %h2=h1; h1=[1, 0.5, 0.1]; % qestion (c) h2=[1, 0, 0.5]; %----------------PN Seq. Generation------------------------------ %here a long sequence with L=8 state SR is used and two users use %different shifted sequence with length N N=128; % length of PN Seq. G=[0,1,0,1,0,1,1,1]; % Ploynomial A_ini=[0,1,0,0,0,0,1,1]; %initial state C=PN(G, A_ini, 255); C=2*C-1; % Antipodal Chips c1=C(1:N)’; c2=C(4:N+3)’; %---Spreading------------------------ t1=[s1(1)*c1,s1(2)*c1,s1(3)*c1,s1(4)*c1]; t2=[s2(1)*c2,s2(2)*c2,s2(3)*c2,s2(4)*c2]; %---channel-------------------------- r1=conv(t1,h1); r2=conv(t2,h2); r=r1+r2; % assume the signals of two MS are synchronized (e.g. by GPS) %---Despreading (hard)Detection-------------------- %Assume the receiver already made chip and symbol synchronizations for both users d1(1)=sum(r(1:N)*c1’); d1(2)=sum(r(N+1:2*N)*c1’); d1(3)=sum(r(2*N+1:3*N)*c1’); d1(4)=sum(r(3*N+1:4*N)*c1’); d2(1)=sum(r(1:N)*c2’); d2(2)=sum(r(N+1:2*N)*c2’); d2(3)=sum(r(2*N+1:3*N)*c2’); 图18.1: N=4时候解扩前的信号 图18.2: N=4时候解扩后的信号 d2(4)=sum(r(3*N+1:4*N)*c2’); figure(1) stem(r); title(’N=128, Received Signal Before Despreading’) figure(2) subplot(2,1,1); stem(d1); title(’After Despreading, User 1’) subplot(2,1,2); st

文档评论(0)

lanhe8975915 + 关注
实名认证
文档贡献者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档