Adc 1
Adc 1
LABORATORY
Page No.
3
Program (20)
Record Index
Procedure
(20)
Inference (20)
Viva (10)
Average
Total (75)
Faculty Sign
VISION & MISSION OF THE DEPARTMENT
Vision:
“To emerge as a pioneering department, nurturing students into futuristic and globally competent
Computer and Communication Engineering professionals.”
Mission:
Program Outcomes:
4
Conduct Conduct investigations of complex engineering problems using
investigations of research-based knowledge including design of experiments,
PO4.
complex problems modelling, analysis & interpretation of data to provide valid
conclusions. (WK8).
Create, select and apply appropriate techniques, resources and
Engineering Tool modern engineering & IT tools, including prediction and modelling
PO5. recognizing their limitations to solve complex engineering problems.
Usage
(WK2 and WK6)
Analyze and evaluate societal and environmental aspects while
The Engineer solving complex engineering problems for its impact on
PO6.
and The World sustainability with reference to the economy, health, safety, legal
framework, culture and environment. (WK1, WK5, and WK7).
Apply ethical principles and commit to professional ethics, human
PO7. Ethics values, diversity and inclusion; adhere to national & international
laws. (WK9)
Individual and
Function effectively as an individual, and as a member or leader in
PO8. Collaborative
diverse/multi-disciplinary teams.
Teamwork
Communicate effectively and inclusively within the engineering
community and society at large, such as being able to comprehend
PO9. Communication and write effective reports and design documentation, make effective
presentations considering cultural, language, and learning
differences
Apply knowledge and understanding of engineering management
Project Management principles and economic decision-making and apply these to one’s
PO10.
and Finance own work, as a member and leader in a team, and to manage projects
and in multidisciplinary environments.
Recognize the need for, and have the preparation and ability for
i) independent and life-long learning
Life-Long
PO11. ii) adaptability to new and emerging technologies
Learning iii) critical thinking in the broadest context of technological
change. (WK8)
PSO1: Apply the concepts of computer and communication systems to develop software for
different applications.
PSO2: Acquire skills and knowledge to solve real-time challenges in communication networks
Course Outcomes COs:
5
Construct Pulse Modulation and Digital Modulation 1, 2, 5, 9,
R19CC312.2 K4 2
& Demodulation circuits and test its performance. 11
Analyze the performance of Analog and Digital 1, 2, 5, 9,
R19CC312.3 K4 2
modulation schemes using MATLAB. 11
Develop effective presentation skills to present and
R19CC312.4 defend the designs and solution K4 1, 2, 5, 9 2
PO PO PO PO PO PO PO PO PO PO PO PSO PSO
CO
01 02 03 04 05 06 07 08 09 10 11 01 02
R19CC312.1 3 3 3 3 3 0 0 0 1 1 1 0 3
R19CC312.2 3 3 3 3 3 0 0 0 1 1 1 0 3
R19CC312.3 3 3 3 3 3 0 0 0 1 1 1 0 3
R19CC312.4 3 3 3 3 3 0 0 0 1 1 1 0 3
R19CC312.5 3 3 3 3 3 0 0 0 1 1 1 0 3
Course to PO 3 3 3 3 3 0 0 0 1 1 1 0 3
“3”—High, “2”—Medium, “1”—Low, “-“—No Correlation
Syllabus:
R19CC312 – COMMUNICATION ENGINEERING
LABORATORY
LIST OF EXPERIMENTS:
1. Amplitude Modulation and Demodulation
2. Frequency Modulation and Demodulation
3. Pre–emphasis & De–emphasis
4. Pulse Modulation–PAM, PPM, PWM, PCM, Delta Modulation
5. Digital Modulation and Demodulation – ASK, PSK, FSK, QPSK
6. Study of radio transmitters and receivers.
7. Experiments using MATLAB Communication Tool Box
(i) Analysis of Analog Modulation Schemes
(ii) Analysis of Digital Modulation Schemes
6
Block Diagram: Amplitude modulator and demodulator
7
Exp No:1
Amplitude Modulation and Demodulation
Date:
Aim:
To study and understand the amplitude modulation and demodulation using AM transmitter and receiver
kit.
Hardware/Software Required:
Procedure:
Turn on the power supply for both the transmitter and receiver.
The circuit connections are made as shown in the block diagram.
AM kit ST2201 generates the DSB Amplitude modulated wave, which will be transmitted through
transmitter.
AM Kit ST2202 receives the amplitude modulated signal from AM generator and give it as an input
to the RF amplifier and demodulates the signal.
The demodulated output is observed on the CRO.
Various values like Frequency and Amplitude of the modulating signal & carrier signal, Vmax &
Vmin values of modulated signal are noted and the readings are tabulated.
Theory:
Amplitude modulation (AM) is a modulation technique used in electronic communication, most
commonly for transmitting information via a radio carrier wave. In amplitude modulation, the amplitude
(signal strength) of the carrier wave is varied in proportion to the waveform being transmitted. That
waveform may, for instance, correspond to the sounds to be reproduced by a loudspeaker, or the light
intensity of television pixels. This technique contrasts with frequency modulation, in which the frequency
of the carrier signal is varied, and phase modulation, in which its phase is varied. AM was the earliest
modulation method used to transmit voice by radio. It was developed during the first two decades of the
20th century beginning with Landell de Moura and Reginald Fessenden's radiotelephone experiments in
1900. It remains in use today in many forms of communication; for example it is used in portable two
way radios, VHF aircraft radio, Citizen's Band Radio, and in computer modems (in the form of QAM).
"AM" is often used to refer to medium wave AM radio broadcasting.
8
Circuit Diagram
9
Model Graph:
Tabulation:
Viva Questions:
1. Define AM.
2. Draw the phase’s representation of an amplitude modulated wave?
3. Give the significance of modulation index?
4. What is Cross talk?
5. What are the degrees of modulation?
6. Mention the advantages of DSB-SC
Inference:
10
Block Diagram: FM Modulator and Demodulator
11
Exp No:2
Frequency Modulation and Demodulation
Date:
Aim:
To perform modulation and demodulation of Frequency varying signals.
Hardware/Software Required:
13
Model Graph:
Modulation
Connect the patch card S01 AF output to Modulating signal input S02.
Connect ground to ground SG1 to SG2.
Vary the modulation POT.
Observe the FM output on S04 or TP4
Demodulation
Connect the patch cords from S04 TO S05.
Connect the patch cords from GND to GND.
Observe the Demodulation output at S06 or TP6.
Tabulation:
Viva Questions
1. Define Guard Band.
2. Define Frequency Modulation.
3. What are the advantages of Frequency Modulation?
4. What is narrow band FM?
5. Differentiate AM and FM.
6. What is VCO?
7. What is Modulation Index of FM?
8. Compare FM with PM.
9. What is deviation ratio?
14
10. What is the Bandwidth requirement of angle modulated wave?
Inference:
15
16
Exp No:3
Pre-emphasis and De-emphasis
Date:
Aim:
To study and plot the responses of passive & active pre-emphasis and de-emphasis.
Apparatus required:
Pre-emphasis and De-emphasis Kit
Patch Cords
Probes
DSO
Theory:
Pre emphasis works by boosting the high-frequency portion of the signal. This compensates
for the high frequency loss in the cable. De-emphasis works by cutting the low frequency portion
of the signal. This may be coupled with an increase transmit voltage. Pre- emphasis is used at
transmitter side and de-emphasis at receiver side and this circuits are used only Frequency
modulation. The reason for the use of pre-emphasis and de-emphasis is to improve the efficiency
of voice communications where the amplitude of the modulating signal is reducing as the
frequency increases.
Procedure:
Pre-Emphasis
Connect the output of sine wave generator to the passive pre-emphasis circuit.
Connect the output of pre-emphasis circuit to CRO.
Switch ON the trainer.
Tabulate the reading.
From the reading plot the graph (gain Vs frequency).
From the graph note down the cut off frequency.
De-Emphasis
Connect the output of sine wave generator to the passive de-emphasis circuit.
Connect the output of pre-emphasis circuit to CRO.
Switch ON the trainer.
Tabulate the reading.
From the reading plot the graph(gain Vs frequency).
From the graph note down the cut off frequency
17
Pre-Emphasis
Vin = 1V
S.No Frequency Voltage Gain=20logV0/Vin
De-Emphasis
Vin = 1V
S.No Frequency Voltage Gain=20logV0/Vin
18
Model Graph:
Inference:
19
20
Exp No:4
Pulse Modulation–PAM, PPM, PWM, PCM, Delta Modulation
Date:
Aim:
To study and plot the responses of passive & active pre-emphasis and de-emphasis.
Apparatus required:
PPM, PAM, PWM, PCM, Delta Modulation & De-modulation Kit
Patch Cords
Probes
DSO
Theory:
Pulse Amplitude Modulation:-
It may be that type of modulation in which the amplitude of regularly spaced rectangular pulses is
varied according to instantaneous value of the modulating or message signal input. The pulses of PAM signal
may be of flat top type or ideal type. Out of PAM, PPM & PWM, PAM is widely used because during the
transmission the noise interferes with the top of the transmitted pulses on this noise can be easily removed if
PAM pulse has flat top.
Demodulation of PAM Signal:-
Demodulation is the reverse process of modulation in which the modulating signal is recovered back
from a modulated signal. PAM demodulation is done using a sample and hold circuit and 2nd order low pass
filter.
Pulse Width Modulation:-
In this type of modulation, the width of the pulse of carrier signal is varied in accordance with the
instantaneous value of amplitude message signal. In PWM the bandwidth of transmission channel depends on
rise time of the pulse and the instantaneous power of the transmitter varies. The main advantage of PWM is
that power loss in the switching devices is very low.
Pulse Position Modulation:-
In this modulation, the position of the pulse of carrier signal is varied in accordance with the
instantaneous value of message or modulating signal. The final signal is called pulse position modulated
signal. In PPM the bandwidth of the transmission channel depends on rising time of the pulse. In PPM the
noise interference is minimum & the instantaneous power of the transmitter remains constant.
In PCM system, the amplitude of the sampled waveform at definite time interval is represented as a
binary code. The analog signal is first sampled according to the Nyquist criteria. It states that for faithful
reproduction of the limited signal, the sampling rate must be at least twice the highest frequency component
present in the signal. Sampling Frequency ≥ 2fm
The sampled value is the allocated binary codes, which define a narrow range of amplitude value. Each
binary word defines particular amplitude level. The sampled value is then approximated to the nearest
amplitude level. The sample is then assigned a code corresponding to the amplitude level, which is then
transmitted. The process is called as Quantization and it is generally carried out by A/D converter.
DELTA MODULATION:-
Delta modulation is a process of digital modulation technique developed after pulse code
modulation. In this scheme, at each sampling time say the kth sampling time & (k-1)th the difference
b/w the sample value at sampling time k and the sampling time (k-1) is encoded into just a single bit
i.e. at each sampling time.
OPERATION OF DELTA MODULATOR:–
The analog signal which is to be encoded into digital data is applied to the input of the voltage
comparator which compares it with its previous value & assigns a single bit 1 or 0 according to
incoming signal.
DISADVANTAGE OF DELTA MODULATION:-
21
Delta modulation is limited due to following 2 drawbacks:-
NOISE:-
Noise is defined as average unwanted unpredictable random wave form accompanying signal
wherever the signal is received at the receiver by any communication channel or medium which is
always accompanied by noise.
DISTORTION:–
Distortion means that the receiver receives the O/P which is not the exact replica of the analog
I/P signal transmitted at the transmitter.
Procedure:
Pulse Amplitude Modulation:
Connect the circuit as per connection diagram.
Output of sine wave to modulation signal IN in PAM block keeping the switch in 1 KHz
Position.
8 KHz pulse output to pulse IN.
Connect the sample output to low pass filter input.
Output of low pass filter to input of AC amplifier, Keep the gain pot in AC amplifier
block in max position.
Monitor the output of AC amplifier. It should be a pure sin wave similar to input.
Try varying the amplitude of input, the amplitude of output will vary.
Similarly connect the sample & hold & flat top output to LOW PASS FILTTER and see the
demodulated waveform at the output of AC Amplifier.
Switch ON the switched faults NO, 1, 2, 3, 4, 5 & 8 one by one and see their effects on output.
Try to locate the fault and explain the reason behind them.
Switch OFF the power supply.
Pulse Position / Pulse Width Modulation:
Connect the circuit as per connection diagram.
Sine wave output of function Generator block to Modulation input.
64 KHz Square wave output to pulse input.
Switch ON the power supply.
Observe the output of pulse width modulation block.
Vary the amplitude of sine wave and see its effect. On pulse output.
Vary the sine wave frequency by switching the frequency selector switching to 2 KHz.
Also change the frequency of the pulse by connecting the pulse input to different pulse
frequency viz 8, 16, 32 KHz and see the variations in the pulse width modulation output.
Switching ON fault no 1.2&5 one by one & observe their effect on pulse width Modulation
output and try to locate them.
Switching OFF the power supply
Pulse Code Modulation:
Check and connect the signal from function generator at ST- 2103.
Any of the signals from function generator given to the either CH1&CH2.
Check the signal at point sample 0& sample 1.
Check the signal at TP-45&TP-46 before and after the buffer amplifier.
Check the condition of A/D converter.
All switch of switch fault to the off position & error code selector switch to 00 positions. Set
the MODE switch of transmitter timing logic to the fast condition.
Set the PSEDUDO RANDOM SYNC. Code Generator to the off position.
Check the PCM output logic. Connect the TX CLOCK & TX SYNC of transmitter timing
logic to RX CLOCK &RX SYNC of receiver timing logic.
22
Set all the switch of ST-2103 Kit
Connect the PCM O/P to the PCM data I/P of RX & check the bit position of a D/A converter.
Finally check the signal of CH1 & CH2
Delta Modulation:
Connect the comparator O/P node 11 of transmitter to the I/P node 12 of bistable circuit.
Connect the comparator I/P node 10 to O/P node 17 of integrator.
Connect the O/ P node 15 of bipolar convertor to I/P node 16 of integrator.
Connect the TX clock O/P node 2 of clock generator to clock I/P node13 of bi-stable circuit.
Connect I/P node 31 of bi-stable circuit of receiver to O/P node 14 of bistable circuit of
transmitter.
Connect the receiver clock O/P node 3 to input node 32 of bi-stable circuit of receiver.
Connect the I/P node 46 of integrator of receiver to bipolar O/P node 34 of bipolar converter
of receiver.
Connect the O/P node 47 of integrator of receiver to I/P node 50 of low pass filter.
Connect the CRO to the I/P node 10 of comparator of transmitter and trace the waveform.
Connect the CRO at O/P node of integrator & trace the waveform.
Connect the CRO at O/P node of bi-stable circuit and trace the waveform.
Connect the CRO at O/P node of LPF and trace the waveform.
Block Diagram:
Fig: PCM
23
Model Graph:
Tabulation:
S.No Waveforms Amplitude Time period
24
Inference:
25
ASK MODULATION:
FSK MODULATION:
PSK MODULATION:
26
Exp No:5
Digital Modulation and Demodulation – ASK, PSK, FSK, QPSK
Date:
Aim:
To perform the digital modulation techniques such as ASK, FSK, PSK using Data formatting kit.
Apparatus Required:
Data formatting kit
DSO
Probes
Patch cords
Theory:
Digital modulation is the process of encoding a digital information signal into the amplitude,
phase, or frequency of the transmitted signal. The encoding process affects the bandwidth of the
transmitted signal and its robustness to channel impairments. In general, a modulation technique
encodes several bits into one symbol, and the rate of symbol transmission determines the
bandwidth of the transmitted signal. Common digital modulation techniques include amplitude-
shift keying (ASK), frequency-shift keying (FSK), and phase-shift keying (PSK).
Procedure for ASK:
Connect Make wiring connection on VCT-14A as per wiring diagram provided a simply
connect of the test points.
Switch ON the trainers. Set the data switches SW1 to SW8 in 10111001respectively.
Display the data signal (NRZ L) in T.P 6 on channel 1 of oscilloscope, display the ASK
waveform in T.P 27 on channel 2 of oscilloscope.
To obtain true ASK waveform as shown in figure 3.2, it may be necessary to adjust
modulator’s CARRIER OFFSET, MODULATION OFFSET, GAIN potentiometers.
MODULATION OFFSET: This adjusts the amplitude of the carrier at logic ‘0'level.
Adjust this control until amplitude of the carrier signal to be even
forlogic‘0'andlogic‘1'level.
CARRIER OFFSET: This adjusts the bias level of the carrier at logic ‘0' level.Adjust this
control until bias level of the carrier signal to be zero for logic ‘0'level.
GAIN: This adjusts the amplitude of the modulator’s output signal. Adjust this control until
amplitude of the modulator output signal is 1Vpp.
PROCEDURE FOR FSK:
Connect Make wiring connection on VCT-14A as per wiring diagram provided a
simply connect of the test points.
Switch ON the trainers. Set the data switches SW1 to SW8 in 10111001respectively.
Display the data signal (NRZ L) in T.P 6 on channel 1 of oscilloscope, display the ASK
waveform in T.P 27 on channel 2 of oscilloscope.
To obtain true ASK waveform as shown in model graph, it may be necessary to adjust
modulator’s CARRIER OFFSET, MODULATION OFFSET, GAIN potentiometers.
MODULATION OFFSET: This adjusts the amplitude of the carrier at logic ‘0'level.
Adjust this control until amplitude of the carrier signal to be even
forlogic‘0'andlogic‘1'level.
CARRIER OFFSET: This adjusts the bias level of the carrier at logic ‘0' level.Adjust this
control until bias level of the carrier signal to be zero for logic ‘0'level.
GAIN: This adjusts the amplitude of the modulator’s output signal. Adjust this control
until amplitude of the modulator output signal is 1Vpp.
27
DisplaytheFSKwaveformintestpointT.P33onchannel2ofoscilloscope.NotedowntheFSK
waveform.
Model Graph:
ASK
FSK
28
PSK
Inference:
29
Exp No:6
Study of radio transmitters and receivers
Date:
Aim:
To study the radio transmitters and receivers.
Theory:
It is hard to imagine what the modern world would look like without the constant exchange of a
huge quantity of information. It is currently disseminated by various means such as newspapers,
telephone and the Internet. However the fastest way, and sometimes the only way, is by radio. This is
where the transfer is by electromagnetic waves, travelling at the speed of light. In radio
communication, a radio transmitter comprises one side of the link and a radio receiver on the other. No
conductor of any kind is needed between them, and that's how the expression Wireless Link came into
being. In the early days of radio engineering the terms Wireless Telegraph and Wireless Telephone
were also used, but were quickly replaced with Radio Communication, or just Radio.
Radio communication is created by means of electromagnetic waves, of which the existence and
features were theoretically described and predicted by James Maxwell, in 1864. First experimental
proof of this theory was given by Heinrich Hertz in 1888, ten years after Maxwell's death. It was
already known at that time that electric current exists in oscillatory circuits made of a capacitor of
capacity C and coil of inductance L. It was Thomson, back in 1853 that determined the frequency of
this arrangement.
Hertz proved that electromagnetic waves behave as light since they could also be reflected and
refracted. Hertz, however, did not believe in the practical value of his electromagnetic waves
experiments. The range of the link was no further than a few metres. The transmitted signal was very
weak, therefore the signal in the receiver had a very small amplitude and it wasn't possible to detect it
at a greater distance. The possibility of amplifying the signal in the receiver did not exist at the time.
Besides the short range, another shortcoming of the link was noted: If another similar transmitter was
working nearby, a receiver detected all the signals at the same time. It did not have the ability of
isolation. However crude and simple these experiments were at the time, they represented the birth of a
new scientific branch - Radio Engineering.
Rapid development of radio engineering over the ensuing years produced many innovations and
after the First World War a huge number of radio stations emerged. At that time TRF (Tuned Radio
Frequency) receivers were used. Compared to modern receivers they had both poor selectivity and
sensitivity, but back then they fulfilled the demands. The number of radio stations was much less than
today and their transmitting power was much smaller. The majority of listeners were satisfied with the
reception of only local stations. However as the number of stations increased, as well as their
transmitting power, the problem of selecting one station out of the jumble of stations, was becoming
increasingly more difficult. It was partially solved with an increase in the number of oscillatory circuits
in the receiver and the introduction of positive feedback, but the true solution was the invention of the
superheterodyne receiver. This was accomplished by Lewy (1917), and improved by E.H. Armstrong
(1918). An enormous impact on the world of radio was the invention of the transistor by Bardeen,
Bretten & Schockley, in 1948. This reduced the size of the radio receiver and made truly portable sets
a reality. This was followed by the introduction of the integrated circuit, enabling the construction of
30
devices that not only proved better in every way than those using values, but also new designs. Radio
amateurs' contribution to radio engineering should also be emphasized. In the beginning, radio
communication was being conducted in the LW and MW bands. But achieving long distance reception
required very powerful transmitters. The SW band was considered to be useless for radio broadcast on
long distances and was given to radio amateurs. They were banned from using LW and MW bands by
commercial radio stations. However, something unexpected happened: Amateurs were able to
accomplish extremely long distance transmissions (thousands of kilometres), by using very low-power
transmitters. This was later explained by the influence of the ionosphere layer, the existence of which
was also predicted by Tesla. Modern radio receivers differ greatly from the "classical" types, however
the working principles are the same
Each radio receiver must have a reception antenna. It is an electrical conductor, where voltages
of various frequencies and amplitudes are being induced, under the influence of electromagnetic fields
from various radio transmitters. Besides these voltages, those induced by EM fields that are created by
various disturbance sources (such as electrical motors, various household appliances spark-plugs of an
automobile and all other devices where electrical current is being switched on/off during work) are
also present in the antenna, as well as those from fields originating from outer space or the Earth’s
atmosphere. Basic roles that a radio receiver has are: To separate the signal (voltage) of the radio
station that it is tuned at from the multitude of other voltages, whilst suppressing (weakening) all
other signals as much as possible. amplifies the extrapolated signal and take out information from it
and reproduces that information, i.e. restores it into its’ original shape.
Even the simplest radio, the one we are discussing in this study material, must be able to
accomplish all these tasks. The electronic diagram of one such device is given Fig 10.2. It is the
famous (years ago) Detector Radio Receiver or shortly, Detector. The signal selection (separation) and
voltage amplification are performed in the oscillatory circuit that is made of the capacitor C and coil L,
the separation of information (speech or music) from the AM station signal in the detector that
comprises the diode D, capacitor C2 and resistance of the headphones, and information restoring in the
very headphones.
31
Main advantages of this device lie in its extreme simplicity and the fact that it requires no
additional energy sources for its’ operation. All the energy required it draws from the antenna, which
therefore has to be at least a dosen metres long for proper operation. It is also useful to have a good
ground. One can do without it but the reception with it is truly better, especially considering the distant
and small-power transmitter.
The capacitor that takes the signal from the antenna (so-called coupling capacitor) C1, variable
capacitor C and coil L form the input circuit of the radio receiver. Its main role is to separate the signal
of station the receiver is tuned at from multitude of voltages (having various frequencies and
amplitudes) existing in the antenna, amplify that signal and turns it over to the detector.
Inference:
32
Exp No:7a
Analysis of Analog Modulation Schemes using MATLAB
Date:
Aim:
To analyse the analog modulation schemes using MATLAB.
Apparatus Required:
MATLAB
Procedure:
Open the MATLAB® software by double clicking its icon.
Go to the File Menu and select a New M-file. (File_New_M-file).
Now start typing your program. After completing, save the M-file with appropriate name. To execute
the program PressF5 or go to Debug Menu and select Run.
After execution output will appear in the Command window. If there is an error then with an alarm,
type of error will appear in red color.
Rectify the error if any and go to Debug Menu and select Run.
Program:
PAM:
clc;
close all;
clear all;
a = input('Enter the amplitude = ');
f = input('Enter the frequency = ');
t = 0:0.02:2; x1 = 1;
x2 = a*sin(2*pi*f*t);
y = x1.*x2;
subplot(3,1,1);
stem(x1);
title('Impulse Signal');
xlabel('Time');
ylabel('Amplitude ');
subplot(3,1,2)
plot(t,x2);
title('Sine Wave');
xlabel('Time ');
ylabel('Amplitude ');
subplot(3,1,3)
stem(t,y);
title('PAM Wave');
xlabel('Time');
ylabel('Amplitude');
PPM:
clc;
clear all;
close all;
fc=1000;
fs=10000;
fm=200;
t=0:1/fs:(2/fm-1/fs);
33
mt=0.4*sin(2*pi*fm*t)+0.5;
st=modulate(mt,fc,fs,'PPM');
dt=demod(st,fc,fs,'PPM');
figure
subplot(3,1,1);
plot(mt);
title('message signal');
xlabel('time period');
ylabel('amplitude');
axis([0 50 0 1])
subplot(3,1,2);
plot(st);
title('modulated signal');
xlabel('time period');
ylabel('amplitude');
axis([0 500 -0.2 1.2])
subplot(3,1,3);
plot(dt);
title('demodulated signal');
xlabel('time period');
ylabel('amplitude');
axis([0 50 0 1])
PWM:
fs=input('Comparator Sawtooth frequency:');
fm=input('Message frequencya=input('Enter Amplitude of Message:');
t=0:0.0001:1; %sampling rate of 10kHz
stooth=1.01*a.*sawtooth(2*pi*fs*t);
subplot(3,1,1);
plot(t,stooth);
title('Comparator Wave');
msg=a.*sin(2*pi*fm*t); subplot(3,1,2);
plot(t,msg); title('Message Signal');
for i=1:length(stooth)
if (msg(i)>=stooth(i))
pwm(i)=1; else
pwm(i)=0;
end
end
subplot(3,1,3);
plot(t,pwm,'r');
title('PWM');
axis([0 1 0 1.1]);
34
OUTPUT:
Inference:
35
Exp No:7b
Analysis of Digital Modulation Schemes using MATLAB
Date:
Aim:
To analyse the analog modulation schemes using MATLAB.
Apparatus Required:
MATLAB
Procedure:
Open the MATLAB® software by double clicking its icon.
Go to the File Menu and select a New M-file. (File_New_M-file).
Now start typing your program. After completing, save the M-file with appropriate name. To execute
the program PressF5 or go to Debug Menu and select Run.
After execution output will appear in the Command window. If there is an error then with an alarm,
type of error will appear in red color.
Rectify the error if any and go to Debug Menu and select Run.
Program:
ASK:
clc;
clear all;
closeall;
n=input('enter theinput bits');y=length(n);
freq=input('enter the carrierfrequency');fori=1:y
ifn(1,i)==0
for t=(i-1)*100+1:(i*100)y(t)=n(1,i)*sin(2*pi*freq*(t/1000));
end else
for t=(i-1)*100+1:(i*100)y(t)=n(1,i)*sin(2*pi*freq*(t/1000));
end end
endfigure(1);plot(y);
xlabel('time in seconds');ylabel('amplitude in volts');title('amplitude shift keying');
gridon;
FSK:
clc;
clear all;
closeall;
n=input('enter theinput bits');y=length(n);
freq1=input('enter the firstcarrier frequency');
freq2=input('enterthesecondcarrierfrequency');
fori=1:y
ifn(1,i)==0
for t=(i-1)*100+1:(i*100)y(t)=sin(2*pi*freq1*(t/1000));
end else
for t=(i-1)*100+1:(i*100)y(t)=sin(2*pi*freq2*(t/1000));
end end
endfigure(1);
plot(y);
xlabel('time in seconds');ylabel('amplitude in volts');title('frequency shift keying');gridon;
36
BPSK:
clc;
clear all;closeall;
n=input('enter the input bits');y=length(n);
freq=input('enter the carrier frequency');fori=1:y
ifn(1,i)==0
for t=(i-1)*100+1:(i*100)y(t)=sin(2*pi*freq*(t/1000)+pi);
end else
for t=(i-1)*100+1:(i*100)y(t)=sin(2*pi*freq*(t/1000);
end end
endfigure(1);plot(y);
xlabel('time in seconds');ylabel('amplitude in volts');
title('binaryphaseshiftkeying');
gridon;
Inference:
37