Adc Lab Manual Vr2076

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 131

20EC4353 VR20 Regulations Analog & Digital Communications

ANALOG AND DIGITAL COMMUNICATIONS LAB


LAB MANUAL

Lab Code : 20EC4353


Regulations : VR20
Semester: IV

Prepared
By

Dr. A Vijay Sankar, Associate Professor


Mrs. Y Sarada Devi, Assistant professor

Department of Electronics and Communication Engineering

VELAGAPUDI RAMAKRISHNA SIDDHARTHA ENGINEERING COLLEGE


(Sponsored by Siddhartha Academy of General & Technical Education)
Affiliated by JNTUK, Kakinada
20EC4353 VR20 Regulations Analog & Digital Communications
20EC4353 VR20 Regulations Analog & Digital Communications

VELAGAPUDI RAMAKRISHNA SIDDHARTHA ENGINEERING COLLEGE


(Sponsored by Siddhartha Academy of General & Technical Education)
Affiliated by JNTUK, Kakinada

Department of Electronics and Communication Engineering

Visio
n
 To produce globally competitive and socially sensitized engineering graduates and to bring out
quality research in the frontier areas of Electronics & Communication Engineering.

Mission
 To provide quality and contemporary education in the domain of Electronics & Communication
Engineering through periodically updated curriculum, best of breed laboratory facilities,
collaborative ventures with the industries and effective teaching learning process.
 To pursue research and new technologies in Electronics & Communication Engineering and
related disciplines in order to serve the needs of the society, industry, government and scientific
community.

Programme Educational Objectives


After 3 to 5 years of graduation, ECE graduates will

PEO1. Excel in their professional career and higher education in Electronics


and Communication Engineering and related fields

PEO 2. Exhibit leadership through technological ability and contemporary knowledge.

PEO 3. Adapt to emerging technologies for sustenance in their relevant areas of interest.
20EC4353 VR20 Regulations Analog & Digital Communications

Program Outcomes (POs)


Engineering knowledge: An ability to apply knowledge of mathematics, science,
PO1 fundamentals of engineering to solve electronics and communication engineering
problems.
Problem analysis: An ability to identify, formulate and analyze electronics and
PO2 communication systems reaching substantiated conclusions using the first principles of
mathematics and engineering sciences.
Design/development of solutions: An ability to design solutions to electronics and
PO3
communication systems to meet the specified needs.
Conduct investigations of complex problems: An ability to design and perform
PO4 experiments of complex electronic circuits and systems, analyze and interpret data to
provide valid conclusions.
Modern tool usage: An ability to learn, select and apply appropriate techniques,
PO5
resources and modern engineering tools for modeling complex engineering systems.
The engineer and society: Knowledge of contemporary issues to assess the societal
PO6
responsibilities relevant to the professional practice.
Environment and sustainability: An ability to understand the impact of professional
PO7 engineering solutions in societal and environmental contexts and demonstrate
knowledge of and need for sustainable development.
Ethics: An understanding of professional and ethical responsibilities and norms of
PO8
engineering practice.
Individual and team work: An ability to function effectively as an individual, and as
PO9
a member in diverse teams and in multidisciplinary settings.
Communication: An ability to communicate effectively with engineering community
PO10
and with society at large.
Project management and finance: An ability to demonstrate knowledge and
PO11 understanding of engineering and management principles and apply these to manage
projects.
Life-long learning: An ability to recognize the need for, and engage in independent
PO12
and life-long learning in the broadest context of technological change.

Program Specific Program Outcomes (PSPOs)

PSO1 Demonstrate proficiency in the use of IOT required in real life applications.

Implement functional blocks of hardware / software designs for signal processing and
PSO2
communication applications.
20EC4353 VR20 Regulations Analog & Digital Communications

CODE OF CONDUCT FOR THE LABORATORIES:

1. All students must observe the dress Code while in the laboratory.
2. All bags must be left at the indicated place.
3. The lab timetable must be strictly followed.
4. Be PUNCTUAL for your laboratory session.
5. Workspace must be kept clean and tidy at all time.
6. Handle the systems and equipment with care.
7. All students are liable for any damage to the accessories due to their own negligence.
8. Students are strictly PROHIBITED from taking out any items from the laboratory.
9. Report immediately to the Lab Supervisor if any malfunction of the accessories, is there.
10. Return the components/meters, turn off the system properly before leaving the lab
20EC4353 VR20 Regulations Analog & Digital Communications

20EC4353: ANALOG AND DIGITAL COMMUNICATIONS LAB


Course Category: Programme Core Credits: 1.5
Course Type: Practical Lecture-Tutorial-Practice: 0-0-3
Prerequisites: 20EC4304: Analog & Continuous Evaluation: 30
Digital Communications Semester end Evaluation: 70
Total Marks: 100

Course Upon successful completion of the course, the student will be able to:
outcomes
CO1 Experimentally verify the working of AM and FM techniques using hardware
and simulation
CO2 Experimentally verify the working of Digital modulation techniques and pulse
transmission using hardware and simulation
Contribution PO PO PO PO PO PO PO PO PO PO PO PO PSO PSO
of Course 1 2 3 4 5 6 7 8 9 10 11 12 1 2
Outcomes
towards CO1
achievement 1 2 2
of Program
Outcomes (1– CO2
Low,2
1 2 2
-Medium, 3–
High)
Course Experiments using Hardware (using Discrete Components):
Content
1. Generation and detection of Amplitude Modulated signal
2. Generation and detection of Frequency Modulated signal
3. Generation and detection of DSB SC Modulated signal
4. Generation and Detection of PCM signal
5. Generation and Detection of DM signal
6. Generation and Detection of ASK, FSK and PSK signal

Experiments using Software: - (Matlab, Labview, Scilab , Any Opensource)


1. Simulation of Amplitude Modulation and Demodulation
2. Simulation of Frequency Modulation and Demodulation
3. Simulation of DSB SC Modulation and Demodulation
4. Simulation of various Line codes generation.
5. Simulation of Matched Filter for a rectangular pulse.
6. Simulation of ASK, FSK and PSK modulation and Demodulation
Course-based project:
1. Real time implementation of capturing of speech signal and its transmission
20EC4353 VR20 Regulations Analog & Digital Communications

and reception with Analog/ Digital Modulation technique


2. Transmission and Reception of Text/Music/Voice with AM/FM –
Implementation using LabVIEW
Reference books 1. Simon Haykin. “Introduction to Analog and Digital Communication Systems”,
3rdedition, 2009, John Wiley and Sons
2. George Kennedy, Electronic Communication Systems, sixth edition, Tata
McGraw Hill Edition -2017
3. Simon Haykin, “Communication Systems”, John Wiley & Sons, 4th edition,
2007.
E-resources and 1. https://www.vlab.co.in/broad-area-electronics-and-communications
other digital 2. http://www.commsp.ee.ic.ac.uk/~kkleung/Intro_Signals_Comm_2019/
material Matlab_for_students_2018.pdf
3. https://scilab.in/lab_migration/generate_lab/16/1

NB: Eligibility for External Practical Examination:


1. A minimum of 10(Ten) experiments to be performed and recorded by the candidate.
2. Execute and submit a course-based project
20EC4353 VR20 Regulations Analog & Digital Communications

Experiment 1
AMPLITUDE MODULATION AND DEMODULATION
AIM:

To perform Amplitude modulation for the baseband signal, analyze and interpret the data.

REQUIREMENTS:
Resistors R1, R2, R3,R4 1KΩ
R5,R9 10 KΩ
R6, R8 47KΩ
R7 Potentiometer 10KΩ
R10 6.8KΩ
R11, R12 3.9KΩ
R13 100KΩ
Capacitors C1,C2, C3,C4 0.1μF
C5 (Variable) 10nF/1nF/2nF
Diode OA79
Regulated Power Supply
Function Generator
Cathode Ray
Oscilloscope

BLOCK DIAGRAM:

Message Input AM
(1V P-P 5K Using IC1496
Hz) AM Output

Carrier
(1V P-P 100K Hz)

Diode Detector Circuit

AM Input Message Output


20EC4353 VR20 Regulations Analog & Digital Communications

CIRCUIT DIAGRAM:

Fig: Amplitude Modulation

Fig: Demodulation

CALCULATIONS:
V max V min
1. Modulation index m
V max V min

PROCEDURE: (MODULATION)

1. The connections are to be made according to the circuit diagram as shown in the figure.
2. A modulating signal has to be given from the function generator with an amplitude 1V peak
to peak and frequency <5 KHz at the appropriate terminals of the circuit.
20EC4353 VR20 Regulations Analog & Digital Communications

3. The carrier signal has to be applied from another function generator with an amplitude 5V
peak to peak and frequency >100 KHz at the suitable terminals of the circuit.
4. The required adjustments are to be made with the 47 KΩ potentiometer to get the desired output.
5. The under, critical and over modulation case are to be observed by connecting the DSO at
the output terminals of the circuit.
6. The modulation index should be calculated by substituting the values in the formula given.
(DEMODULATION):

1. The circuit has to be connected as shown in figure


2. The output of modulator (critical modulation) is to be connected as input of demodulator
3. The demodulated output should be observed on DSO which replicates the message signal

MODEL WAVEFORMS:
20EC4353 VR20 Regulations Analog & Digital Communications

RESULTS:

Message signal Carrier signal

Amplitude : Amplitude :

Frequency : Frequency :

Type of AF Signal RF Signal Vmax Vmin Modulation % of


Modulation (v) (v) index Modulation

Under Modulation

Critical Modulation

Over Modulation

Demodulated signal

Amplitude : Frequency :
20EC4353 VR20 Regulations Analog & Digital Communications

POST LAB QUESTIONS:

1. What is the need for modulation?


2. Define AM and draw its spectrum?
3. Define detection process?
4. What are the different types of distortions that occur in an envelope detector?
5. What is the condition of for over modulation?
20EC4353 VR20 Regulations Analog & Digital Communications

Experiment 2
FREQUENCY MODULATION AND DEMODULATION
AIM:

To perform Frequency Modulation for the baseband signal, analyze and interpret the data.

REQUIREMENTS:

R1,R9,R10 100KΩ
R2 100Ω
R3,R7 10KΩ
R4,R12 47KΩ
R5,R6 4.7KΩ
R8 1MΩ
R11 1KΩ
C1,C2,C3 10μF
C4,C5,C9,C11,C12 10nF
C6 1nF
C7,C8,C10 2nF
DIODE 0A79
IC XR2206
IC TL084
Regulated Power Supply
Function Generator
Cathode Ray
Oscilloscope

BLOCK DIAGRAM:
(MODULATION)

Message Input
Frequency Modulation
Using XR 2206 FM Output
(Carrier Inbuilt)

(DEMODULATION)

FM FM - AM Envelo Filter Buffer Demodulated


Input Conversion pe & Output
Detecto Amplifi
r er
20EC4353 VR20 Regulations Analog & Digital Communications

CIRCUIT DIAGRAMS:

Circuit Diagram of Frequency Modulation

Circuit Diagram of Frequency De Modulation

CALCULATIONS:

f f max f min
  fm f  2

PROCEDURE: (MODULATION)

1. The connections are to be made according to the circuit diagram as shown in the figure.
2. Without applying the message signal from the function generator, the carrier signal should
be observed and corresponding amplitude and frequency are to be noted.
20EC4353 VR20 Regulations Analog & Digital Communications

3. A message signal should be applied from the function generator at the appropriate terminals
in the circuit with amplitude 20V peak to peak and frequency <1KHz.
4. The adjustments of the signals should be made to observe the frequency modulated signal
clearly on the DSO.
5. From the frequency modulated waveform fmax & fmin are to be noted.
6. The modulation index has to be calculated using the formulae

(DEMODULATION)

1. The circuit has to be connected as shown in figure.


2. The output of modulator (critical modulation) is to be connected as input of demodulator.
3. The demodulated output should be observed on DSO which replicates the message signal.

MODEL WAVE FORMS:

Waveforms of Frequency modulation

RESULT:
20EC4353 VR20 Regulations Analog & Digital Communications

Message signal Carrier signal

Amplitude : Amplitude :

Frequency : Frequency :

Modulation index
fmax
fmin
∆f = (fmax- fmin) / 2
β = ∆f / fm
Demodulated signal

Amplitude : Frequency :

POST LAB QUESTIONS:

1. What will be the change in the wave under FM when the amplitude or frequency of the
modulating signal is increased?
2. The FM station has less noise while receiving the signal. Justify your answer?
3. What happens when a stronger signal and a weaker signal both overlap at the same frequency in
FM?
4. What is the band width for FM?
5. Define Frequency Deviation?
20EC4353 VR20 Regulations Analog & Digital Communications

Experiment 3
DSBSC MODULATION AND DEMODULATION

AIM:

To Perform DSBSC modulation for the baseband signal, analyze and interpret the data.

REQUIREMENTS:
R1,R2,R3,R4,R13,R16 1KΩ
R5,R9,R15 10KΩ
R6,R8 47KΩ
R7 100KΩ
R10 6.8KΩ
R11,R12 3.9KΩ
R14,R19,R20 2.2KΩ
R15 220Ω
R17 100KΩ
R2 100Ω
C1,C2,C3,C4,C5,C6,C7,C8,C11 0.1μF
C9 1Μf
C10 2μF
C12 1nf
IC MC1496
Regulated Power Supply
Function Generator
Cathode Ray Oscilloscope

BLOCK DIAGRAM:
20EC4353 VR20 Regulations Analog & Digital Communications

CIRCUIT DIAGRAM:

DSBSC Modulator & Demodulator

17
20EC4353 VR20 Regulations Analog & Digital Communications

PROCEDURE: (MODULATION)

1. The connections are to be made according to the circuit diagram as shown in the figure.
2. A modulating signal has to be given from the function generator with an amplitude 1V peak
to peak and frequency <5 KHz at the appropriate terminals of the circuit.
3. The carrier signal has to be applied from another function generator with an amplitude 5V
peak to peak and frequency >100 KHz at the suitable terminals of the circuit.
4. The required adjustments are to be made with the 47 KΩ potentiometer to get the desired output.
5. The DSO probe should be connected at the output terminals and the modulated signal has to
be observed.
PROCEDURE: (DEMODULATION):

1. The circuit has to be connected as shown in figure.


2. The output of modulator (critical modulation) is to be connected as input of demodulator.
3. The demodulated output should be observed on DSO which replicates the message signal.

MODEL WAVEFORMS:

Message

Carrier

DSBSC Wave

18
20EC4353 VR20 Regulations Analog & Digital Communications

RESULT:

Message signal Carrier signal

Amplitude : Amplitude :

Frequency : Frequency :

DSBSC signal

Amplitude : Frequency :

Demodulated signal

Amplitude : Frequency :

19
20EC4353 VR20 Regulations Analog & Digital Communications

POST LAB QUESTIONS:

1. Draw the Spectrum of DSBSC?


2. Advantages of DSBSC over AM?
3. Give the two methods of generating DSBSC-AM?
4. What are advantages of Ring modulator?
5. What is the bandwidth of DSBSC signal?

20
20EC4353 VR20 Regulations Analog & Digital Communications

Experiment 4
GENERATION AND DETECTION OF
AIM PCM
:

To generate and detect a PCM signal


REQUIREMENTS:
 PCM Modulator trainer
 PCM Demodulator trainer
 Storage Oscilloscope
 Digital multimeter
 2 Nos’ of co-axial cables (standard accessories with trainer)
 Patch chords
BLOCK DIAGRAM:

21
20EC4353 VR20 Regulations Analog & Digital Communications

CIRCUIT DIAGRAM:

SCHEMNTIC DIAGRAM:

PROCEDURE: MODULATION

22
20EC4353 VR20 Regulations Analog & Digital Communications

1. It should be ensured that group 3 clock is selected in the clock generation section pf the kit.
Selection can be done with the help of switch S1. The corresponding LED indication can be
observed.
2. The jumper J3 must be kept in the fast mode position
3. The selected clock frequency 230 KHz should be available at the TXCLK post.
4. The 250 KHz signal having voltage around 4V should be connected from the function generator
to the ADC post of the A/D convertor.
5. The switch S12 is to be made to the NONE parity mode and the corresponding LED should
be observed.
6. The A/D converted bits are to be observed on the LED indicators (B0-B6) in the ADC section
7. The pseudo random bit sequence at the test point marked is to be noted as PRBS OUT.
8. TX DATA post shows the multiplexed data having PRBS & PCM data.
9. To provide the timing and sync information to the receiver section, the TX CLK post has to
be connected to RX CLK and the TX DATA should be connected to the RX DATA.
10. The recovered sync can be observed at the SYNC OUT post.
11. The SYNC OUT post should now be connected to the RX SYNC post.
12. The serial to parallel converted data on the corresponding LED indication can be observed in
the Data Latch section.
13. The D/A converted output data can be observed on the DACOUT post.
14. The DAC OUT post should now be connected to the IN33 post of the second order filter and
OUT#) should be connected to IN#$ of the 4th order LPF.
15. The recovered signal can be observed at OUT31 Post of the 4th order filter

23
20EC4353 VR20 Regulations Analog & Digital Communications

MODEL WAVEFORMS: PCM

24
20EC4353 VR20 Regulations Analog & Digital Communications

RESULT:

25
20EC4353 VR20 Regulations Analog & Digital Communications

POST LAB QUESTIONS:


1. Write an expression for band width of binary PCM with N messages each with a
maximum frequency of fm Hz?

2. The signal to quantization noise ratio in a PCM system depends on what criteria?

3. What is the purpose of the sample and hold circuit?

4. Describe the basic principles of PCM system and PCM transmitter?

5. Define companding and state the need for companding in a PCM system?

26
20EC4353 VR20 Regulations Analog & Digital Communications

Experiment 5
GENERATION AND DETECTION OF
AIM: DM

To study the characteristics of Delta Modulation and Demodulation.


REQUIREMENTS:
 DM Modulator & Demodulator trainer
 Storage Oscilloscope
 Digital multimeter.
 2 No’s co-axial cables (standard accessories with trainer)

BLOCK DIAGRAM : MODULATOR & DEMODULATOR

Comparator

AF Signal
DM Signal
TL084 L
M
339

Buffer/Signal shaping circuit


74LS191
DAC0808

UP DOWN
COUNTER

D/A Convertor
CLOCK
INPUT 4 KHz

27
20EC4353 VR20 Regulations Analog & Digital Communications

PROCEDURE: DM Modulator:
1. The group5 (GP5) clock has to be selected in the clock generation section.
2. This selection can be done with the help of switch S! and the corresponding LED indication has
to be observed.
3. The transmitter clock frequency 8KHz has to be selected using switch S2 and the selected clock
is indicated on the corresponding LED indication in the Clock generation section.
4. The 250KHZ sine signal having amplitude of 0V is connected to IN13 post and TXCLK post
is connected to the CLK Delta POST of Digital Sampler.
5. The switch s5 is to be moved to Delta Position.
6. The OUT8 post of Digital sampler should be connected to IN 15 post of Integrator1.
7. The OUT9 post of integrator should be given to IN14 post of Digital Sampler.
8. The delta modulated output can be observed at OUT8 post of the Digital Sampler.
9. The integrator output can be observed at OUT9 post of the Integrator1 section. An observation
that a decrease in amplitude of the triangular signal with increase in amplitude can be observed.
10. An increase in amplitude of the 250Hz sine wave can be made using pot P3. Signal
approximating 250Hz sine wave is available at OUT9 post of the Integrator1.
11. Now the amplitude of the 250Hx signal should be increased further high and it can be observed
that the integrator output cannot follow the input signal.
12. The OUT8 post of the digital sampler is to be connected to the IN25 post of the
demodulator section.
13. The OUT21 of the demodulator section should be connected to IN29 of the Integrator 3 section.
14. The switch S9 in the integrator section should be kept towards High position.
15. The OUT25 Post should be connected to the IN33 of the second order LPF.
16. The OUT30 post of the 2nd order LPF should be connected to the IN34 post of the 4th order LPF
17. The reconstructed signal can be observed.
18. The above procedure can be observed for different input signals and clock frequencies.

28
20EC4353 VR20 Regulations Analog & Digital Communications

MODEL WAVEFORMS:

29
20EC4353 VR20 Regulations Analog & Digital Communications

RESULT

30
20EC4353 VR20 Regulations Analog & Digital Communications

POST LAB QUESTIONS:


1. Compare PCM and DM based on number of bits required to encode each sample?

2. State the drawbacks of Delta modulation. List the methods to overcome the same

3. How DM is improved over PCM. Calculate the SNR of DM system?

4. What is slope overload error, Granular noise and how it could be rectified?

5. List the any two applications of DM.

31
20EC4353 VR20 Regulations Analog & Digital Communications

Experiment 6
GENERATION AND DETECTION OF ASK, FSK AND PSK
AIM:
To study the generation and detection of ASK, FSK and PSK techniques
REQUIREMENTS:
 ASK, FSK and PSK generation and reconstruction kit
 Digital storage oscilloscope
 Patch chords

CIRCUIT DIAGRAM

BLOCK DIAGRAM:

Block Diagram for generation of ASK, FSK and PSK


32
20EC4353 VR20 Regulations Analog & Digital Communications

PROCEDURE: Block Diagram for the detection of ASK, FSK and PSK
Procedure ASK
1. The circuit has to be connected according to the diagram as shown in figure
2. An input bit sequence has to be generated from the function generator.
3. Here the input is considered to be a sequence of 010101010 (a square signal from function
generator)
4. The carrier with frequency is to be generated from function generator.
5. Both the signals message and carrier are to be given to the appropriate input terminals of the circuit.
6. The corresponding amplitude shift keyed signal has be observed at the output terminals.
Procedure FSK
1. The circuit has to be connected according to the diagram as shown in figure
2. An input bit sequence has to be generated from the function generator.
3. Here the input is considered to be a sequence of 010101010 (a square signal from function
generator)
4. Two carriers with different frequencies are to be generated from function generators.
5. Both the signals message and carriers are to be given to the appropriate input terminals of
the circuit.
6. Two carriers are to be applied at the collector terminals of the transistors.
7. As the transistors being NPN and PNP, when the message is applied at their base terminals each
move into ON state depending on the message bits and that corresponding signal with a defined
frequency appears at the output terminals
8. The corresponding frequency shift keyed signal has to be observed at the output terminals.

33
20EC4353 VR20 Regulations Analog & Digital Communications

Procedure PSK
1. The circuit has to be connected according to the diagram as shown in figure
2. An input bit sequence has to be generated from the function generator.
3. Here the input is considered to be a sequence of 010101010 (a square signal from function
generator)
4. Two carriers with different phases are to be generated from function generators.
5. Both the signals message and carriers are to be given to the appropriate input terminals of the
circuit.
6. Two carriers are to be applied at the collector terminals of the transistors.
7. As the transistors being NPN and PNP, when the message is applied at their base terminals each
move into ON state depending on the message bits and that corresponding signal with a defined
phase appears at the output terminals
8. The corresponding phase shift keyed signal has to be observed at the output terminals.

MODEL WAVEFORMS: ASK

MODEL WAVEFORMS: FSK

34
20EC4353 VR20 Regulations Analog & Digital Communications

FSK Modulated wave

BPSK Modulated wave

35
20EC4353 VR20 Regulations Analog & Digital Communications

RESULT:

36
20EC4353 VR20 Regulations Analog & Digital Communications

POST LAB QUESTIONS:


1. Draw ASK and PSK wave forms for a data stream 1010101?

2. What are the various digital modulation schemes?

3. Bring out the difference between DPSK and BPSK?

4. Draw the block diagram of BPSK transmitter?

5. Discuss the principle of operation of FSK receiver?

37
20EC4353 VR20 Regulations Analog & Digital Communications

MATLAB INTRODUCTION
MATLAB® is a programming language and numerical computing environment. The name
MATLAB® is an acronym for “Matrix Laboratory”. As it name suggests it allows easy manipulation of
matrix and vectors. Plotting functions and data is made easy with MATLAB®. It has a good Graphic
User Interface and conversion of matlab files to C/C++ is possible. It has several toolboxes that possess
specific functions for specific applications. For example Image Processing, Neural Networks, CDMA
toolboxes are name a few. An additional package, Simulink, adds graphical multidomain simulation and
Model-Based Design for dynamic and embedded systems. Simulink contains Blocksets that is analogous
to Toolboxes.It was created by Mathworks Incorporation, USA. MATLAB® has become a defacto
programming language for Engineers. Writing MATLAB programs for modulation applications require
knowledge on very few functions and operators. The operators mostly used are arithmetic operators and
matrix operators. To know more type in the command prompt ‘help ops’. MATLAB will give a list in
that to know on specific operator say addition type in the command prompt ‘help plus’. MATLAB will
give how to use and other relevant information. Commonly used graphical functions are plot, figure,
subplot, title, and mathematical functions are sin and cos only. The mathematical functions sin and cos
are self explanatory. The graphical function figure will create a new window and then subsequent
graphical commands can be applied. The plot function usually takes two vectors and plot data points
according to given vector data. In this case it will time Vs signal. Subplot function is used when two or
more plots are drawn on the same figure. As title function suggests it helps to write title of the graph in
the figure. For further details type ‘help plot’ or ‘help subplot’ in the command prompt and learn the
syntax, few commonly used keywords are explained below:
 clc clears all the text from the Command Window, resulting in a clear screen.
 Clear All Tasks disables all workflow tasks in the hdlcoder.Work flow Config object.
 CloseAll () closes all allocation sets without saving.
 x = input(prompt) displays the text in prompt and waits for the user to input a value and press
the Return key. The user can enter expressions, like pi/4 or rand(3), and can use variables in the
workspace. If the user presses the Return key without entering anything, then input returns an
empty matrix. If the user enters an invalid expression at the prompt, then MATLAB ® displays
the relevant error message, and then redisplays the prompt.
 Figure creates a new figure window using default property values.
 Plot(X,Y) creates a 2-D line plot of the data in Y versus the corresponding values in X.
 Subplot (m,n,p) divides the current figure into an m-by-n grid and creates axes in the position
specified by p. MATLAB® numbers subplot positions by row. The first subplot is the first
column of the first row; the second subplot is the second column of the first row, and so on. If
axes exist in the specified position, then this command makes the axes the current axes.

38
20EC4353 VR20 Regulations Analog & Digital Communications

Program 1
AMPLITUDE MODULATION AND DEMODULATION USING MATLAB
AIM
:
To Perform Amplitude modulation for the baseband signals of different Modulation index and
perform demodulation using MATLAB
REQUIREMENTS:
MATLAB 2017b
ALGORITHM:

1.
A Carrier signal whose frequency is fc and signal in the in the
form Ac Sin (2πfct) should be considered.
2.
A Modulating signal with frequency fm and signal in the in the
form Am Sin (2πfmt) is generated.
3.
A program has to be written to verify
a. Under modulation(K<1)
b. Critical modulation(K=1)
c. Over modulation (K>1)
Using the formula S(t)=Ac (1+K sin2πfmt) sin2πfct
4.
During execution the condition fc>fm has to be checked.
5.
The required plots for the amplitude modulated signals in all the three cases can be observed.
6.
To observe demodulated signal required formula and appropriate filters are to be used to get
an approximate message signal.

MATLAB Program:
clc;
clear all;
close
all;
t=[0:0.001:2];
f1=5;
m=sin(2*pi*f1*t);
subplot(6,2,[1,2]);
plot(t,m);
title('mesage');
f2=50;

39
20EC4353 VR20 Regulations Analog & Digital Communications
c=sin(2*pi*f2*t);
subplot(6,2,[3,4]);
plot(t,c);

40
20EC4353 VR20 Regulations Analog & Digital Communications

title('carrier')
; m1=0.5;
s1=(1+(m1*m)).*c;
subplot(6,2,[5,6]);
plot(t,s1);
title('under modulation');
m2=1; s2=(1+
(m2*m)).*c;
subplot(6,2,[7,8]);
plot(t,s2);
title('100%modulation');
m3=1.5;
s3=(1+(m3*m)).*c;
subplot(6,2,[9,10]);
plot(t,s3);
title('over modulation');
s5=s2.*c;
[b,a]=butter(5,0.1);
s4=filter(b,a,s5);
subplot(6,2,[11,12]);
plot(t,s4);
title('demodulation' );
EXPECTED
OUTPUT:

RESULTS:

40
20EC4353 VR20 Regulations Analog & Digital Communications

POST LAB QUESTIONS:

1. Define modulation & demodulation?


2. What are the different types of linear modulation techniques?
3. What are the disadvantages of conventional AM (or) double side band full carrier system?
4. Derive an expression for AM wave and its power relation?
5. Define modulation index?

41
20EC4353 VR20 Regulations Analog & Digital Communications

Program 2
FREQUENCY MODULATION AND DEMODULATION USING MATLAB
AIM
:

 To generate frequency modulated signal and determine the modulation index and bandwidth
for various values of amplitude and frequency of modulating signal.
 To demodulate a Frequency Modulated signal using FM detector.
REQUIREMENTS:

MATLAB 2017b

ALGORITHM:

1.
A Carrier signal whose frequency is fc and signal in the in the
form Ac Sin (2πfct) should be considered.
2.
A Modulating signal with frequency fm and signal in the in the
form Am Sin (2πfmt) is generated.
3.
Consider m to be the modulation index.
4.
Using the formula y=sin (2*pi*fc*t- (m.*sin(2*pi*fm*t))); the program to generate the
modulated signal can be buit.
5.
The appropriate values in the command window are to be entered to get a frequency
modulated signal.
6.
To observe demodulated signal required formula and appropriate filters can be used to get
an approximate message signal.

MATLAB PROGRAM:
clc;
clear all;
close
all;
t=[0:0.001:4];
f1=1;
m=cos(2*pi*f1*t)
; subplot(4,2,
[1,2]); plot(t,m);

42
20EC4353 VR20 Regulations Analog & Digital Communications
title('message');
f2=30;

43
20EC4353 VR20 Regulations Analog & Digital Communications

c=sin(2*pi*f2*t);
subplot(4,2,[3,4]);
plot(t,c);
title('carrier');
mf=20;
s=sin((2*pi*f2*t)+(mf*sin(2*pi*f1*t)));
subplot(4,2,[5,6]);
plot(t,s);
title('modulated
signal'); syms t1;
x=diff(s);
y=abs(x);
[b,a]=butter(10,0.033);
s1=filter(b,a,y);
subplot(6,2,[11,12]);
plot(s1);
title('demodulation');
EXPECTED WAVEFORMS:

44
20EC4353 VR20 Regulations Analog & Digital Communications

RESULT:

POST LAB QUESTIONS:

1. Define instantaneous frequency deviation?


2. State Carson’s rule?
3. Define Deviation ratio?
4. Derive an expression for the NBFM & WBFM wave?
5. Explain in detail about how a FM signal can be generated using Armstrong method?

45
20EC4353 VR20 Regulations Analog & Digital Communications

Program 3
DSBSC MODULATION AND DEMODULATION USING MATLAB

AIM:

To study about detection of AM DSB-SC demodulation using Synchronous detector

REQUIREMENTS:

MATLAB 2017b

ALGORITHM:

1.
A Carrier signal whose frequency is fc and signal in the in the form Ac Sin (2πfct) should
be considered.
2.
A Modulating signal with frequency fm and signal in the in the form Am Sin (2πfmt) is generated.
3.
Using the formula S=m.*c; the program has to be constructed.
4.
Appropriate values in the command window should be entered to get a frequency modulated signal.
5.
To observe demodulated signal required formula and appropriate filters can be used to get
the reconstructed message signal.

MATLAB PROGRAM:

clc;
clear all;
close
all;
t=[0:0.001:1];
f1=5;
m=sin(2*pi*f1*t);
subplot(4,2,[1,2]);
plot(t,m);
title('message');
f2=80;
c=sin(2*pi*f2*t);

46
20EC4353 VR20 Regulations Analog & Digital Communications
subplot(4,2,[3,4]);

47
20EC4353 VR20 Regulations Analog & Digital Communications

plot(t,c);
title('carrier');
s=m.*c;
subplot(4,2,
[5,6]); plot(t,s);
title('DSB-SC');
s1=s.*c;
[b,a]=butter(5,0.1);
s2=filter(b,a,s1);
subplot(4,2,[7,8]);
plot(t,s2);
title('demodulation');

EXPECTED WAVEFORMS:

48
20EC4353 VR20 Regulations Analog & Digital Communications

RESULTS:

POST LAB QUESTIONS:

1. What are the two ways of generating DSB-SC?


2. What are the applications of balanced modulator?
3. What are the advantages of suppressing the carrier?
4. What are the advantages of balanced modulator?
5. What are the advantages of Ring modulator?

49
20EC4353 VR20 Regulations Analog & Digital Communications

Program 4
VERIFICATION OF LINECODES FOR RANDOMLY GENERATED SEQUENCE
AIM
:
To generate line code for the randomly generated binary sequence using MATLAB
REQUIREMENTS:
MATLAB2017a
THEORY:
A line code is a specific code used for transmitting a digital signal over a channel. Line coding is
used in digital data transport –the pattern of voltage or current used to represent digital data on a
transmission link is called line encoding.
Unipolar –RZ and NRZ : Unipolar RZ and NRZ both have a DC component.

ADVANTAGES DISADVANTAGES
 Simplicity  Contains low-frequency components
 Doesn’t require a lot of bandwidth  Presence of DC level
 Long string of zeros causes loss of
synchronization

Polar –RZ and NRZ: Polar RZ takes twice as much bandwidth as polar NRZ

ADVANTAGES DISADVANTAGES
 Simplicity  Can contain low-frequency components
 No DC Component (leads to signal drooping)
 No clocking component to synchronize
to at receiver
 No error correction capability

50
20EC4353 VR20 Regulations Analog & Digital Communications

Manchester Encoding: There is a transition at the center of every symbol period

ADVANTAGES DISADVANTAGES
 No DC component  Greater bandwidth required for this
waveform
 No signal droop problem
 No error correction capability
 Easy to synchronize to the waveform

PROGRAM:
% program to generate various line codes
% The default program takes 8 bit random data and generates
% and displays various line codes.
% unipolar RZ, Polar RZ
% unipolar NRZ, Polar NRZ
% Manchester coding
clc
clear all
close
all
% creating random data consisting 1's and
0's disp('Generated Random data is as
follows')
data=randi([0,1],1,8); % This will generate a random data of 1's and 0's of length
8. disp(data); % decides the length of each bit
nbits = 10;
bit_duration=ones(1,nbits); % This decides the duration of each bit
% The below condition is written to check whether nbits are even or odd
% depending on nbits any one of the below code is
executed if (mod(nbits,2) == 0)
bit_duration_rz=[ones(1,nbits/2),zeros(1,nbits/2)];% This decides the duration of each
bit else
bit_duration_rz=[ones(1,floor(nbits/2)),zeros(1,ceil((nbits/2)))];
51
20EC4353 VR20 Regulations Analog & Digital Communications
end

52
20EC4353 VR20 Regulations Analog & Digital Communications

% generating data for manchester coding


data_mach = (data*2)-1;
bit_duration_mach = (bit_duration_rz*2)-
1;
% code for generating NRZ line codes
% unipolar NRZ
uni_nrz = kron(data,bit_duration); % performs kroneker product and stores
% in uni_nrz
% polar NRZ
data_p = data*2-1; % first convert the data into 1's and -1's
pol_nrz = kron(data_p,bit_duration);

% code for generation RZ line codes


% unipolar RZ
uni_rz = kron(data,bit_duration_rz); % performs kroneker product and stores
% in uni_nrz
% polar RZ
data_p = data*2-1; % first convert the data into 1's and -1's
pol_rz = kron(data_p,bit_duration_rz);
% to generate machesther coding
mach = kron(data_mach,bit_duration_mach);
%plot the generated line codes
% first plot the NRZ line codes
subplot(5,1,1) % to display both unipolar and polar once can use subplot
plot(uni_nrz)
% to change the axis for better visibility
axis([0,length(uni_nrz),min(uni_nrz)-1,max(uni_nrz)
+1]) title('Unipolar NRZ')
subplot(5,1,2)
plot(pol_nrz)
axis([0,length(pol_nrz),min(pol_nrz)-1,max(pol_nrz)
+1]) title('Polar NRZ')

53
20EC4353 VR20 Regulations Analog & Digital Communications
% plot the RZ line codes

54
20EC4353 VR20 Regulations Analog & Digital Communications

%figure;
subplot(5,1,3) % to display both unipolar and polar once can use
subplot plot(uni_rz)
title('Unipolar RZ')
% to change the axis for better visibility
axis([0,length(uni_rz),min(uni_rz)-1,max(uni_rz)
+1]) subplot(5,1,4)
plot(pol_rz)
title('Polar
RZ')
axis([0,length(pol_rz),min(pol_rz)-1,max(pol_rz)+1])
%figure;
% plot the manchester coding
subplot(5,1,5)
plot(mach)
% to change the axis for better visibility
axis([0,length(mach),min(mach)-1,max(mach)+1])
title('Manchester coding')
%set( gca, 'XGrid', 'on' );
MODELWAVEFORMS:

5
20EC4353 VR20 Regulations Analog & Digital Communications

RESULTS:

POST LAB QUESTIONS:


1. State any four desirable properties of line code
2. Draw the NRZ and RZ code for the digital data 10110001
3. Define transparency of a line code. Give two examples of line codes which are not transparent
4. What are the requirements of a line codes?
5. What is Manchester code? Draw its format for the data 10011?

52
20EC4353 VR20 Regulations Analog & Digital Communications

Program 5
RESPONSE OF MATCHED FILTER FOR UNIPOLAR AND POLAR NRZ
SIGNALING AIM:
Observe the response of the matched filter for Unipolar and polar NRZ signaling schemes
using MATLAB
REQUIREMENTS:
MATLAB2017a
THEORY:

h(t)= k s(Tb-t)
A network whose frequency-response function maximizes the output peak-signal-to-mean-noise (power)
ratio is called a matched filter. This criterion, or its equivalent, is used for the design of almost all radar
receivers. The frequency-response function, denoted H (f), expresses the relative amplitude and phase of
the output of a network with respect to the input when the input is a pure sinusoid. The magnitude ‫׀‬H
(f)
‫ ׀‬of the frequency-response function is the receiver amplitude passband characteristic. If the bandwidth
of the receiver passband is wide compared with that occupied by the signal energy, extraneous noise is
introduced by the excess bandwidth which lowers the output signal-to-noise ratio. On the other hand, if
the receiver bandwidth is narrower than the bandwidth occupied by the signal, the noise energy is
reduced along with a considerable part of the signal energy. The net result is again a lowered signal-to-
noise ratio. Thus, there is an optimum bandwidth at which the signal-to-noise ratio is a maximum.
This is well known to the radar receiver designer. The rule of thumb quoted in pulse radar practice is
that the receiver bandwidth B should be approximately equal to the reciprocal of the pulse width τ. This
is a reasonable approximation for pulse radars with conventional superheterodyne receivers. It is not
generally valid for other waveforms, however, and is mentioned to illustrate in a qualitative manner the
effect of the receiver characteristic on signal-to-noise ratio. The exact specification of the optimum
receiver characteristic involves the frequency-response function and the shape of the received
waveform. The receiver frequency-response function, is assumed to apply from the antenna terminals to
the output of the IF amplifier. (The second detector and video portion of the well-designed radar

53
20EC4353 VR20 Regulations Analog & Digital Communications
superheterodyne receiver will have negligible effect on the output signal-to-noise ratio if the receiver is

54
20EC4353 VR20 Regulations Analog & Digital Communications

designed as a matched filter.) Narrow banding is most conveniently accomplished in the IF. The
bandwidths of the RF and mixer stages of the normal superheterodyne receiver are usually large
compared with the IF bandwidth. Therefore, the frequency-response function of the portion of the
receiver included between the antenna terminals to the output of the IF amplifier is taken to be that of
the IF amplifier alone. Thus, one need only to obtain the frequency-response function that
maximizes the signal-to-noise ratio at the output of the IF. The IF amplifier may be considered as a filter
with gain. The response of this filter as a function of frequency is the property of interest. For a received
waveform s(t) with a given ratio of signal energy E to noise energy No (or noise power per hertz of
bandwidth), North showed that the frequency-response function of the linear, time-invariant filter which
maximizes the output peak-signal-to-mean-noise (power) ratio.
H(f) = G S*(f)exp(-j2ᴨft1)

Where S(f) = ∫ s(t) exp(−j2πft) dt is the voltage spectrum of the input signal

S*(f) complex conjugate of S(f)
T1: Fixed value of time at which signal is observed to be maximum.
G= Constant equal to maximum filter gain

Fig: Response of Matched Filter for Various inputs

55
20EC4353 VR20 Regulations Analog & Digital Communications

PROGRAM:
% program to generate Matched filter output for Unipolar NRZ and Polar NRZ coded data
% The default program takes 8-bit random data
clc
clear all
close
all
% creating random data consisting 1's and
0's disp('Generated Random data is as
follows')
data=randi([0,1],1,8); % This will generate a random data of 1's and 0's of length
8. disp(data);
nbits = 10; % decides the length of each bit
bit_duration=ones(1,nbits); % This decides the duration of each bit
% code for adding normal distributed noise
noise = input('Do you want to add noise of normal distributed press y:
','s'); sigma = 0.1;
% code for generating NRZ line codes
% unipolar NRZ
uni_nrz = kron(data,bit_duration); % performs kroneker product and stores in uni_nrz
% adding noise to
data if noise=='y'
uni_nrz = uni_nrz + (sigma .*
randn(1,length(uni_nrz))); end
mf_uni_out=conv(fliplr(bit_duration),uni_nrz);
% polar NRZ
data_p = data*2-1; % first convert the data into 1's and -1's
pol_nrz = kron(data_p,bit_duration);
%adding noise to
data if noise=='y'
pol_nrz = pol_nrz + (sigma .*
randn(1,length(pol_nrz))); end

56
20EC4353 VR20 Regulations Analog & Digital Communications
mf_pol_out=conv(fliplr(bit_duration),pol_nrz);
% ploting the generated matched filter output and input data

57
20EC4353 VR20 Regulations Analog & Digital Communications

subplot(4,1,1) % to display unipolar


data plot(uni_nrz)
title('Unipolar NRZ')
% to change the axis for better visibility
% axis([0,length(uni_nrz),min(uni_nrz)-1,max(uni_nrz)
+1]) subplot(4,1,2)
plot(mf_uni_out)
title('Matched Filter Output for Unipolar NRZ')
% axis([0,length(mf_uni_out),min(mf_uni_out)-1,max(mf_uni_out)+1])
% figure;
subplot(4,1,3) % to display polar
data plot(pol_nrz)
title('polar NRZ')
% to change the axis for better visibility
% axis([0,length(pol_nrz),min(pol_nrz)-1,max(pol_nrz)
+1]) subplot(4,1,4)
plot(mf_pol_out)
title('Matched Filter Output for polar NRZ')
% axis([0,length(mf_pol_out),min(mf_pol_out)-1,max(mf_pol_out)+1])

58
20EC4353 VR20 Regulations Analog & Digital Communications

MODELWAVEFORMS:

Fig: Response of Matched Filter for noise free


input

Fig: Response of Matched Filter with Additive Noise

RESULTS:

59
20EC4353 VR20 Regulations Analog & Digital Communications

POST LAB QUESTIONS:


1. On what factor, the error probability of matched filter depends.

2. A polar NRZ waveform has to be received into the help of a matched filter. Here binary ‘1’ is

3. represented as a rectangular positive pulse. Also, binary ‘0’ is represented by a rectangular negative
pulse. Determine the impulse response of the matched filter.

4. Derive the properties of matched filter

5. Derive an expression for the impulse response of a matched filter for a rectangular input.

60
20EC4353 VR20 Regulations Analog & Digital Communications

Program 6.1
GENERATION & DEECTION OF ASK
AIM:
To write a program and verify the ASK signals using MATLab

REQUIREMENTS :
MATLAB 2017a, Computer installed with Windows XP or higher Version.

ALGORITHM:
ASK modulation
1. Generate carrier signal.
2. Start FOR loop
3. Generate binary data, message signal (on-off form)
4. Generate ASK modulated signal.
5. Plot message signal and ASK modulated signal.
6. End FOR loop.
7. Plot the binary data and carrier.
ASK demodulation
1. Start FOR loop
2. Perform correlation of ASK signal with carrier to get decision variable
3. Make decision to get demodulated binary data. If x>0, choose ‘1’ else choose ‘0’
4. Plot the demodulated binary data.

PROGRAM:
%ASK PROGRAM
clc %for clearing the command window
close all %for closing all the window except command
window clear all %for deleting all the variables from the
memory fc=input ('Enter the freq of Sine Wave carrier:');
fp=input ('Enter the freq of Periodic Binary pulse (Message):');
amp=input ('Enter the amplitude (For Carrier & Binary Pulse
Message):'); t=0:0.001:1; % For setting the sampling interval
61
20EC4353 VR20 Regulations Analog & Digital Communications

c=amp. *sin(2*pi*fc*t); % For Generating Carrier Sine


wave subplot (3,1,1) %For Plotting the Carrier wave
plot(t,c)
xlabel('Time')
ylabel('Amplitude')
title('Carrier
Wave')
m=amp/2.*square(2*pi*fp*t)+(amp/2);%For Generating Square wave
message subplot(3,1,2) %For Plotting The Square Binary Pulse (Message)
plot(t,m)
xlabel('Time')
ylabel('Amplitude'
)
title('Binary Message Pulses')
w=c.*m; % The Shift Keyed
Wave
subplot(3,1,3) %For Plotting The Amplitude Shift Keyed
Wave plot(t,w)
xlabel('Time')
ylabel('Amplitude'
)
title('Amplitide Shift Keyed Signal')

62
20EC4353 VR20 Regulations Analog & Digital Communications

MODEL WAVEFORMS:

RESULT:

POST LAB QUESTIONS:


1. Express ASK mathematically?

2. Draw ASK wave forms for a data stream 10111001?

3. Discuss the principle of operation of ASK receiver?

4. Give the difference between standard ASK , FSK and PSK

63
20EC4353 VR20 Regulations Analog & Digital Communications

Experiment 6.2
GENERATION & DEECTION OF
AIM: FSK

To write a program and verify the FSK signals using MATLab

REQUIREMENTS :
MATLAB 2017a

ALGORITHM
FSK modulation
1. Generate two carrier signals.
2. Start FOR loop
3. Generate binary data, message signal and inverted message signal
4. Multiply carrier 1 with message signal and carrier 2 with inverted message signal
5. Perform addition to get the FSK modulated signal
6. Plot message signal and FSK modulated signal.
7. End FOR loop.
8. Plot the binary data and carriers.

FSK demodulation
1. Start FOR loop
2. Perform correlation of FSK modulated signal with carrier 1 and carrier 2 to get two decision
variables x1 and x2.
3. Make decision on x = x1-x2 to get demodulated binary data. If x>0, choose ‘1’ else choose ‘0’.
4. Plot the demodulated binary data.
PROGRAM:
% FSK PROGRAM
close
all; clear
all; clc;
f1 = input('enter the high carrier freq :
'); f2 = input('enter the low carrier freq :
64
20EC4353 VR20 Regulations Analog & Digital Communications
');

65
20EC4353 VR20 Regulations Analog & Digital Communications

f3 = input('enter the message freq:


'); A=1;
t =[0:0.001:1];
c = A.*sin(2*pi*f1*t);
c1 =
A.*sin(2*pi*f2*t);
M=
(A.*square(2*pi*f3*t)+A)/2;
plot(t,c);
grid on;
for i=0:1000
if(M(i+1)==1
)
S(i+1)=c(i+1);
else
S(i+1)=c1(i+1);
end
end
subplot(4,1,1);
plot(t,M);
xlabel('time');
ylabel('amplitude');
grid on;
subplot(4,1,2);
plot(t,c);
xlabel('time');
ylabel('amplitude');
grid on;
subplot(4,1,3);
plot(t,c1);
xlabel('time');
ylabel('amplitude');

66
20EC4353 VR20 Regulations Analog & Digital Communications
grid on;
subplot(4,1,4);
plot(t,S);

67
20EC4353 VR20 Regulations Analog & Digital Communications

xlabel('time');
ylabel('amplitude');
grid on;

MODEL WAVEFORMS:

RESULT:

POST LAB QUESTIONS:


1. Define peak frequency deviation for FSK?

2. Give the differences between the standard FSK and MSK?

3. Draw FSK wave forms for a data stream 1010101?

4. What is the relation between bit-rate and baud for a FSK system?

5. Write the mathematical expression for binary FSK for logical inputs 1 and 0?

68
20EC4353 VR20 Regulations Analog & Digital Communications

Program 6.3
GENERATION & DEECTION OF
AIM: PSK

To write a program and verify the PSK signals using MATLab


REQUIREMENTS :
MATLAB 2017a
ALGORITHM

PSK modulation
1. Generate carrier signal.
2. Start FOR loop
3. Generate binary data, message signal in polar form
4. Generate PSK modulated signal.
5. Plot message signal and PSK modulated signal.
6. End FOR loop.
7. Plot the binary data and carrier.

PSK demodulation
1. Start FOR loop Perform correlation of PSK signal with carrier to get decision variable
2. Make decision to get demodulated binary data. If x>0, choose ‘1’ else choose ‘0’
3. Plot the demodulated binary data.

PROGRAM:
%PSK PROGRAM
clc;
f1 = input('enter the high carrier freq :
'); f3 = input('enter the message freq: ');
A=5;
t =[0:0.001:1];
c = A.*sin(2*pi*f1*t);
M=
(A.*square(2*pi*f3*t)+A)/2;
plot(t,c);
69
20EC4353 VR20 Regulations Analog & Digital Communications
grid on;

70
20EC4353 VR20 Regulations Analog & Digital Communications

for i=0:1000
if(M(i+1)==5
)
S(i+1)=c(i+1);
else
S(i+1)=-c(i+1);
end
end
subplot(3,1,1);
plot(t,M);
xlabel('time');
ylabel('amplitude');
grid on;
subplot(3,1,2);
plot(t,c);
xlabel('time');
ylabel('amplitude');
grid on;
subplot(3,1,3);
plot(t,S);
xlabel('time');
ylabel('amplitude');
grid on;

71
20EC4353 VR20 Regulations Analog & Digital Communications

MODELWAVEFORMS:

RESULT:

POST LAB QUESTION:


1. Why is FSK and PSK signals are preferred over ASK

2. For a 8 PSK system operating with an information bit rate of 24 Kbps. Determine
bandwidth efficiency?

3. Discuss the principle of operation of PSK receiver?

4. Draw PSK wave forms for a data stream 11001100?

5. What is the major advantage of coherent PSK over coherent ASK?

72
20EC4353 VR20 Regulations Analog & Digital Communications

INTRODUCTION TO LABVIEW
Laboratory Virtual Instrument Engineering Workbench (LabVIEW) is a system-design
platform and development environment for a visual programming language from National Instruments.

DATAFLOW PROGRAMMING

The programming paradigm used in LabVIEW, sometimes called G, is based on data


availability. If there is enough data available to a subVI or function, that subVI or function will execute.
Execution flow is determined by the structure of a graphical block diagram (the LabVIEW-source code)
on which the programmer connects different function-nodes by drawing wires. These wires propagate
variables and any node can execute as soon as all its input data become available. Since this might be
the case for multiple nodes simultaneously, LabVIEW can execute inherently in parallel. Multi-
processing and multi-threading hardware is exploited automatically by the built-in scheduler,
which multiplexes multiple OS threads over the nodes ready for execution.

GRAPHICAL PROGRAMMING

LabVIEW integrates the creation of user interfaces (termed front panels) into the development
cycle. LabVIEW programs-subroutines are termed virtual instruments (VIs). Each VI has three
components: a block diagram, a front panel, and a connector pane. The last is used to represent the VI in
the block diagrams of other, calling VIs. The front panel is built using controls and indicators. Controls
are inputs: they allow a user to supply information to the VI. Indicators are outputs: they indicate, or
display, the results based on the inputs given to the VI. The back panel, which is a block diagram,
contains the graphical source code. All of the objects placed on the front panel will appear on the back
panel as terminals. The back panel also contains structures and functions which perform operations on
controls and supply data to indicators. The structures and functions are found on the Functions palette
and can be placed on the back panel. Collectively controls, indicators, structures, and functions are
referred to as nodes. Nodes are connected to one another using wires, e.g., two controls and an indicator
can be wired to the addition function so that the indicator displays the sum of the two controls. Thus a
virtual instrument can be run as either a program, with the front panel serving as a user interface, or,
when dropped as a node onto the block diagram, the front panel defines the inputs and outputs for
the

73
20EC4353 VR20 Regulations Analog & Digital Communications

node through the connector pane. This implies each VI can be easily tested before being embedded as
a subroutine into a larger program.

The graphical approach also allows nonprogrammers to build programs by dragging and
dropping virtual representations of lab equipment with which they are already familiar. The LabVIEW
programming environment, with the included examples and documentation, makes it simple to create
small applications. This is a benefit on one side, but there is also a certain danger of underestimating the
expertise needed for high-quality G programming. For complex algorithms or large-scale code, it is
important that a programmer possess an extensive knowledge of the special LabVIEW syntax and the
topology of its memory management. The most advanced LabVIEW development systems offer the
ability to build stand-alone applications. Furthermore, it is possible to create distributed applications,
which communicate by a client–server model, and are thus easier to implement due to the inherently
parallel nature of G.

BENEFITS

INTERFACING TO DEVICES

LabVIEW includes extensive support for interfacing to devices such as instruments, cameras,
and other devices. Users interface to hardware by either writing direct bus commands (USB, GPIB, and
Serial) or using high-level, device-specific drivers that provide native LabVIEW function nodes for
controlling the device. LabVIEW includes built-in support for NI hardware platforms such
as CompactDAQ and CompactRIO, with a large number of device-specific blocks for such hardware,
the Measurement and Automation eXplorer (MAX) and Virtual Instrument Software
Architecture (VISA) toolsets.National Instruments makes thousands of device drivers available for
download on the NI Instrument Driver Network (IDNet).

CODE COMPILING

LabVIEW includes a compiler that produces native code for the CPU platform. The graphical
code is converted into Dataflow Intermediate Representation, and then translated into chunks of
executable machine code by a compiler based on LLVM. Run-time engine calls these chunks, allowing
better performance. The LabVIEW syntax is strictly enforced during the editing process and compiled
into the executable machine code when requested to run or upon saving. In the latter case, the
executable
74
20EC4353 VR20 Regulations Analog & Digital Communications

and the source code are merged into a single binary file. The execution is controlled by LabVIEW run-
time engine, which contains some pre-compiled code to perform common tasks that are defined by the
G language. The run-time engine governs execution flow, and provides a consistent interface to various
operating systems, graphic systems and hardware components. The use of run-time environment makes
the source code files portable across supported platforms. LabVIEW programs are slower than
equivalent compiled C code, though like in other languages, program optimization often allows to
mitigate issues with execution speed.

LARGE LIBRARIES

Many libraries with a large number of functions for data acquisition, signal generation,
mathematics, statistics, signal conditioning, analysis, etc., along with numerous for functions such as
integration, filters, and other specialized abilities usually associated with data capture from hardware
sensors is enormous. In addition, LabVIEW includes a text-based programming component named
MathScript with added functions for signal processing, analysis, and mathematics. MathScript can be
integrated with graphical programming using script nodes and uses a syntax that is compatible generally
with MATLAB.

PARALLEL PROGRAMMING

LabVIEW is an inherently concurrent language, so it is very easy to program multiple tasks that
are performed in parallel via multithreading. For example, this is done easily by drawing two or more
parallel while loops and connecting them to two separate nodes. This is a great benefit for test system
automation, where it is common practice to run processes like test sequencing, data recording, and
hardware interfacing in parallel.

ECOSYSTEM

Due to the longevity and popularity of the LabVIEW language, and the ability for users to
extend its functions, a large ecosystem of third party add-ons has developed via contributions from the
community. This ecosystem is available on the LabVIEW Tools Network, which is a marketplace for
both free and paid LabVIEW add-ons.

75
20EC4353 VR20 Regulations Analog & Digital Communications

Schematic Construction 1
AMPLITUDE MODULATION AND DEMODULATION USING LABVIEW

AIM:
To Perform Amplitude modulation for the baseband signal, analyze and interpret the data using
LabVIEW

REQUIREMENTS:

 PC with LabVIEW

SCHEMANTIC:

EXPECTED OUTPUT:

71
20EC4353 VR20 Regulations Analog & Digital Communications

RESULT:

POST LAB QUESTIONS:

1. Define Modulation index (µ)?

2. What is the band width for AM?

3. Draw the phase’s representation of an amplitude modulated wave?

4. Give the significance of modulation index?

5. What are the different degrees of modulation?

72
20EC4353 VR20 Regulations Analog & Digital Communications

Schematic Construction 2
FREQUENCY MODULATION AND DEMODULATION USING LABVIEW

AIM:
To Perform Frequency modulation for the baseband signal, analyze and interpret the data using
LabVIEW

REQUIREMENTS:

 PC with LabVIEW

SCHEMANTIC:

73
20EC4353 VR20 Regulations Analog & Digital Communications

EXPECTED OUTPUT:

RESULT:

POST LAB QUESTIONS:

1. Define Frequency Modulation & Phase Modulation?


2. What are the advantages of Angle modulation over amplitude modulation?
3. What is the relationship between PM and FM?
4. With a neat block diagram explain how PM is generated using FM?
5. Define carson’s rule

74
20EC4353 VR20 Regulations Analog & Digital Communications

Schematic Construction 3
DSB-SC MODULATION AND DEMODULATION USING LABVIEW

AIM:
To Perform DSB-SC modulation for the baseband signal, analyze and interpret the data using
LabVIEW

REQUIREMENTS:

 PC with LabVIEW

SCHEMANTIC:

EXPECTED

75
20EC4353 VR20 Regulations Analog & Digital Communications

EXPECTED OUTPUT:

RESULT:

POST LAB QUESTIONS:

1. Write the expression for the output voltage of a balanced modulator?


2. Explain the working of balanced modulator and Ring Modulator using diodes?
3. Explain the detection of DSB-SC wave using a) synchronous detector b) Costas loop
4. What are the various types of distortions in diode detectors and explain them. How to reduce
these distortions?
5. What is the main drawback in DSBSC modulation?

76
20EC4353 VR20 Regulations Analog & Digital Communications

ASK, PSK, FSK MODULATION AND DEMODULATION USING LABVIEW

AIM:
To Perform ASK, PSK, FSK modulation for the baseband signal, analyze and interpret the data
using LabVIEW

REQUIREMENTS:

 PC with LabVIEW

SCHEMANTIC (ASK):

EXPECTED OUTPUT:

EXPECTED OUTPUT:

77
20EC4353 VR20 Regulations Analog & Digital Communications

EXPECTED OUTPUT:

78
20EC4353 VR20 Regulations Analog & Digital Communications

SCHEMANTIC (PSK):

EXPECTED

79
20EC4353 VR20 Regulations Analog & Digital Communications

EXPECTED OUTPUT:

80
20EC4353 VR20 Regulations Analog & Digital Communications

SCHEMANTIC (FSK):

81
20EC4353 VR20 Regulations Analog & Digital Communications

EXPECTED OUTPUT:

82
20EC4353 VR20 Regulations Analog & Digital Communications

RESULT:

POST LAB QUESTIONS:

1. Write the expression for the output voltage of a balanced modulator?


2. Explain the working of balanced modulator and Ring Modulator using diodes?
3. Explain the detection of DSB-SC wave using a) synchronous detector b) Costas loop
4. What are the various types of distortions in diode detectors and explain them. How to reduce
these distortions?
5. What is the main drawback in DSBSC modulation?

83
20EC4353 VR20 Regulations Analog & Digital Communications

Beyond Syllabus

84
20EC4353 VR20 Regulations Analog & Digital Communications

SAMPLING THEOREM VERIFICATION USING MATLAB


Aim:
To verify the sampling theorem

REQUIREMENTS:

MATLAB 2017b
THEORY:

Sampling theorem states that if the sampling rate in any pulse modulation system exceeds twice the
maximum signal frequency the original signal can be reconstructed in the receiver with minimum
distortion. Let m(t) be a signal whose highest frequency component is f m. Let the value of m(t) be
obtained at regular intervals separated by time T far less than (1/2 f m) The sampling is thus periodically
done at each TS seconds. Now the samples m(nTS) where n is an integer which determines the signals
uniquely. The signal can be reconstructed from these samples without distortion. Time Ts is called the
SAMPLING TIME. The minimum sampling rate is called NYQUIST RATE. The validity of sampling
theorem requires rapid sampling rate such that at least two samples are obtained during the course of the
interval corresponding to the highest frequency of the signal under analysis. Let us consider an example
of a pulse modulated signal, containing speech information, as is used in telephony. Over standard
telephone channels the frequency range of A.F. is from 300 Hz to 3400 Hz. For this application the
sampling rate taken is 8000 samples per second. This is an Inter-national standard. We can observe that
the pulse rate is more than twice the highest audio frequency used in this system. Hence the sampling
theorem is satisfied and the resulting signal is free from sampling error.
MATLAB Program:

clc
clear all
close
all
t=-100:01:100;
fm=0.02;
x=cos(2*pi*t*fm);
figure
subplot(2,1,1);
plot(t,x);
85
20EC4353 VR20 Regulations Analog & Digital Communications
xlabel('time in
sec');

86
20EC4353 VR20 Regulations Analog & Digital Communications

ylabel('x(t)');
title('continuous time
signal'); fs1=0.02;
n=-2:2;
x1=cos(2*pi*fm*n/fs1);
subplot(2,1,2);
stem(n,x1);
hold on
%
subplot(3,1,3);
plot(n,x1,':');
title('discrete time signal x(n)');
Expected Waveforms:

RESULT:

POST LAB QUESTIONS:

1. What are the types of sampling?


2. State sampling theorem?
3. What happens when fs < 2 fm?
4. Explain the operation of sampling circuit?
87
20EC4353 VR20 Regulations Analog & Digital Communications
5. Explain the operation of re-construction circuit?

88
20EC4353 VR20 Regulations Analog & Digital Communications

SSB-SC MODULATION AND DEMODULATION USING MATLAB

AIM:

To generate SSB using phase method and demodulation of SSB signal using Synchronous detector.

REQUIREMENTS:

MATLAB 2017b
THEORY:

The phase shift method makes use of two balanced modulators and two phase shift networks. One
of the modulators receives the carrier signal shifted by 90 0and the modulating signal with 00(sine) phase
shift, whereas the other receives modulating signal shifted by 90 0(co-sine) and the carrier (RF) signal
with 00phase shift voltage. Both modulators produce an output consisting only of sidebands. It will be
shown that both upper sidebands lead the input carrier voltage by 90 0. One of the lower sidebands leads
the reference voltage by 900, and the other lags it by 90 0. The two lower sidebands are thus out of phase,
and when combined in the adder, they cancel each other. The upper sidebands are in phase at the adder
and therefore they add together and give SSB upper side band signal. When they combined in the
subtractor, the upper side bands are cancelled because in phase and lower side bands add together and
gives SSB lower side band signal.
MATLAB PROGRAM

f1=input ('enter the base band signal


frequency'); f2=input ('enter the carrier signal
frequency'); t=0:0.001:0.4;
fs=input ('enter sampling frequency');
M=cos(2*pi*f1*t);
N=cos(2*pi*f2*t); DSB1=M.*N;
M1=cos(2*pi*f1*t-(pi/
2)); N1=cos(2*pi*f2*t-
(pi/2)); DSB2=M1.*N1;
USB=DSB1-DSB2; LSB=DSB1+DSB2;
Subplot (5,1,1) plot(t,M,'k',t,M1,'--b')

89
20EC4353 VR20 Regulations Analog & Digital Communications

title('Base band signal and its Hilbert


Transform') subplot(5,1,2) plot(t,N,'k',t,N1,'--b')
title('Carrier Signal and its Hilbert
Transform') subplot(5,1,3) plot(t,USB)
title('Upper side band signal')
subplot(5,1,4) plot(t,LSB)
title('Lower Side band
Signal')
USBMULT=USB.*N;
[den, num]= butter(2,(2*pi*f1)/fs);
Filter1=filter(den,num,USBMULT);
Filter2=filter(den,num,Filter1);
Filter3=filter(den,num,Filter2);
Filter4=filter(den,num,Filter3);
subplot(5,1,5) plot(t,Filter4)
title('Demodulated Signal from
USB') EXPECTED
WAVEFORMS:

90
20EC4353 VR20 Regulations Analog & Digital Communications

RESULTS:

POST LAB QUESTIONS:

1. What are the different methods to generate SSB-SC signal?


2. What is the advantage of SSB-SC over DSB-SC?
3. Give the circuit for synchronous detector?
4. What are the uses of synchronous or coherent detector?
5. Define helbert transform.

91
20EC4353 VR20 Regulations Analog & Digital Communications

PHASE LOCKED LOOP


AIM:

To study phase lock loop and its capture range, lock range and free running VCO Frequency.

Theory:

PLL is one of the fundamental building blocks in electronic technology. It is used for the
frequency multiplication, FM stereo detector, FM demodulator, frequency shift keying decoders, local
oscillator in TV and FM tuner. The block diagram of PLL is shown below.

The PLL consists of Phase detector, a LPF and a Voltage Controlled Oscillator (VCO) connected
together in the form a feedback system. The VCO is a sinusoidal generator whose frequency is
determined by a voltage applied to it from an external source. In effect, any frequency modulator may
serve as a VCO. The phase detector or comparator compares the input frequency, fin, with feedback
frequency, fout. The output of the phase detector is proportional to the phase difference between fin and
fout. The output voltage of the phase detector is a DC voltage and therefore is often refers to as error
voltage. The output of the phase detector is then applied to the LPF, which removes the high frequency
noise and produces a DC level. The DC level, intern is the input to the VCO. The output frequency of
the VCO is directly proportional to the input DC level. The VCO frequency is compared with the input
frequencies and adjusted until it is equal to the input frequency. In short, PLL keeps its out-frequency
constant at the input frequency.

92
20EC4353 VR20 Regulations Analog & Digital Communications

MATLAB program and description:

clear
all; reg1
=0;
reg2 =0;
reg3 = 0;
eta =sqrt(2)/2;
theta
=2*pi*1/100;
Kp =
[(4*eta*theta)/(1+2*eta*theta+theta^2)]; Ki =
[(4*theta^2)/(1+2*eta*theta+theta^2)];
d_phi_1 = 1/20;
n_data = 100;
for nn
=1:n_data
phi1= reg1+d_phi_1;
phi1_reg(nn) = phi1;
s1
=exp(1i*2*pi*reg1);
s2
=exp(1i*2*pi*reg2);
s1_reg(nn) =s1;
s2_reg(nn) =s2;
t =s1*conj(s2);
phi_error
=atan(imag(t)/real(t))/(2*pi);
phi_error_reg(nn) = phi_error;
sum1 =Kp*phi_error +
phi_error*Ki+reg3; reg1_reg(nn) =reg1;

93
20EC4353 VR20 Regulations Analog & Digital Communications
reg2_reg(nn) =
reg2; reg1 =phi1;
reg2=reg2+sum1;
reg3
=reg3+phi_error*Ki;
phi2_reg(nn) =reg2;
end
figure(1
)

94
20EC4353 VR20 Regulations Analog & Digital Communications

plot(phi1_reg);
hold on
plot(phi2_reg,'r')
; hold off;
grid on;
title('phaseplot');
xlabel('Samples');
ylabel('Phase');
figure(2)
plot(phi_error_reg)
;
title('phase Error of phase
detector'); grid on;
xlabel('samples(n)');
ylabel('Phase
error(degrees)'); figure(3)
plot(real(s1_reg));
hold on;
plot(real(s2_reg),'r');
hold off;
grid on;
title('Input signal & Output signal of
VCO'); xlabel('Samples');
ylabel('Amplitude');
axis([0 n_data -1.1
1.1]);

95
20EC4353 VR20 Regulations Analog & Digital Communications

Expected Waveforms:

96
20EC4353 VR20 Regulations Analog & Digital Communications

RESULTS:

POST LAB QUESTIONS:

1. What is a VCO?
2. What are the applications of PLL?
3. Give the expression for free running frequency f0 of a PLL?
4. What is meant by the free running frequency of a PLL?
5. Give the formulae for the lock range and capture range of the PLL?

97
20EC4353 VR20 Regulations Analog & Digital Communications

FREQUENCY SYNTHESIZER
AIM:

To study the operation of frequency synthesizer using PLL

REQUIREMENTS:

Digital Storage
Oscilloscope BNC Probes
Connecting wires

THEORY:

Synthesizer is equipment capable of generating a very large number of extremely stable


frequencies within same range of design, while employing only one single stable source. The required
frequency range in most synthesizers now a days is obtained from a variable voltage controller oscillator
(vco), whose output is corrected by comparison with that of a reference source. This in-built source is
virtually a direct synthesizer. There are two methods by which frequency multiplication can be
achieved by using LM565 IC1.locking to the harmonic of the input signal.2. inclusion of a digital
frequency divider or counter in loop between the VCO and phase comparator. The first method is
simplest, and can be achieved by setting the free running frequency of the VCO to a multiple of the
input frequency. A limitation of this method is that the lock range decreases as successively higher and
weaker harmonics are used for locking. If the input frequency is to be constant with little tracking
required the loop can generally be locked to any one of the first five harmonics. For higher orders of
multiplication, a large lock range is desired for which the second scheme is more desirable.

98
20EC4353 VR20 Regulations Analog & Digital Communications

BLOCK DIAGRAM

CIRCUIT DIAGRAM:

PROCEDURE:

 Pin 2 is connected to the 0.1 micro farad capacitor and the other end of the capacitor is
connected to the 10k resistor. To the other end of this resistor input 1khz signal is given from
function generator
 For the same pin 2 connect one end of the 680ohms resistor and the other end to GND
 Connect one end of 680ohms resistor to pin3 and the other end to ground

99
20EC4353 VR20 Regulations Analog & Digital Communications

 The output of VCO (i.e 4th& 5thpin shorted)


 7th pin is connected to 0.1 micro farad capacitor and the other end to +5v.
 8th pin of the IC is given to 10k variable resistor and the other end to +5v.
 9th pin of the IC is connected to capacitor C1 which is variable and the other end is connected to
-5v.
 Connect the input signal (1 KHz) i.e from function generator is given to the pin 2 at the input of
10 Kohm that signal is observed at channel 1 of CRO
 Connect VCO output to the second channel of the CRO
 By varying the frequency (1KHz to 7KHz) in different steps observe that at one frequency the
wave form will be phase locked
 By varying the frequency knob of function generator in anti clock wise direction we get
capture range
 Change RC component to shift VCO center frequency and see how lock range of the input varies
 Now compare the theoretical value and practical values using the given formula
fo = 4R1C1 Hz
fo = free running
frequency R1 = external
resistance
C1 = External Capacitance

EXPECTED WAVEFORMS:

TABULAR COLUMN:

S. No C fin KHz N fout= Nfin KHz

100
20EC4353 VR20 Regulations Analog & Digital Communications

MATLAB PROGRAM:

close
all; clear
all; clc
fs = 10000;
t = 0:1/fs:1.5;
f=50;
x1 =
square(2*pi*f*t);
subplot (3,1,1)
plot(t,x1);
axis([0 0.2 -1.2 1.2])
xlabel('Time (sec)');ylabel('Amplitude');
title('Square wave input with
freq=50HZ'); t = 0:1/fs:1.5;
x2 =
square(2*pi*2*f*t);
subplot (3,1,2)
plot(t,x2);
axis([0 0.2 -1.2 1.2])
xlabel('Time (sec)');
ylabel('Amplitude');
title('frequency multiplication by a factor of
2'); x3 = square(2*pi*f/2*t);
subplot (3,1,3)
plot(t,x3);
axis([0 0.2 -1.2 1.2])
xlabel('Time (sec)');
ylabel('Amplitude');
title('frequency division by a factor of 2');

101
20EC4353 VR20 Regulations Analog & Digital Communications

EXPECTED RESULTS:

RESULTS:

POST LAB QUESTIONS:

1. Define Lock range of a PLL?


2. What are the applications of frequency synthesizer?
3. What is meant by the free running frequency of PLL?
4. What is the operation of a frequency synthesizer?
5. List the applications of PLL.

102
20EC4353 VR20 Regulations Analog & Digital Communications

GENERATION AND DETECTION OF TDM


AIM :
To generate and detect a TDM signal
REQUIREMENTS:
 8-CHANNNEL Time Division Multiplexing Kit
 Digital Storage Oscilloscope
 Patch Chords

BLOCK DIAGRAM:

PROCEDURE:
1. The trainer kit has to be switched ON.
2. The frequency of the clock has to be noted.
3. The outputs (amplitudes and frequencies) of 8 signal generators are to be observed
4. These outputs should be connected to the input terminals of 8X1 multiplexer.
5. The multiplexer output should be observed and noted.
6. The output of multiplexer should now be connected as input to the demultiplexer.

103
20EC4353 VR20 Regulations Analog & Digital Communications

7. The outputs at 8 terminals of demux should also be can be observed and noted by connecting
the output of demultiplexer to the LPF individually the original signals.

MODEL WAVEFORMS: TDM

104
20EC4353 VR20 Regulations Analog & Digital Communications

RESULT:

POST LAB QUESTIONS:


1. Distinguish between the two basic multiplexing techniques?
2. Write the advantages and disadvantages of TDM.
3. In what situation multiplexing is used?
4. What is a multiplexer?
5. What is the need for synchronization in TDM?

105
20EC4353 VR20 Regulations Analog & Digital Communications

Innovative Experiments

106
20EC4353 VR20 Regulations Analog & Digital Communications

NATIONAL INSTRUMENTS
UNIVERSAL SOFTWARE RADIO PERIPHERAL -
2920
The USRP-2920 is a tunable RF transceiver with a high-speed analog-to-digital converter and
digital-to-analog converter for streaming baseband I and Q signals to a host PC over 1 Gigabit Ethernet.
USRP-2920 can be used for the following applications: white space; broadcast FM; public safety; land-
mobile, low-power unlicensed devices on industrial, scientific, and medical (ISM) bands; sensor
networks; cell phone; amateur radio; or GPS.

COMPONENT ADDRESS
Host Ethernet interface static IP address 192.168.10.1
Host Ethernet interface subnet mask 255.255.255.0
Default USRP device IP address 192.168.10.2

SYSTEM SPECIFICATIONS

A tunable radio frequency transceiver for various communication applications


Operating functions programmed with Lab VIEW ADEs
Operating Frequency 50MHz – 2.2 GHz
RF bandwidth 20 MHz
Host Interface Static IP Address 192.168.10.1
Host Ethernet Interface Subnet Mask 255.255.255.0
Operating temperature 23 °C ± 5 °C

NI USRP FRONT PANNEL

107
20EC4353 VR20 Regulations Analog & Digital Communications

VERIFICATION & SUDY OF CONSTELLATION DIAGRAMS FOR ASK, FSK& QPSK


USING NI-USRP
AIM
:
To generate and study the constellation diagrams of ASK, FSK, QPSK signals using Lab VIEW
and NI-USRP

REQUIREMENTS:
 PC with LabVIEW
CONSTRUCTION OF QPSK SIGNAL GENERATOR:

108
20EC4353 VR20 Regulations Analog & Digital Communications

CONSTRUCTION OF QPSK SIGNAL DETECTOR:

109
20EC4353 VR20 Regulations Analog & Digital Communications

PROCEDURE:

1. Open the transmitter and Receiver VI


2. Connect the computer to the USRP using an Ethernet cable.

3. Open the NI-USRP Configuration Utility found in the National Instruments directory under
programs files as shown in Fig. 1. Be sure to record the IP addresses since you will need them to
configure your software.

4. Connect the antenna in TX1 and RX2

5. Run the transmitter VI. LED “A” will illuminate on the USRP if the radio is transmitting.

6. Run the receiver VI. LED “C” will illuminate on the USRP if the radio is receiving data.

7. In Transmitter VI, look at the constellation diagram of QPSK modulation.

110
20EC4353 VR20 Regulations Analog & Digital Communications

OBSERVATIONS:

MODEL WAVEFORMS:

RESULT:

POST LAB QUESTIONS:


1. Draw the QPSK signal for the following data 11010001?
2. Compare the error probability for BPSK and QPSK?
3. What are the advantages of QPSK over PSK?
4. What are the drawbacks of binary PSK system?
5. Compare the performance of various coherent and non-coherent digital detection systems?

111
20EC4353 VR20 Regulations Analog & Digital Communications

CREATING A NEW FM CHANNEL


AIM
:
To use the NI USRP as a transceiver to generate a FM radio station and listen to the music in the
device tuned to that frequency.
REQUIREMENTS:
NI – USRP 2920
Desktop with NI LabVIEW
THEORY:
FM broadcasting is a method of radio broadcasting using frequency modulation. Frequency
modulation or FM is a form of modulation which conveys information by varying the frequency of
a carrier wave; the older amplitude modulation or AM varies the amplitude of the carrier, with its
frequency remaining constant. With FM, frequency deviation from the assigned carrier frequency at any
instant is directly proportional to the amplitude of the input signal, determining the instantaneous
frequency of the transmitted signal. Because transmitted FM signals use more bandwidth than AM
signals, this form of modulation is commonly used with the higher (VHF or UHF) frequencies
used by TV, the FM broadcast band, and land mobile radio systems.
PROCEDURE:
1. Open the VI: FM_Radio_Spectrum.vi
2. Verify the correct IP Address of your USRP is set under device names (typically 192.168.10.2)
3. Run the VI (Note: if it errors try and decreasing the number of samples to 10,000)
4. Disable Auto Scale X by right clicking on the graph and zoom into a radio station to see
its frequency (remember that 0 on the graph represents the carrier frequency on the left)
5. Point out that the bandwidth of the radio station is +/- 100kHz (a total of 200kHz
bandwidth) Troubleshooting:
1. Boost the gain: Try boosting the gain try: 10, 25, and 30
2. Still no stations: Stop the demo here and show the
video. Listen to Live FM Radio
6. Change the carrier frequency to that of the radio station you found
i.e. If the center frequency is 94.7M and the station appears at -1M, set the new radio staion
frequency to 93.7M
7. Decrease the IQ rate to 200kHz
8. You may want to turn Auto Scale X back on
112
20EC4353 VR20 Regulations Analog & Digital Communications

SCHEMATIC IN LABVIEW:

OBSRVATION

113
20EC4353 VR20 Regulations Analog & Digital Communications

RESULTS:

POST LAB QUESTIONS:


1. Explain the difference between phase modulation and frequency modulation.

2. What do you mean by multitone modulation?

3. What are the two methods of producing an FM wave?

4. Compare WBFM and NBFM

5. How will you generate message from frequency-modulated signals?

114
20EC4353 VR20 Regulations Analog & Digital Communications

TRANSMIT / RECEIVE A TEXT MESSAGE USING A SIMPLE PACKET-BASED DIGITAL


PROTOCOL.
AIM:
To Transmit / receive a text message (converted to bits) over a live RF link between two NI
USRPs using a simple packet-based digital protocol.

REQUIREMENTS:

NI – USRP 2920
Desktop with NI LabVIEW

THEORY:

In telecommunications, packet switching is a method of grouping data that is transmitted over a


digital network into packets. Packets are made of a header and a payload. Data in the header is used by
networking hardware to direct the packet to its destination, where the payload is extracted and used
by application software. Packet switching is the primary basis for data communications in computer
networks worldwide. A simple definition of packet switching is: The routing and transferring of data by
means of addressed packets so that a channel is occupied during the transmission of the packet only, and
upon completion of the transmission the channel is made available for the transfer of other traffic..
Packet switching allows delivery of variable bit rate data streams, realized as sequences of packets, over
a computer network which allocates transmission resources as needed using statistical
multiplexing or dynamic bandwidth allocation techniques. As they traverse networking hardware,
such as switches and routers, packets are received, buffered, queued, and retransmitted (stored and
forwarded), resulting in variable latency and throughput depending on the link capacity and the traffic
load on the network. Packets are normally forwarded by intermediate network nodes asynchronously
using first-in, first-out buffering, but may be forwarded according to some scheduling discipline for fair
queuing, traffic shaping, or for differentiated or guaranteed quality of service, such as weighted fair
queuing or leaky bucket. Packet-based communication may be implemented with or without
intermediate forwarding nodes (switches and routers). In case of a shared physical medium, the packets
may be delivered according to a multiple access scheme.Packet switching contrasts with another
principal networking paradigm, circuit switching, a method which pre-allocates dedicated network
bandwidth specifically for each communication session, each having a constant bit rate and latency
between nodes. In cases of billable services, such as cellular communication services, circuit switching

115
20EC4353 VR20 Regulations Analog & Digital Communications

is characterized by a fee per unit of connection time, even when no data is transferred, while packet
switching may be characterized by a fee per unit of information transmitted, such as characters, packets,
or messages.
PROCEDURE:
1. The user interfaces (Front Panels) for these VIs use tab controls to organize input / output
parameters into logical groups. On USRP Packet Transmitter.vi, click on each of the tabs and
confirm correct settings for input parameters:
 Tab: Specify Message: Set the Message text to transmit.
 Tab: Specify Packet: Set the lengths of the bit fields that comprise the packets to
transmit
 Tab: Specify Modulation: Set the type of modulation and parameters for a pulse
shaping filter
 Tab: Tx Parameters: Set USRP hardware parameters, including the IP address of the
USRP that will act as your transmitter. Confirm that this IP address is set to a
connected USRP that is powered on. Also confirm that the Tx Parameters are
appropriate for the USRP hardware that you are working with.
2. Run USRP Packet Transmitter.vi to begin transmitting. The VI will repeatedly transmits the
message until you press the Stop button on the front panel. The Symbol Rate [symbols/sec]
indicator on USRP Packet Transmitter.vi will display the symbol rate for the transmitted message.
This rate is determined by the combination of the settings you specify on the TX IQ Sampling Rate
[s/sec] and the Samples / Symbol controls, specifically, the symbol rate is set to (TX IQ Sampling
Rate) / (Samples / Symbol).
3. On USRP Packet Receiver.vi, click on each of the tabs and confirm correct settings for input
parameters:
 Tab: Rx Parameters: Set USRP hardware parameters, including the IP address of the
USRP that will act as your receiver. Confirm that this IP address is set to a connected
USRP that is powered on. Also confirm that the Rx Parameters are appropriate for the
USRP hardware that you are working with and that these values correspond to
settings made previously for the transmitter.
 Tab: Specify Modulation: Set the type of modulation and parameters for a matching
filter. The modulation parameters need to correspond to those set for the transmitter.

116
20EC4353 VR20 Regulations Analog & Digital Communications

 Tab: Specify Packet: Set the lengths of the bit fields that comprise the packets to
receive. These should be identical to the values set on the transmitter.
 Tab: Rx Display: See the resulting recovered text message, the live raw / received
signal and a constellation graph of one of the recovered packets
SCHEMATIC IN LABVIEW: TRANSMITTER

117
20EC4353 VR20 Regulations Analog & Digital Communications

SCHEMATIC IN LABVIEW: RECEIVER

OBSERVATIONS:

118
20EC4353 VR20 Regulations Analog & Digital Communications

119
20EC4353 VR20 Regulations Analog & Digital Communications

RESULTS:

POST LAB QUESTIONS:


1. Explain the OSI model for networking in brief. How does it differ from TCP/IP model?
2. Explain the functions of network layer and transport layer in brief?
3. List several transmission media for networking? Explain any two media in brief?
4. Compare circuit switching with packet switching?
5. What is framing in data link layer? Explain the different methods of framing in data link layer?

120

You might also like