## 3 Experimental Verification and Discussions
The bit loading as shown in Figure 3 is employed, and additional constellation rotation of \(\pi\)/64, \(\pi\)/48, \(\pi\)/32 and \(\pi\)/28 is added during the measurements by adjusting the initial phase of the QAM constellation in offline DSP procedures of transmitter. The identification accuracies under different additional phase rotations are shown in Figure 7. It is noteworthy that the identification accuracy increases with the increase in RoP. For the additional phase rotation of \(\pi\)/32, 100% accuracy cannot be achieved until the RoP meets \(-6\) dBm for the 25 km SSMF case and \(-7\) dBm for the OBTB case. However, for the additional phase rotation of \(\pi\)/28, 100% accuracy cannot be achieved even under RoP of \(-6\) dBm. For the additional phase rotation of \(<\)\(\pi\)/32, identification accuracy is nearly unchanged compared with the configuration without additional phase rotation, suggesting good robustness to residual constellation rotation. When it comes to OSNR monitoring, the \(k\) value should also be determined first. As shown in Figure 8a, as the \(k\) value increases, the difference between the estimated and true OSNR increases in general. Specifically, when the \(k\) value is small, the estimated OSNR is approximately proportional  
Figure 6: The BER curves and identification accuracy for (**a**) OBTB and (**b**) 25 km SSMF configurations. Figure 7: The identification accuracy under different residual phase rotation for (**a**) OBTB and (**b**) 25 km SSMF configurations. 4-QAM rotated constellation diagram for the additional phase rotation of \(\pi\)/32 at a specific RoP (\(-11\) dBm) is embedded. to the true OSNR. However, when the \(k\) value is large, the estimated OSNR is almost unaffected by the true. The MSE between estimated and true OSNR is then calculated to determine the value of \(k\). The result is as shown in Figure 8b. When \(k=2\), MSE is the smallest, so \(k\) is set to 2 when performing OSNR monitoring. The OSNR monitoring results for five signal types are shown in Figure 9. It is clear from the figure that OSNR estimates are quite accurate for both OBTB and 25 km SSMF configurations. Hence, the mean OSNR estimation error for the three signal types considered in this work is 0.69 dB, which is similar to the ones reported for the OSNR monitoring [18]. It is worth mentioning that the proposed algorithm can also work for coherent optical systems and single-carrier modulation. We also compared the complexity of the proposed KNN algorithm with artificial neural network [13]. The complexity calculation of ANN [27; 28] and KNN are listed in Table 2, in which the complexity calculation involves two parts, namely the training part and the prediction part. For ANN, \(\mathrm{N_{ep}}\) is the number of samples in a training set and \(\mathrm{n_{i}}\), \(\mathrm{n_{hid}}\) and \(\mathrm{n_{o}}\) are the number of neurons on the input, hidden and output layers, respectively. For KNN, \(\mathrm{N_{TS}}\) is the number of samples in a training set and \(\mathrm{n}\) is the number of features. The identification accuracy results of both algorithms under the same condition are shown in Figure 10 and the identification accuracy is similar. MSE of OSNR monitoring for both algorithms when RoP is \(-11\) dBm is listed in Table 3. The average MSE of KNN algorithm is 0.69 dB\({}^{2}\), and that of the ANN algorithm is 0.71 dB\({}^{2}\). In general, compared to the ANN, the KNN  
Figure 8: (**a**) Estimated versus true OSNRs with different \(k\) values and (**b**) MSE versus \(k\) values for 128 QAM (OBTB). Figure 2:0 Estimated versus true OSNRs for (**a**) OBTB and (**b**) 25 km SSMF configurations. algorithm can effectively reduce multiplication operations. However, the KNN algorithm has similar performance to the ANN algorithms.