mirror of
https://github.com/Telecominfraproject/oopt-gnpy.git
synced 2025-11-02 11:07:57 +00:00
Change saturation verification to total input power
Previous check was made on reference channel computation. Now we use the actual total input power to compute the actual gain. Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com> Change-Id: I3e0db72fdb030a49e2b06cdcfb442b5e642c1777
This commit is contained in:
@@ -26,7 +26,7 @@ from scipy.constants import h, c
|
||||
from scipy.interpolate import interp1d
|
||||
from collections import namedtuple
|
||||
|
||||
from gnpy.core.utils import lin2db, db2lin, arrange_frequencies, snr_sum
|
||||
from gnpy.core.utils import lin2db, db2lin, arrange_frequencies, snr_sum, watt2dbm
|
||||
from gnpy.core.parameters import RoadmParams, FusedParams, FiberParams, PumpParams, EdfaParams, EdfaOperational
|
||||
from gnpy.core.science_utils import NliSolver, RamanSolver
|
||||
from gnpy.core.info import SpectralInformation
|
||||
@@ -647,7 +647,7 @@ class Edfa(_Node):
|
||||
|
||||
self.nch = spectral_info.number_of_channels
|
||||
pin = spectral_info.signal + spectral_info.ase + spectral_info.nli
|
||||
self.pin_db = lin2db(sum(pin * 1e3))
|
||||
self.pin_db = watt2dbm(sum(pin))
|
||||
# The following should be changed when we have the new spectral information including slot widths.
|
||||
# For now, with homogeneous spectrum, we can calculate it as the difference between neighbouring channels.
|
||||
self.slot_width = self.channel_freq[1] - self.channel_freq[0]
|
||||
@@ -660,15 +660,14 @@ class Edfa(_Node):
|
||||
self.effective_gain = self.target_pch_out_db - pref.p_spani
|
||||
|
||||
"""check power saturation and correct effective gain & power accordingly:"""
|
||||
# Compute the saturation accounting for actual power at the input of the amp
|
||||
self.effective_gain = min(
|
||||
self.effective_gain,
|
||||
self.params.p_max - (pref.p_spani + pref.neq_ch)
|
||||
self.params.p_max - self.pin_db
|
||||
)
|
||||
#print(self.uid, self.effective_gain, self.operational.gain_target)
|
||||
self.effective_pch_out_db = round(pref.p_spani + self.effective_gain, 2)
|
||||
|
||||
"""check power saturation and correct target_gain accordingly:"""
|
||||
#print(self.uid, self.effective_gain, self.pin_db, pref.p_spani)
|
||||
self.nf = self._calc_nf()
|
||||
self.gprofile = self._gain_profile(pin)
|
||||
|
||||
|
||||
@@ -1258,7 +1258,7 @@
|
||||
},
|
||||
{
|
||||
"metric-type": "SNR-0.1nm",
|
||||
"accumulative-value": 28.77
|
||||
"accumulative-value": 28.78
|
||||
},
|
||||
{
|
||||
"metric-type": "OSNR-bandwidth",
|
||||
|
||||
@@ -3,5 +3,5 @@ response-id,source,destination,path_bandwidth,Pass?,nb of tsp pairs,total cost,t
|
||||
1,trx Brest_KLA,trx Vannes_KBE,10.0,True,1,1,Voyager,mode 1,22.65,22.11,18.03,32.0,1.0,trx Brest_KLA | roadm Brest_KLA | east edfa in Brest_KLA to Morlaix | fiber (Brest_KLA → Morlaix)-F060 | east fused spans in Morlaix | fiber (Morlaix → Lannion_CAS)-F059 | west edfa in Lannion_CAS to Morlaix | roadm Lannion_CAS | east edfa in Lannion_CAS to Corlay | fiber (Lannion_CAS → Corlay)-F061 | west fused spans in Corlay | fiber (Corlay → Loudeac)-F010 | west fused spans in Loudeac | fiber (Loudeac → Lorient_KMA)-F054 | west edfa in Lorient_KMA to Loudeac | roadm Lorient_KMA | east edfa in Lorient_KMA to Vannes_KBE | fiber (Lorient_KMA → Vannes_KBE)-F055 | west edfa in Vannes_KBE to Lorient_KMA | roadm Vannes_KBE | trx Vannes_KBE,"-276, 4",,,
|
||||
3,trx Lannion_CAS,trx Rennes_STA,60.0,True,1,1,vendorA_trx-type1,mode 1,28.29,25.85,21.77,32.0,1.0,trx Lannion_CAS | roadm Lannion_CAS | east edfa in Lannion_CAS to Stbrieuc | fiber (Lannion_CAS → Stbrieuc)-F056 | east edfa in Stbrieuc to Rennes_STA | fiber (Stbrieuc → Rennes_STA)-F057 | west edfa in Rennes_STA to Stbrieuc | roadm Rennes_STA | trx Rennes_STA,"-284, 4",,,
|
||||
4,trx Rennes_STA,trx Lannion_CAS,150.0,True,1,1,vendorA_trx-type1,mode 2,22.27,22.15,15.05,64.0,0.0,trx Rennes_STA | roadm Rennes_STA | east edfa in Rennes_STA to Ploermel | fiber (Rennes_STA → Ploermel)- | east edfa in Ploermel to Vannes_KBE | fiber (Ploermel → Vannes_KBE)- | west edfa in Vannes_KBE to Ploermel | roadm Vannes_KBE | east edfa in Vannes_KBE to Lorient_KMA | fiber (Vannes_KBE → Lorient_KMA)-F055 | west edfa in Lorient_KMA to Vannes_KBE | roadm Lorient_KMA | east edfa in Lorient_KMA to Loudeac | fiber (Lorient_KMA → Loudeac)-F054 | east fused spans in Loudeac | fiber (Loudeac → Corlay)-F010 | east fused spans in Corlay | fiber (Corlay → Lannion_CAS)-F061 | west edfa in Lannion_CAS to Corlay | roadm Lannion_CAS | trx Lannion_CAS,"-266, 6",,,
|
||||
5,trx Rennes_STA,trx Lannion_CAS,20.0,True,1,1,vendorA_trx-type1,mode 2,30.79,28.77,21.68,64.0,3.0,trx Rennes_STA | roadm Rennes_STA | east edfa in Rennes_STA to Stbrieuc | fiber (Rennes_STA → Stbrieuc)-F057 | west edfa in Stbrieuc to Rennes_STA | fiber (Stbrieuc → Lannion_CAS)-F056 | west edfa in Lannion_CAS to Stbrieuc | roadm Lannion_CAS | trx Lannion_CAS,"-274, 6",,,
|
||||
5,trx Rennes_STA,trx Lannion_CAS,20.0,True,1,1,vendorA_trx-type1,mode 2,30.79,28.78,21.68,64.0,3.0,trx Rennes_STA | roadm Rennes_STA | east edfa in Rennes_STA to Stbrieuc | fiber (Rennes_STA → Stbrieuc)-F057 | west edfa in Stbrieuc to Rennes_STA | fiber (Stbrieuc → Lannion_CAS)-F056 | west edfa in Lannion_CAS to Stbrieuc | roadm Lannion_CAS | trx Lannion_CAS,"-274, 6",,,
|
||||
6,,,,NO_PATH,,,,,,,,,,,,,,
|
||||
|
||||
|
@@ -146,7 +146,7 @@ req id demand GSNR@bandwidth A-Z (Z-A) GSNR@0
|
||||
0 trx Lorient_KMA to trx Vannes_KBE : 24.83 28.92 14 mode 1 100.0 1 (-284,4)
|
||||
1 trx Brest_KLA to trx Vannes_KBE : 17.75 21.83 14 mode 1 200.0 2 (-272,8)
|
||||
3 trx Lannion_CAS to trx Rennes_STA : 22.21 26.29 13 mode 1 60.0 1 (-284,4)
|
||||
4 trx Rennes_STA to trx Lannion_CAS : 16.07 23.29 17 mode 2 150.0 1 (-258,6)
|
||||
4 trx Rennes_STA to trx Lannion_CAS : 16.06 23.29 17 mode 2 150.0 1 (-258,6)
|
||||
5 trx Rennes_STA to trx Lannion_CAS : 20.31 27.54 17 mode 2 20.0 1 (-274,6)
|
||||
7 | 6 trx Lannion_CAS to trx Lorient_KMA : 19.52 23.61 14 mode 1 700.0 7 (-224,28)
|
||||
7b trx Lannion_CAS to trx Lorient_KMA : 19.61 23.69 14 mode 1 400.0 4 (-172,24)
|
||||
|
||||
@@ -297,19 +297,19 @@ Fiber fiber (Loudeac → Lorient_KMA)-F054
|
||||
pch out (dBm): -26.82
|
||||
Edfa west edfa in Lorient_KMA to Loudeac
|
||||
type_variety: test
|
||||
effective gain(dB): 28.00
|
||||
effective gain(dB): 27.99
|
||||
(before att_in and before output VOA)
|
||||
noise figure (dB): 5.76
|
||||
(including att_in)
|
||||
pad att_in (dB): 0.00
|
||||
Power In (dBm): -6.99
|
||||
Power Out (dBm): 21.04
|
||||
Power Out (dBm): 21.03
|
||||
Delta_P (dB): -1.82
|
||||
target pch (dBm): 1.18
|
||||
effective pch (dBm): 1.18
|
||||
effective pch (dBm): 1.17
|
||||
output VOA (dB): 0.00
|
||||
Roadm roadm Lorient_KMA
|
||||
effective loss (dB): 21.18
|
||||
effective loss (dB): 21.17
|
||||
pch out (dBm): -20.00
|
||||
Transceiver trx Lorient_KMA
|
||||
GSNR (0.1nm, dB): 23.94
|
||||
|
||||
Reference in New Issue
Block a user