Dept. of Electronics & Communuication Engg.
ADE Lab Manual
PRIYADARSHINI BHAGWATI COLLEGE OF ENGINEERING
DEPARTMENT OF ELECTRONICS & COMMUNICATION
ENGINEERING
Harpur Nagar, Umred Road,
Nagpur - 440024
LABORATORY MANUAL
ANALOG & DIGITAL ELECTRONICS
B.E. IV SEMESTER
Name : —————————————————–
Roll No : ————————————————–
Class/Branch : ———————————————
Subject : ————————————————–
Prepared By -
Dr. Pramod R. Bokde
Assistant Professor,
EC Department
Priyadarshini Bhagwati College of Engineering Page 1
Dept. of Electronics & Communuication Engg. ADE Lab Manual
EXPERIMENT NO. 1
AIM : Study of basic properties of operational amplifier: inverting
and non-inverting amplifiers.
TOOLS USED : Virtual Lab
THEORY :
Operational Amplifier commonly known as Op-Amp, is a linear
elcectronic device having three terminals, two high impedence in-
put and one output terminal. Op-Amp can perform multiple func-
tion when attached to diffrent feedback combinations like resis-
tive, capacitive or both. Generally it is used as voltage amplifier
and the output voltage of the Op-Amp is the diffrence between
the voltages at its two input terminals.
Op-Amp shows some properties that make it an ideal amplifier,
its open loop gain and input impedance is infinite (i.e.,practically
very high), Output impedance and offset voltage is zero(i.e.,practically
very low) and bandwidth is infinite(i.e.,practically limitted to fre-
quency where its gain become unity).
Figure 1: Operational Amplifier
Inverting OP-AMP
The open loop gain(Ao) of the Om-Apm is very high which makes
it very unstable, so to make it stable with a controlable gain, a feed
Priyadarshini Bhagwati College of Engineering Page 2
Dept. of Electronics & Communuication Engg. ADE Lab Manual
back is applied through some external resistor(Rf) from its output
to inverting input terminal(i.e.,also known as negative feedback)
resulting in reduced gain(cloosed loop gain, Av ). So the voltage at
inverting terminal is now the sum of the actual input and feedback
voltages, and to separate both a input resistor( Ri ) is introduced in
the circuit. The non inverting terminal of the opamp is grounded,
and the inverting terminal behaves like a virtual ground as the
junction of the input and feedback signal are at the same potential.
Figure 2: Inverting OP-AMP
Non-Inverting OP-AMP
In this configuration of Op-amp the input signal is directly fed to
the non inverting terminal resulting in a positive gain and out-
put voltage in phase with input as compared to inverting Op-amp
where the gain is negative and output voltage is out of phase with
input , and to stabalize the circuit a negative feedback is applied
through a resistor( R f ) and the inverting terminal is grounded witha
input resistor ( R2 ).This inverting Op-Amp like layout the at in-
verting terminal creates a virtual ground at the summing point
make the R f and R2 a potential divider accross inverting terminal,
Hence determines the gain of the circuit.
Priyadarshini Bhagwati College of Engineering Page 3
Dept. of Electronics & Communuication Engg. ADE Lab Manual
Figure 3: Non-inverting OP-AMP
EXPERIMENT NO. 7
AIM : To study Integrator circuit and Differentiator using OP-
AMP
TOOLS USED : Virtual Lab
THEORY :
Operational Amplifier commonly known as Op-Amp, is a linear
elcectronic device having three terminals, two high impedence in-
put and one output terminal. Op-Amp can perform multiple func-
tion when attached to diffrent feedback combinations like resis-
tive, capacitive or both. Generally it is used as voltage amplifier
and the output voltage of the Op-Amp is the diffrence between
the voltages at its two input terminals.
Figure 4: Operational Amplifier
Priyadarshini Bhagwati College of Engineering Page 4
Dept. of Electronics & Communuication Engg. ADE Lab Manual
Op-Amp shows some properties that make it an ideal amplifier,
its open loop gain and input impedance is infinite (i.e., practically
very high), Output impedance and offset voltage is zero(i.e., prac-
tically very low) and bandwidth is infinite(i.e., practically limitted
to frequency where its gain become unity).
The Integrator :
It is a circuit designed with Op-Amp in such a way that it per-
forms the mathametical Integration operation, its output is pro-
portional to the amplitude and time duration of the input applied.
The integrator circuit layout is same as a inverting amplifier but
the feedback resistor is replaced by a capacitor which make the cir-
cuit frequency dependent. In this case the circuit is derived by the
time duration of input applied which results in the charging and
discharging of the capacitor. Initially when the voltage is applied
to integrator the uncharged capacitor allows maximum current to
pass through it and no current flows through the Op-Amp due to
the presence of virtual ground, the capacitor starts to charge at the
rate of RC time constant and its impedence starts to increase with
time and a potential diffrence is develops accross the capacitor re-
sulting in charging current to [Link] results in the ratio of
capacitor’s impedance and input resistance increasing causing a
linearly increasing ramp output voltage that continues to increase
until the capacitor becomes fully charged.
Figure 5: OP-AMP as Integrator
Priyadarshini Bhagwati College of Engineering Page 5
Dept. of Electronics & Communuication Engg. ADE Lab Manual
Since, the Output voltage is the potential difference accross ca-
pacitor.
Q
VC =
C
or,
VC = VX − VOUT = −VOUT
dVout 1 dQ
∴− = ×
dt C dt
dQ
is the current as the VX is 0. and input current can be written
dt
as -
VI N − 0
II N =
RIN
and current through capacitor If can be written as -
dVout 1 dQ dQ
If = C × =C× × = (1)
dt C dt dt
Assuming the ideal Op-amp its input impedance is infinite so no
current pass through it.
VI N dVout
II N = I f = =C×
RIN dt
VI N dt
∴ × =1
VOUT R I N × C
1
Z
∴ VOUT = − Vin dt
RIN × C
1
∴ VOUT = − × VI N
j × ωR I N × C
where (-) sing indicates 180 degree phase shift.
The Differentiator :
In the differentiator circuit the input is connected to the the invert-
ing output of the Op-Amp through a capacitor(C) and a negetive
feedback is provided to the inverting input terminal through a re-
Priyadarshini Bhagwati College of Engineering Page 6
Dept. of Electronics & Communuication Engg. ADE Lab Manual
sistor(Rf), which is same as an integrator circuit with feedback ca-
pacitor and input resistor being replaced with each other. Here the
circuit performs a mathematical differentiation operation, and the
output is the first derivative of the input signal, 180’ out of phase
and apmlified with a factor Rf*C. The capacitor on the input al-
lows only the AC component and restrict the DC, at low frequency
the reactance of capicitor is very high causing a low gain and high
frequency vice varsa but and high frequency the circuit becomes
unstable.
Figure 6: OP-AMP as Differentiator
Since, the node voltage Vx is 0,
VOUT
II N = I f = −
Rf
The charge accross capacitor is given by,
Q = C × VI N
The rate of change of charge is:
dQ dVI N
= C×
dt dt
Priyadarshini Bhagwati College of Engineering Page 7
Dept. of Electronics & Communuication Engg. ADE Lab Manual
dQ
and we know that is capacitor current,
dt
dVI N
If = C × = II N
dt
VOUT dVI N
∴− = C×
Rf dt
and Output voltage is -
dVI N
VOUT = − R f × C ×
dt
PROCEDURE :
Integrator using OP-AMP :
• Connect the components as mentioned below: L1-L7 or L1-
L3, L3-L7, L4-L5, L11-L8, L12-L6, L8-L9, L4-L10.(For eg. click
on 1 and then drag to 3 and so on.)
• Click on ’Check Connection’ button to check the connections.
• If connected wrong click on ’Delete all connection’ button to
erase all the connections.
• Set the resistance(R) and the capacitance (C) (Intially set R=10
kΩ and C=0.1 µF).
• Click on ’ON’ button to start th experiment.
• Click on ’Square Wave’ button to generate input waveform.
• Click on ’Oscilloscope’ button to get the output waveform.
• Vary the Amplitude, Frequency, volt/div using the controllers.
• Click on ”Dual” button to observe both the waveform.
Priyadarshini Bhagwati College of Engineering Page 8
Dept. of Electronics & Communuication Engg. ADE Lab Manual
• Channel 1 shows the input square waveform, Channel 2 shows
the output waveform.
• Repeat the experiment by applying ’Sine wave’ as input.
• Click on ’Sine Wave’ button to generate input waveform.
• Click on ’Oscilloscope’ button to get the output waveform.
• Vary the Amplitude, Frequency, volt/div using the controllers.
• Click on ”Dual” button to observe both the waveform.
• Channel 1 shows the input sine waveform, Channel 2 shows
the output waveform.
Figure 7: Connection for OP-AMP as Integrator
Differentiator using OP-AMP :
• Connect the components as mentioned below: L1-L7 or L1-
L3, L3-L7, L4-L5, L11-L8, L12-L6, L8-L9, L4-L10.(For eg. click
on 1 and then drag to 3 and so on.)
Priyadarshini Bhagwati College of Engineering Page 9
Dept. of Electronics & Communuication Engg. ADE Lab Manual
• Click on ’Check Connection’ button to check the connections.
• If connected wrong click on ’Delete all connection’ button to
erase all the connections.
• Set the resistance(R) and the capacitance (C) (Intially set R=1
kΩ and C=0.1 µF).
• Click on ’ON’ button to start th experiment.
• Click on ’Square Wave’ button to generate input waveform.
• Click on ’Oscilloscope’ button to get the output waveform.
• Vary the Amplitude, Frequency, volt/div using the controllers.
• Click on ”Dual” button to observe both the waveform.
• Channel 1 shows the input square waveform, Channel 2 shows
the output waveform.
• Repeat the experiment by applying ’Sine wave’ as input.
• Click on ’Sine Wave’ button to generate input waveform.
• Click on ’Oscilloscope’ button to get the output waveform.
• Vary the Amplitude, Frequency, volt/div using the controllers.
• Click on ”Dual” button to observe both the waveform.
• Channel 1 shows the input sine waveform, Channel 2 shows
the output waveform.
Note : Sometimes due to page load or cache, the graph may
not come exact at one click. So it is better to double click on
the channel-1 function/ channel-2 function/ dual function/
ground function to get the respective signals.
Priyadarshini Bhagwati College of Engineering Page 10
Dept. of Electronics & Communuication Engg. ADE Lab Manual
Figure 8: Connection for OP-AMP as differentiator
RESULT :
The circuit of Integrator and Differentiator using OP-AMP is sim-
ulated in virtual lab and necessary waveforms are observed on
CRO.
Priyadarshini Bhagwati College of Engineering Page 11
Dept. of Electronics & Communuication Engg. ADE Lab Manual
EXPERIMENT NO. 8
AIM : To study Voltage regulator using operational amplifier to
produce output of 12V.
TOOLS USED : Virtual Lab
THEORY :
A voltage regulator is an integrated circuit (IC) that provides a
constant fixed output voltage regardless of a change in the load
or input voltage. It can do this many ways depending on the
topology of the circuit within, but for the purpose of keeping this
project basic, we will mainly focus on the linear regulator. A linear
voltage regulator works by automatically adjusting the resistance
via a feedback loop, accounting for changes in both load and in-
put, all while keeping the output voltage constant.
Figure 9: Series Voltage Regulator using OP-AMP
Electronic voltage regulators utilize solid-state semiconductor
devices to smooth out variations in the flow of current. In most
cases, they operate as variable resistances; that is, resistance de-
creases when the electrical load is heavy and increases when the
Priyadarshini Bhagwati College of Engineering Page 12
Dept. of Electronics & Communuication Engg. ADE Lab Manual
load is lighter.
Voltage regulators find their applications in computers, alter-
nators, power generator plants where the circuit is used to con-
trol the output of the plant. Voltage regulators may be classified
as electromechanical or electronic. It can also be classified as AC
regulators or DC regulators. All electronic voltage regulators will
have a stable voltage reference source which is provided by the re-
verse breakdown voltage operating diode called zener diode. The
main reason to use a voltage regulator is to maintain a constant
dc output voltage. It also blocks the ac ripple voltage that cannot
be blocked by the filter. A good voltage regulator may also in-
clude additional circuits for protection like short circuits, current
limiting circuit, thermal shutdown, and overvoltage protection.
PROCEDURE :
• Connect the probes and mentioned below:
• L1-L2,L3-L4,L4 & L5 to CRO knobs.
• Click on the ”check” button to check if the connections are
right.
• Once you make sure that the connections are right, you may
vary the input voltage from 7.5V to 35V and calculate the out-
put voltage.
• Click on ”Add to table” button to add the readings to the ta-
ble.
RESULT :
The circuit of Series voltage regulator using OP-AMP to produce
Priyadarshini Bhagwati College of Engineering Page 13
Dept. of Electronics & Communuication Engg. ADE Lab Manual
Figure 10:
12 V, 500 mA output is simulated in virtual lab observed and recorded
the output.
Priyadarshini Bhagwati College of Engineering Page 14
Dept. of Electronics & Communuication Engg. ADE Lab Manual
EXPERIMENT NO. 9
AIM : To analyse Wein bridge oscillator using operational Ampli-
fier.
TOOLS USED : Virtual Lab
THEORY :
It is the commonly used audio frequency oscillator which em-
ploys both positive and negative feedback. The feedback signal
is connected in the non-inverting input terminal so that the ampli-
fier is working in non-inverting mode. The Wien bridge circuit is
connected between amplifier input terminal and output terminal.
The bridge has a series RC network in one arm and a parallel RC
network in the adjoining arm. In the remaining two arms of the
bridge, resistor R1 and Rf are connected. The phase angle crite-
rion for oscillation is that the total phase shift around the circuit
must be zero. This condition occurs when bridge is balanced. At
resonance, the frequency of oscillation is exactly the resonance fre-
quency of balanced Wien bridge and is given by
1
fo =
2πRC
At this frequency, the gain required for sustained oscillation is
3. It is provided by the non-inverting amplifier with
Rf
Gain = 1 + =3
R1
Priyadarshini Bhagwati College of Engineering Page 15
Dept. of Electronics & Communuication Engg. ADE Lab Manual
Figure 11: Series Voltage Regulator using OP-AMP
Effect of variation of resistance and capacitance on frequency
The frequency of the oscillator varies with the variation in capac-
itance. It is inversely proportional to the capacitance. In other
words, the frequency decreases with the increase in capacitance
and vice versa. The variation in resistance has a similar effect on
the frequency of the oscillator.
PROCEDURE :
• Connect the output terminals to the cro.(L1-L2,L3-L4)
• Click on the ”check” button to check if the connections are
right.
• Once you make sure that the connections are right, you may
vary the resistance and calculate the output frequency
• Increase the resistance from 0.3 KΩ to 300 KΩ.
• Click on ”Add to table” button to add the reading to the table.
Observe the waveform in the graph.
Priyadarshini Bhagwati College of Engineering Page 16
Dept. of Electronics & Communuication Engg. ADE Lab Manual
Figure 12:
RESULT :
The circuit of Wein Bridge Oscillator using OP-AMP is simulated
in virtual lab and necessary waveforms observed and the frequency
for various values of Resistances are recorded.
Priyadarshini Bhagwati College of Engineering Page 17
Dept. of Electronics & Communuication Engg. ADE Lab Manual
EXPERIMENT NO. 10
AIM : To study voltage to current converter.
TOOLS USED : Virtual Lab
THEORY :
In most of the cases we get the output of measuring devices in
the form of voltage. It is not good to transmit this output volt-
age to the destination directly. Due to addition of noise and wire
impedance the output voltage may get corrupted. So in such cases
we have convert that voltage into current form. So let us see volt-
age to current converter.
Op-amp is implemented to simply convert the voltage signal to
corresponding current signal. The Op-amp used for this purpose
is IC LM741. This Op-amp is designed to hold the precise amount
of current by applying the voltage which is essential to sustain
that current through out the circuit. The output current is given
by -
Vin
Io =
R
Following circuit shows the voltage to current converter using
operational amplifier. It consist of simple resistance connected to
the inverting and non inverting terminals of op amp.
Priyadarshini Bhagwati College of Engineering Page 18
Dept. of Electronics & Communuication Engg. ADE Lab Manual
Figure 13: Voltage to Current Converter
PROCEDURE :
• Connect the probes and mentioned below:
L1-L2,L3-L5,L4-L6.
• Click on the ”check” button to check if the connections are
right.
• Once you make sure that the connections are right, you may
vary the input voltage from 1V to 15V and calculate the out-
put current by pressing ”Calculate” button.
• Click on ”Add to table” button to add the reading to the ta-
ble. Observe the reading on ammeter for each value oof input
voltage.
Priyadarshini Bhagwati College of Engineering Page 19
Dept. of Electronics & Communuication Engg. ADE Lab Manual
Figure 14: Voltage to Current Converter Circuit
Figure 15: Recorded output for Voltage to Current Converter
RESULT :
The circuit of Voltage to Current Converter using OP-AMP is sim-
ulated in virtual lab and current for various values of input volt-
age are recorded and graph of input Voltage across output current
is plotted.
Priyadarshini Bhagwati College of Engineering Page 20
Dept. of Electronics & Communuication Engg. ADE Lab Manual
EXPERIMENT NO. 1
AIM : To study Amplitude Modulation (AM) generation using
MATLAB.
TOOLS USED : Ubuntu Operating System, Matlab Software
THEORY :
For a signal to be transmitted to a distance, without the effect of
any external interferences or noise addition and without getting
faded away, it has to undergo a process called as Modulation. It
improves the strength of the signal without disturbing the param-
eters of the original signal.
What is Modulation?
A message carrying a signal has to get transmitted over a distance
and for it to establish a reliable communication, it needs to take the
help of a high frequency signal which should not affect the origi-
nal characteristics of the message signal. The characteristics of the
message signal, if changed, the message contained in it also alters.
Hence, it is a must to take care of the message signal. A high fre-
quency signal can travel up to a longer distance, without getting
affected by external disturbances. We take the help of such high
frequency signal which is called as a carrier signal to transmit our
message signal. Such a process is simply called as Modulation.
Modulation is the process of changing the parameters of the
carrier signal, in accordance with the instantaneous values of the
modulating signal.
Needs for modulation:
In order to carry the low frequency message signal to a longer
distance, the high frequency carrier signal is combined with it.
• Reduction in antennaheight
Priyadarshini Bhagwati College of Engineering Page 21
Dept. of Electronics & Communuication Engg. ADE Lab Manual
• Long distancecommunication
• Ease ofradiation
• Multiplexing
• Improve the quality ofreception
• Avoid mixing up of othersignals
Amplitude modulation:
Amplitude Modulation is defined as changing the amplitude of
the carrier signal with respect to the instantaneous change in mes-
sage signal.
Modulation index:
It is defined as ratio of amplitude of the message signal to the am-
plitude of the carrier signal.
Am
m=
Ac
Percentage modulation:
It is the percentage change in the amplitude of the output wave
when the carrier is acted on by a modulating signal.
Am
M= × 100
Ac
MATLAB CODE :
clc;
close all;
clear all;
Ac=2; %carrier amplitude
fc=0.5; %carrier frequency
Priyadarshini Bhagwati College of Engineering Page 22
Dept. of Electronics & Communuication Engg. ADE Lab Manual
Am=.5; %message signal amplitude
fm=.05; %message signal frequency
Fs=100; %sampling rate/frequency
ka=1; %Amplitude Sensitivity
%defining the time range & disseminating it into samples
t=[0:0.1:50];
%defining the carrier signal wave
ct=Ac*cos(2*pi*fc*t);
%defining the message signal
mt=Am*cos(2*pi*fm*t);
%Amplitude Modulated wave, according to the standard definition
AM=ct.*(1+ka*mt);
subplot(3,1,1); %plotting the message signal wave
plot(mt);
ylabel(’Message signal’);
subplot(3,1,2); %plotting the carrier signal wave
plot(ct);
ylabel(’carrier’);
subplot(3,1,3); %plotting the amplitude modulated wave
plot(AM);
ylabel(’AM signal’);
Priyadarshini Bhagwati College of Engineering Page 23
Dept. of Electronics & Communuication Engg. ADE Lab Manual
OUTPUT :
Figure 16: Amplitude Modulation
RESULT :
The program for Amplitude Modulation has been simulated in
Matlab and necessary graphs are plotted.
Priyadarshini Bhagwati College of Engineering Page 24
Dept. of Electronics & Communuication Engg. ADE Lab Manual
EXPERIMENT NO. 2
AIM : To study Frequency Modulation (FM) generation using MAT-
LAB.
TOOLS USED : Ubuntu Operating System, Matlab Software
THEORY :
Frequency modulation is a system in which the frequency of the
carrier is varied in accordance with the signal amplitude.
Let’s assume for the moment that the carrier of the transmit-
ter is at its resting frequency (no modulation) of 100MHz and we
apply a modulating signal. The amplitude of the modulating sig-
nal will cause the carrier to deviate from this resting frequency
by a certain amount. If we increase the amplitude of this signal,
we will increase the deviation to a maximum of 75 kHz as speci-
fied by the FCC. If we remove the modulating voltage, the carrier
shifts back to resting frequency (100MHz). From this we can say
that the deviation of the carrier is proportional to the amplitude of
the modulating voltage. The shift in the carrier frequency from its
resting point compared to the amplitude of the modulating volt-
age is called the deviation ratio (a deviation ratio of 5 is the max-
imum) allowed in commercially broadcast FM) The rate at which
the carrier shifts from its resting point to a no resting point is deter-
mined by the frequency of the modulating signal. The interaction
between the amplitude and frequency of the modulating signal on
the carrier is complex and requires the use of Bessel?s function to
analyze the results). If the modulating signal is 15kHz at a certain
amplitude and the carrier shift is 75 kHz, the transmitter will pro-
duce eight significant sidebands. This is known as the maximum
deviation ratio. If the frequency deviation of the carrier is known
Priyadarshini Bhagwati College of Engineering Page 25
Dept. of Electronics & Communuication Engg. ADE Lab Manual
and the frequency of the modulating signal is known then -
Frquency Deviation
Modulation Index =
Frequency AF
MATLAB CODE :
clc;
close all;
clear all;
% Set the parameters
fs = 4000; % Sampling Frequency
a = 5; % Amplitude of Carrier signal
fm = 10 ; % Frequency of modulating signal
fc = 100 ; % Frequency of Carrier signal
m = 5 ; % Modulation Index for FM
t = 0 : 0.0001 : 1 ;
% Plot and display Modulating Signal
sm = a * sin(2 * pi * fm * t) ;
subplot(4,1,1);
plot(t,sm);
xlabel(’Time’);
ylabel(’Amplitude’);
title(’Modulating signal/Message Signal’);
grid on
% Plot and display Carrier Signal
sc = a * sin(2 * pi* fc * t);
Priyadarshini Bhagwati College of Engineering Page 26
Dept. of Electronics & Communuication Engg. ADE Lab Manual
subplot(4,1,2);
plot(t,sc);
title(’Carrier Signal’);
grid on
% Plot and display Frequency Modulated Signal
sfm = a * sin( (2 * pi*fc*t) + (m.* sin(2 * pi * fm * t)));
subplot(4,1,3);
plot(t,sfm);
xlabel(’Time’);
ylabel(’Amplitude’);
title(’Frequency Modulated Signal’);
grid on
fdev = fc + 10;
% Demodulation
fdem = fmdemod(sfm,fc,fs,fdev);
subplot(4,1,4);
plot(t,fdem);
xlabel(’Time’);
ylabel(’Amplitude’);
title(’Demodulated signal’);
Priyadarshini Bhagwati College of Engineering Page 27
Dept. of Electronics & Communuication Engg. ADE Lab Manual
OUTPUT :
Figure 17: Frequency Modulation
RESULT :
The program for Frequency Modulation and dmodulation has been
simulated in Matlab and necessary graphs are plotted.
Priyadarshini Bhagwati College of Engineering Page 28
Dept. of Electronics & Communuication Engg. ADE Lab Manual
EXPERIMENT NO. 3
AIM : : To generate amplitude shift keyed (ASK) signal using
MATLAB
TOOLS USED : Ubuntu Operating System, Matlab Software
THEORY :
Generation of ASK
Amplitude shift keying - ASK - is a modulation process, which
imparts to a sinusoid two or more discrete amplitude levels. These
are related to the number of levels adopted by the digital message.
For a binary message sequence there are two levels, one of which
is typically zero. The data rate is a sub-multiple of the carrier fre-
quency. Thus the modulated waveform consists of bursts of a si-
nusoid. One of the disadvantages of ASK, compared with FSK
and PSK, for example, is that it has not got a constant envelope.
This makes its processing (eg, power amplification) more diffi-
cult, since linearity becomes an important factor. However, it does
make for ease of demodulation with an envelope detector.
Demodulation
ASK signal has a well defined envelope. Thus it is amenable to
demodulation by an envelope detector. Some sort of decision-
making circuitry is necessary for detecting the message. The sig-
nal is recovered by using a correlator and decision making cir-
cuitry is used to recover the binary sequence.
MATLAB CODE :
clc;
close all;
Priyadarshini Bhagwati College of Engineering Page 29
Dept. of Electronics & Communuication Engg. ADE Lab Manual
clear all;
fc = 100; % Frequency of sine wave carrier
fp = 10; % Frequency of Periodic Binary pulse message
amp = 4; % Amplitude for Carrier and Binary pulse message
t = 0 : 0.001 : 1;
c = amp.*sin(2*pi*fc*t);
subplot(3,1,1);
plot(t,c);
xlabel(’Time’);
ylabel(’Amplitude’);
title(’Carrier Wave’);
m = amp/2 .* square(2*pi*fp*t) + (amp/2);
subplot(3,1,2);
plot(t,m);
xlabel(’Time’);
ylabel(’Amplitude’);
title(’Binary Message Pulse Wave’);
w = c .*m ;
subplot(3,1,3);
plot(t,w);
xlabel(’Time’);
ylabel(’Amplitude’);
title(’ASK Wave’);
Priyadarshini Bhagwati College of Engineering Page 30
Dept. of Electronics & Communuication Engg. ADE Lab Manual
OUTPUT :
Figure 18:
RESULT :
The program for ASK modulation has been simulated in MATLAB
and necessary graphs are plotted.
Priyadarshini Bhagwati College of Engineering Page 31
Dept. of Electronics & Communuication Engg. ADE Lab Manual
EXPERIMENT NO. 4
AIM : :To generate frequency shift keyed (FSK) signal using MAT-
LAB
TOOLS USED : Ubuntu Operating System, Matlab Software
THEORY :
Frequency-shift keying (FSK) is a frequency modulation scheme
in which digital information is transmitted through discrete fre-
quency changes of a carrier wave. The simplest FSK is binary FSK
(BFSK). BFSK uses a pair of discrete frequencies to transmit bi-
nary (0s and 1s) information. With this scheme, the ”1” is called
the mark frequency and the ”0” is called the space frequency.
In binary FSK system, symbol 1 & 0 are distinguished from each
other by transmitting one of the two sinusoidal waves that differ
in frequency by a fixed amount.
s
2E
Si ( t ) = cos(2π f 1 t)
Tb
Where i=1, 2 & Eb = Transmitted energy/bit.
nc+i
Transmitted freq= f i = Tb and n = constant (integer), Tb = bit
interval.
Symbol 1 is represented by S1 (t)
Symbol 0 is represented by S0 (t).
Priyadarshini Bhagwati College of Engineering Page 32
Dept. of Electronics & Communuication Engg. ADE Lab Manual
MATLAB CODE :
clc;
close all;
clear all;
fc1 = 10; % Frequency of 1st sine wave carrier
fc2 = 30; % Frequency of 2nd sine wave carrier
fp = 5; % Frequency of periodic binary pulse message
amp = 4; % Amplitude of both carrier and binary pulse message
t = 0 : 0.001 : 1;
c1 = amp .* sin(2*pi*fc1*t);
c2 = amp .* sin(2*pi*fc2*t);
subplot(4,1,1);
plot(t,c1);
xlabel(’Time’);
ylabel(’Amplitude’);
title(’Carrier Wave 1’);
subplot(4,1,2);
plot(t,c2);
xlabel(’Time’);
ylabel(’Amplitude’);
title(’Carrier Wave 2’);
m = amp .* square(2*pi*fp*t) + amp;
subplot(4,1,3);
plot(t,m);
xlabel(’Time’);
ylabel(’Amplitude’);
title(’Binary Message Signal’);
for i = 0 : 1000
if m(i + 1) = = 0
mm(i + 1) = c2(i + 1);
Priyadarshini Bhagwati College of Engineering Page 33
Dept. of Electronics & Communuication Engg. ADE Lab Manual
else
mm(i + 1) = c1(i +1);
end;
end;
subplot(4,1,4);
plot(t,mm);
xlabel(’Time’);
ylabel(’Amplitude’);
title(’FSK Modulated Signal’);
OUTPUT :
Figure 19: Frequency Shift Keying Output
RESULT :
The program for FSK modulation has been simulated in MATLAB
and necessary graphs are plotted.
Priyadarshini Bhagwati College of Engineering Page 34
Dept. of Electronics & Communuication Engg. ADE Lab Manual
EXPERIMENT NO. 5
AIM : :To verify sampling theorem using MATLAB
TOOLS USED : Ubuntu Operating System, Matlab Software
THEORY :
Sampling is the process of converting a continuous time signal
into a discrete time signal. In sampling, the values of the continu-
ous time signal are recorded at discrete intervals of time (usually
equidistant).
The number of samples taken during one second is called the
sampling rate. Sampling is described by the relation:
x (n) = x a (nT ) −∞ < n < ∞
Where x (n) is the discrete-time signal obtained by sampling the
1
analog signal every T seconds. Fs = T is known as the Sampling
Frequency.
The Sampling Theorem states that: ”A band limited signal can
be reconstructed exactly if it is sampled at a rate at least twice the
maximum frequency component in it”.
Assume a band-limited signal x a (t) = A sin(ωt) = A sin(2πFt)
with maximum frequency component ’ω’ . The theorem says that,
for a good reconstruction of the original continuous time signal,
the sampling frequency must be at least 2ω. This frequency is
known as the ”Nyquist Rate”.
Sampling this signal at Fs gives us the discrete time signal:
2πFn
x a (nT ) = A sin
Fs
sin 2πFt
g(t) =
2πFt
Priyadarshini Bhagwati College of Engineering Page 35
Dept. of Electronics & Communuication Engg. ADE Lab Manual
Then, approximated recovered signal can be written as:
∞
n n
x a (t) = ∑ x a
′
g t−
n=−∞ Fs Fs
Whenever the Sampling frequency Fs is greater than or equal to
the Nyquist Frequency, the signal can be reconstructed faithfully,
capturing all the essential properties of the original continuous-
time signal.
However, when Fs < 2F, we encounter a problem called ”Alias-
ing”, where distortion is caused by high frequencies overlapping
low frequencies. A lot of data is lost in this process and the signal
cannot be recovered.
Now, assuming the sampling frequency is more than the Nyquist
Frequency, the continuous time signal can be reconstructed accu-
rately using the interpolation function.
MATLAB CODE :
clear all;
close all;
clc;
% Signal Parameters
f = 1000 ; % Signal Frequency = 1kHz
T = 1/f ; % Signal Period
t = 0:0.01*T:2*T ; % Time index
% Generate the original signal and plot it:
x = cos(2*pi*f*t) ; % Signal : 2*pi*f*t
subplot(2,2,1) ;
plot(t,x) ;
title(’Continuous signal’) ;
xlabel(’t’) ;
ylabel(’x(t)’) ;
Priyadarshini Bhagwati College of Engineering Page 36
Dept. of Electronics & Communuication Engg. ADE Lab Manual
%Oversampling Condition:
fs1 = 10*f ; % Oversampling (fs > 2f)
n1 = 0:1/fs1:2*T ; % Time scale (nTs)
x1 = cos(2*pi*f*n1) ; % Generating sampled signal
subplot(2,2,2) ;
stem(n1,x1) ;
hold on ;
plot(n1,x1,’r’) ;
hold off ;
title(’Oversampling Condition : fs = 10f’) ;
xlabel(’n’) ;
ylabel(’x(n)’) ;
% Right Sampling Condition:
fs2 = 2*f ; % Nyquist Rate Sampling (fs = 2f)
n2 = 0:1/fs2:2*T ; % Time scale (nTs)
x2 = cos(2*pi*f*n2) ;
subplot(2,2,3) ;
stem(n2,x2) ;
hold on ;
plot(n2,x2,’r’) ;
hold off ;
title(’Sampling at Nyquist Frequency : fs = 2f’) ;
xlabel(’n’) ;
ylabel(’x(n)’) ; % Under Sampling Condition:
fs3 = 1.5*f ; % Undersampling (fs < 2f)
n3 = 0:1/fs3:2*T ; % Time scale (nTs)
x3 = cos(2*pi*f*n3) ;
subplot(2,2,4) ;
stem(n3,x3) ;
hold on ;
plot(n3,x3,’r’) ;
Priyadarshini Bhagwati College of Engineering Page 37
Dept. of Electronics & Communuication Engg. ADE Lab Manual
hold off ;
title(’Undersampling Condition : fs = 1.5 f’) ;
xlabel(’n’) ;
ylabel(’x(n)’) ;
OUTPUT :
Figure 20: Sampling Process with various sampling frequencies
RESULT :
The program for verification of Sampling Theorem is simulated in
Matlab and necessary graphs are plotted.
Priyadarshini Bhagwati College of Engineering Page 38
Dept. of Electronics & Communuication Engg. ADE Lab Manual
EXPERIMENT NO. 6
AIM : :To study Quantization using MATLAB
TOOLS USED : Ubuntu Operating System, Matlab Software
THEORY :
The digitization of analog signals involves the rounding off of the
values which are approximately equal to the analog values. The
method of sampling chooses a few points on the analog signal and
then these points are joined to round off the value to a near stabi-
lized value. Such a process is called as Quantization.
The analog-to-digital converters perform this type of function
to create a series of digital values out of the given analog signal.
This signal to get converted into digital, has to undergo sampling
and quantizing.
The quantizing of an analog signal is done by discretizing the
signal with a number of quantization levels. Quantization is rep-
resenting the sampled values of the amplitude by a finite set of
levels, which means converting a continuous-amplitude sample
into a discrete-time signal.
Both sampling and quantization result in the loss of informa-
tion. The quality of a Quantizer output depends upon the number
of quantization levels used. The discrete amplitudes of the quan-
tized output are called as representation levels or reconstruction
levels. The spacing between the two adjacent representation lev-
els is called a quantum or step-size.
Types of Quantization
There are two types of Quantization - Uniform Quantization and
Non-uniform Quantization.
The type of quantization in which the quantization levels are
uniformly spaced is termed as a Uniform Quantization. The type
Priyadarshini Bhagwati College of Engineering Page 39
Dept. of Electronics & Communuication Engg. ADE Lab Manual
of quantization in which the quantization levels are unequal and
mostly the relation between them is logarithmic, is termed as a
Non-uniform Quantization.
There are two types of uniform quantization. They are Mid-
Rise type and Mid-Tread type. The following figures represent
the two types of uniform quantization.
Quantization Error
For any system, during its functioning, there is always a difference
in the values of its input and output. The processing of the system
results in an error, which is the difference of those values.
The difference between an input value and its quantized value
is called a Quantization Error. A Quantizer is a logarithmic func-
tion that performs Quantization roundingoffthevalue. An analog-
to-digital converter (ADC) works as a quantizer.
Quantization Noise
It is a type of quantization error, which usually occurs in analog
audio signal, while quantizing it to digital. For example, in music,
the signals keep changing continuously, where a regularity is not
found in errors. Such errors create a wideband noise called as
Quantization Noise.
Priyadarshini Bhagwati College of Engineering Page 40
Dept. of Electronics & Communuication Engg. ADE Lab Manual
MATLAB CODE :
clc;
clear all;
close all;
% Times at which to sample the sine function
t = [0:0.1:2*pi] ;
% Original signal, a sine wave
sig = sin(t) ;
% Length 11, to represent 12 intervals
partition = [-1:0.2:1] ;
% Length 12, one entry for each interval
codebook = [-1.2:0.2:1];
[index,quants] = quantiz(sig,partition,codebook); % Quantize.
plot(t, sig, ’x’, t, quants, ’.’ );
legend(’Original signal’, ’Quantized signal’ );
axis([-0.2 7 -1.2 1.2]);
Priyadarshini Bhagwati College of Engineering Page 41
Dept. of Electronics & Communuication Engg. ADE Lab Manual
OUTPUT :
Figure 21: Output Waveform showing Quantization Process
RESULT :
The program for verification of Qunatization process is simulated
in Matlab and necessary graphs are plotted.
Priyadarshini Bhagwati College of Engineering Page 42