鐘佩思 張大衛(wèi) 張超 王曉
摘 要:
為提升康復(fù)外骨骼機(jī)器人的步態(tài)跟蹤性能,提出一種基于改進(jìn)渦流搜索算法的迭代學(xué)習(xí)控制方法。首先針對(duì)傳統(tǒng)迭代學(xué)習(xí)控制抗擾性差和控制信息缺失問題,引入PD控制器、自適應(yīng)遺忘因子、誤差過渡曲線和控制信息搜索等策略,改進(jìn)迭代學(xué)習(xí)控制律;其次,基于多種策略對(duì)渦流搜索算法進(jìn)行改進(jìn),提出了一種改進(jìn)渦流搜索算法,改進(jìn)后的算法可優(yōu)化迭代學(xué)習(xí)控制的PD參數(shù);最后進(jìn)行行走實(shí)驗(yàn),將提出的迭代學(xué)習(xí)控制方法與現(xiàn)有的同類算法進(jìn)行仿真和數(shù)值比較,并測試了擾動(dòng)情況下的跟蹤性能。實(shí)驗(yàn)結(jié)果表明,所提方法的誤差更小,跟蹤性能更強(qiáng)。該算法改進(jìn)了迭代學(xué)習(xí)控制的不足,具有較強(qiáng)的抗擾性能,保證了使用時(shí)的穩(wěn)定性。
關(guān)鍵詞:迭代學(xué)習(xí)控制;渦流搜索算法;步態(tài)跟蹤;外骨骼機(jī)器人;軌跡過渡;參數(shù)優(yōu)化
中圖分類號(hào):TP242.6?? 文獻(xiàn)標(biāo)志碼:A??? 文章編號(hào):1001-3695(2024)03-034-0873-07doi: 10.19734/j.issn.1001-3695.2023.07.0316
Iterative learning control of exoskeleton based on improved vortex search algorithm
Zhong Peisi, Zhang Dawei, Zhang Chao, Wang Xiao
(Advanced Technology Research Center, Shandong University of Science & Technology, Qingdao Shandong 266590, China)
Abstract:
In order to improve the gait tracking performance of the rehabilitation exoskeleton robot, this paper proposed an iterative learning control method based on improved vortex search algorithm. Firstly, for the problems of poor immunity and missing control information of traditional iterative learning control, it introduced strategies such as PD controller, adaptive forgetting factor, error transition curve and control information search to improve the iterative learning control law. Secondly, it proposed an improved vortex search algorithm based on multiple strategies, and the algorithm could optimize the PD parameters of iterative learning control. Finally, it simulated and numerically compared the proposed iterative learning control method with existing similar algorithms on walking experiments, and test the tracking performance under perturbation. The experimental results show that the proposed iterative learning control method has smaller error and stronger tracking performance. The algorithm improves the shortcomings of the iterative learning control, has strong anti-interference performance, and ensures stability in use. Key words:iterative learning control; vortex search algorithm; gait tracking; exoskeleton robot; trajectory transition; para-meter optimization
0 引言
肢體康復(fù)訓(xùn)練是下肢殘疾患者恢復(fù)肢體功能的主要方法。臨床實(shí)驗(yàn)表明,通過康復(fù)外骨骼機(jī)器人代替人工訓(xùn)練可以提升訓(xùn)練精度、提高效率[1]。在恢復(fù)前期,病患不能自主地進(jìn)行康復(fù)訓(xùn)練,這一時(shí)期被稱為被動(dòng)康復(fù)階段,應(yīng)遵循“機(jī)主人輔”原則,即通過外骨骼機(jī)器人牽引病肢進(jìn)行重復(fù)的康復(fù)訓(xùn)練[2]。
基于訓(xùn)練的重復(fù)性,可將迭代學(xué)習(xí)控制(iterative learning control,ILC)作為外骨骼機(jī)器人控制方法。迭代學(xué)習(xí)控制適用于重復(fù)執(zhí)行同一任務(wù)的被控系統(tǒng),其目標(biāo)是通過不斷迭代,最終實(shí)現(xiàn)對(duì)參考軌跡的精確跟蹤,其不依賴精確的系統(tǒng)數(shù)學(xué)模型,適應(yīng)性強(qiáng),易于實(shí)現(xiàn),已被應(yīng)用于工業(yè)機(jī)械臂[3]、輪式機(jī)器人[4]和康復(fù)外骨骼機(jī)器人[5,6]。但由于系統(tǒng)誤差和外界擾動(dòng)的存在,迭代學(xué)習(xí)控制存在初值偏離期望值,迭代長度不一的缺點(diǎn),造成控制信息缺失,降低了控制性能,且迭代學(xué)習(xí)控制屬于前饋控制,抗擾動(dòng)性較差。
針對(duì)控制信息缺失問題,Zhuang等人[7]采用逐次投法設(shè)計(jì)了隨機(jī)變長度控制律,相比于傳統(tǒng)迭代學(xué)習(xí)控制提高了收斂精度,但無法保證系統(tǒng)的抗擾性和魯棒性。Zeng等人[8]提出一種初值校正機(jī)制,放寬了初值一致條件,并實(shí)現(xiàn)了機(jī)械臂的精確跟蹤,但需要在每次迭代中重新設(shè)計(jì)過渡軌跡,運(yùn)算量較大。針對(duì)抗擾性差,戴寶林等人[9]提出一種帶遺忘因子的迭代學(xué)習(xí)控制方法,并引入了最優(yōu)化理論,計(jì)算出最優(yōu)控制增益,但其使用了固定的遺忘因子,抗擾動(dòng)能力欠佳。張長勝等人[10]提出一種基于改進(jìn)狼群算法的自適應(yīng)迭代學(xué)習(xí)策略,通過狼群算法來優(yōu)化控制律的參數(shù),有效降低了機(jī)械臂的跟蹤誤差,但誤差的收斂速度較慢。安欣等人[11]通過粒子群算法優(yōu)化控制律參數(shù),減少了迭代次數(shù),提高了地震波的復(fù)現(xiàn)精度,但對(duì)于粒子群算法的改進(jìn)較少,當(dāng)控制系統(tǒng)擾動(dòng)較強(qiáng)或粒子群算法陷入局部最優(yōu)時(shí)可能無法獲取最佳參數(shù)。
綜上所述,迭代學(xué)習(xí)控制的改進(jìn)應(yīng)以避免控制信息缺失問題和增強(qiáng)抗擾性為目的,并設(shè)計(jì)性能較強(qiáng)的優(yōu)化算法對(duì)控制律參數(shù)進(jìn)行尋優(yōu),以降低控制誤差。為此,本文通過引入PD控制器、自適應(yīng)遺忘因子、過渡曲線和控制信息搜索等策略改進(jìn)了控制律,以提升抗擾性,彌補(bǔ)信息缺失;并基于Doan等人[12]提出的渦流搜索算法(vortex search,VS),通過建立新的候選解生成、半徑更新和圓心調(diào)整機(jī)制,提出一種改進(jìn)渦流搜索算法(improved vortex search algorithm,IVS),將改進(jìn)后的算法應(yīng)用于控制律增益參數(shù)優(yōu)化,以提升控制效果。
2 改進(jìn)渦流搜索算法
渦流搜索算法的原理是通過嵌套圓來模擬渦流采樣策略。迭代開始前,計(jì)算初始圓心位置和初始半徑。迭代開始后,渦流搜索算法通過高斯分布產(chǎn)生候選解,代入目標(biāo)函數(shù)求得每次迭代的適應(yīng)度,在每次迭代結(jié)束后將最優(yōu)解作為下次迭代的圓心,并更新搜索半徑[12]。渦流搜索算法的優(yōu)點(diǎn)是參數(shù)較少,易于實(shí)現(xiàn),但渦流搜索算法只通過高斯分布產(chǎn)生候選解,易陷入局部最優(yōu),且易提供收斂速度慢、精度低的解。本文通過改進(jìn)候選解的生成、半徑更新和圓心調(diào)整等策略,進(jìn)一步提升優(yōu)化性能。
2.1 候選解生成策略
良好的初始解生成機(jī)制可有效避免優(yōu)化算法易陷入局部最優(yōu),本文提出一種基于Hammersley點(diǎn)集采樣的候選解初始化策略。Hammersley點(diǎn)集基于Van der Corput序列變換而來,其優(yōu)點(diǎn)是易于實(shí)現(xiàn),且分布均勻性強(qiáng)于Halton序列和普通隨機(jī)數(shù)序列[16],缺點(diǎn)是無法擴(kuò)展,只能生成固定數(shù)目的樣本,因此適合用于候選解的初始化策略。
研究表明,引入Lévy飛行可以更有效地探索全局空間[17]。在候選解的生成機(jī)制中引入Lévy飛行策略,在迭代前期通過Lévy飛行更新候選解,增強(qiáng)其全局搜索能力;當(dāng)適應(yīng)度滿足一定條件后,通過高斯分布更新候選解,保證其局部搜索能力。具體實(shí)現(xiàn)形式如式(11)所示。
3 實(shí)驗(yàn)驗(yàn)證
3.1 IVS算法性能評(píng)估
為了評(píng)估IVS算法的性能,本文使用了17個(gè)基準(zhǔn)測試函數(shù),包括9個(gè)單峰函數(shù)和8個(gè)多峰函數(shù),選取標(biāo)準(zhǔn)VS算法、MVS算法[20]、文獻(xiàn)[21,22]作為對(duì)比算法。設(shè)定種群數(shù)為50,最大迭代次數(shù)為10 000次,維度均為30維。繪制上述五種算法在17個(gè)基準(zhǔn)函數(shù)的適應(yīng)度變化,如圖3所示。保持參數(shù)設(shè)置不變,五種算法在每個(gè)函數(shù)上獨(dú)立運(yùn)行30次,表1和2展示了各算法在單峰和多峰函數(shù)下的尋優(yōu)結(jié)果。
由圖3可知,IVS的收斂速度相較傳統(tǒng)VS更快,但在多數(shù)函數(shù)上弱于MVS和文獻(xiàn)[21]。由表1和2可知,IVS相較其他算法有著更高的收斂精度和更小的標(biāo)準(zhǔn)差。在sphere、Beale、Bohachevsky、Griewank、Rastrigin、Shubert、Eggholder和drop-wave函數(shù)上,IVS均收斂至最優(yōu),且在多數(shù)函數(shù)中以較少迭代次數(shù)收斂。綜上,IVS相較于對(duì)比算法具有收斂精度高,尋優(yōu)效果穩(wěn)定和適用性強(qiáng)的優(yōu)勢。
3.2 控制效果評(píng)估
為驗(yàn)證本文算法在實(shí)際應(yīng)用中的控制效果,通過外骨骼機(jī)器人進(jìn)行了行走實(shí)驗(yàn),如圖4所示。
外骨骼機(jī)器人通過PC機(jī)作為上位機(jī),進(jìn)行控制程序編寫、數(shù)據(jù)傳輸和指令發(fā)送,各關(guān)節(jié)角度變化由姿態(tài)傳感器MPU6050測得并傳至PC機(jī)。數(shù)據(jù)預(yù)處理后,擬合得到四個(gè)關(guān)節(jié)在1 s內(nèi)的角度變化曲線,將其作為期望曲線,如式(17)所示。
其中:q1、q2、q3、q4分別為擬合得到的左膝、右膝、左髖和右髖關(guān)節(jié)的期望關(guān)節(jié)曲線。
選取文獻(xiàn)[23,24]與本文算法進(jìn)行跟蹤性能對(duì)比。文獻(xiàn)[23]為傳統(tǒng)PD型迭代學(xué)習(xí)控制,與本文改進(jìn)PD型迭代學(xué)習(xí)控制對(duì)比,以突出本文算法的性能優(yōu)勢;文獻(xiàn)[24]則為一種新型迭代學(xué)習(xí)控制算法,將本文算法與之對(duì)比,以體現(xiàn)本文算法在同類迭代學(xué)習(xí)控制算法中的優(yōu)勢。兩者實(shí)現(xiàn)形式如式(18)(19)所示。文獻(xiàn)[24]高階參數(shù)α1=1.2、α2=-0.1、α3=-0.1,初值取10,其他控制參數(shù)設(shè)置如表3所示。其中本文算法增益系數(shù)由IVS算法優(yōu)化得出,需設(shè)置范圍。IVS種群數(shù)取50,優(yōu)化算法迭代次數(shù)取100。左膝、右膝、左髖和右髖的控制輸入初值u0均取0。
對(duì)每個(gè)時(shí)間變量的誤差取絕對(duì)值,從絕對(duì)值中取最大值作為當(dāng)代最大誤差。下肢關(guān)節(jié)的誤差變化如圖5所示。
本文算法在圖5中存在采樣點(diǎn)缺失,這是由于該采樣點(diǎn)時(shí)刻誤差極小,已接近或等于0,其原理等同于圖3中測試函數(shù)適應(yīng)度收斂至0后,后續(xù)采樣點(diǎn)數(shù)據(jù)缺失。由圖5可知,文獻(xiàn)[23]誤差最大,且存在波動(dòng);相比其他兩種算法,本文算法跟蹤精度在四種關(guān)節(jié)曲線上更高,在采樣點(diǎn)缺失時(shí)刻實(shí)現(xiàn)了軌跡的精確跟蹤。
為驗(yàn)證本文算法對(duì)突發(fā)外界干擾的魯棒性和響應(yīng)能力,對(duì)軌跡曲線施加擾動(dòng)項(xiàng),擾動(dòng)項(xiàng)為基于Tent混沌映射產(chǎn)生的介于(-4,4)的隨機(jī)值,跟蹤效果如圖6所示。
迭代學(xué)習(xí)控制效果取決于能否在較少代數(shù)內(nèi)實(shí)現(xiàn)低誤差。由圖6可知,第5次迭代時(shí)誤差較大,到第10次迭代時(shí)已基本實(shí)現(xiàn)良好的軌跡跟蹤,到第20次迭代已可以準(zhǔn)確跟蹤期望曲線,說明當(dāng)存在外界干擾時(shí),控制系統(tǒng)能迅速響應(yīng),消除其帶來的誤差,以起到對(duì)穿戴者保護(hù)的作用。
在實(shí)際情況下,擾動(dòng)通常伴隨整個(gè)行走過程。本文以左膝和左髖為實(shí)驗(yàn)對(duì)象,在期望曲線中加入均值為0,標(biāo)準(zhǔn)差為0.5的高斯分布噪聲干擾項(xiàng),跟蹤效果如圖7所示。由圖7可知,在整個(gè)行走周期內(nèi)加入噪聲干擾后,本文算法跟蹤誤差在較少代數(shù)內(nèi)依然能收斂至較低值。左膝最大誤差在第5次迭代為5.34,在第20次迭代為0.005 2;左髖最大誤差在第5次迭代為1.89,第20次迭代為0.002 9。其中左膝在迭代次數(shù)較少時(shí)出現(xiàn)誤差波動(dòng),當(dāng)?shù)螖?shù)增大后,誤差波動(dòng)逐漸消失,保證了外骨骼機(jī)器人運(yùn)作時(shí)的安全性和魯棒性。
4 結(jié)束語
本文針對(duì)傳統(tǒng)迭代學(xué)習(xí)控制抗擾性差、初值誤差和時(shí)間間隔不定等問題,改進(jìn)了控制律,加入了PD控制器和遺忘因子,設(shè)計(jì)了過渡曲線和搜索機(jī)制,并基于改進(jìn)的候選解更新策略、半徑更新策略和圓心變異策略,設(shè)計(jì)了IVS算法,將其應(yīng)用于PD控制器的參數(shù)尋優(yōu),提出了一種新的迭代學(xué)習(xí)控制方法,并用于外骨骼的步態(tài)跟蹤。本文選取了幾種目前已有的改進(jìn)渦流算法與IVS進(jìn)行對(duì)比,仿真結(jié)果表明,IVS的優(yōu)化性能優(yōu)于同類算法;本文亦選取了幾種已有的迭代學(xué)習(xí)控制方法予以對(duì)比,證明了本文算法的跟蹤性能更強(qiáng)。但不足的是IVS本身仍存在如傳統(tǒng)VS算法類似的收斂速度慢的問題,未來可通過種群分組尋優(yōu)等策略以加快收斂速度,從而提高其在實(shí)際工程問題中的效率。
參考文獻(xiàn):
[1]Azocar A F,Rouse E J. Characterization of open-loop impedance control and efficiency in wearable robots [J]. IEEE Robotics and Automation Letters,2022,7(2): 4313-4320.
[2]劉泉,謝先亮,孟偉,等. 柔性腳踝康復(fù)機(jī)器人自適應(yīng)迭代學(xué)習(xí)控制 [J]. 華中科技大學(xué)學(xué)報(bào): 自然科學(xué)版,2023,51(5): 53-59. (Liu Quan,Xie Xianliang,Meng Wei,et al. Adaptive iterative lear-ning control of flexible ankle rehabilitation robot [J]. Journal of Huazhong University of Science and Technology: Natural Science Edition,2023,51(5): 53-59.)
[3]Shi Huihui,Chen Qiang. Error-tracking iterative learning control for the constrained flexible-joint manipulator with initial errors [J]. Sustainability,2022,14(19): 12453.
[4]游東亞,崔立志,卜旭輝,等. 輪式機(jī)器人縱向滑移迭代學(xué)習(xí)軌跡跟蹤控制 [J]. 電光與控制,2022,29(9): 96-101. (You Dongya,Cui Lizhi,Bu Xuhui,et al. Longitudinal slippage iterative learning trajectory tracking control of wheeled robots [J]. Electro-nics Optics & Control,2022,29(9): 96-101.)
[5]胡鴻越,胡立坤,劉貽達(dá),等. 一種柔性下肢外骨骼控制策略研究 [J]. 儀器儀表學(xué)報(bào),2020,41(3): 184-191. (Hu Hongyue,Hu Likun,Liu Yida,et al. Control method for the soft lower limb exosuit [J]. Chinese Journal of Scientific Instrument,2020,41(3): 184-191.)
[6]Kun Qian,Li Zhenhong,Zhang Zhiqiang,et al. Data-driven adaptive iterative learning control of a compliant rehabilitation robot for repetitive ankle training [J]. IEEE Robotics and Automation Letters,2022,8(2): 656-663.
[7]Zhuang Zhihe,Tao Hongfeng,Chen Yiyang,et al. Iterative learning control for repetitive tasks with randomly varying trial lengths using successive projection [J]. International Journal of Adaptive Control and Signal Processing,2022,36(5): 1196-1215.
[8]Zeng Chun,Shen Dong,Wang Jinrong. Adaptive learning tracking for robot manipulators with varying trial lengths [J]. Journal of The Franklin Institute,2019,356(12): 5993-6014.
[9]戴寶林,龔俊,李翠明. 帶遺忘因子迭代學(xué)習(xí)控制最優(yōu)增益研究 [J]. 西北工業(yè)大學(xué)學(xué)報(bào),2019,37(5): 1077-1084. (Dai Baolin,Gong Jun,Li Cuiming. Optimal gains of iterative learning control with forgetting factor [J]. Journal of Northwestern Polytechnical University,2019,37(5): 1007-1084.)
[10]張長勝,馬澤楠,李寬,等. 改進(jìn)狼群算法的SCARA機(jī)械臂自適應(yīng)迭代學(xué)習(xí)控制 [J]. 機(jī)械科學(xué)與技術(shù),2020,39(8): 1177-1183. (Zhang Changsheng,Ma Zenan,Li Kuan,et al. Adaptive iterative learning control of SCARA manipulator with improved wolf pack algorithm [J]. Mechanical Science and Technology for Aerospace Engineering,2020,39(8): 1177-1183.)
[11]安欣,高峰,楊巧玉,等. 基于前饋補(bǔ)償?shù)恼駝?dòng)臺(tái)粒子群迭代學(xué)習(xí)控制算法 [J]. 振動(dòng)與沖擊,2022,41(1): 213-220. (An Xin,Gao Feng,Yang Qiaoyu,et al. PSO iterative learning control algorithm for shaking table based on feedforward compensation [J]. Journal of Vibration and Shock,2022,41(1): 213-220.)
[12]Doan B,lmez T. A new metaheuristic for numerical function optimization: vortex search algorithm [J]. Information Sciences,2015,293: 125-145.
[13]王文東,肖孟涵,孔德智,等. 基于人機(jī)耦合模型的上肢康復(fù)外骨骼閉環(huán)PD迭代控制方法 [J]. 機(jī)械工程學(xué)報(bào),2021,57(21): 11-21. (Wang Wendong,Xiao Menghan,Kong Dezhi,et al. Closed-loop PD iterative control method for upper limb rehabilitation exoskeleton based on human-robot coupling model [J]. Journal of Mechanical Engineering,2021,57(21): 11-21.)
[14]陳強(qiáng),陳凱杰,施卉輝,等. 機(jī)械臂變長度誤差跟蹤迭代學(xué)習(xí)控制 [J]. 自動(dòng)化學(xué)報(bào),2023,49(12): 1-11. (Chen Qiang,Chen Kaijie,Shi Huihui,et al. Error tracking iterative learning control for robot manipulators with varying iterative lengths [J]. Acta Automatica Sinica,2023,49(12): 1-11.)
[15]Li Xuefang,Shen Dong. Two novel iterative learning control schemes for systems with randomly varying trial lengths [J]. Systems & Control Letters,2017,107: 9-16.
[16]Wu Chenxi,Zhu Min,Tan Qinyang,et al. A comprehensive study of non-adaptive and residual-based adaptive sampling for physics-informed neural networks [J]. Computer Methods in Applied Mechanics and Engineering,2023,403: 115671.
[17]Wang Wenchuan,Xu Lei,Chau K,et al. Cε-LDE: a lightweight va-riant of differential evolution algorithm with combined ε constrained method and Lévy flight for constrained optimization problems [J]. Expert Systems with Applications,2023,211: 118644.
[18]Liu Jingsen,Li Haoran,Li Yu,et al. An enhanced vortex search algorithm based on fluid particle density transfer for global and engineering optimization [J]. Applied Soft Computing,2023,135: 110024.
[19]Gao Yong,Zhang Hao,Duan Yingying,et al. A novel hybrid PSO based on levy flight and wavelet mutation for global optimization [J]. PLoS One,2023,18(1): e0279572.
[20]李學(xué)貴,郭遠(yuǎn)濤,李盼池,等. 基于改進(jìn)渦流搜索算法的支持向量機(jī)分類模型 [J]. 吉林大學(xué)學(xué)報(bào): 信息科學(xué)版,2020,38(3): 312-318. (Li Xuegui,Guo Yuantao,Li Panchi,et al. Classification model of support vector machine based on modified vortex search algorithm [J]. Journal of Jilin University: Information Science Edition,2020,38(3): 312-318.)
[21]Toz M. Chaos-based vortex search algorithm for solving inverse kinematics problem of serial robot manipulators with offset wrist [J]. Applied Soft Computing,2020,89: 106074.
[22]Gharehchopogh F S,Maleki I,Dizaji Z A. Chaotic vortex search algorithm: metaheuristic algorithm for feature selection [J]. Evolutionary Intelligence,2022,15(3): 1777-1808.
[23]Dong Jian,He Bin,Zhang Chenghong,et al. Open-closed-loop PD ite-rative learning control with a variable forgetting factor for a two-wheeled self-balancing mobile robot [J]. Complexity,2019,2019: 5705126.
[24]Ai Qingsong,Ke Da,Zuo Jie,et al. High-order model-free adaptive iterative learning control of pneumatic artificial muscle with enhanced convergence [J]. IEEE Trans on Industrial Electronics,2019,67(11): 9548-9559.