0% found this document useful (0 votes)
17 views

CS - LAB - REPORT Matlab

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

CS - LAB - REPORT Matlab

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

19ECE382

Communication Systems Lab


LAB REPORT

Submitted by

BL.EN.U4ECE22070
NAME: D S Raga Vinay

DEPARTMENT OF ELECTRONICS AND


COMMUNICATIONS ENGINEERING

AMRITA SCHOOL OF ENGINEERING, BANGALORE


AMRITA VISHWA VIDYAPEETHAM
BENGALURU -560035
September-2024
Experiment 1
AIM:

To design an amplitude modulator and demodulator which can be used to transmit message
signal using a high frequency carrier and reconstruct the message signal.

Components Required
 Transistor
 Function generator
 DC power supply
 CRO/DSO
 Resistors
 Capacitor
 Inductor

Theory -
Message Signal: It is a low frequency signal which attenuates when transmitted through
baseband transmission. The bandwidth of the message signal is W Hz or Fm Hz.

Carrier Signal: It is a high frequency signal which is modulated with respect to the input
message signal, so that there is no loss in the message signal. The bandwidth of the message
signal is Fc Hz.

Modulation: It is the process of changing the characteristics of the carrier signal with respect
to the message signal. The main purpose of modulation is to generate a modulated signal
suited to the characteristics of a transmission channel.

Demodulation: It is the process of extracting the message signal from a modulated signal.
For AM envelope detector is used, which is a simple circuit consisting of a diode, capacitor
and a resistor. Here the filter is tuned to message frequency.
𝟏
Fm =
𝟐𝝅𝑹𝒄

Where R is the resistance of the envelope detector and C is the capacitance of the envelope
detector. The product of the two, i.e. RC is known as time constant.
Design:

Circuit Diagram:

Modulator-

Demodulator-
Design-
Amplitude Modulation:

1. Carrier Setup:
 Use the function generator to produce a high-frequency sinusoidal signal with
Frequency 100 kHz
 Set the carrier VP-P to 100 mV
2. Message Signal Setup:
 Use another function generator to produce a low-frequency sinusoidal signal with
frequency 10 KHz
 Set the message signal amplitude to 6V.
3. Modulation Process:
 Use the CRO probes to connect the message as shown in the circuit above
 Use the CRO probes to connect the carrier as shown in the circuit above
 Use the CRO probes to check the output of the circuit at the point shown above

Amplitude Demodulation:

1. Rectification:
 The modulated signal is fed to a diode, which rectifies the signal (Removing negative
cycles of the signal)
2. Envelope Detector:
 The rectified signal is fed to a low-pass filter which filters out the unwanted
carrier signal
 Use the CRO probes to check the demodulated output at the point shown in the circuit

Procedure:
1. Connect the circuit as shown in design circuit above.

 Place the function generators, oscilloscope, breadboard, and all other necessary
components on a stable work surface.
 Ensure all equipment is properly connected to power sources and grounded if
necessary

2. Set the first function generator to produce a sinusoidal carrier signal with a frequency
of 100 kHz and Vp-p of 100 mV. Connect this signal to the 0.1µF Capacitor.
3. Set the second function generator to produce a sinusoidal message signal with a
frequency of 10 KHz and Vp-p of 6V.
4. Connect all the remaining components on the breadboard properly. Ensure
the components are connected properly.
Model Graph:

Message Signal

Carrier Signal

Modulated Signal

Demodulated Signal

Observation Table:
Constant Parameter if available =
S No. Signal Frequency Vp-p
1 Carrier
2 Message
3 Modulated Signal
4 Demodulated Signal
Result

Designed and verified the working of amplitude modulation and demodulation in lab and on LTspice
simulation.
Experiment-2
AIM:

To design a modulator in which input voltage is used to control the frequency of oscillation
of the output signal.

Components Required-
 555 - timer
 Function generator
 DC power supply
 CRO/DSO
 Resistors
 Capacitor
 Diode
 Inductor
 Breadboard

Theory:

Frequency modulation (FM) is a widely used technique in communication systems where the
frequency of a carrier signal is varied in accordance with the instantaneous amplitude of the
modulating signal. Unlike amplitude modulation (AM), where the amplitude of the carrier
wave is varied, FM encodes information in the frequency deviations of the carrier signal,
providing greater resistance to signal amplitude variations caused by noise.

Frequency Modulation (FM): In frequency modulation, the instantaneous frequency of the


carrier wave is altered based on the amplitude of the input (modulating) signal. The carrier
frequency decreases with the increase in the amplitude of the modulating signal and
vice-versa

Mathematical Representation: The FM signal can be represented as:

s(t)=Accos[2πfct + 2πkf ∫ m(t) dt]


Where:

 s(t) is the frequency-modulated signal.


 Ac is the amplitude of the carrier signal.
 fc is the carrier frequency.
 kf is the frequency sensitivity (modulation index) of the modulator, determining the
amount of frequency deviation.
 m(t) is the instantaneous amplitude of the modulating signal.
 The term 2πkf ∫ m(t)dt represents the instantaneous phase deviation caused by the
modulating signal.
Design:

Circuit Diagram-

Design-
1.
The 555 Timer IC: The IC is set in Astable Multivibrator mode using resistors R 1 and R2 as
shown in the circuit above.
2.
Modulating Signal: The modulating signal is an input sinusoidal of low-frequency, i.e. 218
Hz with VP-P 136 mV. This signal is fed to the circuit as shown above.
3.
Frequency Modulation: The 555 timer’s frequency vary with respect to the input message
signal, producing a continuous band of high frequency and low frequency square wave.

Procedure:
1. Set up of Circuit Components:
 Connect the 555 Timer in Astable multivibrator mode with R1, R2 and C1 as per
the calculated values
 Connect the message signal between the two capacitors C1 and C2
2. Testing and Verification:

Check the output of the Astable Multivibrator at the OUT port, without the
message signal input. Ensure the output is a proper square signal

Connect the message signal and check the output
Model Graph:

Modulating Signal

Frequency Modulated Signal

Observation Table:
Constant Parameter if available =
S No. Signal Frequency Vp-p
1 Carrier
2 Message
3 Modulated Signal

Result

Designed and verified the working of frequency modulation in lab and on LTspice simulation.
Experiment 3
AIM:

To study the process of sampling and reconstruction of an Analog signal by building pulse
amplitude modulator and demodulator circuits

Components Required
 Transistor
 Function generator
 DC power supply
 CRO/DSO
 Resistors
 Capacitor
 Op-amp
 Breadboard

Theory-

1. Pulse Amplitude Modulator: Pulse Amplitude Modulation (PAM) involves varying


the amplitude of pulse signals in proportion to the amplitude of a modulating signal.
A 555 timer can generate pulses, and the amplitude of these pulses can be controlled
by modulating the control voltage (pin 5)

 Carrier Pulse Generation: A pulse generator creates a regular sequence of


pulses, typically of constant width and period.
 Amplitude Modulation: The amplitude of each pulse in the carrier train is
varied according to the instantaneous amplitude of the modulating signal. This
means the height of each pulse reflects the value of the modulating signal at
that specific time.

2. Pulse Amplitude Demodulator: Demodulation of a PAM signal involves extracting the


original modulating signal from the amplitude-modulated pulses. This can be done using
a simple diode-based envelope detector followed by a low-pass filter.

 Envelope Detection: The modulated PAM signal is passed through an envelope


detector, which typically consists of a diode and a capacitor. The diode rectifies
the signal, allowing only one polarity (positive or negative) to pass through,
creating a series of peaks that follow the envelope of the original modulating
signal.
 Low-Pass Filtering: The rectified signal is then passed through a low-pass filter,
which removes the high-frequency components (the pulse frequencies), leaving
behind a smooth version of the original modulating signal.
𝑓 =
𝟏
< 𝑅𝐶 <
The low-pass is designed using the formula
𝟏
1
2𝜋𝑅 𝑭𝑪 𝒘
𝑚 𝐶
Design:

Circuit Diagram

Modulator

Demodulator

Design

1. Modulating Signal:

 The sine wave generator (V1) provides a continuous Analog signal that represents
the information to be transmitted.
 The message configured to produce a 500 Hz sine wave with a 5V amplitude.

2. Carrier Signal:

 The pulse generator (V2) produces a square wave that acts as the carrier signal.
 It is configured with parameters to generate a pulse with a high amplitude of
5V, a low amplitude of -5V, and specific timings for rise, fall, high time, and
period.

3. Transistor as a Switch:

 The transistor Q1 switches on and off according to the carrier signal (V2).
 When the pulse signal is high, the transistor conducts, allowing the modulating
signal to pass through R2.
 When the pulse signal is low, the transistor turns off, blocking the modulating
signal.

4. Operational Amplifier:

 The OP07 amplifies the signal, ensuring that the modulated output has sufficient
strength.
 It is powered by dual supplies (V3 and V4) set to ±12V.

5. Filtering:

 The RC network (10k resistor and 10µF capacitor) at the output of the op-amp
filters the signal, smoothing out any high-frequency noise and providing a clean
PAM signal.

Procedure

1. Set Up the Circuit:

 Connect the components as per the circuit diagram


 Ensure that the sine wave generator (V1) and pulse generator (V2) are correctly
configured with the specified parameters

2. Transistor Configuration:

 Connect the transistor with its emitter grounded


 Connect the carrier signal (V2) to the base of the transistor through R1
 Connect the collector to VCC through R2

3. Modulating Signal:

 Connect the sine wave generator (V1) to the junction between R1 and the base
of Q1

4. Operational Amplifier:

 Connect the collector of Q1 to the non-inverting input of the OP07


 Provide dual power supplies (±12V) to the OP07

5. Output Filtering:

 Connect the output of the Op-amp to an RC network for filtering.


 The output across the capacitor C1 will be the pulse amplitude modulated
signal.

Observation Table
Constant Parameter if available =
S No. Signal Frequency Vp-p
1 Carrier
2 Message
3 Modulated Signal
4 Demodulated Signal
Result

Designed and verified the working of pulse amplitude modulation and demodulation in lab
and on LTspice simulation.
Experiment 4

Implementation of Analog to digital converter using MATLAB


Aim: To design and implement an Analog to Digital Converter using MATLAB

Theory:

Analog-to-Digital Converter (ADC):


1. Sampling:
o Sampling is the process of converting a continuous-time analog signal into
a discrete-time signal by measuring the signal’s amplitude at regular
intervals (sample points). The sampling rate, measured in samples per
second (Hz), must be at least twice the highest frequency of the analog
signal (Nyquist rate)to avoid information loss and aliasing.
2. Quantization:
o Quantization involves mapping the sampled signal values into a finite set of
discrete levels. Each sample is approximated to the nearest predefined level,
which introduces a small error known as quantization error. The number of
discrete levels is determined by the resolution of the ADC, typically
expressedin bits (e.g., an 8-bit ADC provides 256 levels).
3. Encoding:
o After quantization, the discrete levels are assigned binary codes in the
encoding process. This binary representation (using bits) is then
stored orprocessed by digital systems. The number of bits used in the
encoding corresponds to the resolution of the ADC, where more bits
provide higherprecision in representing the signal.

Matlab Code:

t=0:0.1:10; % your time vector


y=abs(10*sin(t)); % your signal

u=10; % range signal from 0 to 10


n=3; % number of bits
q=u/(2^n-1); % quantization interval
a=fix(y/q);
yd=dec2bin(a,n);% from decimel to binary
yq=a*q;

subplot(3,2,1)
hold on
title ('Orignal Signal')
axis([0 11 0 11])
plot(t,y,'r')

subplot(3,2,2)
hold on
title('Signal in Discrete Form')
axis([0 11 0 11])
stem(t,y,'r')

subplot(3,2,3) hold on
title('Sampled Signal')
axis([0 11 0 11])
stem(t,a)

subplot(3,2,4)
hold on
title('Discrete Signal from Sampled Signal')
axis([0 11 0 11])
stem(t,yq,'black')

subplot(3,2,5:6)
hold on
title('Signal from Sampled Signal')
axis([0 11 0 11])
plot(t,yq,'black')
hold off

Output:
Experiment 5
Simulating Gram Schmidt orthogonalization procedure in MATLAB.

Aim: To simulate Gram Schmidt Orthogonalization procedure in MATLAB

Thoery:

The Gram-Schmidt orthogonalization process is a method for orthogonalizing a set of vectors


in an inner product space, often used in linear algebra. It converts a linearly independent set
of vectors into an orthogonal (or orthonormal) set that spans the same subspace. The
procedure works by iteratively subtracting the projection of each vector onto the ones
previously processed, ensuring that each new vector is orthogonal to the others. This method
is commonly used in numerical algorithms, such as QR decomposition. MATLAB can be
used to implement the Gram-Schmidt process for applications in data analysis, signal
processing, and more.
Matlab Code:

A=input("Enter the elements of the


matrix");[n, k] = size(A);
U = zeros(n,k);
U(:,1) = A(:,1) / norm(A(:,1));
for i = 2:k
U(:,i) = A(:,i);
for j = 1:i-1
U(:,i) = U(:,i) - (U(:,j)'*U(:,i)) * U(:,j);
end
U(:,i) = U(:,i) / norm(U(:,i));
end
disp ('Corresponding Orthogonal Matrix
is')
disp(U)
Output:

You might also like