AM modulator/ Ideal modulation sanity checks


#1

Was wondering if there’s a quick way to do an ideal version of a modulation, generate 2 sidebands or 1 sideband only, no other harmonics? It looks like the Optical Amplitude Modulation block “AM” has harmonics, and “Optical modulator scripted” has neff definitions/ doesn’t let you script arbitrary modulation functions defined through the math (or is that incorrect?).

Just wanted to generate some ideal behavior for sanity checks/isolate behavior to some other block of the system. Should I be looking at the “scripted elements”? Is it possible to open the “Optical Amplitude Modulation” block’s file/code/script and edit the functions and math through there? Thanks for the guidance, much appreciated!


#2

Hi @xw27

You could use the “Scripted Element” to build an ideal optical modulator which matches your expectation. The KB page Scripted Element clearly illustrates the implementation details and defining method of this element. I made an example file optical_modulator_example.icp (183.6 KB) which contains a simple amplitude modulator that generates double sidebands. The script that used to define this element is under the “Simulation” tab in the Editing window. The modulated signal power spectrum is attached below.

The “Optical Amplitude Modulation” element is a primitive element and it is not possible to open up the block for any of the primitive elements.

I hope this helps :slight_smile:


#3

@gwang

Thanks a lot for the file!

Had spent some time trying to modify the example scripted optical gain file, but had hanging error during simulation, so this really clears up what I needed in the scripts.

I had:

which is just a slight modification of the scripted gain example from " optical_mm_scripted_struct.icp" but it lacks the initialization and setup that you have in the file you gave, and freezes on simulation, so your code is incredibly helpful.
Really appreciate it!
XW


如何在Interconnect中实现铌酸锂相位调制器的效果
#4

I am glad it helped :slightly_smiling:


#5

Hi Guanhui,
Have another question- did something change with xx.data.value in the recent updates to Interconnect? I re-downloaded the link provided to “optical_modulator_example.icp” and it’s no longer working, when I run that file I now get an error:

"Scripted Element: value=struct;
value.time=-1;
value.value=0;

Scripted Element: value=struct;
value.time=-1;

Scripted Element: value=struct;
value.time=-1;

Scripted Element: go:
Error: prompt line 41: arguments of * are not the same type or of an invalid type

Scripted Element: go: Error: prompt line 41: arguments of * are not the same type or of an invalid type Thread ID 1 usage: 34.13 % Thread ID 2 usage: 50.00 % Saving monitor data... Wrapping up elements... Thread ID 1 usage: 16.67 % Thread ID 2 usage: 33.33 % Finalizing elements... Checking for errors... Simulation completed successfully. Total elapsed time: 00:00:00" Thanks again! XW

#6

More details: yeah it runs with an older version of Interconnect (5.5) and I get results of the modulation in the OSA object, so it seems it has to do with the version differences.


#7

Hi @xw27,

Thanks a lot for bringing up this problem. Indeed the Scripted Element data structure have been updated, and now the “value” is in a cell format as well. So to make the script work, you just need to replace the xx.data.value in the script by xx.data.value{1}. I updated the file optical_modulator_example.icp (183.6 KB) and it should work now (the file linked in previous posts has been updated too).

For your information, the “Electrical” data and “Optical” data structure is listed below, you could refer to it for your coding.

However, we will update the scripts and data structure agai shortly. I will update you when these features are ready to use.

I hope this could help :slight_smile:


#8

I see, thanks a lot!