You are on page 1of 64

VELTECH HIGH TECH Dr. RANGARAJAN Dr.

SAKUNTHALA ENGINEERING COLLEGE


(Owned by Vel Trust 1997) Approved by AICTE , New Delhi & Govt. of Tamil Nadu & Affiliated to Anna University

DEPARTMENT OF ECE

EC 2307

COMMUNICATION SYSTEMS LAB

YEAR/SEM: III/ V

A/Y: 2013-2014

PREPARED BY MR. S. SUDHAKAR MS. VALLIAMMAI

HOD MR. M. MANIMARA BOOPATHY

SYLLABUS
1

EC2307 COMMUNICATION SYSTEMS LAB

LTPC0032

LIST OF EXPERIMENTS
1. Amplitude modulation and Demodulation. 2. Frequency Modulation and Demodulation 3. Pulse Modulation PAM / PWM / PPM 4. Pulse Code Modulation 5. Delta Modulation, Adaptive Delta Modulation. 6. Digital Modulation & Demodulation ASK, PSK, QPSK, FSK (Hardware & MATLAB) 7. Designing, Assembling and Testing of Pre-Emphasis / De-emphasis Circuits. 8. PLL and Frequency Synthesizer 9. Line Coding 10. Error Control Coding using MATLAB. 11. Sampling & Time Division Multiplexing. 12. Frequency Division Multiplexing

LAB MANUAL

DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING


2

COMMUNICATION SYSTEM LAB MANUAL EC2307 BRANCH : ECE LIST OF EXPERIMENTS


1. Amplitude modulation and Demodulation. 2. Frequency Modulation and Demodulation 3. Pulse Amplitude Modulation 4. Pulse Width Modulation 5. Pulse Position Modulation 6. Pulse Code Modulation 7. Delta Modulation 8. Adaptive Delta Modulation. 9. Digital Modulation & Demodulation ASK, PSK, QPSK, FSK (Hardware & MATLAB) 10. Designing, Assembling and Testing of Pre-Emphasis / De-emphasis Circuits. 11. PLL and Frequency Synthesizer 12. Line Coding 13. Sampling & Time Division Multiplexing. -35 -38 -41 -44 -28 - 03 - 07 -10 -13 -16 -19 -22 -25

SEM: V

MAT LAB PROGRAM


1. Amplitude Shift Keying 2. Frequency Shift Keying 3. Phase Shift Keying 4. Quadrature Phase Shift Keying 5. Error Control Coding -51 -53 -55 -57 -62

1. AMPLITUDE MODULATION AND DEMODULATION

AIM: To construct an amplitude modulation and demodulation and to study the output waveform of an amplitude modulation and demodulation. APPARATUS REQUIRED: 1. Amplitude modulation and demodulation Kit 2.Patch chords 3.CRO 4.CRO probe 5.Power supply THEORY: Amplitude Modulation:

Amplitude Modulation is defined as a process in which the amplitude of the carrier wave c(t) is varied linearly with the instantaneous amplitude of the message signal m(t).The standard form of an amplitude modulated (AM) wave is defined by

Where a K is a constant called the amplitude sensitivity of the modulator. The Modulation Index is defined as,

Where Emax and Emin are the maximum and minimum amplitudes of the modulated wave. Amplitude Demodulation: The process of detection provides a means of recovering the message Signal from modulating signal. Demodulation is the reverse process of modulation. The detector circuit is employed to separate the carrier wave and eliminate the side bands. Since the envelope of an AM wave has the same shape as the message, independent of the carrier frequency and phase, demodulation can be accomplished by extracting envelope.

PROCEDURE:

1) Study the circuit provided on the front panel kit.


4

2) Apply the sinewave of 10Hz 3)Apply the carrier wave of 10KHz 4)Connect CRO at the O/P i.e. pin no.12. 5) Switch ON the power supply. 6)Observe the PSK O/P on the CRO. 7)Draw the observed AM and demodulated waveform on the graph paper

CIRCUIT DIAGRAM:

AMPLITUDE MODULATION:

AMPLITUDE DEMODULATION:

MODEL GRAPH: AMPLITUDE MODULATION:

AMPLITUDE DEMODULATION: 6

TABULATION:

SIGNAL

AMPLITUDE

TIME PERIOD

RESULT:

Thus the amplitude modulation and demodulation has been verified.


2.FREQUENCY MODULATION AND DEMODULATION

AIM:

To generate frequency modulated signal and determine the modulation index and bandwidth for various values of amplitude and frequency of modulating signal. To demodulate a Frequency Modulated signal using FM detector.
APPARATUS REQUIRED: 1) Frequency modulation and demodulation Kit 2) Patch chords 3) CRO 4) CRO probe 5) Power supply THEORY:

The process, in which the frequency of the carrier is varied in accordance with the instantaneous amplitude of the modulating signal, is called Frequency Modulation. The FM signal is expressed as s(t) A ( f ( f t)) c c m = cos 2p + b sin 2p Where C A is amplitude of the carrier signal, C f is the carrier frequency b is the modulation index of the FM wave PROCEDURE: 1) Study the circuit diagram provided in the manual. 2) Study the pin configuration of IC-XR8038. 3) Adjust the function generator to obtain the sine wave form of frequency 1KHz 4) Apply the sine wave modulating signal to the circuit 5) Adjust the amplitude & frequency of modulating signal to get the frequency modulated output. 6) From the carrier sidebands chart find the highest order sideband corresponding to obtained modulation index. 7) Change the amplitude of modulating signal & repeat step 5 &6. 8) Draw the waveform on graph paper.

CIRCUIT DIAGRAM: Frequency Modulation:

Frequency Demodulation:

OUTPUT WAVEFORM:

TABULATION: SIGNAL AMPLITUDE TIME PERIOD

RESULT: Thus the frequency modulation and demodulation output has been verified. 3.PULSE AMPLITUDE MODULATION AIM:
10

To construct the circuit of Pulse Amplitude Modulation on bread board & observe the waveform. APPARATUS REQUIRED:
1. Pulse Amplitude modulation Kit 2.Patch chords 3.CRO 4.CRO probe 5.Power supply

THEORY: In pulse modulation some characteristics of pulse (carrier) is change in accordance with the sample of the modulating signal .Such type of modulation is called as Pulse Modulation. It is applied in many types .But some of common types are Pulse Amplitude modulation (PAM) ,Pulse width modulation (PWM),and Pulse position modulation (PPM).If the characteristics of pulse such as amplitude ,duration(width), position is change in accordance with the modulating signal than it is called as PAM,PDM or PWM and PPM respectively. Pulse Amplitude Modulation the amplitude of the pulse is varied in accordance with the modulating signal then it is called as pulse Amplitude modulation .Its waveform is shown in fig 1.PAM gives dual polarity (AC type) PAM output called as natural PAM sampling .But If DC level is introduced to the modulating signal then it results single polarity PAM. PROCEDURE: 1) Study the circuit provided in the kit.switch on power supply. 2) Apply a sinewave modulating singal around 5-Vpp 70Hz. 3) Connect dual CRO for its input and output side. 4) Adjust amplitude & frequency of input. 5) Observe the PAM O/P on the CRO. 6) Draw the observed waveform on the graph paper.

CIRCUIT DIAGRAM: Pulse Amplitude Modulated Circuit:


11

Pulse Amplitude Demodulated Circuit:

MODEL GRAPH:

12

TABULATION: SIGNAL AMPLITUDE TIME PERIOD

RESULT: Thus the Pulse Amplitude Modulation output has been verified. 4.PULSE WIDTH MODULATION
13

AIM: To construct the circuit of Pulse Width Modulation on bread board & observe the waveform. APPARATUS REQUIRED:
1. Pulse width modulation Kit 2. Patch chords 3. CRO 4 .CRO probe 5. Power supply

THEORY: In PWM, the width of the pulses of the carrier pulse train is varied in accordance with the modulating signal. The pulse width demodulator circuit can be formed by using transistorized circuit with OP-AMP low pass filter. A PWM i/p signal is applied to the base of Q1 and demodulated o/p is obtained from OPAMP o/p. The transistor Q1 works as a inverter. Hence during the time interval when the PWM is high, the input to the transistor Q2 is low. Therefore, during this time interval the transistor Q2 is cut-off and the capacitor C1 gets charged through resistor R4. During the time interval when the PWM i/p is low the input to the transistor Q2 is high and it gets saturated. The capacitor C1then discharges very rapidly through Q2. The collector voltage of Q2 during this interval is then low. Thus the waveform at the collector of Q2 is more or less a saw- tooth waveform whose envelope is same as the modulating signal. This signal is then passes through OP-AMP low pass filter to smooth the shape of envelope and finally it gives o/p whose envelope is nearly equals to the modulating i/p signal. PROCEDURE: 1) Study the circuit provided in the kit.switch on power supply. 2) Apply a sinewave modulating singal around 5-Vpp 70Hz. 3) Connect dual CRO for its input and output side. 4) Adjust amplitude & frequency of input. 5) Observe the PWM O/P on the CRO. 6) Draw the observed waveform on the graph paper. CIRCUIT DIAGRAM: Pulse Width Modulated Circuit:
14

Pulse Width Demodulated Circuit:

MODEL GRAPH:

15

TABULATION: SIGNAL AMPLITUDE TIME PERIOD

RESULT: Thus the Pulse Width Modulation output has been verified. 5. PULSE POSITION MODULATION
16

AIM: To construct the circuit of Pulse Position Modulation on bread board & observe the waveform. APPARATUS REQUIRED:
1.Pulse Position Modulation kit 2.Patch chords 3.CRO 4.CRO probe 5.Power supply

THEORY: Pulse Position Modulation (PPM) is the type of pulse modulation in which the amplitude and width of the pulse is kept constant but the position of each pulse in relation to the position of a recurrent reference pulse is varied by each instantaneous sampled value of the modulating wave. PPM has the advantage over PWM of requiring constant transmitter power output but has the disadvantage of dependence on transmitter receiver synchronization. PPM may be obtained from PWM. In PWM each pulse has a leading edge and a trailing edge but the location of the leading edges are fixed whereas those of trailing edges are not but are dependent on the pulse width, which in turn is dependent on the signal value at that instant. Thus, we may state that the trailing edges of PWM pulses are position modulated. Thus PPM may be obtained from PWM by simply getting ride of the leading edges and flat tops of PWM pulses. PROCEDURE: 1) Study the circuit provided in the kit.switch on power supply. 2) Apply a sinewave modulating singal around 5-Vpp 70Hz. 3) Connect dual CRO for its input and output side. 4) Adjust amplitude & frequency of input. 5) Observe the PPM O/P on the CRO. 6) Draw the observed waveform on the graph paper.

CIRCUIT DIAGRAM: Pulse Position Modulated Circuit:


17

Pulse Position Demodulated Circuit:

MODEL GRAPH:

18

TABULATION: SIGNAL AMPLITUDE TIME PERIOD

RESULT: Thus the Pulse Position Modulation output has been verified. 6.PULSE CODE MODULATION AIM:
19

To construct the pulse code modulation circuit and to study its characteristic output waveform. APPARATUS REQUIRED: 1) Pulse code modulation Trainer kit 2) Connecting chords 3) Function Generator 4) 20 MHz Dual trace Oscilloscope 5) CRO 6) CRO probe THEORY:
Pulse-code modulation (PCM) is a method used to digitally represent sampled analog signals, A PCM stream is a digital representation of an analog signal, in which the magnitude of the analogue signal is sampled regularly at uniform intervals, with each sample being quantized to the nearest value within a range of digital steps.

PROCEDURE: 1) Study the circuit provided in the kit.switch on power supply. 2) Apply a sinewave modulating singal around 5-Vpp 70Hz. 3) Connect dual CRO for its input and output side. 4) Adjust amplitude & frequency of input. 5) Observe the PCM O/P on the CRO. 6) Draw the observed waveform on the graph paper. CIRCUIT DIAGRAM:

20

MODEL GRAPH:

TABULATION: SIGNAL AMPLITUDE TIME PERIOD

RESULT: Thus the Pulse Width Modulation output has been verified. 7. DELTA MODULATION

21

AIM: To construct delta modulation and adaptive delta modulation circuit and study the output waveform. APPRATUS REQUIRED: 1) Delta modulation Trainer kit 2) Connecting chords 3) Function Generator 4) 20 MHz Dual trace Oscilloscope 5) CRO 6) CRO probe

THEORY: Delta modulation is generally a 1 bit DPCM, where no extra encoding effort is needed. In Delta modulation the correlation between adjacent sample increase and as a result the prediction error decreases. If this prediction error is small enough it can be encoded by only one bit. PROCEDURE: 1) Study the circuit provided in the kit. switch on power supply. 2) Apply a sinewave modulating singal around 5-Vpp 70Hz. 3) Connect dual CRO for its input and output side. 4) Adjust amplitude & frequency of input. 5) Observe the DM O/P on the CRO. 6) Draw the observed waveform on the graph paper.

CIRCUIT DIAGRAM:

22

MODEL GRAPH:

23

TABULATION: DELTA MODULATION SIGNAL AMPLITUDE TIME PERIOD

RESULT: Thus the Delta Modulation output has been verified.


24

8.ADAPTIVE DELTA MODULATION AIM: To construct Adaptive Delta Modulation circuit and study the output waveform. APPRATUS REQUIRED: 1) Adaptive Delta modulation Trainer kit 2) Connecting chords 3) Function Generator 4) 20 MHz Dual trace Oscilloscope 5) CRO 6) CRO probe THEORY: Delta modulation is generally a 1 bit DPCM, where no extra encoding effort is needed. In Delta modulation the correlation between adjecent sample increase and as a result the prediction error decreases. If this prediction error is small enough it can be encoded by only one bit. PROCEDURE: 1) Study the circuit provided in the kit.switch on power supply. 2) Apply a sinewave modulating singal around 5-Vpp 70Hz. 3) Connect dual CRO for its input and output side. 4) Adjust amplitude & frequency of input. 5) Observe the PCM O/P on the CRO. 6) Draw the observed waveform on the graph paper.

CIRCUIT DIAGRAM:
25

MODEL GRAPH:

TABULATION:
26

SIGNAL

AMPLITUDE

TIME PERIOD

RESULT: Thus the Adaptive Delta Modulation output has been verified.

27

9.DIGITAL MODULATION AND DEMODULATION ASK, PSK, QPSK, FSK (HARDWARE )

AIM: To construct the function of ASK,PSK,QPSK,FSK modulation and demodulation. APPARATUS REQUIRED: 1) ASK, FSK, PSK, QPSK Trainer kit 2) Connecting chords 3) Function Generator 4) CRO 5) Probe THEORY: Amplitude-shift keying (ASK) is a form of modulation that represents digital data as variations in the amplitude of a carrier wave. Phase-shift keying (PSK) is a digital modulation scheme that conveys data by changing, or modulating, the phase of a reference signal (the carrier wave). Frequency-shift keying (FSK) is a frequency modulation scheme in which digital information is transmitted through discrete frequency changes of a carrier wave. In Quadrature Phase Shift Keying (QPSK), the data bits to be modulated are grouped into symbols, each containing two bits, and each symbol can take on one of four possible values: 00, 01, 10, or 11. During each symbol interval, the modulator shifts the carrier to one of four possible phases corresponding to the four possible values of the input symbol. PROCEDURE: ASK: 1. Assemble components and make connection on bresdboard as shown in fig. 2. Get it checked before turn on the power supply. 3. Apply square wave input. 4. Observe the waveform on CRO & note down mark & space frequencies. FSK: 1. Assemble components and make connection on bresdboard as shown in fig. 2. Get it checked before turn on the power supply. 3. Apply square wave input. 4. Observe the waveform on CRO & note down mark & space frequencies.
28

PSK: 1. Study the circuit provided on the front panel of kit. 2. Apply the sine wave of 400Hz to pin no. 8 3. Apply square wave input i.e. non linear binary data minimum 200Hz pin no.1. 4. Connect CRO at the o/p i.e. pin no. 12 5. Switch ON the power supply. 6. Observe the PSK o/p on the CRO. 7. Draw the observed waveform on the graph paper. QPSK: 1. Assemble components and make connection on bresdboard as shown in fig. 2. Get it checked before turn on the power supply. 3. Apply square wave input. 4. Observe the waveform on CRO & note down mark & space frequencies. CIRCUIT DIAGRAM: ASK:

PSK:

29

FSK:

QPSK: Modulator:
30

Demodulator:

MODEL GRAPH: ASK:

31

FSK:

PSK:

32

QPSK:

TABULATION: ASK:
33

SIGNAL

AMPLITUDE

TIME PERIOD

FSK: SIGNAL AMPLITUDE TIME PERIOD

PSK: SIGNAL AMPLITUDE TIME PERIOD

QPSK: SIGNAL AMPLITUDE TIME PERIOD

34

RESULT: Thus the ASK, FSK, PSK, and QPSK modulation and demodulation output has been verified.

10. DESIGNING, ASSEMBLING AND TESTING OF PRE EMPHASIS / DE EMPHASIS CIRCUITS AIM: To study the performance of pre-emphasis and de-emphasis and study their frequency. APPARATUS REQUIRED: S.No. 1. 2. 3. 4. 5. 6. THEORY: Pre Emphasis: The circuits are the transmitting side of the modulator. It is used to increase the gain of the higher frequency components the input signal increased, the impedance of the collector voltage
35

Components Transistor (BC 107) Resistors Capacitors CRO Function Generator Regulated Power Supply

Specification / Range Ft = 300 MHz Pd = 1W Ic(max) = 100 mA 10 K, 7.5 K, 6.8 K 10nF, 0.1F 20MHz 1MHz 0-30V, 1A

Quantity 1 1 each 1 2 1 1 1

increase. if the signal frequency is lesser than the impedance decrease, which increases the collector current and hence decrease the voltage.

De Emphasis: The circuit is placed at the receiving side. it acts as a low pass filter. the boosting gain for the high frequency signal in the transmitting side is done by the pre-emphasis is filtered to the same value by the low pass filter. The cut off frequency is given by the formula
F=1/(2pRC) Where R=2p Fc L

PROCEDURE: 1. The circuit connections are made as shown in the circuit diagram for the pre-emphasis and deemphasis circuits. 2. A power supply of 10V is given to the circuit. 3. For a constant value of input voltage of the frequency is varied and the output is noted on the CRO. 4. A graph is plotted between gain and frequency. 5. The cut frequencies are practical values of the cut off frequency are found and compared and then verified CIRCUIT DIAGRAM: Pre-emphasis:

De-emphasis:

36

MODEL GRAPH:

TABULATION: Input Voltage(V) Frequency(KHZ) Output Voltage(V) Gain Gain(db)

37

RESULT: Thus the Pre-emphasis and De-emphasis output has been verified

11.PLL AND FREQUENCY SYNTHESIZER AIM:

38

To obtain the frequency multiplication using PLL IC 565. APPARATUS REQUIRED: S.No. 1. 2. 3. 4. 5. 6. 7. 8. THEORY: 565 is available as a 14 pin DIP Package and as 10-pin metal can package. A phaselocked loop or phase lock loop (PLL) is a control system that tries to generate an output signal whose phase is related to the phase of the input "reference" signal. To use NE565 as a frequency multiplier. Lock Range = f2 f4 Capture Range = f3 f1 PROCEDURE: 1. Study the circuit provided on the front panel of kit. 2. Apply the sine wave of 400Hz to pin no. 8 3. Apply square wave input i.e. non linear binary data minimum 200Hz pin no.1. 4. Connect CRO at the o/p i.e. pin no. 12 5. Switch ON the power supply. 6. Observe the PLL & Frequency Synthesizer o/p on the CRO. 7. Draw the observed waveform on the graph paper. CIRCUIT DIAGRAM: Components PLL Transistor Resistor Capacitor CRO Function Generator Regulated Power Supply Probe Range IC565, IC7490 2N2222 2K, 4.7K, 10K 0.01F, 10 F 30 MHz 3MHz 30V -Quantity 1each 1 1 each 1 each 1 1 1 --

39

OUTPUT WAVEFORM:

TABULATION:

40

S.No

FREQUENCY(f)

RESULT: Thus the PLL and Frequency Synthesizer output has been verified.

12.LINE CODING AIM:


41

To study line coding techniques. Such as NRZ-L,NRZ-M,NRZ-S,unipolar to bipolar & bipolar to unipolar. APPARATUS REQUIRED: 1) Line coding Trainer kit 2) Connecting chords 3) Function Generator 4) CRO 5) CRO probe THEORY: Unipolar Signaling : In positive logic unipolar signaling the binary 1 is represented by a high level (+A volts) and a binary 0 by a zero level. This type of signaling is also called on-off keying. Polar Signaling: Binary 1s and 0s are represented by equal positive and negative levels. Bipolar (Pseudoternary) Signaling: Binary 1s are represented by alternately positive or negative values. The binary 0 is represented by a zero level. The term pseudoternary refers to the use of three encoded signal levels to represent two-level (binary) data. Manchester signaling: Each binary 1 is represented by a positive half-bit period pulse followed by a negative half-bit period pulse. Similarly a binary 0 is represented by a negative half-bit period pulse followed by a positive half-bit period pulse. This type of signaling is also called splitphase encoding. When a line code digital signal (such as PCM) is transmitted over a hardwire channel (such as twisted-pair telephone cables), it is attenuated, filtered, and corrupted by noise. Consequently for long lines the data cannot be recovered at the receiving end unless repeaters are placed in cascade along the line. PROCEDURE: 1. Study the circuit provided on the front panel of kit. 2. Apply the sine wave of 400Hz to pin no. 8 3. Apply square wave input i.e. non linear binary data minimum 200Hz pin no.1. 4. Connect CRO at the o/p i.e. pin no. 12 5. Switch ON the power supply. 6. Observe the Line coding o/p on the CRO. 7. Draw the observed waveform on the graph paper.

CIRCUIT DIAGRAM:
42

MODEL GRAPH:

TABULATION:
43

SIGNAL

AMPLITUDE

TIME PERIOD

RESULT: Thus the Line Coding was studied and output has been verified.

44

13.SAMPLING & TIME DIVISION MULTIPLEXING. AIM: To study the Time Division Multiplexing and Demultiplexing using PAM and demodulation and to reconstruct the signal of the receiver using filters. APPARATUS REQUIRED: 1) Sampling and TDM Trainer kit 2) Connecting chords 3) Function Generator 4) CRO 5) CRO probe

CIRCUIT DIAGRAM:

45

PROCEDURE: 1. Study the circuit provided on the front panel of kit. 2. Apply the sine wave of 400Hz to pin no. 8 3. Connect CRO at the o/p i.e. pin no. 12 4. Switch ON the power supply. 5. Observe the sampling and TDM o/p on the CRO. 6. Draw the observed waveform on the graph paper.

OUTPUT WAVEFORM:

46

TABULATION: SIGNAL AMPLITUDE TIME PERIOD

47

RESULT: Thus the Sampling and Time Division Multiplexing output has been verified.

48

MAT LAB PROGRAMS

1.AMPLITUDE SHIFT KEYING

49

AIM: To Simulate the Amplitude Shift Keying using Matlab software observe the Waveform. APPRATUS REQUIRED: 1. MATLAB software 2. Personnel Computer THEORY: Amplitude shift keying is the digital system of Amplitude modulation .Digital signal generated in system like telegraphy is not transmitted as it is instead they are transmitted using keying techniques .In ASKS the nominal un modulated carrier frequency .Corresponding to mark condition and space condition is transmitted for logic level 1 and logic level 0 respectively. ASK MODULATION PROGRAM:

f0=0;f1=1; g=round(rand(1,100)); t=0:2*pi/99:2*pi; cp=[];sp=[]; mod=[];mod1=[];bit=[]; for n=1:length(g); if g(n)==0; die=ones(1,100); c=sin(f0*t); se=zeros(1,100); else g(n)==1; die=ones(1,100); c=sin(f1*t); se=ones(1,100); end cp=[cp die]; mod=[mod c]; bit=[bit se]; end ask=cp.*mod; subplot(3,1,1);plot(bit,'LineWidth',1.5);grid on; title('Binary Signal'); axis([0 30*length(g) -2.5 2.5]); subplot(3,1,3);plot(ask,'LineWidth',1.5);grid on; title('ASK modulation'); axis([0 30*length(g) -2.5 2.5]);
50

subplot(3,1,2);plot(c,'LineWidth',1.5);grid on; axis([0 length(g) -2.5 2.5]); title('Carrier Signal');


MODEL GRAPH:

RESULT: Thus the Amplitude Shift Keying output has been verified.

2. FREQUENCY SHIFT KEYING

AIM: To Simulate the Frequency Shift Keying using Matlab software observe the Waveform.
51

APPRATUS REQUIRED: 1. MATLAB software 2. Personnel Computer THEORY: Frequency shift keying is the digital system of frequency modulation .Digital signal generated in system like telegraphy is not transmitted as it is instead they are transmitted using keying techniques .In FSK the nominal un modulated carrier frequency .Corresponding to mark condition and space condition is transmitted for logic level 1 and logic level 0 respectively. FSK MODULATION PROGRAM:

f0=1;f1=2; g=round(rand(1,100)); t=0:2*pi/99:2*pi; cp=[];sp=[]; mod=[];mod1=[];bit=[]; for n=1:length(g); if g(n)==0; die=ones(1,100); c=sin(f0*t); se=zeros(1,100); else g(n)==1; die=ones(1,100); c=sin(f1*t); se=ones(1,100); end cp=[cp die]; mod=[mod c]; bit=[bit se]; end fsk=cp.*mod; subplot(3,1,1);plot(bit,'LineWidth',1.5);grid on; title('Binary Signal'); axis([0 25*length(g) -2.5 2.5]); subplot(3,1,3);plot(fsk,'LineWidth',1.5);grid on; title('FSK modulation'); axis([0 25*length(g) -2.5 2.5]); subplot(3,1,2);plot(c,'LineWidth',1.5);grid on; axis([0 length(g) -2.5 2.5]); title('Carrier Signal');
52

MODEL GRAPH:

RESULT: Thus the Frequency Shift Keying output has been verified.

3. PHASE SHIFT KEYING

AIM: To Simulate the Phase Shift Keying using Matlab software observe the Waveform. APPRATUS REQUIRED: 1. MATLAB software
53

2. Personnel Computer THEORY: The original source of information, text, speech, the most commonly used coding scheme is binary sequence such as 0011101011. For transmission purpose this has to be converted to a continuous electrical waveform, conversion process is referred to as the modulation .The o/p of the PCM system is also a binary data. If they are to be transmitted over copper wires, they can be Directly Transmitted as two voltage levels +v and v. But if they are to be transmitted through space using antenna, Phase Modulation is used. As the modulating signal consists of only two levels the modulation technique is known as Phase Shift Keying. Phase Shift Keying is a modulation in which the phase of the carrier signal changes with respect to the digital signal. The binary signal to be transmitted changes the phase of the sine wave carrier depending upon whether 0 or 1 is transmitted. It is also called as Binary Phase Shift Keying (BPSK). PSK MODULATION PROGRAM:

f0=0;f1=1; g=round(rand(1,100)); t=0:2*pi/99:2*pi; cp=[];sp=[]; mod=[];mod1=[];bit=[]; for n=1:length(g); if g(n)==0; die=ones(1,100); c=sin(t+f0*180); se=zeros(1,100); else g(n)==1; die=ones(1,100); c=sin(t+f1*180); se=ones(1,100); end cp=[cp die]; mod=[mod c]; bit=[bit se]; end psk=cp.*mod; subplot(3,1,1);plot(bit,'LineWidth',1.5);grid on; title('Binary Signal'); axis([0 25*length(g) -2.5 2.5]); subplot(3,1,3);plot(fsk,'LineWidth',1.5);grid on; title('PSK modulation'); axis([0 25*length(g) -2.5 2.5]); subplot(3,1,2);plot(c,'LineWidth',1.5);grid on;
54

axis([0 length(g) -2.5 2.5]); title('Carrier Signal');


MODEL GRAPH:

RESULT: Thus the Phase Shift Keying output has been verified.

4.QUADRATURE PHASE SHIFT KEYING (4 & 8 Levels) AIM: To Simulate the Quadrature Phase Shift Keying using Matlab software observe the Waveform. APPRATUS REQUIRED: 1. MATLAB software 2. Personnel Computer
55

THEORY:
QPSK:- in QPSK each pair at consecutive data bit is treated as a two bit code which is switch the phase of the carrier sine wave between one at four phase90 apart. The four possible combinations at bib it code are 0, 01, 10, and11 each code represents either a phase of 45, 185, 225, and 315 lagging, relative to the phase at the original un modulated carrier QPSK offers an advantage over PSK is a no carrier that how each phase represents a two bit code rather than a single bit. This means that either we can charge phase per sec. or the same amount of data can be transmitted with. Constellation diagram for QPSK with Gray coding: Each adjacent symbol only Sometimes known as quaternary or quadriphase PSK or 4-PSK, QPSK uses four points on the constellation diagram, equispaced around a circle. With four phases, QPSK can encode two bits per symbol, shown in the diagram with gray coding to minimize the BER twice the rate of BPSK. Analysis shows that this may be used either to double the data rate compared to a BPSK system while maintaining the bandwidth of signal rate or to maintain the datarate of BPSK but halve the bandwidth need.

QPSK MODULATION PROGRAM: 4 Level:


f=1; g=round(rand(1,100)); t=0:2*pi/99:2*pi; cp=[];sp=[]; mod=[];mod1=[];bit=[]; for n=1:2:length(g); if g(n)==0 && g(n+1)==1; die=sqrt(2)/2*ones(1,100); die1=-sqrt(2)/2*ones(1,100); se=[zeros(1,50) ones(1,50)]; elseif g(n)==0 && g(n+1)==0; die=-sqrt(2)/2*ones(1,100); die1=-sqrt(2)/2*ones(1,100);
56

se=[zeros(1,50) zeros(1,50)]; elseif g(n)==1 && g(n+1)==0; die=-sqrt(2)/2*ones(1,100); die1=sqrt(2)/2*ones(1,100); se=[ones(1,50) zeros(1,50)]; elseif g(n)==1 && g(n+1)==1; die=sqrt(2)/2*ones(1,100); die1=sqrt(2)/2*ones(1,100); se=[ones(1,50) ones(1,50)]; end c=cos(f*t); s=sin(f*t); cp=[cp die]; %Amplitude cosino sp=[sp die1]; %Amplitude sino mod=[mod c]; %cosino carrier (Q) mod1=[mod1 s]; %sino carrier (I) bit=[bit se]; end bpsk=cp.*mod+sp.*mod1; subplot(3,1,1);plot(bit,'LineWidth',1.5);grid on; title('Binary Signal') axis([0 20*length(g) -1.5 1.5]); subplot(3,1,3);plot(bpsk,'LineWidth',1.5);grid on; title('QPSK modulation') axis([0 20*length(g) -1.5 1.5]); subplot(3,1,2);plot(s,'LineWidth',1.5);grid on; title('Carrier Signal') axis([0 length(g) -1.5 1.5]);

MODEL GRAPH:

57

8 level:
f=1; g=round(rand(1,150)); t=0:2*pi/149:2*pi; cp=[];sp=[]; mod=[];mod1=[];bit=[]; for n=1:3:length(g); if g(n)==0 && g(n+1)==1 && g(n+2)==1 die=cos(pi/8)*ones(1,150); die1=sin(pi/8)*ones(1,150); se=[zeros(1,50) ones(1,50) ones(1,50)]; elseif g(n)==0 && g(n+1)==1 && g(n+2)==0 die=cos(3*pi/8)*ones(1,150); die1=sin(3*pi/8)*ones(1,150);
58

se=[zeros(1,50) ones(1,50) zeros(1,50)]; elseif g(n)==0 && g(n+1)==0 && g(n+2)==0 die=cos(5*pi/8)*ones(1,150); die1=sin(5*pi/8)*ones(1,150); se=[zeros(1,50) zeros(1,50) zeros(1,50)]; elseif g(n)==0 && g(n+1)==0 && g(n+2)==1 die=cos(7*pi/8)*ones(1,150); die1=sin(7*pi/8)*ones(1,150); se=[zeros(1,50) zeros(1,50) ones(1,50)]; elseif g(n)==1 && g(n+1)==0 && g(n+2)==1 die=cos(-7*pi/8)*ones(1,150); die1=sin(-7*pi/8)*ones(1,150); se=[ones(1,50) zeros(1,50) ones(1,50)]; elseif g(n)==1 && g(n+1)==0 && g(n+2)==0 die=cos(-5*pi/8)*ones(1,150); die1=sin(-5*pi/8)*ones(1,150); se=[ones(1,50) zeros(1,50) zeros(1,50)]; elseif g(n)==1 && g(n+1)==1 && g(n+2)==0 die=cos(-3*pi/8)*ones(1,150); die1=sin(-3*pi/8)*ones(1,150); se=[ones(1,50) ones(1,50) zeros(1,50)]; elseif g(n)==1 && g(n+1)==1 && g(n+2)==1 die=cos(-pi/8)*ones(1,150); die1=sin(-pi/8)*ones(1,150); se=[ones(1,50) ones(1,50) ones(1,50)]; end c=cos(f*t); s=sin(f*t); cp=[cp die]; sp=[sp -die1]; mod=[mod c]; mod1=[mod1 s]; bit=[bit se]; end opsk=cp.*mod+sp.*mod1; subplot(3,1,1);plot(bit,'LineWidth',1.5);grid on; title('Binary Signal') axis([0 10*length(g) -1.5 1.5]); subplot(3,1,2);plot(s,'LineWidth',1.5);grid on; title('carrier Signal') axis([0 length(g) -1.5 1.5]); subplot(3,1,3);plot(opsk,'LineWidth',1.5);grid on; title('8PSK modulation') axis([0 10*length(g) -1.5 1.5]);

MODEL GRAPH:

59

RESULT: Thus the Quadrature Phase Shift Keying for 4 & 8 level output has been verified.

60

5. ERROR CONTROL CODING a) simulation of linear block codes AIM:


To simulate the generator matrix code word,parity check matrix and syndrome for (7,4) hamming using Matlab.

APPRATUS REQUIRED: 1. MATLAB software 2. Personnel Computer

THEORY: Error control coding is the process of adding redundant bit to the information bits so as to facilitate two basic objective at the reciver.Error correction and detection.Error control coding correction and Detection. The linear block codes are usually denoted by (n,k) in which first portion of K bits is always identical to the message sequence to be transmitted the (n,k) bits to the second portion are computed from the message second bits in accoradance with a prescribed encoding role that determined the mathematical structure of the code. PROGRAM:
Clc; Clear all; N=7; K=4; Disp(message bits); M=randint(2,k,[1,0]); Disp(m); Disp(coeffiecient matrix); p=randint(k,n-k,[1,0]); Disp(p); G=[[p],eye(k)]; Disp(g); Disp(codeword matrix); X=encoder(m,n,k,linear,g); Disp(g); Disp(parity matrix); H=gen2par(g); Disp(h); ************Decoding************* Disp(error checking);

61

ch=rem(x*h,2); Disp(ch); Disp(error pattern radiation); e=randint(2,n); Disp(e); Disp(recevied vector); r=rem(x,e); Disp(r); Disp(syndrome); Disp(decoding table); t=syndtable(h); Disp(t); Disp(decoding message bits); msg=decode(r,n,k,linear fmt); Disp(msg);

Output of linear block codes:


Message bits 1010 1101 Coefficient Matrix 1 1 0 1 1 0 1 0 0 1 1 1

Generator matrix 1 1 0 1 1 0 1 0 0 1 1 1 1 0 0 1 0 1 0 0 0 0 1 0 0 0 0 0

Code word matrix 1011010 1101101 Parity matrix 1001101 0101011 0010111 Error checking 000 000

62

Error pattern radiation 1111111 1 111111

b) Cyclic codes PROGRAM:


Clc; Clear all; N=7; K=4; Disp(message bits); Msg=randint(2,k,[0,1]); Disp(msg); Disp(cyclic polynomial); pol=cyclpoly(n,k,min); Disp(pol); code=encode(msg,n,k,cyclic,pol); Disp(code); Disp(error pattern); err=randerr(2,n,[1,0;8,2]; Disp(err); Disp(received matrix); r=rem(plus(coder,err),2); Disp(r); Disp(decoded message); Newmsg=decode(r,n,k,cyclic); Disp(newmsg);

Output of cyclic codes:


Message bits 1110 0010 Cyclic polynomial 1011 Code vector 1001110 1100010

63

Error pattern 0000000 0000000 Received matrix 1001110 1100010 Decoded message 1110 0010 Received vector 0000000 0000000 Syndrome decoding table Single error patterns loaded in decoding table. 1 rows remaining. 2 error patterns loaded.0 rows remaining 0 0 0 0 1 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0

Decoding message bits Single error patterns loaded table.1rows remaining. 2-error pattern loaded.0 rows remaining 0000 0000

RESULT: Thus the Error control coding for Linear and Cyclic Block output has been verified.

64

You might also like