Telecominfraproject / oopt-gnpy

Optical Route Planning Library, Based on a Gaussian Noise Model
http://telecominfraproject.com
BSD 3-Clause "New" or "Revised" License
204 stars 88 forks source link

Unable to model variable gain amplifier over complete gain profile #354

Open DirkSchroetter opened 4 years ago

DirkSchroetter commented 4 years ago

Describe the bug variable_gain operator amplifier model not able to model single-stage amplifier due to Computed ΔP invalid.

To Reproduce Steps to reproduce the behavior: In the equipment json, define a variable gain amplifier with the following parameters, taken from a real-life product:

{
            "type_variety": "foo",
            "type_def": "variable_gain",
            "gain_flatmax": 24,
            "gain_min": 5,
            "p_max": 23,
            "nf_min": 6.1,
            "nf_max": 19.2,
            "out_voa_auto": false,
            "allowed_for_design": true
            },

With a network using this definition, the following error will be displayed:

Configuration error in the equipment library: Computed ΔP invalid                 
 1st coil vs 2nd coil calculated DeltaP -1.40 for                 
 amplifier foo is not valid: revise inputs                 
 calculated 1st coil NF = 6.09, 2nd coil NF = 6.39

A definition of the amplifier "clipped" using the following definition:

{
            "type_variety": "foo",
            "type_def": "variable_gain",
            "gain_flatmax": 24,
            "gain_min": 10,
            "p_max": 23,
            "nf_min": 6.1,
            "nf_max": 14,
            "out_voa_auto": false,
            "allowed_for_design": true
            }, 

works and gives a good NF estimation across the gain range.

Note: The amplifier in question is not a dual-stage amplifier, but a single stage amplifier. However, the variable_gain amplifier type was the only operator model I found that allowed the specification of a gain profile and nf_min, nf_max.

Expected behavior Support for an extended range of gain and NF or an operator amplifier model for a single stage amplifier.

Environment:

ojnas commented 4 years ago

With the reservation that I didn't implement the variable_gain "operator model" (so I might have things wrong) here are some comments based on by understanding:

This model tries to simulate a 2-coil EDFA with an internal VOA between the coils, which is the most common design of variable gain EDFAs. "Dual-stage" may be misleading here since that usually refers to an amplifier with mid-stage access. A variable gain EDFA can have an internal VOA without having mid-stage access. I suspect this is the case with your product example (but see more below), which you refer to as single-stage. The variable_gain operator model in GNPy should be able to simulate such an EDFA. However, the large gain range in your example makes me suspect that this is a so-called "switchable gain" EDFA, which sort of consists of two separate variable gain EDFAs internally with overlapping gain ranges. If this is the case, and you try to simulate the full gain range with the operator model, I can see that it would likely fail.

tl;dr I suspect the problem is not related to single-stage vs. dual-stage but rather to the large gain range, which indicates it's actually a "switchable gain" product.