0% found this document useful (0 votes)
11 views30 pages

Becl404 Coomunication

asc

Uploaded by

varunkamath40
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views30 pages

Becl404 Coomunication

asc

Uploaded by

varunkamath40
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 30

PCCL BECL404

COMMUNICATION LABORATORY
MANUAL
IVTHSEMESTER B.E.(ECE)

Prepared by: Mrs.Divya K

Lab Instructor: Mr.Ravi


DepartmentVision:

To excel as a leading branch of Engineering in Electronics and Communication to meet the

growing global, technological and industrial demands.


DepartmentMission:
 Imparting quality technical teaching-cum-learning experience with the state-of-the-art
curriculum.
 Enhancing research, consultancy and outreach activities of the Program.
 Increasing the visibility of academic programs.
 Fostering sustained interaction with the alumni, industries, R&D organizations, world
class universities and other stake holders to stay very much relevant to the globalized
environment.
Programme Educational Objectives:
 PEO1:Intensive and extensive engineering knowledge and skill to understand, analyse,
design and create novel products and solutions in the field of Electronics and
Communication Engineering.
 PEO2: Problem solving & Lifelong learning Capability to pursue career in industry or
higher studies with continuous learning.
 PEO3: Entrepreneurship skills,leadership qualities, team spirit, multi-disciplinary
approach, character moulding and lifelong learning for a successful professional career.
 PEO4: Professionalism professional and ethical attitude, effective communication skills,
and sense of responsibility towards society

Page 1 of 29
Page 2 of 29
Page 3 of 29
TABLE OF CONTENTS

EXP. PAGE
TITLE OF THE EXPERIMENT
NO. NO.

Experiments
1 Design and test a high-level collector Modulator circuit and Demodulation 4
the signal using diode detector.
2 Test the Balanced Modulator / Lattice Modulator (Diode ring) 7
3 Design a Frequency modulator using IC8038. 9
\ Design and plot the frequency response of Pre-emphesis and Deemphasis 11
Circuits

5 Design and test BJT/FET Mixer 13

6 Design and test Pulse sampling, flat top sampling and reconstruction 15

Design and test Pulse amplitude modulation and demodulation. 17


7
8 Generation and Detection of Pulse position Modulation 19

9 Generation and Detection of Pulse Width Modulation 21


10 PLL Frequency Synthesizer 23
11 Data formatting and Line Code Generation 25

12 PCM Multiplexer and Demultiplexer 27


Decade Inductance Box - 100mH

100mH

1kHz
100Hz

0.1microfarad
100k

Page 4 of 29
Theory:

Page 5 of229
/25
Page 6 of329
/25
Apparatus required:

Sl no components Value quantity


1 Center tapped transformer 12-0-12 01
2 Diodes - 02
3 Resistors 1kὩ 2
4 capacitor 33μF 2
5 Decade Inductance Box - 02
6 Bread Board - 1
7 Connecting Wires - As required

5V,fc=1kHz
5v100Hz

Design:

Let center frequency (fc) of 1 kHz, given:


R=1 kΩ,,L= mH

Theory:

Designing a balanced modulator using a center-tapped transformer and a tank circuit is an analog approach that takes
advantage of symmetry for carrier suppression. This method can effectively generate Double Sideband Suppressed Carrier
(DSB-SC) signals.

A balanced modulator multiplies the input message signal and the carrier signal A center-tapped transformer ensures the
signals are applied with the proper phase relationships.
A tank circuit (LC circuit) helps select the desired sidebands and filter out the carrier. Carrier suppression occurs due to
phase cancellation facilitated by the balanced structure.
The center-tapped secondary winding connects to the diodes.
One diode conducts during one half-cycle of the carrier and the other two during the opposite half-cycle.

Page 7 of429
/25
This mixes the carrier and message signals.
Tank Circuit:
Connected at the output of the diodes to filter out the carrier frequency and pass the sidebands.
Waveform and Analysis
 Input Signals:
o Carrier: High-frequency sine wave (Vc)
o Message: Low-frequency sine wave (Vm)
 Output Signal:
o A DSB-SC waveform with two sidebands (ωc+ωm), (ωc-ωm) and suppressed carrier.
Applications
 Analog communication systems for amplitude modulation (AM).
 Used in suppressed-carrier systems to save power and bandwidth.
 Basis for quadrature amplitude modulation (QAM).

Procedure
1. Setup the Transformer:
o Connect the message signal(Vm) to the primary winding of the center-tapped transformer.
o Connect the center-tap of the secondary winding to carrier(VC).
o Sine Wave Vm =2Vp with frequency fm = 100 Hz,
o Carrier signal (Square Wave Vc = 3Vp) with frequency fc = 1KHz (fc = 10fm)
2. Connect the Diodes
o Wire the diodes in symmetricallly across the transformer’s secondary winding.
o Apply the message signal across the two ends of the diode bridge.
3. Add the Tank Circuit:
o Connect the LC tank circuit to the output of the diode bridge.
o Ensure it is tuned to the carrier frequency.
4. Observation:
o Observe the output waveform on the oscilloscope.
o Check for the presence of the upper and lower sidebands and the suppression of the carrier.
5. Adjustments:
o Fine-tune the tank circuit’s LC components to achieve better carrier suppression.
Result: The Balanced Modulator using center tapped transformer is verified.

Page 8 of529
/25
3. Frequency Modulation and Demodulation

Aim: To generate frequency modulated signal

Theory:

The IC 8038 is a versatile function generator chip capable of generating various waveforms such as sine,
square, triangular, and sawtooth waves. While it's primarily used for generating waveforms, it can be utilized in
frequency modulation (FM) circuits with additional components.

The process, in which the frequency of the carrier is varied in accordance with the instantaneous amplitude of
the modulating signal, is called “Frequency Modulation”.

We can set up frequency modulation circuit using the IC 8038 with following steps:

1.IC 8038 Connections: We need to connect the various pins of the IC 8038 according to its datasheet. Key
connections include:

Power supply connections (VCC and -VEE), External capacitors and resistors -for setting frequency range and
stability.

Control voltage input (CV) for frequency modulation, Output pins for the generated waveform.

Control Voltage Input (CV): This is where you'll apply the signal that modulates the frequency. The frequency of
the output waveform will vary based on the voltage applied to this pin. You can use an external voltage source,
such as an oscillator or another function generator, to modulate the frequency.

Precautions:

1. Check the connections before giving the power supply

Page 9 of629
/25
2. Observations should be done carefully

Tabular Column:

Sl no Carrier Msg Fmax Fmin ∆f=fmax- Modulation


Amplitude(Ac) Signal fmin Index=(MI)
Amplitude(Ac) ∆f/Fm
1
2

Procedure: Modulation:

1. The circuit is connected as per the circuit diagram shown in Fig

2. Without giving modulating signal observe the carrier signal at pin no.2

Measure amplitude and frequency of the carrier signal.

3. Apply the sinusoidal modulating signal of frequency 1 KHz and amplitude 3Vp-p at pin no.7

4.Now vary the frequency of modulating signal and measure fmin and fmax

5. Calculate ∆f and modulation index (MI) using ∆f / fm where ∆f = |fmax - fmin|.

Result:

FM wave is successfully generated using 8038 and modulation index is _______.

Page 10 of729
/25
4. PRE-EMPHASIS AND DE-EMPHASIS CIRCUIT
Aim- Design and plot the frequency response of Pre-emphasis and Deemphasis Circuits

Apparatus Required:

Sl No Component Quantity
s
1 Opamp uA741 01
2 Capacitor 0.1µF 01
3 Resistors: 1K, 820, 560Ω 01
4 Bread board, Connecting wire 01
5 CRO (40MHz), Signal generator(1MHz), DC supply(30V) 01

Circuit Diagram

Frequency response of Pre-emphasis Circuit Frequency response of De-emphasis Circuit


560Ω R1=1KΩ
560Ω

R1=1KΩ

820Ω

5V p-p,1KHz
820Ω
5V p-p,1KHz
C = 0.1μF

Design:

Choose appropriate value for Time constant, T


• Sound transmission in TV has
beenstandardized at 75 µsec.
Therefore, the time constant
T = 75µ = R2C2 With general assumptions of
value of
C = 0.1μF
then find R2 = T / C2=75µ /0.1µ = 750Ω (Assume
820Ω as standard Value)
For Butterworth filters, Gain A = 1.586
Gain of non-inverting amplifier = 1+Rf/R1 = 1.586 , Rf/R1 = 0.586 Take suitable value
of R1=1KΩ, then find Rf =586 (Assume 560Ω as standard Value).

Nature of Graph

Page 11 of829
/25
Frequency response of Pre-emphasis Frequency response of Deemphasis

Theory
The pre-emphasis and de-emphasis help to improve the quality of any communication
especially audio signals on the transmitter and receiver sides. The presence of noise is also
an issue in FM and we know that noise usually has higher amplitude and higher
frequency. When the amplitude of a high-frequency noise is higher than the current
component in the modulation signal, it causes high-frequency interference. To deal with this
issue, most FM circuits use a technique called pre-emphasis during transmission and de-
emphasis during receiving. Pre-emphasis and de-emphasis circuits are commonly used in
FM transmitters and receivers to improve the output signal-to-noise ratio.
The pre-emphasis circuit is actually a high pass filter and de-emphasis circuit a low pass
filter.The amount of pre-emphasis and de-emphasis used is defined by the time constant of a
simple RC filter circuit. Simple pre-emphasis and de-emphasis circuits using op-amp are
given in thediagram
Tabular Column

Frequency F in Hz Output Voltage Vo in Output = 20log (Vo/Vi)


Volts
100 Hz

….
100K HZ

Procedure
1 Test all the components and probes.
2 Set up the pre- emphasis circuit on a bread board as shown in figure.
3 Feed a sine wave as input =5V.
4 Vary the frequency from 100 Hz to 100KHz on step of 500 Hz and note down the values
of the corresponding output voltage on a tabular column.
5 Plot frequency response on a semi-log sheet with frequency Vs gain dB on yaxis.
6 Mark the cut-off frequencies corresponding to 3dB points.
7 Repeat the above steps for de-emphasis circuit.
Result: Designed and verified and plotted the frequency response of Pre-emphasis and De-emphasis
Circuits

Page 12 of929
/25
5. To Design and Test BJT mixer

Apparatus Required:
Sl No Component Range Quantity
1 Transistor SL100 01
2 Resistors 47KΩ 01
10KΩ 02
470Ω 01
2.2KΩ 01
3 Capacitors 47uF 02
0.01uF 01
1uF 01
4 DSO - 01
5 Signal generator - 02
6 DC supply 0-30V 01
7 Bread board Connecting wire As required

Circuit Diagram

V1=5V,16KHz

V2=5V,14KHz

Design

1029
Page 13 of /25
Note : Choose coupling capacitors in such way that Reactance of coupling capacitors Xc1 and
Xc2 should be less than 15Ω
Tabular Column

Frequncy F1 in Frequency F2 in Output frequency ∆ f =f 1−f 2 in Hz


KHz Hz
16Hz 14Hz
16Hz 13Hz
16Hz 12Hz
16Hz 11Hz
16Hz 10Hz
16 Hz 09Hz

Theory

In electronics, a mixer, or frequency mixer, is an electrical circuit that creates new


frequencies from two signals applied to it. In its most common application, two signals are
applied to a mixer, and it produces new signals at the sum and difference of the original
frequencies. Active mixers use an amplifying device (such as a transistor or vacuum tube) that
may increase the strength of the product signal. Active mixers improve isolation between the
ports, but may have higher noise and more power consumption. Mixers may also be classified
by their topology:
An unbalanced mixer uses a single diode or transistor to perform frequency mixing. It is the
simplest type of mixer.
A single-balanced mixer employs two diodes (or transistors) and a transformer to achieve better
performance compared to unbalanced mixers.

A double-balanced mixer uses four diodes (or transistors) in a ring configuration along with transformers
to achieve the highest performance

Procedure

1. Connections are made as shown in the circuit diagram.


2. Apply the input signals as mentioned in the circuit diagram.
3. Observe the output waveforms in CRO
4. Measure the output frequency, it has to be equal to ∆ f =f1 −f2
5. Repeat the steps 3 and 4 by decreasing frequency of V2 in the step of 1KHz.
Result: BJT frequency Mixer is designed and tested.

1129
Page 14 of /25
Experiment No: 6
Design and test Pulse sampling, flat top sampling and reconstruction.

Apparatus Required:
Sl No Components Quantity
1 n-EMOSFET (TRS740), OP-AMP( μA741) 1
2 Resistor 22KΩ, 10KΩ(POT), 47KΩ 1
3 Bread board, connecting wires 1
4 CRO, Function Generator and DC Supply 1
5 Capacitor 0.1uF (Electrolyte) 1

Circuit: Pulse sampling circuit diagram

Amplitude(V) Frequency(Hz) Time Period(mS)


4 Vp-p fs =10KHz Message signal
2 Vp-p fm =1KHz Carrier signal
Modulated signal

Reconstruction of Pulse sampling circuit diagram and Pin Diagram of uA 741

Design
Sampling circuit is a voltage follower circuit and assumes uA741 output current is 20 mA
hence assume R and RL value is to assume 1K to 10KΩ as per availability and C electrolyte
capacitor of 0.1uF.
Reconstruction circuit: concider frequency of message signal as fm =1000 Hz, this is the cutoff
frequency of LPF.
Choose C = 0.1uF and find R using
𝟏
𝐟𝐦 =
𝟐𝛑𝐑𝐂

1229
Page 15 of /25
Theory
The sampling theorem can be defined as the conversion of an analog signal into a discrete form by taking the
sampling frequency as twice the input analog signal frequency. Input signal frequency denoted by Fm and
sampling signal frequency denoted by Fs. If the sampling frequency (Fs) equals twice the input signal
frequency (Fm), then such a condition is called the Nyquist Criteria for sampling. When sampling frequency
equals twice the input signal frequency is known as “Nyquist rate”. If the sampling frequency (Fs) is less
than twice the input signal frequency, such criteria called an Aliasing effect.
In flat-top sampling or rectangular pulse sampling, the top of the samples remains constant and isequal to the
instantaneous value of the baseband signal x(t) at the start of sampling. During transmission, noise is
introduced at top of the transmission pulse which can be easily removed if the pulse is in the form of
flat top. Here, the top of the samples are flat i.e. they have constant amplitude. Hence, it is called as flat
top sampling or practical sampling. Flat top sampling makes use of sample and hold circuit.”

Procedure
1. Before wiring the circuit checks all the components using multi meter.
2. As per design set the values and do the connections as shown in circuit diagram.
3. Set the carrier amplitude or sampling signal to around 4 Vp-p and frequency, fs = 1K-10KHz.
4. Set the message signal amplitude to around 2 Vp and frequency, fm = 100Hz-1K Hz.
5. Connect the CRO at the pin number 6 of OP-AMP and observe the waveform for both circuits.
6. Connect this output to the reconstruction filter and observe the waveforms.
Note:Observe waveforms for all these conditions:𝐟𝐬 < 2𝐟𝐦 , 𝐟𝐬 = 𝟐𝐟𝐦 &𝐟𝐬 > 2𝐟𝐦
Tabular Column:

Amplitude(V) Frequency(Hz) Time Period(mS)


Message signal
Carrier signal
Modulated signal

Result:
Sampling theorem is verified practically using OAMP.

Page 13 of 25

Page 16 of 29
Experiment No: 7
Design and test Pulse amplitude modulation and demodulation.
Apparatus Required:

Sl No Components Specification
1 Transistor SL100
2 Resistor 2.2K, 10K,47K
3 Capacitor 0.1µF
4 Bread board Connecting wire --
5 CRO (40MHz), Signal generator(1MHz), DC supply(30V) --

Design
Reconstruction circuit: concider frequency of message signal as fm =1000 Hz, this is the cutoff frequency
of LPF.
Choose C = 0.1uF and find R using
𝟏
𝐟𝐦 =
𝟐𝛑𝐑𝐂

Thoery :
Pulse amplitude modulation is a technique in which the amplitude of each pulse is controlled by the
instantaneous amplitude of the modulation signal. It is a modulation system in which the signal is sampled at
regular intervals and each sample is made proportional to the amplitude of the signal at the instant of
sampling.
This technique transmits the data by encoding in the amplitude of a series of signal pulses. In PAM,
the signal amplitudes can be changed based on the modulating signal. The pulse train works like a periodic
switching signal toward the modulator. Once it is switched ON, and then allows the samples of modulating
Page 14 of

Page 17 of 29
signals to supply toward the output. The pulse train’s periodic time is called the sampling period.
PAM is mostly applied in non-based modulating transmission of digital data and applications replaced by
pulse-code modulation and pulse-position modulation. Particularly all phone modems faster than 300 bit/s
use quadrature amplitude modulation.

Procedure
1. Before wiring the circuit checks all the components using multi meter.
2. As per design set the values and do the connections as shown in circuit diagram.
3. Set the pulsed carrier amplitude to around 5V (p-p) and frequency, fc = 1 k-10 kHz.
4. Set the message signal amplitude to around 3 V (p-p) and frequency, fm = 100-1kHZ.
5. Observe the modulated and demodulated output waveform.-Note their amplitude and frequency in
waveform itself.

Tabular Column:

Amplitude(V) Frequency(Hz) Time Period(mS)


Message signal
Carrier signal
Modulated signal

Result: Pulse Amplitude Modulation circuit and its reconstruction circuit is verified and tested.

Page 15 of 25

Page 18 of 29
Experiment No: 8

Generation and Detection of Pulse Width Modulation

Apparatus Required:

Sl No Components Quantity
1 555 Timer 01
2 Resistor, 10K 02
3 Capacitor 0.1uF 01
4 Bread board , Connecting wire As required
5 CRO (40MHz), Signal generator(1MHz), DC supply(30V) 01
Circuit Diagram

Theory

The IC 555 is an extremely useful and versatile device which can be applied for configuring many useful circuits. One very
useful feature of this IC is its ability to generate PWM pulses .

A modulation technique where the width of the pulses of the pulsed carrier wave is changed according to the modulating
signal is known as Pulse Width Modulation (PWM). It is also known as Pulse duration modulation (PDM.

Operation:

 The 555 timer in this configuration will operate in astable mode, continuously generating a square wave.

 The frequency of the PWM signal is determined by the values of R1, R2&C.

 The duty cycle (the proportion of the time the output is high versus the total period of the waveform) can be adjusted
by changing the resistance R2.
TON = 0.693 * (R1 + R2) * C TOFF = 0.693 * R2 x C Period T = TON + TOFF Frequency F = 1/T =
= 0.693 * (R1 +2*R2) * C 1.44 / ( (R1 + 2R2) * C) Hz

The following table shows few of the common values for R1, R2 and C and the corresponding frequency.

Page 16 of 25

Page 19 of 29
The effects of the square wave on pin 5:
 Applying a sine wave to Pin 5 of a 555 timer in PWM mode modulates the duty cycle of the PWM output. The
modulation occurs because the control voltage input alters the internal threshold and trigger levels, changing the
timing intervals for charging and discharging the capacitor. This results in a dynamic PWM signal whose duty cycle
varies in accordance with the input sine wave.

The sine wave should not exceed the supply voltage of the 555 timer. Excessively high frequencies might not be
effectively processed by the internal circuitry.

Tabular Column:

Vp-p(v) Frequency(Hz) Time period(s)

Carrier(without AFO)
Message Signal
PWM waveform
Ton =___ s,Toff =___ s.

Procedure

a. Make the connection as per Circuit diagram.

b. Observe the timer 555 IC output (square waveform) at terminal 3 before giving AFO. (This
acts as carrier).Note it’s Vp-p and frequency.

c. Set the AFO to sinusoidal signal-2Vp-p &1kHz and apply to pin no 5.

d. Observe the PWM output waveform at pin no 3.

e. Vary the amplitude of message signal(via AFO) –notice change in pulse width.

f. Note-Ton, Toff and frequency of PWM waveform.

g. Plot readings in graph.


Result: Verified the output of the Pulse width Modulation

Page 17 of 25

Page 20 of 29
Experiment No: 9

Generation and Detection of Pulse Position Modulation

Apparatus Required:

Sl No Components Quantity
1 555 Timer 02
2 Resistor, 10K 04
3 Capacitor 0.1uF, 0.01uF 02,01
4 Bread board , Connecting wire As required
5 CRO (40MHz), Signal generator(1MHz), DC supply(30V) 01
Circuit Diagram

Theory

Pulse position modulation is a modulation technique in which the position of pulse varies according to instantaneous value
of amplitude of sampled modulating signal. Displacement of pulse is directly proportional to amplitude value of
message signal.

With increase in amplitude of signal, the position of pulse shifts-keeping the width of pulses constant, only position
changes.

Operation:

 The output of the PWM signal is connected to pin no 2 via differentiator network of R1, C1& diode(generating spikes-
that acts as trigger for IC 555)

 The 2nd 555 timer will operate in monstable mode, continuously generating a square wave.

 Monostable multivibrator is negative edge triggered.

 Hence, with the trailing edge of the PWM signal, the output of the monostable goes high.

 This is why a pulse of PPM signal begins with the trailing edge of the PWM signal.
Page 18 of 25

Page 21 of 29
 The output will remain high for a period of time determined by resistors R2 and C2, keeping the width
and amplitude of each pulse constant and thereby we will get a PPM signal of constant width at the
output.

Tabular Column:

Vp-p(v) Frequency(Hz) Time period(s)

Carrier(without AFO)
Message Signal
PWM waveform
Ton =___ s,Toff =___ s.

PPM waveform
Ton =___ s,Toff =___ s.

Procedure

h. Make the connection as per Circuit diagram.

i. Observe the timer 555 IC output (square waveform) at terminal 3 before giving AFO. (This
acts as carrier).Note it’s Vp-p and frequency.

j. Set the AFO to sinusoidal signal-2Vp-p &1kHz and apply to pin no 5.

k. Observe the PWM output waveform at pin no 3 of first 555 IC.

l. Vary the amplitude of message signal(via AFO) –notice change in pulse width.

m. Note-Ton, Toff and frequency of PWM waveform.

n. Now, Observe the PPM output waveform at pin no 3 of second 555 IC.

o. Plot readings in graph.


Result: The output of Pulse Position Modulation is verified.

Page 19 of 25

Page 22 of 29
Experiment No: 10
Aim: To realize PLL Frequency Synthesizer

Apparatus Required:

Sl No Components Quantity
1 CRO, Function Generator, Breadboard 1
2 Resistance: 6.8K, 1
3 Capacitor: 0.001uF, 10uF and 0.01uF 1
4 RPS and Connecting wires

Circuit Diagram:

Theory:
Phase Locked Loop (PLL) is one of the vital blocks in linear systems. It is useful in communication systems such as radars,
satellites, FMs, etc.
A Phase Locked Loop (PLL) mainly consists of the following three blocks −
 Phase Detector
 Active Low Pass Filter
 Voltage Controlled Oscillator (VCO)
The output of a phase detector is applied as an input of active low pass filter. Similarly, the output of active low pass filter is
applied as an input of VCO.
Page 20 of 25

Page 23 of 29
PLL operates in one of the following three modes −

1. Free running mode 2. Capture mode 3. Lock mode


Initially, PLL operates in free running mode when no input is applied to it. When an input signal having some frequency is
applied to PLL, then the output signal frequency of VCO will start change. At this stage, the PLL is said to be operating in
the capture mode. The output signal frequency of VCO will change continuously until it is equal to the input signal
frequency. Now, it is said to be PLL is operating in the lock mode.
IC 565
IC 565 is the most commonly used phase locked loop IC. It is a 14 pin Dual-Inline Package (DIP). The pin diagram of IC
565 is shown in the following figure above.
The VCO produces an output at pin number 4 of IC 565, when the pin numbers 2 and 3 are grounded. Mathematically, we
can write the output frequency, f𝑜𝑢𝑡 of the VCO as.
𝟏.𝟐
The free running frequency of the PLL is given as 𝐟𝐨𝐮𝐭 = 𝐇𝐳
𝟒𝐑 𝐕𝐂𝐕

Procedure

1. Setup the circuit and observe the output at pin 4 or pin 5 without any input signal and note
down the the free running frequency f0.
2. Apply a signal input to pin 2 square wave of 5 Vpp, 1 KHz and vary itsfrequency from low to high
and note down fc1 and fL2.
3. Decrease the input frequency from a high value to low value and note down fc2 and fL1
4. Mark the obtained value on straight line.
Calculate lock range fL = fL2 -fL1 and capturerange fc = fc2 – fc1.

Result: Free running frequency, f0 = Hz, Lock Range fL = Hz

Capture frequency Range fc = Hz

Page 21 of 25

Page 24 of 29
11.Data formatting and Line Code Generation
AIM: Simulate the Line Code Generation system, and display the waveforms
APPARATUS:
1. Personal Computer
2. MATLAB software R2013a.
PROCEDURE:
1. Open MATLAB version R2013a
2. Open new file and enter the program and save it.
3. Add the path to the location of the file in the system.
4. Compile the program and check for any error and debug it.
5. Note down the output.

% MATLAB Program for NRZ, RZ, and Manchester Line Codes


% Clear previous data
clear;
clc;
close all;

% Define the input binary data sequence


data = [1 1 0 1 0 1 ];

% Define parameters
bit_rate = 0.5; % bits per second
bit_period = 0.5 / bit_rate; % period of each bit
fs = 50; % sampling frequency
t = 0:1/fs:bit_period-1/fs; % time vector for one bit

% Preallocate signal vectors


nrz = [];
rz = [];
manchester = [];

% Generate the signals


for bit = data
if bit == 1
% NRZ
nrz = [nrz ones(1, length(t))];
% RZ
rz = [rz ones(1, length(t)/2) zeros(1, length(t)/2)];
% Manchester
manchester = [manchester ones(1, length(t)/2) -ones(1, length(t)/2)];
else
% NRZ
nrz = [nrz zeros(1, length(t))];
% RZ
rz = [rz zeros(1, length(t)/2) zeros(1, length(t)/2)];
% Manchester
manchester = [manchester -ones(1, length(t)/2) ones(1, length(t)/2)];
end
end

% Time vector for the entire signal


time = 0:1/fs:(length(data)*bit_period) - 1/fs;

% Plot the NRZ signal


figure;
subplot(3, 1, 1);
plot(time, nrz, 'LineWidth', 2);
title('NRZ');
xlabel('Time (s)');
ylabel('Amplitude');
ylim([-1.5 1.5]);
Page 22 of 25

Page 25 of 29
% Plot the RZ signal
subplot(3, 1, 2);
plot(time, rz, 'LineWidth', 2);
title('RZ');
xlabel('Time (s)');
ylabel('Amplitude');
ylim([-1.5 1.5]);

% Plot the Manchester signal


subplot(3, 1, 3);
plot(time, manchester, 'LineWidth', 2);
title('Manchester');
xlabel('Time (s)');
ylabel('Amplitude');
ylim([-1.5 1.5]);

Result: Unipolar NRZ, RZ and Master- line codings are verified using matlab.

Page 23 of 25

Page 26 of 29
12. PCM Multiplexer and Demultiplexer
AIM: Simulate the pulse code modulation and demodulation system, and display the waveforms
APPARATUS:
1. Personal Computer
2. MATLAB software R2013a.
PROCEDURE:
1. Open MATLAB version R2013a
2. Open new file and enter the program and save it.
3. Add the path to the location of the file in the system.
4. Compile the program and check for any error and debug it.
5. Note down the output.

% Simple PCM Modulation and Demodulation Example


% Step 1: Clear previous data
clear;
clc;
close all;

% Step 2: Define the parameters


fs = 1000; % Sampling frequency (Hz)
t = 0:1/fs:1-1/fs; % Time vector for 1 second
f = 5; % Frequency of the signal (Hz)

% Step 3: Generate a sine wave signal


x = sin(2*pi*f*t);

% Step 4: PCM Modulation


n_bits = 3; % Number of bits for quantization
L = 2^n_bits; % Number of quantization levels

% Normalize and quantize the signal


x_min = min(x); % Minimum value of the original signal
x_max = max(x); % Maximum value of the original signal
x_normalized = (x - x_min) / (x_max - x_min); % Normalize to [0, 1]
x_quantized = round(x_normalized * (L-1)); % Quantize to L levels

% Step 5: PCM Demodulation


x_demod = x_quantized / (L-1); % De-normalize
x_demod = x_demod * (x_max - x_min) + x_min; % Scale back to original range

% Step 6: Plot original and demodulated signals


figure;
subplot(3, 1, 1);
plot(t, x);
title('Original Signal');
xlabel('Time (s)');
ylabel('Amplitude');

subplot(3, 1, 2);
stem(t, x_quantized, 'r');
title('Quantized Signal');
xlabel('Time (s)');
ylabel('Quantized Value');

subplot(3, 1, 3);
plot(t, x_demod);
title('Demodulated Signal');
xlabel('Time (s)');
ylabel('Amplitude');

Page 24 of 25

Page 27 of 29
Result: Pulse code modulation and demodulation system is verified using MATLAB.

Page 25 of 25

Page 28 of 29

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy