Vous êtes sur la page 1sur 69

Overview of Communication Topics

Sinusoidal amplitude modulation


Amplitude demodulation (synchronous and asynchronous)
Double- and single-sideband AM modulation
Pulse-amplitude modulation
Pulse code modulation
Frequency-division multiplexing
Time-division multiplexing
Narrowband frequency modulation

J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

Handy Trigonometry Identities

J. McNames

cos(a + b)

cos(a) cos(b) sin(a) sin(b)

sin(a + b)

sin(a) cos(b) + cos(a) sin(b)

cos(a) cos(b)

sin(a) sin(b)

sin(a) cos(b)

1
2
1
2
1
2

Portland State University

cos(a b) +
cos(a b)
sin(a b) +

ECE 223

1
2 cos(a + b)
1
2 cos(a + b)
1
2 sin(a + b)

Communications

Ver. 1.11

Introduction to Communication Systems


Communications is a very active and large area of electrical
engineering
Experienced a lot of growth through the nineties with the advent
of wireless cell phones and the internet
Still an active area of research
Fundamentals of signals and systems are essential to grasping
communications concepts
The next two lectures will merely introduce some of the
fundamental concepts
Will primarily focus on modulation and demodulation in
continuous-time
Analogous concepts apply in discrete-time

J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

Introduction to Amplitude Modulation


x(t)

y(t) = x(t) c(t)

c(t)

y(t)

c(t) = cos(c t + c )

Modulation: the process of embedding an information-bearing


signal into a second signal
Demodulation: extracting the information-bearing signal from
the second signal
Sinusoidal Amplitude modulation: a sinusoidal carrier c(t) has
its amplitude modied by the information-bearing signal x(t)

J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

Fourier Analysis of Sinusoidal Amplitude Modulation


For convenience, we will assume c = 0.
c(t) = cos(c t)
C(j) = [( c ) + ( + c )]
y(t)
Y (j)
X(j) ( c )
Y (j)

= x(t) c(t)
=

1
2

[X(j) C(j)]

= X (j( c ))
= 12 X (j( c )) + 12 X (j( + c ))

Thus, sinusoidal AM shifts the baseband signal x(t) so that it is


centered at c
Thus, x(t) can be recovered only if c > x so that the replicated
spectra dont overlap

J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

Fourier Analysis of Sinusoidal Amplitude Modulation


X(j)

J. McNames

Portland State University

0
Y (j)

1
2

-c -x -c -c +x

x
C(j)

-c

c -x

ECE 223

c +x

Communications

Ver. 1.11

Example 1: Sinusoidal AM of a Random Signal


Example of Sinusoidal Amplitude Modulation

x(t)

0.2
0
0.2
0

0.2

0.4

0.6

0.8

1.2

1.4

1.6

1.8

c(t)

x 10

0
1
0

0.2

0.4

0.6

0.8

1.2

1.4

1.6

1.8
3

y(t)

0.2

x 10

0
0.2
0

J. McNames

0.2

0.4

0.6

0.8

Portland State University

1
Time (s)

1.2

ECE 223

1.4

1.6

1.8
3
x 10

Communications

Ver. 1.11

Example 1: MATLAB Code


function [] = AMTimeDomain();
close all;
N = 2000;
fc = 50e3;
fs = 1e6;
k
t

% No. samples
% Carrier frequency
% Sample rate

= 1:N;
= (k-1)/fs;

xh
[n,wn]
[b,a]
x

=
=
=
=

randn(1,N); % Random high-frequency signal


ellipord(0.01,0.02,0.5,60);
ellip(n,0.5,60,wn);
filter(b,a,xh); % Lowpass filter to create baseband signal

c = cos(2*pi*fc*t);
y = x.*c;
figure;
FigureSet(1,LTX);
subplot(3,1,1);
h = plot(t,x,b);
set(h,LineWidth,0.2);
xlim([0 max(t)]);
ylim([-0.3 0.3]);
ylabel(x(t));
title(Example of Sinusoidal Amplitude Modulation);
box off;
AxisLines;
subplot(3,1,2);
h = plot(t,c,b);
set(h,LineWidth,0.2);
xlim([0 max(t)]);
ylim([-1.1 1.1]);

J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

ylabel(c(t));
box off;
AxisLines;
subplot(3,1,3);
h = plot(t,y,b,t,x,g,t,-x,r);
set(h,LineWidth,0.2);
xlim([0 max(t)]);
ylim([-0.3 0.3]);
xlabel(Time (s));
ylabel(y(t));
box off;
AxisLines;
AxisSet(6);
print -depsc AMTimeDomain;

J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

Synchronous Sinusoidal Amplitude Demodulation


Transmitter
x(t)

c(t)

Receiver
y(t)

y(t)

Channel

w(t)

H(s)

x
(t)

c(t)

y(t) = x(t) cos(c t)


w(t) = y(t) cos(c t)
= x(t) cos2 (c t)

1 1
= x(t) 2 + 2 cos(2c t)

= 12 x(t) + 12 x(t) cos(2c t)


Synchronous demodulation assumptions
The carrier c(t) is known exactly
c > x
The x(t) can be extracted by multiplying y(t) by the same carrier
and lowpass ltering the signal
J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

10

Fourier Analysis of Sinusoidal AM Demodulation


Y (j)

1
2

C(j)

W (j)

1
2

2c

2c

H(j)

0
1

R(j)

J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

11

Synchronous AM Demodulation Observations


Transmitter
x(t)

Receiver
y(t)

y(t)

Channel

c(t)

w(t)

H(s)

x
(t)

c(t)

The lowpass lter H(s) should have a passband gain of 2


The transition band is very wide so the lter does not need to be
close to ideal (e.g. it can be low order)
We learned how to design this type of lter in ECE 222
We assumed the signal spectrum X(j) was real
The same ideas hold if X(j) is complex
Called synchronous demodulation because we assumed the
transmitter and receiver carrier signals c(t) were in phase

J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

12

Synchronous AM Demodulation Carrier Phase Analysis


Suppose the transmitter and receiver carrier signals dier by a phase
shift:
cT (t)
cR (t)

=
=

cos(c t + )
cos(c t + )

w(t) = y(t) cR (t)


=

x(t) cT (t) cR (t)

= x(t) cos(c t + ) cos(c t + )



1
1
= x(t) 2 cos( ) + 2 cos(2c t + + )
=

J. McNames

1
2 x(t) cos(

Portland State University

) + 12 x(t) cos(2c t + + )

ECE 223

Communications

Ver. 1.11

13

Synchronous AM Demodulation Carrier Phase Comments


w(t) = 12 x(t) cos( ) + 12 x(t) cos(2c t + + )
If = then we have the same case as before and we recover
x(t) exactly after a lowpass lter with a passband gain of 2
If | | =

2,

we lose the signal completely

Otherwise, the received signal is attenuated


The phase relationship of the oscillators must be maintained over
time
This type of careful synchronization is dicult to maintain
Phase-locked loops (PLL) can be used to solve this problem
In ECE 323 you will design and build PLLs
The carrier frequency c of the transmitter and receiver must also
be the same and remain so over time

J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

14

Introduction to Asynchronous AM Demodulation


Asynchronous modulation does not require the carrier signal
c(t) be available in the receiver
Thus, there is no need for synchronization
Asynchronous Modulation Assumptions:
c  x
x(t) > 0 for all t
However, it does require that the baseband signal x(t) be positive
In this case, the envelope of the modulated signal y(t) is
approximately the same as the baseband signal x(t)
Thus, we can recover a good approximation of x(t) with an
envelope detector

J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

15

Example 2: Asynchronous Amplitude Modulation


Example of Asynchronous Sinusoidal AM Modulation

0.4
x(t)

0.2
0
0

0.2

0.4

0.6

0.8

1.2

1.4

1.6

c(t)

1.8
3

x 10

0
1
0

0.2

0.4

0.6

0.8

1.2

1.4

1.6

1.8

y(t)

x 10

0.2
0
0.2
0

0.2

0.4

0.6

0.8

1
1.2
Time (s)

1.4

1.6

1.8
3

x 10
J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

16

Example 2: MATLAB Code


function [] = AAMTimeDomain();
close all;
N = 2000;
fc = 50e3;
fs = 1e6;
k
t

% No. samples
% Carrier frequency
% Sample rate

= 1:N;
= (k-1)/fs;

xh
[n,wn]
[b,a]
x
x

=
=
=
=
=

rand(1,N)-0.5;
% Random high-frequency signal limited to [-0.5 0.5]
ellipord(0.02,0.03,0.5,60);
ellip(n,0.5,60,wn);
filter(b,a,xh);
% Lowpass filter to create baseband signal
x + 0.2;
% Convert to positive signal

c = cos(2*pi*fc*t);
y = x.*c;
figure;
FigureSet(1,LTX);
subplot(3,1,1);
h = plot(t,x,b);
set(h,LineWidth,0.2);
xlim([0 max(t)]);
ylim([-0.1 0.4]);
ylabel(x(t));
title(Example of Asynchronous Sinusoidal AM Modulation);
box off;
AxisLines;
subplot(3,1,2);
h = plot(t,c,r);
set(h,LineWidth,0.2);
xlim([0 max(t)]);

J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

17

ylim([-1.1 1.1]);
ylabel(c(t));
box off;
AxisLines;
subplot(3,1,3);
h = plot(t,y,g,t,x,b,t,-x,b);
set(h,LineWidth,0.2);
xlim([0 max(t)]);
ylim([-0.39 0.39]);
xlabel(Time (s));
ylabel(y(t));
box off;
AxisLines;
AxisSet(8);
print -depsc AAMTimeDomain;

J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

18

Diodes
I

Ideal Model

Real Model

0.7

0.7

Diodes can be used as a key component in envelope detectors


Like resistors, diodes do not have memory and the relationship
between voltage and current does not depend on time
Key idea: diodes only allow current to ow in one direction
When they are on (V 0.7 V), they act like an ideal voltage
source
When they are o (V < 0.7 V), they act like an open circuit

J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

19

Example 3: Full Wave Rectier

vs

R
+

vo

Draw the equivalent circuits for vs > 0 and vs < 0 assuming an ideal
model of the diode with a threshold voltage of 0 V.

J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

20

Example 3: Workspace

J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

21

Envelope Detectors
+
y(t)

i(t)

R e(t)
-

i(t)

y(t)

r(t)

A diode can be used to extract the upper half of the modulated


signal
This is called a half-wave rectier
Roughly speaking, when y(t) > 0, e(t) y(t)
By connecting a capacitor in parallel with the resistor, the RC
circuit acts like a rst-order lowpass lter
This smoothes the received waveform
A full-wave rectier that recovers both the negative and positive
peaks has better performance
J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

22

Example 4: Envelope Tracking


Example of Envelop Tracking of an Asynchronous AM Signal

y(t)

0.2
0
0.2

Fullwave Rectifier

Halfwave Rectifier

0.8

0.9

1.1

1.2

1.3

1.4

1.5

1.6

1.7

1.8
3

x 10

0.3
0.2
0.1
0
0.8

0.9

1.1

1.2

1.3

1.4

1.5

1.6

1.7

1.8
3

x 10

0.3
0.2
0.1
0
0.8

J. McNames

0.9

1.1

1.2

Portland State University

1.3
Time (s)

ECE 223

1.4

1.5

1.6

1.7

1.8
3
x 10

Communications

Ver. 1.11

23

Example 4: MATLAB Code


function [] = EnvelopeTracking();
close all;
N
fc
fs
al

=
=
=
=

2000;
50e3;
1e6;
0.95;

% No. samples
% Carrier frequency
% Sample rate
% First-order filter parameter

k
t

= 1:N;
= (k-1)/fs;

rand(state,10);
xh
= rand(1,N)-0.5;
% Random high-frequency signal limited to [-0.5 0.5]
[n,wn] = ellipord(0.01,0.02,0.5,60);
[b,a] = ellip(n,0.5,60,wn);
x
= filter(b,a,xh);
% Lowpass filter to create baseband signal
x
= x + 0.2;
% Convert to positive signal
c
= cos(2*pi*fc*t);
y
= x.*c;
eh
= y.*(y>0);
rh
= filter(1-al,[1 -al],eh-mean(eh))+mean(eh);
ef
= abs(y);
rf
= filter(1-al,[1 -al],ef-mean(ef))+mean(ef);
figure;
FigureSet(1,LTX);
subplot(3,1,1);
h = plot(t,y,g,t,x,b,t,-x,b);
set(h,LineWidth,0.2);
xlim(1e-3*[0.8 1.8]);
ylim([-0.39 0.39]);
ylabel(y(t));
title(Example of Envelop Tracking of an Asynchronous AM Signal);
box off;

J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

24

AxisLines;
subplot(3,1,2);
h = plot(t,eh,b,t,rh,r);
set(h,LineWidth,0.2);
xlim(1e-3*[0.8 1.8]);
ylim([-0.02 0.39]);
ylabel(Half-wave Rectifier);
box off;
AxisLines;
subplot(3,1,3);
h = plot(t,ef,b,t,rf,r);
set(h,LineWidth,0.2);
xlim(1e-3*[0.8 1.8]);
ylim([-0.02 0.39]);
ylabel(Full-wave Rectifier);
xlabel(Time (s));
box off;
AxisLines;
AxisSet(6);
print -depsc EnvelopeTracking;

J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

25

Asynchronous Amplitude Modulation Terminology


x(t)

c(t)

y(t)

Most baseband signals will not be positive


We can make amplitude-limited signals, |x(t)| xmax , positive by
adding a constant A such that A > xmax
The envelope detector then approximates x(t) + A
x(t) can then be extracted with a highpass lter to remove A (the
DC component)
The ratio m = xmax /A is called the modulation index
If expressed in percentage, 100xmax /A, it is called the percent
modulation
The spectrum of y(t) contains impulses to account for A

J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

26

Spectrum of Asynchronous Amplitude Modulation


X(j)

x
C(j)

-c

0
Y (j)

A
1
2

-c -x -c -c +x

J. McNames

Portland State University

ECE 223

c -x

c +x

Communications

Ver. 1.11

27

Asynchronous Amplitude Modulation Tradeos


x(t)

c(t)

y(t)

In most applications, the FCC limits the transmission power


For asynchronous AM, transmitting the carrier component requires
a portion of this power
Thus, asynchronous AM is less ecient than synchronous AM
However, the receiver is easier and cheaper to build
As m 1, more of the transmitter power is used for the baseband
signal x(t)
As m 0, the signal is easier to demodulate with an envelope
detector

J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

28

Single Sideband AM
Y (j)

1
2

-c -x -c -c +x

c -x

c +x

Let us dene the bandwidth of the signal as x , the highest


frequency component of the signal
The signal transmitted requires twice the bandwidth, 2x
Near c , the signal content for both negative and positive
frequencies is transmitted
We dont need this much information to reconstruct X(j)
If we know X(j) for either positive or negative frequencies, we
can use symmetry to construct the other part
Thus, we only need to transmit one of the sidebands
J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

29

Single Sideband AM Continued


Y (j)

1
2

-c -c +x

c -x

What we have discussed so far uses double-sideband modulation


We can use single-sideband modulation by removing the upper or
lower sidebands
Requires only half the bandwidth!
An obvious approach: lowpass (to retain lower sidebands) or
highpass lter (to retain upper sidebands)
Requires a nearly ideal high-frequency lter
SSB modulation increases the cost of the transmitter
If asynchronous modulation is used, it also increases the cost and
complexity of the receiver

J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

30

Frequency-Division Multiplexing
1

X1 (j)

X2 (j)

X3 (j)

1
2

Y (j)

We can transmit multiple signals using a single transmitting


antenna with frequency-division multiplexing (FDM)
Each baseband signal is shifted to a dierent frequency band
Thus, multiple baseband signals can be transmitted
simultaneously over a single wideband channel
The dierent modulated signals y1 (t), y2 (t), and y3 (t) are simply
summed before sending to the antenna
To recover a specic signal, the corresponding frequency band
usually is extracted with a bandpass lter

J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

31

Time-Division Multiplexing
The sampling theorem tells us we can represent any bandlimited
signals by its samples x(nT ) as long as s > 2x
Thus we can convert multiple bandlimited signals into
discrete-time signals: x1 (t) x1 [n], x2 (t) x2 [n],
x3 (t) x3 [n]
Time-Division multiplexing interleaves these signals to form a
composite signal
. . . x1 [0], x2 [0], x3 [0], x1 [1], x2 [1], x3 [1], x1 [2], x2 [2], x3 [2] . . .
A dierent time interval is assigned to each signal
We could then form a continuous-time signal using bandlimited
interpolation
If M signals are multiplexed and each signal has a bandwidth of
x , the multiplexed signal y(t) will require a bandwidth of M x

J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

32

Example 5: Time-Division Multiplexing


Example of TimeDivision Multiplexing

x [n]

1
0.5
0
0

10

11

10

11

10

11

x [n]

1
0.5
0

x [n]

1
0.5
0

y[n]

1
0.5
0
0

J. McNames

10

Portland State University

15

ECE 223

20

25

Communications

30

Ver. 1.11

33

Example 5: MATLAB Code


function [] = TDMultiplexing();
close all;
N

= 10;

% No. samples

k
x1
x2
x3

=
=
=
=

1:N;
rand(N,1);
rand(N,1);
rand(N,1);

y
k1
k2
k3

=
=
=
=

zeros(3*N,1);
1:3:3*N;
2:3:3*N;
3:3:3*N;

y(k1) = x1;
y(k2) = x2;
y(k3) = x3;
wc
T
t
n

=
=
=
=

pi;
1; % Sample rate
0:0.01:3*N+1;
1:3*N;

yr = zeros(size(t)); % Reconstructed signal


for cnt = 1:length(n),
yr = yr + (wc*T/pi)*y(cnt)*sinc(wc*(t-n(cnt)*T)/pi);
end;
figure;
FigureSet(1,LTX);
subplot(4,1,1);
h = stem(k,x1,g);
set(h(1),MarkerSize,2);

J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

34

set(h(1),MarkerFaceColor,g);
hold off;
xlim([0 N+1]);
ylim([0 1.05]);
ylabel(x_1[n]);
title(Example of Time-Division Multiplexing);
box off;
subplot(4,1,2);
h = stem(k,x2,b);
set(h(1),MarkerSize,2);
set(h(1),MarkerFaceColor,b);
hold off;
xlim([0 N+1]);
ylim([0 1.05]);
ylabel(x_2[n]);
box off;
subplot(4,1,3);
h = stem(k,x3,r);
set(h(1),MarkerSize,2);
set(h(1),MarkerFaceColor,r);
hold off;
xlim([0 N+1]);
ylim([0 1.05]);
ylabel(x_3[n]);
box off;
subplot(4,1,4);
h = plot(t,yr,k);
hold on;
h = stem(k1,y(k1),g);
set(h(1),MarkerSize,2);
set(h(1),MarkerFaceColor,g);
set(h(3),Visible,Off);
h = stem(k2,y(k2),b);
set(h(1),MarkerSize,2);
set(h(1),MarkerFaceColor,b);
set(h(3),Visible,Off);
h = stem(k3,y(k3),r);

J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

35

set(h(1),MarkerSize,2);
set(h(1),MarkerFaceColor,r);
set(h(3),Visible,Off);
hold off;
xlim([0 3*N+1]);
ylim([-0.3 1.3]);
ylabel(y[n]);
box off;
AxisLines;
AxisSet(6);
print -depsc TDMultiplexing;

J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

36

Pulse Amplitude Modulation


T
x(t)

y(t)

+


y(t) =

x(nT ) p(t nT )

n=

p(t)

In modern communication systems, the baseband signal x(t) is


rst sampled to form x(nT ) in accord with the sampling theorem
In a pulse-amplitude modulation (PAM) system, each sample is
multiplied by a pulse p(t)
Time-division multiplexing can be easily combined with PAM
Thus we could use p(t) = sinc( tw
) to ensure y(t) is bandlimited
to w
We require w > 2x =

2
T

to satisfy the sampling theorem

AM could then be used to shift this to any frequency band

J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

37

Pulse-Code Modulation
T
x[n]

Sign

x(t)

Modulation/
Demodulation

T
r(t)

r[n]

Sign

p(t)

In practice, digital systems encode discrete-time signals with


discrete amplitudes
Most digital signal processing (DSP) uses discrete-valued signals
Continuous-valued signals are converted to discrete-valued signals
using analog-to-digital (ADC) converters
Discrete-valued signals can be encoded using binary 1s and 0s
These discrete signals can be transmitted over a communications
channel by transmitting
0: Transmit p(t)
1: Transmit +p(t)

J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

38

Example 6: PCM
Create a random digital (discrete-time and discrete-valued) signal
consisting of fty 0s and 1s. Encode the baseband signal x(t) such
that the bandwidth is limited to 100 Hz. What is the minimum time
required to transmit the signal? Plot the discrete-time signal x[n], the
baseband encoded signal x(t), and an eye diagram of the
overlapping received pulses. Assume that the channel does not cause
any distortion and that the receiver and transmitter sampling times are
synchronized. Hint: recall that


W
tW
PW (j)
sinc

J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

39

Example 6: Workspace

J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

40

Example 6: Plot of x[n] and x(t)


Example of PulseCode Modulation
1

0.6

x [n]

0.8

0.4
0.2
0
0

10

0.01

0.02

0.03

0.04

0.05

0.06

0.07

0.08

0.09

0.1

11

x(t)

1
0
1
2

J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

41

Example 6: Eye Diagram


Eye Diagram

2
1.5
1

x(t)

0.5
0
0.5
1
1.5
2
0.01

J. McNames

0.008

0.006

0.004

0.002

Portland State University

0
0.002
Time (sec)

ECE 223

0.004

0.006

Communications

0.008

0.01

Ver. 1.11

42

Example 6: MATLAB Code


function [] = PCMEx();
close all;
N = 50;
% No. samples
n = 1:N;
% Discrete-time index
xd = (rand(N,1)>0.5); % Digital signal
wc
T
Ts
t

=
=
=
=

2*pi*50;
% Limit pulse bandwidth to 100 Hz (-50 to 50)
pi/wc;
% Sample period
0.0005;
0:Ts:(N+1)*T;

figure;
FigureSet(1,LTX);
subplot(2,1,1);
h = stem(n,xd,b);
set(h(1),MarkerSize,2);
set(h(1),MarkerFaceColor,b);
hold off;
xlim([0 11]);
ylim([0 1.05]);
ylabel(x_1[n]);
title(Example of Pulse-Code Modulation);
box off;
subplot(2,1,2);
xc = zeros(size(t)); % Modulated signal x(t)
for cnt = 1:length(n),
s = -1*(xd(cnt)==0) + 1*(xd(cnt)==1);
p = s*sinc(wc*(t-n(cnt)*T)/pi);
plot(t,p,b);
hold on;
xc = xc + p;
end;
plot(t,xc,g);

J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

43

plot(n*T,-1*(xd==0)+1*(xd==1),ro,MarkerSize,2,MarkerFaceColor,r);
hold off;
xlim([0 11*T]);
ylabel(x(t));
box off;
AxisLines;
AxisSet(6);
print -depsc PCMSignals;
figure;
FigureSet(2,LTX);
for cnt = 1:length(n),
k = -round(T/Ts):round(T/Ts);
plot(k*Ts,xc(round(n(cnt)*T/Ts)+k+1));
hold on;
end;
hold off;
xlim([min(k*Ts) max(k*Ts)]);
ylabel(x(t));
xlabel(Time (sec));
title(Eye Diagram);
box off;
AxisSet(6);
AxisLines;
print -depsc PCMEyeDiagram;

J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

44

Example 6: MATLAB Code


function [] = PCMEx();
close all;
N = 50;
% No. samples
n = 1:N;
% Discrete-time index
xd = (rand(N,1)>0.5); % Digital signal
wc
T
Ts
t

=
=
=
=

2*pi*50;
% Limit pulse bandwidth to 100 Hz (-50 to 50)
pi/wc;
% Sample period
0.0005;
0:Ts:(N+1)*T;

figure;
FigureSet(1,LTX);
subplot(2,1,1);
h = stem(n,xd,b);
set(h(1),MarkerSize,2);
set(h(1),MarkerFaceColor,b);
hold off;
xlim([0 11]);
ylim([0 1.05]);
ylabel(x_1[n]);
title(Example of Pulse-Code Modulation);
box off;
subplot(2,1,2);
xc = zeros(size(t)); % Modulated signal x(t)
for cnt = 1:length(n),
s = -1*(xd(cnt)==0) + 1*(xd(cnt)==1);
p = s*sinc(wc*(t-n(cnt)*T)/pi);
plot(t,p,b);
hold on;
xc = xc + p;
end;
plot(t,xc,g);

J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

45

plot(n*T,-1*(xd==0)+1*(xd==1),ro,MarkerSize,2,MarkerFaceColor,r);
hold off;
xlim([0 11*T]);
ylabel(x(t));
box off;
AxisLines;
AxisSet(6);
print -depsc PCMSignals;
figure;
FigureSet(2,LTX);
for cnt = 1:length(n),
k = -round(T/Ts):round(T/Ts);
plot(k*Ts,xc(round(n(cnt)*T/Ts)+k+1));
hold on;
end;
hold off;
xlim([min(k*Ts) max(k*Ts)]);
ylabel(x(t));
xlabel(Time (sec));
title(Eye Diagram);
box off;
AxisSet(6);
AxisLines;
print -depsc PCMEyeDiagram;

J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

46

Example 7: Noise Tolerance of PCM


Repeat the previous example, but this time assume that the channel
adds noise that is uniformly distributed between -0.5 and 0.5. Can you
still accurately receive the signal?

J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

47

Example 7: Plot of x[n] and x(t)


Example of PulseCode Modulation

x [n]

0.5

0
0

10

0.01

0.02

0.03

0.04

0.05

0.06

0.07

0.08

0.09

0.1

0.01

0.02

0.03

0.04

0.05

0.06

0.07

0.08

0.09

0.1

11

x(t)

2
4
r(t)

2
0
2

J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

48

Example 7: Eye Diagram


Eye Diagram

x(t)

3
0.01

J. McNames

0.008

0.006

0.004

0.002

Portland State University

0
0.002
Time (sec)

ECE 223

0.004

0.006

0.008

Communications

0.01

Ver. 1.11

49

Example 7: MATLAB Code


function [] = PCMNoisEx();
close all;
N = 50;
% No. samples
n = 1:N;
% Discrete-time index
xd = (rand(N,1)>0.5); % Digital signal
wc
T
Ts
t
nt

=
=
=
=
=

2*pi*50;
% Limit pulse bandwidth to 100 Hz (-50 to 50)
pi/wc;
% Sample period
0.0002;
0:Ts:(N+1)*T;
n*(T/Ts);

figure;
FigureSet(1,LTX);
subplot(3,1,1);
h = stem(n,xd,b);
set(h(1),MarkerSize,2);
set(h(1),MarkerFaceColor,b);
hold off;
xlim([0 11]);
ylim([0 1.05]);
ylabel(x_1[n]);
title(Example of Pulse-Code Modulation);
box off;
subplot(3,1,2);
xc = zeros(size(t)); % Modulated signal x(t)
for cnt = 1:length(n),
s = -1*(xd(cnt)==0) + 1*(xd(cnt)==1);
p = s*sinc(wc*(t-n(cnt)*T)/pi);
plot(t,p,b);
hold on;
xc = xc + p;
end;

J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

50

plot(t,xc,g);
plot(n*T,-1*(xd==0)+1*(xd==1),ro,MarkerSize,2,MarkerFaceColor,r);
hold off;
xlim([0 11*T]);
ylabel(x(t));
box off;
AxisLines;
subplot(3,1,3);
r = xc + (rand(size(xc))-0.5); % Add noise to the received signal
plot(t,r,b);
hold on;
plot(n*T,r(1+n*round(T/Ts)),ro,MarkerSize,2,MarkerFaceColor,r);
plot(t,xc,g);
hold off;
xlim([0 11*T]);
ylabel(r(t));
box off;
AxisLines;
AxisSet(6);
print -depsc PCMNoiseSignals;
figure;
FigureSet(2,LTX);
for cnt = 1:length(n),
k = -round(T/Ts):round(T/Ts);
plot(k*Ts,r(n(cnt)*round(T/Ts)+k+1));
hold on;
end;
hold off;
xlim([min(k*Ts) max(k*Ts)]);
ylabel(x(t));
xlabel(Time (sec));
title(Eye Diagram);
box off;
AxisSet(6);
AxisLines;
print -depsc PCMNoiseEyeDiagram;

J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

51

Example 8: Communication System


Design a system (transmitter and receiver) that transmits a stereo
audio signal through a channel in the frequency band of 1.2 MHz
40 kHz. Discuss the design tradeos of dierent approaches to this
problem and sketch the spectrum of signals at each stage of the
process.

J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

52

Example 8: Workspace 1

J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

53

Example 8: Workspace 2

J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

54

Sinusoidal Angle Modulation


c(t) = A cos (c t + c )

c(t) = A cos ((t))

So far we have discussed dierent types of amplitude modulation


Angle Modulation alters the angle of the carrier signal rather
than the amplitude
Dene the instantaneous angle of the carrier signal c(t) as (t)
There are two forms of angle modulation
Phase modulation (PM): (t) = c t + 0 + kp x(t)
Frequency modulation (FM):

d(t)
dt

= c + kf x(t)

Note that for FM, (t) = (c + kf x(t)) t

J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

55

Angle Modulation Versus Amplitude Modulation


Angle Modulation (say FM) versus Amplitude Modulation (AM)
+ One advantage of FM is that the amplitude of the signal
transmitted can always be at maximum power
+ FM is also less sensitive to many common types of noise than AM
- However, FM generally requires greater bandwidth than AM

J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

56

Example 9: Angle Modulation


Create a random signal bandlimited to 1 Hz and amplitude limited
to one (e.g. |x(t)| 1). Modulate the signal use PM and FM with a
carrier frequency of 3 Hz. Use kp = 3 and kf = 4. Plot the baseband
signal, the carrier signal, and the modulated signals.

J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

57

Example 9: Signal Plot


Example of Sinusoidal AM Modulation

x(t)

1
0
1

c(t)

5
Time (s)

5
Time (s)

0
1

PM

1
0
1

FM

1
0
1

J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

58

Example 9: MATLAB Code


%function [] = AngleModulation();
close all;
N
fc
fs
fx
kp
kf

=
=
=
=
=
=

500;
3;
50;
1;
3;
2*pi*2;

%
%
%
%
%
%

No. samples
Carrier frequency (Hz)
Sample rate (Hz)
Bandlimit of baseband signal
PM scaling coefficient
FM scaling coefficient

wc = 2*pi*fc;
k
t

= 1:N;
= (k-1)/fs;

xh
[n,wn]
[b,a]
x
x

=
=
=
=
=

randn(1,N); % Random high-frequency signal


ellipord(0.95*fx/(fs/2),fx/(fs/2),0.5,60);
ellip(n,0.5,60,wn);
filter(b,a,xh); % Lowpass filter to create baseband signal
x/max(abs(x)); % Scale so maximum amplitude is 1

c = cos(wc*t); % Carrier signal


yp = cos(wc*t + kp*x);
theta = cumsum(wc + kf*x)/fs; % Approximate integral of angle
yf = cos(theta);
figure;
FigureSet(1,LTX);
subplot(4,1,1);
h = plot(t,x,b);
set(h,LineWidth,0.2);
xlim([0 max(t)]);
ylabel(x(t));
title(Example of Sinusoidal AM Modulation);

J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

59

box off;
AxisLines;
subplot(4,1,2);
h = plot(t,c,b);
set(h,LineWidth,0.2);
xlim([0 max(t)]);
ylabel(c(t));
box off;
AxisLines;
subplot(4,1,3);
h = plot(t,yp,b);
set(h,LineWidth,0.2);
xlim([0 max(t)]);
xlabel(Time (s));
ylabel(PM);
box off;
AxisLines;
subplot(4,1,4);
h = plot(t,yf,b);
set(h,LineWidth,0.2);
xlim([0 max(t)]);
xlabel(Time (s));
ylabel(FM);
box off;
AxisLines;
AxisSet(6);
print -depsc AngleModulation;

J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

60

Relationship of Angle and Frequency Modulation


d(t)
= c + kf x(t)
dt

(t) = c t + 0 + kp x(t)
These two forms are easily related.

PM with x(t) is equivalent to FM with


FM with x(t) is equivalent to PM with

dx(t)
dt
t
x( ) d
0

For c(t), instantaneous frequency is dened as


i (t)

d(t)
dt

Frequency modulation: i (t) = c + kf x(t)


Phase modulation: i (t) = c + kp dx(t)
dt

J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

61

Frequency Modulation
Consider a sinusoidal baseband signal x(t) = A cos(x t)
This models a bandlimited signal limited to x
i (t) = c + kf A cos(x t)
Then
The instantaneous frequency varies between c + kf A and
c kf A
The modulated signal is then of the form




 t

x( ) d = cos c t +
sin(x t) + 0
y(t) = cos c t + kf
x

Dene the following variables



m
x

kf A
m is called the modulation index

J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

62

Narrowband Frequency Modulation


y(t)

cos(c t + m sin(m t))

= cos(c t) cos(m sin(m t)) sin(c t) sin(m sin(m t))


When m is small (m 2 ), this is called narrowband FM modulation
and we may use the following approximations.
cos(m sin(m t)) 1

sin(m sin(m t)) m sin(m t)

Thus
y(t)

J. McNames

= cos(c t) m sin(c t) sin(m t)


= cos(c t) m
2 cos(c t m t) +

Portland State University

ECE 223

m
2

cos(c t + m t)

Communications

Ver. 1.11

63

Narrowband Frequency Modulation Continued


Y (j)

A
2

-c -x -c -c +x

-c +x
-c -x -c

c -x

c +x

Y (j)

m/2

c -x
c

m/2

c +x

Like AM, spectrum contains sidebands


Unlike AM, sidebands are out of phase by 180
Bandwidth is twice that of x(t) like double-sideband AM
Carrier frequency is present and strong

J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

64

Example 10: Angle Modulation


Create a sinusoidal baseband signal with a fundamental frequency of
1 Hz and a carrier sinusoidal signal at 12 Hz. Plot these signals and
the modulated signals after applying amplitude modulation and
frequency modulation. Use a scaling factor kf = 1 and a modulation
index of m = 0.5. Solve for the baseband signal amplitude A.

J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

65

Example 10: Signal Plot


Example of Sinusoidal AM and FM Modulation

x(t)

5
0
5

c(t)

0.6

0.4

0.2

0.2

0.4

0.6

0.6

0.4

0.2

0.2

0.4

0.6

0.6

0.4

0.2

0
Time (s)

0.2

0.4

0.6

0.6

0.4

0.2

0
Time (s)

0.2

0.4

0.6

0
1

AM

5
0
5

FM

1
0
1

J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

66

Example 10: Relevant MATLAB Code


%function [] = AMFM();
close all;
fx
fc
fs
kf
m

=
=
=
=
=

1;
15;
100;
1;
0.5;

%
%
%
%
%

Signal frequency (Hz)


Carrier frequency (Hz)
Sampling frequency
FM scaling coefficient
Modulation index

wx = 2*pi*fx; % Signal frequency (rad/s)


wc = 2*pi*fc; % Carrier frequency (rad/s)
A = m*wx/kf; % Modulating amplitude
t = -0.75:0.001:0.75;
x
c
ya
yf

= A*cos(wx*t); % Baseband signal


= cos(wc*t);
% Carrier signal
= x.*c;
% Amplitude modulated signal
= cos(wc*t + m*sin(wx*t));

figure;
FigureSet(1,LTX);
subplot(4,1,1);
h = plot(t,x,b);
set(h,LineWidth,0.2);
xlim([min(t) max(t)]);
ylabel(x(t));
title(Example of Sinusoidal AM and FM Modulation);
box off;
AxisLines;
subplot(4,1,2);
h = plot(t,c,b);
set(h,LineWidth,0.2);
xlim([min(t) max(t)]);

J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

67

ylabel(c(t));
box off;
AxisLines;
subplot(4,1,3);
h = plot(t,ya,b,t,x,r,t,-x,g);
set(h,LineWidth,0.2);
xlim([min(t) max(t)]);
xlabel(Time (s));
ylabel(AM);
box off;
AxisLines;
subplot(4,1,4);
h = plot(t,yf,b);
set(h,LineWidth,0.2);
xlim([min(t) max(t)]);
xlabel(Time (s));
ylabel(FM);
box off;
AxisLines;
AxisSet(6);
print -depsc AMFM;

J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

68

Summary
Modulation is the process of embedding one signal in another with
desirable properties for communication
Most forms of modulation are nonlinear
Sinusoidal AM is relatively simple and inexpensive
Synchronous AM is more ecient than asynchronous AM, but is
also more expensive
FM is more tolerant of noise than FM, but requires more
bandwidth and cost
Filters and frequency analysis using the Fourier transform have a
crucial role in communication systems
Frequency- (FDM) and time-division (TDM) multiplexing can be
used to merge multiple bandlimited signals into a single composite
signal with a larger bandwidth

J. McNames

Portland State University

ECE 223

Communications

Ver. 1.11

69

Vous aimerez peut-être aussi