New behaviour of the sample rate in circuits connected to ONAs in 2019b-R1 release

In the 2019b-R1 release we have simplified the setup of circuits with electrical sources connected to an Optical Network Analyzer (ONA) in INTERCONNECT. In previous releases when a circuit with electrical sources (for example, a DC source) was connected to an ONA, you had to make sure the frequency range of the ONA matched the sample rate of the electrical sources. Failing to do so would result in an error and prevent the simulation from running.

The problem…

For example, in the image below you can see a very simple circuit built with primitive elements connected to an ONA with the default frequency range (100 GHz), which fails to run with the following error message (in releases prior to 2019b-R1):

‘OM_1: Input port sample rate ‘1e+11’ Hz is the wrong value for ‘port 1’. A ‘1.6e+12’ Hz sample rate was expected.’

This error was caused by the discrepancy between the frequency range of the ONA (100 GHz) and the sample rate of the DC source (1600 GHz), which by default is fixed to be the same as the sample rate of the Root Element (using the expression ‘%sample rate%’). One way to solve this problem was to fix the frequency range of the ONA to be the same as the sample rate of the Root Element using the expression ‘%sample rate%’ as well. This way you would set the desired frequency range in the sample rate property of the Root Element.

Clearly, this is a very annoying behaviour! We have worked on improving the behavior of the software as described next.

Our solution…

In the new release, the engine overrides the sample rate of all the elements in a circuit connected to an ONA and uses the frequency range of the ONA instead. This ensures that all the sources connected to the circuit have the correct sample rate, consistent with the desired frequency range to be probed. With this change, you don’t have to worry about the sample rate of the sources when using an ONA, as the engine will automatically take care of it. Simply, set the desired frequency range in the ONA and you are ready to go!

We have included a message in the log window so that you are aware of this change. This message is just for your information and does not imply that there is a problem with your simulation. The message shown below is what you will see if you run the same simulation with the 2019b-R1 release:


Note that after the simulation, the original sample rate value is restored in the circuit elements, so the change of the sample rate is not permanent. It is important to be aware of this if you want to probe your circuit in other ways, for example if instead of an ONA you want to use a CW source in a time domain simulation. In this situation, if you want the behaviour to be consistent with the results you obtained with the ONA, you must modify the sample rate of the sources manually to be the same as the ONA’s frequency range.

1 Like