Skip to content

Commit

Permalink
Add tilt computation for design targets
Browse files Browse the repository at this point in the history
Compute the tilts only if raman-flag in sim_params is turned on.
Use actual input power in fiber (according to expected propagation
during design).
Creates a function that computes the expected tilt after propagation
in a span, and returns the normalized power difference at the center
frequency of each band, and the tilt experenced between lower and
upper frequency in each band.
Include the expected tilt when computing target gains of amplifiers.
Current function requires that the bands remain in the same order.
(ordering is ensured when creating the objects).

Change-Id: I28bdf13f2010153175e8b6d199fd8eea15d7b292
  • Loading branch information
EstherLerouzic committed Oct 16, 2024
1 parent 24f4503 commit f621ca6
Show file tree
Hide file tree
Showing 20 changed files with 418 additions and 50 deletions.
32 changes: 18 additions & 14 deletions gnpy/core/elements.py
Original file line number Diff line number Diff line change
Expand Up @@ -913,19 +913,22 @@ def __init__(self, *args, params=None, operational=None, **kwargs):

@property
def to_json(self):
return {'uid': self.uid,
'type': type(self).__name__,
'type_variety': self.params.type_variety,
'operational': {
'gain_target': round(self.effective_gain, 6) if self.effective_gain else None,
'delta_p': self.delta_p,
'tilt_target': self.tilt_target, # defined per lambda on the amp band
'out_voa': self.out_voa
},
'metadata': {
'location': self.metadata['location']._asdict()
}
}
_to_json = {
'uid': self.uid,
'type': type(self).__name__,
'type_variety': self.params.type_variety,
'operational': {
'gain_target': round(self.effective_gain, 6) if self.effective_gain else None,
'delta_p': self.delta_p,
'tilt_target': round(self.tilt_target, 5) if self.tilt_target is not None else None,
# defined per lambda on the amp band
'out_voa': self.out_voa
},
'metadata': {
'location': self.metadata['location']._asdict()
}
}
return _to_json

def __repr__(self):
return (f'{type(self).__name__}(uid={self.uid!r}, '
Expand All @@ -947,7 +950,8 @@ def __str__(self):
return '\n'.join([f'{type(self).__name__} {self.uid}',
f' type_variety: {self.params.type_variety}',
f' effective gain(dB): {self.effective_gain:.2f}',
f' (before att_in and before output VOA)',
' (before att_in and before output VOA)',
f' tilt-target(dB) {self.tilt_target:.2f}',
f' noise figure (dB): {nf:.2f}',
f' (including att_in)',
f' pad att_in (dB): {self.att_in:.2f}',
Expand Down
225 changes: 200 additions & 25 deletions gnpy/core/network.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion gnpy/core/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ class EdfaOperational:
'gain_target': None,
'delta_p': None,
'out_voa': None,
'tilt_target': 0
'tilt_target': None
}

def __init__(self, **operational):
Expand Down
3 changes: 2 additions & 1 deletion tests/data/eqpt_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@
}
],
"SI": [{
"type_variety": "default",
"f_min": 191.3e12,
"f_max": 196.1e12,
"baud_rate": 32e9,
Expand All @@ -171,7 +172,7 @@
"roll_off": 0.15,
"tx_osnr": 100,
"sys_margins": 0
}],
}],
"Transceiver":[
{
"type_variety": "vendorA_trx-type1",
Expand Down
4 changes: 4 additions & 0 deletions tests/invocation/multiband_transmission
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Multiband_amplifier east edfa in Site_A to Site_B
type_variety: std_medium_gain_C type_variety: std_medium_gain_L
effective gain(dB): 20.90 effective gain(dB): 22.19
(before att_in and before output VOA) (before att_in and before output VOA)
tilt-target(dB) 0.00 tilt-target(dB) 0.00
noise figure (dB): 6.38 noise figure (dB): 6.19
(including att_in) (including att_in)
pad att_in (dB): 0.00 pad att_in (dB): 0.00
Expand All @@ -58,6 +59,7 @@ Multiband_amplifier east edfa in Site_B to Site_C
type_variety: std_medium_gain_C type_variety: std_medium_gain_L
effective gain(dB): 18.00 effective gain(dB): 18.00
(before att_in and before output VOA) (before att_in and before output VOA)
tilt-target(dB) 0.00 tilt-target(dB) 0.00
noise figure (dB): 7.38 noise figure (dB): 7.38
(including att_in) (including att_in)
pad att_in (dB): 0.00 pad att_in (dB): 0.00
Expand All @@ -81,6 +83,7 @@ Multiband_amplifier east edfa in Site_C to Site_D
type_variety: std_medium_gain_C type_variety: std_medium_gain_L
effective gain(dB): 19.80 effective gain(dB): 19.80
(before att_in and before output VOA) (before att_in and before output VOA)
tilt-target(dB) 0.00 tilt-target(dB) 0.00
noise figure (dB): 6.63 noise figure (dB): 6.63
(including att_in) (including att_in)
pad att_in (dB): 0.00 pad att_in (dB): 0.00
Expand All @@ -104,6 +107,7 @@ Multiband_amplifier west edfa in Site_D to Site_C
type_variety: std_medium_gain_C type_variety: std_medium_gain_L
effective gain(dB): 21.70 effective gain(dB): 21.70
(before att_in and before output VOA) (before att_in and before output VOA)
tilt-target(dB) 0.00 tilt-target(dB) 0.00
noise figure (dB): 6.25 noise figure (dB): 6.25
(including att_in) (including att_in)
pad att_in (dB): 0.00 pad att_in (dB): 0.00
Expand Down
11 changes: 11 additions & 0 deletions tests/invocation/openroadm-v4-Stockholm-Gothenburg
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Edfa Edfa_booster_roadm_Stockholm_to_fiber (Stockholm → Norrköping)_(1/2)
type_variety: openroadm_mw_mw_booster
effective gain(dB): 22.00
(before att_in and before output VOA)
tilt-target(dB) 0.00
noise figure (dB): -inf
(including att_in)
pad att_in (dB): 0.00
Expand All @@ -55,6 +56,7 @@ Edfa Edfa_fiber (Stockholm → Norrköping)_(1/2)
type_variety: openroadm_ila_low_noise
effective gain(dB): 16.33
(before att_in and before output VOA)
tilt-target(dB) 0.00
noise figure (dB): 8.01
(including att_in)
pad att_in (dB): 0.00
Expand All @@ -77,6 +79,7 @@ Edfa Edfa_preamp_roadm_Norrköping_from_fiber (Stockholm → Norrköping)_(2/2)
type_variety: openroadm_mw_mw_preamp
effective gain(dB): 16.33
(before att_in and before output VOA)
tilt-target(dB) 0.00
noise figure (dB): 12.59
(including att_in)
pad att_in (dB): 0.00
Expand All @@ -96,6 +99,7 @@ Edfa Edfa_booster_roadm_Norrköping_to_fiber (Norrköping → Linköping)
type_variety: openroadm_mw_mw_booster
effective gain(dB): 22.00
(before att_in and before output VOA)
tilt-target(dB) 0.00
noise figure (dB): -inf
(including att_in)
pad att_in (dB): 0.00
Expand All @@ -118,6 +122,7 @@ Edfa Edfa_preamp_roadm_Linköping_from_fiber (Norrköping → Linköping)
type_variety: openroadm_mw_mw_preamp
effective gain(dB): 11.00
(before att_in and before output VOA)
tilt-target(dB) 0.00
noise figure (dB): 16.00
(including att_in)
pad att_in (dB): 0.00
Expand All @@ -137,6 +142,7 @@ Edfa Edfa_booster_roadm_Linköping_to_fiber (Linköping → Jönköping)
type_variety: openroadm_mw_mw_booster
effective gain(dB): 22.00
(before att_in and before output VOA)
tilt-target(dB) 0.00
noise figure (dB): -inf
(including att_in)
pad att_in (dB): 0.00
Expand All @@ -159,6 +165,7 @@ Edfa Edfa_preamp_roadm_Jönköping_from_fiber (Linköping → Jönköping)
type_variety: openroadm_mw_mw_preamp
effective gain(dB): 26.80
(before att_in and before output VOA)
tilt-target(dB) 0.00
noise figure (dB): 8.09
(including att_in)
pad att_in (dB): 0.00
Expand All @@ -178,6 +185,7 @@ Edfa Edfa_booster_roadm_Jönköping_to_fiber (Jönköping → Borås)
type_variety: openroadm_mw_mw_booster
effective gain(dB): 22.00
(before att_in and before output VOA)
tilt-target(dB) 0.00
noise figure (dB): -inf
(including att_in)
pad att_in (dB): 0.00
Expand All @@ -200,6 +208,7 @@ Edfa Edfa_preamp_roadm_Borås_from_fiber (Jönköping → Borås)
type_variety: openroadm_mw_mw_preamp
effective gain(dB): 17.82
(before att_in and before output VOA)
tilt-target(dB) 0.00
noise figure (dB): 11.94
(including att_in)
pad att_in (dB): 0.00
Expand All @@ -219,6 +228,7 @@ Edfa Edfa_booster_roadm_Borås_to_fiber (Borås → Gothenburg)
type_variety: openroadm_mw_mw_booster
effective gain(dB): 22.00
(before att_in and before output VOA)
tilt-target(dB) 0.00
noise figure (dB): -inf
(including att_in)
pad att_in (dB): 0.00
Expand All @@ -241,6 +251,7 @@ Edfa Edfa_preamp_roadm_Gothenburg_from_fiber (Borås → Gothenburg)
type_variety: openroadm_mw_mw_preamp
effective gain(dB): 13.53
(before att_in and before output VOA)
tilt-target(dB) 0.00
noise figure (dB): 13.78
(including att_in)
pad att_in (dB): 0.00
Expand Down
11 changes: 11 additions & 0 deletions tests/invocation/openroadm-v5-Stockholm-Gothenburg
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Edfa Edfa_booster_roadm_Stockholm_to_fiber (Stockholm → Norrköping)_(1/2)
type_variety: openroadm_mw_mw_booster
effective gain(dB): 22.00
(before att_in and before output VOA)
tilt-target(dB) 0.00
noise figure (dB): -inf
(including att_in)
pad att_in (dB): 0.00
Expand All @@ -55,6 +56,7 @@ Edfa Edfa_fiber (Stockholm → Norrköping)_(1/2)
type_variety: openroadm_ila_low_noise
effective gain(dB): 16.33
(before att_in and before output VOA)
tilt-target(dB) 0.00
noise figure (dB): 8.01
(including att_in)
pad att_in (dB): 0.00
Expand All @@ -77,6 +79,7 @@ Edfa Edfa_preamp_roadm_Norrköping_from_fiber (Stockholm → Norrköping)_(2/2)
type_variety: openroadm_mw_mw_preamp_worstcase_ver5
effective gain(dB): 16.33
(before att_in and before output VOA)
tilt-target(dB) 0.00
noise figure (dB): 11.43
(including att_in)
pad att_in (dB): 0.00
Expand All @@ -96,6 +99,7 @@ Edfa Edfa_booster_roadm_Norrköping_to_fiber (Norrköping → Linköping)
type_variety: openroadm_mw_mw_booster
effective gain(dB): 22.00
(before att_in and before output VOA)
tilt-target(dB) 0.00
noise figure (dB): -inf
(including att_in)
pad att_in (dB): 0.00
Expand All @@ -118,6 +122,7 @@ Edfa Edfa_preamp_roadm_Linköping_from_fiber (Norrköping → Linköping)
type_variety: openroadm_mw_mw_preamp_worstcase_ver5
effective gain(dB): 11.00
(before att_in and before output VOA)
tilt-target(dB) 0.00
noise figure (dB): 16.00
(including att_in)
pad att_in (dB): 0.00
Expand All @@ -137,6 +142,7 @@ Edfa Edfa_booster_roadm_Linköping_to_fiber (Linköping → Jönköping)
type_variety: openroadm_mw_mw_booster
effective gain(dB): 22.00
(before att_in and before output VOA)
tilt-target(dB) 0.00
noise figure (dB): -inf
(including att_in)
pad att_in (dB): 0.00
Expand All @@ -159,6 +165,7 @@ Edfa Edfa_preamp_roadm_Jönköping_from_fiber (Linköping → Jönköping)
type_variety: openroadm_mw_mw_preamp_worstcase_ver5
effective gain(dB): 26.80
(before att_in and before output VOA)
tilt-target(dB) 0.00
noise figure (dB): 8.01
(including att_in)
pad att_in (dB): 0.00
Expand All @@ -178,6 +185,7 @@ Edfa Edfa_booster_roadm_Jönköping_to_fiber (Jönköping → Borås)
type_variety: openroadm_mw_mw_booster
effective gain(dB): 22.00
(before att_in and before output VOA)
tilt-target(dB) 0.00
noise figure (dB): -inf
(including att_in)
pad att_in (dB): 0.00
Expand All @@ -200,6 +208,7 @@ Edfa Edfa_preamp_roadm_Borås_from_fiber (Jönköping → Borås)
type_variety: openroadm_mw_mw_preamp_worstcase_ver5
effective gain(dB): 17.82
(before att_in and before output VOA)
tilt-target(dB) 0.00
noise figure (dB): 10.54
(including att_in)
pad att_in (dB): 0.00
Expand All @@ -219,6 +228,7 @@ Edfa Edfa_booster_roadm_Borås_to_fiber (Borås → Gothenburg)
type_variety: openroadm_mw_mw_booster
effective gain(dB): 22.00
(before att_in and before output VOA)
tilt-target(dB) 0.00
noise figure (dB): -inf
(including att_in)
pad att_in (dB): 0.00
Expand All @@ -241,6 +251,7 @@ Edfa Edfa_preamp_roadm_Gothenburg_from_fiber (Borås → Gothenburg)
type_variety: openroadm_mw_mw_preamp_worstcase_ver5
effective gain(dB): 13.53
(before att_in and before output VOA)
tilt-target(dB) 0.00
noise figure (dB): 13.54
(including att_in)
pad att_in (dB): 0.00
Expand Down
2 changes: 2 additions & 0 deletions tests/invocation/spectrum1_transmission_main_example
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Edfa east edfa in Lannion_CAS to Corlay
type_variety: std_medium_gain
effective gain(dB): 21.00
(before att_in and before output VOA)
tilt-target(dB) 0.00
noise figure (dB): 6.36
(including att_in)
pad att_in (dB): 0.00
Expand Down Expand Up @@ -78,6 +79,7 @@ Edfa west edfa in Lorient_KMA to Loudeac
type_variety: std_high_gain
effective gain(dB): 28.00
(before att_in and before output VOA)
tilt-target(dB) 0.00
noise figure (dB): 5.92
(including att_in)
pad att_in (dB): 0.00
Expand Down
2 changes: 2 additions & 0 deletions tests/invocation/spectrum2_transmission_main_example
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Edfa east edfa in Lannion_CAS to Corlay
type_variety: std_medium_gain
effective gain(dB): 21.00
(before att_in and before output VOA)
tilt-target(dB) 0.00
noise figure (dB): 6.36
(including att_in)
pad att_in (dB): 0.00
Expand Down Expand Up @@ -78,6 +79,7 @@ Edfa west edfa in Lorient_KMA to Loudeac
type_variety: std_high_gain
effective gain(dB): 28.00
(before att_in and before output VOA)
tilt-target(dB) 0.00
noise figure (dB): 5.92
(including att_in)
pad att_in (dB): 0.00
Expand Down
Loading

0 comments on commit f621ca6

Please sign in to comment.