CE-II Lab Manual

66
Circuit Diagrams: For modulation: For demodulation:

Transcript of CE-II Lab Manual

Page 1: CE-II Lab Manual

Circuit Diagrams:For modulation:

For demodulation:

Page 2: CE-II Lab Manual

1. Amplitude Modulation & DemodulationAim:1. To generate amplitude modulated wave and determine the percentage modulation.2. To Demodulate the modulated wave using envelope detector.

Apparatus Required:Component Range QuantityTransistor SL 100 1Diode IN 4007 1Resistor 39K,100Ω 1 eachCapacitor 0.01µF 1Inductor 130mH 1CRO 20MHz 1Function Generator 1MHz 1Regulated Power Supply

(0-30V) 1

Theory:Amplitude Modulation is defined as a process in which the amplitude of the carrier wave

c(t) isvaried linearly with the instantaneous amplitude of the message signal m(t).The demodulation circuit is used to recover the message signal from the incoming AMwave at the receiver. An envelope detector is a simple and yet highly effective device that is well suitedfor the demodulation of AM wave, for which the percentage modulation is less than 100%.Ideally, anenvelope detector produces an output signal that follows the envelop of the input signal wave form exactly;hence, the name. Some version of this circuit is used in almost all commercial AM radio receivers.

Procedure:1. The circuit is connected as per the circuit diagram shown in Fig.1.2. Switch on + 12 volts VCC supply.3. Apply sinusoidal signal of 1 KHz frequency and amplitude 2 Vp-p as modulating signal, and carriersignal of frequency 11 KHz and amplitude 15 Vp-p.4. Now slowly increase the amplitude of the modulating signal up to 7V and note down values of Emaxand Emin.5. Calculate modulation index using equation6. Repeat step 5 by varying frequency of the modulating signal.7. Plot the graphs: Modulation index vs Amplitude & Frequency8. Connect the circuit diagram as shown in Fig.2.9. Feed the AM wave to the demodulator circuit and observe the output10. Note down frequency and amplitude of the demodulated output waveform.11. Draw the demodulated wave form .

Page 3: CE-II Lab Manual

Waveforms and graphs:

Page 4: CE-II Lab Manual

Observations

SIGNAL AMPLITUDE TIME PERIOD

Result:

Page 5: CE-II Lab Manual

FM Modulator:

FM Demodulator:

Page 6: CE-II Lab Manual

2. Frequency Modulation And DemodulationAim:1. To generate frequency modulated signal and determine the modulation index andbandwidth for various values of amplitude and frequency of modulating signal.2. To demodulate a Frequency Modulated signal using FM detector.

Apparatus required:

Component Range QuantityIC IC 566, IC 565 1 eachResistor 15KΩ,

10KΩ,1.8KΩ,560Ω,39KΩ1 ,2,1,2.2

Capacitor 0.1µF,0.001µF,100pF,470pF 1,1,12CRO 20MHz 1Function Generator 1MHz 1Regulated Power Supply

(0-30V) 1

Theory:The process, in which the frequency of the carrier is varied in accordance with theinstantaneous amplitude of the modulating signal, is called “Frequency Modulation”.Procedure:Modulation:1. The circuit is connected as per the circuit diagram 2. Without giving modulating signal observe the carrier signal at pin no.2 (at pin no.3 for IC 566).Measure amplitude and frequency of the carrier signal. To obtain carrier signal of desired frequency,find value of R from f = 1/ (2ΠRC) taking C=100pF.3. Apply the sinusoidal modulating signal of frequency 4 KHz and amplitude 3Vp-p at pin no.7. ( pin no.5 for IC 566)Now slowly increase the amplitude of modulating signal and measure fmin and maximum frequencydeviation Δf at each step. Evaluate the modulating index (mf = β) using Δf / fm where Δf = |fc - fmin|.Calculate Band width. BW = 2 (β + 1) fm = 2(Δf + fm)4. Repeat step 4 by varying frequency of the modulating signal.Demodulation:1. Connections are made as per circuit diagram 2. Check the functioning of PLL (IC 565) by giving square wave to input and observing theoutput3. Frequency of input signal is varied till input and output are locked.4. Now modulated signal is fed as input and observe the demodulated signal (output) onCRO.5. Draw the demodulated wave form.

Page 7: CE-II Lab Manual

Model Graph

Page 8: CE-II Lab Manual

Observation:

SIGNAL AMPLITUDE TIME PERIOD

Result:

Page 9: CE-II Lab Manual

Pulse Amplitude Modulator

Pulse Amplitude Demodulator

Page 10: CE-II Lab Manual

3a. PULSE AMPLITUDE MODULATION & DEMODULATION

Aim:To generate the Pulse Amplitude modulated and demodulated signals.

Apparatus required:

Component Range QuantityTransistor BC 107 2Resistor 1KΩ,

10KΩ,100KΩ,5.8KΩ,2.2KΩ1 ,1,1,1.1

Capacitor 10µF,0.001µF 1,1CRO 20MHz 1Function Generator 1MHz 1Regulated Power Supply

(0-30V) 1

Theory:PAM is the simplest form of data modulation .The amplitude of uniformly spaced pulses is varied inproportion to the corresponding sample values of a continuous message m (t). A PAM waveform consists of a sequence of flat-topped pulses. The amplitude of each pulse correspond to the value of the message signal x (t) at the leading edge of the pulse. The pulse amplitude modulation is the process in which the amplitudes of regularity spaced rectangular pulses varies with the instantaneous sample values of a continuous message signal in a one-one fashion.

Procedure:1. Connect the circuit as per the circuit diagram shown in the fig 32. Set the modulating frequency to 1 KHz and sampling frequency to 12 KHz3. Observe the o/p on CRO i.e. PAM wave.4. Measure the levels of Emax & Emin.5. Feed the modulated wave to the low pass filter.6. The output observed on CRO will be the demodulated wave.7. Note down the amplitude (p-p) and time period of the demodulated wave. Vary the amplitude andfrequency of modulating signal. Observe and note down the changes in output.8. Plot the wave forms on graph sheet.

Page 11: CE-II Lab Manual

Bipolar PAM:

Uni polar PAM

Page 12: CE-II Lab Manual

Observation:

SIGNAL AMPLITUDE TIME PERIOD

Result:

Page 13: CE-II Lab Manual

Pulse Width Modulation:

Pulse Width Demodulation:

Page 14: CE-II Lab Manual

3(b). PULSE WIDTH MODULATION AND DEMODULATION

Aim: To generate the pulse width modulated and demodulated signals

Apparatus required:

Component Range QuantityIC IC 555 1Resistor 1.2KΩ, 1.5KΩ,8.2KΩ 1 ,1Capacitor 1µF,0.01µF 1,1CRO 20MHz 1Function Generator 1MHz 1Regulated Power Supply

(0-30V) 1

Theory:Pulse Time Modulation is also known as Pulse Width Modulation or Pulse Length Modulation. In PWM,the samples of the message signal are used to vary the duration of the individual pulses. Width may bevaried by varying the time of occurrence of leading edge, the trailing edge or both edges of the pulse inaccordance with modulating wave. It is also called Pulse Duration Modulation.Procedure:1. Connect the circuit as per circuit diagram shown in fig 1.2. Apply a trigger signal (Pulse wave) of frequency 2 KHz with amplitude of 5v (p-p).3. Observe the sample signal at the pin3.4. Apply the ac signal at the pin 5 and vary the amplitude.

5. Note that as the control voltage is varied output pulse width is also varied.

6. Observe that the pulse width increases during positive slope condition & decreases under negative slope condition. Pulse width will be maximum at the +ve peak and minimum at the –ve peak of sinusoidal waveform. Record the observations.

Page 15: CE-II Lab Manual

Model Graph:

Page 16: CE-II Lab Manual

Observation:

SIGNAL AMPLITUDE TIME PERIOD

Result:

Page 17: CE-II Lab Manual

Pulse Position Modulation:

Pulse Position DeModulation:

Page 18: CE-II Lab Manual

3(c). PULSE POSITION MODULATION & DEMODULATIONAim: To generate pulse position modulation and demodulation signals and to study the effect ofamplitude of the modulating signal on output.

Apparatus required:

Component Range QuantityIC IC 555 1Resistor 3.9KΩ, 3KΩ,10KΩ,680KΩ 1 ,1Capacitor 60µF,0.01µF 2,1CRO 20MHz 1Function Generator 1MHz 1Regulated Power Supply

(0-30V) 1

Theory:

In Pulse Position Modulation, both the pulse amplitude and pulse duration are held constant but theposition of the pulse is varied in proportional to the sampled values of the message signal. Pulse timemodulation is a class of signaling techniques that encodes the sample values of an analog signal on tothe time axis of a digital signal and it is analogous to angle modulation techniques. The two main typesof PTM are PWM and PPM. In PPM the analog sample value determines the position of a narrow pulserelative to the clocking time. In PPM rise time of pulse decides the channel bandwidth. It has low noiseinterference.

Page 19: CE-II Lab Manual

Procedure:1. Connect the circuit as per circuit diagram as shown in the fig 1.2. Observe the sample output at pin 3 and observe the position of the pulses on CRO and adjust theamplitude by slightly increasing the power supply. Also observe the frequency of pulse output.3. Apply the modulating signal, sinusoidal signal of 2V (p-p) (ac signal) 2v (p-p) to the control pin 5using function generator.4. Now by varying the amplitude of the modulating signal, note down the position of the pulses.

5. During the demodulation process, give the PPM signal as input to the demodulated circuit as shownin Fig.2.6. Observe the o/p on CRO.7. Plot the waveform.

Model Graph:

Page 20: CE-II Lab Manual

Observation:

Page 21: CE-II Lab Manual

SIGNAL AMPLITUDE TIME PERIOD

Result:

ASK Modulator:

Page 22: CE-II Lab Manual

ASK Demodulator:

4a. AMPLITUDE SHIFT KEYING

Page 23: CE-II Lab Manual

AIM:To construct the amplitude shift keying modulation & demodulation circuit and to obtain

its waveform.

EQUIPMENTS REQUIRED:

1. OPAMP-IC 7412. FET-BFW103. Diode-OA794. Resistors-10k, 47k, 1k, 11k5. Capacitors 0.1µF6. Signal generator (0-2) MHz.7. CRO-(0-20) MHz.8. RPS-(0-15) V9. Bread board10. Connecting wires.

THEORY:

The simplest method of modulating a carrier with a data stream is to change the amplitude of the carrier wave every time the data changes. This modulation technique is known amplitude shift keying. The simplest way of achieving amplitude shift keying is by switching ‘On’ the carrier whenever the data bit is '1' & switching off. Whenever the data bit is '0' i.e. the transmitter outputs the carrier for a' 1 ‘& totally suppresses the carrier for a '0'. This technique is known as ‘On-Off’ keying.

The ASK waveform is generated by a balanced modulator circuit, also known as a linear multiplier. As the name suggests, the device multiplies the instantaneous signal at its two inputs. The output voltage is being product of the two input voltages at any instance of time. One of the inputs is AC coupled 'carrier' wave of high frequency. Generally, the carrier wave is a sine wave since any other waveform would increase the bandwidth, without providing any advantages. The other input which is the information signal to be transmitted, is DC coupled. It is known as modulating signal.

PROCEDURE:

1. Construct the ASK modulator and demodulator circuits as per the circuit diagram.2. A digital data input and carrier signal are given as input to the ASK modulator and

observe the output on the CRO.3. The output of the ASK modulator is given as input to the ASK demodulator circuit.4. The demodulator output is observed and the graph is plotted for different waveforms.

TABULATION:

Page 24: CE-II Lab Manual

SIGNAL AMPLITUDE(v) TIME PERIOD(ms)

RESULT:

The ASK modulator & demodulator circuits are constructed and its waveforms are obtained.

Page 25: CE-II Lab Manual

FSK Modulator:

Model Graph:

Page 26: CE-II Lab Manual

4b. FREQUENCY SHIFT KEYING

AIM:

To construct the FSK modulation and demodulation circuit and to obtain its waveforms.

EQUIPMENTS REQUIRED:

1. IC XR2206.

2. Resistors -5.1kΩ (3)

3. Variable resistors-50k Ω, 200k Ω.

4. Capacitors-0.01µF, 10µF, 1µF, 1nF.

5. Function generator (0-1) MHz.

6. RPS (0-15) V.

7. CRO (0-20) MHZ.

THEORY:

FSK is one of the three main digital modulation techniques. In frequency shift keying, the carrier frequency is shifted in steps i.e. from one frequency to another corresponding to the digital modulation signal. The higher frequency is used to represent a data '1' & lower frequency a data '0',

Since the amplitude change in FSK waveform does not matter, this modulation technique is very reliable even in noisy & fading channels. But there is always a price to be paid to gain that advantage. The price in this case is widening of the required bandwidth. The bandwidth increase depends upon the two carrier frequencies used & the digital data rate. Also, for a given data, the higher the frequencies & the more they differ from each other, the wider the required bandwidth. The bandwidth required is at least doubled than that in the ASK modulation.

FSK Demodulator:

The demodulation of FSK waveform can be carried out by a phase locked loop. As known, the phase locked loop tries to 'lock' to the input frequency. It achieves this by generating corresponding output voltage to be fed to the voltage controlled oscillator, if any frequency deviation at its input is encountered. Thus the PLL detector follows the frequency changes & generates proportional output voltage. The output voltage from PLL contains the carrier components. Therefore the signal is passed through the low pass filter to remove them. The resulting wave is too rounded to be used for digital data processing. Also, the amplitude level may be very low due to channel attenuation. The signal is ‘Squared Up’ by feeding it to the voltage comparator.

Page 27: CE-II Lab Manual

PROCEDURE:

1. Make the connection according to the circuit diagram.

2. A digital data input and carrier signal are given as input to the FSK modulator and observe the output on the CRO.

3. The output of the FSK modulator is given as input to the FSK demodulator circuit.

4. The demodulator output is observed and the graph is plotted for different waveforms.

Page 28: CE-II Lab Manual

TABULATION:

SIGNAL AMPLITUDE(v) TIME PERIOD(ms)

RESULT:

The frequency shift keying modulator and demodulator circuit are constructed and its waveforms are obtained.

Page 29: CE-II Lab Manual

PSK Modulator:

Model Graph:

4c.BINARY PHASE SHIFT KEYING

Page 30: CE-II Lab Manual

4 -C BIN ARY PHASE SHIFT KEYING

AIM:

To construct the BPSK modulation and demodulation circuit and to obtain its waveforms.

EQUIPMENTS REQUIRED:

1. IC XR2206.

2. Resistors -5.1kΩ (2), 50kΩ (1), 68kΩ (1).

3. Variable resistors-10k Ω, 200k Ω.

4. Capacitors- 10µf (2), 1µf (1), 1nf (1).

5. Function generator (0-1) Mhz.

6. Diode- OA79.

7. CRO (0-20) Mhz.

8. Connecting wires

9. Bread board

THEORY:

Binary Phase Shift Keying (BPSK)involves the phase change at the carrier sine wave between 0 to 180 degree in accordance with the data stream to be transmitted. PSK modulator is similar to ASK modulator both used balanced modulator to multiply the carrier with balanced modulator signal. The digital signal applied to Modulation input for PSK generation is bipolar i.e. equal positive and negative voltage level. When the modulating input is positive the output at modulator is a line wave in phase with the carrier input whereas for positive voltage level, the output of modulator is a sine wave which is switched out of phase by 180 degree from the carrier input.

PROCEDURE:

1. Connections are given as per the circuit diagram.2. The ninth pin of XR 2206 is grounded.3. The unmodulated carrier at the output pin is observed on the CRO.4. The wave shaping and gain control potentiometer is adjusted to get a proper

waveform.5. The input and the output waveforms are drawn in the graph.

Page 31: CE-II Lab Manual

TABULATION:

RESULT:

Thus the circuit for binary phase shift keying is constructed and the output waveforms are obtained.

SIGNAL AMPITUDE(V) TIME PERIOD(ms)

Page 32: CE-II Lab Manual

PCM:

Page 33: CE-II Lab Manual

5. PULSE CODE MODULATION

AIM:

To study the operation of the pulse code modulation and the demodulation using the PCM trainer kit.

EQUIPMENTS REQUIRED:

1. PCM trainer kit 2. RPS (0-30)V3. CRO (0-20)MHz4. Probes5. Connecting Wires

THEORY:

Pulse code modulation systems are complex in that message signal is subjected to the large number of operations. The essential operations in the transmitter of a PCM system are sampling, quantizing, and the encoding. The sampling, quantizing, encoding operations are usually performed by the same circuit analog the transmitter path. At the receiver, the essential operation consists of one last stage of the regeneration followed by the decoding and then the demodulation.

SAMPLING:

The incoming message signal is sampled with a train of the narrow rectangular pulses so that to closely approximate of the instantaneous sampling process. In order to ensure perfect reconstruction of the message at the receiver, the sampling rate must be greater than twice the highest frequency component of the message signal in accordance with sampling theorem.

QUANTIZING:

The conversion of analog sample of the signal into a discrete form is called quantizing power.

ENCODING:

It is used to translate the discrete set of sample values to a more appropriate form of signal.

PROCEDURE:

1. The PCM modulation and demodulation bits are arranged as per the circuit diagram and connections are given.

2. The PAM output is noted from the position of the bit.3. The PCM output generated from the PAM output.4. The modulation and demodulation are done.

Page 34: CE-II Lab Manual

Block Diagram:

Page 35: CE-II Lab Manual

TABULAR COLUMN:

OUTPUT AMPLITUDE(V) TIME(ms)

RESULT:

Thus the pulse code modulation is constructed successfully and the result is obtained.

Page 36: CE-II Lab Manual

6.POWER BUDGET ANALYSIS OF AN OPTICAL LINKAIM

To write a program for the power budget analysis of an optical link

PROGRAM:#include<stdio.h>#include<conio.h>#include<math.h>void main()float ptr,prec,cl,af,ac,l,ms,p;inti;clrscr();printf("\n\n");printf("\nPOWER BUDGET ANALYSIS OF AN OPTICAL FIBER LINK");printf("\nEnter the transmission power(ptr) in dBm:");scanf("%f",&ptr);printf("\nEnter the reciever sensitivity(prec) in dBm:");scanf("%f",&prec);printf("\nEnter the systems margin(ms) in dB:");scanf("%f",&ms);printf("\nEnter the avl channel loss(cl) in dB:");scanf("%f",&cl);printf("\nEnter the connector loss(ac) in dB:");scanf("%f",&ac);printf("\nEnter the fiber cable loss(af) in dB/km:");scanf("%f",&af);l=(cl-ac)/af;p=ptr-prec;printf("\n\nTotal power loss of optical fibver system=%5.2fdB",p);printf("\nMax length of fiber=%5.2f km",l);for(i=1;i<=1;i++)p=ac+(af*i);printf("\n Total power when max fiber length is %d km=%5.2fdB",i,p);getch();

Page 37: CE-II Lab Manual

OUTPUT:

POWER BUDGET ANALYSIS OF AN OPTICAL FIBER LINKEnter the transmission power(ptr) in dBm:3Enter the recieversensitivity(prec) in dBm:-30Enter the systems margin(ms) in dB:2.5Enter the avl channel loss(cl) in dB:3.5Enter the connector loss(ac) in dB:1Enter the fiber cable loss(af) in dB/km:1.2Total power loss of optical fibver system=33.00dBMax length of fiber= 2.08 kmTotal power when max fiber length is 1 km= 2.20dB

Page 38: CE-II Lab Manual

POWER BUDGET ANALYSIS OF AN OPTICAL FIBER LINK WITH JUMPERPROGRAM:#include<stdio.h>#include<conio.h>#include<math.h>void main()float ptr,prec,cl,af,l,ms,p,jl;inti;clrscr();printf("\n\n");printf("\nPOWER BUDGET ANALYSIS OF AN OPTICAL FIBER LINK WITH JUMPER");printf("\nEnter the transmission power(ptr) in dBm:");scanf("%f",&ptr);printf("\nEnter the reciever sensitivity(prec) in dBm:");scanf("%f",&prec);printf("\nEnter jumper loss(jl) in dB:");scanf("%f",&jl);printf("\nEnter the avl channel loss(cl) in dB");scanf("%f",&cl);printf("\nEnter the fiber cable loss(af) in dB/km");scanf("%f",&af);printf("\nEnter max possible dist(l) in dB/km:");scanf("%f",&l);p=ptr-prec;ms=p-(af*l)-(2*cl)-(2*jl);printf("\n\ntotal power loss of optical fibver system=%5.2fdB",p);printf("\nFinal power margin=%5.2f km",ms);for(i=0;i<=l;i=i+10)p=cl+(af*i)+jl;printf("\n total power when max fiber length is %d km=%5.2fdB",i,p);getch();

Page 39: CE-II Lab Manual

OUTPUT:

POWER BUDGET ANALYSIS OF AN OPTICAL FIBER LINK WITH JUMPEREnter the transmission power(ptr) in dBm:0Enter the recieversensitivity(prec) in dBm:-32Enter jumper loss(jl) in dB:5.3Enter the avl channel loss(cl) in dB2.4Enter the fiber cable loss(af) in dB/km1.2Enter max possible dist(l) in dB/km:70total power loss of optical fibver system=32.00dBFinal power margin=-67.40 kmtotal power when max fiber length is 0 km= 7.70dBtotal power when max fiber length is 10 km=19.70dBtotal power when max fiber length is 20 km=31.70dBtotal power when max fiber length is 30 km=43.70dBtotal power when max fiber length is 40 km=55.70dBtotal power when max fiber length is 50 km=67.70dBtotal power when max fiber length is 60 km=79.70dBtotal power when max fiber length is 70 km=91.70Db

Page 40: CE-II Lab Manual

POWER BUDGET ANALYSIS OF AN OPTICAL FIBER LINK WITHOUT JUMPER LOSSPROGRAM: #include<stdio.h>#include<conio.h>#include<math.h>void main()float ptr,prec,cl,af,ac,l,ms,p;inti;clrscr();printf("\n\n");printf("\nPOWER BUDGET ANALYSIS OF AN OPTICAL FIBER LINK WITHOUT JUMPER LOSS");printf("\nEnter the transmission power(ptr) in dBm:");scanf("%f",&ptr);printf("\nEnter the reciever sensitivity(prec) in dBm:");scanf("%f",&prec);printf("\nEnter the systems margin(ms) in dB:");scanf("%f",&ms);printf("\nEnter the avl channel loss(cl) in dB:");scanf("%f",&cl);printf("\nEnter the fiber cable loss(af) in dB/km:");scanf("%f",&af);printf("\n Enter max possible dist(l) in km:");scanf("%f",&l);p=ptr-prec;l=(p-(2*cl)-ms)/af;printf("\n\nTotal power loss of optical fibver system=%5.2fdB",p);printf("\nMax length of fiber=%5.2f km",l);for(i=1;i<=1;i++)p=cl+(af*i);printf("\n Total power when max fiber length is %d km=%5.2fdB",i,p);getch();

Page 41: CE-II Lab Manual

OUTPUT:

POWER BUDGET ANALYSIS OF AN OPTICAL FIBER LINK WITHOUT JUMPER LOSSEnter the transmission power(ptr) in dBm:3Enter the recieversensitivity(prec) in dBm:-32Enter the systems margin(ms) in dB:2.5Enter the avl channel loss(cl) in dB:1.2Enter the fiber cable loss(af) in dB/km:4.3Enter max possible dist(l) in km:1Total power loss of optical fibver system=35.00dBMax length of fiber= 7.00 kmTotal power when max fiber length is 1 km= 5.50dB

Result

Page 42: CE-II Lab Manual

7.POWER BUDGET ANALYSIS OF AN SATELLITE LINKAIM

To write a program for the power budget analysis of an satellite link

PROGRAM#include<stdio.h>#include<conio.h>#include<math.h>void main()float pt,at,lbo,lbf,lp,lu,gbt,br,pt1,at1,lbo1,lbf1,lp1,ld,gbt1,br1,eirp,cc,cbn,en,en1,en2,eirp1,cc1,cbn1,ebn,ebn1,ebn2,ov,ov1;clrscr();printf("\n***Power budget analysis for satellite communication ***\n");printf("\nData for Uplink:\n");printf("\nEnter the value for earth station transmit output power as saturation(pt) in dbW:");scanf("%f",&pt);printf("\nEnter the value for earth station transmit antenna gain(at) in db:");scanf("%f",&at);printf("\nEnter the value for earth station back-off loss (lbo) in db:");scanf("%f",&lbo);printf("\nEnter the value for earth station branching and feeder loss (lbf) in db:");scanf("%f",&lbf);printf("\nEnter the value of free space path of loss (lp) in db:");scanf("%f",&lp);printf("\nEnter the value of additional uplink atmospheric loss (lu) in db:");scanf("%f",&lu);printf("\nEnter the value of satellite receiver G/Terato in db/k");scanf("%f",&gbt);printf("\nEnter the value of bit ratio(br) in bps:");scanf("%f",&br);eirp=pt+at-lbo-lbf;cc=eirp-lp-lu;cbn=cc+gbt-(10*log10(1.38*pow(10,-23)));en=cbn-(10*log10(br));en1=en/10;en2=pow(10,en1);printf("\n EIRP(earth station):%fdBW\n",eirp);printf("\nCarrier density at satellite antenna:%fdBW\n",cc);printf("\nC/NO at the satellite:%fdBW\n",cbn);printf("\nEb/NO:%f db\n",en);printf("\nDate for Downlink:\n");printf("\n enter the value of earth station trasmit output power as saturation(pt1)in dbW:");scanf("%f",&pt1);printf("\n enter the value of earth station tramit antenna gain(at1)in dn:");

Page 43: CE-II Lab Manual

scanf("%f",&at1);printf("\n enter the value of station back=off loss(lbo1) in db:");scanf("%f",&lbo1);printf("enter the value of earth station branching and feeder loss (lbf1) in db");scanf("%f",&lbf1);printf("enter the value of free space path of loss (lp1) in db");scanf("%f",&lp1);printf("\n enter the value of additional downlink atmospheric loss(ld)in db");scanf("%f",&ld);printf("enter the value of satellite receiver G/Te ratio in db/k");scanf("%f",&gbt1);printf("enter the value of bit ratio(br1) in bps:");scanf("%f",&br1);eirp1=pt1+at1-lbo1-lbf1;cc1=eirp1-lp1-ld;cbn1=cc1+gbt-(10*log10(1.38*pow(10,-23)));ebn=cbn1-(10*log10(br1));ebn1=ebn/10;ebn=pow(10,ebn1);printf("\n EIRP(earth station):%fdBW\n",eirp1);printf("\n carrier density at satellite antenna:%fdBW\n",cc1);printf("\n C/NO at the satellite :%fdb\n",cbn1);printf("\n Eb/NO:%fdb\n",ebn);ov=(en2*ebn2)/(en2+ebn2);ov1=(10*log10(ov));printf("\overall Eb/No ratio:%5.2f\n",ov);printf("\n Overall Eb/NO ratio:%5.2f\n",ov1);getch();

Page 44: CE-II Lab Manual

OUTPUT:

***Power budget analysis for satellite communication ***

Data for Uplink:

Enter the value for earth station transmit output power as saturation(pt) in dbW:33Enter the value for earth station transmit antenna gain(at) in db:64Enter the value for earth station back-off loss (lbo) in db:3Enter the value for earth station branching and feeder loss (lbf) in db:4Enter the value of free space path of loss (lp) in db:206.5Enter the value of additional uplink atmospheric loss (lu) in db:6Enter the value of satellite receiver G/Terato in db/k-5.3Enter the value of bit ratio(br) in bps:90000000EIRP(earth station):90.000000 dBWCarrier density at satellite antenna:-122.500000 dBWC/NO at the satellite:100.801208dBWEb/NO:21.258783db

Data for Downlink:

enter the value of earth station trasmit output power as saturation(pt1)in dbW:10enter the value of earth station tramit antenna gain(at1)in dn:30.8enter the value of station back=off loss(lbo1) in db:0.1enter the value of earth station branching and feeder loss (lbf1) in db:0.1enter the value of free space path of loss (lp1) in db:205.6enter the value of additional downlink atmospheric loss(ld)in db:0.4enter the value of satellite receiver G/Te ratio in db/k:37.7enter the value of bit ratio(br1) in bps:43200000EIRP(earth station):40.599998dBWcarrier density at satellite antenna:-165.400009 dBWC/NO at the satellite :57.901199dbEb/NO:0.014277dboverallEb/No ratio: 0.00Overall Eb/NO ratio:-349.54

Result

Page 45: CE-II Lab Manual

8.SIMULATION OF HANDOFFPROGRAM:clear all;clc;close all;pt=1;gt=1;gr=1;prth=10^(-5);tim=input('Enter no of instances:');t=1:tim;% for cell 1-freq0=100e6;Imbd0=3e8/freq0;d0=40.0;p0=gt*pt*gr*(Imbd0/(4*pi*d0))^2;fori=1:timusers0(i)=poissrnd(30);for j=1:users0(i)vlc0(i,j)=unifrnd(0.01,20,1,1);endendmxuser=max(users0);flag0(tim,mxuser)=0;fori=1:timfor j=1:mxuserfor k=1:tim dv0=vlc0(i,j)*k;pr0(i,j,k)=p0*((dv0/d0)^(-4));if(pr0(i,j,k)<prth)flag0(i,j)=k;break;end;end;end;end;hoff0(1,tim)=0;fori=1:timfor j=1:mxuserfor k=1:timif(flag0(i,j)==k)hoff0(k)=hoff0(k)+1;end;end;end;end;

Page 46: CE-II Lab Manual

figure(1);stem(t,hoff0,'b');title('no. of handoff users VS Time instances from cell 1 to cell 2');xlabel('Time instance---->');ylabel('No. of handoff users---->');% for cell 2-freq1=150e6;Imbd1=3e8/freq1;d1=45.0;p1=gt*pt*gr*(Imbd1/(4*pi*d1))^2;fori=1:timusers1(i)=poissrnd(35);for j=1:users1(i)vlc1(i,j)=unifrnd(0.01,20,1,1);endendmxuser1=max(users1);flag1(tim,mxuser1)=0;fori=1:timfor j=1:mxuser1for k=1:tim dv1=vlc1(i,j)*k;pr1(i,j,k)=p1*((dv1/d1)^(-4));if(pr1(i,j,k)<prth)flag1(i,j)=k;break;end;end;end;end;hoff1(1,tim)=0;fori=1:timfor j=1:mxuser1for k=1:timif(flag1(i,j)==k)hoff1(k)=hoff1(k)+i;end;end;end;end;figure(3);stem(t,hoff1,'b');title('No. of handoff users VS Time instances from cell 2 to cell 1');xlabel('Time instance---->');ylabel('No. of hand off users---->');%Blocking-

Page 47: CE-II Lab Manual

caph0=30;capv0=10;caph1=30;capv1=10;fori=1:timdiff0(i)=hoff1(i)-hoff0(i);if(diff0(i)>capv0)newcaph0(i)=caph0(diff0(i)-capv0);if(users0(i)>caph0(i))blck(i)=users0(i)-caph0(i);elseblck(i)=0;end;end;if(users0(i)>caph0)blck(i)=users0(i)-caph0;elseblck(i)=0;end;end;figure(2);stem(t,blck,'r');title('No. of blocked users VS Time instances in cell 1');xlabel('Time inst---->');ylabel('No. of blocked users---->');fori=1:timdiff1(i)=hoff0(i)-hoff1(i);if(diff1(i)>capv1)newcaph1(i)=caph1(diff1(i)-capv1);if(users1(i)>newcaph1(i))blck1(i)=users1(i)-newcaph1(i);elseblck1(i)=0;end;end;if(users1(i)>caph1)blck1(i)=users1(i)-caph1;elseblck1(i)=0;end;end;figure(4);stem(t,blck1,'r');title('No. of blocked users Vs Time instances in cell 2');xlabel('time inst---->');ylabel('No. of blocked users---->');

Page 48: CE-II Lab Manual

fprintf('\n');disp('users0=');disp(users0);disp('hoff1=');disp(hoff1);disp('hoff0=');disp(hoff0);disp('block0=');disp(blck);fprintf('\n');disp('user1=');disp(users1);disp('hoff0=');disp(hoff0);disp('hoff1=');disp(hoff1);disp('block1=');disp(blck1);fprintf('\n');

OUTPUT:

Enter no of instances:5

Page 49: CE-II Lab Manual

Result

Page 50: CE-II Lab Manual

9.ANTENNA RADIATION PATTERN

AIM To simulate horn antenna radiation pattern using MATLAB

APPARATUS REQUIRED MATLAB software, PC

SOURCE CODE function []=horn; disp('E-Plane and H-Plane Horn Specifications'); %R1=[]; R2=[]; %R1 = input('rho1(in wavelengths) = '); %R2 = input('rho2(in wavelengths) = '); R1=6; R2=6;a=0.5; b=0.25; a1=5.5; b1=2.75; %a=[]; b=[]; %a = input('a(in wavelengths) = '); %b = input('b(in wavelengths) = '); %a1=[]; b1=[]; %a1 = input('a1(in wavelengths) = '); %b1 = input('b1(in wavelengths) = '); u = (1/sqrt(2))*((sqrt(R2)/a1)+(a1/sqrt(R2))); v = (1/sqrt(2))*((sqrt(R2)/a1)-(a1/sqrt(R2))); u = Fresnel(u); v = Fresnel(v); w = Fresnel(b1/sqrt(2*R1)); DH = 4*pi*b*R2/a1*((real(u)-real(v))^2 + (imag(u)-imag(v))^2); DE = 64*a*R1/(pi*b1)*((real(w))^2 + (imag(w))^2); DP = pi/(32*a*b)*DE*DH; k = 2*pi; Emax = 0; Hmax = 0; % E and H plane Outputs % E-Plane Amplitude for(theta = 0:0.5:360); I = theta*2 + 1; theta = theta*pi/180; phi = pi/2; ky = k*sin(theta); kxp = pi/a1; kxdp = -pi/a1; t1 = sqrt(1/(pi*k*R1))*(-k*b1/2-ky*R1); t2 = sqrt(1/(pi*k*R1))*(k*b1/2-ky*R1); t1p = sqrt(1/(pi*k*R2))*(-k*a1/2-pi/a1*R2); t2p = sqrt(1/(pi*k*R2))*(k*a1/2-pi/a1*R2);

Page 51: CE-II Lab Manual

t1dp = -t2p; t2dp = -t1p; I1 =.5*sqrt(pi*R2/k)*(exp(j*R2/(2*k)*kxp^2)*(Fresnel(t2p)-Fresnel(t1p)) + exp(j*R2/(2*k)*kxdp^2)*(Fresnel(t2dp) - Fresnel(t1dp))); I2 = sqrt(pi*R1/k) * exp(j*R1/(2*k)*ky^2) * (Fresnel(t2) - Fresnel(t1)); y(I) = (1 + cos(theta))*I1*I2; y(I) = abs(y(I)); endfor(I = 1:721)

if(y(I) >Emax) Emax = y(I); endendfor(I = 1:721) if(y(I) <= 0) Edb = -100; elseEdb = 20*log10(abs(y(I))/Emax); endtheta = (I-1)/2; x(I)=theta; q1(I)=Edb; end% H-Plane Amplitude for(theta = 0:0.5:360); I = theta*2 + 1; theta = theta*pi/180; phi = 0; kxp = k*sin(theta) + pi/a1; kxdp = k*sin(theta) - pi/a1; t1 = sqrt(1/(pi*k*R1))*(-k*b1/2); t2 = sqrt(1/(pi*k*R1))*(k*b1/2); t1p = sqrt(1/(pi*k*R2))*(-k*a1/2-kxp*R2); t2p = sqrt(1/(pi*k*R2))*(k*a1/2-kxp*R2); t1dp = sqrt(1/(pi*k*R2))*(-k*a1/2-kxdp*R2); t2dp = sqrt(1/(pi*k*R2))*(k*a1/2-kxdp*R2); I1 = .5*sqrt(pi*R2/k)*(exp(j*R2/(2*k)*kxp^2)*(Fresnel(t2p)-Fresnel(t1p)) + exp(j*R2/(2*k)*kxdp^2)*(Fresnel(t2dp) - Fresnel(t1dp))); I2 = sqrt(pi*R1/k) * exp(j*R1/(2*k)*ky^2) * (Fresnel(t2) - Fresnel(t1)); y(I) = (1 + cos(theta))*I1*I2; y(I) = abs(y(I)); endfor(I = 1:721) if(y(I) >Hmax) Hmax = y(I); end

Page 52: CE-II Lab Manual

endfor(I = 1:721) if(y(I) <= 0) Hdb = -100; elseHdb = 20*log10(abs(y(I))/Hmax); endtheta = (I-1)/2; x(I)=theta; q2(I)=Hdb; end% Figure 1 ha=plot(x,q1); set(ha,'linestyle','-','linewidth',2); hold on; hb=plot(x,q2,'r--'); set(hb,'linewidth',2); xlabel('Theta (degrees)'); ylabel('Field Pattern (dB)'); title('Horn Analysis'); legend('E-Plane','H-Plane'); grid on; axis([0 360 -60 0]); % Figure 2 figure(2) ht1=polar(x*pi/180,q1,'b-');

hold on; ht2=polar(x*pi/180,q2,'r--'); set([ht1 ht2],'linewidth',2); legend([ht1 ht2],'E-plane','H-plane'); title('Field patterns'); % Directivity Output directivity = 10*log10(DP) % Fresnel Subfunctionfunction[y] = Fresnel(x); A(1) = 1.595769140; A(2) = -0.000001702; A(3) = -6.808508854; A(4) = -0.000576361; A(5) = 6.920691902; A(6) = -0.016898657; A(7) = -3.050485660; A(8) = -0.075752419; A(9) = 0.850663781; A(10) = -0.025639041; A(11) = -0.150230960; A(12) = 0.034404779; B(1) = -0.000000033; B(2) = 4.255387524;

Page 53: CE-II Lab Manual

B(3) = -0.000092810; B(4) = -7.780020400; B(5) = -0.009520895; B(6) = 5.075161298; B(7) = -0.138341947; B(8) = -1.363729124; B(9) = -0.403349276; B(10) = 0.702222016; B(11) = -0.216195929; B(12) = 0.019547031; CC(1) = 0; CC(2) = -0.024933975; CC(3) = 0.000003936; CC(4) = 0.005770956; CC(5) = 0.000689892; CC(6) = -0.009497136; CC(7) = 0.011948809; CC(8) = -0.006748873; CC(9) = 0.000246420; CC(10) = 0.002102967; CC(11) = -0.001217930; CC(12) = 0.000233939; D(1) = 0.199471140; D(2) = 0.000000023; D(3) = -0.009351341; D(4) = 0.000023006; D(5) = 0.004851466; D(6) = 0.001903218; D(7) = -0.017122914; D(8) = 0.029064067; D(9) = -0.027928955; D(10) = 0.016497308; D(11) = -0.005598515; D(12) = 0.000838386; if(x==0) y=0; return

elseif(x<0) x=abs(x); x=(pi/2)*x^2; F=0; if(x<4) for(k=1:12) F=F+(A(k)+j*B(k))*(x/4)^(k-1); endy = F*sqrt(x/4)*exp(-j*x);

Page 54: CE-II Lab Manual

y = -y; returnelsefor(k=1:12) F=F+(CC(k)+j*D(k))*(4/x)^(k-1); endy = F*sqrt(4/x)*exp(-j*x)+(1-j)/2; y =-y; returnendelsex=(pi/2)*x^2; F=0; if(x<4) for(k=1:12) F=F+(A(k)+j*B(k))*(x/4)^(k-1); endy = F*sqrt(x/4)*exp(-j*x); returnelsefor(k=1:12) F=F+(CC(k)+j*D(k))*(4/x)^(k-1); endy = F*sqrt(4/x)*exp(-j*x)+(1-j)/2; returnendendOUTPUT: E-Plane and H-Plane Horn Specifications

Page 55: CE-II Lab Manual