Top Banner
CTU: EE 463 Communications 2: Lab 2: MATLAB Project Digital Modulation, Sampling RCVR, Nyquist Criterion, Intersymbol Interference, Pulse Shapes 1 Colorado Technical University EE 463 Communications 2 Lab 2: MATLAB Project Digital Modulation, Sampling RCVR, Nyquist Criterion, Intersymbol Interference, and Pulse Shapes December 2010 Loren K. Schwappach ABSTRACT: This lab report was completed as a course requirement to obtain full course credit in EE463, Communications 2 at Colorado Technical University. This Lab investigates the concepts of digital modulation, sampling receivers, Nyquist criterion, Intersymbol Interference, and pulse shaping. If you have any questions or concerns in regards to this laboratory assignment, this laboratory report, the process used in designing the indicated circuitry, or the final conclusions and recommendations derived, please send an email to [email protected] . All computer drawn figures and pictures used in this report are of original and authentic content and were created using MATLAB. I. INTRODUCTION MATLAB is a powerful utility and is helpful in the visualization of applied mathematics, physics, and practical engineering. The first concept of digital communications is to gain an understanding of Intersymbol Inference (ISI). To prevent ISI signals must be sampled properly as required by the Nyquist criterion. A Nyquist pulse is a Nyquist shaped pulse which is idealized as a way to completely eliminate ISI. Eye and scatter diagrams can further help by providing a visualize indication of ISI and sampling effects. The communication channel is the driving source of ISI due to nonlinear frequency responses. Timing effects are another problem encountered with digital transmission. These effects come from duplicating delayed versions of the transmitted signal over the communication channel. II. OBJECTIVES In this Communications 2 lab exercise MATLAB will be used to accomplish the following objectives: 1. Gain a better understanding of the following concepts: ISI Nyquist Criterion Nyquist Pulse Eye and Scatter Diagrams Channel Noise & effects ISI due to overlapping pulses & effects Timing Offset & effect on eye/scatter diagrams Sampling Receiver III. EQUIPMENT The following tools and or equipment were used for this lab assignment: 1. MATLAB version 2010a (with all features/bock sets). 2. Simulink (Part of MATLAB) 3. Communications Toolbox (Part of Simulink) IV. PROCEDURE / RESULTS 1. Part A: Developing the basic digital modulator and sampling receiver in Simulink: To build a digital message a new work space was created in Simulink. The communication block-sets are utilized as the primary source of building blocks for the digital tools. The Bernoulli binary generator is the first tool used to produce a digital message by generating a randomized bit steam based on some user defined parameters. The following figure shows these parameters.
11
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Ee463   communications 2 - lab 2 - loren schwappach

CTU: EE 463 – Communications 2: Lab 2: MATLAB Project – Digital Modulation, Sampling RCVR, Nyquist Criterion, Intersymbol Interference, Pulse Shapes

1

Colorado Technical University

EE 463 – Communications 2

Lab 2: MATLAB Project – Digital Modulation, Sampling RCVR, Nyquist Criterion, Intersymbol Interference, and Pulse Shapes

December 2010

Loren K. Schwappach

ABSTRACT: This lab report was completed as a course requirement to obtain full course credit in EE463,

Communications 2 at Colorado Technical University. This Lab investigates the concepts of digital modulation, sampling

receivers, Nyquist criterion, Intersymbol Interference, and pulse shaping. If you have any questions or concerns in regards to

this laboratory assignment, this laboratory report, the process used in designing the indicated circuitry, or the final conclusions

and recommendations derived, please send an email to [email protected]. All computer drawn figures and pictures

used in this report are of original and authentic content and were created using MATLAB.

I. INTRODUCTION

MATLAB is a powerful utility and is helpful in the

visualization of applied mathematics, physics, and practical

engineering. The first concept of digital communications is to

gain an understanding of Intersymbol Inference (ISI). To

prevent ISI signals must be sampled properly as required by

the Nyquist criterion. A Nyquist pulse is a Nyquist shaped

pulse which is idealized as a way to completely eliminate ISI.

Eye and scatter diagrams can further help by providing a

visualize indication of ISI and sampling effects. The

communication channel is the driving source of ISI due to

nonlinear frequency responses. Timing effects are another

problem encountered with digital transmission. These effects

come from duplicating delayed versions of the transmitted

signal over the communication channel.

II. OBJECTIVES

In this Communications 2 lab exercise MATLAB

will be used to accomplish the following objectives:

1. Gain a better understanding of the following concepts:

ISI

Nyquist Criterion

Nyquist Pulse

Eye and Scatter Diagrams

Channel Noise & effects

ISI due to overlapping pulses & effects

Timing Offset & effect on eye/scatter diagrams

Sampling Receiver

III. EQUIPMENT

The following tools and or equipment were used for

this lab assignment:

1. MATLAB version 2010a (with all features/bock sets).

2. Simulink (Part of MATLAB)

3. Communications Toolbox (Part of Simulink)

IV. PROCEDURE / RESULTS

1. Part A: Developing the basic digital modulator and

sampling receiver in Simulink:

To build a digital message a new work space was

created in Simulink. The communication block-sets are

utilized as the primary source of building blocks for the digital

tools. The Bernoulli binary generator is the first tool used to

produce a digital message by generating a randomized bit

steam based on some user defined parameters. The following

figure shows these parameters.

Page 2: Ee463   communications 2 - lab 2 - loren schwappach

CTU: EE 463 – Communications 2: Lab 2: MATLAB Project – Digital Modulation, Sampling RCVR, Nyquist Criterion, Intersymbol Interference, Pulse Shapes

2

Figure 1: Parameters of the Bernoulli Binary Generator.

The Bernoulli Binary Generator (Fig. 1) ensures that

a one or a zero will be occur with equal probability by the

input “Probability of a zero” of “0.5”. The sampling time is set

to 1 to ensure an output of one bit per second. So the final bit

rate is 1bps.

Next a lookup table is added to Simulink. The lookup

table provides a representation of the incoming bits; one or

zero provide a +1 and -1. The symbol rate is again 1symbol

per second. The following figure (Fig.2) illustrates the look-

up table parameters used in Simulink.

Figure 2: Parameter of the Lookup Table.

The Lookup table symbols are intended to modulate

the Bernoulli Binary Generator (BBG) pulse train. As the

BBG pulse train passes through the lookup table it is

„encoded‟ and thus needs to be sampled. This raises the

frequency and symbol rate.

Next, an up sample block of 100 is used to generate a

continuous time sample rate of 100 samples per second

(100Hz). The Signal to Workspace blocks are used for

visualizing the signals and a Discrete Filter block is used to

modulate the incoming signal. In the Discrete Filter the Non

Return to Zero (NRZ) pulse shaping parameter is modified as

shown (Fig. 3).

Figure 3: Parameters of the Discrete Filter

The Simulink workspace now resembles Fig. 4

below:

Figure 4: Total Block set.

After running the simulation the following signal to

workspace results were obtained (Fig. 5):

Page 3: Ee463   communications 2 - lab 2 - loren schwappach

CTU: EE 463 – Communications 2: Lab 2: MATLAB Project – Digital Modulation, Sampling RCVR, Nyquist Criterion, Intersymbol Interference, Pulse Shapes

3

Figure 5: Modulated Impulse Train.

From the above figure we can conclude that the bit

rate is one bit per second and the NRZ pulse shaping is

working as expected.

2. Part B: Experiments with Interfering Pulses:

Next the NRZ pulse shaper is spread-out with the

1bps bit rate at 100Hz a 20% overlap is introduced by

extending the NRZ numerator parameter to „ones(1,120)‟.

This results in the new output as shown (Fig. 6).

Figure 6: Modulated Impulse Train with 20%

Intersymbol Interference (ISI).

The results of Fig. 6 confirm that an overlap of

interference has occurred. Twenty percent of each bit

overlaps with the following bit creating short additive pulses

on the top and bottom of each correct bit.

This introduced huge problems for the sampling

receiver. It is possible to detect this Inter Symbol Interference

(ISI) only if the impulse response of the digital filter satisfies

the Nyquist criterion for sampling. The Discrete Filter

numerator is now changed to isipulse which is downloaded as

isipulse.mat from the MATLAB prompt. This new pulse

extends over four symbol periods as shown by the next figures

(Fig. 7 & Fig 8).

Page 4: Ee463   communications 2 - lab 2 - loren schwappach

CTU: EE 463 – Communications 2: Lab 2: MATLAB Project – Digital Modulation, Sampling RCVR, Nyquist Criterion, Intersymbol Interference, Pulse Shapes

4

Figure 7: ISI impulse response.

Figure 8: Modulated signal with ISI pulse response

filtering.

Next a Half Sine (HS) pulse is created by typing in

the command “ >>hspulse = sin(pi*[0:0.01:2]/2);” via the

MATLAB prompt. This pulse shape is displayed by Fig. 9.

One observation my lab partner and I gained while performing

this is the importance of centering “hspulse” at zero. The shift

encountered was unexpected and uncorrectable.

Figure 9: Discrete filter response of Half Sine Pulse.

Now, the numerator of the discrete filter was

modified to “hspulse”. Fig. 10 below illustrates the output of

the new “hspulse” response. With this modified configuration

the modulated pulse train will now pass symbols correctly.

Because the Nyquist pulse is at the same sample/symbol rate a

perfect shift can now occur. The intersections at -1 and +1

indicate duplicates of the symbol time.

Figure 10: The hspulse response signal output.

Page 5: Ee463   communications 2 - lab 2 - loren schwappach

CTU: EE 463 – Communications 2: Lab 2: MATLAB Project – Digital Modulation, Sampling RCVR, Nyquist Criterion, Intersymbol Interference, Pulse Shapes

5

Now the pulse train is passed through a Raised Root

Cosine (RC) pulse with thirty percent of excess bandwidth.

The function to achieve this is defined by the following

MATLAB script:

% -----------

% Matlab script for RC Pulse

function y = rcpulse(a,t)

tau = 1; % Set the symbol time

t = t + 10^(-7); %Avoids division by zero

tpi = pi/tau; atpi=tpi*a;

at = 4*a^2/tau^2;

y=sin(tpi*t).*cos(atpi*t)./(tpi*t.*(1-at*t.^2));

% -------------

The function “rcpulse” is called in MATLAB with

“rcpulse=rcpulse(.3,[-6:0.01]:6]);” command. This function

call results in a Nyquist pulse that passes through zero at each

sample time and is illustrated by Fig 12 below.

Figure 11: The Raised Root Cosine Function (rcpulse)

Next the Discrete Filter is modified to rcpulse. This

produced Fig. 13 after passing through a Gaussian pulse.

Figure 13: Updated signal using raised root cosine pulse

response.

As illustrated by Fig. 13 above the Discrete Filter is

now much more effective at producing a quality response.

Although overlapping is still observable the Nyquist criterion

is achieved.

3. Part C: Additive Noise Channel:

Additive channel noise is a common problem in

communication systems. For the next phase in this lab

additive channel noise is created by introducing zero mean

Gaussian noise into the pulse train. The Gaussian noise

generator block is now summed with the output of the discrete

filter. Yet another signal to workspace block is added for

monitoring the signal changes before and after the addition of

noise (see Fig 14).

Page 6: Ee463   communications 2 - lab 2 - loren schwappach

CTU: EE 463 – Communications 2: Lab 2: MATLAB Project – Digital Modulation, Sampling RCVR, Nyquist Criterion, Intersymbol Interference, Pulse Shapes

6

Figure 12: Addition of new block sets for additive channel

noise.

The Gaussian Noise Generator (GNG) parameters are

altered to resemble the subsequent figure.

Figure 13: Parameters of Gaussian Noise Generator

Figure 14: Output of signal with min. additive channel

noise.

The noise shown by Fig. 16 is illustrated by the fuzz

overcastting the signal. Additive channel noise depends upon

the parameter of variance set for in the GNG. If the varience

were increased the signal noise would also increase as shown

by Fig. 17 below.

Figure 15: Large amount of additive channel noise.

Page 7: Ee463   communications 2 - lab 2 - loren schwappach

CTU: EE 463 – Communications 2: Lab 2: MATLAB Project – Digital Modulation, Sampling RCVR, Nyquist Criterion, Intersymbol Interference, Pulse Shapes

7

4. Part D: Sampling Receiver

Changing the variance of the GNG to 0.000001 will

eliminate most of the additive channel noise. The Discrete

Time Eye Diagram Scope, DSP Constant and Discrete Time

Scatter Plots are now added to the Simulink workspace as

illustrated by Fig. 18.

Figure 16: Sampling Receiver Block Set

The Discrete Time Eye Diagram and a Discrete Time

Scatter Plot scope parameters were modified as shown by Fig

19 & Fig. 20.

Figure 17: Parameters of the Discrete Time Eye Diagram.

Figure 18: Parameters of the Discrete Time Scatter Plot.

The new simulation results produced the following

outputs as illustrated by Fig. 21 & 22.

Figure 21: Eye plot diagram with no channel noise.

Page 8: Ee463   communications 2 - lab 2 - loren schwappach

CTU: EE 463 – Communications 2: Lab 2: MATLAB Project – Digital Modulation, Sampling RCVR, Nyquist Criterion, Intersymbol Interference, Pulse Shapes

8

Figure 22: Scatter plot diagram with no channel noise.

The Discrete Time Filter Numerator (DTFN) is now

modified for three different output responses. The first

response will be a triangular pulse using

“tripulse=triang(200)”. The second response will be a half

sine pulse. The third and final response will be a non-

Nyquistintersymbol interference pulse (isipulse). These

responses are illustrated by Fig. 23 – Fig. 28.

Figure 23: Eye plot diagram with triangle pulse response.

Figure 24: Scatter plot diagram with triangle pulse

response.

Page 9: Ee463   communications 2 - lab 2 - loren schwappach

CTU: EE 463 – Communications 2: Lab 2: MATLAB Project – Digital Modulation, Sampling RCVR, Nyquist Criterion, Intersymbol Interference, Pulse Shapes

9

Figure 25: EYE plot diagram with half sine pulse

response.

Figure 26: Scatter plot diagram with half sine pulse

response.

Figure 27: Eye plot diagram with non-Nyquist ISI

response.

Figure 28: Scatter plot diagram with non-Nyquist ISI

response.

Page 10: Ee463   communications 2 - lab 2 - loren schwappach

CTU: EE 463 – Communications 2: Lab 2: MATLAB Project – Digital Modulation, Sampling RCVR, Nyquist Criterion, Intersymbol Interference, Pulse Shapes

10

The above eye diagrams indicate the variances of

signals due to the selection of a good filter. By changing the

timing offset the impulse response is changed into the Raised

Cosine pulse. Yet another discrete filter is now added after

the introduction of channel noise to induce a twenty second

delay corresponding to twenty percent of the symbol period

due to the sample rate of one hundred samples per second.

The second filters numerator is changed to “[zeros(1,19,1]”

(see Fig. 29).

Figure 29: Simulink block set used inducing a time delay.

The eye and scatter plot diagrams now result in the

following (Fig. 30 & 31):

Figure 30: Eye plot diagram result with small channel

noise and delay.

Figure 31: Scatter plots diagram with minimal channel

noise and delay.

As illustrated by the figures above the eye diagram is

now sampled at a place where the eye is partially closed and

the scatter plot is indicating multiple sample rates as shown by

the multiple symbols.

Additional noise is now added into the system by

increasing the GNG back to “.01” resulting in Fig. 32 & 33.

Page 11: Ee463   communications 2 - lab 2 - loren schwappach

CTU: EE 463 – Communications 2: Lab 2: MATLAB Project – Digital Modulation, Sampling RCVR, Nyquist Criterion, Intersymbol Interference, Pulse Shapes

11

Figure 32: Eye plot diagram result with large amounts of

channel noise and delay.

Figure 33: Scatter plot diagram result with large amounts

of channel noise and delay.

The eye and scatter plot diagrams indicate that the

noise is now so severe as to nearly close the eye.

V. CONCLUSIONS

This was an excellent assignment to cover some

essential concepts with digital communications. The first

concept explained was Intersymbol Inference (ISI). ISI is a

distortion of the original signal caused by one symbol

interfering with another symbol. With the proper

identification and selection of the Nyquist rate, ISI can be

effectively eliminated.

One key factor in the problem associated with ISI is

the nonlinearity of the transmission channel. An eye pattern

analyzer is a tool that addresses the issues of ISI and channel

noise. Eye plot diagrams help visualize time jitter, ISI, and

channel noise without the need of complex mathematics.

Scatter plot diagrams assist in demonstrating the

possibilities for recovering a signal and the effects of

sampling.

Additive channel noise is easily observed in eye

diagrams as overlaid fuzz.

REFERENCES

[1] Haykin, S., “Analog and Digital Communications 2nd

Edition” John Wiley & Sons, Haboken, NJ, 2007.