 #1
dalye13
 2
 0
 Homework Statement
 How does a change in a diode laser's cavity length affect the output power, slope efficiency and threshold current? how are they all related?
 Relevant Equations

(P/P_o) = exp(gL)
Slope Efficiency = dP/VdI
P = SE*(PP_th) = SE*V*(II_th) (where P=VI) = SE*(E/q)*(II_th) (Where E=hf)
Code:
print ('Calculate threshold, power, slope efficiency for different lengths of SC Laser')
g = 510 # The gain of the laser, arbitrary value of 510 m^1 was picked
I = np.linspace(0, 0.03,5) #DRIVE CURRENT; 100 values of current, 'I', between 0A and 0.03A
V = 1.8 #INPUT VOLTAGE; arbitrary value of 1.8V was picked
l = np.linspace(0.000001, 0.001, 5) #LENGTH; 10 values of 'l' between 1 micron and 1mm
p_out = {}
print(l, I)
for x in range(len(l)): #for each element in 'l', create a list of P_out
p_out[x] = []
for y in range(len(I)): #For each P_out, populate with 'P' formula below at every 'I' value in the 'I' array
p = (math.exp(g*l[x])) * V * (I[y]I_th) #Power formula exp(gl)*V*(II_th)
p_out[x].append(p) #appending p_out of x with p from above
print(p_out)
fig, ax = plt.subplots()
for x in range(len(l)):
ax.plot(I, p_out[x])
#print (math.exp(g*l[x]))
#ax.set_xscale('log')
plt.savefig('PowervsCurrentfordifferentLengths.png', dpi =600)
plt.xlabel('Current, I [A]')
plt.ylabel('Optical Power, P [mW]')
plt.ylim([0,0.25]) #limits on x axis
plt.title('Optical Power Vs Current for 10 values of L between 1 micron and 1 mm')
plt.show
Last edited by a moderator: