Amplitude, Frequency, Pulse code modulation and Demodulation (com. lab)
1. EEE 310: COMMUNICATION LABORATORY — LAB PROJECT
Name of the Project:
Amplitude, Frequency, Pulse code modulation and Demodulation.
Group No: - 04
Course Code - EEE 310
Session - spring, 2013
Section - D
Submitted By:
Istiak Mahmood Ayon
ID - 021101005
Md. Abu Abdullah
ID - 021101003
Md. Hassan Imam
ID - 021092092
Shahrin Ahammad Shetu
ID - 021101027
2. Amplitude, Frequency, Pulse code modulation And Demodulation.
Introduction:
This project shows how amplitude, frequency and pulse code modulation and demodulation is
done through matlab code.
Amplitude modulation & demodulation: In AM, the amplitude of carrier signal will be varied
with amplitude of message signal.
From AM, we know that the amplitude modulated signal utilizes the amplitude of
message signal to modulate high frequency carrier signal. Therefore, when we receive the
amplitude modulation signal, we need to restore the audio signal. Figure 1-4 is the diagram of
amplitude demodulation.
Figure 1-4 Diagram of amplitude demodulator.
Frequency modulation & demodulation: In frequency modulation (FM), we utilize the
amplitude of audio signal to modulate the frequency of carrier signal. Frequency demodulator is
also called frequency discriminator, which can convert the variation of frequency to the
variation of linear voltage.
Figure: Frequency Demodulation
Pulse Code modulation & Reconstruction: PCM modulation is a kind of source coding. The
meaning of source coding is the conversion from analog signal to digital signal. First of all is the
3. low-pass filter, which is used to remove the noise in the audio signal. After that the audio signal
will be sampled to obtain a series of sampling values. Next, the signal will pass through a
quantizer to quantize the sampling values. Then the signal will pass through an encoder to
encode the quantization values and then convert to digital signal
Process:
In this project, using some necessary inputs we will try to construct a matlab code for
amplitude, frequency, pulse code modulation and reconstruction at a time. At first, a user has
to input six data which is: -
(i) Message signal amplitude ( )
(ii) Message signal frequency ( )
(iii) Carrier signal amplitude ( )
(iv) Carrier signal frequency ( )
(v) Sampling frequency ( ) and
(vi) Number if bit (b)
(i)Process of amplitude modulation & demodulation.
Let the audio signal be m (t) = cos (2π t) and carrier signal C (t) = cos (2π t). Then the
amplitude modulation can be expressed as –
(t) =m (t) x C(t)
= ( cos(2π t)) x ( cos (2π t))
Here we use matlab predefine function ‘ammod’.
y = ammod(x,Fc,Fs,ini_phase,carramp) 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).
For AM demodulation we use matlab predefine function ’amdemod’.
z = amdemod(y,Fc,Fs,num,den) 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 phases 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).
(ii)Process of frequency modulation & demodulation.
Let the audio signal be cos (2π t) and carrier signal be cos (2π t), then the frequency
modulation can be expressed as: -
4. (t) = cos[2π t+βsin(2π t)]
Here, modulation index =
For FM demodulation we use matlab predefine function ’fmdemod’.
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.
(iii)Process of PCM & reconstruction.
Sampling: For sampling, we use sampling frequency , which will be taken as input.Then we
take time = 0 to 1 using interval of 1/ . Then we sample the signal below
Xs =
Quantization: For quantization, we know we know, L = [Where L = quantization level & b =
no. of bits per sample]. Then we use step size and determine the quantized
signal ‘q’
Encoding: In matlab we use predefine function ‘de2bi’ for converting the decimal values to
binary number.
Reconstruction: To re construct the signal, we use matlab predefine functions ‘reshape’ that
reshapes array and ‘bi2de’ to convert the index in decimal form. Here we only reduce the
quantization effect but the sampling effect is still present.
Outputs:
Message signal m(t)
8. Decoded signal
Limitation
In this project although we have tried our best to make it error less but still there are some
limitations. Limitations are given below-
1) As we use one sinusoidal message signal, the program cannot work for square or
triangular wave shapes.
2) This program cannot fully reconstruct the original signal. It only reduces the
quantization effect. The effect of sampling is still present in the decoded signal.
Conclusion
In conclusion we can say that, we have tried to develop a program that takes some inputs and
does amplitude, frequency modulation and demodulation and pulse code modulation and
reconstruction at a time for a single message signal. Although the program has some limitation
but still this program can be a very useful if further improvement and modification is done.