通信原理基于MATLAB的VSB实验及其波形图_第1页
通信原理基于MATLAB的VSB实验及其波形图_第2页
通信原理基于MATLAB的VSB实验及其波形图_第3页
全文预览已结束

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、基于matlab的vsb程序及其波形图一 运行程序(注意这5个程序要分开写成5份)% - % 显示模拟调制的波形及其解调方法vsb,文件名:vsb.m % signal dt=0.001; fmax=6; fc=45; t=5; n=t/dt; t=0:n-1*dt; mt=sqrt(2)*(cos(2*pi*fmax*t)+sin(2*pi*0.5*fmax*t); % vsb modulation s_vsb=mt.*cos(2*pi*fc*t); b1=0.2*fmax; b2=1.2*fmax; f,sf=fft_shift(t,s_vsb); t,s_vsb=vsbmd(f,sf,b

2、1,b2,fc); % power spectrum density f,sf=fft_shift(t,s_vsb); psd=(abs(sf).2)/t; % plot vsb and psd figure(1) subplot(211) plot(t,s_vsb);hold on; plot(t,mt,r-); title(vsb调制信号); xlabel(t); subplot(212) plot(f,psd); axis(-2*fc 2*fc 0 max(psd); title(vsb信号功率谱);xlabel(f);二 调用程序1% 调用函数 function f, sf=fft_s

3、hift(t, st) %this function is fft to calculate a signals fourier transform %input: t: sampling time , st : signal data. time length mustgreater thean 2 %output: f : sampling frequency , sf: frequen %output is the frequency and the signal spectrum dt=t(2)-t(1); t=t(end); df=1/t; n=length(t); f=-n/2:n

4、/2-1*df; sf=fft(st); sf=t/n*fftshift(sf);三 调用程序2function t,st=ifft_shift(f,sf) df=f(2)-f(1); fmax=(f(end)-f(1)+df); dt=1/fmax; n=length(f); t=0:n-1*dt; sf=fftshift(sf); st=fmax*ifft(sf); st=real(st)四 调用程序3function t,st=vsbmd(f,sf,b1,b2,fc) % this function is a residual bandpass filter % inputs f: sa

5、mple frequency, sf: frequency spectrum data % b1: residual bandwidth, b2: highest freq of the baseband signal % outputs t:sample time, st: signal data df=f(2)-f(1); t=1/df; hf=zeros(1,length(f); bf1=floor(fc-b1)/df):floor(fc+b1)/df); bf2=floor(fc-b1)/df)+1:floor(fc+b2)/df); f1=bf1+floor(length(f)/2); f2=bf2+floor(length(f)/2); stepf=1/length(f1); hf(f1)=0:stepf:1-stepf; hf(f2)=1; f3=-bf1+floor(length(f)/2); f4=-bf2+floor(length(f)/2);

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论