ece 321 updated

26
1| Page LABORATORY MANUAL ECE 321: Communication System S. No. List of the Experiments Page. No. 1. To obtain Amplitude modulated envelope & determine depth of modulation. 2 – 4 2. To study envelope detector for the demodulation of AM signal. 5 – 6 3. To generate a FM Signal and measure Depth of modulation. 7 – 8 4. To obtain Pulse amplitude modulated signal. 9 – 10 5. To obtain Pulse width modulated signal. 11 – 12 6. Implementation of various pulse data coding techniques. 13 – 14 7. Implementation of Time Division Multiplexing. 15 – 17 8. Implementation of Amplitude, Frequency, & Phase shift keying techniques. 18 – 22 9. Implementation of Pulse Code Modulation. 23 – 24 10. Implementation of Delta Modulation and Demodulation. 25 – 26

Upload: shivendra-kumar-singh

Post on 13-Apr-2015

74 views

Category:

Documents


11 download

DESCRIPTION

nn

TRANSCRIPT

Page 1: Ece 321 Updated

1 | P a g e

LABORATORY MANUAL

ECE 321: Communication System

S. No. List of the Experiments Page. No.

1. To obtain Amplitude modulated envelope & determine depth of modulation. 2 – 4

2. To study envelope detector for the demodulation of AM signal. 5 – 6

3. To generate a FM Signal and measure Depth of modulation. 7 – 8

4. To obtain Pulse amplitude modulated signal. 9 – 10

5. To obtain Pulse width modulated signal. 11 – 12

6. Implementation of various pulse data coding techniques. 13 – 14

7. Implementation of Time Division Multiplexing. 15 – 17

8. Implementation of Amplitude, Frequency, & Phase shift keying techniques. 18 – 22

9. Implementation of Pulse Code Modulation. 23 – 24

10. Implementation of Delta Modulation and Demodulation. 25 – 26

Page 2: Ece 321 Updated

2 | P a g e

Experiment – 1

1. Experiment: To design and implement on a breadboard a circuit to perform Amplitude modulation.

2. Equipment Required: One Zener diode, two 10k & one 1kohm resistors, one 0.01µF capacitor, One 0.5Henry inductor, CRO(20 Mhz), Two Function generators(1Mhz), connecting wires and CRO-probes.

3. Learning Objectives: To implement the concept of Amplitude modulation.

4. Circuit diagram:

5. Outline of the Procedure:

a) Connect the circuit as per the given circuit diagram.

b) Apply fixed frequency carrier signal to carrier input terminals.

c) Apply modulating signal from function generator of 0.8VP-P of 1KHz.

d) Note down and trace the modulated signal envelop on the CRO screen., and Find the modulation index by measuring Vmax and Vmin from the modulated (detected/ traced) envelope.

e) m=(Vmax –Vmin)/(Vmax+Vmin).

f) Repeat the steps 4 & 5 by changing the frequency or/& amplitude of the modulating signal so as to observe over modulation, under modulating and perfect modulation.

6. For demodulation, apply the modulated signal (A.M) as an input to the demodulator and verify the demodulated output with respect to the applied modulating signals and their respective outputs.

Page 3: Ece 321 Updated

3 | P a g e

7. Required Results:

Page 4: Ece 321 Updated

4 | P a g e

8. Observation Table:

9. Error Analysis:

Calculate Modulation index using mathematical formula mc = Vm/Vc.

%AGE ERROR = ((m –mc)/ mc)x100%

10. Learning Outcomes: To be written by students in 50-70 words.

Page 5: Ece 321 Updated

5 | P a g e

Experiment - 2

1. Experiment: To study envelop detector for demodulation of AM signal and observe diagonal peak clipping effect.

2. Equipment Required: One Diode (0A79), 100 K-ohm resistance, 2uF Capacitor, CRO (20 Mhz),Amplitude Modulator-Trainer kit, connecting wires and probes.

3. Learning Objectives: Practically implement the concept of Amplitude demodulation.

4. Circuit Diagram:

5. Outline of the Procedure:

a) Connect the circuit diagram as shown above.

b) Feed the AM wave to the demodulator circuit and observe the output

c) Note down frequency and amplitude of the demodulated output waveform.

d) Draw the demodulated wave form for m=1.

Page 6: Ece 321 Updated

6 | P a g e

6. Required Results:

7. Observation Table:

8. Learning Outcomes: to be written by students in 50-70 words.

Page 7: Ece 321 Updated

7 | P a g e

Experiment -3

1. Experiment: To generate a FM Signal and measure Depth of modulation,

2. Equipment required: One 10k, 15kohm resistors each, One 0.1µFcapacitor, One IC 555 Timer, CRO (20 Mhz), Function generator (1Mhz), connecting wires and probes, Regulated Power Supply (0-30V, 1A).

3. Learning Objectives: To implement the concept of Frequency modulation.

4. Circuit diagram:

5. Outline of the Procedure:

a) Connect the circuit as per the given circuit diagram.

b) Apply the modulating signal of 100HZ with 3Vp-p.

c) Trace the modulated wave on the C.R.O & plot the same on graph.

d) Find the modulation index by measuring minimum and maximum frequency deviations from the carrier frequency using the CRO.

e) M = S/f = maximum Frequency deviation /modulating signal frequency

f) Repeat the steps 3& 4 by changing the amplitude and /or frequency of the modulating Signal.

Page 8: Ece 321 Updated

8 | P a g e

6. Required Results:

7. Observation Table:

Formula used: mf = δ / fm; where δ = k Vm fc and K is the proportionality constant.

7. Learning Outcomes: To be written by students in 50-70 words.

Page 9: Ece 321 Updated

9 | P a g e

Experiment -4

1. Experiment: To obtain Pulse Amplitude Modulated Signal.

2. Equipment required: One 1k, 10k, 100k, 2.2k & 5.8kohm resistors each, Two BC107 transistors, One 10µF & 0.001μF capacitors each, CRO (20 Mhz), Function generator (1Mhz), connecting wires and probes, Regulated Power Supply (0-30V, 1A).

3. Learning Objectives: To implement the concept of Pulse Amplitude Modulated Signal.

4. Circuit diagram:

5. Outline of the Procedure:

a) Connect the circuit as per the given circuit diagram.

b) Set the modulating frequency to 1KHz and sampling frequency to 8 or 12KHz.

c) Observe the o/p on CRO i.e. PAM wave.

d) Measure the levels of Emax & Emin.

e) Repeat the steps from ‘b’ to ‘d’, for different types of modulating signals (sine, square, triangular).

f) Plot the wave forms on graph sheet.

Page 10: Ece 321 Updated

10 | P a g e

6. Required Results:

7. Observations:

Sampling rate: The repetition rate of the sampling signal is called the sampling rate, or sampling frequency, and is abbreviated fs. Observation in the time domain shows that, when the sampling rate fs is much greater than the frequency of the message signal fm, the PAM signal clearly resembles the message signal. If the sampling rate is reduced, or the message signal frequency is increased, the resemblance is less visible. It is neither fs nor fm alone that determines the degree of resemblance between the PAM and message signals, it is the ratio fs /fm. The lower this ratio, the less the resemblance.

If the pulses are narrow, PAM signals require little power for transmission and lend themselves easily to time-division multiplexing. Flat-topped pulses are easily regenerated by repeater stations and can be used for transmission over long distances. However, unlike other types of pulse modulation, PAM signals are affected by noise as much as analog signals are. Using PAM, therefore, offers little resistance or protection against noise in the transmission channel.

7. Learning Outcomes: To be written by students in 50-70 words.

Page 11: Ece 321 Updated

11 | P a g e

Experiment -5

1. Experiment: To obtain Pulse Width Modulated Signal.

2. Equipment required: One 1.2k, 1.5kohm & two 8.2kohm resistors, two 0.01µF & 1μF capacitors each, One Diode-0A79, One IC 555 Timer, CRO (20 Mhz), Function generator (1Mhz), connecting wires and probes, Regulated Power Supply (0-30V, 1A).

3. Learning Objectives: To implement the concept of Pulse Width Modulated Signal.

4. Circuit diagram:

5. Outline of the Procedure:

a) Connect the circuit as per the given circuit diagram.

b) Apply a trigger signal (Pulse wave) of frequency 2 KHz with amplitude of 5V (p-p).

c) Observe the sample signal at the pin3.

d) Apply the ac signal at the pin 5 and vary the amplitude, and note that, as the control voltage is varied output pulse width is also varied.

e) Observe that the pulse width increases during positive slope condition & decreases under negativeslope condition. Pulse width will be maximum at the +ve peak and minimum at the –ve peak ofsinusoidal waveform. Record the observations and plot the wave forms.

Page 12: Ece 321 Updated

12 | P a g e

6. Required Results:

7. Observation Table:

7. Learning Outcomes: To be written by students in 50-70 words.

Page 13: Ece 321 Updated

13 | P a g e

Experiment – 6

1. Experiment: Implementation of various pulse data coding techniques using matlab/simulink.

2. Equipments Required: MatLab-7.5 Software.

3. Learning Objectives: To implement the MatLab code for various pulse data coding techniques.

4. MatLab Code:

%Pulse data coding techniquesa=[1 0 0 1 1]; U=a;n=length(a);U(n+1)=U(n);

%POLARP=a;for k=1:n; if a(k)==0 P(k)=-1; end P(n+1)=P(n);end

%BipolarB=a;f = -1;for k=1:n; if B(k)==1; if f==-1; B(k)=1; f=1; else B(k)=-1; f=-1; end

end B(n+1)=B(n);end

%MarkM(1)=1;for k=1:n; M(k+1)=xor(M(k), a(k));end

%SpaceS(1)=1;for k=1:n S(k+1)=not(xor(S(k), a(k)));end

Page 14: Ece 321 Updated

14 | P a g e

%Plotting Wavessubplot(5, 1, 1); stairs(U) axis([1 n+2 -2 2]) title('Unipolar NRZ') grid onsubplot(5, 1, 2); stairs(P) axis([1 n+2 -2 2]) title('Polar NRZ') grid onsubplot(5, 1, 3); stairs(B) axis([1 n+2 -2 2]) title('Bipolar NRZ') grid onsubplot(5, 1, 4); stairs(M) axis([1 n+2 -2 2]) title('NRZ-Mark') grid onsubplot(5, 1, 5); stairs(S) axis([1 n+2 -2 2]) title('NRZ-Space') grid on

5. Outline of the Procedure:

a) Open a new M-File or Script window in MatLab.

b) Type the MatLab code and execute it.

c) View the results in command window / figure window.

6. Required Results:

7. Learning Outcomes: To be written by students in 50-70 words.

Page 15: Ece 321 Updated

15 | P a g e

Experiment – 7

1. Experiment: Implementation of time division multiplexing using matlab/simulink.

2. Equipments Required: MatLab-7.5 Software.

3. Learning Objectives: To implement the MatLab code for time division multiplexing.

4. MatLab Code:

%Time division multiplexingfs=10000;t=0:1/fs:1.5;x1=sawtooth(2*pi*50*t);x2=square(2*pi*50*t);x3=sin(2*pi*50*t);

subplot(2,2,1),plot(t,x1),axis([0 0.2 -1.2 1.2]); xlabel('time(sec)'); ylabel('amplitude'); title('sawtooth periodic wave');subplot(2,2,2),plot(t,x2),axis([0 0.2 -1.2 1.2]); xlabel('time(sec)'); ylabel('amplitude'); title('square wave');subplot(2,2,3),plot(t,x3),axis([0 0.2 -1.2 1.2]); xlabel('time(sec)'); ylabel('amplitude'); title('sin wave');

l1=length(x1); l2=length(x2);l3=length(x3); for i=1:l1 x(1,i)=x1(i); x(2,i)=x2(i); x(3,i)=x3(i);end

tdmx=reshape(x,1,3*l1);figure; plot(tdmx);

dmx=reshape(tdmx,3,l1);for i=1:l1 x4(i)=dmx(1,i); x5(i)=dmx(2,i); x6(i)=dmx(3,i);endfigure;subplot(2,2,1),plot(x4); axis([0 1000 -1 1]); xlabel('time(sec)'); ylabel('amplitude'); title('recovered sawtooth periodic wave');

Page 16: Ece 321 Updated

16 | P a g e

subplot(2,2,2),plot(x5); axis([0 1000 -1 1]); xlabel('time(sec)'); ylabel('amplitude'); title('recovered square wave');subplot(2,2,3),plot(x6); axis([0 1000 -1 1]); xlabel('time(sec)'); ylabel('amplitude'); title('recovered sin wave');

5. Outline of the Procedure:

a) Open a new M-File or Script window in MatLab.

b) Type the MatLab code and execute it.

c) View the results in command window / figure window.

6. Required Results:

Transmitted signal:

Page 17: Ece 321 Updated

17 | P a g e

TDM signal:

Received signal:

7. Learning Outcomes: To be written by students in 50-70 words.

Page 18: Ece 321 Updated

18 | P a g e

Experiment – 8(a)

1. Experiment: Implementation of amplitude shift keying modulator and demodulator using matlab/simulink.

2. Equipments Required: MatLab-7.5 Software.

3. Learning Objectives: To implement the MatLab code for amplitude shift keying.

4. MatLab Code:

%Amplitude shift keyingclc;clear all;close all;s=[1 0 1 1 1 0];f1=10;a=length(s);for i=1:a f=f1*s(1,i); for t=(i-1)*100+1:i*100 x(t)=sin(2*pi*f*t/1000) endendplot(x) xlabel('time in secs') ylabel('amplitude in volts') title('ASK') grid on

5. Outline of the Procedure:

a) Open a new M-File or Script window in MatLab.

b) Type the MatLab code and execute it.

c) View the results in command window / figure window.

6. Required Results:

7. Learning Outcomes: To be written by students in 50-70 words.

Page 19: Ece 321 Updated

19 | P a g e

Experiment – 8(b)

1. Experiment: Implementation of frequency shift keying modulator and demodulator using matlab/simulink.

2. Equipments Required: MatLab-7.5 Software.

3. Learning Objectives: To implement the MatLab code for frequency shift keying.

4. MatLab Code:

%Frequency shift keyingclc;clear all;close all;s=[1 0 1 0];f1=10;f2=50;a=length (s);for i=1:a if s(1,i)==1 freq=f1*s(1,i); for t= (i-1)*100+1:i*100 x(t)= sin(2*pi*freq*t/1000); end elseif s(1,i)==0 b=(2*s(1,i))+1; freq=f2*b; for t=(i-1)*100+1:i*100 x(t)= sin(2*pi*freq*t/1000); end endendplot(x); xlabel('title in secs'); ylabel('amplitude in volts') title ('FSK') grid on

5. Outline of the Procedure:

a) Open a new M-File or Script window in MatLab.

b) Type the MatLab code and execute it.

c) View the results in command window / figure window.

Page 20: Ece 321 Updated

20 | P a g e

6. Required Results:

7. Learning Outcomes: To be written by students in 50-70 words.

Page 21: Ece 321 Updated

21 | P a g e

Experiment – 8(c)

1. Experiment: Implementation of phase shift keying modulator and demodulator using matlab/simulink.

2. Equipments Required: MatLab-7.5 Software.

3. Learning Objectives: To implement the MatLab code for phase shift keying.

4. MatLab Code:

%Phase shift keyingclc;clear all;close all;s=[1 0 1 0];f1=10;a=length(s);for i=1:a if s(1,i)==1 freq=f1*s(1,i); for t= (i-1)*100+1:i*100 x(t)= sin(2*pi*freq*t/1000); end elseif s(1,i)==0 b=(2*s(1,i))+1; freq=f1*b; for t=(i-1)*100+1:i*100 x(t)= sin((2*pi*freq*t/1000)+pi); end

endendplot(x); xlabel('title in secs'); ylabel('amplitude in volts') title ('PSK') grid on

5. Outline of the Procedure:

a) Open a new M-File or Script window in MatLab.

b) Type the MatLab code and execute it.

c) View the results in command window / figure window.

Page 22: Ece 321 Updated

22 | P a g e

6. Required Results:

7. Learning Outcomes: To be written by students in 50-70 words.

Page 23: Ece 321 Updated

23 | P a g e

Experiment – 9

1. Experiment: Implementation of pulse code modulation using matlab/simulink.

2. Equipments Required: MatLab-7.5 Software.

3. Learning Objectives: To implement the MatLab code for pulse code modulation.

4. MatLab Code:

%Puse code modulationA=2;fc=3;fs=20;n=3;t=0:1/(100*fc):1;

x=A*sin(2*pi*fc*t);ts=0:1/fs:1;xs=A*sin(2*pi*fc*ts);

x1=xs+A;x1=x1/(2*A);L=(-1+2^n);x1=L*x1;xq=round(x1);r=xq/L;r=2*A*r;r=r-A;

y=[];

for i=1:length(xq); d=dec2bin(xq(i),n); y=[y double(d)-48];end

MSE=sum((xs-r).^2)/length(x);Bitrate=n*fs;Stepsize=2*A/L;QNoise=((Stepsize)^2)/12;

subplot(3,1,1); plot(t,x,'linewidth',2) title('step 1') ylabel('y axis') xlabel('t(in sec)') hold on stem(ts,xs,'r','linewidth',2) hold off legend('analog signal',' sampling');

Page 24: Ece 321 Updated

24 | P a g e

subplot(3,1,2); stem(ts,x1,'linewidth',2) title('step 2') ylabel('Y axis') hold on stem(ts,xq,'r','linewidth',2) plot(ts,xq,'--r') plot(t,(x+A)*L/(2*A),'--b') grid hold off legend('Quantization','sampling');

subplot(3,1,3); stairs([y y(length(y))],'linewidth',2) title('PCM') ylabel('Y axis') xlabel('bits') axis([0 length(y) -2 2]) grid

5. Outline of the Procedure:

a) Open a new M-File or Script window in MatLab.

b) Type the MatLab code and execute it.

c) View the results in command window / figure window.

6. Required Results:

7. Learning Outcomes: To be written by students in 50-70 words.

Page 25: Ece 321 Updated

25 | P a g e

Experiment – 10

1. Experiment: Implementation of delta modulation using matlab/simulink.

2. Equipments Required: MatLab-7.5 Software.

3. Learning Objectives: To implement the MatLab code for delta modulation.

4. MatLab Code:

% DELTA MODULATiON figure(1);a=2;t=0:2*pi/50:2*pi;x=a*sin(t);l=length(x);plot(x,'r');delta=0.2;hold onxn=0;for i=1:l; if x(i)>xn(i) d(i)=1; xn(i+1)=xn(i)+delta; else d(i)=0; xn(i+1)=xn(i)-delta; endendstairs(xn)hold onfor i=1:d if d(i)>xn(i) d(i)=0; xn(i+1)=xn(i)-delta; else d(i)=1; xn(i+1)=xn(i)+delta; endendplot(xn,'c'); legend('Analog signal','Delta modulation','Demodulation') title('DELTA MODULATION / DEMODULATION ')

5. Outline of the Procedure:

a) Open a new M-File or Script window in MatLab.

b) Type the MatLab code and execute it.

c) View the results in command window / figure window.

Page 26: Ece 321 Updated

26 | P a g e

6. Required Results:

7. Learning Outcomes: To be written by students in 50-70 words.