ECE 141 SimEx1 1s1920

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

ECE 141 Simulation Exercise #1

Delta Modulated Communications System

Introduction:

Delta Modulation (DM) is a widely used analog to digital modulation technique that has a higher SNR
ratio and lower bandwidth consumption than other modulation techniques. By creating a feedback
mechanism to the transmitter, this modulation technique provides better reliability and fidelity compared
to PCM and DPCM. Adaptive Delta Modulation (ADM) handles the problem in determining the step size
which dictates the quality of the digital data output. It minimizes slope overload and provides faithful
reproduction of fast varying analog signals.

In this simulation exercise, we will consider a telecommunications system that uses a delta modulated
signal line coded using an RZ-AMI encoder to transmit along a channel (telephone cable and lines). The
system uses adaptive control to minimize error in the modulation of the analog signal. We will explore
the error performance of this system when it passes through a noisy channel.

Figure 1. B
​ lock diagram of the Delta modulated communication system.

Instructions:

Perform the tasks listed below, and make sure to include in your submission the figures (or any other
output) asked for certain tasks. Some tasks may include follow-up questions; include your answers in the
submission as well.

Write your code for the tasks in a script named “maincode.m”. Submission is by group. Checking will be
done by a group interview and the group’s system will be discussed during the interview. Follow-up
questions will be asked to the group and only one student will provide the answer. Demerits to the group
will be given if the student fails to give the correct answer.

T1 Analog signals. Create an analog signal with 5 different frequencies in the auditory range (20 to 20,000
Hz). The amplitudes of the 5 different frequency components must be generated randomly. Name this
signal “message”. Display the time-domain and frequency-domain signal.

Useful functions: fft(), rand()


Task outputs: Plot of “message” in the time and frequency domain (FigT1_time.png and FigT1_freq.png)

T2 Adaptive Delta Modulation. Modulate the analog signal using adaptive delta modulation. Refer to
Figures 2 and 3 on how to implement this. Start with a step size of 0.05 and ​k = 1. Create a variable named
“adaptive_control” to signal slope overload and use it to control the gain ​k​. The gain should increase by a
factor of 2 for 3 consecutive sampler outputs of either HI or LO. When “adaptive_control” is LO, the gain
should be unity. Save output to variable “dm_out”.
Figure 2. B
​ lock diagram of adaptive delta modulation.

Figure 3. D
​ elta-modulated output signal and adaptive control output​.

Q1 Delta Modulation and Adaptive Delta Modulation. ​What is the difference between DM and ADM?
What are the advantages of ADM over DM?

Task Outputs: Superimposed plots of “message” and the integrator output (FigT2.png). Answer to
question Q1.

T3 Line Coding. Encode the signal using Bipolar RZ (RZ-AMI). Refer to the lab module in implementing
this. Name the encoded output “signal”.

Q2 RZ-AMI. ​Evaluate RZ-AMI in (a) self-synchronization, (b) bandwidth efficiency, (c) power spectral
density, and (d) error detection and correction capability.

Useful functions: matintrlv()

Task Outputs: Time domain signal of line code encoded bits “signal” and “dm_out” (FigT3.png). Answer
to question Q2.

T4 Noisy Channel. We now simulate the channel through which the digital signal will pass. Create a
noise signal by generating a normally distributed random vector with mean = 0 and variance = 0.1. Make
sure that it has the same length and dimensionality (row/ column vector) as your signal. Name this vector
“noise”.

Q3 Noise PSD.​ What is the power spectral density of “noise”?

Useful functions: randn()

Task outputs: Answer to question Q3.


T5 Received Signal. Generate the received signal by adding “signal” and “noise”. Name this signal
“received”. We now have a signal corrupted by noise. Verify this by plotting “received” vs “signal”.

Task outputs: Time-domain plots of “received” and “signal” (FigT5.png).

T6 Line Decoding. ​Decode “received”.

Q4 NRZ-M Decoder. ​Draw a block diagram of an NRZ-M decoder and explain it.

Useful functions: matdeintrlv()

Task outputs: Answer to question Q4.

T7 Delta Demodulation. Demodulate the signal. Refer to Figure 4 on how to implement this. Similar to
the variable gain in the modulator, the gain ​k ​changes according to the adaptive control. Integrate the
resulting signal. Use fft() to get the spectrum of the signal and then pass it through an ideal low-pass
filter. Choose the cut-off frequency so that the LPF results in an output closest to the original message.
Obtain the time-domain version of the LPF output using ifft() and name it “received_message”.

Figure 4. B
​ lock diagram of ADM demodulator.

Q5 Adaptive control. ​Why is adaptive control needed for demodulating an ADM signal? Draw two sets
of superimposed sampler and integrator outputs, one with and the other without adaptive control, to
show the effect of removing it from the demodulation process.

Q6 LPF. ​What is the effect of varying the cut-off frequency of the low-pass filter on the recovered
message? What cut-off frequency did you choose? Explain.

Task outputs: Superimposed plots of the signal spectrum before and after passing through the LPF
(FigT7_spectra.png). Superimposed time-domain plots of the original and recovered message
(FigT7_message.png). Answers to Q5 and Q6.

T8 BER vs SNR per bit plots. Create a separate script named “simex1_ber”. Rewrite a version of your
code which can plot the bit error probabilities for E​b​/N​0 values from 0 dB to 10 dB, in increments of 1 dB,
fixing E​b to 1. Plot E​b​/N​0 ​against the bit error probabilities using a semilogarithmic plot, with the bit error
rates as the y-axis values. Superimpose the theoretical bit error probabilities for the same range of E​b​/N​0
values.

Useful functions: wgn(), awgn(), qfunc(), semilogy()

T9 Actual Analog Signal. Use the .mat provided as the input signal to your system. Play the
demodulated signal using sound(). Use a sampling frequency of 44,100 Hz. What does the audio signal
say?
Pointing System

Tasks Questions
T1 5 Q1 5
T2* 30 Q2 15
T3 10 Q3 5
T4 5 Q4 10
T5 5 Q5 10
T6 10 Q6 5
T7* 20
T8 20
T9 5
Subtotal 110 Subtotal 50
Highest possible score 160/150

*50% merit for T2 and T7 if delta modulation (only) is implemented.

Deliverables

Submit a .zip compressed folder named “ECE141<LAB SECTION>_GRP<GROUP#>.zip” containing the


following files:

● maincode.m (main script)


● simex1_ber.m
● all images and plots produced

Sample submission: ECE141WFXMCDE_GRP1.zip

Only one submission is required per group. You are not required to submit a documentation, only the
answers to question Q1 to Q5.

The deadline of submission is on October 7, 2019 (Monday), 11:59 PM. Late submissions will incur a
10-point deduction per day late.

Contact your lab instructor if you have any questions.

You might also like