ImageVerifierCode 换一换
格式:DOCX , 页数:22 ,大小:17.45KB ,
资源ID:23938341      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/23938341.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(线性调制程序.docx)为本站会员(b****7)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

线性调制程序.docx

1、线性调制程序AM解调% am-dem.m% Matlab demonstration script for envelope detection. The message signal% is +1 for 0 t t0/3, -2 for t0/3 t 2t0/3 and zero otherwise.echo ont0=.15; % signal durationts=0.001; % sampling interval抽样时间fc=250; % carrier frequency载波频率a=0.85; % Modulation indexfs=1/ts; % sampling frequ

2、ency采样频率t=0:ts:t0; % time vectordf=0.25; % required frequency resolution% message signalm=ones(1,t0/(3*ts),-2*ones(1,t0/(3*ts),zeros(1,t0/(3*ts)+1);c=cos(2*pi*fc.*t); % carrier signalm_n=m/max(abs(m); % normalized message signalM,m,df1=fftseq(m,ts,df); % Fourier transform f=0:df1:df1*(length(m)-1)-f

3、s/2; % frequency vectoru=(1+a*m_n).*c; % modulated signalU,u,df1=fftseq(u,ts,df); % Fourier transform env=env_phas(u); % find the envelope dem1=2*(env-1)/a; % remove dc and rescalesignal_power=spower(u(1:length(t); % power in modulated signalnoise_power=signal_power/100; % noise powernoise_std=sqrt(

4、noise_power); % noise standard deviationnoise=noise_std*randn(1,length(u); % generate noiser=u+noise; % add noise to the modulated signalR,r,df1=fftseq(r,ts,df); % Fourier transform env_r=env_phas(r); % envelope, when noise is presentdem2=2*(env_r-1)/a; % demodulate in the presence of noisepause % P

5、ress any key to see a plot of the messagesubplot(2,1,1)plot(t,m(1:length(t)axis(0 0.15 -2.1 2.1)xlabel(Time)title(The message signal)pause % Press any key to see a plot of the modulated signalsubplot(2,1,2)plot(t,u(1:length(t)axis(0 0.15 -2.1 2.1)xlabel(Time)title(The modulated signal)pause % Press

6、a key to see the envelope of the modulated signalclfsubplot(2,1,1)plot(t,u(1:length(t)axis(0 0.15 -2.1 2.1)xlabel(Time)title(The modulated signal)subplot(2,1,2)plot(t,env(1:length(t)xlabel(Time)title(Envelope of the modulated signal)pause % Press a key to compare the message and the demodulated sign

7、alclfsubplot(2,1,1)plot(t,m(1:length(t)axis(0 0.15 -2.1 2.1)xlabel(Time)title(The message signal)subplot(2,1,2)plot(t,dem1(1:length(t)xlabel(Time)title(The demodulated signal)pause % Press a key to compare in the presence of noise clfsubplot(2,1,1)plot(t,m(1:length(t)axis(0 0.15 -2.1 2.1)xlabel(Time

8、)title(The message signal)subplot(2,1,2)plot(t,dem2(1:length(t)xlabel(Time)title(The demodulated signal in the presence of noise)双边带解调DSB1% dsb1.m% Matlab demonstration script for DSB-AM modulation. The message signal% is +1 for 0 t t0/3, -2 for t0/3 t 2t0/3 and zero otherwise.echo ont0=.15; % signa

9、l durationts=0.001; % sampling intervalfc=250; % carrier frequencysnr=20; % SNR in dB (logarithmic)fs=1/ts; % sampling frequencydf=0.3; % desired freq. resolutiont=0:ts:t0; % time vectorsnr_lin=10(snr/10); % linear SNR% message signalm=ones(1,t0/(3*ts),-2*ones(1,t0/(3*ts),zeros(1,t0/(3*ts)+1);c=cos(

10、2*pi*fc.*t); % carrier signalu=m.*c; % modulated signalM,m,df1=fftseq(m,ts,df); % Fourier transform M=M/fs; % scaling U,u,df1=fftseq(u,ts,df); % Fourier transform U=U/fs; % scalingC,c,df1=fftseq(c,ts,df); % Fourier transformf=0:df1:df1*(length(m)-1)-fs/2; % freq. vectorsignal_power=spower(u(1:length

11、(t); % power in modulated signalnoise_power=signal_power/snr_lin; % compute noise powernoise_std=sqrt(noise_power); % compute noise standard deviationnoise=noise_std*randn(1,length(u); % generate noiser=u+noise; % add noise to the modulated signalR,r,df1=fftseq(r,ts,df); % spectrum of the signal+noi

12、se R=R/fs; % scalingpause % Press a key to show the modulated signal powersignal_powerpause % Press any key to see a plot of the messageclfsubplot(2,2,1)plot(t,m(1:length(t)xlabel(Time)title(The message signal)pause % Press any key to see a plot of the carriersubplot(2,2,2)plot(t,c(1:length(t)xlabel

13、(Time)title(The carrier)pause % Press any key to see a plot of the modulated signalsubplot(2,2,3)plot(t,u(1:length(t)xlabel(Time)title(The modulated signal)pause % Press any key to see a plots of the magnitude of the message and the % modulated signal in the frequency domain.subplot(2,1,1)plot(f,abs

14、(fftshift(M)xlabel(Frequency)title(Spectrum of the message signal)subplot(2,1,2)plot(f,abs(fftshift(U)title(Spectrum of the modulated signal)xlabel(Frequency)pause % Press a key to see a noise samplesubplot(2,1,1)plot(t,noise(1:length(t)title(noise sample) xlabel(Time)pause % Press a key to see the

15、modulated signal and noise subplot(2,1,2)plot(t,r(1:length(t)title(Signal and noise)xlabel(Time)pause % Press a key to see the modulated signal and noise in freq. domainsubplot(2,1,1)plot(f,abs(fftshift(U)title(Signal spectrum)xlabel(Frequency)subplot(2,1,2)plot(f,abs(fftshift(R) title(Signal and no

16、ise spectrum)xlabel(Frequency)DSB2% dsb2.m% Matlab demonstration script for DSB-AM modulation. The message signal% is m(t)=sinc(100t). echo on t0=.2; % signal durationts=0.001; % sampling intervalfc=250; % carrier frequencysnr=20; % SNR in dB (logarithmic)fs=1/ts; % sampling frequencydf=0.3; % requi

17、red freq. resolutiont=-t0/2:ts:t0/2; % time vectorsnr_lin=10(snr/10); % linear SNRm=sinc(100*t); % the message signalc=cos(2*pi*fc.*t); % the carrier signalu=m.*c; % the DSB-AM modulated signalM,m,df1=fftseq(m,ts,df); % Fourier transformM=M/fs; % scalingU,u,df1=fftseq(u,ts,df); % Fourier transformU=

18、U/fs; % scalingf=0:df1:df1*(length(m)-1)-fs/2; % frequency vectorsignal_power=spower(u(1:length(t); % compute modulated signal powernoise_power=signal_power/snr_lin; % compute noise powernoise_std=sqrt(noise_power); % compute noise standard deviationnoise=noise_std*randn(1,length(u); % generate nois

19、e sequencer=u+noise; % add noise to the modulated signalR,r,df1=fftseq(r,ts,df); % Fourier transformR=R/fs; % scalingpause % Press a key to show the modulated signal powersignal_powerpause %Press any key to see a plot of the message clfsubplot(2,2,1)plot(t,m(1:length(t)xlabel(Time)title(The message

20、signal) pause % Press any key to see a plot of the carriersubplot(2,2,2)plot(t,c(1:length(t)xlabel(Time)title(The carrier) pause % Press any key to see a plot of the modulated signalsubplot(2,2,3)plot(t,u(1:length(t)xlabel(Time)title(The modulated signal) pause % Press any key to see a plot of the m

21、agnitude of the message and the % modulated signal in the frequency domain.subplot(2,1,1)plot(f,abs(fftshift(M)xlabel(Frequency)title(Spectrum of the message signal)subplot(2,1,2)plot(f,abs(fftshift(U)title(Spectrum of the modulated signal)xlabel(Frequency) pause % Press a key to see a noise samples

22、ubplot(2,1,1)plot(t,noise(1:length(t)title(noise sample) xlabel(Time)pause % Press a key to see the modulated signal and noisesubplot(2,1,2)plot(t,r(1:length(t)title(Signal and noise)xlabel(Time)pause % Press a key to see the modulated signal and noise in freq. domainsubplot(2,1,1)plot(f,abs(fftshif

23、t(U)title(Signal spectrum)xlabel(Frequency)subplot(2,1,2) plot(f,abs(fftshift(R) title(Signal and noise spectrum)xlabel(Frequency)DSB3% dsb1.m% Matlab demonstration script for DSB-AM modulation. The message signal% is +1 for 0 t t0/3, -2 for t0/3 t 2t0/3 and zero otherwise.echo ont0=.15; % signal du

24、rationts=0.0005; % sampling intervalfc=250; % carrier frequencysnr=10; % SNR in dB (logarithmic)fs=1/ts; % sampling frequencyt_long=20*t0; % extended signal duration n0=floor(t_long/ts)+1; % length of extended signal vector n00=2(ceil(log2(n0);df=fs/n00; % frequency resolutiont_long1=0:ts:t_long; %

25、extended time vectorf=-fs/2+df:df:fs/2; % frequency vector % message signalm=ones(1,t0/(3*ts),-2*ones(1,t0/(3*ts),zeros(1,t0/(3*ts)+1);m_long=m,zeros(1,n0-length(m); % extended message signal c_long=cos(2*pi*fc.*t_long1); % extended carrier signal u_long=m_long.*c_long; % extended modulated signaldu

26、_long=u_long.*c_long;DU=fft(du_long,n00)/fs;M=fft(m_long,n00)/fs; % spectrum of the extended message signal U=fft(u_long,n00)/fs; % spectrum of the extended modulated signal pause % Press any key to see a plots of the magnitude of the message and the % modulated signal in the frequency domain.subplo

27、t(2,1,1)plot(f,abs(fftshift(M)xlabel(Frequency)title(Spectrum of the message signal)subplot(2,1,2)plot(f,abs(fftshift(U)title(Spectrum of the modulated signal)xlabel(Frequency) pause % Press a key to see the modulated and modulated X carrier in freq. domainsubplot(2,1,1)plot(f,abs(fftshift(U)title(M

28、odulated signal spectrum)xlabel(Frequency)subplot(2,1,2)plot(f,abs(fftshift(DU) title(Modulated signal X Carrier spectrum)xlabel(Frequency)DSB DEM% dsb_dem.m% Matlab demonstration script for DSB-AM demodulation. The message signal% is +1 for 0 t t0/3, -2 for t0/3 t 2t0/3 and zero otherwise.echo ont0

29、=.15; % signal durationts=1/1500; % sampling intervalfc=250; % carrier frequencyfs=1/ts; % sampling frequencyt=0:ts:t0; % time vectordf=0.3; % desired frequency resolution% message signalm=ones(1,t0/(3*ts),-2*ones(1,t0/(3*ts),zeros(1,t0/(3*ts)+1);c=cos(2*pi*fc.*t); % carrier signalu=m.*c; % modulated signaly=u.*c; % mixingM,m,df1=fftseq(m,ts,df); % Fourier transform M=M/fs; % scalingU,u,df1=fftseq(u,ts,df); % Fourier transform U=U/fs; % scalingY,y,df1=fftseq(y,ts,df); % Fourier transformY=Y/fs; % scalingf_cutoff=150; % cutoff freq. of the filtern_cutoff=floor(150

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1