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

  • 相关阅读:
    android学习日记08--Paint画笔
    android学习日记07--Canvas画布
    android学习日记06--SurfaceView视图
    android学习日记06--View视图
    android学习日记05--Activity间的跳转Intent实现
    android学习日记04--开发中的通用细节
    android学习日记03--常用控件Dialog
    android学习日记03--常用控件ListView
    android学习日记03--常用控件tabSpec/tabHost
    android学习日记03--常用控件progressbar/seekbar
  • 原文地址:https://www.cnblogs.com/zzyzz/p/13799525.html
Copyright © 2011-2022 走看看