summaryrefslogtreecommitdiff
path: root/3547/CH5/EX5.6/Ex5_6.sce
blob: cae6bd779f22275c633b118af81f422ab7514ebd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Example no.5.6
// To find the peak current if (a) LO power = 10 dBm, (b) LO power = −10 dBm for the single-branch receiver
// Page no.229

clc;
clear;

// Given data
L=100;                                           // Length of fiber
loss=0.2*L;                                      // Total fiber loss
PtdBm=12;                                        // The peak power of the signal at the transmitter
R=0.9;                                           // Responsivity in A/W
PrdBm=PtdBm-loss;                                // The power at the receiver

// (a) the peak current LO power = 10 dBm
PLO1dBm=10;                                         // Power at local oscillator in dBm
PLO1=10^(0.1*PLO1dBm);                              // Power at local oscillator in mW
Pr=10^(0.1*PrdBm);                                  // Power at receiver in mW
Id1=R*sqrt(Pr*PLO1);                                // The peak current at LO power = 10dBm
I1=R*Pr/2+R*sqrt(Pr*PLO1);                          // The peak current after ignoring the d.c. term

// Display result on command window
printf('\n The peak current at LO power 10dBm = %0.4f mA',Id1)
printf('\n The peak current after ignoring the d.c. term = %0.3f mA',I1)

// (b) the peak current LO power = -10 dBm
PLO2dBm=-10;                                      // Power at local oscillator in dBm
PLO2=10^(0.1*PLO2dBm);                            // Power at local oscillator in mW
Id2=R*sqrt(Pr*PLO2);                              // The peak current at LO power = -10dBm
I2=R*Pr/2+R*sqrt(Pr*PLO2);                        // The peak current after ignoring the d.c. term

// Display result on command window
printf('\n The peak current at LO power -10dBm = %0.4f mA',Id2)
printf('\n The peak current after ignoring the d.c. term = %0.4f mA',I2)