-
K-means算法是典型的基于距离分割聚类的算法,易于实现,对大型数据集分析时聚类效果较好,而且收敛速度快,是目前应用最广泛的划分聚类算法之一[20]。K-means算法首先需要指定K个初始质心,然后对所有样本进行分类,逐次更新各聚类中心的值。通过迭代的方法,最终使类内对象相似性最大,类间对象相似性最小[21],具体流程如图1所示。
在基于K-means算法的自动锁模研究中,需要提前采集光纤激光器中脉冲输出状态和EPC环片对应位置的数据作为训练数据集,并将这些数据通过脉冲状态判决算法将数据集筛选出基频锁模状态和其他状态。将基频锁模点用K-means算法进行聚类分为K个区域,对于K值的最优选择采取轮廓系数法来确定,该方法用于评估聚类的效果,体现簇间的分离度。轮廓系数S的公式如下:
$$ S(i)=\frac{b(i)-a(i)}{\mathrm{max}\left\{a(i),b(i)\right\}} $$ (1) 式中:a(i)和b(i)分别代表样本i的簇内不相似度和样本i的簇间不相似度,具体到被动锁模光纤激光器中,反映了基频锁模点i与同簇的其他基频锁模点的平均距离和基频锁模点i与最近簇中所有基频锁模点的平均距离。其中,a(i)和b(i)的计算方法如下:
$$ a(i) = \frac{1}{{n - 1}}\sum\limits_{j \ne i}^n {distance} (i,j) $$ (2) $$ b(i) = \frac{1}{{n - 1}}\sum\limits_{j \ne i}^n {distance} (i,j) $$ (3) 式中:b(i)需要遍历其他类簇得到多个值{b1(i), b2(i), b3(i), ···, bm(i)},从中选择最小值作为最终的结果;j代表与样本i在同一类内的其他样本点;distance代表求i与j的距离。S(i)处于−1~1之间,值越大,说明同类样本之间距离越近,不同样本之间距离越远,聚类效果越好。当系统处于非基频状态时,通过K-means算法直接找到距离当前位置最近的基频锁模区域,系统直接可以反馈一个锁模区域内的点,EPC可以直接到达该锁模区域。K-means算法相比于其他算法可以更快速、准确地找到锁模区域,使光纤激光器从失锁状态到达锁模状态。
-
为了验证K-means算法的有效性和鲁棒性,搭建一个被动锁模光纤激光器,如图2所示。光纤环形腔由980 nm半导体激光器作为泵浦源,一个980/1550 nm波分复用器(WDM)、一个偏振相关隔离器(PS-ISO)、一个耦合器(OC)、一段掺铒光纤(EDF)、一个电动偏振控制器(EPC)和一个手动偏振控制器(MPC),腔长约20.9 m。在环形腔中,通过波分复用器将泵浦光输入到激光器内,使用5 m长的掺铒光纤作为增益介质。手动偏振控制器和电动偏振控制器分别在偏振相关隔离器的两侧控制偏振态。偏振相关隔离器保证了激光器单向运转并实现了起偏器的作用。激光器通过30%输出耦合器输出到外部,经过高速InGaAs光电探测器(PD)将光信号转换为电信号,通过示波器测量得出脉冲的数据。计算机通过网线与示波器连接并采集激光器的输出脉冲数据,为K-means算法提供反馈,并通过计算机向EPC传输新的角度值来改变光纤激光器的偏振状态。实验中,同时使用光谱分析仪和自相关仪实时测量得到锁模脉冲的状态。
EPC上有三个通过调整角度以改变偏振态的旋转桨,X旋转桨(λ/4波片)、Y旋转桨(λ/2波片)、Z旋转桨(λ/4波片)。每个旋转桨的转动范围是0°~170°。EPC由一条USB总线连接计算机,接受计算机的指令调节旋转桨的角度。通过适当调整EPC的输入角度能够覆盖庞加莱球上的任意偏振状态,EPC的特点是可以实现K-means算法中调整步长的任意变化。因此,无论光纤激光器中输出偏振态的位置偏离锁模的偏振态多远,都可以直接调整恢复到目标状态。
将通过示波器采集到的脉冲数据输入到计算机,并通过脉冲判决算法确定激光器输出状态。其中,脉冲判决算法的形式如下:
$$ \left\{ \begin{gathered} am{p_{{\rm{min}}}} \lt re{\text{ }}amp \lt am{p_{{\rm{max}}}} \\ fr{e_{{\rm{min}}}} \lt re{\text{ }}fre \lt fr{e_{{\rm{max}}}} \\ 0 \leqslant re{\text{ }}fre - ave{\text{ }}fre \leqslant fr{e}_{{\rm{max}}} - fr{e_{{\rm{min}}}} \\ 0 \leqslant ave{\text{ }}fre - re{\text{ }}fre \leqslant fr{e}_{{\rm{max}}} - fr{e_{{\rm{min}}}} \\ \end{gathered} \right. $$ (4) 式中:re amp表示当前脉冲状态下的实时幅值;re fre表示当前状态下的脉冲实时频率;ave fre表示当前的脉冲状态的平均频率;ampmax和ampmin分别代表误差允许范围内当前脉冲幅值最大值和最小值,分别是当前脉冲平均幅值的(1+5%)倍和(1–5%)倍;fremax和fremin分别代表误差允许范围内的脉冲频率最大值和最小值,分别是基频锁模脉冲平均频率的(1+5%)倍和(1–5%)倍。当输出脉冲满足上述表达式时,被认为此时激光器输出是基频锁模状态。否则,激光器输出将视为其他状态。
Automatic mode-locked fiber laser based on K-means algorithm
-
摘要: 研究了一种基于K-means算法和非线性偏振旋转谐振技术的自动锁模传统孤子光纤激光器。实验中通过K-means算法对电动偏振控制器进行调节,利用示波器实时采集数据,并基于脉冲判决算法将脉冲分为基频锁模态和其他状态。当泵浦驱动电流为230 mA时,实现了1 531 nm、脉宽为456 fs的基频传统孤子输出。然后,通过调节电动偏振控制器遍历激光器输出状态,并进行脉冲判决分类。最后,通过K-means算法将处于基频锁模态时电动偏振控制器旋转桨的角度按空间坐标系聚类分析。当光纤激光器处于非基频锁模态时,通过K-means算法调节电动偏振控制器,恢复到基频锁模状态。经过100次测试,从失锁或其他状态调节到基频锁模态点所需平均时间为0.25 s。该工作为实现高效、便捷的光纤激光器自动锁模提供了新的方案。Abstract:
Objective Ultrashort pulse laser technology develops rapidly, it has been applied in various fields, such as industrial materials processing, biomedical diagnostics, and terahertz generation. The passive mode-locked fiber lasers have the advantages of high efficiency and low cost, which are usually used to generate ultrashort pulses. The passive mode-locking technology includes many kinds of technologies, among which the nonlinear polarization rotation technology has the advantages of high damage threshold, large modulation depth and short response time, etc. However, the mode-locked fiber laser based on the nonlinear polarization rotation technology is sensitive to the polarization state of laser pulses. The K-means algorithm is a classic algorithm based on distance segmentation and clustering. It is terse and has fast convergence speed when analyzing large data sets. This paper realizes a passive mode-locked erbium-doped fiber laser with nonlinear polarization rotation technology and K-means algorithm, which can automatically find the fundamental frequency mode-locked pulse state. Methods An electric polarization controller with programmable motion is used to adjust the polarization state of the pulse in a passive mode-locked erbium-doped fiber laser. First, all angles of the electric polarization controller are traversed and the output pulse data at different angles are collected simultaneously. The fundamental frequency mode-locked pulse points are obtained through the pulse decision algorithm. Then, the fundamental frequency mode-locked points are clustered and analyzed using K-means algorithm. When the pulse is out of lock or in other states, a set of rotating paddle angles is fed back to the electric polarization controller through the K-means algorithm. At last, the fundamental frequency mode-locked pulse are exported from the laser. Results and Discussions By properly adjusting the manual polarization controller and the electric polarization controller, a traditional fundamental frequency mode-locked pulse (Fig.3) is obtained, when the pump current is about 230 mA. The central wavelength of the spectrum is 1 531 nm with the pulse duration and fundamental repetition frequency of 0.96 ps and 9.847 MHz, respectively. 1102 mode-locked points are obtained with the pulse decision algorithm and displayed in the three-dimensional coordinate space (Fig.4). The classification result is optimum when the K value is set as 6 using the Silhouette Coefficient method (Fig.5). Therefore, the mode-locked points are divided into 6 categories using the K-means clustering algorithm (Fig.6). After 100 tests, the fastest, slowest and average time for finding the fundamental frequency mode-locked point is 0.11 s, 0.92 s, and 0.25 s, respectively (Fig.7). A comparative test is conducted by randomly changing manual polarization controller state, in order to test the applicability of the algorithm (Fig.8). Conclusions The proposed method can quickly find the fundamental frequency mode-locked pulse points in a mode-locked fiber laser based on nonlinear polarization rotation technology and K-means algorithm. The average time required to adjust from other states to the fundamental mode-locked point is 0.25 s in 100 tests. This method can rapidly realize the output of fundamental frequency mode-locked pulse, and provides a new scheme for realizing efficient and convenient automatic mode-locking of fiber laser. -
-
[1] Pu Guoqing, Zhang Li, Hu Weisheng, et al. Automatic mode-locking fiber lasers: Progress and perspectives [J]. Science China Information Sciences, 2020, 63(6): 1-24. [2] Su Xin, Yao Ji, Wang Yuning, et al. Ultra-violet picosecond fiber-solid hybrid amplification laser [J]. Optics and Precision Engineering, 2020, 28(10): 2122-2128. (in Chinese) doi: 10.37188/OPE.20202810.2122 [3] Sun Yousheng, Duanmu Qingduo, Lin Peng, et al. 1.6 μm band mode-locked fiber laser [J]. Chinese Optics, 2021, 14(6): 1387-1394. (in Chinese) doi: 10.37188/CO.2021-0128 [4] Xie Jiandong, Yan Liping, Chen Benyong, et al. Automatic offset-frequency locking of external cavity diode laser in wide wavelength range [J]. Optics and Precision Engineering, 2021, 29(2): 211-219. (in Chinese) doi: 10.37188/OPE.20212902.0211 [5] Du Junting, Chang Bing, Li Zhaoyu, et al. Mid-infrared optical frequency combs: Progress and applications (Invited) [J]. Infrared and Laser Engineering, 2022, 51(3): 20210969. (in Chinese) [6] Lu Shiyu, Hao Qiang, Liu Tingting, et al. All polarization maintaining fiber-based optical comb system with nonlinear loop mirror mode-locking [J]. Chinese Journal of Lasers, 2021, 48(21): 2101002. (in Chinese) doi: 10.3788/CJL202148.2101002 [7] Zhang Shida, Geng Yijia. Ultrafast fiber laser based on bismuth telluride evanescent field mode-locked device [J]. Chinese Optics, 2022, 15(3): 433-442. (in Chinese) [8] Yang Simin, Wang Xude, Sun Mengqiu, et al. Wavelength switchable and tunable dissipative soliton mode-locking Yb-doped fiber laser [J]. Infrared and Laser Engineering, 2020, 49(10): 20200026. (in Chinese) [9] Ma C, Khanolkar A, Zang Y, et al. Ultrabroadband, few-cycle pulses directly from a Mamyshev fiber oscillator [J]. Photonics Research, 2020, 8(1): 65-69. doi: 10.1364/PRJ.8.000065 [10] Hu Minglie, Cai Yu. Research progress on mid-infrared ultrafast fiber laser [J]. Chinese Journal of Lasers, 2020, 47(5): 0500009. (in Chinese) doi: 10.3788/CJL202047.0500009 [11] Ahmad H, Azmy N F, Norisham N F, et al. Thulium-doped fluoride mode-locked fiber laser based on nonlinear polarization rotation [J]. Optical and Quantum Electronics, 2022, 54(2): 1-11. [12] Xiao Lin, Wang Tianshu, Ma Wanzhuo, et al. Switching and coexistence of stretched pulse and dissipative soliton in a hybrid mode-locked fiber laser [J]. Optics Communications, 2022, 522(9): 128649. [13] Zhao Heng, Ma Gaiming, Li Xiangyue, et al. Buildup dynamics in an all-polarization-maintaining Yb-doped fiber laser mode-locked by nonlinear polarization evolution [J]. Optics Express, 2020, 28(17): 24550-24559. doi: 10.1364/OE.399946 [14] Wei Xiaoming, Xu Shanhui, Huang Huichang, et al. Compact all-fiber ring femtosecond laser with high fundamental repetition rate [J]. Optics Express, 2012, 20(22): 24607-24613. doi: 10.1364/OE.20.024607 [15] Genty G, Salmela L, Dudley J M, et al. Machine learning and applications in ultrafast photonics [J]. Nature Photonics, 2021, 15(2): 91-101. doi: 10.1038/s41566-020-00716-4 [16] Hellwig T, Walbaum T, Gross P, et al. Automated characterization and alignment of passively mode-locked fiber lasers based on nonlinear polarization rotation [J]. Applied Physics B, 2010, 101(3): 565-570. doi: 10.1007/s00340-010-4224-2 [17] Brunton S L, Fu X, Kutz J N, et al. Self-tuning fiber lasers [J]. IEEE Journal of Selected Topics in Quantum Electronics, 2014, 20(5): 464-471. doi: 10.1109/JSTQE.2014.2336538 [18] Woodward R I, Kelleher E J R. Towards "smart lasers": self-optimization of an ultrafast pulse source using a genetic algorithm [J]. Scientific Reports, 2016, 6(1): 37616. doi: 10.1038/s41598-016-0001-8 [19] Pu Guoqing, Yi Lilin, Zhang Li, et al. Genetic algorithm-based fast real-time automatic mode-locked fiber laser [J]. IEEE Photonics Technology Letters, 2019, 32(1): 7-10. [20] Ahmed M, Seraj R, Islam S M S. The k-means algorithm: A comprehensive survey and performance evaluation [J]. Electronics, 2020, 9(8): 1295. doi: 10.3390/electronics9081295 [21] 周爱武, 于亚飞. K-Means聚类算法的研究[J]. 计算机技术与发展, 2011, 21(2): 62-65. [22] 王千, 王成, 冯振元, 等. K-means聚类算法研究综述[J]. 电子设计工程, 2012, 20(7): 21-24. doi: 10.3969/j.issn.1674-6236.2012.07.008 [23] Pu Guoqing, Yi Lilin, Zhang Li, et al. Intelligent programmable mode-locked fiber laser with a human-like algorithm [J]. Optica, 2019, 6(3): 362-369. doi: 10.1364/OPTICA.6.000362