You are on page 1of 13

A brief analysis of analog and digital communication system and

their simulation using MATLAB


A. Introduction:
Matlab is a numerical computing environment and a 4 generation programming language. It
is a high level language and interactive environment that enables users to perform intensive
calculations based tasks very fast. Developed by Mathworks. Matlab has gain high popularity
as soft computing tool among scientists and engineers because of its ability to
implementation of algorithms, creation of user interfaces, interfacing with programs and
easier to show the results graphically. In this chapter, some modulation schemes has been
discussed and their simulated results using Matlab are shown.
Communication system is a well known subject of study for electronics, electrical, computer
science and physics students and researchers. Different modulation techniques are
important in all aspects of communication system. A brief description of the modulation
techniques and their realization using Matlab has been provided here. Figure (1) shows a
basic communication system block diagram.
th

Figure 1:

Basic block diagram of a Communication system:

As shown in figure 1, the message signal to be transmitted is provided by the source. Then
this signal is modulated by the modulator block and is transmitted. Modulation is process by
which some characteristics of a high frequency carrier signal is varied in accordance with the
message signal. While the signal travels through the channel, the signal gets corrupted by
noise. Then this signal is demodulated at the receiver section and the message signal is
recovered. There are generally two types of communication techniques, analog
communication and digital communication. In both the communication types there involves
different types of modulation techniques. The different modulation techniques are discussed
below.

B. Analog Communication technique.


In analog communication technique, mainly involves the analog modulation techniques.
There are two types of analog modulation techniques- amplitude modulation and angle
modulation.
i.
Amplitude modulation

Figure 2. A double sideband full carrier amplitude modulation waveform.


In AM, the information signal varies the amplitude of the carrier sine wave. The
instantaneous value of the carrier amplitude changes in accordance with the amplitude and
frequency variations of the modulating signal. Figure 2 shows an amplitude modulated
waveform.
Consider a sinusoidal carrier, c(t) and message wave, m(t) given by
c(t)= Ac sin(2fct) and m(t)=Am sin(2fmt).
An AM wave may be described as function of time by,
S(t)= (Ac+m(t)) sin(2fct)
=Ac(1+Am/Ac (sin (2fmt))) sin(2fct)
Where, Am/Ac is a constant called the modulation index and denoted generally by ..
This type of modulation can be demodulated by envelope detector.

Syntax
Amplitude modulation

y = ammod(x,Fc,Fs)
y = ammod(x,Fc,Fs,ini_phase)
y = ammod(x,Fc,Fs,ini_phase,carramp)
y = ammod(x,Fc,Fs) uses the message signal x to modulate a carrier signal with frequency Fc (Hz) using
amplitude modulation. The carrier signal and x have sample frequency Fs (Hz). The modulated signal has zero
initial phase and zero carrier amplitude, so the result is suppressed-carrier modulation.
Note: The x, Fc, and Fs input arguments must satisfy Fs > 2(Fc + BW), where BW is the bandwidth of the modulating signal x.

y = ammod(x,Fc,Fs,ini_phase) specifies the initial phase in the modulated signal y in radians.


y = ammod(x,Fc,Fs,ini_phase,carramp) performs transmitted-carrier modulation instead of
suppressed-carrier modulation. The carrier amplitude is carramp.
Amplitude demodulation
z = amdemod(y,Fc,Fs)
z = amdemod(y,Fc,Fs,ini_phase)
z = amdemod(y,Fc,Fs,ini_phase,carramp)
z = amdemod(y,Fc,Fs,ini_phase,carramp,num,den)
z = amdemod(y,Fc,Fs) demodulates the amplitude modulated signal y from a carrier signal
with frequency Fc (Hz). The carrier signal and y have sample frequency Fs (Hz). The
modulated signal y has zero initial phase and zero carrier amplitude, so it represents
suppressed carrier modulation. The demodulation process uses the lowpass filter specified
by [num,den] = butter(5,Fc*2/Fs).
Note: The Fc and Fs arguments must satisfy Fs > 2(Fc + BW), where BW is the bandwidth of the original
signal that was modulated.
z = amdemod(y,Fc,Fs,ini_phase) specifies the initial phase of the modulated signal in
radians.
z = amdemod(y,Fc,Fs,ini_phase,carramp) demodulates a signal that was created via
transmitted carrier modulation instead of suppressed carrier modulation. carramp is the
carrier amplitude of the modulated signal.
z = amdemod(y,Fc,Fs,ini_phase,carramp,num,den) specifies the numerator and denominator
of the lowpass filter used in the demodulation.
ii.

Double Sideband Suppressed Carrier Amplitude Modulation (DSB-SC


AM).

This form of modulation scheme is generated by using a product modulator that simply
multiplies the message signal m(t) with the carrier signal c(t) using a product modulator. The
modulated signal is given by
S(t)=Acm(t) sin(2fct)
The message signal m(t) is completely recovered by first multiplying S(t) with a locally
generated sinusoidal wave and then low pass filtering the product. The locally generated
sinusoidal wave is coherent or synchronized, in both frequency and phase, with the carrier
wave c(t) used in product modulator to generate S(t). In Figure 3, DSB-SC AM scheme along
with the message and the carrier wave is shown.

Figure 3: A DSB-SC modulated and demodulated waveform


iii.
Frequency Modulation
Frequency modulation is a form of analog angle modulation in which the baseband
information carrying signal, typically called the message or information signal m(t), varies
the frequency of a carrier wave. Audio signals transmitted by FM radio communications are
the most common. FM radio stations broadcast between radio frequencies of 88 MHz to 108
MHz with a channel bandwidth of 200 kHz.

Figure 4. FM Generation with a VCO


The simplest approach to generating FM signals is to apply the message signal directly to a
voltage-controlled oscillator (VCO) as shown in Figure 4. A voltage message signal, m(t), is

applied to the control voltage of the VCO, and the output signal, FM(t), is a constant
amplitude sinusoidal carrier wave whose frequency is ideally a linear function of its control
voltage. When there is no message or the message signal is zero, the carrier wave is at its
center frequency, fc . When a message signal exists, the instantaneous frequency of the
output signal varies above and below the center frequency and is expressed by
fi(t)=fc + KVCO*m(t)
where, KVCO is the voltage-to-frequency gain of the VCO expressed in units of Hz/V, and the
quantity, KVCO*m(t), is the instantaneous frequency deviation. The instantaneous phase of
the output signal is equal to 2 multiplied by the integral of the instantaneous frequency as
shown below,
t

i ( t )=2 f c t+2 K VCO m( t)dt


0

where the initial condition of the phase is assumed to be zero for simplicity. Hence, the FM
output signal, FM(t), is given by the following equation

( 2 f m t)
K VCO A m
sin
(2 f c t )+ f
m
FM ( t ) =A c cos
Finally we get,

(2 f m t )
( 2 f c t ) + sin
FM ( t )=A c cos
Here we have assumed that m(t)= C

f
The quantity = f m

os (2 f m t ) .

is the modulation index. f =

K VCO Am , represents the peak

frequency deviation of the FM signal from the center frequency and is directly proportional
to the amplitude of the message signal and the gain of the VCO. This quantity, f, is called
the maximum instantaneous frequency deviation. Depending on value of , there are two
types of frequency modulation, narrow band FM and wide band FM. The simulated result for
frequency modulation is shown in figure (5) and in figure (6) shows the magnitude spectrum
of a narrow band FM.

Figure 5: Frequency modulation

Syntax
Frequency modulation
y = fmmod(x,Fc,Fs,freqdev)
y = fmmod(x,Fc,Fs,freqdev,ini_phase)
y = fmmod(x,Fc,Fs,freqdev) modulates the message signal x using frequency modulation.
The carrier signal has frequency Fc (Hz) and sampling rate Fs (Hz), where Fs must be at
least 2*Fc. The freqdev argument is the frequency deviation constant (Hz) of the modulated
signal.
y = fmmod(x,Fc,Fs,freqdev,ini_phase) specifies the initial phase of the modulated signal, in
radians

Figure 6. Magnitude spectrum of FM


Frequency demodulation

z = fmdemod(y,Fc,Fs,freqdev)
z = fmdemod(y,Fc,Fs,freqdev,ini_phase)
z = fmdemod(y,Fc,Fs,freqdev) demodulates the modulating signal z from the carrier signal using
frequency demodulation. The carrier signal has frequency Fc (Hz) and sampling rate Fs (Hz), where Fs must be at
least 2*Fc. The freqdev argument is the frequency deviation (Hz) of the modulated signal y.
z = fmdemod(y,Fc,Fs,freqdev,ini_phase) specifies the initial phase of the modulated signal, in
radians.

C.

Digital Modulation Technique

i.
Pulse code modulation (PCM)
PCM is a method of converting an analog into digital signals. Information in an analog form
cannot be processed by digital computers so it's necessary to convert them into digital form.
PCM is a term which was formed during the development of digital audio transmission
standards. Digital data can be transported robustly over long distances unlike the analog
data and can be interleaved with other digital data so various combinations of transmission
channels can be used. In the text which follows this term will apply to encoding technique
which means digitalization of analog information in general. As shown in the figure bellow a
PCM system comprises of sampler, quantizer and encoder. A low pass filter is used before
sampler to band limit the signal. For example if the bits for PCM modulation is 3, then the
quantization levels is 23=8, which is 8 steps. If the bits are for PCM is 4, then the
quantization level is 24=16, which is 16 steps. The increasing of bits of PCM modulation will
prevent the signal from distortion, but the bandwidth will also increase due to the increasing
of the capacity of data. The simulated result of pulse code modulated scheme is shown in
figure (8).

Figure 7: Pulse Code Modulation Block Diagram

Figure 8: Pulse Code Modulation (Sampling and Quantization)


ii.
Delta Modulation
The operation of a delta modulator is to periodically sample the input message, to make a
comparison of the current sample with that preceding it, and to output a single bit which
indicates the sign of the difference between the two samples.
Delta Modulation is a technique, which provides a staircase approximation to an oversampled version of the message signal (analog input). Sampling is done at a rate higher
than the Nyquist rate which aims at increasing the correlation between adjacent samples;
simplifies quantizing of the encoded signal. we can express the basic principles of the delta
modulation in a mathematical form as follow

e [ n ] =m [ n ]mq [ n1 ] (1)
e q= sgn ( e [ n ] ) (2)
mq [ n ] =mq [ n1 ] +e q [ n ] (3)

Where, e[n] is the error signal representing the difference between present sample m[n] of
the input signal and the latest approximation

mq [n1]

to it,

e q [n]

is the quantized

version of the e[n], and sgn(.)is the signum function. Finally, the quantizer output
is coded to produce the delta modulated signal.
The quantizer output is applied to an accumulator, producing the result
n

i=1

i=1

mq [ n ] = sgn ( e [ i ] )= eq [i]
The simulated result of delta modulated scheme is shown in figure (10).

Figure 9: Delta Modulator and Demodulator

mq [n]

Figure 10: Delta Modulation with different delta size.

iii.
Pass band Modulation Schemes.
There are three basic ways of modulating a sine wave carrier for binary digital modulation,
they are called binary amplitude-shift keying (BASK), binary frequency-shift keying (BFSK)
and binary phase shift keying (BPSK). Modulation also leads to the possibility of frequency
multiplexing. In a frequency-multiplexed system, individual signals are transmitted over
adjacent, non overlapping frequency bands. They are therefore transmitted in parallel and
simultaneously in time. If we operate at higher carrier frequencies, more bandwidth is
available for frequency-multiplexing more signals.
a. Amplitude Shift keying (ASK)
A binary amplitude-shift keying (BASK) signal can be defined by
s(t) = A m(t) cos 2fct,
0<t<T
where,
A is a constant, m(t) = 1 or 0, fc is the carrier frequency, and T is the bit duration. It has a
power P = A2/2, so that A=
S(t)=

2 E /T

2 P

. Thus equation above can be written as

COS 2fct, E is bit energy.

The simulated result of ASK modulated scheme is shown in figure (11).

Figure 11: ASK Modulation Scheme


b. Frequency Shift Keying (FSK)
Binary FSK (usually referred to simply as FSK) is a modulation scheme typically used to send
digital information between digital equipment such as teleprinters and computers. The data
are transmitted by shifting the frequency of a continuous carrier in a binary manner to one
or the other of two discrete frequencies. One frequency is designated as the mark
frequency and the other as the space frequency. The mark and space correspond to binary
one and zero, respectively. By convention, mark corresponds to the higher radio frequency.
The simulated result of FSK modulated scheme is shown in figure (12).
Thus in binary FSK system symbol 1 and 0 are distinguished from each other by transmitting
one of two sinusoidal waves that differ in frequency by fixed amount. A typical pair of
sinusoidal wave is described by

s i ( t )=

2 E /T sin ( 2 f c t ) , 0 t T
0 elsewhere

Figure 12: FSK modulation Scheme


c. Binary Phase Shift Keying (BPSK)

In phase shift keying (PSK), the phase of a carrier is changed according to the
modulating waveform which is a digital signal. In BPSK, the transmitted signal is a
sinusoid of fixed amplitude. It has one fixed phase when the data is at one level and
when the data is at the other level, phase is different by 180 degree. A Binary Phase
Shift Keying (BPSK) signal can be defined as

S i ( t )=

2 E b /T b cos ( 2 f c t ) , For i=1


2 Eb /T b cos ( 2 f c t ) , For i=2

Thus the input bit 1 is mapped to S1(t) and 0 is mapped to S2(t). Eb and Tb are bit energy and
time duration of 1 bit respectively. The simulated result of BPSK modulated scheme is shown
in figure (13).
d. Quaternary Phase Shift Keying (QPSK)
This modulation scheme is very important for developing concepts of two dimensional I-Q
modulations as well as for its practical relevance. In a sense, QPSK is an expanded version
from binary PSK where in a symbol consists of two bits and two orthonormal basis functions
are used. A group of two bits is often called a dibit. So, four dibits are possible. Each
symbol carries same energy. The simulated result of QPSK modulated scheme is shown in
figure (14).
Let, E: Energy per Symbol and T: Symbol Duration = 2. T b, where Tb: duration of 1 bit. Then,
a general expression for QPSK modulated signal, without any pulse shaping, is:

S i ( t )=

( 2 i1 )
2E
cos 2 f c t+
, 0 t T , i=1,2,3,4
T
4

Figure 13: BPSK modulation Scheme


Syntax

Phase shift keying modulation

y = pskmod(x,M)
y = pskmod(x,M,ini_phase)
y = pskmod(x,M,ini_phase,symbol_order)
y = pskmod(x,M) outputs the complex envelope y of the modulation of the message signal x using phase
shift keying modulation. M is the alphabet size and must be an integer power of 2. The message signal must consist
of integers between 0 and M-1. The initial phase of the modulation is zero. If x is a matrix with multiple rows and
columns, the function processes the columns independently.
y = pskmod(x,M,ini_phase) specifies the initial phase of the modulation in radians.
y = pskmod(x,M,ini_phase,symbol_order) specifies how the function assigns binary words to
corresponding integers. Ifsymbol_order is set to 'bin' (default), the function uses a natural binary-coded
ordering. If symbol_order is set to 'gray', it uses a Gray constellation ordering.

Figure 14: QPSK modulation Scheme


Phase shift keying demodulation

z = pskdemod(y,M)
z = pskdemod(y,M,ini_phase)
z = pskdemod(y,M,ini_phase,symbol_order)
z = pskdemod(y,M) demodulates the complex envelope y of a PSK modulated signal. M is the
alphabet size and must be an integer power of 2. The initial phase of the modulation is zero. If y is a
matrix with multiple rows and columns, the function processes the columns independently.
z = pskdemod(y,M,ini_phase) specifies the initial phase of the modulation in radians.
z = pskdemod(y,M,ini_phase,symbol_order) specifies how the function assigns
binary words to corresponding integers. If symbol_order is set to 'bin' (default), the function uses
a natural binary-coded ordering. If symbol_order is set to 'gray', it uses a Gray-coded ordering.
References
[1] http://www.mathworks.com/access/helpdesk_r13/help/ toolbox/commblks/ref/simref7.html#611864
[2] http://www.mathworks.in/help/comm/ref/
[3] Teaching Digital and Analog Modulation to Undergradute Information Technology
Students Using Matlab and Simulink, M. Boulmalf, Y. Semmar, A. Lakas, and K. Shuaib,
[4] Communication System, Simon Haykin, 4th Edition, Wiley India Publication.

You might also like