Similar documents
Dhanalakshmi College of Engineering Manimangalam, Tambaram, Chennai

Department of Electronics & Telecommunication Engg. LAB MANUAL. B.Tech V Semester [ ] (Branch: ETE)

BAPATLA ENGINEERING COLLEGE DIGITAL COMMUNICATIONS LAB EC-451. PREPARED BY S. Pallaviram, Lecturer

Department of Electronics & Communication Engineering LAB MANUAL SUBJECT: DIGITAL COMMUNICATION LABORATORY [ECE324] (Branch: ECE)

DHANALAKSHMI COLLEGE OF ENGINEERING Tambaram, Chennai

UNIT TEST I Digital Communication

EXPERIMENT WISE VIVA QUESTIONS

DIGITAL COMMUNICATIONS LAB

Department of Electronics & Communication Engineering LAB MANUAL

EEE 309 Communication Theory

Communication Systems Lab

Class 4 ((Communication and Computer Networks))

COMPUTER COMMUNICATION AND NETWORKS ENCODING TECHNIQUES

SEN366 Computer Networks

Time division multiplexing The block diagram for TDM is illustrated as shown in the figure

Downloaded from 1

Department of Electronics and Communication Engineering 1

DIGITAL COMMUNICATION

EEE 309 Communication Theory

BLOCK DIAGRAM: PULSE CODE MODULATION: FUNCTION GENERATOR CHECKER CIRCUIT DEMODULATED O/P TIMING

Communications I (ELCN 306)

PULSE CODE MODULATION (PCM)

Dharmapuri LAB MANUAL. Regulation : Branch : B.E. ECE 12- COMMUNICATION SYSTEMS LABORATORY EC6512


CHAPTER 3 Syllabus (2006 scheme syllabus) Differential pulse code modulation DPCM transmitter

Data Communications and Networking (Module 2)


QUESTION BANK SUBJECT: DIGITAL COMMUNICATION (15EC61)

CHAPTER 2. Instructor: Mr. Abhijit Parmar Course: Mobile Computing and Wireless Communication ( )

BINARY AMPLITUDE SHIFT KEYING

Year : TYEJ Sub: Digital Communication (17535) Assignment No. 1. Introduction of Digital Communication. Question Exam Marks

Comm 502: Communication Theory. Lecture 4. Line Coding M-ary PCM-Delta Modulation

UNIT I Source Coding Systems

DIGITAL COMMINICATIONS

Amplitude modulator trainer kit diagram

Engr M. Hadi Ali Khan B. Sc. Engg (AMU), MIETE (India), Ex-MIEEE (USA), Ex-MSSI (India)

Signal Encoding Techniques

1 Analog and Digital Communication Lab

Chapter 2: Fundamentals of Data and Signals

CTD600 Communication Trainer kit

Signals and codes. Path and modulation

Pulse Code Modulation

LATHA MATHAVAN ENGINEERING COLLEGE Alagarkovil, Madurai

CSCD 433 Network Programming Fall Lecture 5 Physical Layer Continued

Objectives. Presentation Outline. Digital Modulation Lecture 01

Digital Modulation Lecture 01. Review of Analogue Modulation Introduction to Digital Modulation Techniques Richard Harris

MODULATION AND MULTIPLE ACCESS TECHNIQUES

QUESTION BANK EC 1351 DIGITAL COMMUNICATION YEAR / SEM : III / VI UNIT I- PULSE MODULATION PART-A (2 Marks) 1. What is the purpose of sample and hold

EC6501 Digital Communication

2. By convention, the minimum and maximum values of analog data and signals are presented as voltages.

Waveform Encoding - PCM. BY: Dr.AHMED ALKHAYYAT. Chapter Two

List of Experiments Exp.No. Title of the Experiment

Digital Communication - Analog to Digital

DIGITAL COMMUNICATIONS SYSTEMS. MSc in Electronic Technologies and Communications

Voice Transmission --Basic Concepts--

CSCD 433 Network Programming Fall Lecture 5 Physical Layer Continued

C06a: Digital Modulation

AC LAB ECE-D ecestudy.wordpress.com

DIGITAL COMMUNICATIONS

EE 460L University of Nevada, Las Vegas ECE Department

Signal Encoding Techniques

Digital Communication (650533) CH 3 Pulse Modulation

Digital Communication

Introduction: Presence or absence of inherent error detection properties.

EE 400L Communications. Laboratory Exercise #7 Digital Modulation


28. What is meant by repetition rate of the AM envelope? (ADC,AU-2010) 29. Describe the upper and lower sidebands. (ADC, AU-2010) 30.

Fundamentals of Digital Communication

Problem Sheet 1 Probability, random processes, and noise

Datacommunication I. Layers of the OSI-model. Lecture 3. signal encoding, error detection/correction

10 Speech and Audio Signals

Wireless Communications

Communications and Signals Processing

Lecture 2 Fiber Optical Communication Lecture 2, Slide 1

College of information Technology Department of Information Networks Telecommunication & Networking I Chapter 5. Analog Transmission

YEDITEPE UNIVERSITY ENGINEERING FACULTY COMMUNICATION SYSTEMS LABORATORY EE 354 COMMUNICATION SYSTEMS

BSc (Hons) Computer Science with Network Security. Examinations for Semester 1

The figures and the logic used for the MATLAB are given below.

The HC-5560 Digital Line Transcoder

Amplitude Modulated Systems

Communication System KL-910. Advanced Communication System

ITM 1010 Computer and Communication Technologies

Digital signal is denoted by discreet signal, which represents digital data.there are three types of line coding schemes available:

Chapter 7. Multiple Division Techniques

Universitas Sumatera Utara

QUESTION BANK (VI SEM ECE) (DIGITAL COMMUNICATION)

Digital to Digital Encoding

Basic Concepts in Data Transmission

Syllabus. osmania university UNIT - I UNIT - II UNIT - III CHAPTER - 1 : INTRODUCTION TO DIGITAL COMMUNICATION CHAPTER - 3 : INFORMATION THEORY

Lecture 3 Concepts for the Data Communications and Computer Interconnection

Digital Transceiver using H-Ternary Line Coding Technique

Panimalar Engineering College

EE390 Final Exam Fall Term 2002 Friday, December 13, 2002

6. has units of bits/second. a. Throughput b. Propagation speed c. Propagation time d. (b)or(c)

University of Swaziland Faculty of Science Department of Electrical and Electronic Engineering Main Examination 2016

EEE482F: Problem Set 1

AMSEC/ECE

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING QUESTION BANK. Subject Name: Digital Communication Techniques

Emona Telecoms-Trainer ETT-101

CODING TECHNIQUES FOR ANALOG SOURCES

Transcription:

Department Of ECE III Year / V Semester EC 6512 COMMUNICATION SYSTEM LABORATORY LAB MANUAL

SYLLABUS EC6512 COMMUNICATION SYSTEMLABORATORY LIST OF EXPERIMENTS: CYCLE: 1 1. Signal Sampling and reconstruction 2. Time Division Multiplexing 3. AM Modulator and Demodulator 4. FM Modulator and Demodulator 5. Pulse Code Modulation and Demodulation 6. Delta Modulation and Demodulation CYCLE: 2 7. Observation (simulation) of signal constellations of BPSK, QPSK and QAM 8. Line coding schemes 9. FSK, PSK and DPSK schemes (Simulation) 10. Error control coding schemes - Linear Block Codes (Simulation) 11. Communication link simulation 12. Equalization Zero Forcing & LMS algorithms(simulation)

Exp-No: 1, 2 Date: SIGNAL SAMPLING AND RECONSTRUCTION AIM: To study the process of sampling and time division multiplexing of four signals using pulse amplitude modulation and De-modulation and to reconstruct the signals at the receiver using filters. APPARATUS REQUIRED: THEORY 1. Sampling and TDM Communication trainer kit: 2. Multi Output Power Supply. 3. Patch cords. 4. CRO (60MHz) The Sample and Hold circuit uses two buffers to keep a voltage level stored in a capacitor. Sample will charge the capacitor to the present signal level, while the input buffer ensures the signal won't be changed by the charging process. From there, the output buffer will make sure that the voltage level across the storage cap won't decrease over time. Sclear will short out the storage cap, discharging it and setting the output to 0V.In actual practice, the switches used are various forms of transistor switch, which provides cleaner switching and also allows another circuit to control the sample and clearing operations. Excellent Sample and Hold circuits like the LF398 are available on a single chip for cheap and easy use. Sample and Hold circuits are used internally in Analog to Digital conversion. We might also use them to hold a given signal value from any particular sensor on a robot, for analysis and later use. In TDM, by interleaving samples of several source waveforms in time, it is possible to transmit enough information to a receiver, via only one channel to recover all message waveforms. The conceptual implementation of the time multiplexing of N similar messages f n (t) where n= 1,2,3,..N is illustrated in fig 1. the time allocated to one sample of one message is called time slot. The time intervals over which all message signals are sampled atleast once is called a Frame. The portion of the time slot not used by the system may be allocated to other functions like signaling, monitoring, synchronization, etc.

The four channels CH0, CH1, CH2, and CH3 are multiplexed on a single line TXD with the aid of a electronic switch CD 4016. The CD 4016 latches one of the four inputs I0-I3 deping on the control inputs C0, C1, C2, C3 which are generated by a 2: 4 line decoder. The decoder, deping on the A0 and A1, which start from 00 to 11, generates 0000 to 0011 on the output lines Y0, Y1, Y2 and Y3. On receiving the control signals, the CD4016 latches the first information signal I0 on the first count 0000. In the next clock, the control inputs change their state to 0001 and the input II is latched to the output on the same line. Similarly, all the information signals are multiplexed without any interference on the line PROCEDURE: The sample and hold circuit is assembled with the desired components. The input signal is given to the circuit from the function generator. The amplitude of the input signal should not exceed 10 volts. The frequency of the input signal is set to 600 Hz. The frequency of the sample signal is set to 5600 Hz. The next sample available is zero order holding device, integrate the signal between consequence sampling inputs.

MODEL GRAPH FOR SAMPLING MODEL GRAPH FOR TDM RESULT Thus the sampling process was studied and the different types of signals are multiplexed using TDM Technique.

Exp-No:3 Date: AM MODULATION AND DEMODULATION AIM To transmit a modulating signal after amplitude modulation using AM transmitter and receive the signal back after demodulating using AM receiver. APPARATUS REQUIRED: 1. AM transmitter trainer kit 2. AM receiver trainer kit 3. CRO 4. Patch cards THEORY: AMPLITUDE MODULATION: Amplitude Modulation is a process by which amplitude of the carrier signal is varied in accordance with the instantaneous value of the modulating signal, but frequency and phase of carrier wave remains constant. The modulating and carrier signal are given by Where V m (t) = V m sin m t V C (t) = V C sin C t The modulation index is given by, m a = V m / V C. V m = V max V min and V C = V max + V min The amplitude of the modulated signal is given by, V AM (t) = V C (1+m a sin m t) sin C t V m = maximum amplitude of modulating signal V C = maximum amplitude of carrier signal V max = maximum variation of AM signal V min = minimum variation of AM signal

PROCEDURE: 1. The circuit wiring is done as shown in diagram 2. A modulating signal input given to the Amplitude modulator 3. Now increase the amplitude of the modulating signal to the required level. 4. The amplitude and the time duration of the modulating signal are observed using CRO. 5. Finally the amplitude modulated output is observed from the output of amplitude modulator stage and the amplitude and time duration of the AM wave are noted down. 6. Calculate the modulation index by using the formula and verify them. The final demodulated signal is viewed using an CRO at the output of audio power amplifier stage. Also the amplitude and time duration of the demodulated wave are noted down.

TABULATION: Waveform Amplitude (V) Time Period (msec) Frequency Message Carrier modulated Demodulated MODEL GRAPH Vm Message signal Vc Carrier signal time time AM signal Vmc time

RESULT Thus the AM signal was transmitted using AM trainer kit and the AM signal detected using AM detector kit.

Exp-No: 4 Date: FREQUENCY MODULATION AND DEMODULATION AIM To transmit a modulating signal after frequency modulation using FM transmitter and receive the signal back after demodulating using FM receiver. APPARATUS REQUIRED: THEORY: 1. FM transmitter trainer kit 2. FM receiver trainer kit 3. CRO 4. Patch cards Frequency modulation (FM) is a form of modulation that represents information as variations in the instantaneous frequency of a carrier wave. (Contrast this with amplitude modulation, in which the amplitude of the carrier is varied while its frequency remains constant.) In analog applications, the carrier frequency is varied in direct proportion to changes in the amplitude of an input signal. Shifting the carrier frequency among a set of discrete values can represent digital data, a technique known as frequency-shift keying. FM is commonly used at VHF radio frequencies for high-fidelity broadcasts of music and speech (see FM broadcasting). 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 s 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. FM also keeps the tape at saturation level, and therefore acts as a form of noise reduction, and a simple limiter can mask variations in the playback output, and the FM capture effect removes print-through and pre-echo. A continuous pilot-tone, if added to the signal as was done on V2000 and many Hi-band formats can keep mechanical jitter under control and assist time base correction.

PROCEDURE: 1. The circuit wiring is done as shown in diagram 2. A modulating signal input given to the Frequency modulator 3. Now increase the modulated signal to the required level. 4. The amplitude and the time duration of the modulating signal are observed using CRO. 5. Finally the frequency modulated output is observed from the output of frequency modulator stage and the amplitude and time duration of the FM wave are noted down.

MODEL GRAPH TABULATION: Message Carrier Waveform Amplitude (V) Time Period (msec) Frequency modulated Demodulated RESULT Thus the FM signal was transmitted using FM trainer kit and the FM signal detected using FM detector kit.

Exp-No: 5 Date: PULSE CODE MODULATION AIM To generate a PCM signal using PCM modulator and detect the message signal from PCM signal by using PCM demodulator. APPARATUS REQUIRED PCM kit, CRO and connecting probes THEORY Pulse code modulation is a process of converting an analog signal into digital. The voice or any data input is first sampled using a sampler (which is a simple switch) and then quantized. Quantization is the process of converting a given signal amplitude to an equivalent binary number with fixed number of bits. This quantization can be either midtread or mid-raise and it can be uniform or non-uniform based on the requirements. For example in speech signals, the higher amplitudes will be less frequent than the low amplitudes. So higher amplitudes are given less step size than the lower amplitudes and thus quantization is performed non-uniformly. After quantization the signal is digital and the bits are passed through a parallel to serial converter and then launched into the channel serially. At the demodulator the received bits are first converted into parallel frames and each frame is de-quantized to an equivalent analog value. This analog value is thus equivalent to a sampler output. This is the demodulated signal. In the kit this is implemented differently. The analog signal is passed trough a ADC (Analog to Digital Converter) and then the digital codeword is passed through a parallel to serial converter block. This is modulated PCM. This is taken by the Serial to Parallel converter and then through a DAC to get the demodulated signal. The clock is given to all these blocks for synchronization. The input signal can be either DC or AC according to the kit. The waveforms can be observed on a CRO for DC without problem. AC also can be observed but with poor resolution.

PROCEDURE 1. Power on the PCM kit. 2. Measure the frequency of sampling clock. 3. Apply the DC voltage as modulating signal. 4. Connect the DC input to the ADC and measure the voltage. 5. Connect the clock to the timing and control circuit. 6. Note the binary work from LED display. The serial data through the channel can be observed in the CRO. 7. Also observe the binary word at the receiver. 8. Now apply the AC modulating signal at the input. 9. Observe the waveform at the output of DAC. 10. Note the amplitude of the input voltage and the codeword. Also note the value of the output voltage. Show the codeword graphically for a DC input.

MODEL GRAPH: TABULAR COLUMN S.No Name of the signal Amplitude in V Time period in Sec Frequency in Hz 1 Modulating Signal 2 Carrier Signal 3 Modulated Signal 4 Demodulated Signal

RESULT Thus the PCM signal was generated using PCM modulator and the message signal was detected from PCM signal by using PCM demodulator.

Exp-No: 6 Date: DELTA MODULATION AIM To transmit an analog message signal in its digital form and again reconstruct back the original analog message signal at receiver by using Delta modulator. APPARATUS REQUIRED DM kit, CRO and connecting probes THEORY Delta modulation is the DPCM technique of converting an analog message signal to a digital sequence. The difference signal between two successive samples is encoded into a single bit code. The block and kit diagrams show the circuitry details of the modulation technique. A present sample of the analog signal m(t) is compared with a previous sample and the difference output is level shifted, i.e. a positive level (corresponding to bit 1) is given if difference is positive and negative level (corresponding to bit 0) if it is negative. The comparison of samples is accomplished by converting the digital to analog form and then comparing with the present sample. This is done using an Up counter and DAC as shown in block diagram. The delta modulated signal is given to up counter and then a DAC and the analog input is given to OPAMP and a LPF to obtain the demodulated output. PROCEDURE 1. Switch on the kit. Connect the clock signal and the modulating input signal to the modulator block. Observe the modulated signal in the CRO. 2. Connect the DM output to the demodulator circuit. Observe the demodulator output on the CRO. 3. Also observe the DAC output on the CRO. 4. Change the amplitude of the modulating signal and observe the DAC output. Notice the slope overload distortion. Keep the tuning knob so that the distortion is gone. Note this value of the amplitude. This is the minimum required value of the amplitude to overcome slope overload distortion. 1. Calculate the sampling frequency required for no slope overload distortion. Compare the calculated and measured values of the sampling frequency.

MODEL GRAPH TABULAR COLUMN S.No Name of the signal Amplitude in V Time period in Sec Frequency in Hz 1 Modulating Signal 2 Carrier Signal 3 Modulated Signal 4 Demodulated Signal RESULT Thus the analog message signal in its digital form was transmitted and again the original analog message signal was reconstructed at receiver by using Delta modulator and Demodulator.

Exp-No: 7 Date: OBSERVATION OF SIGNAL CONSTELLATIONS OF BPSK, QPSK AND QAM USING MATLAB AIM: To write a program in MATLAB for design of BPSK, QPSK and QAM. PROGRAM: QPSK clc clear all; close all; N=20; X=randint(1,N); L=100; l=(n/2*l*0.01)-0.01 i=1; for t=0:0.01:1 I(i)=cos(2*pi*t); i=i+1; i=1; for t=0:0.01:1 Q(i)=sin(2*pi*t); i=i+1; for i=1:n/2 if X((i-1)*2+1)==1 for j=((i-1)*l+1):(i*l) y(j)=1; QMI(j)=y(j)*I(j); else for j=((i-1)*l+1):(i*l) y(j)=-1; QMI(j)=y(j)*I(j);

k=((i-1)*2)+2; if X(k)==1 for j=((i-1)*l+1):(i*l) y(j)=1; QMQ(j)=y(j)*Q(j); else for j=((i-1)*l+1):(i*l) y(j)=-1; QMQ(j)=y(j)*Q(j); for i=1:(n/2*l) QP(i)=QMI(i)+QMQ(i); for i=1:(n/2*l) re1(i)=qp(i)*i(i); req(i)=qp(i)*q(i); k=1; for i=1:n/2 ri=0; rq=0; for j=((i-1)*l+1):(i*l) ri=ri+re(j); rq=rq+req(j); if ri>=0 real(i)=1; else real(i)=0; if rq>=0 imag(i)=1; else imag(i)=0; det(k)=real(i);

det(k+1)=imag(i); k=k+2; RESULT: Thus the FSK, PSK and DPSK was designed using MATLAB.

Exp-No: 8 Date: LINE CODING AIM : To study different line coding techniques. APPARATUS REQUIRED: 1. Communication trainer kit 2. Multi Output Power Supply. 3. Patch cords. 4. DSO/CRO THEORY: We need to represent PCM binary digits by electrical pulses in order to transmit them through a base band channel. The most commonly used PCM popular data formats are being realized here. Line coding refers to the process of representing the bit stream (1 s and 0 s) in the form of voltage or current variations optimally tuned for the specific properties of the physical channel being used. The selection of a proper line code can help in so many ways: One possibility is to aid in clock recovery at the receiver. A clock signal is recovered by observing transitions in the received bit sequence, and if enough transitions exist, a good recovery of the clock is guaranteed, and the signal is said to be self-clocking. Another advantage is to get rid of DC shifts. The DC component in a line code is called the bias or the DC coefficient. Unfortunately, most long-distance communication channels cannot transport a DC component. This is why most line codes try to eliminate the DC component before being transmitted on the channel.such codes are called DC balanced, zero-dc, zero-bias, or DC equalized.some common types of line encoding in common-use nowadays are unipolar, polar, bipolar, Manchester, MLT-3 and Duobinary encoding. These codes are explained here: 1. Unipolar (Unipolar NRZ and Unipolar RZ): Unipolar is the simplest line coding scheme possible. It has the advantage of being compatible with TTL logic. Unipolar coding uses a positive rectangular pulse p(t) to represent binary 1, and the absence of a pulse (i.e., zero voltage) to represent a binary 0. Two possibilities for the pulse p(t) exist3: Non-Return-to-Zero (NRZ) rectangular pulse and Return-to-Zero (RZ) rectangular pulse. The difference between Unipolar NRZ and Unipolar RZ codes is that the rectangular pulse in NRZ stays at a positive value (e.g., +5V) for the full duration of the logic 1 bit, while the pule in RZ drops from +5V to 0V in the middle of the bit time.

A drawback of unipolar (RZ and NRZ) is that its average value is not zero, which means it creates a significant DC-component at the receiver (see the impulse at zero frequency in the corresponding power spectral density (PSD) of this line code UNIPOLAR NRZ CODE The disadvantage of unipolar RZ compared to unipolar NRZ is that each rectangular pulse in RZ is only half the length of NRZ pulse. This means that unipolar RZ requires twice the bandwidth of the NRZ code. Polar (Polar NRZ and Polar RZ): In Polar NRZ line coding binary 1 s are represented by a pulse p(t) and binary 0 s are represented by the negative of this pulse -p(t) (e.g., -5V). Polar (NRZ and RZ) signals.using the assumption that in a regular bit stream a logic 0 is just as likely as a logic 1,polar signals (whether RZ or NRZ) have the advantage that the resulting Dccomponent is very close to zero.

The rms value of polar signals is bigger than unipolar signals, which means that polar signals have more power than unipolar signals, and hence have better SNR at the receiver. Actually, polar NRZ signals have more power compared to polar RZ signals. The drawback of polar NRZ, however, is that it lacks clock information especially when a long sequence of 0 s or 1 s is transmitted. Non-Return-to-Zero, Inverted (NRZI): NRZI is a variant of Polar NRZ. In NRZI there are two possible pulses, p(t) and p(t). A transition from one pulse to the other happens if the bit being transmitted is a logic 1, and no transition happens if the bit being transmitted is a logic 0. This is the code used on compact discs (CD), USB ports, and on fiber-based Fast Ethernet at 100-Mbit/s.

MANCHESTER ENCODING: In Manchester code each bit of data is signified by at least one transition. Manchester encoding is therefore considered to be self-clocking, which means that accurate clock recovery from a data stream is possible. In addition, the DC component of the encoded signal is zero. Although transitions allow the signal to be self-clocking, it carries significant overhead as there is a need for essentially twice the bandwidth of a simple NRZ or NRZI encoding POWER SPECTRA OF LINE CODES: Unipolar most of signal power is centered around origin and there is waste of power due to DC component that is present. Polar format most of signal power is centered around origin and they are simple to implement. Bipolar format does not have DC component and does not demand more bandwidth, but power requirement is double than other formats. Manchester format does not have DC component but provides proper clocking.

PROCEDURE 1. Connect the PRBS (test point P5) to various line coding formats. Obtain the coded output as per the requirement. 2. Connect coded signal test point to corresponding decoding test point as inputs. 3. Set the SW1 as per the requirement. 4. Set the potentiometer P1 in minimum position. 5. Switch ON the power supply. Press the switch SW2 once. 6. Display the encoded signal on one channel of CRO and decoded signal on second channel of CRO.

MODEL GRAPH: TABULAR COLUMN S.No Name of the signal Amplitude in V Time period in Sec Frequency in Hz 1 Modulating Signal 2 Carrier Signal 3 Modulated Signal 4 Demodulated Signal RESULT Thus the different line coding techniques was studied.

Exp-No: 9 Date: AIM: FSK, PSK and DPSK schemes USING MATLAB To write a program in MATLAB for design of FSK,PSK and DPSK. PROGRAM: FSK clc clear all close all N=10; x=randint(1,n); k=1; for t=0.01:0.01:10 c1(k)=sin(2*pi*t); c2(k)=sin(4*pi*t); k=k+1; for j=1:1:n; if x(j)==0 for i=(j-1)*100+1:1:j*100 y(i)=0; tr(i)=c2(i); if x(j)==1 for i=(j-1)*100+1:1:j*100 y(i)=1; tr(i)=c1(i); for i=1:1:1000 re(i)=tr(i)*c1(i)*c2(i); for j=1:1:n

d=0; for i=(j-1)*100+1:1:j*100 d=d+re(i); if d>0.5 det(j)=1; else det(j)=0; for j=1:1:n if det(j)==0 for i=(j-1)*100+1:1:j*100 det(i)=0; if x(j)==1 for i=(j-1)*100+1:1:j*100 det(i)=1; subplot(6,1,1); plot(y); title('message signal'); subplot(6,1,2); plot(c1); title('carrier Signal-1'); subplot(6,1,3); plot(c2); title('carrier Signal-2'); subplot(6,1,4); plot(tr); title('transmitted Signal'); subplot(6,1,5); plot(re); title('received Signal'); subplot(6,1,6); plot(det);

title('detected Signal');

PSK clc clear all; close all; N=10;%No.of Data x=randint(1,n); k=1; for t=0.01:0.01:10 c(k)=2*sin(2*pi*t); k=k+1; for j=1:1:n if x(j)==0 for i=(((j-1)*100)+1):1:(j*100) y(i)=0; tr(i)=-c(i); else for i=(((j-1)*100)+1):1:(j*100) y(i)=1; tr(i)=c(i); for i=1:1:1000 re(i)=tr(i)*c(i); for j=1:1:n d=0; for i=(((j-1)*100)+1):1:(j*100) d=d+re(i) if d>=0 det(j)=1; else det(j)=0; for j=1:1:n

if det(j)==0 for i=(((j-1)*100)+1):1:(j*100) det(i)=0; if x(j)==1 for i=(((j-1)*100)+1):1:(j*100) det(i)=1; subplot(5,1,1); plot(y); title('message Signal'); subplot(5,1,2); plot(c); title('carrier Signal'); subplot(5,1,3); plot(tr); title('transmitted Signal'); subplot(5,1,4); plot(re); title('received Signal'); subplot(5,1,5); plot(det); title('detected Signal'); RESULT: Thus the FSK, PSK and DPSK was designed using MATLAB.

Exp-No:10 Date: ERROR CONTROL CODING USING MATLAB AIM: To write a program in MATLAB for error control coding techniques. ALGORITHM: 1.Get the input binary sequcence. 2.Calculate the reundancy bits for the corrosponding code. 3.Transmit the signal that contains message bits+redundancy bits added at the. 4.Calculate the redundancy bits once again for the received bits. 5.If the redundancy bits= 0 then no error in the transmission otherwise some error in the transmission. PROGRAM: clc; clear all; close all; k=input('number of message bits'); n=input('number of coded bits'); P=[1 1 1;0 1 1;1 0 1;1 1 0] G=[eye(k) P] for i=1:2^k str=dec2base(i-1,2,4); for j=1:k m(i,j)=str(j);

for i=1:(2^k) for r=1:n o=0; for j=1:k o=o+(m(i,j)*g(j,r)); c(i,r)=mod(o,2); e=zeros(n,n) for i=1:n e(i,i)=1; % Syndrome Table H=[P' eye(n-k)]; H1=H'; for i=1:n for r=1:n-k o=0; for j=1:n o=o+(e(i,j)*h1(j,r)); er(i,r)=mod(o,2);

for i=1:n rec1=c(2^k,i)+e(1,i); rec(1,i)=mod(rec1,2); for i=1:1 for r=1:n-k o=0; for j=1:n o=o+(rec(i,j)*h1(j,r)); sy(i,r)=mod(o,2); i=1; j=1; while sy(1,j)==er(i,j)&&sy(1,j+1)==er(i,j+1)&&sy(1,j+2)==er(i,j+2) rec_er=e(i,:); i=i+1; rec_er %Error Corrected Message for i=1:n Det=rec(1,i)+rec_er(1,i); det_rec(1,i)=mod(det,2);

det_rec RESULT: Thus the error control coding techniques are executed using MATLAB programs.