# Numerical Simulation of an InP Photonic Integrated Cross-Connect for Deep Neural Networks on [PERSON] Shi
## 4 Implementation of Weight Calibration and Weighted Addition
Then, we also record the signal power when all the weight-SOAs are set to ON (XTalk\({}_{\text{max}}\)), and one of these weight-SOAs is injected with currents from 0 mA to 70 mA. The blue and red solid lines in Figure 3a plot the simulated result in the condition of XTalk\({}_{\text{min}}\) and XTalk\({}_{\text{max}}\), respectively. For comparison, we also superimpose the measured curves in both cases: the blue crosses curve represents the experiment points with all SOAs ON, and the red triangles curve plots the experimental results with all SOAs OFF. Figure 3: Weight calibration. (**a**) Peak power of channel at 193.1 THz with minimum crosstalk (blue) and maximum crosstalk (red), in simulation (solid line), or experiment (cross/triangle points), versus the injection current at the weight-SOA. (**b**) Mean peak power of channel at 193.1 THz from the two curves obtained in (**a**), and with simulated crosstalk at \(-15\) dB, \(-20\) dB, \(-25\) dB and \(-30\) dB. (**c**) Weight control curves, in simulation (solid line) and experiment (dash line), with crosstalk of \(-20\) dB and reference power level at \(-25\) dBm. (**d**) Correlation between the weight assigned by the weight-SOA and the obtained weight at the output, in simulation (blue circles) and experiments (red crosses). The black line is a reference line for perfect matching. The curve trends, in the case of simulation and experimental results, are very similar. We then scan the optical crosstalk level to investigate the influence of the optical crosstalk on the peak power curves. In Figure 3b, the blue, red, yellow and violet solid lines show the peak power on channel 1 (averaged from the curves shown in Figure 3a), where the simulated crosstalk for the AWG is set to \(-15\) dB, \(-20\) dB, \(-25\) dB and \(-30\) dB, respectively. It is visible that higher crosstalk will induce greater oscillation when tuning the injection current at the weight-SOA. The oscillation might be due to the interference between the crosstalk and the signal in the desired path. The experimental result is also presented with red crosses, which is the mean value of the experimental results shown in Figure 3a. The plots indicate that a dynamic range wider than 25 dB is possible. The slight difference between simulations and experiments may be attributed to the difference in gain efficiency as hypothesized for the SOA modeling. The weight control curve in Figure 3c is generated by the power control curves in Figure 3b, with reference weight '1' level at \(-25\) dBm optical input power, which is the signal peak power when injection current of the weight-SOA is set at 70 mA. The weight calibration curves show two semi-linear operation regimes, both for the simulation (Figure 3c, blue solid line) and the experiment (Figure 3c, red dashed line). These two regions correspond to the two different SOA operation regimes: the transparency operation and linear amplification. After the weight calibration, we obtain the correlation between the assigned weight and the obtained one for the simulated and the experimental operation in Figure 3d. An error lower than 0.12 for the simulation results is obtained, when compared to the reference perfect linear relation as shown by the black line. The weighted addition corresponds to the linear operation part in a neuron. The performance of the weighted addition is of importance for the signal processing in a neural network. To estimate the impairments induced by the weighted addition, we calculate the normalized root mean square error (NRMSE), i.e., the discrepancy between the measured data and the expected data. We use the calibrated weight control curve to set the weight factors for different input channels, and calculate the NRMSE while tuning the weight factor from 0 to 1. Figure 4a plots the results of two-channel weighted addition, where channel 2 is fixed to the weight '1', while the weight for channel 1 is tuned over the overall range from 0 to 1.