zoukankan      html  css  js  c++  java
  • CCS

    Demodulation of AM Signals

    Demodulation is the process of extracting the message signal from the modulated signal.
    The demodulation process depends on the type of modulation employed. For
    DSB-AM and SSB-AM, the demodulation method is coherent demodulation, which
    requires the existence of a signal with the same frequency and phase of the carrier at
    the receiver. For conventional AM, envelope detectors are used for demodulation. In
    this case precise knowledge of the frequency and the phase of the carrier at the receiver

    is not crucial, so the demodulation process is much easier. Coherent demodulation for
    DSB-AM and SSB-AM consists of multiplying (mixing) the modulated signal by a sinusoidal
    with the same frequency and phase of the carrier and then passing the product
    through a lowpass filter. The oscillator that generates the required sinusoidal at the
    receiver is called the local oscillator.

    SSB-AM Demodulation

     

    Matlab Coding

     

     1 % MATLAB script for Illustrative Problem 3.7.
     2 % Demonstration script for LSSB-AM demodulation. The message signal
     3 % is +1 for 0 < t < t0/3, -2 for t0/3 < t < 2t0/3, and zero otherwise.
     4 echo on
     5 t0=.15;                    % signal duration
     6 ts=1/1500;                % sampling interval
     7 fc=250;                    % carrier frequency
     8 fs=1/ts;                  % sampling frequency
     9 df=0.25;                  % desired freq.resolution
    10 t=[0:ts:t0];                % time vector
    11 % the message vector 12 m=[ones(1,t0/(3*ts)),-2*ones(1,t0/(3*ts)),zeros(1,t0/(3*ts)+1)]; 13 c=cos(2*pi*fc.*t); % carrier vector 14 udsb=m.*c; % DSB modulated signal 15 [UDSB,udsb,df1]=fftseq(udsb,ts,df); % Fourier transform 16 UDSB=UDSB/fs; % scaling 17 n2=ceil(fc/df1); % location of carrier in freq. vector
    18 % Remove the upper sideband from DSB. 19 UDSB(n2:length(UDSB)-n2)=zeros(size(UDSB(n2:length(UDSB)-n2))); 20 ULSSB=UDSB; % Generate LSSB-AM spectrum. 21 [M,m,df1]=fftseq(m,ts,df); % spectrum of the message signal 22 M=M/fs; % scaling 23 f=[0:df1:df1*(length(M)-1)]-fs/2; % frequency vector 24 u=real(ifft(ULSSB))*fs; % Generate LSSB signal from spectrum.
    25 % mixing 26 y=u.*cos(2*pi*fc*[0:ts:ts*(length(u)-1)]); 27 [Y,y,df1]=fftseq(y,ts,df); % spectrum of the output of the mixer 28 Y=Y/fs; % scaling 29 f_cutoff=150; % Choose the cutoff freq. of the filter. 30 n_cutoff=floor(150/df); % Design the filter. 31 H=zeros(size(f)); 32 H(1:n_cutoff)=4*ones(1,n_cutoff);
    33 % spectrum of the filter output 34 H(length(f)-n_cutoff+1:length(f))=4*ones(1,n_cutoff); 35 DEM=H.*Y; % spectrum of the filter output 36 dem=real(ifft(DEM))*fs; % filter output
    37 pause % Press a key to see the effect of mixing. 38 clf 39 subplot(3,1,1) 40 plot(f,fftshift(abs(M))) 41 title('Spectrum of the Message Signal') 42 xlabel('Frequency') 43 subplot(3,1,2) 44 plot(f,fftshift(abs(ULSSB))) 45 title('Spectrum of the Modulated Signal') 46 xlabel('Frequency') 47 subplot(3,1,3) 48 plot(f,fftshift(abs(Y))) 49 title('Spectrum of the Mixer Output') 50 xlabel('Frequency') 51 pause % Press a key to see the effect of filtering on the mixer output. 52 clf 53 subplot(3,1,1) 54 plot(f,fftshift(abs(Y))) 55 title('Spectrum of the Mixer Output') 56 xlabel('Frequency') 57 subplot(3,1,2) 58 plot(f,fftshift(abs(H))) 59 title('Lowpass Filter Characteristics') 60 xlabel('Frequency') 61 subplot(3,1,3) 62 plot(f,fftshift(abs(DEM))) 63 title('Spectrum of the Demodulator output') 64 xlabel('Frequency') 65 pause % Press a key to see the message and the demodulator output signals. 66 subplot(2,1,1) 67 plot(t,m(1:length(t))) 68 title('The Message Signal') 69 xlabel('Time') 70 subplot(2,1,2) 71 plot(t,dem(1:length(t))) 72 title('The Demodulator Output') 73 xlabel('Time')


    The effect of mixing

     The effect of filtering on the mixer output 

     The message and the demodulator output signals

    Reference,

      1. <<Contemporary Communication System using MATLAB>> - John G. Proakis

  • 相关阅读:
    密码盐 -- 为什么要在密码里加点“盐”
    Linux远程连接ssh工具(FinalShell)xshell替代神器
    模板文件不存在,无法解析文档”的几种解决办法
    9个PNG透明图片免费下载网站推荐
    我最近买的书里面带的CD盘,放电脑里后,说是0字节,但是可以播放,不能把里面的东西复制出来
    ASP程序加密/解密方法大揭密
    最稳定万能vip视频解析接口 支持HTTPS
    pycharm安装pyinstaller将pygame打包成exe
    Arduino101学习笔记(六)—— 高级IO
    Arduino101学习笔记(五)—— 模拟IO
  • 原文地址:https://www.cnblogs.com/zzyzz/p/13799525.html
Copyright © 2011-2022 走看看