0% found this document useful (0 votes)
135 views47 pages

ADC Manual

The experiment aims to design a parallel LC circuit and measure the current flowing through each component. In a parallel LC circuit, the voltage across the inductor and capacitor is the same. The current through the inductor lags the voltage by 90 degrees, while the current through the capacitor leads the voltage by 90 degrees. The vector sum of these currents is equal to the current drawn from the voltage source. When the circuit is energized, energy oscillates back and forth between charging the capacitor and generating a magnetic field in the inductor in a repeating cycle. The combined impedance of the parallel LC circuit is calculated using the standard product-over-sum formula for parallel impedances.

Uploaded by

Ravi Shukla
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)
135 views47 pages

ADC Manual

The experiment aims to design a parallel LC circuit and measure the current flowing through each component. In a parallel LC circuit, the voltage across the inductor and capacitor is the same. The current through the inductor lags the voltage by 90 degrees, while the current through the capacitor leads the voltage by 90 degrees. The vector sum of these currents is equal to the current drawn from the voltage source. When the circuit is energized, energy oscillates back and forth between charging the capacitor and generating a magnetic field in the inductor in a repeating cycle. The combined impedance of the parallel LC circuit is calculated using the standard product-over-sum formula for parallel impedances.

Uploaded by

Ravi Shukla
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/ 47

Experiment number- 1

Aim- To observe the double side band full carrier amplitude modulation waveform.
Theory-
Amplitude modulation is defined as a process of combination of two waves such
that the amplitude of the carrier is made proportional to the instantaneous amplitude
of the modulating voltage.
In short information signal (modulating signal) is used to control the amplitude of
the carrier wave. As the information signal increases in amplitude, the carrier wave is
also made to increase in amplitude and vice versa.

A double sideband transmission was the first method of modulation


developed and, for broadcast stations, is still the most popular method of AM
transmission.
The following block diagram shows the process of amplitude modulation
and generation of modulated wave.

The amount by which the amplitude of the carrier wave increases and decreases
depends on the amplitude of the information signal and is called the 'depth of
modulation'.
The depth of modulation can be quoted as a fraction or as a percentage and the
calculation formula is as follows.
Percentage modulation = { (Vmax- Vmin) / (Vmax+ Vmin) } × 100%
An example is as follows where depth of modulation is 0.6

Frequency spectrum
Assume a carrier frequency (fc) of 1 MHz and amplitude of 5 volts peak- to-peak. The
carrier could be shown and If we also have a 1 K Hz information signal, or modulating
frequency (fm), with amplitude of 2V peak-to-peak and both were linearly added then
the frequency spectrum would look like.

Here the bandwidth requirement is very large and depends heavily on the information
signal.
While if both signals are passed through the amplitude modulator then the frequency
spectrum comes out like this.

As you can see new bandwidth requirement is very low compared to linear addition.
The MATLAB code used for producing an amplitude modulated wave is as follows.

MATLAB Code
clc;
clear all;
close all;
t=0:0.0001:1;
A=5;
fm=input(‘Input modulating signal frequency equals=’);
fc=input(‘input carrier frequency equals=’);
%Plotting start%
subplot(3,2,1)
Sm=A*sin(2*pi*fc*t);
Plot(t,Sm);
title(‘information signal’);
xlabel(‘Time’);
ylabel(‘Amplitude’);

subplot(3,2,2)
Sc=A*sin(2*pi*fc*t);
Plot(t,Sc);
title(‘Carrier signal’);
xlabel(‘Time’);
ylabel(‘Amplitude’);

subplot(3,2,3)
sfm=(A+0.5*Sm)sin(2*pi*fc*t)
Plot(t,Sm);
title(‘Under modulated signal’);
xlabel(‘Time’);
ylabel(‘Amplitude’);

subplot(3,2,4)
sfm=(A+1*Sm).*sin(2*pi*fc*t)
Plot(t,sfm);
title(‘Critical modulated signal’);
xlabel(‘Time’);
ylabel(‘Amplitude’);

subplot(3,2,5)
sfm=(A+1.5*Sm).*sin(2*pi*fc*t)
Plot(t,Sm);
title(‘Over modulated signal’);
xlabel(‘Time’);
ylabel(‘Amplitude’);

%Code end%

Output
The output of above MATLAB code is as follows.

Conclusion:-
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
Experiment number- 2
Aim-To study the waveform of SSBSC transmitted wave using MATLAB.
Theory-
Signal Side Band Transmission (SSB)
Single sideband (SSB) AM is a radio communication technique in which the
transmitter suppresses one sideband and therefore transmits only a single
sideband. Amplitude modulation typically produces a modulated output signal
that has twice the bandwidth of the modulating signal, with a significant power
component at the centre carrier frequency. Single sideband modulation improves
this by not transmitting carrier so there is a reduction by 50% of the transmitted
power.
If a demodulator bandwidth can be reduced by 50%: the needed
transmitter power is also reduced by 50%, i.e., the demodulator Signal to Noise
Ratio (SNR) is improved as the demodulator bandwidth is reduced. In SSB we
transmit only one sideband as shown.

The bandwidth of an SSB system is equal to the range of frequencies present in


the information waveform where as a DSB signal has a bandwidth twice as wide
as the highest frequency component in the information signal. This also means a
greatly reduced bandwidth for the system.
Generation of SSBSC signals.
The design of the SSB modulator is accomplished in two stages first we generate a
DSBSC signal and then remove the lower sideband to achieve the final SSB result.
To do this, we use a balanced modulator. The principle of this circuit is shown.

Internally, the balanced modulator generates the AM waveform, which


includes the carrier and both sidebands. It then offers the facility to feed a variable
amount of the carrier back into the modulator in anti-phase to cancel the carrier
output. In this way we can balance out the carrier to suppress it completely leaving
just the required DSBSC waveform same as shown.

The DSBSC signal consists of the two sidebands, one of which can be removed by
passing them through a band pass filter. On the modulator this is achieved as
shown

The inputs to the balanced modulator comprise the modulating signal,


which extend from 300 Hz to 3.4 KHz, and the carrier signal of frequency 450
KHz. A ceramic band pass filter (455KHZ) passes only a narrow range of
frequencies with a sharp cut-off outside of its pass band.
MATLAB code
clc
vm=input('enter amplitude of modulating signal:')
vc=input('enter amplitude of carrier wave:')
fm=input('enter modulating frequency:')
fc=input('enter carrier frequency:')
fs=10000
t=0:1/fs:1
m=vm/vc
m_wave=vm.*cos(2*pi*fm*t);

subplot(4,1,1)
plot(t,m_wave)
xlabel('time')
ylabel('amplitude')
title('modulating wave')
c_wave=vc.*sin(2*pi*fc*t);

subplot(4,1,2)
plot(t,c_wave)
xlabel('time')
ylabel('amplitude')
title('carrier wave')
ssbsc=((m.*vc)/2).*sin(2*pi*(fc-fm)*t);

subplot(4,1,3)
plot(t,ssbsc)
ylabel('amplitude')
xlabel('Time')
title('ssbsc modulated wave (lower sideband)')

subplot(4,1,4)
dsbfc=(vc+m_wave).*sin(2*pi*fc*t);
plot(t,dsbfc)
xlabel('time')
ylabel('amplitude')
title('modulated wave')
Observation
The waveform obtained by above code is.

Conclusion:-
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
Experiment No: 3
Aim: To design parallel LC circuit and find out the current flowing through each
component. 

Apparatus: Inductor, Capacitor, AC power source, ammeter, voltmeter, connection


wire etc.

Theory:
 
In the schematic diagram shown below, we show a parallel circuit containing an
ideal inductance and an ideal capacitance connected in parallel with
each other and with an ideal signal voltage source. Thus,
 
                                         
 

 
                                 
 
                 

According to Ohm's Law:


 

 
If we measure the current provided by the source, we find that it is 0.43A — the
difference between iL and iC. The question to be asked about this circuit
then is, "Where does the extra current in both L and C come from, and
where does it go?"

The vectors that apply to this circuit give the answer, as shown on the right
hand side. Here, the voltage is the same everywhere in a parallel circuit, so
we use it as the reference. There is no resistance, so we have no current
component in phase with the applied voltage.
We already know that current lags voltage by 90° in an inductance, so we draw the
vector for iL at -90°. Similarly, we know that current leads voltage by 90° in a
capacitance. Therefore, we draw the vector for iC at +90°.

Combining these two opposed vectors, we note that the vector sum is in fact the
difference between the two vectors. This matches the measured current drawn from
the source.

The remaining current in L and C represents energy that was obtained from the source
when it was first turned on. This energy, and the current it produces, simply gets
transferred back and forth between the inductor and the capacitor.

If we begin at a voltage peak, C is fully charged. Since current is 90° out of phase with
voltage, the current at this instant is zero. But C now discharges through L, causing
voltage to decrease as current increases. When C is fully discharged, voltage is zero and
current through L is at its peak. This current has caused the magnetic field surrounding L
to increase to a maximum value. This completes ¼ cycles.

The second quarter-cycle sees the magnetic field collapsing as it tries to maintain the
current flowing through L. This current now charges C, but with the opposite polarity
from the original charge. As current drops to zero and the voltage on C reaches its peak,
the second ¼ cycle is complete.

The other half of the cycle sees the same behaviour, except that the current flows
through L in the opposite direction, so the magnetic field likewise is in the opposite
direction from before. At the conclusion of the second half-cycle, C is once again
charged to the same voltage at which it started, with the same polarity. Now, a new
cycle begins and repeats the actions of the old one.

The calculation for the combined impedance of L and C is the standard product-over-
sum calculation for any two impedances in parallel, keeping in mind that we must
include our "j" factor to account for the phase shifts in both components. Thus,
 

 
This equation tells us two things about the parallel combination of L and C:

The overall phase shift between voltage and current will be governed by the component
with the lower reactance. This is reasonable because that will be the component
carrying the greater amount of current. 
 
The impedance of the parallel combination can be higher than either reactance alone.
This is because of the opposed phase shifts in current through L and C, forcing the
denominator of the fraction to be the difference between the two reactance, rather
than the sum of them. 
 
Because the denominator specifies the difference between XL and XC, we have an
obvious question: What happens if XL = XC — the condition that will exist at the
resonant frequency of this circuit? Clearly there's a problem with a zero in the
denominator of a fraction, so we need to find out what actually happens in this case.
 
At the resonant frequency of the parallel LC circuit, we know that XL = XC. At this
frequency, according to the equation above, the effective impedance of the LC
combination should be infinitely large. In fact, this is indeed the case for this theoretical
circuit using theoretically ideal components.
 
The currents flowing through L and C may be determined by Ohm's Law, as we stated
earlier on this page. The current drawn from the source is the difference between iL and
iC. However, when XL = XC and the same voltage is applied to both components, their
currents are equal as well. Therefore the difference is zero, and no current is drawn
from the source. This corresponds to infinite impedance, or an open circuit.
 
This doesn't mean that no current flows through L and C. Rather, all of the current
flowing through these components is simply circulating back and forth between them
without involving the source at all. The currents calculated with Ohm's Law still flow
through L and C, but remain confined to these two components alone. As a result of this
behaviour, the parallel LC circuit is often called a "tank" circuit, because it holds this
circulating current without releasing it.
 
There is one other factor to consider when working with an LC tank circuit: the
magnitude of the circulating current. We can use many different values of L and C to set
any given resonant frequency. Keep in mind that at resonance:
 

 
 

 
As long as the product L × C remains the same, the resonant frequency is the same.
However, if we use a large value of L and a small value of C, their reactance will be high
and the amount of current circulating in the tank will be small. If we reverse that and
use a low value of L and a high value of C, their reactance will be low and the amount of
current circulating in the tank will be much greater. Many applications of this type of
circuit depend on the amount of circulating current as well as the resonant frequency,
so you need to be aware of this factor. In fact, in real-world circuits that cannot avoid
having some resistance (especially in L), it is possible to have such a high circulating
current that the energy lost in R (p = i²R) is sufficient to cause L to burn up!

This can be verified using the simulator by creating the above mentioned parallel LC
circuit and by measuring the current and voltage across the inductor and capacitor. The
values should be consistent with the earlier findings.
Applications:
 
 The LC circuit behaves as an electronic resonator, which are the key component in
many applications.
 Oscillators  
 Mixers                                               
 Graphics tablets
 Filters         
 Foster - Seeley Discriminator            
 Electronic article surveillance
 Tuners        
 Contactless Card

Procedure: 
 
1. Select the components on the right side and connections are made as in the circuit
diagram.
2. Connection with wire is complete only when the black colour appears at its ends.

Circuit Diagram:
Observation table:
 
R=____________ L=____________ C=___________

Frequency Current in Current in Voltage across


inductor capacitor the circuit

Resonant Frequency=____________

Conclusion:
____________________________________________________________________________________________
____________________________________________________________________________________________
____________________________________________________________________________________________
Experiment number-4
Aim- To observe and understand the frequency response of the pre-emphasis and de-
emphasis circuits.
Theory:-
Pre-emphasis

In general, in the voice signal, the high frequency component has lower
signal level than audio frequency component. On the other hand, in FM
modulation, the more noise output increases, the higher the frequency is.
Accordingly, as the frequency of signal wave has higher frequency, it has worse
signal to noise ratio (S/N ratio), and the fidelity of signal reception and detection
falls as well.
It would be advantageous when a weak signal is transmitted if we could increase
the high frequency component to have high level before modulation, and then
perform modulation and transmission. The circuit that amplifies the high frequency
signal before modulating is called a pre-emphasis circuit.

Above figure shows an example of the pre-emphasis circuit. Input is Vi, C1 and R1
play a vital role of pre-emphasis and the output is measured at Vo. In the
experiment, the input signal is supplied from the low frequency signal generator,
which generates a sine wave of 1 KHz, 1 Vpp.
Transfer function T(s) for the above circuit can be calculated as follows:
Accordingly transfer characteristics approaches 1 as it rises to high frequency.

Figure shows the results of simulating the input/output characteristics of the pre-
emphasis circuit on computer.
Horizontal axis represents the frequency and the vertical axis represents the
output voltage. We simulate the change of the output voltage while fixing the
amplitude of the input voltage, and changing the frequency from 150 Hz to 30 KHz.
The result shows that the output voltage is 0.167 V before 300 Hz and becomes 0.7
V, which is 0.707 times of the maximum voltage at 2.99 KHz. The output voltage
increases at the frequency over that and reaches 1 V, the maximum voltage. As the
frequency increases, the voltage increases, showing that the high frequency
components are enhanced.

De-emphasis circuits
It is necessary to weaken or de-emphasize the high frequency part components
to play the areas of high frequency, which had been temporarily enhanced by the
pre-emphasis circuit of the transmitting part, to the original signal level at the
receiving end.
De-emphasis circuit plays this role. Following figure shows an example of the de-
emphasis circuit that is generally used, and has the same features as a low pass
filter circuit.

As shown in the de-emphasis circuit of figure, we set the value of components to


R1=R2=10 KΩ, C1 = C2 = 10 nF, and 1KHz sine wave from the low frequency signal
generator to 1 Vpp, and simulate the change of the output amplitude while
changing the audio frequency range from 150 Hz to 30 KHz. The results are
shown in figure.
Here, horizontal axis represents the frequency and the vertical axis represents the
output voltage value. Figure shows a circuit that performs de- emphasis through 2
stages of low-pass circuit of R1, C1 and R2, C2. First, let's examine the de-emphasis
characteristics of the circuit in the single stage only. The transfer function and frequency
27 R1 C1 stage alone are as follows:
Figure shows the ideal frequency characteristic of R1C1 single stage and is a kind
of a low pass filter that causes attenuation of 20 dB/dec on the frequency after
the pole frequency. The frequency characteristics of the transfer function of
overall circuit in the figure can be explained as follows:
From the simulation result, the output voltage falls to 3 dB (0.707 V) at p1 (607
Hz), and decrease 20 dB/dec from p1 to p2 (4. 16 KHz), and finally to almost 0
V.

Based on these results the output voltage value decreases and as a result the radio
frequency component of the output is weakened accordingly. Synthesis of pre and de-
emphasis signals play important role in recovery of the original signal.
Circuit Diagram
Procedure
For Pre-emphasis

1. The input of the pre-emphasis circuit is voltage V1 and the output of the
circuit is measured across R2 as VO.
2. Apply the input signal from a low frequency generator, which generates a
sine wave in the frequency range of 200Hz to 10 KHz.
3. Keep the amplitude of the input signal at 1V. Connect the CRO channel(X
and Y) to the input and output of the pre-emphasis circuit and keep CRO
in dual mode to view I/P and O/P signal simultaneously on the CRO
screen.
4. Start initially with the low frequency input (say 200Hz) and
measure the output voltage VO on the Oscilloscope.
5. Now increase the input signal frequency in steps and note down the
output voltage for each input. Do remember to keep input voltage at
1Vpp for every step.
6. Tabulate the observed reading in the table given below.
7. Plot a graph of input frequency vs output voltage.
8. You will observe that as the input frequency increases the amplitude of the
output signal increases. The output voltage becomes 1/√2 of the maximum
voltage (Vi) at around 3 KHz.
9. The output voltage increases over that and reaches 1V, the maximum voltage. As
the frequency increases, the output voltage increases, showing that the high
frequency components are enhanced.
For Pre-emphasis
Input Output Input Output
frequency
Hz Voltage frequency Voltage
Vpp Hz Vpp
For De-emphasis
1. The input for de-emphasis circuit is Vi and the output is measured
across C3 as VO.
2. The values of the components are shown in the experiment board viz.
R3
3. Apply the input signal from a low frequency generator, which
generates a sine wave in the frequency range of 200Hz to 10
KHz.
4. Keep the amplitude of the input signal at 1V. Connect the CRO
channel (X and Y) to the input and output of the pre-emphasis
circuit and keep CRO in dual mode to view I/P and O/P signal
simultaneously on the CRO screen.
5. Start initially with the low frequency input (say200Hz) and
measure the output voltage VO on the Oscilloscope.
6. Now increase the input signal frequency in steps and note down the
output voltage for each input. Do remember to keep input voltage at
1Vpp for every step.
7. Tabulate the observed reading in the table given below. Plot a graph
of input frequency vs. output voltage. You will observe that the
output voltage falls to 1/√2 of the input voltage at 607Hz and
decreases 20dB/decade at 4.16 KHz and finally to almost 0V.
8. Hence the circuit de-emphasis the high frequency components.
Observation Table
For de emphasis

Input Output Input Output


frequency
Hz Voltage frequency Voltage
Vpp Hz Vpp

Conclusion:-

______________________________________________________________
______________________________________________________________
______________________________________________________________
___________________________________
Experiment:5
Aim: To under stand sampling theorem and reconstruct low-pass signal with
matlab.
THEORY:
The sampling theorem is a fundamental bridge between continuous-
time signals (often called "analog signals") and discrete-time signals (often
called "digital signals").
It establishes a sufficient condition for a sample rate that permits a discrete
sequence of samples to capture all the information from a continuous-time
signal of finite bandwidth.
The sampling theorem introduces the concept of a sample rate that is sufficient
for perfect fidelity for the class of functions that are bandlimited to a given
bandwidth, such that no actual information is lost in the sampling process.
It expresses the sufficient sample rate in terms of the bandwidth for the class
of functions. The theorem also leads to a formula for perfectly reconstructing
the original continuous-time function from the samples.
Perfect reconstruction may still be possible when the sample-rate criterion is
not satisfied, provided other constraints on the signal are known. In some
cases (when the sample-rate criterion is not satisfied), utilizing additional
constraints allows for approximate reconstructions. 
SAMPLING THEOREM:
Statement: A continuous time signal can be represented in its samples and
can be recovered back when sampling frequency f s is greater than or equal to
the twice the highest frequency component of message signal. i. e.
fs≥2fm.fs≥2fm.

Proof: Consider a continuous time signal x(t). The spectrum of x(t) is a band


limited to fm Hz i.e. the spectrum of x(t) is zero for |ω|>ωm.
Sampling of input signal x(t) can be obtained by multiplying x(t) with an
impulse train δ(t) of period Ts. The output of multiplier is a discrete signal
called sampled signal which is represented with y(t) in the following diagrams:
Here, you can observe that the sampled signal.
To avoid aliasing, a band-limited signal xa(t) with bandwidth B can
bereconstructed from its sample values x(n) = xa(nTs) if the sampling frequency
Fs = 1/Ts is greater than twice the bandwidth B of xa(t).
Fs =2B
Otherwise aliasing would result in x(n). The sampling rate of 2B for an analog
band-limited signal is called the Nyquist rate.
RECONSTRUCTION OF SIGNAL:
A continous-time signal x(t) is sampled at a frequency of ws rad/sec. to produce
a sampled signal xs(t). We model xs(t) as an impulse train with the area of
the nth impulse given by x(nTs ). An ideal low-pass filter with cutoff
frequency wc rad/sec. is used to obtain the reconstructed signal xr(t).

MATLAB PROGRAM:

clear all;
close all;
clc;
f=input('enter Frequency: ');
fs=input('enter samp freq : ');
t=0:0.1:100;
ts=0:10:1000;
x=sin(2*3.14*f*t);
subplot(2,1,1);
plot(t,x);
y=sin(2*3.14*f*ts/fs);
subplot(2,1,2);
stem(ts,y);

OUTPUT
CONCLUSION:
_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
______________________________
Experiment: 6
AIM: To understand PCM.
THEORY:
Pulse code modulation (PCM) is a digital scheme for transmitting analog data. The
signals in PCM are binary; that is, there are only two possible states, represented by logic
1 (high) and logic 0 (low).

This is true no matter how complex the analog waveform happens to be. Using PCM, it is
possible to digitize all forms of analog data, including full-motion video, voices, music,
telemetry, and virtual reality (VR). 

We can also get back our analog signal by demodulation. The Pulse Code Modulation
process is done in three steps Sampling, Quantization, and Coding.
There are two specific types of pulse code modulations such as differential pulse code
modulation (DPCM) and adaptive differential pulse code modulation (ADPCM).

BLOCK DIAGRAM OF PCM:

What is a Pulse Code Modulation?

To get a pulse code modulated waveform from an analog waveform at the


transmitter end (source) of a communications circuit, the amplitude of the analog signal
samples at regular time intervals.

The sampling rate or number of samples per second is several times the maximum
frequency. The message signal converted into binary form will be usually in the number
of levels which is always to a power of 2. This process is called quantization.
TRASMITTER AND RECEIVER BLOCK DIAGRAM:

At the receiver end, a pulse code demodulator decodes the binary signal back into pulses
with same quantum levels as those in the modulator. By further processes we can
restore the original analog waveform.

This above block diagram describes the whole process of PCM. The source of continuous
time message signal is passed through a low pass filter and then sampling, Quantization,
Encoding will be done. We will see in detail step by step.

Sampling:

Sampling is a process of measuring the amplitude of a continuous-time signal at discrete


instants, converts the continuous signal into a discrete signal. For example, conversion of
a sound wave to a sequence of samples. The Sample is a value or set of values at a point
in time or it can be spaced.
Sampler extract samples of a continuous signal, it is a subsystem ideal sampler produces
samples which are equivalent to the instantaneous value of the continuous signal at the
specified various points.
The Sampling process generates flat- top Pulse Amplitude Modulated (PAM) signal.

Sampling frequency, Fs is the number of average samples per second also known as
Sampling rate. According to the Nyquist Theorem sampling rate should be at least 2
times the upper cutoff frequency.
Sampling frequency, Fs>=2*fmax to avoid Aliasing Effect. If the sampling frequency is
very higher than the Nyquist rate it become Oversampling, theoretically a bandwidth
limited signal can be reconstructed if sampled at above the Nyquist rate. If the sampling
frequency is less than the Nyquist rate it will become Undersampling.
Basically two types of techniques are used for the sampling process. Those are 1. Natural
Sampling and 2. Flat- top Sampling.

Quantization:

In quantization, an analog sample with an amplitude that converted into a digital sample
with an amplitude that takes one of a specific defined set of quantization values.
Quantization is done by dividing the range of possible values of the analog samples into
some different levels, and assigning the center value of each level to any sample in
quantization interval.
Quantization approximates the analog sample values with the nearest quantization
values. So almost all the quantized samples will differ from the original samples by a
small amount. That amount is called as quantization error.
The result of this quantization error is we will hear hissing noise when play a random
signal. Converting analog samples into binary numbers that is 0 and 1.In most of the
cases we will use uniform quantizers. Uniform quantization is applicable when the
sample values are in a finite range (Fmin, Fmax).
The total data range is divided into 2n levels, let it be L intervals. They will have an equal
length Q. Q is known as Quantization interval or quantization step size. In uniform
quantization there will be no quantization error.

Uniformly Quantized Signal

ENCODING:

The encoder encodes the quantized samples. Each quantized sample is encoded into an
8-bit code word by using A-law in the encoding process.
Bit 1 is the most significant bit (MSB), it represents the polarity of the sample. “1”
represents positive polarity and “0” represents negative polarity.
Bit 2,3 and 4 will defines the location of sample value. These three bits together form
linear curve for low level negative or positive samples.
Bit 5,6,7 and 8 are the least significant bits (LSB) it represents one of the segments
quantized value. Each segment is divided into 16 quantum levels.

PLUSE CODE DEMODULATION:

Pulse Code Demodulation will be doing the same modulation process in reverse.


Demodulation starts with decoding process, during transmission the PCM signal will
effected by the noise interference.
So, before the PCM signal sends into the PCM demodulator, we have to recover the
signal into the original level for that we are using a comparator. The PCM signal is a series
pulse wave signal, but for demodulation we need wave to be parallel.
By using a serial to parallel converter the series pulse wave signal will be converted into a
parallel digital signal.
After that the signal will pass through n-bits decoder, it should be a Digital to Analog
converter. Decoder recovers the original quantization values of the digital signal. This
quantization value also includes a lot of high frequency harmonics with original audio
signals. For avoiding unnecessary signals we utilize a low-pass filter at the final part.

ADVANTAGES:

Analog signal can be transmitted over a high- speed digital communication system.


Probability of occurring error will reduce by the use of appropriate coding methods.
PCM is used in Telkom system, digital audio recording, digitized video special effects,
digital video, voice mail.

Matlab code:

function [y Bitrate MSE Stepsize QNoise]=pcm(A,fm,fs,n)


%A=amplitute of cosine signal
%fm=frequency of cosine signal
%fs=sampling frequency
%n= number of bits per sample
%MSE=Mean Squar error, QNoise=Quantization Noise
%Example [y Bitrate MSE Stepsize QNoise]=pcm(2,3,20,3)
t=0:1/(100*fm):1;
x=A*cos(2*pi*fm*t);

%---Sampling-----
ts=0:1/fs:1;
xs=A*cos(2*pi*fm*ts);
%xs Sampled signal

%--Quantization---
x1=xs+A;
x1=x1/(2*A);
L=(-1+2^n);
% Levels x1=L*x1;
xq=round(x1);
r=xq/L;
r=2*A*r; r=r-A;
%r quantized signal

%----Encoding---
y=[];
for i=1:length(xq)
d=dec2bin(xq(i),n);
y=[y double(d)-48];
end %Calculations MSE=sum((xs-r).^2)/length(x);
Bitrate=n*fs;
Stepsize=2*A/L;
QNoise=((Stepsize)^2)/12;

figure(1)
plot(t,x,'linewidth',2)
title('Sampling')
ylabel('Amplitute')
xlabel('Time t(in sec)') hold on stem(ts,xs,'r','linewidth',2) hold off legend('Original Signal','Sampled Signal');
figure(2)
stem(ts,x1,'linewidth',2)
title('Quantization')
ylabel('Levels L') hold on stem(ts,xq,'r','linewidth',2)
plot(ts,xq,'--r') plot(t,(x+A)*L/(2*A),'--b') grid hold off legend('Sampled Signal','Quantized Signal');

figure(3)
stairs([y y(length(y))],'linewidth',2)
title('Encoding')
ylabel('Binary Signal')
xlabel('bits')
axis([0 length(y) -1 2])
grid

Output:

CONCLUSION:
_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
_____________________________________________
Experiment: 8
AIM: To understand concept of delta modulation.
THEORY:
A delta modulation (DM or Δ-modulation) is an analog-to-digital and digital-to-analog
signal conversion technique used for transmission of voice information where quality is
not of primary importance.
DM is the simplest form of differential pulse-code modulation (DPCM) where the
difference between successive samples are encoded into n-bit data streams. In delta
modulation, the transmitted data are reduced to a 1-bit data stream.

The type of modulation, where the sampling rate is much higher and in which the
stepsize after quantization is of a smaller value Δ, such a modulation is termed as delta
modulation.

FEATURES OF DELTA MODULATION:


 An over-sampled input is taken to make full use of the signal correlation.
 The quantization design is simple.
 The input sequence is much higher than the Nyquist rate.
 The quality is moderate.
 The design of the modulator and the demodulator is simple.
 The stair-case approximation of output waveform.
 The step-size is very small, i.e., Δ (delta).
 The bit rate can be decided by the user.
 This involves simpler implementation.

Delta Modulation is a simplified form of DPCM technique, also viewed as 1-bit DPCM
scheme. As the sampling interval is reduced, the signal correlation will be higher.

DELTA MODULATOR:

The Delta Modulator comprises of a 1-bit quantizer and a delay circuit along with two
summer circuits. Following is the block diagram of a delta modulator.
The predictor circuit in DPCM is replaced by a simple delay circuit in DM.

From the above diagram, we have the notations as −

 x(nTs)x(nTs) = over sampled input


 ep(nTs)ep(nTs) = summer output and quantizer input
 eq(nTs)eq(nTs) = quantizer output = v(nTs)v(nTs)
 xˆ(nTs)x^(nTs) = output of delay circuit
 u(nTs)u(nTs) = input of delay circuit
Using these notations, now we shall try to figure out the process of delta modulation.

ep(nTs)=x(nTs)−xˆ(nTs)ep(nTs)=x(nTs)−x^(nTs) --equation 1

=x(nTs)−u([n−1]Ts)=x(nTs)−u([n−1]Ts)

=x(nTs)−[xˆ[[n−1]Ts]+v[[n−1]Ts]]=x(nTs)−[x^[[n−1]Ts]+v[[n−1]Ts]] --equation 2

Further,

v(nTs)=eq(nTs)=S.sig.[ep(nTs)]v(nTs)=eq(nTs)=S.sig.[ep(nTs)] --equation 3

u(nTs)=xˆ(nTs)+eq(nTs)u(nTs)=x^(nTs)+eq(nTs)

Where,

 xˆ(nTs)x^(nTs) = the previous value of the delay circuit


 eq(nTs)eq(nTs) = quantizer output = v(nTs)v(nTs)
Hence,

u(nTs)=u([n−1]Ts)+v(nTs)u(nTs)=u([n−1]Ts)+v(nTs) --equation 4

Which means,

The present input of the delay unit

= (The previous output of the delay unit) + (the present quantizer output)

Assuming zero condition of Accumulation,

u(nTs)=S∑j=1nsig[ep(jTs)]u(nTs)=S∑j=1nsig[ep(jTs)]

Accumulated version of DM output = ∑j=1nv(jTs)∑j=1nv(jTs) --equation 5

Now, note that

xˆ(nTs)=u([n−1]Ts)x^(nTs)=u([n−1]Ts)

=∑j=1n−1v(jTs)=∑j=1n−1v(jTs) --equation 6

Delay unit output is an Accumulator output lagging by one sample.

From equations 5 & 6, we get a possible structure for the demodulator.

A Stair-case approximated waveform will be the output of the delta modulator with the
step-size as delta (Δ). The output quality of the waveform is moderate.
DELTA DEMODULATOR:
The delta demodulator comprises of a low pass filter, a summer, and a delay circuit. The
predictor circuit is eliminated here and hence no assumed input is given to the
demodulator.

Following is the diagram for delta demodulator.

From the above diagram, we have the notations as −

 vˆ(nTs)v^(nTs) is the input sample


 uˆ(nTs)u^(nTs) is the summer output
 x¯(nTs)x¯(nTs) is the delayed output
A binary sequence will be given as an input to the demodulator. The stair-case
approximated output is given to the LPF.
Low pass filter is used for many reasons, but the prominent reason is noise elimination
for out-of-band signals.
The step-size error that may occur at the transmitter is called granular noise, which is
eliminated here. If there is no noise present, then the modulator output equals the
demodulator input.

Advantages of DM Over DPCM


 1-bit quantizer
 Very easy design of the modulator and the demodulator
 However, there exists some noise in DM.
 Slope Over load distortion (when Δ is small)
 Granular noise (when Δ is large)

Matlab code:
clearall
closeall
clc
b=0;
fc=0.05;
n=[0:0.3:20];
delta=0.01;
x_n=sin(2*pi*fc*n);
fori=1:length(n)
t=(x_n(i)-b);
y=sign(t);
ify==1
y_n(i+1)=x_n(i)+delta;
b=y_n(i+1); 
else
y_n(i+1)=x_n(i)-delta;
b=y_n(i+1);
end
end
ffttx=fft(x_n);
ffttx_a=abs(ffttx);
ffty=fft(y_n);
ffty_a=abs(ffty);

figure(1)
plot(fftshift(ffttx_a),'g')
holdon
plot(fftshift(ffty_a),'b')
title('Spectra')
xlabel('-----------f--------->')
ylabel('-----------X(f)/Y(f)------>')
legend('Original Signal','Modulated Signal')

figure(2)

plot(n,x_n,'g')
holdon
n1=[0 n];
stairs(n1,y_n,'b')
title('Signals')
xlabel('-----------t/n--------->')
ylabel('-----------x(t)/y[n]------>')
legend('Original Signal','Modulated Signal')
legend('Original Signal','Modulated Signal')

Output:
CONCLUSION:
_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
__________________________________________
Experiment:-7
AIM:-Write a MATLAB Code to generate Amplitude Shift Keying signal.
MATLAB CODE:-
clc;
clear all;
close all;

data=input('Enter digital data : ');


dl=length(data);
t=0:0.01:2*pi;
fc=1*sin(2*pi*2*t);
original_data=[];
mod_data=[];
for i=1:dl
if(data(1,i)==1)
original_data=[original_data ones(1,629)];
mod_data=[mod_data fc];
else
original_data=[original_data zeros(1,629)];
mod_data=[mod_data zeros(1,629)];
end
end
figure(1);
title('ASK MODULATION')
subplot(211);plot(original_data);ylim([-1.5 1.5]);title('ORIGINAL DATA');
subplot(212);plot(mod_data);ylim([-1.5 1.5]);title('ASK MODULATED DATA');
OUTPUT:- Enter the Input Data:-[ 1 0 0 1 1 1]

CONCLUSION:-
_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
________________________________
Experiment:- 8
AIM:-Write a MATLAB Code to generate Frequency Shift Keying signal.
MATLAB CODE:-
clc;
clear all;
close all;

data=input('Enter digital data : ');


dl=length(data);
t=0:0.01:2*pi;
fc1=1*sin(2*pi*2*t);
fc2=1*sin(2*pi*0.5*t);
original_data=[];
mod_data=[];
for i=1:dl
if(data(1,i)==1)
original_data=[original_data ones(1,629)];
mod_data=[mod_data fc1];
else
original_data=[original_data zeros(1,629)];
mod_data=[mod_data fc2];
end
end
figure(1);
title('FSK MODULATION')
subplot(211);plot(original_data);ylim([-1.5 1.5]);title('ORIGINAL DATA');
subplot(212);plot(mod_data);ylim([-1.5 1.5]);title('OFSK MODULATED DATA');
OUTPUT:-
Enter the Input Data:-[1 0 0 1 1 1]

WAVEFORM:-

CONCLUSION:-
_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
____________________________________
Experiment:-10
AIM:-Write a MATLAB Code to Perform a different Phase Shift Keying & modulation
techniques and its Scatter Plot .
MATLAB CODE:-
clc;
clear all;
close all;
% BPSK MODULATION
M=2;
data_source = randsrc(1, 100, 0:M-1);
mod_data=pskmod(data_source,M);
scatterplot(mod_data);
title('SCATTER PLOT OF BPSK');
%QPSK MODULATION
M=4;
data_source = randsrc(1, 100, 0:M-1);
mod_data=pskmod(data_source,M);
scatterplot(mod_data);
title('SCATTER PLOT OF QPSK');
% 4-QAM MODULATION
M=4;
data_source = randsrc(1, 100, 0:M-1);
mod_data=qammod(data_source,M);
scatterplot(mod_data);
title('SCATTER PLOT OF 4-QAM');
% 16-QAM MODULATION
M=16;
data_source = randsrc(1, 100, 0:M-1);
mod_data=qammod(data_source,M);
scatterplot(mod_data);
title('SCATTER PLOT OF 16-QAM');
OUTPUT :-
SCATTERING PLOT :-
CONCLUSION:-
_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
_______________________________________

You might also like