Sei sulla pagina 1di 59

P.S.N.

A
COLLEGE OF ENGINEERING & TECHNOLOGY

KOTHANDARAMAN NAGAR, DINDIGUL-624622

OBSERVATION MANUAL BOOK

Register No:

Certify that this is the bonafide record of work done by

Selvan / Selvi __________________________________________________ of the V - semester Electronics

and Communication Engineering Branch during the year 2017 -2018 in the EC 8561 –

COMMUNICATION SYSTEMS Laboratory.

Staff-in-charge Head of the Department

Submitted for the University Practical

Examination on ___________________ 2019

Internal Examiner External Examiner

1
VISION OF THE COLLEGE

 To provide world class engineering education for individuals to become technologically superior, socially
conscious and responsible citizens for the welfare of mankind

MISSION OF THE COLLEGE


 1.To achieve academic excellence by imparting knowledge and skills through problem solving, practical
training and design & development of innovative projects.
 2. To develop leadership and inter disciplinary team skills through effective communication training and
inculcating ethical behavior.
 3.To carry out applied research in Engineering & Technology and facilitate life-long learning.

QUALITY POLICY
 1.Providing excellent infrastructure and conducive learning environment.
 2.Building a pleasant work culture and motivating everybody to contribute their best.
 3.Responding proactively to the changing the needs of industry, parents and the society by embracing latest
technological trends in the field of education.
 4.Complying with requirements of standards and striving continually to improve the quality of operations of
the institution.

VISION STATEMENT OF THE DEPARTMENT


To be a centre of academic excellence by imparting quality teaching, facilitating research, innovation, value
creation and technology development in frontier areas of Electronics and Communication Engineering.
MISSION STATEMENTS OF THE DEPARTMENT

1. To provide quality and contemporary education in the domain of ECE to produce globally competitive
engineers.
2. To create an academically ambient environment with effective teaching-learning process, best-of-breed
laboratory facility and collaborative ventures with industries.
3. To impart the fundamentals and basic skills to nurture creative ideas, innovative solutions and multi-
disciplinary design approaches.
4. To develop entrepreneurship qualities and good management practices by adhering to the professional
ethical code.
5. To include a sense of responsibility towards nation building, social causes and environment conservation.

PROGRAM EDUCATIONAL OBJECTIVES (PEOS)

PEO.1: Our graduates will be professionally able to reach organizational goals.

PEO.2: Our graduates will have successful career in industry, academia and the public sector
establishments.

PEO.3: Our graduates will design and develop an engineering system as per latest technological needs.

PEO.4: Our graduates will posses excellent oral and written communication standards for demonstration.

2
PROGRAM OUTCOMES (PO)

Electronics and Communication Engineering Graduates will be able to:

PO1. Engineering knowledge: Apply the knowledge of mathematics, science, engineering fundamentals, and
an engineering specialization to the solution of complex engineering problems.
PO2. Problem analysis: Identify, formulate, review research literature, and analyze complex engineering
problems reaching substantiated conclusions using first principles of mathematics, natural sciences, and
engineering sciences.
PO3. Design/development of solutions: Design solutions for complex engineering problems and design system
components or processes that meet the specified needs with appropriate consideration for the public health and
safety, and the cultural, societal, and environmental considerations.
PO4. Conduct investigations of complex problems: Use research-based knowledge and research methods
including design of experiments, analysis and interpretation of data, and synthesis of the information to provide
valid conclusions.
PO5. Modern tool usage: Create, select, and apply appropriate techniques, resources, and modern engineering
and IT tools including prediction and modelling to complex engineering activities with an understanding of the
limitations.
PO6. The engineer and society: Apply reasoning informed by the contextual knowledge to assess societal,
health, safety, legal and cultural issues and the consequent responsibilities relevant to the professional
engineering practice.
PO7. Environment and sustainability: Understand the impact of the professional engineering solutions in
societal and environmental contexts, and demonstrate the knowledge of, and need for sustainable development.
PO8. Ethics: Apply ethical principles and commit to professional ethics and responsibilities and norms of the
engineering practice.
PO9. Individual and team work: Function effectively as an individual, and as a member or leader in diverse
teams, and in multidisciplinary settings.
PO10.Communication: Communicate effectively on complex engineering activities with the engineering
community and with society at large, such as, being able to comprehend and write effective reports and design
documentation, make effective presentations, and give and receive clear instructions.
PO11.Project management and finance: Demonstrate knowledge and understanding of the engineering and
management principles and apply these to one’s own work, as a member and leader in a team, to manage
projects and in multidisciplinary environments.
PO12.Life-long learning: Recognize the need for, and have the preparation and ability to engage in
independent and life-long learning in the broadest context of technological change.

PROGRAM SPECIFIC OUTCOMES (PSO)

PSO1. To analyze, design and develop solutions by applying foundational concepts of electronics
and communication engineering.
PSO2. To apply design principles and best practices for developing quality products for scientific
and business applications.
PSO3. To adapt to emerging information and communication technologies (ICT) to innovate

ideas and solutions to existing/novel problems.

3
INTRUCTIONS TO THE STUDENTS

1. Come with uniform and shoes to all lab classes.

2. Boys should tuck-in their shirts and girls should wear overcoat.

3. Remove footwear when getting into computer lab.

4. Come for the practical classes in time.

5. Go through the lab manual and come prepared for doing the experiments.

6. Start doing the experiments only after getting the permission from the respective faculties.

7. Handle instruments with care.

8. Report immediately to the staff in charge, if there is any damage to the equipments /machines

/accessories.

9. Use sharp HB pencils for drawing figures, tabulations and graphs.

10. Draw the figures, circuits diagram and tables on the left side of the record note book.

11. Show the model calculations if any, on the left side of the record note book.

12. Write aim, theory, procedures and answers to the questions on the right of the note book.

13. Get the observation note book corrected within two days and submit the completed records when come

to the laboratory.

14. Keep the observation, record note books neat and tidy.

4
CONTENTS

S. PAGE MARKS
DATE NAME OF EXPERIMENT REMARKS
NO. NO. AWARDED

5
EC 8561 – COMMUNICATION SYSTEMS LABORATORY

LIST OF EXPERIMENTS

CYCLE I

1. Design of Amplitude modulation and Demodulation circuits.

2. Design Frequency Modulation and Demodulation circuits.

3. To construct a circuit to test the Time Division Multiplexing of two signals.

4. To generate Delta modulated wave using LM 741.

5. Sampling and reconstruction process of an analog signal.

6. Study about the Line coding & decoding.

CYCLE II

1. Study about the generation of Pulse Code modulated signal.

2. Simulation of ASK, PSK, and FSK using MATLAB.

3. Simulation of signal constellations of BPSK, QPSK and QAM

4. Simulation of QPSK and DPSK using MATLAB.

5. Simulation of Linear Block error control coding scheme using MATLAB.

6. Communication link simulation.

AUGMENTED EXPERIMENTS

1. Equalization – Zero Forcing & LMS algorithms.

2. Simulation of Linear Delta Modulation.

6
OBJECTIVES:

The student should be made to:

To visualize the effects of sampling and TDM

To Implement AM & FM modulation and demodulation

To implement PCM & DM

To implement FSK, PSK and DPSK schemes

To implement Equalization algorithms

To implement Error control coding schemes

OUTCOMES:

At the end of the course, the student should be able to:

CO NO. Course outcomes

C308.01 Simulate & validate the various functional modules of a communication system.

C308.02 Demonstrate their knowledge in base band signalling schemes through implementation of digital
modulations schemes.

C308.03 Apply various channel coding schemes & demonstrate their capabilities towards the improvement of the
noise performance of communication system

C308.04 Simulate end-to-end Communication Link

C308.05 To implement Equalization algorithms

CO PO, PSO Mappings. PSO1

PSO2

PSO3
PO10

PO11

PO12
PO1

PO2

PO3

PO4

PO5

PO6

PO7

PO8

PO9

C308.1 2 3 2 2 2 2 - - - - 3 2 3 3 2

C308.2 2 3 2 3 2 2 - - - - 2 3 3 3 2

C308.3 3 2 3 2 3 2 - - - - 2 2 2 2 3

C308.4 3 2 3 2 3 2 - - - - 2 2 2 2 3

C308.5 3 3 2 2 3 3 - - - - 3 2 3 3 2

C308 3 3 2 2 3 2 - - - - 2 2 3 3 2

7
AMPLITUDE MODULATION

AMPLITUDE DEMODULATION

8
EXPT NO : GENERATION OF AMPLITUTDE MODULATED WAVEFORM

DATE :

AIM:

Design and conduct a suitable experiment to generate an AM wave and demodulate it.

APPARATUS REQUIRED:

S.No Name of the Apparatus Range Qty

01 Transistor BC107 1

02 Resistors 1.2K,2.2K,4.7K,15K 3,1,1,1

03 Capacitors 10uF, 0.01uF, 0.1uF 1,2,1

04 Diode 1N4007 1

05 Power Supply 0-30v 1

06 CRO 25 MHz 1

07 Signal generator 3 MHz 2

08 Connecting Wires - Few

09 Bread board 1

THEORY:

AMPLITUDE MODULATION

Modulation is defined as the process by which some characteristics of a carrier signal isvaried in
accordance with a modulating signal. The base band signal is referred to as the modulating signal and the output
of the modulation process is called as the modulation signal.

Amplitude modulation is defined as the process in which is the amplitude of the carrier wave is varied
about a means values linearly with the base band signal. The envelope of the modulating wave has the same
shape as the base band signal provided the following two requirements are satisfied

1. The carrier frequency fc must be much greater then the highest frequency components fm of the message
signal m (t) i.e. fc >> fm

2. The modulation index must be less than unity. if the modulation index is greater than unity, the carrier wave
becomes over modulated.

DESIGN:

Assume c= 0.02uF, fc = 10KHz, fm = 1KHz

Fc = 1 / 2  √ LC

9
Therefore L = 5mH

PROCEDURE FOR AM GENERATION:

1. The circuit connection is made as shown in the circuit.

2. The power supply is connected to the collector of the Transistor.

3. Set the carrier frequency and message signal frequency are 10KHZ and 1KHz respectively.

4. Modulated Output is taken from the collector of the Transistor.

5. By varying the message signal frequency observe the Emax and Emin from the output waveform and
calculate the modulation index.

PROCEDURE FOR AM DEMODULATION:

1. The circuit connections are made as shown in the circuit diagram.

2. The amplitude modulated signal from AM generator is give as input to the circuit.

3. The demodulated output is observed on the CRO.

4. The various values of modulating voltage signal frequency corresponding demodulated voltage and frequency
are noted and the readings are tabulated.

MODEL GRAPH

Message Signal

Carrier Signal

AM Signal

Demodulated Signal

10
TABULATION

Modulation

Sl.no Message signal Carrier signal Modulated signal Emax Emin Modulation
index =(Emax -
Volts Volts
Emin ) /(Emax +
Emin )

Time amplitude Time Amplitude Time Amplitude

Demodulation

Sl.no Demodulated Signal

Time Amplitude

VIVA QUESTIONS:

1. Based upon your general knowledge of AM and FM broadcasting by listening to the radio

name the frequency occupied by AM and FM broadcast stations?

2. What will happen, if modulation index is greater than 100%?

3. Audio signals are not transmitted by electromagnetic waves. Justify the statement.

4. An amplitude modulated amplifier has a radio frequency output of 50w at 100% modulation.

The internal loss in the modulator is low. What output power is required from the modulator?

5. In what stage modulation is done in high – power A.M transmissions?

RESULT

Thus the amplitude modulation and demodulation were performed and the modulation index was
calculated.

Modulation index =

11
FM MODULATION

MODEL GRAPH

Carrier Signal

Message Signal

FM Signal

TABULATION

Amplitude(v) Time(s)
Message Signal

Carrier Signal

FM Signal

12
EXPT NO : GENERATION OF FREQUENCY MODULATED WAVEFORM

DATE :

AIM:

Design and conduct a suitable experiment to generate an FM wave.

APPARATUS REQUIRED:

S.No Name of the Apparatus Range Qty

01 IC IC 8038 1

02 Resistors 39k 2

03 Capacitors 0.1uF,10pF 1,1

04 Power Supply 0-30v 1

05 CRO 25 MHz 1

06 Signal generator 3 MHz 1

07 Connecting Wires - Few

08 Bread board 1

THEORY:

FREQUENCY MODULATION

The frequency of the message signal is changed accordance with carrier signal. The advantages of
frequency modulation are that if any transmission is affected by electrical noise and this noise is super imposed
with the transmitted signal. The bandwidth of the FM signal is very wide compared with AM.

FM is commonly used at VHF radio frequencies for high-fidelity broadcasts of music and speech. Normal
(analog) TV sound is also broadcast using FM. A narrowband form is used for voice communications in
commercial and amateur radio settings. The type of FM used in broadcast is generally called wide-FM, or W-
FM. In two-way radio, narrowband narrow-fm (N-FM) is used to conserve bandwidth. In addition, it is used to
send signals into space.FM is also used at intermediate frequencies by most analog VCR systems, including
VHS, to record the luminance (black and white) portion of the video signal. FM is the only feasible method of
recording video to and retrieving video from magnetic tape without extreme distortion, as video signals have a
very large range of frequency components — from a few hertz to several megahertz, too wide for equalizers to
work with due to electronic noise below -60 dB.

IC 8038 is voltage controlled oscillator. In this circuit, modulating input signal is applied at pin no.8.
The FM output is obtained at pin no.2. When modulating signal is not applied, only carrier signal is available at
the output. The instantaneous change in the voltage applied at pin no. 8 changes the output frequency at pin no.
2 accordingly. Thus FM output is available when modulating signal input is applied at pin no.8.

13
PROCEDURE

1. Connections are made as per the circuit diagram.

2. Measure the frequency and amplitude of IC 8038 at pin no. 2 without application of control

voltage (i.e. center frequency fc).

3. Apply modulating signal with particular frequency and amplitude to pin no.8 as control voltage

using signal generator.

4. Observe the FM output waveform on CRO.

5. Vary the modulating signal amplitude to observe effect on FM output without changing the

modulating signal frequency.

6) Draw the waveforms of modulating signal, carrier signal and FM output on graph paper.

VIVA QUESTIONS

1. What will be the changes in the wave under FM when the amplitude or frequency of the

modulating signal is increased?

2. The FM station have less noise while receiving the signal. Justify your answer.

3. What happens when a stronger signal and a weaker signal both overlap at the same

frequency in FM?

4. Name two applications of two-way mobile radio?

5. Which mathematical expression is used to decide the side band amplitudes in a FM signal?

RESULT

Thus the FM circuit using IC8038 was performed.

14
TIME DIVISON MULTIPLEXING

MODEL GRAPH

Input Signal

TDM Output

TABULATION

Amplitude(v) Time Period(s)


Sine Wave
Square Wave
TDM Output

15
EXPT NO : CONSTRUCTION AND TESTING OF TIME DIVISION MULTIPLEXING CIRCUIT

DATE :

AIM:

To design, construct and test the Time Division Multiplexing circuit.

APPARATUS REQUIRED:

Sl.NO NAME RANGE QUANTITY

01. IC 555,IC7404 1,1

02 Transistor BC107 2

03 Capacitor 0.1uF,0.01uF 1,1

04 Resistors 1k,10k,4.7k,470Ω 2

05 Signal generator 3MHz 2

06 Power Supply 0-30v 1

07 CRO 25 MHz 1

08 Breadboard 1

09 Connecting Wires Few

THEORY:

Time-Division Multiplexing (TDM) is a type of digital or analog multiplexing in which two or more
signals or bit streams are transferred apparently simultaneously as sub-channels in one communication channel,
but ate physically taking turns ON the channel. It enables the joint use of a common transmission channel by a
plurality of independent message sources without mutual interference. Each input message signal is first
restricted in bandwidth by an LPF to remove the frequencies that are not essential to adequate signal
transmission. .The LPF outputs are, and then applied to a commutator that is usually implemented using
electronic switching circuitry. Following commutator process, the multiplexed signal is applied to a pulse
modulator, the purpose of which is to transform the multiplexed signal into a form that is suitable for
transmission over the communication channel. At the receiver end of the system, the received signal is applied
to pulse demodulator, which performs the inverse operation of the pulse modulator. The narrow samples
produced at the pulse demodulator are distributed to the appropriate low pass filters. By means of a
decommutator, reconstruction filters operates in synchronization with the commutator, since the synchronization
is essential for satisfactory operation of the system.

16
PROCEDURE

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


2. Switch on the DC power supply and adjust the Vcc to the required values.
3. Apply a square wave of 3V, l KHz and a sinusoid of 3 V, 1KHz as input (message signals) to the
emitter of transistor 1 & 2
4. Observe the PAM TDM output signal at the collector of transistor 1&2 using an oscilloscope.
5. Change the amplitude/frequency of the input signals and observe the corresponding changes at the
output.

VIVA QUESTIONS:

1) What is Time Division Multiplexing?


2) What is the difference between TDM and FDM?
3) What is the need of Multiplexing?
4) What are the advantages of TDM?
5) Mention the applications of TDM?
6) Explain how a multiplexer differs from a demultiplexer?
7) What are the different methods of multiplexing?

RESULT:

The phenomenon of time division multiplexing was studied successfully.

17
DELTA MODULATION

PIN Diagram

TABULATION

Amplitude(v) Time Period(s)


Sine Wave(I/P)

Square Wave(Clock)

Comparator Output

Delta Modulated Output

18
EXPT NO: GENERATION OF DELTA MODULATED WAVES

DATE:

AIM:

To generate Delta modulated wave using LM 741 and IC 7473.

APPARATUS REQUIRED:

Sl.No Apparatus Name Range Quantity

01 LM 741 2

02 IC 7473 1

03 Capacitor 0.1µF 1

04 Resistors 10k 3

05 Signal generator 3MHZ 1

06 Power Supply (0-30v) 1

07 CRO 25 MHz 1

08 Connecting Wires Few

THEORY:

In Delta modulation, an incoming message signal is over sampled at a rate much higher than the
nyquist rate to purposely increase the correlation between adjacent samples of the signal. Delta modulation
provides a staircase approximation to the over sampled version of the message signal. The difference between
the input and the approximation is quantized into only two levels namely,   corresponding to positive and
negative differences, respectively. Thus if the approximation falls below the signal, it is increased by. If the
approximation lies above the signal, it is diminished by . In delta modulation, the rate of information
transmission is simply equal to the sampling rate fs=1/TS. Delta modulation is subject to two types of
quantization errors 1) Slope overload distortion 2) Granular distortion.
Optimum step size is required for minimizing the mean square value of these types of quantization
errors.

19
MODEL GRAPH:

Amp (V)
Message Signal

Time(s)

Carrier Signal

Time(s)

Comparator O/P
Amp (V)

Time(s)

Delta Modulated Output

Time(s)

PROCEDURE:

1. Connections are made as per the circuit diagram.


2. The message signal is applied.
3. The amplitude and frequency of the modulated waves, message signal and carrier signal are noted.
4. Disconnect the circuit.

20
VIVA QUESTIONS:
1) What is meant by Delta Modulation?
2) Define slope over load distortion?
3) What is Granular noise?
4) What is a Quantization error?
5) What are the types of Delta modulation?
6) What is meant by Adaptive Delta modulation?
7) Define step size.
8) Why the step size is chosen to be /2 rather than ?

RESULT:

Thus, a Delta Modulated wave was generated and the corresponding graph was plotted.

21
SAMPLING

RECONSTRUCTION

22
EXPT NO : STUDY THE SAMPLING AND RECONSTRUCTION PROCESSES

DATE :

AIM:

To study about the sampling and reconstruction process of an analog signal.

APPARATUS REQUIRED:

S.No Name of the Apparatus Range Qty

01. Transistor BC 107 1

10kΩ,
02 Resistors 2,1,1
1kΩ.2.2k

03 Capacitors 0.1uF 3

04 Resistors 4.7k 3

05 Power Supply 0-30v 1

06 CRO 25 MHz 1

07 Signal generator 3 MHz 2

08 Connecting Wires - Few

09 Bread board 1

THEORY:

The analog signal can be converted to a discrete time signal by a process called sampling. The
sampling theorem for a band limited signal of finite energy can be stated as,

‘’A band limited signal of finite energy, which has no frequency component higher than W Hz is
completely described by specifying the values of the signal at instants of time separated by 1/2W seconds.’’ It
can be recovered from knowledge of samples taken at the rate of 2W per second

PROCEDURE:

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

2. Switch on the power supply.

3. Apply the sinusoidal signal of approximately 2V (p-p) at 60Hz frequency and pulse signal

of 3V (p-p) with frequency 600Hz and note the sampled signal output.

23
5. Connect the sampling circuit output to the reconstruction circuit and note down the reconstructed
output waveform using CRO.

MODEL GRAPH:

Reconstructed Message

TABULATION:

Amplitude(v) Time Period(s)


Message Signal(Sine)

Carrier Signal(Square)

Sampled Output

Reconstructed Signal

24
VIVA QUESTIONS
1. What is meant by Sampling?

2. Define sampling theorem for Band pass signals.

3. What is a Sample and Hold circuit?

4. Mention the applications of Sample and Hold circuit?

5. Define the term “Hold period”.

6. State the advantages of Sample and Hold circuit.

RESULT:

Thus analog signal was sampled and reconstructed back with the help of sampling and reconstruction
circuit.

25
LINE CODING BLOCK DIAGRAM

MODEL GRAPH

26
EXPT NO : LINE CODING AND DECODING TECHNIQUES

DATE :

AIM:

To study of data coding and decoding techniques for

a) Non-return to zero – Level (NRZ-L)


b) Non-return to zero – Mark (NRZ-M)
c) Non-return to zero – Space(NRZ-S)
d) Return to zero(RZ)
e) Manchester code
APPARATUS REQUIRED:

S.No Name of the Apparatus Range Qty

01. Data conditioning and carrier modulation - 1


transmitter kit.

02 CRO 25 MHz 1

03 Connecting wires and Patch Cords Few

THEORY:

Non-return to zero signals are the easiest formats that can be generated. These signals do not return to
zero with the clock. The frequency components associated with these signals are half that of the clock
frequency. The following data formats come under this category. Non-return to zero encoding is commonly used
in slow speed communications interfaces for both synchronous and asynchronous transmission. Using NRZ,
logic 1 bit is sent as a high value and logic 0 bit is sent as a low value.

a) Non-return to zero – Level (NRZ-L):

This is the most extensively used logic in digital logics. The data format is very simple where all ones are
represented by high and all zeroes are represented by lows. The data format is directly got at the output of all
digital data generation logics and hence very easy to generate. Here all the transitions take place at the rising
edge of the clock.

b) Non-return to zero – Mark (NRZ-M):

These waveforms are extensively used in magnetic tape recording. In this data format all ones are
marked by change in levels and all zeroes by no transitions and the transitions take place at the rising edge of the
clock.

27
c) Non-return to zero – Mark (NRZ-S):

This type of waveform is marked by change in levels for zero and no transition for one and the
transitions take place at the rising edge of the clock. These waveforms are extensively used in magnetic tape
recording.

d) Unipolar and Bipolar:

Unipolar signals are those signals, which have transition between 0V to +Vcc voltage. Bipolar signals
are those signals, which have transition between +Vcc to –Vcc.

PROCEDURE:

a. Connect the power supply in proper polarity to the kit and switch on.
b. Connect 8 bit data input to the data encoding encoder input by the means of patch chords provided.
c. Observe the coded data at NRZ pin, RZ pin and Manchester pin using CRO.
d. Observe the output for different binary data’s.

VIVA QUESTIONS:

1) What is encoding?
2) What is decoding?
3) State the advantages of coding.
4) Name some coding techniques.
5) Draw a typical diagram of a communication system showing coding and decoding techniques.

RESULT:

Thus the data coding and decoding techniques for Non-return to zero formats were studied.

28
EXPT NO : PULSE CODE MODULATION

DATE :

AIM:

To Study about the pulse code modulation and de modulation signals.

APPARATUS REQUIRED:

1. PCM trainer kit

2. Dual Trace Oscilloscope.

THEORY:

Pulse Code Modulation is known as digital pulse modulation technique. In fact, the pulse code
modulation technique that the message signals is subjected to a great number of operations. It consists of 3 main
parts i.e., transmitter, transmission path and receiver. The essential operations in the transmitter of a PCM
system are sampling, quantizing and encoding. Sampling is the operation in which an analog signal is sampled
according to the sampling theorem resulting in a discrete time signal. The quantizing and encoding operations
are usually performed in the same circuit which is known as an ADC. Also, the essential operations in the
receiver are regeneration of impaired signals, decoding and demodulation of the train of quantized samples.
These operations are usually performed in the same circuit which is known as digital to analog converter.
Further at intermediate points along the transmission route from the transmitter to the receiver, regenerative
repeaters are used to reconstruct the transmitted sequence of coded pulses in order to combat the accumulated
effects of signal distortion and noise. The quantization refers to the use of a finite set of amplitude levels and the
selection of a level nearest to a particular sample value of the message signal as the representation the system at
transmission in which sampled and quantized values of an analog signal are transmitted via a sequence of code
words is called Pulse Code Modulation. Two most commonly used versions are the differential pulse code
modulation and delta modulation.

The PCM communication system is shown in Fig1. In the circuit is often called an analog to digital
converter. The functional block that performs the task of accepting binary digits and generating appropriate
sequences of levels is called a digital to analog converter. The bandwidth of PCM will be much greater than that
of the message. PCM is used to convert analog signals to binary form. Low pass filter may be used to reduce the
quantization noise and it yields the original message signal.

Recovery of the transmitter information does not depend on the height, width (or) energy content of
the individual pulses but only on their presence or absence. Thus noise immunity of a PCM signal is much more
than any analog pulse modulation signal.

29
CIRCUIT DIAGRAM:

Fig: 1 Pulse Code Modulation and Demodulation Circuit

MODEL GRAPH:

a) Modulating signal: b) PCM Output:

c) D/A Output: d)Demodulated Output:

30
PROCEDURE:

1. Make the connections as per the diagram as shown in the Fig.1.and switch on the power supply of the trainer
kit.

2. Clock generator generates a 20 KHz clock. This can be given as input to the timing and control circuit and
observe the sampling frequency fs= 2 KHz approximately at the output of timing and control circuit.

3. Apply the signal generator output of 6V(p-p) approximately to the A to D converter input and note down the
binary word from LED’s i.e. LED “ON” represents ‘1’ & “OFF” represents ‘0’

4. Feed the PCM waveform to the demodulator circuit and observe the waveform at the output of D/A which is
quantized level.

Tabular Column

Sl.No Name of the signal Amplitude in V Time in Sec


1. Modulating Signal
2. PCM Signal
3. D/A Output
4. Demodulated LPF-ed Output

VIVA QUESTIONS:

1. What is the need of parallel to serial converter?


2. What is the use of companding?
3. What are the applications of PCM?

RESULT

Thus we study about the generation of PCM waves.

31
EXPT NO: DIGITAL MODULATION – ASK USING MATLAB

DATE :

AIM:

To plot the wave form for Binary Amplitude Shift Keying (BASK) signal using MATLAB for a stream of bits.

THEORY:-

Amplitude Shift Keying (ASK) is the digital modulation technique. In amplitude shift keying, the amplitude of
the carrier signal is varied to create signal elements. Both frequency and phase remain constant while the
amplitude changes. In ASK, the amplitude of the carrier assumes one of the two amplitudes dependent on the
logic states of the input bit stream.

Amplitude shift keying (ASK) in the context of digital signal communications is a modulation process, which
imparts to a sinusoid two or more discrete amplitude levels. These are related to the number of levels adopted by
the digital message. For a binary message sequence there are two levels, one of which is typically zero. Thus the
modulated waveform consists of bursts of a sinusoid. Figure 1 illustrates a binary ASK signal (lower), together
with the binary sequence which initiated it (upper). Neither signal has been band limited.

Fig: an ASK signal (below) and the message (above)

There are sharp discontinuities shown at the transition points. These result in the signal having an unnecessarily
wide bandwidth. Band limiting is generally introduced before transmission, in which case these discontinuities
would be ‘rounded off’. The band limiting may be applied to the digital message, or the modulated signal itself.
The data rate is often made a sub-multiple of the carrier frequency. This has been done in the waveform of Fig.

PROCEDURE

1. Open the MATLAB® software by double clicking its icon.

2. Go to the File Menu and select a New M- file. (File _New_M-file).

3. Now start typing your program. After completing, save the M- file with appropriate

name. To execute the program Press F5 or go to Debug Menu and select Run.

4. 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.

5. Rectify the error if any and go to Debug Menu and select Run.

32
PROGRAM:

clc;
clear all;
close all;
n=input('Enter the input bits');
y=length(n);
freq=input('Enter the carrier frequency');
for i=1:y
if n(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
end
figure(1);
plot(y);
xlabel('Time in Seconds');
ylabel('Amplitude in Volts');
title('Amplitude Shift Keying');
grid on;
MODEL GRAPH:

Sample Input:

Enter the input bits: [1 0 0 1]

Enter the carrier Frequency: 10

Amplitude Shift Keying


1

0.8

0.6

0.4
Amplitude in Volts

0.2

-0.2

-0.4

-0.6

-0.8

-1
0 50 100 150 200 250 300 350 400
Time in Seconds

RESULT:

Thus the MATLAB program for generating the ASK modulated signal was written, executed and
verified.

33
EXPT NO : DIGITAL MODULATION – FSK USING MATLAB

DATE :

AIM:

Write the MATLAB program to generate FSK modulated signal.

THEORY:

FSK modulation assigns different frequencies to each information signal status. On the receiving side it is
passed through a circuit that determines differences in the frequency of the received signal and obtains the
original information signal. FSK uses a modulator to shift the frequency of the carrier wave proportionally to the
level of the digital signal, which is the information signal. However, a digital signal has only two statuses, 0 and
1, and so a high frequency F1 is assigned to signal 1 and a low frequency F0 is assigned to signal 0 in relation to
the center frequency Fc of the carrier wave.

PROCEDURE

1. Open the MATLAB® software by double clicking its icon.

2. Go to the File Menu and select a New M- file. (File _New_M-file).

3. Now start typing your program. After completing, save the M- file with appropriate

name. To execute the program Press F5 or go to Debug Menu and select Run.

4. 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.

5. Rectify the error if any and go to Debug Menu and select Run.

PROGRAM:

clc;
clear all;
close all;
n=input('Enter the input bits');
y=length(n);
freq1=input('Enter the first carrier frequency');
freq2=input('Enter the second carrier frequency');
for i=1:y
if n(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
end
figure(1);
plot(y);

34
xlabel('Time in Seconds');
ylabel('Amplitude in Volts');
title('Frequency Shift Keying');
grid on;

MODEL GRAPH:

Sample Input :

Enter the input bits [1 0 0 1]

Enter the first carrier frequency 10

Enter the second carrier frequency 100

Frequency Shift Keying


1

0.8

0.6

0.4
Amplitude in Volts

0.2

-0.2

-0.4

-0.6

-0.8

-1
0 50 100 150 200 250 300 350 400
Time in Seconds

RESULT:

Thus the MATLAB program for generating the FSK modulated signal was written, executed and
verified.

35
EXPT NO : DIGITAL MODULATION – BPSK USING MATLAB

DATE :

AIM:

Write the MATLAB program to generate BPSK modulated signal.

THEORY:

With digital phase modulation, the phase of the carrier wave is modified by being assigned appropriately to one
bit of the information bits. Types of digital phase modulation include BPSK (Binary Phase Shift Keying), QPSK
(Quadrature Phase Shift Keying), 8PSK, and π/4 Shift QPSK.
BPSK has 1-symbol 1-bit composition, and the level of the 1 and 0 information signal is changed to a 1 or -1
dipolar NRZ signal and the phase of the carrier wave is assigned 0 or π. With BPSK modulation, the level of the
modulating signal (code 0, 1) is changed to a dipolar NRZ signal, and the signal and carrier wave are multiplied
with a mixer. The modulating signal spectrum is shifted directly to the carrier frequency band.BPSK modulation
changes the phase of the carrier wave C(t) proportionally to the information signal.

PROCEDURE

1. Open the MATLAB® software by double clicking its icon.

2. Go to the File Menu and select a New M- file. (File _New_M-file).

3. Now start typing your program. After completing, save the M- file with appropriate

name. To execute the program Press F5 or go to Debug Menu and select Run.

4. 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.

5.Rectify the error if any and go to Debug Menu and select Run.

PROGRAM:

clc;
clear all;
close all;
n=input('Enter the input bits');
y=length(n);
freq=input('Enter the carrier frequency');
for i=1:y
if n(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

36
end
end
figure(1);
plot(y);
xlabel('Time in Seconds');
ylabel('Amplitude in Volts');
title('Binary Phase Shift Keying');
grid on;
MODEL GRAPH:

Sample Input :

Enter the input bits : [1 0 0 1]

Enter the carrier frequency: 10

Phase Shift Keying


1

0.8

0.6

0.4
Amplitude in Volts

0.2

-0.2

-0.4

-0.6

-0.8

-1
0 50 100 150 200 250 300 350 400
Time in Seconds

RESULT:

Thus the MATLAB program for generating the BPSK modulated signal was written, executed and
verified.

37
EXPT NO : DIGITAL MODULATION – QPSK USING MATLAB

DATE :

AIM:

Write the MATLAB program to generate QPSK modulated signal.

THEORY:

With digital phase modulation, the phase of the carrier wave is modified by being assigned appropriately to one
bit of the information bits. Types of digital phase modulation include BPSK (Binary Phase Shift Keying), QPSK
(Quadrature Phase Shift Keying), 8PSK, and π/4 Shift QPSK.

QPSK has 1-symbol 2-bit composition, and 2 bits and 4 statuses are assigned to the carrier wave phases π/4,
3π/4, 5π/4, and 7π/4. If this line of thinking is extended, PSK with eight or sixteen values is possible.

The two BPSK signals are then simply added together for transmission and, as they have the same carrier
frequency, they occupy the same portion of the radio frequency spectrum.

PROCEDURE

1. Open the MATLAB® software by double clicking its icon.

2. Go to the File Menu and select a New M- file. (File _New_M-file).

3. Now start typing your program. After completing, save the M- file with appropriate

name. To execute the program Press F5 or go to Debug Menu and select Run.

4. 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.

5.Rectify the error if any and go to Debug Menu and select Run.

PROGRAM:

clc;
clear all;
close all;
n=input('Enter the input bits');
y=length(n);
freq=input('Enter the carrier frequency');
for i=1:y
if n(1,i)==00
for t=(i-1)*100+1:(i*100)
y(t)=sin(2*pi*freq*(t/1000));
end
else if n(1,i)==01
for t=(i-1)*100+1:(i*100)
y(t)=sin(2*pi*freq*(t/1000)+(pi/2));
end

38
else if n(1,i)==10
for t=(i-1)*100+1:(i*100);
y(t)=sin(2*pi*freq*(t/1000)*pi);
end
else if n(1,i)==11
for t=(i-1)*100+1:(i*100);
y(t)=sin(2*pi*freq*(t/1000)+(3*pi)/2);
end
end
end
end
end
end
figure(2);
plot(y);
xlabel('Time in Seconds');
ylabel('Amplitude in Volts');
title('Quadrature Phase Shift Keying')
grid on;

MODEL GRAPH:

Sample input :

Enter the input bits : [11 00 01 10]

Enter the carrier frequency: 10


Quadrature Phase Shift Keying
1

0.8

0.6

0.4
Amplitude in Volts

0.2

-0.2

-0.4

-0.6

-0.8

-1
0 50 100 150 200 250 300 350 400
Time in Seconds

RESULT:

Thus the MATLAB program for generating the QPSK modulated signal was written, executed and
verified.

39
EXPT NO : IMPLEMENTATION OF LINEAR BLOCK CODE USING MATLAB

DATE :

AIM:

Write the MATLAB program to implement the linear block code.

THEORY:

In coding theory, a linear code is an error-correcting code for which any linear combination of codewords is also
a codeword. Linear codes are traditionally partitioned into block codes and convolutional codes. Linear codes
allow for more efficient encoding and decoding algorithms than other codes. Linear codes are used in forward
error correction and are applied in methods for transmitting symbols (e.g., bits) on a communications channel so
that, if errors occur in the communication, some errors can be corrected or detected by the recipient of a
message block. The codewords in a linear block code are blocks of symbols which are encoded using more
symbols than the original value to be sent.

PROCEDURE

1. Open the MATLAB® software by double clicking its icon.

2. Go to the File Menu and select a New M- file. (File _New_M-file).

3. Now start typing your program. After completing, save the M- file with appropriate

name. To execute the program Press F5 or go to Debug Menu and select Run.

4. 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.

5.Rectify the error if any and go to Debug Menu and select Run.

PROGRAM:

clc;
clear all;
% Input Generator Matrix
g=input('Enter The Generator Matrix: ')
disp ('G = ')
disp ('The Order of Linear block Code for given Generator Matrix is:')
[n,k] = size(transpose(g))
for i = 1:2^k
for j = k:-1:1
if rem(i-1,2^(-j+k+1))>=2^(-j+k)
u(i,j)=1;
else
u(i,j)=0;
end
end
end

40
u;
disp('The Possible Codewords are :')
c = rem(u*g,2)
disp('The Minimum Hamming Distance dmin for given Block Code is= ')
d_min = min(sum((c(2:2^k,:))'))

% Code Word
r = input('Enter the Received Code Word:')
p = [g(:,n-k+2:n)];
h = [transpose(p),eye(n-k)];
disp('Hammimg Code')
ht = transpose(h)
disp('Syndrome of a Given Codeword is :')
s = rem(r*ht,2)
for i = 1:1:size(ht)
if(ht(i,1:3)==s)
r(i) = 1-r(i);
break;
end
end
disp('The Error is in bit:')
i
disp('The Corrected Codeword is :')
r

%******************** OUTPUT *******************


Enter The Generator Matrix: [1 0 0 0 1 0 1;0 1 0 0 1 1 1;0 0 1 0 1 1 0;0 0 0 1 0 1 1]
g=
1000101
0100111
0010110
0001011

G=
The Order of Linear block Code for given Generator Matrix is:
n=
7
k=
4

The Possible Codewords are :

c=
0000000
0001011
0010110
0011101
0100111
0101100
0110001
0111010
1000101
1001110

41
1010011
1011000
1100010
1101001
1110100
1111111

The Minimum Hamming Distance dmin for given Block Code is=

d_min =

Enter the Received Code Word:[1 0 0 0 1 0 0]

r=
1000100

Hammimg Code
ht =
101
111
110
011
100
010
001

Syndrome of a Given Codeword is :


s=
001

The Error is in bit:


i=
7

The Corrected Codeword is :


r=
1000101

RESULT:

Thus the MATLAB program for generating the linear block code was written, executed and verified.

42
EXPT NO : SIMULATION OF LINEAR DELTA MODULATION

DATE :

AIM:

To simulate the linear delta modulation using MATLAB.

SOFTWARE USED:

MATLAB

PROGRAM:

clc;
clear all
close all
fs=100;
t=0:1/fs:2;
m=sin(2*pi*t);
plot(m);
hold all;
AM=1;
FM=1;
d=2*pi*FM*AM/fs;
for n=1:length(m);
if n==1;
e(n)=m(n);
eq(n)=d*sign(e(n));
mq(n)=eq(n);
else
e(n)=m(n)-mq(n-1);
eq(n)=d*sign(e(n));
mq(n)=mq(n-1)+eq(n);
end
end
stairs(mq)

MODEL GRAPH:

RESULT:

Thus the MATLAB code for linear delta modulation was written & output is verified.

43
EXPT NO : SIGNAL CONSTELLATION OF BPSK, QPSK & QAM

DATE :

AIM:-

To plot the constellation diagram of digital modulation system BPSK, QPSK & QAM using MATLAB.

THEORY:-

A constellation diagram is a representation of a signal modulated by an arbitrary digital


modulation scheme. It displays the signal as a two dimensional scatter diagram in the complex
plane at symbol sampling instants. It can also be viewed as the possible symbols that may be
selected by a given modulation scheme as points in the complex plane.

PROCEDURE

1. Open the MATLAB® software by double clicking its icon.

2. Go to the File Menu and select a New M- file. (File _New_M-file).

3. Now start typing your program. After completing, save the M- file with appropriate

name. To execute the program Press F5 or go to Debug Menu and select Run.

4. 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.

5.Rectify the error if any and go to Debug Menu and select Run.

PROGRAM:-
BPSK
clc;
clear all;
close all;
M=2;
k=log2(M);
n=3*1e5;
nsamp=8;
X=randint(n,1);
xsym = bi2de(reshape(X,k,length(X)/k).','left-msb');
Y_psk= modulate(modem.pskmod(M),xsym);
Ytx_psk = Y_psk;
EbNo=30;
SNR=EbNo+10*log10(k)-10*log10(nsamp);
Ynoisy_psk = awgn(Ytx_psk,SNR,'measured');
Yrx_psk = Ynoisy_psk;
h1=scatterplot(Yrx_psk(1:nsamp*5e3),nsamp,0,'r.');
hold on;
scatterplot(Yrx_psk(1:5e3),1,0,'k*',h1);
title('constellation diagram BPSK');
legend('Received signal' ,'signal constellation');
axis([-5 5 -5 5]);
hold off;

44
QPSK & QAM:
clc;
clear all;
close all;
M=16;
k=log2(M);
n=3*1e5;
nsamp=8;
X=randint(n,1);
xsym = bi2de(reshape(X,k,length(X)/k).','left-msb');
Y_qam= modulate(modem.qammod(M),xsym);
Y_qpsk= modulate(modem.pskmod(M),xsym);
Ytx_qam = Y_qam;
Ytx_qpsk = Y_qpsk;
EbNo=30;
SNR=EbNo+10*log10(k)-10*log10(nsamp);
Ynoisy_qam = awgn(Ytx_qam,SNR,'measured');
Ynoisy_qpsk = awgn(Ytx_qpsk,SNR,'measured');
Yrx_qam = Ynoisy_qam;
Yrx_qpsk = Ynoisy_qpsk;
h1=scatterplot(Yrx_qam(1:nsamp*5e3),nsamp,0,'r.');
hold on;
scatterplot(Yrx_qam(1:5e3),1,0,'k*',h1);
title('constellation diagram 16 QAM');
legend('Received signal' ,'signal constellation');
axis([-5 5 -5 5]);
hold off;
h2=scatterplot(Yrx_qpsk(1:nsamp*5e3),nsamp,0,'r.');
hold on;
scatterplot(Yrx_qpsk(1:5e3),1,0,'k*',h2);
title('constellation diagram 16 PSK');
legend('Received signal' ,'signal constellation');
axis([-5 5 -5 5]);
hold off;

MODEL GRAPH:-

45
RESULT:

Thus the constellation diagrams of digital modulation system BPSK, QPSK & QAM are
simulated & plotted in MATLAB.

46
EXPT NO : LEASE MEAN SQUARE (LMS) ALGORITHM

DATE :

AIM

To plot the wave forms for LMS Algorithm using MATLAB.

THEORY

Least mean squares (LMS) algorithms are a class of adaptive filter used to mimic a desired filter by finding the
filter coefficients that relate to producing the least mean squares of the error signal (difference between the
desired and the actual signal).
The standard LMS algorithm performs the following operations to update the coefficients of an adaptive filter:
1. Calculates the output signal y(n) from the adaptive filter.
2. Calculates the error signal e(n) by using the following equation: e(n) = d(n)–y(n).
3. Updates the filter coefficients by using the following equation:

where μ is the step size of the adaptive filter, is the filter coefficients vector, and is the filter
input vector.

PROCEDURE

1. Open the MATLAB® software by double clicking its icon.

2. Go to the File Menu and select a New M- file. (File _New_M-file).

3. Now start typing your program. After completing, save the M- file with appropriate

name. To execute the program Press F5 or go to Debug Menu and select Run.

4. 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.

5.Rectify the error if any and go to Debug Menu and select Run.

PROGRAM:-

clc
close all
clear all
N=1000;
t=[0:N-1];
w0=0.001; phi=0.1;
d=sin(2*pi*[1:N]*w0+phi); % desired signal
x=d+randn(1,N)*0.5;% channel output
w=zeros(1,N);
mu=0.02;
for i=1:N
e(i) = d(i) - w(i)' * x(i); %error=desired signal-equalized signal
w(i+1) = w(i) + mu * e(i) * x(i); % tap weight updation using LMS
end
for i=1:N
yd(i) = sum(w(i+1)' * x(i)); % Adaptive Desired output

47
end
subplot(221),plot(t,d),ylabel('Desired Signal'),
subplot(222),plot(t,x),ylabel('Input Signal+Noise'),
subplot(223),plot(t,e),ylabel('Error'),
subplot(224),plot(t,yd),ylabel('Adaptive Desired output');
MODEL GRAPH:

RESULT:

Thus the MATLAB program for LMS Algorithm was written, executed and verified.

48
EXPT NO : SIMULATION OF ZERO FORCING EQUALIZER

DATE :

AIM:

To simulate Zero Forcing Algorithm using Matlab.

THEORY:

Zero Forcing Equalizer refers to a form of linear equalization algorithm used in communication systems which
applies the inverse of the frequency response of the channel. The name Zero Forcing corresponds to bringing
down theintersymbol interference (ISI) to zero in a noise free case. This will be useful when ISI is significant
compared to noise.

PROCEDURE

1. Open the MATLAB® software by double clicking its icon.

2. Go to the File Menu and select a New M- file. (File _New_M-file).

3. Now start typing your program. After completing, save the M- file with appropriate

name. To execute the program Press F5 or go to Debug Menu and select Run.

4. 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.

5.Rectify the error if any and go to Debug Menu and select Run.

PROGRAM:-

clc;clear all;close all;


M=4;
msg=randint(1500,1,M);
modmsg=pskmod(msg,M);
sigconst=pskmod([0:M-1],M);
trainlen=500;
chan=[.986;.845;.237;.123+.31i];
filtmsg=filter(chan,1,modmsg);
eqobj =lineareq(8,lms(0.01),sigconst,1);
[symbolest,yd]=equalize(eqobj,filtmsg,modmsg(1:trainlen));
h=scatterplot(filtmsg,1,trainlen,'bx');hold on;
scatterplot(symbolest,1,trainlen,'r.',h);
scatterplot(sigconst,1,0,'k*',h);
legend('fitered signal','equalized signal','ideal signal constellation');
hold off;
demodmsg_noeq=pskdemod(filtmsg,M);
demodmsg =pskdemod(yd,M);
[nnoeq,rnoeq]=symerr(demodmsg_noeq(trainlen+1:end),msg(trainlen+1:end));
[neq,req] = symerr(demodmsg(trainlen+1:end),msg(trainlen+1:end));
disp('symbol error rate with equalizer:');
disp(req);
disp('symbol error rate without equalizer:');

49
disp(rnoeq)

MODEL GRAPH:

RESULT:

Thus the MATLAB program for Zero Forcing Algorithm was written, executed and verified.

50
EXPT NO : BER SIMULATION OF DPSK MODULATION

DATE :

AIM:

To simulate bit error rate performance of DPSK modulation using Matlab.

THEORY

DPSK involves 2 basic operations at the transmitter, differential encoding of the i/p binary wave and
phase shift keying, hence the name DPSK. To send symbol 0 we phase advance the current signal waveform by
180 degree and to send symbol 1 we leave the phase of the current signal unchanged. It is the non-coherent
version of PSK. It eliminates the need for a coherent reference signal at the receiver by combining two basic
operations at the transmitter:
i) Differential encoding of the input binary wave
ii) ii) Phase shift keying

In effect, to send symbol 0 we phase advance the current signal waveform by 180°, and to send symbol 1 we
leave the phase of the current signal waveform unchanged.

Algorithm

1. Generate the input data randomly


2. Implement differential encoding
3. Do BPSK modulation
4. Add AWGN noise
5. Calculate the no of bits in error
6. Plot the BER graph

PROCEDURE

1. Open the MATLAB® software by double clicking its icon.

2. Go to the File Menu and select a New M- file. (File _New_M-file).

3. Now start typing your program. After completing, save the M- file with appropriate

name. To execute the program Press F5 or go to Debug Menu and select Run.

4. 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.

5.Rectify the error if any and go to Debug Menu and select Run.

PROGRAM

N = 10^4 % number of bits or symbols


rand('state',100); % initializing the rand() function
randn('state',200); % initializing the randn() function
ip = rand(1,N)>0.5; % generating 0,1 with equal probability
ipD = mod(filter(1,[1 -1],ip),2); % %differential encoding y[n]=y[n-1]+x[n]
s = 2*ipD-1; % BPSK modulation 0 -> -1; 1 -> 0
n = 1/sqrt(2)*[randn(1,N) + j*randn(1,N)]; % white gaussian noise, 0dB variance
Eb_N0_dB = [-3:10]; % multiple Eb/N0 values
for ii = 1:length(Eb_N0_dB)
y = s + 10^(-Eb_N0_dB(ii)/20)*n; % additive white gaussian noise
ipDHat_coh = real(y) > 0; % coherent demodulation
ipHat_coh = mod(filter([1 -1],1,ipDHat_coh),2); %differential decoding

51
nErr_dbpsk_coh(ii) = size(find([ip - ipHat_coh]),2); % counting the number of errors
end
simBer_dbpsk_coh = nErr_dbpsk_coh/N;
theoryBer_dbpsk_coh = erfc(sqrt(10.^(Eb_N0_dB/10))).*(1 - .5*erfc(sqrt(10.^(Eb_N0_dB/10))));
close all
figure
semilogy(Eb_N0_dB,theoryBer_dbpsk_coh,'b.-');
hold on
semilogy(Eb_N0_dB,simBer_dbpsk_coh,'mx-');
axis([-2 10 10^-6 0.5])
grid on
legend('theory', 'simulation');
xlabel('Eb/No, dB')
ylabel('Bit Error Rate')
title('Bit error probability curve for coherent demodulation of DBPSK')

MODEL GRAPH :

0
10

-1
10

-2
10

-3
10

-4
10

-5
10

-6
10
-4 -2 0 2 4 6 8 10

RESULT

The Bit Error rate simulation of DPSK modulation was done using Matlab.

52
EXPT NO: COMMUNICATION LINK SIMULATION USING MATLAB

DATE :

AIM:

To plot the wave form for analog and digital communication link using MATLAB.

THEORY

Analog transmission is a transmission method of conveying information using a continuous signal which varies
in amplitude, phase, or some other property in proportion to that information. It could be the transfer of an
analog source signal, using an analog modulation method such as frequency modulation (FM) or amplitude
modulation (AM), or no modulation at all.

Digital communication is a mode of communication where the information or the thought is encoded digitally as
discreet signals and electronically transferred to the recipients. Digital communication is one of the most
commonly used mode of communication in the current scenario. Organizations generally rely on this mode for
all their business communications.

PROGRAM:-

% Simulation of Analog Communication link


clc
clear all
close all

% TRANSMITTER
% Amplitude Modulation
Fc = 20; % carrier frequency of 20 kHz
Fs = 160; % sampling rate of 160 samples per ms
Fm = 0.4; % modulating frequency of 0.4 kHz
t = 0:1/Fs:10; % t of 10 seconds
c = cos(2*pi*Fc*t); % carrier signal
m = cos(2*pi*Fm*t); % modulating signal
s = c + 0.25*cos(2*pi*(Fc+Fm)*t) + 0.25*cos(2*pi*(Fc-Fm)*t); % FCAM 50% mod

%CHANNEL
SNRdb=5;
SNR=10^(SNRdb/10);
vn=var(s)/SNR;
n=sqrt(vn)*rand(1,length(s)); %Additive Noise
s1=s+n;
figure;
subplot(4,1,1);
plot(t, m);
title('Modulating Signal'); xlabel('time (s)'); ylabel('amplitude');
subplot(4,1,2);
plot(t, c);
title('Carrier Signal'); xlabel('time (s)'); ylabel('amplitude');
subplot(4,1,3);
plot(t, s);
title('FCAM Signal'); xlabel('time (s)'); ylabel('amplitude');
subplot(4,1,4);
plot(t, s1);
title('Channel'); xlabel('time (s)'); ylabel('amplitude');

53
%RECEIVER
% Non-Coherent Detection Step 1: Envelope Detection
Vc(1) = 0; % initial capacitor voltage
for i = 2:length(s1)
if s1(i) > Vc(i-1) % diode on (charging)
Vc(i) = s1(i);
else % diode off (discharging)
Vc(i) = Vc(i-1) - 0.023*Vc(i-1);
end
end

% Non-Coherent Detection Step 2: Low Pass RC Filter


h = fir1(100, 0.0125, 'low'); % 1 kHz cut-off frequency
foutputc = filter(h,1,Vc);
figure;
subplot(2,1,1);
plot(t, Vc);
title('Envelope detector output of FCAM signal'); xlabel('time (s)'); ylabel('amplitude');

subplot(2,1,2);
plot(t, foutputc);
title('Non-coherent demodulated FCAM signal'); xlabel('time (s)'); ylabel('amplitude');

% Simulation of Digital Communication link


clc
clear all
close all

% TRANSMITTER
% BPSK Modulation
num_bit=100000; % Signal length
max_run=20;
Eb=1; % Bit Energy
SNRdB=0:1:9;
SNR=10.^(SNRdB/10);

for count=1:length(SNR)
avgError=0;
No=Eb/SNR(count); % Noise power

for run_time=1:max_run
Error=0;

data=randi([0 1],[1,num_bit]); % Binary Data Source


s=2*data-1; % Baseband BPSK modulation

N=sqrt(No/2)*randn(1,num_bit); % AWGN

Y=s+N; % Received Signal

for k=1:num_bit %decision device


if((Y(k)>0 && data(k)==0)||(Y(k)>1 && data(k)==1))
Error=Error+1;
end
end
Error=Error/num_bit;
avgError=avgError+Error;

54
end
BER_sim(count)=avgError/max_run; % BER calculation
end

BER_th=(1/2)*erfc(sqrt(SNR)); % Analytical BER

semilogy(SNRdB,BER_th,'r-+'); % Plot BER


hold on
semilogy(SNRdB,BER_sim,'m-*');
legend('Theortical','Simulation',3);
axis([min(SNRdB) max(SNRdB) 10^(-5) 1]);
hold off
MODEL GRAPH :

Analog Communication link


Transmitter:

Receiver:

55
Digital Communication link

RESULT

Thus Communication link simulation was done using Matlab successfully.

56
Circuit Diagrams

AM Modulation

AM Demodulation

57
FM Modulation

TDM

58
Delta Modulation

Sampling and Reconstruction

Sampling

59

Potrebbero piacerti anche