第一范文网 - 专业文章范例文档资料分享平台

基于MATLAB的AM调制与相干解调

来源:用户分享 时间:2025/5/28 15:39:58 本文由loading 分享 下载这篇文档手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xxxxxxx或QQ:xxxxxx 处理(尽可能给您提供完整文档),感谢您的支持与谅解。

AM的调制与相干解调

%四个函数放在同一路径下即可

function am_xianggan() close all; clear all; dt=0.001; fm=1; fc=10; T=5; t=0:dt:T;

mt=sqrt(2)*cos(2*pi*fm*t); A=2;

s_am=(A+mt).*cos(2*pi*fc*t); figure(1); subplot(311);

plot(t,s_am);hold on; plot(t,A+mt,'r--');

title('AMμ÷??D?o??°??°ü??'); xlabel('t');

rt=s_am.*cos(2*pi*fc*t); rt=rt-mean(rt); [f,rf]=T2F(t,rt); [t,rt]=lpf(f,rf,2*fm); subplot(312); plot(t,rt);hold on; plot(t,mt/2,'r--');

title('?à?é?aμ÷oóD?o?2¨D?ó?ê?è?D?o?μ?±è??'); xlabel('t'); subplot(313); [f,sf]=T2F(t,s_am); psf=(abs(sf).^2)/T; plot(f,psf);

axis([-2*fc 2*fc 0 max(psf)]); title('AMD?o?1|?ê?×'); xlabel('f');

function [t st]=F2T(f,sf)

%This function calculate the time signal using ifft function for the input %signal's spectrum

df = f(2)-f(1);

Fmx = ( f(end)-f(1) +df); dt = 1/Fmx; N = length(sf); T = dt*N;

%t=-T/2:dt:T/2-dt; t = 0:dt:T-dt;

sff = fftshift(sf); st = Fmx*ifft(sff);

function [f,sf]= T2F(t,st)

%This is a function using the FFT function to calculate a signal's Fourier %Translation

%Input is the time and the signal vectors,the length of time must greater %than 2

%Output is the frequency and the signal spectrum dt = t(2)-t(1); T=t(end); df = 1/T; N = length(st);

f=-N/2*df:df:N/2*df-df; sf = fft(st);

sf = T/N*fftshift(sf);

function [ t,st] = lpf( f,sf,B) df=f(2)-f(1); T=1/df;

hf=zeros(1,length(f));

bf=[-floor(B/df):floor(B/df)]+floor(length(f)/2); hf(bf)=1; yf=hf.*sf; [t,st]=F2T(f,yf); st=real(st); end

运行>> am_xianggan()

搜索更多关于: 基于MATLAB的AM调制与相干解调 的文档
基于MATLAB的AM调制与相干解调.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.diyifanwen.net/c28zkg35kzk8az813jgo32teb88j4b1005qy_1.html(转载请注明文章来源)
热门推荐
Copyright © 2012-2023 第一范文网 版权所有 免责声明 | 联系我们
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:xxxxxx 邮箱:xxxxxx@qq.com
渝ICP备2023013149号
Top