ECE Undergraduate Laboratories
ECE 489 Communications Systems Laboratory

Lab 1: Amplitude Modulator and Demodulator


Theoretical Background

  1. Review of Signals & Systems, Probability and Noise and Starters’ Guide
  2. In order to understand the theory along with the experiments behind this course, the review sections were prepared. It is highly recommended that the Review and the Starters’ Guide are understood. Please see the instructor for any further information.

    As a reminder, Review of Signals & Systems, Probability and Noise is valid for all experiments.

  3. Fundamentals of Analog Communications
  4. Analog Communication is an information transmitting mechanism, i.e. music, voice, and video using broadcast radio, walkie-talkies, or cellular radio, and broadcast television. The significant invention made by Marconi in 1895 was a radio. Later, the foundation of Trans-Atlantic Communication Systems had been taken place. Although digital communications systems are much more efficient, cost-saving, more reliable, some communication systems are still analog.

    Fig 1
    Figure 1: Basics of Analog Communications

    Analog communication techniques can be summarized as

    Fig 1
    Figure 2: Analog Modulation Techniques

    Advantages of modulation:

    • Size of the antenna reduces when a signal is modulated by a larger frequency of a carrier.
    $$Antenna\: \: size= L=λ=\frac{c}{f_c} ,\: \:where \:\: c=speed \:\:of\:\: the\:\: light=3×10^8 m/s$$
    • Using modulation to transmit the signal through space to long distances. Therefore, Wireless Communication techniques has raised our standards considerably.
    • Modulation allows us to transmit multiple signals in the same medium (i.e. Frequency Division Multiplexing, FDMA)  

  5. Amplitude Modulation and Demodulation
  6. Let $ω_c = 2πf_c$ be the carrier frequency in radians per second where where $fc >> W$. Then the amplitude modulated signal $s(t)$ can be expressed [1] (H. Taub, 2008, p. section 3.3) as

    $$s(t)=A_C \Big[1+μm(t)\Big]cos(2πf_c t)$$ $$s(t)=A_C cos(2πf_c t)+A_c μm(t)cos(2πf_c t)$$

    , where $u$  is the modulation index defined in  $-1<μ<1$

    As an example, the following figure shows the Amplitude Modulation with $m(t)=sin(2πt),\:A_C=1,\:μ=0.9, \:and \:f_c=10 Hz$,

    Fig 3
    Figure 3: AM Waveforms

    Fig 6
    Figure 4: The frequency spectrum of $sin(2πft)\: with\: f=100 \:Hz$

    Recall: Modulation Property
      $m(t)$ is multiplied by $cos(2πf_c t)$;

    $$m(t)∙cos(2πf_c t)⟺\frac{1}{2}\Big[M(f-f_c )+M(f+f_c )\Big], \:where\: f\: is\: the\: freqency\: of\: m(t)$$

    In general, the AM modulation is summarized as:

    AM Modulation

    In case of carrier, which could be used sine or cosine wave. Practically, there is no difference except -90-degree phase shift.


    Any signal is summed by a constant value means that this signal is raised by the same constant value with respect to the vertical axis in time domain. In frequency domain, the constant value is represented by an impulse at $f=0\: Hz$.


    For AM demodulation, we will examine the Square-Law and Envelope Detector techniques.

    Demodulation by Squaring

    Demodulating by Squaring
    $$s^2 (t)=\Big((1+μm(t)) cos(2πf_c t) \Big)^2,\:\:\:where \:\:\:cos^2(w_c t)=\frac{1}{2} (1+cos(4πf_c t) )$$ $$s^2 (t)=\frac{1}{2} \Big(1+μm(t)\Big)^2+\frac{1}{2} \Big(1+μm(t)\Big)^2 cos(4πf_c t)$$

    The high frequency is removed after filtering,

    $$=\frac{1}{2} \Big(1+μm(t)\Big)^2, \:\:then$$ $$M(t)=\frac{1}{4}\Big(1+μm(t)\Big) $$

    Synchronous Demodulator

    The block diagram of synchronous demodulator is as shown

    Envelope Detector

    In order for the low-pass to detect the information envelope, the frequency of the carrier must be as high as possible. However, as you can imagine the noise from the nature (i.e. white noise) cannot be filtered/removed perfectly in such analog transmissions (AM, or FM).

    $$s(t)=sin(2πf_c t)+\frac{m(t)}{2} sin(2πf_c t-2πf_m t)-\frac{m(t)}{2} sin(2πf_c t+2πf_m t)$$

    After the multiplication of $s(t)×sin(2πf_c t)$

    $$ =-\frac{m(t)}{2} sin(2πf_m t)-\frac{1}{2} sin(2πf_c t)-\frac{m(t)}{2} (4πf_c t-2πf_m t)+\frac{m(t)}{4} sin(2πf_c t+2πf_m t) $$

    Then, the low-pass filter removes the higher frequency components, so we can recover m(t).

2. Building Simulink Model of Amplitude Modulator and Demodulator


The Simulink design of an Amplitude modulator is in the following [2] (M. Boulmalf, 2010)

Fig 5
Figure 5: Amplitude Modulation Model in Simulink


As it is clearly seen that the AM model is exactly based upon the mathematical foundation provided in the theoretical section. The message signal is multiplied by the modulation index, then it is added a DC carrier, finally is multiplied with a sinusoidal carrier signal in order to transmit the AM modulated signal.

Demodulation (Square-Law Demodulator)

Apply the similar procedure. You will have the demodulation structure as shown in the following figure:

Fig 6
Figure 6: Square-Law-Demodulator Model in Simulink

Connect your modulation and demodulation models as shown.

Fig 7
Figure 7: DSB-AM

Run your model, you will then observe the following

Fig 8
Figure 8:Signals in time scope

Simulation time is chosen to be 2 secs for the spectrum analyzers.

Spectrum Analyzer Spectrum Analyzer Spectrum Analyzer
Figure 9: Results in Spectrum Analyzers

3. Building Simulink Model of the Music Transmission Using DSB-AM Modulator and Demodulator (Baseband)

Here, we will implement the DSB-AM baseband modulator and demodulator using a music file as a source. In this case, since the source is a multimedia file rather than a pure sine wave, we need the DSP process, which is the resampling and filtering. You will not be kept responsible for DSP processes. However, you can find them very useful when comprehending sampling rate, rate conversion, Finite Impulse Response (FIR), decimation and interpolation etc. You can also check the following resource:

Chapter 3, Multiresolution Signal Decomposition, Ali N Akansu, Haddat.

The model is shown below.

Fig 10
Figure 10: Simulink model of the Music Transmission using DSB-AM

Fig 11
Figure 11: Resampling

Fig 12
Figure 12:Baseband Demodulation

Transmitting and Receiving a Multimedia File using DSB-AM via USRP

Now, we will go one further step to transmit a music file, and then receive it via USRP hardware. In this case the transmission is real time, therefore unlike the simulations, you will observe the noise through the air.

The model is expressed as

Transmitter (TX)

Fig 13
Figure 13:Baseband Modulation and Transmission

Fig 14
Figure 14:Resampling and Filtering

Receiver (RX)

Fig 15
Figure 15:Receiver

Fig 16
Figure 16: Demodulation Blocks (subsystem)

Fig 17
Figure 17: DSB-AM Demodulation

5. Prelab Instructions

  1. Starters Guide and Signals and Systems Review Manuals
  2. There are two additional supplements, Simulink and USRP Starters Guide and Review of Signals and Systems, were prepared and added to the course web site. You will find them very useful while answering prelab questions and comprehending lab tasks.

  3. Answer the following questions:
    1. Plot the magnitude of the following waves in frequency domain by hand
      1. $1 + sin(4πt)$
      2. $A_C[1 + sin(4πt)] cos(80πt)$, where $A_c$ is a positive number

    2. The message signal $m(t) = sin(4πt)$
      1. Plot $|M(f)|$ by hand
      2. If this message is DSB-AM modulated on a carrier $cos(80πt)$, find the corresponding passband modulated signal $s_c (t)$ and plot $|S_c (F)|$ by hand
      3. The received signal $s_c (t)$ is the input of the demodulator as described below:
      4. Received signal is the input of the demodulator

        The passband received signal after the demodulation is converted to baseband. This process is simply:

        Passband converted to baseband after demodulation

        The LPF has the following specifications:

        LPF specifications
      5. Find the $y(t)$, and then compare it with $m(t)$. Did you recover the signal? Comment your result.

6. Lab Tasks

  1. [Synchronous Detector]
  2. Build the model given below [3], and then set up the block parameters as

    • m(t) with frequency of 1kHz and sample time:1/100kHz
    • carrier: 10kHz, phase:$π/2$  and sample time: 1/100kHz
    • Local Oscillator (LO): same as carrier.
    • Filter: LowPass, Fs:100kHz, Fpass:6 and Fstop:12
    • Set up the simulation time as 50k/100k
    • Run your model
      1. Observe the 3 spectrum analyzers, then explain the waveforms from the frequency point of view (Hint: remember modulation property). Comment your result.
      2. Change the simulation time to 500/100k (to clearly see the sine wave). Compare signals in the time scope? Did you recover m(t)? Is there any delay between two signals? If yes, explain, why?

    Fig 18
    Figure 18: Model for the Task-1

  3. Build the Simulink model of AM modulator and demodulator (figure-9) explained in the manual. You must determine the analog filter’s passband edge frequency. Then, explain the theoretical side of the blocks. Use the notation as μ:modulation index, $m(t), h(t)$, etc.
  4. As the nature of transmission, the message can be distorted in different levels by the noise, which may occupy between specific frequencies, i.e. colored noise, or all frequencies, i.e. White Gaussian Noise (WGN). The following block is called “Additive White Gaussian Noise”.

  5. AWGN Channel

    Connect the AWGN channel. Set the variance from mask as 0.01, 0.05, 0.1 and 0.5 respectively. What do you observe in each case? Comment your result

  6. Set the modulation index μ as -10, -5, -0.9, -0.1, 0.5, 0.9, 5, 10 respectively.
    1. What happens to the modulated signal’s waveform for each case?
    2. In which values, the demodulation can be performed correctly? Why?
  7. Find the AM_Music_Simulation.slx file on your computer, then run the model. Similarly, answer the questions in task-2 based on this model.
  8. Steps: USRP
    • Ask your instructor to open, and then run the TX_AM_Music.slx file. Check the block diagrams for the transmitter (You will find no difference than the music simulation, but the transmitter). Take note the transmitter central frequency.
    • Open the RX_AM_Music.slx file in your computer. Set the central frequency same as the transmitter, and then run the file. Observe the real-time transmission through the air.
  9. Self-Study:
    Type the following code in the command window [4]:
    >> dspenvdet
  10. This code will open the Simulink Model of DSB-AM modulator and demodulator techniques based on Envelope Detector by Squaring and Hilbert Transform.

    1. Run your simulation to observe the waveform in time domain
    2. Click on dspEnvelopeDetector.m, then run the m-file. Observe the Matlab figures in both envelope detection techniques

7. Lab Report Instructions

Check out the template in the course web site.

8. References

[1] H. Taub, D. L. (2008). Principles of Communication Systems (3rd ed.). McGraw Hill.

[2] M. Boulmalf, Y. S. (2010). Tearching Digital and Anolog Modulation to Undergraduate Information and Technologhy Students Using Matlab and Simulink. IEEE.

[3] Simulink model of Perfect Modulation and Demodulation, Software Defined Radio using MATLAB & Simulink and the RTL-SDR, Strathclyde Academic Media, 2015

[4] The Mathworks Inc ®, Envelope Detection,