Automatic gain control modeling

Wondering if there is a recommended way to simulate automatic gain control with the optical amplifier component?

Many thanks,

Hi @xw27,

The primitive optical amplifier element in the library is a constant amplifier regardless of the operating frequency and input power . We are working on the sophisticated EFDA model and it will be available soon.

By now, the most efficient way is to define your own amplifier model by using the Scripted element. This element can read in the signal (input) sample by sample and based on the signal’s power level, apply different gain to it. To use this method, you have to know the gain curve of the automatic gain control amplifier.

I hope this could help. I’d love to discuss more if you have any further problems on implementing this :slight_smile:

1 Like

Got it- I see the new updates on the TWLM with the gain fitting, with option of disabling grating, is this TWLM also intended to serve as a gain element/soa or just as laser? Else adding in gain saturation models for a soa amp should still be done through scripted elements?

Hi @xw27,

Nice catch! The TWLM laser model now is capabale of doing gain curve fittings and it could be used as SOAs. Please check out more information through the following link:

I hope this could help. I’d love to discuss more if you have further inquiries on this :slight_smile:

ok I see, at the most basic I just want to capture the saturation output power, and the saturated gain when multiple channels at different wavelengths are fed through the SOA(or edfa).

I tried using the TWLM as just a gain by sending a laser through it, but it doesn’t look like it’s amplifying, so was wondering maybe I didnt use correct setting to use TWLM as just an amp?

I just used the default elements and changed the wavelength of the lasers, and adjusted the DC input to the TWLM to try toincrease gain.

It does not look like the original signal from the laser is being amplified as seen below, on the left is when DC source is set to 0.3, on the right it is set to 0.8, the output of the TWLM has more power across its own modes, but the arrows in red pointing to the input laser signal looks like its just sitting there- if i make DC source higher, it will be swamped and no longer visible:

Just checking if I have settings incorrect, or perhaps the TWLM element isn’t the right thing for just a basic model of an amp’s gain saturation when fed w multiple lasers and I should just go back to doing scripted element that integrates over the power density spectrum of multiple wavelengths?

As for the examples, after running all of them, I get “no results to display” in the analyzers:

from icp file download, the other examples show this as well.

As for the gainfit test examples downloaded from that page, the fitting works but after running the sweeps just with default KB instructions I get:

Just sticking a default ONA to a default TWLM from the element library I get:

Hi @xw27,

For this problem, you have to run the simulation first and then run the script.[quote=“xw27, post:5, topic:3479”]
As for the examples, after running all of them, I get “no results to display” in the analyzers:

blob.jpg1366x768 349 KB

from icp file download, the other examples show this as well.

I don’t see this problem on my computer. Please let me know how to reproduce it and I can help you from there.

Ah, got it. Thanks! Yeah I dont see the problem when I ran on another computer either, I’ll figure it out- I think it may have to do w version- reran on newer version and see same problem

as for the TWLM as gain only- correction on my previous statement, I only disabled the grating to “false” but going thru the rest of the settings there were also end facet reflectivities I should have lowered too, setting to zero, I do see the input lasers amplified, woohoo! It seems to be saturating, will just have to adjust the available knobs to get the wanted Psat.

thanks for the pointers!!

Hi @xw27,

I am glad everything worked out!!! Nice job. Let me know if you have further problems, I’d love to discuss more :slight_smile:

the problem with the “there are no annotated results to display” seems to happen when you load an old INTERCONNECT file(created with previous version) into the new version- the simulation runs and no error is reported, but there is no results in the analyzier/OSA. this can be fixed if you delete only the old OSA created with the previous version and replace it with a new OSA from the element library under the new version.

There is another problem with the new version though in that the export to text no longer works, nor does the script command
Error: prompt line 1: Can not find result ‘sum/spectrum’ in the result provider ‘OSA_1’”
This happens from purely a fresh file created only in the new version. The export to Matlab button does not connect to Matlab either now it seems.

Hi @xw27,

Were you trying to plot directly from the analyzer? By which I mean right click on the analyzer and select “Display results”? Generally the warning “there are no results to display” indicates that there is no result in the list that is selected as “annotate”. You just need to go back to the “Result View” window and tick the result that you are interested for “annotate”; or you can simply select the result to “visualize” in Result View window.

The command works as usual but the result data structures have been updated for all the analyzers in INTERCONNECT (to separate the signals and noises). I will have to update all the old script files online and by now, you could try to change the command line to:


All the similar problems could be resolved the same way.

For the export to MatLab problem, I am doing some tests and will follow up with you in another post.

I hope this could help :slight_smile:

Hi @xw27,

We finally got the LCML published!!! There is a laser model in the library that allow the customer to feed in measurement data, which may be useful to you. Please check out the LCML and the laser model at the following links:

I’d love to discuss more if you have further inquiries about this.