Ece Communication Lab Manual 2023
Ece Communication Lab Manual 2023
No:1
AMPLITUDE MODULATION AND DEMODULATION
AIM:
APPARATUS REQUIRED:
1. AM transmitter trainer kit
2. AM receiver trainer kit
3. CRO
4. Patch chords
THEORY:
Amplitude Modulation is a process by which amplitude of the carrier signal isvaried
in accordance with the inst ant aneous value of the modulat ing signal, but frequency
and phase of carrier wave remains constant.
1
MODEL GRAPH
2
TABULAR COLUMN:
PROCEDURE:
1. The circuit wiring is done as shown in diagram
2. A modulating signal input given to the Amplitude modulator
3. Now increase the amplitude of the modulating signal to the required level.
4. The amplitude and the time duration of the modulating signal are observed using
CRO.
5. Finally t h e a m p l i t u d e m o d u l a t e d o u t p u t is o b s e r v e d f r o m t h e
o u t p u t o f amplitude modulator stage and the amplitude and time duration of
the AM wave are noted down.
6. Calculate the modulation index by using the formula and verify them.
7. The f i n a l demodulated signal is viewed using a CRO at the output of audio
power amplifier stage. Also, the amplitude and time duration of the demodulated
wave are noted down.
RESULT:
The amplitude modulation circuit was designed and its modulation index was
calculated for various modulating voltages and was compared with theoretical values.
3
Ex. No: 2
AIM:
To study the characteristics of FM transmitter and receiver using trainer kit.
APPARATUS REQUIRED:
1. FM transmitter trainer kit
2. FM receive trainer
3. CRO
4. Patch chords
THEORY:
Frequency modulation (FM) is a form of modulation that represents information as
variations in the instantaneous frequency of a carrier wave. (Contrast this with amplitude
modulation, in which the amplitude of the carrier is varied while its frequency remains
constant.) In analog applications, the carrier frequency is varied in direct proportion to
changes in the amplitude of an input signal. Shifting the carrier frequency among a set of
discrete values can represent digital data, a technique known as frequency-shift keying. FM
is commonly used at VHF radio frequencies for high-fidelity broadcasts of music and speech
(see FM broadcast ing). Normal ( analog) TV s o u n d is a l s o b r o a d c a s t u s i n g
F M . A narrowband f o r m is u s ed for voice communications in commercial and amateur
radio settings. The type of FM used in broadcast is generally called wide-FM, or W-FM. In
two- way radio, narrowband narrow-FM (N-FM) is used to conserve bandwidth. In addition,
it is used to send signals into space.
FM is also used at intermediate frequencies by most analog VCR systems, including VHS, to
record the luminance (black and white) portion of the video signal. FM is the only feasible
method of recording video to and retrieving video from magnetic tape without extreme distortion,
as video signals have a very large range of frequency components — from a few hertz to several
megahertz, too wide for equalizers to work with due to electronic noise below -60 db. FM also
keeps the tape at saturation level, and therefore acts as a form of noise reduction, and a simple
limiter can mask variations in the playback output, and the FM capture effect removes print-
through and pre-echo. A continuous pilot-tone, if added to the signal — as was done on V2000
and many Hi-band formats — can keep mechanical jitter under control and assist time base
correction.
4
MODEL GRAPH:
5
TABULAR COLUMN:
INPUT SIGNAL
CARRIER SIGNAL
FM SIGNAL
DEMODULATED
SIGNAL
PROCEDURE:
RESULT:
Thus, them signal was transmitted using FM trainer kit and the FM signal detected usingFM
detector kit.
6
Ex. No: 3
PRE-EMPHASIS & DE-EMPHASIS
AIM:
APPARATUS REQUIRED:
4 CRO 20MHz 1
THEORY:
The noise has greater effect on high frequencies than on the lower ones. Thus, if the higher
frequencies were artificially boosted at the transmitter and correspondingly cut at the receiver, an
improvement in noise immunity could be expected, thereby increasing the SNR ratio. This
boosting of the higher modulating frequencies at the transmitter is known as pre-emphasis and
the compensation at the receiver is called as de-emphasis.
7
CIRCUIT DIAGRAM:
8
MODEL GRAPHS:
9
PROCEDURE:
TABULAR FORM:
Pre-emphasis: Vi = 20mV.
De-emphasis: Vi = 5V.
10
PRECAUTIONS:
RESULT:
11
Ex. No:
4(A)
SIGNAL SAMPLING AND RECONSTRUCTION
AIM:
To study and experimentally verify the sampling and reconstruction concept using
Sampling Trainer Kit model.
APPARATUS REQUIRED:
THEORY
The Nyquist criterion states that a continuous signal band limited to fm Hz, can be
completely represented by and reconstructed from, the samples taken at a rate greater than or
equal to 2 fm samples per second. This minimum frequency is called as "Nyquist Rate". Thus,
for the faithful reconstruction of the information signal from its samples, it is necessary that the
sampling rate, fs must be greater than 2fm.
Aliasing: -
If the information signal is sampled at a rate lower than that stated by Nyquist criterion, than
there is an overlap between the information signal and the side bands of the harmonics. Thus,
the lower and the higher frequency components get mixed and cause unwanted signals to
appear at the demodulator output. This phenomenon is termed as Aliasing or Fold-over
Distortion.
12
13
MODEL GRAPH:
TABULAR COLUMN:
INPUT
SAMPLINGPULSE
SAMPLEDSIGNAL
RECONSTRUCTED
SIGNAL
14
PROCEDURE:
1. Connect 1 KZ internally generated sinusoidal signal available to SIGNAL INPUT
on the Sampling Circuit board and square wave to Sampling Input.
2. Now, turn the ON/OFF switch of the kit to ON.
3. Observe the information signal on one channel and the Sample output on the
other channel of the CRO.
4. Connect the Sample Output to the input of 4the o r d e r LPF.
5. Trace the Sampled output at LPF. Note that 8, 16, 24 or 32 samples are appearing
in one cycle of the information signal, as the default value of the sampling
frequency is 8, 16, 24 or 32 KHz.
6. Now, keep on reducing the sampling frequency in steps and trace the
sampled output at any other two values of the sampling frequencies.
7. Observe the reconstructed signal at the output of the 4the order on settingthe
sampling frequency equal to 2 KHz.
RESULT:
Thus, the Sampling and reconstruction were performed using Sampling Trainer Kit model and
graphs were plotted.
15
Ex. No:
4(B) TIME DIVISION MULTIPLEXING
AIM:
To study the performance of Time division multiplexing and de-multiplexing using
TDM Trainer Kit.
APPARATUS REQUIRED:
THEORY:
An important feature of pulse-amplitude modulation is a conservation of time. That is,
fora given message signal; transmission of the associated PAM wave engages the
communication channel for only a fraction of the sampling interval on a periodic basis.
Hence, some of the time interval between adjacent pulses of the PAM wave is cleared for use by
the other independent message signals on a time-shared basis. By so doing, we obtain a time-
division multiplex system (TDM), which enables the joint utilization of a common channel by a
plurality of independent message signals without mutual interference.
Each input message signal is first restricted in bandwidth by a low-pass pre-alias filter to
remove the frequencies that are nonessential to an adequate signal representation. The pre-alias
filter outputs are then applied to a commutator, which is usually, implemented using electronic
switching circuitry. The function of the commutator is two-fold: (1) to take a narrow sample of
each of the N input messages at a rate fs that is slightly higher than 2W, where W is the cut-off
frequency of the pre-alias filter, and (2) to sequentially interleave these N samples inside a
sampling interval Ts 1/fs. Indeed, this latter function is the essence of the time-division
multiplexing operation. Following the commutation process, the multiplexed signal is applied to
a pulse-amplitude modulator, the purpose of which is to transform the multiplexed signal into a
form suitable for transmission over the communication channel.
At the receiving end of the system, the received signal is applied to a pulse- amplitude
demodulator, which performs the reverse operation of the pulse amplitude modulator. The short
pulses produced at the pulse demodulator output are distributed to the appropriate low- pass
reconstruction filters by means of a de-commutator, which operates in synchronism with the
commutator in the transmitter. This synchronization is essential for satisfactory operation of the
TDM system, and provisions have to be made for it.
16
PROCEDURE:
1. Take the signals from the function generator and give it to the channels (CH0 ... CH3)
present in the transmitter using patch chords. Note down the amplitude and timeperiod of
each signal.
2. Measure the amplitude and time period at the transmitter output point.
3. Using a patch chord, connect transmitter output to receiver input.
4. For synchronization purpose, connect the transmitter clock and receiver clock andalso
transmitter CH0 and receiver CH0.
5. See the output before the filter and after the filter for all the channels connected.
BLOCK DIAGRAM:
17
MODEL GRAPH:
RESULT:
Thus, Time division multiplexing and de-multiplexing using TDM Trainer Kit wereperformed and
respective waveforms were plotted
18
Ex. No:5
AIM:
To perform pulse code modulation and demodulation and to plot the waveforms
for binary data at different frequencies.
APPARATUS REQUIRED:
1. FM transmitter trainer kit
2. FM receiver trainer kit
3. CRO
4. Patch chords
THEORY
Pulse code modulation is a process of converting an analog signal into digital. The
voice or any data input is first sampled using a sampler (which is a simple switch) and then
quantized. Quantization is the p r o ces s of co n v er t in g a g i v e n sig n al amplitude to an
equivalent binary number with fixed number of bit s. This quantization can be either mid-
tread or mid-raise and it can be uniform or non- uniform based on the requirements. For
example, in speech signals, the higher amplitudes will be less frequent than the low
amplitudes. So higher amplitudes are given less step size than the lower amplitudes and thus
quantization is performed non- uniformly. After quantization the signal is digital and the bits
are passed through a parallel to serial converter and then launched into the channel serially.
At the demodulator the received bits are first converted into parallel frames and
each frame is de-quantized to an equivalent analog value. This analog value is thus
equivalent to a sampler output. This is the demodulated signal.
In the kit this is implemented differently. The analog signal is passed through an
ADC (Analog to Digital Converter) and then the digital codeword is passed througha parallel
to serial converter block. This is modulated PCM. This is taken by the Serial to Parallel
converter and then through a DAC to get the demodulated signal. The clock is given to all
these blocks for synchronization. The input signal can be either DC or AC according to the
kit. The waveforms can be observed on a CRO for DC without problem. AC also can be
observed but with poor resolution.
19
LABORATORY
20
MODEL GRAPH:
TABULAR COLUMN
1 Modulating Signal
2 Carrier Signal
3 Modulated Signal
4 Demodulated
Signal
21
PROCEDURE:
1. Power on the PCM kit.
2. Measure the frequency of sampling clock.
3. Apply the DC voltage as modulating signal.
4. Connect the DC input to the ADC and measure the voltage.
5. Connect the clock to the timing and control circuit.
6. Note the binary work from LED display. The serial data through the channel
can be observed in the CRO.
7. Also observe the binary word at the receiver end.
8. Now apply the AC modulating signal at the input.
9. Observe the waveform at the output of DAC.
10. Note the amplitude of the input voltage and the codeword. Also note the value
of the output voltage. Show the codeword graphically for a DC input.
RESULT:
Thus, the PCM signal was generated using PCM modulator and the message
signal was detected from PCM signal by using PCM demodulator and graphs were plotted.
22
Ex. No:6
PULSE AMPLITUDE MODULATION
AIM:
To study the Pulse Amplitude Modulation and Demodulation using FT1503 Trainer.
APPARATUS REQUIRED:
2 CRO 20MHz 1
3 -- Based on requirement
Connecting wires, Probes and patch
chords
THEORY:
Pulse Modulation may be used to transmit analog information, such as continuous speech or
data. It is a system in which continuous waveforms are sampled at regular intervals. Information regarding
the signal is transmitted only at the sampling times, together with
23
any synchronizing pulse that may be required. At the receiving end, the original waveforms may be
reconstructed from the information regarding the samples, if these are taken frequently enough. Despite
the fact that information about the signal is not supplied continuously, As in Amplitude and Frequency
modulation, the resulting receiver output can have regenerated the analog information signal.
Pulse Modulation may be subdivided broadly into two categories, Analog and Digital. In
the former, the indication of sample Amplitude may be continuously variable, while in the later a
code which indicates the sample amplitude to the nearest predetermined level is sent. Pulse
Amplitude modulation is a form of analog communication which is discussed in the following
section.
In this we have a train of fixed width of pulses. The amplitude of each pulse is made
proportional to the amplitude of the modulating signal at that instant. In the PAM generation
circuit, Synchronous clock is applied to the base of the transistor. Modulating signal is applied to
the (unipolar positive) is given to the collector of the transistor. The output of the transistor
(Collector current) varies in accordance with the amplitude of the modulating signal voltage
resulting in modulated output.
The Demodulation of Pulse Amplitude Modulation is quite a simple process. PAM signal
is fed to a Low Pass Filter, from which the Demodulating signal emerges, whose amplitude at any
time is proportional to the PAM at that time. This signal is given to an inverting amplifier to
amplify its level. The demodulated output is almost equal amplitude with the modulating signal
but is in phase shifted due to the modulation, demodulation process.
The circuit shown in the following figure uses two op-amps, one acting as non-inverting
integrator and the other one as inverting integrator. The two op-amps are connected in cascade to
form a feedback loop .the circuit oscillates with sinusoidal output. The sinusoidal oscillation
24
frequency is f = 1/2π RC. In practice the resistor R1is made slightly larger than the other resistors
to ensure a sufficient positive feedback for oscillations. The two zener diodes V z, used to bound
the output of the inverting integrator, so as to stabilize the amplitude of Oscillations.
We are generating synchronous clock by using PLL technique .The NE 565 IC is a phase
locked loop, which is widely used in application such as frequency multiplication and synthesis
etc. This PLL device comprises of 4 basic elements phase comparator, low pass filter, error
correction amplifier and VCO. The VCO is a free running multi vibrator whose center frequency
is determined by an external timing capacitor and external resistor. It‟s center frequency can also
be shifted to either side by application of an input voltage to the appropriate terminal of the IC
.the frequency deviation is directly proportional to the input voltage and hence it is called a
“Voltage Controlled Oscillator”. The VCO output is presented to a phase detector where its phase
is compared with that of the input signal .The detector produces a DC output whose
25
magnitude is directly proportional to the phase difference. The output of VCO is divided digitally
by a number of times the multiplication is designed. Here the BC107 transistor acts as an interface
to drive the logic circuit. The sub divided frequency is given to phase comparator which is a
synchronous output.
PROCEDURE:
1. Connect the AC adapter to the mains and the other side to the Experimental Trainer.
2. Observe the modulating signal generated by the 1 KHz Signal Source (AF) and note
down the peak to peak amplitude and Time Period.
3. Observe the Carrier signal generated by 8 KHz Synchronous Clock Generator and
measure the amplitude and frequency.
4. Apply the modulating signal generator output and Synchronous clock generator output to
the PAM modulator
26
5. The testing procedure is given by the following figure
27
CIRCUIT DIAGRAM:
28
Model graphs:
29
PRECAUTIONS:
RESULT:
30
Ex. No:7
PULSE WIDTH MODULATION AND PULSE POSITIONMODULATION -
DEMODULATION
AIM:
1. To study the generation of Pulse Width Modulated signal using PPM trainer kit
DCT3206.
2. To study the generation of Pulse Position Modulated and Demodulated signals using
PPM trainer kit DCT3206.
APPARATUS REQUIRED:
2 CRO (0-30)MHz 1
THEORY:
Pulse modulation is used to transmit analog information. In this system continuous wave forms are
sampled at regular intervals. Information regarding the signal is transmitted only at the sampling times
together with synchronizing signals. At the receiving end, the Original signal may be reconstructed from
the information regarding the samples. Pulse Modulation may be subdivided into two types, Analog and
Digital. In analog the indication of sample amplitude is the nearest variable. In Digital the information is a
code.Pulse Time Modulation is also known as Pulse Width Modulation or Pulse Length Modulation. In
PWM, the samples of the message signal are used to vary the duration of the individual pulses. Width
may be varied by varying the time of occurrence of leading edge, the
31
trailing edge or both edges of the pulse in accordance with modulating wave. It is also called Pulse
Duration Modulation. In a PWM wave the amplitude of all samples remain constant only the width
of the samples is changing with respect to message signal amplitude.
The pulse position Modulation is one of the methods of the Pulse Time Modulation. PPM
is generated by changing the position of a fixed time slot. The amplitude and width of the pulses
is kept constant, while the position of each pulse, in relation to the position of the recurrent
reference pulse is valid by each instances sampled value of the modulating wave. Pulse position
Modulation into the category of Analog communication.PPM has the advantage of requiring
constant transmitter power output, but the disadvantage of depending on transmitter receiver
synchronization. PPM may be obtained very simply from PWM. However, in PWM the locations
of the leading edges are fixed, whereas those of the trailing edges are not. Their position depends
on pulse width, which is determined by signal amplitude at that instant. Thus, it may be said that
the trailing edges of PWM pulses are, in fact , position modulated. This has positive going pulses
corresponding to the trailing edge of an un modulated pulse is counted as zero displacement other
trailing edges will arrive earlier or later. They will therefore have a time displacement other than
zero. This time displacement is proportional to the instantaneous value of the signal voltage. The
differentiated pulses corresponding to the leading edges are removed with a diode clipper or
rectifier, and the remaining pulses, is position-modulated.
CIRCUIT DIAGRAM:
Description
32
Modulation:
The circuit uses 555IC (U1) a mono stable multi vibrator to perform the PPM. The
message signal is given to pin no.5 & at pin no.2 the pulse carrier is of 32KHz frequency is
connected internally & PWM, Differentiated PWM outputs are available at pins TP4,TP5.This
differentiated output is fed to the 555 IC(U2) in mono stable mode pin no.2. The PPM output is
available at pin no 6.
MODEL GRAPHS:
33
CIRCUIT DIAGRAM:
34
PROCEDURE:
1. Observe the signal generated by the Modulating signal generator at pin TP1 by connecting
any channel of the CRO by keeping frequency in 1 KHz position and amplitude pot in max
position.
2. Observe the pulse carrier signal at pin no2 TP3 of the 555 IC (U 1) measure its amplitude
and time period.
3. Now interconnect TP1 of modulating signal generator with TP2 of 555IC (U1) using
connecting wire.
4. Switch on the power supply, observe the PWM wave in CH1 of CRO with respect to
modulating signal in CH2 of CRO.
5. Plot the PWM wave carefully by counting the total number of pulses with respect to one
complete cycle of message signal. And measure maximum and minimum durations of
PWM wave at positive and negative peaks of modulating signal.
Procedure for PPM: modulation
1. Observe the signal generated by the Modulating signal generator at pin TP1 by connecting
any channel of the CRO by keeping frequency in 1 KHz position and amplitude pot in max
position.
2. Observe the pulse carrier signal at pin no2 TP3 of the 555 IC (U 1) measure its amplitude
and time period.
3. Now interconnect TP1 of modulating signal generator with TP2 of 555IC (U1) using
connecting wire.
4. Switch on the power supply, observe the PPM output at TP6 in CH1 of CRO with respect
to modulating signal in CH2 of CRO. Plot the PPM output wave carefully
5. By varying the amplitude and frequency of sine wave by varying amplitude pot and
frequency selection switch to 2 KHz and observe PPM output.
Demodulation:
1. Connect PPM output generated in step no 9. As input to the Low Pass Filter in the
Demodulation circuit at pin no TP7.
35
2. Switch on the power supply and observe the demodulated output at TP8 in CH1 of
CRO with respect to original signal at pin TP2 of 555IC(U1) in CH2 of CRO. Thus
therecovered signal is true replica of modulating signal in terms of frequency.
3. As the amplitude of LPF output is less, connect this output to an A.C amplifier and
observe the demodulated wave at pinTP10 by varying gain of the amplifier. This is
amplified Demodulated output.
4. Repeat the same procedure for 2 KHz modulating signal.
PRECAUTIONS:
RESULT:
The generation of PWM modulation, PPM modulation-Demodulation is studied using
DCT3206 trainer kit.
36
Ex. No:8
DIGITAL MODULATION (ASK, FSK, PSK) BY USING MATLAB
AIM:
To Generate & to detect Modulation schemes like PCM, DM and Digital Modulation schemes
like ASK, FSK, PSK using MATLAB.
SOFTWARE REQUIRED:
MATLAB2010a
PROGRAM:
1. ASK Modulation:
%ASK Modulation
clc;
clear all;
close all;
%GENERATE CARRIER SIGNAL
Tb=1; fc=10;
t=0:Tb/100:1;
c=sqrt(2/Tb)*sin(2*pi*fc*t);
%generate message signal
N=8;
m=rand(1,N);
t1=0;t2=Tb
for i=1:N
t=[t1:.01:t2]
if m(i)>0.5
m(i)=1;
m_s=ones(1,length(t));
else
m(i)=0;
37
m_s=zeros(1,length(t));
end
message(i,:)=m_s;
%product of carrier and message
ask_sig(i,:)=c.*m_s;
t1=t1+(Tb+.01);
t2=t2+(Tb+.01);
%plot the message and ASK signal
subplot(5,1,2);axis([0 N -2 2]);plot(t,message(i,:),'r');
title('message signal');xlabel('t--->');ylabel('m(t)');grid on
hold on
subplot(5,1,4);plot(t,ask_sig(i,:));
title('ASK signal');xlabel('t--->');ylabel('s(t)');grid on
hold on
end
hold off
%Plot the carrier signal and input binary data
subplot(5,1,3);plot(t,c);
title('carrier signal');xlabel('t--->');ylabel('c(t)');grid on
subplot(5,1,1);stem(m);
title('binary data bits');xlabel('n--->');ylabel('b(n)');grid on
% ASK Demodulation
t1=0;t2=Tb
for i=1:N
t=[t1:Tb/100:t2]
%correlator
x=sum(c.*ask_sig(i,:));
%decision device
if x>0
demod(i)=1;
else
38
demod(i)=0;
end
t1=t1+(Tb+.01);
t2=t2+(Tb+.01);
end
%plot demodulated binary data bits
subplot(5,1,5);stem(demod);
title('ASK demodulated signal'); xlabel('n--->');ylabel('b(n)');grid on
OUTPUT WAVEFORMS:
39
2. PSK Modulation:
% PSK modulation
clc;
clear all;
close all;
%GENERATE CARRIER SIGNAL
Tb=1;
t=0:Tb/100:Tb;
fc=2;
c=sqrt(2/Tb)*sin(2*pi*fc*t);
%generate message signal
N=8;
m=rand(1,N);
t1=0;t2=Tb
for i=1:N
t=[t1:.01:t2]
if m(i)>0.5
m(i)=1;
m_s=ones(1,length(t));
else
m(i)=0;
m_s=-1*ones(1,length(t));
end
message(i,:)=m_s;
%product of carrier and message signal
bpsk_sig(i,:)=c.*m_s;
%Plot the message and BPSK modulated signal
subplot(5,1,2);axis([0 N -2 2]);plot(t,message(i,:),'r');
title('message signal(POLAR form)');xlabel('t--->');ylabel('m(t)');
grid on; hold on;
40
subplot(5,1,4);plot(t,bpsk_sig(i,:));
title('BPSK signal');xlabel('t--->');ylabel('s(t)');
grid on; hold on;
t1=t1+1.01; t2=t2+1.01;
end
hold off
%plot the input binary data and carrier signal
subplot(5,1,1);stem(m);
title('binary data bits');xlabel('n--->');ylabel('b(n)');
grid on;
subplot(5,1,3);plot(t,c);
title('carrier signal');xlabel('t--->');ylabel('c(t)');grid on;
% PSK Demodulation
t1=0;t2=Tb
for i=1:N
t=[t1:.01:t2]
%correlator
x=sum(c.*bpsk_sig(i,:));
%decision device
if x>0
demod(i)=1;
else
demod(i)=0;
end
t1=t1+1.01;
t2=t2+1.01;
end
%plot the demodulated data bits
subplot(5,1,5);stem(demod);
title('demodulated data');xlabel('n--->');ylabel('b(n)');
grid on
41
OUTPUT WAVEFORMS:
42
3. FSK Modulation:
% FSK Modulation
clc;
clear all;
close all;
%GENERATE CARRIER SIGNAL
Tb=1; fc1=2;fc2=5;
t=0:(Tb/100):Tb;
c1=sqrt(2/Tb)*sin(2*pi*fc1*t);
c2=sqrt(2/Tb)*sin(2*pi*fc2*t);
%generate message signal
N=10;
m=rand(1,N);
t1=0;t2=Tb
for i=1:N
t=[t1:(Tb/100):t2]
if m(i)>0.5
m(i)=1;
m_s=ones(1,length(t));
invm_s=zeros(1,length(t));
else
m(i)=0;
m_s=zeros(1,length(t));
invm_s=ones(1,length(t));
end
message(i,:)=m_s;
%Multiplier
fsk_sig1(i,:)=c1.*m_s;
fsk_sig2(i,:)=c2.*invm_s;
fsk=fsk_sig1+fsk_sig2;
43
%plotting the message signal and the modulated signal
subplot(3,2,2);axis([0 N -2 2]);plot(t,message(i,:),'r');
title('message signal');xlabel('t--- >');ylabel('m(t)');grid on;hold on;
subplot(3,2,5);plot(t,fsk(i,:));
title('FSK signal');xlabel('t --->');ylabel('s(t)');grid on;hold on;
t1=t1+(Tb+.01); t2=t2+(Tb+.01);
end
hold off
%Plotting binary data bits and carrier signal
subplot(3,2,1);stem(m);
title('binary data');xlabel('n--- >'); ylabel('b(n)');grid on;
subplot(3,2,3);plot(t,c1);
title('carrier signal-1');xlabel('t --- >');ylabel('c1(t)');grid on;
subplot(3,2,4);plot(t,c2);
title('carrier signal-2');xlabel('t --- >');ylabel('c2(t)');grid on;
13
% FSK Demodulation
t1=0;t2=Tb
for i=1:N
t=[t1:(Tb/100):t2]
%correlator
x1=sum(c1.*fsk_sig1(i,:));
x2=sum(c2.*fsk_sig2(i,:));
x=x1-x2;
%decision device
if x>0
demod(i)=1;
else
demod(i)=0;
end
t1=t1+(Tb+.01);
44
t2=t2+(Tb+.01);
end
%Plotting the demodulated data bits
subplot(3,2,6);stem(demod);
title(' demodulated data');xlabel('n --- >');ylabel('b(n)'); grid on;
OUTPUT WAVEFORMS:
45
RESULT:
To Generation and Detection of Modulation schemes like PCM, DM and Digital Modulation
schemes like ASK, FSK, PSK using MATLAB.
46
Ex. No:9
AIM:
To transmit an analog message signal in its digital form and again reconstruct
back the original analog message signal at receiver by using Delta modulator.
APPARATUS REQUIRED
1. Delta Modulator kit
2. CRO and
3. Connecting probes
THEORY:
Delta Modulation is a form of pulse modulation where a sample value is represented as
a single bit. This is almost similar to differential PCM, as the transmitted bit is only one per
sample just to indicate whether the present sample is larger or smaller than the previous one.
The comparison of samples is accomplished by converting the digital to analog form and then
comparing with the present sample. This is done using an Up counter and DAC as shown in
block diagram. The delta modulated signal is given to up counter and then a DAC and the
analog input is given to OPAMP and a LPF to obtain the demodulated output.
47
48
LABORATORY
MODEL GRAPH
49
50
TABULAR COLUMN
INTEGRATEDOUTPUT
DELTA MODULATED
WAVE
DELTA DEMODULATED
WAVE
PROCEDURE
1. Switch on the kit. Connect the clock signal and the modulating input signal to
the modulator block. Observe the modulated signal in the CRO.
2. Connect the DM output to the demodulator circuit. Observe the
demodulator output on the CRO.
3. Also observe the DAC output on the CRO.
4. Change the amplitude of the modulating signal and observe the DAC output. Notice
the slope overload distortion. Keep the tuning knob so that the distortion is gone.
Note this value of the amplitude. This is the minimum required value of the
amplitude to overcome slope overload distortion.
5. Calculate the sampling frequency required for no slope overload distortion.
6. Compare the calculated and measured values of the sampling frequency.
RESULT:
Thus the analog message signal in its digital form was transmitted and again the original
analog message signal was reconstructed at receiver by using Delta modulatorand Demodulator
51
Ex. No:10
AIM:
To obtain the signal constellation of ASK, FSK, BPSK waveforms using MATLAB.
SOFTWARE REQUIRED:
SYSTEM with MATLAB software
PRE-LAB QUESTIONS :
1. What is ASK modulation?
2. Compare the performance of ASK, FSK and BPSK.
3. What is Constellation in the digital modulation techniques?
THEORY:
Any digital modulation scheme uses a finite number of distinct signals to represent digital
data. PSK uses a finite number of phases, each assigned a unique pattern of binary digits.
Usually, each phase encodes an equal number of bits. Each pattern of bits forms the symbol
that is represented by the particular phase. The demodulator, which is designed specifically
for the symbol-set used by the modulator, determines the phase of the received
signal and maps it back to the symbol it represents, thus recovering the original data. This
requires the receiver to be able to compare the phase of the received signal to a reference signal
— such a system is termed coherent (and referred to as CPSK).Alternatively, instead of
using the bit patterns to set the phase of the wave, it can instead be used to change it by a
specified amount. The demodulator then determines the changes in the phase of the
received signal rather than the phase itself. Since this scheme depends on the difference
between successive phases, it is termed differential phase-shift keying (DPSK). DPSK can
be significantly simpler to implement than ordinary PSK since there is no need for the
demodulator to have a copy of the reference signal to determine the exact phase of the received
signal (it is a non-coherent scheme). In exchange, it produces more erroneous demodulations.
ALGORITHM:
1. Start.
2. Get the data bits and compute its length.
3. Get the input frequency.
4. Generate the BPSK waveforms with their corresponding carrier frequency.
5. Plot the output waveform.
6. Stop
52
PROGRAM FOR ASK:
ASK
53
Output
clc;
clear all; close all;
t=[0:0.0001:5];
s=square(2*pi*t,100);
s1=square(2*pi*t);
s2=0.5*(s+s1);
s3=-square(2*pi*t);
s4=0.5*(s+s3);
x1=sin(2*pi*6*t)
x=x1.*s2;
y1=sin(2*pi*2*t)
y=y1.*s4;
z= x+y;
subplot(4,1,1)
plot(t,s1)
axis([0 5 -1.5 1.5])
title('Message Bits')
subplot(4,1,2)
plot(t,x1)
axis([0 5 -1.5 1.5])
title('Carrier Signal 1');
subplot(4,1,3)
plot(t,y1)
axis([0 5 -1.5 1.5])
title('Carrier Signal 2');
subplot(4,1,4)
plot(t,z)
axis([0 5 -1.5 1.5])
title('Frequency Shift Keying(FSK) Output');
54
FSK
55
Output
Message Bits
1
0
-1
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
Carrier Signal 1
1
0
-1
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
Carrier Signal 2
1
0
-1
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
Frequency Shift Keying(FSK) Output
1
0
-1
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
%BPSK Modulation
clc;
clear all;
close all;
n=input('Enter the data bits'); y=length(n);
freq=input('enter the frequency');for
i=1:y
if n(1,i)==0
for t=((i-1)*100+1):(i*100)
y(t)=sin(2*pi*freq*t/1000+pi); x(t)=0;end
else
for t=(i-1)*100+1:(i*100)
y(t)=sin(2*pi*freq*t/1000); x(t)=1;
end
end
end
figure(1);
subplot(2,1,1);
plot(x);
56
title('inputdata');
subplot(2,1,2);
plot(y);
xlabel('time in sec');
ylabel('amplitude in volts');
title('PSK');
grid on;
FSK
57
Output
input data
amplitude in volts
0.5
0
0 10 200 300 400 500 70 800
0 600 0
amplitude in volts
time in
1
sec
0 carrier
signal
-1 0 100 200 300 400 500 600 700 800
time in sec
BPSK modulated signal
amplitude in volts
0
0 100 200 300 400 500 600 700 800
time in sec
-1
58
POST-LAB QUESTIONS:
RESULT:
Thus the ASK PSK and FSK signals are generated using MATLAB.
59
Ex. No:11
AIM:
To obtain the signal constellation of QPSK, QAM and DPSK waveforms using
MATLAB.
SOFTWARE REQUIRED:
SYSTEM with MATLAB software
PRE-LAB QUESTIONS :
1. What is M-ary modulation?
2. Compare the performance of QPSK and QAM.
3. What is Constellation in the digital modulation techniques?
THEORY:
Each pattern of bits forms the symbol that is represented by the particular phase. The
demodulator, which is designed specifically for the symbol-set used by the modulator,
determines the phase of the received signal and maps it back to the symbol it represents, thus
recovering the original data. This requires the receiver to be able to compare the phase of the
received signal to a reference signal — such a system is termed coherent (and referred to as
CPSK).Alternatively, instead of using the bit patterns to set the phase of the wave, it can
instead be used to change it by a specified amount. The demodulator then determines the
changes in the phase of the received signal rather than the phase itself. Since this scheme
depends on the difference between successive phases, it is termed differential phase-shift
keying (DPSK). DPSK can be significantly simpler to implement than ordinary PSK since
there is no need for the demodulator to have a copy of the reference signal to determine the
exact phase of the received signal (it is a non-coherent scheme). In exchange, it produces
more erroneous demodulations. The exact requirements of the particular scenario under
consideration determine which scheme is used. Quadrature amplitude modulation (QAM) is
both an analog and a digital modulation scheme. It conveys two analog message signals, or
two digital bit streams, by changing (modulating) the amplitudes of two carrier waves, using
the amplitude-shift keying (ASK) digital modulation scheme or amplitude modulation
(AM) analog modulation scheme. QAM is used extensively as a modulation scheme for
digital telecommunication systems. Arbitrarily high spectral efficiencies can be achieved with
QAM by setting a suitable constellation size, limited only by the noise level and linearity of
the communications channel.
ALGORITHM:
7. Start.
8. Get the data bits and compute its length.
9. Get the input frequency.
10. Generate the QPSK waveforms with their corresponding carrier frequency.
11. Plot the output waveform.
12. Stop
60
PROGRAM FOR QPSK:
%%%%%%%%%% QPSK %%%%%%%%%%%%%%
clear;
clc;
b = input('Enter the bit stream = ');
n = length(b); % length of the input bit stream
t = 0:0.01:n;
x = 1:1:(n+2)*100;
for i = 1:n
if (b(i) == 0)
u(i) = -1;
else
u(i) = 1;
end
for j = i:0.1:i+1
input_bits(x(i*100:(i+1)*100)) = u(i);
if (mod(i,2) == 0)
even_bits(x(i*100:(i+1)*100)) = u(i);
even_bits(x((i+1)*100:(i+2)*100)) = u(i);
else
odd_bits(x(i*100:(i+1)*100)) = u(i);
odd_bits(x((i+1)*100:(i+2)*100)) = u(i);
end
if (mod(n,2)~= 0)
even_bits(x(n*100:(n+1)*100)) = -1;
even_bits(x((n+1)*100:(n+2)*100)) = -1;
end
end
end
input_bits = input_bits(100:end);
odd_bits = odd_bits(100:(n+1)*100);
even_bits = even_bits(200:(n+2)*100);
cost = cos(2*pi*t);
sint = sin(2*pi*t);
x = odd_bits.*cost; % In-Phase Signal component
y = even_bits.*sint; % Quadrature phase Signal Component
z = x+y; % QPSK Signal
subplot(3,2,1);
plot(t,input_bits, 'linewidth',3);
xlabel('n ---- >');
ylabel('Amplitude(volts) ---- >');
title('Input Bit Stream');
61
grid on ;
axis([0 n -2 +2]); subplot(3,2,2);
plot(t,y,'linewidth',3);
xlabel('Time(sec) --- >');
ylabel('Amplitude(volts) ---- >');
title('wave form for Inphase component in QPSK modulation');
grid on ;
axis([0 n -2 +2]); subplot(3,2,3);
plot(t,even_bits,'linewidth',3);
xlabel('n ---- >');
ylabel('Amplitude(volts) ---- >');
title('Even Sequence');
grid on ;
axis([0 n -2 +2]);
subplot(3,2,4);
plot(t,x, 'linewidth',3);
xlabel('Time(sec) --- >');
ylabel('Amplitude(volts) ---- >');
title('wave form for Quadrature phase component in QPSK modulation');
grid on ;
axis([0 n -2 +2]); subplot(3,2,5);
plot(t,odd_bits,'linewidth',3);
xlabel('n ---- >');
ylabel('Amplitude(volts) ---- >');
title('Odd Sequence');
grid on ;
axis([0 n -2 +2]); subplot(3,2,6);
plot(t,z,'linewidth',3);
xlabel('Time(sec) --- >');
ylabel('Amplitude(volts) ---- >');
title('QPSK modulated signal (sum of Inphase and Quadrature phase signal');
grid on ;
axis([0 n -2 +2]);
62
Output
63
64
65
Constellation: QPSK,Gray Mapping,PhaseOffset=0.7854rad
1.5
1 0
Quadrature Amplitude
0.5
3 2
-0.5
-1
66
PROGRAM FOR QAM:
nbit=16; %number of information bits
msg=round(rand(nbit,1)); % information generation as binary form
disp(' binary information at transmitter ');
disp(msg);
fprintf('\n\n');
end
t1=bp/100:bp/100:100*length(x)*(bp/100);
figure(1)
subplot(3,1,1);
plot(t1,bit,'lineWidth',2.5);grid on;
axis([ 0 bp*length(x) -.5 1.5]);
ylabel('amplitude(volt)');
xlabel(' time(sec)');
title('transmitting information as digital signal');
% binary information convert into symbolic form for M-array QAM modulation
M=M; % order of QAM modulation
msg_reshape=reshape(msg,log2(M),nbit/log2(M))';
disp(' information are reshaped for convert symbolic form');
disp(msg_reshape);
fprintf('\n\n');
size(msg_reshape);
for(j=1:1:nbit/log2(M))
for(i=1:1:log2(M))
a(j,i)=num2str(msg_reshape(j,i));
end
end
as=bin2dec(a);
ass=as';
figure(1)
subplot(3,1,2);
stem(ass,'Linewidth',2.0);
title('serial symbol for M-array QAM modulation at transmitter');
xlabel('n(discrete time)');
ylabel(' magnitude');
67
%XXXXXXXXXXXXXX Mapping for M-array QAM modulation
XXXXXXXXXXXXXXXXXXXXXXXX
M=M; %order of QAM modulation
x1=[0:M-1];
p=qammod(ass,M) %constalation design for M-array QAM acording to symbol
sym=0:1:M-1; % considerable symbol of M-array QAM, just for scatterplot
pp=qammod(sym,M); %constalation diagram for M-array QAM
scatterplot(pp),grid on;
title('consttelation diagram for M-array QAM');
68
clear j;
for (k=1:1:length(m1))
gt(k)=m1(k)+j*m2(k);
end
gt
ax=qamdemod(gt,M);
figure(3);
subplot(2,1,1);
stem(ax,'linewidth',2);
title(' re-obtain symbol after M-array QAM demodulation ');
xlabel('n(discrete time)');
ylabel(' magnitude');
bi_in=dec2bin(ax);
[row col]=size(bi_in);
p=1;
for(i=1:1:row)
for(j=1:1:col)
re_bi_in(p)=str2num(bi_in(i,j));
p=p+1;
end
end
disp('re-obtain binary information after M-array QAM demodulation');
disp(re_bi_in')
fprintf('\n\n');
end
t1=bp/100:bp/100:100*length(x)*(bp/100);
figure(3)
subplot(2,1,2);
plot(t1,bit,'lineWidth',2.5);grid on;
axis([ 0 bp*length(x) -.5 1.5]);
ylabel('amplitude(volt)');
xlabel(' time(sec)');
title('receiving information as digital signal after M-array QAM demoduation');
69
clc;
M = 16; % Modulation order
x = (0:15)'; % Integer input
y1 = qammod(x, 16, 0); % 16-QAM output, phase offset = 0
plot(y1,'ok','MarkerSize',10,'MarkerFaceColor', 'r') text(real(y1)+0.1,
imag(y1), dec2bin(x))
title('16-QAM, Binary Symbol Mapping')
axis([-3 3 -3 3])
xlabel('In-Phase Amplitude ');
ylabel('Quadrature Amplitude');
grid on
Output
3 0000
16-QAM, 0100
Binary Symbol Mapping
1000 1100
-2
0
In-Phase Amplitude
70
71
PROGRAM FOR DPSK:
clc;
clear all; close all;
M = 4; % Alphabet size
x = randi([0 M-1],1000,1); % Random message
y = dpskmod(x,M); % Modulate.
z = dpskdemod(y,M); % Demodulate.
s1 = symerr(x,z) % Expect one symbol error, namely, the first symbol.
s2 = symerr(x(2:end),z(2:end)) % Ignoring 1st symbol, expect no errors. The output is below.
s1 =1
s2 =0
y = dpskmod(x,M)
s = RandStream.create('mt19937ar', 'seed',131);
prevStream = RandStream.setGlobalStream(s); % seed for repeatability
M = 4; % Use DQPSK in this example, so M is 4.
x = randi([0 M-1],500,1); % Random data
y1 = dpskmod(x,M,pi/8); % Modulate using a nonzero initial phase.
plot(y) % Plot all points, using lines to connect them
title(' DPSK signal constellation without zero initial phase')
figure (2)
plot(y1)
title(' DPSK signal constellation with zero initial phase of pi/8')
72
Output:
Signal" ""
1. 0. 0. 1. 0. 0. 1. 1.
"( bk )"
0. 1. 1. 0. 1. 1. 0. 0.
1. 0. 1. 1. 0. 1. 1. 1.
0. 3.1415927 0. 0. 3.1415927 0. 0. 0.
0.8
0.6
0.4
0.2
-0.2
-0.4
-0.6
-0.8
-1
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
73
DPSK signal constellation with zero initial phase of pi/8
1
0.8
0.6
0.4
0.2
-0.2
-0.4
-0.6
-0.8
-1
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
74
POST-LAB QUESTIONS:
RESULT:
Thus the Constellation of BPSK, DPSK, QPSK and QAM signals are generated using
MATLAB.
75
Ex. No:12 (A)
AIM:
To write a program in MATLAB for Linear Block coding technique.
SOFTWARE REQUIRED:
SYSTEM with MATLAB
PRE-LAB QUESTIONS:
1. What is linear block coding ?
2. Define error controlling technique.
3. How to compute syndrome table?
THEORY:
In coding theory, a linear code is an error-correcting code for which any linear combination of
code words is also a codeword. Linear codes are traditionally partitioned into block codes
and convolutional codes, although turbo codes can be seen as a hybrid of these two types.
Linear codes allow for more efficient encoding and decoding algorithms than other codes. Linear
codes are used in forward error correction and are applied in methods for transmitting symbols
(e.g., bits) on a communications channel so that, if errors occur in the communication, some
errors can be corrected or detected by the recipient of a message block. The codewords in a linear
block code are blocks of symbols which are encoded using more symbols than the original value
to be sent. A linear code of length n transmits blocks containing n symbols.
ALGORITHM:
PROGRAM:
clc;
clear all;
close all;
n=7; k=4;
76
% message of length ‘k’
M=[0 0 0 0; 0 0 0 1; 0 0 1 0; 0 0 1 1; 0 1 0 0; 0 1 0 1; 0 1 1 0; 0 1 1 1];
disp('message');
disp(M);
%p is coefficient matrix k by(n-k)
p=[1 0 1; 0 1 0; 1 0 0; 1 1 0];
display('parity');
disp(p);
%Generator matri
G=[[p],eye(k)];
display('generator matrix'); disp(G);
%Linear Block Code
c=encode(M,n,k, 'linear fmt',G);
c=rem(M*G,2);
display('code word');
disp(c);
%parity check matrix
H=[eye(n-k),[p]']; display('parity check matrix'); disp(H);
%Addition of noise
display('error');
e=randerr(8,n);
display('received matrix');
r=rem(plus(c,e),2); disp(r);
%decoding error matrix
disp('syndrome error');
e=rem(r*H',2);
disp(e);
%syndrome table
disp('Decoding table');
t=syndtable(H);
disp(t);
[msg,err,cc]=decode(r,n,k,'linear fmt',G,t);
disp('decoded message');
disp(cc);
Output
message
0 0 0 0
0 0 0 1
0 0 1 0
0 0 1 1
0 1 0 0
0 1 0 1
0 1 1 0
0 1 1 1
77
LABORATORY
parity
1 0 1
0 1 0
1 0 0
1 1 0
generator matrix
1 0 1 1 0 0 0
0 1 0 0 1 0 0
1 0 0 0 0 1 0
1 1 0 0 0 0 1
code word
0 0 0 0 0 0 0
1 1 0 0 0 0 1
1 0 0 0 0 1 0
0 1 0 0 0 1 1
0 1 0 0 1 0 0
1 0 0 0 1 0 1
1 1 0 0 1 1 0
0 0 0 0 1 1 1
error received
matrix
0 0 0 0 0 1 0
1 1 0 0 1 0 1
1 1 0 0 0 1 0
0 1 0 0 0 1 0
0 1 0 1 1 0 0
1 0 1 0 1 0 1
1 1 0 0 1 0 0
0 1 0 0 1 1 1
syndrome error
1 0 0
0 1 0
0 1 0
1 1 0
1 0 1
0 0 1
1 0 0
0 1 0
78
Decoding table
Single-error patterns loaded in decoding table. 2 rows remaining.
2-error patterns loaded. 0 rows remaining.
0 0 0 0 0 0 0
0 0 1 0 0 0 0
0 1 0 0 0 0 0
0 1 1 0 0 0 0
1 0 0 0 0 0 0
0 0 0 1 0 0 0
0 0 0 0 0 0 1
0 1 0 1 0 0 0
decoded message
1 0 0 0 0 1 0
1 0 0 0 1 0 1
1 0 0 0 0 1 0
0 1 0 0 0 1 1
0 1 0 0 1 0 0
1 0 0 0 1 0 1
0 1 0 0 1 0 0
0 0 0 0 1 1 1
RESULT:
Thus the implementation of linear block code (7, 4) was done using MATLAB.
79
Ex. No:12 (B)
IMPLEMENTATION OF CYCLIC CODE GENERATION
AIM:
To simulate the generates Matrix, Code word, Parity check Matrix and error syndrome for
a (7, 4) cyclic code using SCILAB
APPARATUS REQUIRED:
1. Personal computer.
2. SCILAB 6.1.0.
THEORY:
Error control coding is the processor of adding redundant list to the information bits, So on to
simulate two level objectives at the receiver. Error detection and correction. A block code is
linear if any linear combination of its code words a code is cyclic, if any cyclic shift of a code
and is also a code word. They are usually denoted by (n, k) in which the first position of k bits
is always identical to the message sequence to the transmitted. The block length is denoted by
n.
ALGORITHM:
CYCLIC CODES
80
SPECIFICATIONS FOR THE (7, 4) CYCLIC CODES
TX
OUTPUT
D +D²
" remainder in polynomial
81
form " " 0. 1. 1.
82
" Parity bits are : "
" Table 8.3 Contents of the Shift Register in the Encoder of fig 8.7 for Message Sequence ( 1 0 0 1 ) "
" "
" "
"11110"
"20011"
"30111"
"41011"
clc;
D=poly(0,'D');
g=1+D+0+D^3;// g e n e r a t o r polynomial
C1=0+D+D^2+D^3+0+0+D^6;// e r r o r f r e ecodeword
C2=0+D+D^2+0+0+0+D^6;//middl e b i t i s e r r o r
[r1,q1]=pdiv(C1,g);
S1=coeff(r1);
S1=modulo(S1,2);
disp(r1,' remainder in polynomial form ')
disp(S1,' Syndrome bits for error free codeword are : ')
[r2,q2]=pdiv(C2,g);
S2=coeff(r2);
S2=modulo(S2,2);
disp(r2,' remainder in polynomial form for erroredcodeword ')
disp(S2,' Syndrome bits for erroredcodeword are : ')
OUTPUT
2D +2D²
“remainder in polynomial
form " 0. 0. 0.
" Syndrome bits for error free codeword are : "
83
1 +3D +2D²
erroredcodeword " 1. 1. 0.
RESULT:
Thus the simulation for cyclic code is done using SCILAB
84
85