Currently job artifacts in CI/CD pipelines on LRZ GitLab never expire. Starting from Wed 26.1.2022 the default expiration time will be 30 days (GitLab default). Currently existing artifacts in already completed jobs will not be affected by the change. The latest artifacts for all jobs in the latest successful pipelines will be kept. More information: https://gitlab.lrz.de/help/user/admin_area/settings/continuous_integration.html#default-artifacts-expiration

Commit 6ff1d16d authored by Arne Striegler's avatar Arne Striegler 😁
Browse files

Example 6 added - XPM

parent 0dac22b0
...@@ -20,24 +20,24 @@ import matplotlib.pyplot as plt ...@@ -20,24 +20,24 @@ import matplotlib.pyplot as plt
# Define network elements # Define network elements
gp = pypho_setup(nos = 4*16, sps = 1*128, symbolrate = 10e9) gp = pypho_setup(nos = 8, sps = 256, symbolrate = 10e9)
bitsrc = pypho_bits(glova = gp, nob = gp.nos, pattern = 'singlepulse') # Set pattern = "singlepulse" bitsrc = pypho_bits(glova = gp, nob = gp.nos, pattern = 'singlepulse') # Set pattern = "singlepulse"
esigsrc = pypho_signalsrc(glova = gp, pulseshape = 'gauss_rz' , fwhm = 0.33) esigsrc = pypho_signalsrc(glova = gp, pulseshape = 'gauss_rz' , fwhm = 0.33)
sig_f0 = pypho_cwlaser(glova = gp, power = 3, Df = 0, teta = 1*np.pi/4.0) sig_f0 = pypho_cwlaser(glova = gp, power = -20, Df = 0, teta =1*np.pi/4.0)
sig_f1 = pypho_lasmod(glova = gp, power = 0, Df = 500, teta = 1*np.pi/1.0) sig_f1 = pypho_lasmod(glova = gp, power = -10, Df = 500, teta = 0*np.pi/1.0)
filter_f0 = pypho_optfi(glova = gp, Df = 0, B = 50) filter_f0 = pypho_optfi(glova = gp, Df = 0, B = 150)
SSMF = pypho_fiber(glova = gp, l = 80, D = 9.0, S = 0.0, alpha = 0.2, gamma = 1.4, phi_max = .1) SSMF = pypho_fiber(glova = gp, l = 10e3, D = 0.0, S = 0.0, alpha = 0.2, gamma = 1.4, phi_max = .001)
# Simulation # Simulation
# Define wavelength channel # Define wavelength channels
E_f0 = sig_f0() E_f0 = sig_f0()
bits = bitsrc() bits = bitsrc()
esig = esigsrc(bitsequence = bits) esig = esigsrc(bitsequence = bits)
E_f1 = sig_f1(esig = esig) E_f1 = sig_f1(esig = esig)
E = copy.deepcopy(E_f1) E = copy.deepcopy(E_f1)
E[0]['E'][0] = E_f0[0]['E'][0] + E_f1[0]['E'][0] # Multiplex all signals X-Pol E[0]['E'][0] = E_f0[0]['E'][0] + E_f1[0]['E'][0] # Multiplex all signals X-Pol
E[0]['E'][1] = E_f0[0]['E'][1] + E_f1[0]['E'][1] # Multiplex all signals Y-Pol E[0]['E'][1] = E_f0[0]['E'][1] + E_f1[0]['E'][1] # Multiplex all signals Y-Pol
...@@ -47,20 +47,20 @@ E_Tx = copy.deepcopy(E) ...@@ -47,20 +47,20 @@ E_Tx = copy.deepcopy(E)
# Plot Spectrum Input signals # Plot Spectrum Input signals
plt.figure(1) plt.figure(1)
plt.subplot(2, 1, 1) plt.subplot(2, 1, 1)
plt.plot((gp.freqax-gp.f0)*1e-9, np.log10(abs(fftshift(fft(E[0]['E'][0] )**2))), 'r') plt.plot((gp.freqax-gp.f0)*1e-9, np.log10(abs(fftshift(fft(E[0]['E'][0] )**2))), 'r', label='X-Pol')
plt.plot((gp.freqax-gp.f0)*1e-9, np.log10(abs(fftshift(fft(E[0]['E'][1] )**2))), 'g:') plt.plot((gp.freqax-gp.f0)*1e-9, np.log10(abs(fftshift(fft(E[0]['E'][1] )**2))), 'g:', label='Y-Pol')
plt.title("Input spectrum", loc='left') plt.title("Input spectrum", loc='left')
plt.ylabel('Spec. density'); plt.ylabel('Spec. density');
plt.grid(True) plt.grid(True)
plt.legend()
# Fiber transmission # Fiber transmission
E = SSMF(E = E) E = SSMF(E = E)
# Plot Spectrum Output signals # Plot Spectrum Output signals
plt.subplot(2, 1, 2) plt.subplot(2, 1, 2)
plt.plot((gp.freqax-gp.f0)*1e-9, np.log10(abs(fftshift(fft(E[0]['E'][0] )**2))), 'r') plt.plot((gp.freqax-gp.f0)*1e-9, np.log10(abs(fftshift(fft(E[0]['E'][0] )**2))), 'r', label='X-Pol')
plt.plot((gp.freqax-gp.f0)*1e-9, np.log10(abs(fftshift(fft(E[0]['E'][1] )**2))), 'g:') plt.plot((gp.freqax-gp.f0)*1e-9, np.log10(abs(fftshift(fft(E[0]['E'][1] )**2))), 'g:', label='Y-Pol')
plt.title("Output spectrum", loc='left') plt.title("Output spectrum", loc='left')
plt.ylabel('Spec. density'); plt.xlabel('Frequency deviation [GHz]'); plt.ylabel('Spec. density'); plt.xlabel('Frequency deviation [GHz]');
plt.grid(True) plt.grid(True)
...@@ -68,23 +68,39 @@ plt.grid(True) ...@@ -68,23 +68,39 @@ plt.grid(True)
# Calculate phase shift # Calculate phase shift
L_eff = (1-np.exp(-SSMF.l*SSMF.alpha))/(SSMF.alpha) L_eff = (1-np.exp(-SSMF.l*SSMF.alpha))/(SSMF.alpha)
phi_x_max = - (np.max(np.abs(E_Tx[0]['E'][0])**2) + 2.0/3.0* np.max(np.abs(E_Tx[0]['E'][1])**2))* L_eff * SSMF.gamma *1e-3 phi_XPM_x_max = - 2*(np.max(np.abs(E_f1[0]['E'][0])**2) + 2.0/3.0* np.max(np.abs(E_f1[0]['E'][1])**2))* L_eff * SSMF.gamma *1e-3
phi_y_max = - (np.max(np.abs(E_Tx[0]['E'][1])**2) + 2.0/3.0* np.max(np.abs(E_Tx[0]['E'][0])**2))* L_eff * SSMF.gamma *1e-3 phi_XPM_y_max = - 2*(np.max(np.abs(E_f1[0]['E'][1])**2) + 2.0/3.0* np.max(np.abs(E_f1[0]['E'][0])**2))* L_eff * SSMF.gamma *1e-3
phi_SPM_x_max = - (np.max(np.abs(E_f0[0]['E'][0])**2) + 2.0/3.0* np.max(np.abs(E_f0[0]['E'][1])**2))* L_eff * SSMF.gamma *1e-3
phi_SPM_y_max = - (np.max(np.abs(E_f0[0]['E'][1])**2) + 2.0/3.0* np.max(np.abs(E_f0[0]['E'][0])**2))* L_eff * SSMF.gamma *1e-3
print 'L_eff = ', L_eff print 'L_eff = ', L_eff
print 'phi_x_max = ', phi_x_max print 'phi_XPM_x_max = ', phi_XPM_x_max
print 'phi_y_max = ', phi_y_max print 'phi_XPM_y_max = ', phi_XPM_y_max
print 'phi_SPM_x_max = ', phi_SPM_x_max
print 'phi_SPM_y_max = ', phi_SPM_y_max
print 'phi_x_max = phi_XPM_x_max + phi_SPM_x_max', phi_XPM_x_max + phi_SPM_x_max
print 'phi_y_max = phi_XPM_y_max + phi_SPM_y_max', phi_XPM_y_max + phi_SPM_y_max
# Plot power of both pol axis as function of transmission distance # Plot power of both pol axis as function of transmission distance
E = filter_f0(E)
plt.figure(2) plt.figure(2)
plt.subplot(2, 1, 2)
plt.ylabel('$10log |E_y|^2$'); plt.xlabel('Transmission distance [m]');
plt.ylim((-120, 10))
plt.grid(True)
plt.subplot(2, 1, 1) plt.subplot(2, 1, 1)
plt.ylabel('$10log |E_y|^2$'); plt.ylabel('$|E|^2$'); plt.xlabel('Transmission distance [m]');
plt.ylim((-120, 10)) plt.plot(gp.timeax*1.0e12, np.abs(E_f1[0]['E'][0])**2, 'r', label='$E_x Pulse$')
plt.plot(gp.timeax*1.0e12, np.abs(E_f1[0]['E'][1])**2, 'g', label='$E_y Pulse$')
plt.plot(gp.timeax*1.0e12, np.abs(E_f0[0]['E'][0])**2, 'r:', label='$E_x cw@1550nm$')
plt.plot(gp.timeax*1.0e12, np.abs(E_f0[0]['E'][1])**2, 'g:', label='$E_y cw@1550nm$')
plt.grid(True) plt.grid(True)
plt.legend() plt.subplot(2, 1, 2)
plt.plot(gp.timeax*1.0e12, np.angle(E[0]['E'][0]), 'r', label='$E_x$')
plt.plot(gp.timeax*1.0e12, np.angle(E[0]['E'][1]), 'g', label='$E_y$')
plt.ylabel('$phase(E_x)$');
plt.grid(True)
plt.show() plt.show()
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment