[go: up one dir, main page]

CN101837164B - Double source feature fusion ant colony tuning method for PID (Proportion Integration Differention) parameter in functional electro-stimulation - Google Patents

Double source feature fusion ant colony tuning method for PID (Proportion Integration Differention) parameter in functional electro-stimulation Download PDF

Info

Publication number
CN101837164B
CN101837164B CN201010184209XA CN201010184209A CN101837164B CN 101837164 B CN101837164 B CN 101837164B CN 201010184209X A CN201010184209X A CN 201010184209XA CN 201010184209 A CN201010184209 A CN 201010184209A CN 101837164 B CN101837164 B CN 101837164B
Authority
CN
China
Prior art keywords
hrv
ant
pid
variable
parameter
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201010184209XA
Other languages
Chinese (zh)
Other versions
CN101837164A (en
Inventor
明东
张广举
刘秀云
朱韦西
邱爽
万柏坤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Datian Medical Science Engineering Tianjin Co ltd
Original Assignee
Tianjin University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tianjin University filed Critical Tianjin University
Priority to CN201010184209XA priority Critical patent/CN101837164B/en
Publication of CN101837164A publication Critical patent/CN101837164A/en
Application granted granted Critical
Publication of CN101837164B publication Critical patent/CN101837164B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Feedback Control In General (AREA)

Abstract

本发明涉及以电脉冲刺激进行肢体康复的器械领域。为实现准确稳定实时地控制FES系统地电流强度,有效地提高FES系统准确性和稳定性,本发明采用的技术方案是:功能性电刺激中PID参数的双源特征融合蚁群整定方法,包括下列步骤:首先,利用助行过程的肌肉模型HRV预测膝关节角度;其次,利用蚁群算法整定PID参数,实时调控FES电流水平强度;采用蚁群算法对PID参数进行控制,如未达到预期目标继续寻优;在新的PID系数下计算系统输出及其与肌肉模型HRV的偏差后再进入下一步蚁群算法的自学习与加权系数自调整;反复前一步骤,实现PID控制参数的自适应在线整定,并用于FES系统。本发明主要应用于整定PID参数。

The invention relates to the field of equipment for limb rehabilitation by electric pulse stimulation. In order to realize accurate, stable and real-time control of the current intensity of the FES system and effectively improve the accuracy and stability of the FES system, the technical solution adopted in the present invention is: a dual-source feature fusion ant colony tuning method for PID parameters in functional electrical stimulation, including The following steps: first, use the muscle model HRV of the walking aid process to predict the knee joint angle; second, use the ant colony algorithm to adjust the PID parameters, and adjust the FES current level in real time; use the ant colony algorithm to control the PID parameters, if the expected goal is not reached Continue to optimize; calculate the system output and its deviation from the muscle model HRV under the new PID coefficient, and then enter the next step of ant colony algorithm self-learning and weight coefficient self-adjustment; repeat the previous step to realize the self-adaptation of PID control parameters Online setting, and used in FES system. The invention is mainly applied to setting PID parameters.

Description

功能性电刺激中PID参数的双源特征融合蚁群整定方法Dual-source feature fusion ant colony tuning method for PID parameters in functional electrical stimulation

技术领域 technical field

本发明涉及以电脉冲刺激进行肢体康复的器械领域,尤其是功能性电刺激中PID参数的双源特征融合蚁群整定方法。The invention relates to the field of equipment for limb rehabilitation by electrical pulse stimulation, in particular to a dual-source feature fusion ant colony tuning method for PID parameters in functional electrical stimulation.

背景技术 Background technique

功能性电刺激(Functional Electrical Stimulation,FES)是通过电流脉冲序列来刺激肢体运动肌群及其外周神经,有效地恢复或重建截瘫患者的部分运动功能的技术。据统计,由于脊髓再生能力微弱,针对脊髓损伤瘫痪患者,目前尚未有可直接修复损伤的有效医治方法,实施功能康复训练是一有效的措施。脊髓损伤瘫痪患者人数逐年增多,功能康复训练是亟待需求的技术。20世纪60年代,Liberson首次成功地利用电刺激腓神经矫正了偏瘫患者足下垂的步态,开创了功能性电刺激用于运动和感觉功能康复治疗的新途径。目前,FES已经成为了恢复或重建截瘫患者的部分运动功能,是重要的康复治疗手段。然而,如何精密控制FES的触发时序和脉冲电流强度以保证电刺激作用效果能准确完成预定的功能动作仍是FES的技术关键。据统计,目前FES的触发控制的方式研究尚少,而且根据作用效果与预定动作偏差,用闭环控制来自动调整FES刺激强度和时序参数,从而大大提高了FES系统的准确性和稳定性,但是现在有效的控制方法仍然在探索之中。Functional Electrical Stimulation (FES) is a technology that stimulates limb motor muscles and peripheral nerves through current pulse sequences to effectively restore or reconstruct part of the motor function of paraplegic patients. According to statistics, due to the weak regeneration ability of the spinal cord, there is currently no effective treatment method that can directly repair the injury for paralyzed patients with spinal cord injury. The implementation of functional rehabilitation training is an effective measure. The number of paralyzed patients with spinal cord injury is increasing year by year, and functional rehabilitation training is an urgently needed technology. In the 1960s, Liberson successfully used electrical stimulation of the peroneal nerve for the first time to correct the gait of hemiplegic patients with foot drop, and created a new way of functional electrical stimulation for motor and sensory function rehabilitation. At present, FES has become an important rehabilitation treatment method for restoring or reconstructing part of the motor function of paraplegic patients. However, how to precisely control the trigger timing and pulse current intensity of FES to ensure that the effect of electrical stimulation can accurately complete the predetermined functional action is still the key to the technology of FES. According to statistics, there are still few researches on FES trigger control methods at present, and according to the deviation between the effect and the predetermined action, the closed-loop control is used to automatically adjust the FES stimulation intensity and timing parameters, thereby greatly improving the accuracy and stability of the FES system. Effective control methods are still being explored.

柄反作用矢量(handle reactions vector,HRV)是根据步行器帮助下的站立及行走的过程中,步行器提供给患者的效用实际上可以分为明确独立的3个部分:前后向的力推进,左右向的力平衡和上下向的力支持,这其实也可理解为患者为维持自身正常站立行走对外界所需的附加力学诉求提出的新概念,即是患者在站立行走过程中对步行器的作用合成简化为集中载荷,分别用手柄中点横截面形心处的两个力学矢量来表示,如图1所示,矢量在x,y,z轴上的方向分量合力大小可以分别表征患者借助步行器所获得的力推进,力平衡和力支持水平。其中,定义坐标系所设定的x轴正向为患者的右向,y轴正向为患者的前向,z轴正向为患者的上向。这样,HRV的定义公式也可以写为:The handle reactions vector (HRV) is based on the process of standing and walking with the help of the walker. The utility provided by the walker to the patient can actually be divided into three clear and independent parts: forward and backward force propulsion, left and right In fact, this can also be understood as a new concept proposed by the patient for the additional mechanical appeal to the outside world in order to maintain his normal standing and walking, that is, the role of the patient on the walker during the process of standing and walking The combination is simplified as a concentrated load, which is represented by two mechanical vectors at the centroid of the cross-section at the midpoint of the handle, as shown in Figure 1. The resultant force of the vector components on the x, y, and z axes can respectively represent the patient’s ability to walk The obtained force propulsion, force balance and force support level of the machine. Wherein, the positive direction of the x-axis set by the defined coordinate system is the right direction of the patient, the positive direction of the y-axis is the forward direction of the patient, and the positive direction of the z-axis is the upward direction of the patient. In this way, the definition formula of HRV can also be written as:

[HRV]=[HRVl,HRVr]T=[Flx,Fly,Flz,Frx,Fry,Frz]T    (1)[HRV] = [HRV l , HRV r ] T = [F lx , F ly , F lz , F rx , F ry , F rz ] T (1)

目前,HRV被广泛地应用在监视在电刺激过程中病人行走时的状况,继而防止病人摔倒,造成二次伤害。本专利提出利用此参数预测膝关节角度,继而精密控制FES系统的电流水平强度,保证电刺激作用效果能准确完成预定的功能动作,并且防止肌疲劳。At present, HRV is widely used to monitor the patient's walking condition during electrical stimulation, and then prevent the patient from falling and causing secondary injury. This patent proposes to use this parameter to predict the knee joint angle, and then precisely control the current level of the FES system to ensure that the electrical stimulation effect can accurately complete the predetermined functional action and prevent muscle fatigue.

比例微积分(proportional-integral-differential,PID)是一种非常实用的反馈调节算法,它根据系统检测或操作偏差,利用比例、积分、微分运算获得所需调节量以对系统进行反馈控制,因其操作方便而广泛用于工程实践。尤其当被控系统特性参数不明确或难以及时在线测定时,稳妥的闭环控制即可采用PID整定算法。面对肌肉的复杂性和时变性操作环境,由于PID的稳定性好、工作可靠,目前仍在功能性电刺激领域得到了广泛的应用。PID核心技术是精密确定其中比例、积分、微分系数,尤其在FES领域,对系统稳定性要求极为严格,所以对PID参数选择尤为重要。PID控制要取得较好的控制效果,必须调整好比例、积分和微分三种控制作用,形成控制量中既相互配合又相互制约的关系。Proportional-integral-differential (PID) is a very practical feedback adjustment algorithm, which uses proportional, integral, and differential operations to obtain the required adjustment amount for feedback control of the system according to system detection or operating deviation. It is easy to operate and widely used in engineering practice. Especially when the characteristic parameters of the controlled system are not clear or it is difficult to measure online in time, the PID tuning algorithm can be used for safe closed-loop control. Facing the complex and time-varying operating environment of muscles, PID is still widely used in the field of functional electrical stimulation due to its good stability and reliable operation. The core technology of PID is to precisely determine the proportion, integral, and differential coefficients. Especially in the field of FES, the requirements for system stability are extremely strict, so the selection of PID parameters is particularly important. In order to achieve a better control effect in PID control, the three control functions of proportional, integral and differential must be adjusted to form a relationship of mutual cooperation and mutual restriction in the control quantity.

发明内容 Contents of the invention

为克服现有技术的不足,提供一种功能性电刺激中PID参数的双源特征融合蚁群整定方法,能够准确稳定实时地控制FES系统地电流强度,有效地提高FES系统准确性和稳定性,并获得可观的社会效益和经济效益。为达到上述目的,本发明采用的技术方案是:功能性电刺激中PID参数的双源特征融合蚁群整定方法,包括下列步骤:In order to overcome the shortcomings of the existing technology, a dual-source feature fusion ant colony tuning method for PID parameters in functional electrical stimulation is provided, which can accurately and stably control the current intensity of the FES system in real time, and effectively improve the accuracy and stability of the FES system , and obtain considerable social and economic benefits. In order to achieve the above object, the technical solution adopted in the present invention is: the dual-source feature fusion ant colony tuning method of PID parameters in the functional electrical stimulation, comprising the following steps:

首先,利用助行过程的肌肉模型HRV预测膝关节角度;First, the knee joint angle is predicted using the muscle model HRV of the walking aid process;

其次,利用蚁群算法整定PID参数,实时调控FES电流水平强度,其整定流程为:首先根据PID的三个决策变量Kp、Ki和Kd取值范围的上下界,确定包括蚁群群体规模、搜索空间维数的参数,并对其进行编码,然后利用通过实际关节角度与肌肉模型HRV输出关节角度的相应关系作为适度评价函数计算的适应度值;采用蚁群算法对PID参数进行控制,即确定蚁群算法的参数设置,利用蚂蚁随机搜索使其变量优化PID的Kp、Ki和Kd三个系数,利用适应度函数调节蚂蚁每次寻索路径以及判断是否达到预设目标,如达到预设目标,计算最终最佳的位置即得PID的Kp、Ki和Kd三个系数,如未达到预期目标继续寻优,直到达到预设目标;在新的PID系数下计算系统输出yout及其与肌肉模型HRV的偏差后再进入下一步蚁群算法的自学习与加权系数自调整;Secondly, use the ant colony algorithm to tune the PID parameters, and adjust the FES current level in real time . scale, search space dimension parameters, and encode them, and then use the corresponding relationship between the actual joint angle and the muscle model HRV output joint angle as the fitness value calculated by the moderate evaluation function; use the ant colony algorithm to control the PID parameters , that is to determine the parameter setting of the ant colony algorithm, use the ant random search to make its variables optimize the three coefficients K p , K i and K d of the PID, use the fitness function to adjust the ants' search path each time and judge whether the preset goal is reached, If the preset goal is reached, calculate the final best position to get the three coefficients of PID K p , K i and K d , if the expected goal is not reached, continue to optimize until the preset goal is reached; calculate under the new PID coefficient After the system outputs yout and its deviation from the muscle model HRV, it enters the next step of ant colony algorithm self-learning and weighting coefficient self-adjustment;

反复前一步骤,最终实现PID控制参数的自适应在线整定,并用于FES系统。Repeat the previous step, and finally realize the adaptive online tuning of PID control parameters, and use it in the FES system.

所述实际关节角度与肌肉模型HRV输出关节角度的相应关系为:The corresponding relationship between the actual joint angle and the muscle model HRV output joint angle is:

L=M×HRV-1           (3)L=M×HRV -1 (3)

M表示膝关节角度,HRV表示使用者施加在步行器上力的柄反作用矢量,L表示HRV与M之间的关系,采用偏最小二乘回归的方法求解L:M represents the knee joint angle, HRV represents the handle reaction vector of the force exerted by the user on the walker, L represents the relationship between HRV and M, and the partial least squares regression method is used to solve L:

设有m个HRV变量HRV1,…,HRVm,p个M变量,M1,…,Mp,共i(i=1,…,n)个观测值的数据集,T、U分别为从HRV变量与M变量中提取的成分,从原始变量集中提取第一对成分T1、U1的线性组合为:There are m HRV variables HRV1, ..., HRVm, p M variables, M1, ..., Mp, a data set with a total of i (i=1, ..., n) observed values, T and U are respectively from HRV variables and The components extracted from the M variable, the linear combination of the first pair of components T1 and U1 extracted from the original variable set is:

T1=ω11HRV1+…+ω1mHRVm=ω′1HRV     (4)T 111 HRV 1 +...+ω 1m HRV m =ω′ 1 HRV (4)

U1=v11M1+…+v1pMp=v′1M              (5)U 1 =v 11 M 1 +...+v 1p M p =v' 1 M (5)

其中ω1=(ω11,…,ω1m )′为模型效应权重,v1=(v11,…,v1p)′为M变量权重,将上述提取第一成分的要求转化为求条件极值问题:Where ω 1 =(ω 11 ,...,ω 1m )' is the weight of the model effect, v 1 =(v 11 ,...,v 1p )' is the weight of the M variable. Value question:

Figure GDA0000023049830000021
Figure GDA0000023049830000021

其中t1、u1为由样本求得的第一对成分的得分向量,HRV0、M0为初始变量,利用拉格朗日乘子法,上述问题转化为求单位向量ω1和v1,使θ1=ω′1HRV′0M0v1最大,即求矩阵HRV′0M0M′0HRV0的特征值和特征向量,其最大特征值为θ1 2,相应的单位特征向量就是所求的解ω1,而v1由公式

Figure GDA0000023049830000031
得到;Among them, t1 and u1 are the score vectors of the first pair of components obtained from the samples, HRV0 and M0 are the initial variables, and using the Lagrange multiplier method, the above problem is transformed into finding unit vectors ω 1 and v 1 , so that θ 1 =ω′ 1 HRV′ 0 M 0 v 1 is the largest, that is to find the eigenvalues and eigenvectors of the matrix HRV′ 0 M 0 M′ 0 HRV 0 , its largest eigenvalue is θ 1 2 , and the corresponding unit eigenvector is the desired The solution of ω 1 , and v 1 is given by the formula
Figure GDA0000023049830000031
get;

其次建立初始变量对T1的方程Secondly, establish the equation of the initial variable to T1

HRVHRV 00 == tt 11 αα 11 ′′ ++ EE. 11 Mm 00 == tt 11 ββ 11 ′′ ++ Ff 11 -- -- -- (( 77 ))

其中t1意义同前,α′1=(α11,…,α1m),β′1=(β11,…,β1p)为仅一个M量t1时的参数向量,E1、F1分别为n×m和n×p残差阵,按照普通最小二乘法可求得系数向量α1和β1,其中α1成为模型效应载荷量;Where t1 has the same meaning as before, α′ 1 =(α 11 ,…,α 1m ), β′ 1 =(β 11 ,…,β 1p ) is the parameter vector when there is only one M quantity t1, and E1 and F1 are n respectively ×m and n×p residual matrix, the coefficient vectors α 1 and β 1 can be obtained according to the ordinary least squares method, where α 1 becomes the model effect load;

如提取的第一成分不能达到回归模型的精度,运用残差阵E1、F1代替X0、Y0,重复提取成分,依次类推,假设最终提取了r个成分,HRV0、M0对r个成分的回归方程为:If the extracted first component cannot reach the accuracy of the regression model, use the residual matrix E1 and F1 to replace X0 and Y0, repeat the extraction of components, and so on, assuming that r components are finally extracted, the regression equation of HRV0 and M0 for r components for:

HRVHRV 00 == tt 11 αα 11 ′′ ++ ·&Center Dot; ·· ·· ++ tt rr αα rr ′′ ++ EE. rr Mm 00 == tt 11 ββ 11 ′′ ++ ·· ·&Center Dot; ·· ++ tt rr ββ rr ′′ ++ Ff rr -- -- -- (( 88 ))

把第一步分析所得HRV量中提取成分Tk(k=1,…,r)线性组合带入M量对r个成分建立的回归方程,即tr=ωk1HRV1+…+ωkmHRVm代入Mj=t1β1j+…trβrj(j=1,…,p),即得标准化变量的回归方程Mj=αj1HRV1+…+αjmHRVmBring the linear combination of the extracted components Tk (k=1,...,r) from the HRV volume obtained in the first step analysis into the regression equation established by the M volume for r components, that is, t rk1 HRV 1 +...+ω km HRV Substituting m into M j =t 1 β 1j +...t r β rj (j=1,...,p), that is, the regression equation of standardized variables M jj1 HRV 1 +...+α jm HRV m ;

最后根据式(3),即可求出L。Finally, according to formula (3), L can be obtained.

所述进行编码是,根据膝关节角度和电流模式,以及实际误差情况设定PID的三个参数为5位有效数字,其中Kp小数点前2位,小数点后3位;Ki和Kd小数点前1位,小数点后4位,具体编码如以下公式:The encoding is to set the three parameters of PID according to the knee joint angle and current mode, and the actual error situation as 5 significant figures, wherein K p has 2 digits before the decimal point and 3 digits after the decimal point; K i and K d decimal points The first 1 digit, 4 digits after the decimal point, the specific encoding is as follows:

Kp=y1,j×101+y2,j×100+y3,j×10-1+y4,j×10-2+y5,j×10-3 K p = y 1, j × 10 1 + y 2, j × 10 0 + y 3, j × 10 -1 + y 4, j × 10 -2 + y 5, j × 10 -3

Ki=y6,j×100+y7,j×10-1+y8,j×10-2+y9,j×10-3+y10,j×10-4 K i = y 6, j × 10 0 + y 7, j × 10 -1 + y 8, j × 10 -2 + y 9, j × 10 -3 + y 10, j × 10 -4

Kd=y6,j×100+y7,j×10-1+y8,j×10-2+y9,j×10-3+y10,j×10-4 K d = y 6, j × 10 0 + y 7, j × 10 -1 + y 8, j × 10 -2 + y 9, j × 10 -3 + y 10, j × 10 -4

并且根据输出的超调等误差设计适应函数具体函数为:And according to the output overshoot and other errors to design the adaptation function, the specific function is:

fit=α1×σ+β1×t+c×error       (9)fit=α1×σ+β1×t+c×error (9)

其中,σ为超调量,t为上升时间,error为输出关节角度与预设关节角度的相对误差,α1=0.1,β1=0.8,c=2;Among them, σ is the overshoot, t is the rise time, error is the relative error between the output joint angle and the preset joint angle, α1=0.1, β1=0.8, c=2;

蚁群算法整定PID控制器参数的具体工作流程为:The specific workflow of the ant colony algorithm to tune the parameters of the PID controller is as follows:

Step1:参数初始化,令时间t=0和循环次数Nmax=0,设置最大循环次数Ncmax,将m个蚂蚁置于起始点;Step1: parameter initialization, make time t=0 and number of cycles N max =0, set the maximum number of cycles N cmax , and place m ants at the starting point;

Step2:设置蚂蚁个数和循环次数;Step2: Set the number of ants and the number of cycles;

Step3:蚂蚁随机搜索,在一次爬行结束后,决定哪些特征变量被选中作为实际输入变量,修改禁忌表指针,即选择好之后将蚂蚁移动到新的元素,并把该元素移动该蚂蚁个体的禁忌表中;Step3: Ants search randomly. After a crawl is over, decide which feature variables are selected as the actual input variables, modify the taboo table pointer, that is, move the ant to a new element after selection, and move the element to the taboo of the ant individual table;

Step4:计算蚂蚁个体据状态转移概率公式计算的概率,根据此概率选择元素;Step4: Calculate the probability calculated by the ant individual according to the state transition probability formula, and select elements according to this probability;

Step5:若蚂蚁元素未遍历完,转Step3,否则为Step6;Step5: If the ant element has not been traversed, go to Step3, otherwise go to Step6;

Step6:更新信息素浓度划分正确率高的特征变量的信息素浓度得到增强,下次搜索时会以更大的概率被选中;Step6: Update the pheromone concentration of the characteristic variable with high classification accuracy of pheromone concentration is enhanced, and will be selected with a greater probability in the next search;

Step7:满足结束调节,整定结束。Step7: Finish the adjustment when it is satisfied, and the setting is over.

本发明的特点在于:利用助行器的HRV变化预测膝关节角度变化,然后通过蚁群群算法优化PID的比例系数、微分系数以及积分系数,继而控制FES系统的电流脉冲强度,有效地提高了FES系统准确性和稳定性。The feature of the present invention is: use the HRV change of the walker to predict the change of the knee joint angle, then optimize the proportional coefficient, differential coefficient and integral coefficient of the PID through the ant colony algorithm, and then control the current pulse intensity of the FES system, effectively improving the FES system accuracy and stability.

附图说明 Description of drawings

图1柄反作用矢量(HRV)定义示意图。Figure 1 Schematic diagram of the definition of handle reaction vector (HRV).

图2基于HRV的FES系统结构框图。Figure 2 is a block diagram of the HRV-based FES system.

图3蚁群群算法整定PID参数控制方法的结构框图。Fig. 3 is a structural block diagram of ant colony algorithm tuning PID parameter control method.

图4助行功能性电刺激中的人体模型。Figure 4 Human model in functional electrical stimulation for walking aid.

图5蚁群算法整定PID参数编码示意图。Fig. 5 Schematic diagram of ant colony algorithm tuning PID parameter encoding.

图6实验场景。Figure 6 Experimental scene.

图7蚁群群算法整定的PID控制追踪结果。Fig. 7 PID control tracking results of ant colony algorithm tuning.

具体实施方式 Detailed ways

本发明的主旨是提出一种新的FES的精密控制方法,利用步行器的HRV参数预测的膝关节角度与实际的膝关节角度预测的关节角度的误差,通过蚁群算法优化PID的比例系数、积分系数以及微分系数,继而准确稳定实时地控制FES系统地电流强度。该项发明可有效地提高FES系统准确性和稳定性,并获得可观的社会效益和经济效益。The gist of the present invention is to propose a new precision control method for FES, utilize the error of the knee joint angle predicted by the HRV parameter of the walker and the joint angle predicted by the actual knee joint angle, optimize the proportional coefficient of PID by ant colony algorithm, Integral coefficient and differential coefficient, and then accurately and stably control the current intensity of the FES system in real time. The invention can effectively improve the accuracy and stability of the FES system, and obtain considerable social and economic benefits.

基于HRV的功能性电刺激助行中的精密控制新技术的应用的结构如图2所示,其工作流程为:首先,利用助行过程的HRV预测膝关节角度,其次,利用蚁群算法整定PID参数,实时调控FES电流水平强度。其整定结构示意图如图3所示,为:首先根据PID的三个决策变量Kp、Ki和Kd取值范围的上下界,确定蚁群群体规模、搜索空间维数等参数,并对其进行编码,然后利用通过实际关节角度与肌肉模型输出关节角度的相应关系作为适度评价函数计算的适应度值,以及确定蚁群算法的参数设置,利用蚂蚁随机收索使其变量优化PID的Kp、Ki和Kd三个系数,利用适应度函数调节蚂蚁每次寻索路径以及判断是否达到预设目标。如达到预设目标,计算最终最佳的位置即得PID的Kp、Ki和Kd三个系数,如未达到预期目标继续寻优,直到达到预设目标。在新的PID系数下计算系统输出yout及其与肌肉模型的偏差后再进入下一步蚁群算法的自学习与加权系数自调整。反复此过程,最终实现PID控制参数的自适应在线整定,并用于FES系统。The application structure of the new precision control technology in the HRV-based functional electrical stimulation walking aid is shown in Figure 2. Its workflow is as follows: firstly, use the HRV during the walking aid process to predict the knee joint angle, and secondly, use the ant colony algorithm to set PID parameters, real-time regulation of FES current level intensity. The schematic diagram of its tuning structure is shown in Figure 3, which is as follows: firstly, according to the upper and lower bounds of the value ranges of the three decision variables K p , K i and K d of PID, determine the parameters such as the ant colony size and the dimension of the search space, and then It encodes, and then uses the corresponding relationship between the actual joint angle and the output joint angle of the muscle model as the fitness value calculated by the moderate evaluation function, and determines the parameter setting of the ant colony algorithm, and uses the ant random search to make its variables optimize the K of the PID The three coefficients p , K i and K d use the fitness function to adjust the ant's search path each time and judge whether it reaches the preset goal. If the preset goal is reached, calculate the final best position to get the three coefficients of PID K p , K i and K d , if the expected goal is not reached, continue to optimize until the preset goal is reached. Calculate the system output yout and its deviation from the muscle model under the new PID coefficient, and then enter the next step of ant colony algorithm self-learning and weight coefficient self-adjustment. Repeat this process, and finally realize the adaptive online tuning of PID control parameters, and use it in the FES system.

1 HRV预测膝关节角度模型1 HRV prediction model of knee joint angle

助行过程中,当使用者在功能性电刺激作用下,抬腿迈步时,为了支持身体稳定,使用者在步行器上所施加的力则有所不同,因为关节的大小不同会使人体重心处于不同位置,则克服重力所施加的力也不同,同时人体所处的平面位置也有所改变,为了位置倾翻则在平面上所施加的力也有所变化,因此,关节角度和使用者对步行器所施加的力有一定的关系,如图4所示。During the walking aid process, when the user lifts his legs and takes a step under the action of functional electrical stimulation, in order to support the stability of the body, the force exerted by the user on the walker is different, because the different sizes of the joints will make the center of gravity of the human body In different positions, the force applied to overcome gravity is also different, and the plane position of the human body is also changed. In order to tilt the position, the force exerted on the plane also changes. Therefore, the joint angle and the user's perception of the walker The applied force has a certain relationship, as shown in Figure 4.

M=L·HRV+wPW         (1)M=L HRV+wPW (1)

其中,M表示膝关节角度,HRV表示使用者施加在步行器上力的柄反作用矢量,L表示HRV与M之间的关系,w表示系数,W表示上臂、躯干和下肢的重心,P表示三重心与M之间的关系。where M is the knee joint angle, HRV is the handle reaction vector of the force exerted by the user on the walker, L is the relationship between HRV and M, w is the coefficient, W is the center of gravity of the upper arm, trunk and lower limbs, and P is the triple The relationship between heart and M.

实际中,由于步行器的作用,人体重心移动较小,膝关节角度则可表示成In practice, due to the action of the walker, the movement of the center of gravity of the human body is small, and the angle of the knee joint can be expressed as

M=L·HRV             (2)M=L HRV (2)

其中,M表示膝关节角度,HRV表示使用者施加在步行器上力的柄反作用矢量,L表示HRV与M之间的关系。根据式2所示,确定L就可以利用HRV取出相应时刻的膝关节角度。Among them, M represents the knee joint angle, HRV represents the handle reaction vector of the force exerted by the user on the walker, and L represents the relationship between HRV and M. According to Equation 2, determining L can use HRV to obtain the knee joint angle at the corresponding moment.

L=M×HRV-1           (3)L=M×HRV -1 (3)

本发明求解L时,采用了偏最小二乘回归的方法。When the present invention solves L, has adopted the method for partial least square regression.

设有m个HRV变量HRV1,…,HRVm,p个M变量,M1,…,Mp,共i(i=1,…,n)个观测值的数据集。T、U分别为从HRV变量与M变量中提取的成分,这里提取的成分通常称为偏最小二乘因子。There are m HRV variables HRV1, . . . , HRVm, p M variables, M1 , . . . , Mp, and a data set of i (i=1, . T and U are components extracted from HRV variables and M variables respectively, and the components extracted here are usually called partial least squares factors.

从原始变量集中提取第一对成分T1、U1的线性组合为:The linear combination of the first pair of components T1 and U1 extracted from the original variable set is:

T1=ω11HRV1+…+ω1mHRVm=ω′1HRV    (4)T 111 HRV 1 +...+ω 1m HRV m =ω′ 1 HRV (4)

U1=v11M1+…+v1pMp=v′1M             (5)U 1 =v 11 M 1 +...+v 1p M p =v' 1 M (5)

其中ω1=(ω11,…,ω1m)′为模型效应权重,v1=(v11,…,v1p)为M变量权重。为保证T1、U1各自尽可能多地提取所在变量组的变异信息,同时保证两者之间的相关程度达到最大,据成分的协方差可由相应成分的得分向量的内积来计算的性质,上述提取第一成分的要求转化为求条件极值问题。Where ω 1 =(ω 11 ,...,ω 1m )' is the model effect weight, and v 1 =(v 11 ,...,v 1p ) is the M variable weight. In order to ensure that T1 and U1 extract as much variation information as possible from the variable group they belong to, and at the same time ensure that the correlation between the two reaches the maximum, according to the property that the covariance of the components can be calculated by the inner product of the score vectors of the corresponding components, the above The requirement of extracting the first component is transformed into a conditional extremum problem.

Figure GDA0000023049830000051
Figure GDA0000023049830000051

其中t1、u1为由样本求得的第一对成分的得分向量,HRV0、M0为初始变量。利用拉格朗日乘子法,上述问题转化为求单位向量ω1和v1,使θ1=ω′1HRV′0M0v1最大,即求矩阵HRV′0M0M′0HRV0的特征值和特征向量,其最大特征值为θ1 2,相应的单位特征向量就是所求的解ω1,而v1由公式

Figure GDA0000023049830000061
得到。Among them, t1 and u1 are the score vectors of the first pair of components obtained from the samples, and HRV0 and M0 are the initial variables. Using the Lagrange multiplier method, the above problem is transformed into finding unit vectors ω 1 and v 1 , so that θ 1 = ω′ 1 HRV′ 0 M 0 v 1 is the largest, that is, finding the matrix HRV′ 0 M 0 M′ 0 HRV 0 's eigenvalue and eigenvector, its maximum eigenvalue is θ 1 2 , the corresponding unit eigenvector is the solution ω 1 , and v 1 is given by the formula
Figure GDA0000023049830000061
get.

其次建立初始变量对T1的方程Secondly, establish the equation of the initial variable to T1

HRVHRV 00 == tt 11 αα 11 ′′ ++ EE. 11 Mm 00 == tt 11 ββ 11 ′′ ++ Ff 11 -- -- -- (( 77 ))

其中t1意义同前,α′1=(α11,…,α1m),β′1=(β11,…,β1p)为仅一个M量t1时的参数向量,E1、F1分别为n×m和n×p残差阵。按照普通最小二乘法可求得系数向量α1和β1,其中α1成为模型效应载荷量。Where t1 has the same meaning as before, α′ 1 =(α 11 ,…,α 1m ), β′ 1 =(β 11 ,…,β 1p ) is the parameter vector when there is only one M quantity t1, E1 and F1 are n respectively ×m and n×p residual matrix. The coefficient vectors α 1 and β 1 can be obtained according to the ordinary least squares method, where α 1 becomes the model effect load.

如提取的第一成分不能达到回归模型的精度,运用残差阵E1、F1代替X0、Y0,重复提取成分,依次类推。假设最终提取了r个成分,HRV0、M0对r个成分的回归方程为:If the first component extracted cannot reach the accuracy of the regression model, use the residual matrix E1 and F1 to replace X0 and Y0, repeat the extraction of components, and so on. Assuming that r components are finally extracted, the regression equation of HRV0 and M0 for r components is:

HRVHRV 00 == tt 11 αα 11 ′′ ++ ·· ·· ·· ++ tt rr αα rr ′′ ++ EE. rr Mm 00 == tt 11 ββ 11 ′′ ++ ·&Center Dot; ·· ·· ++ tt rr ββ rr ′′ ++ Ff rr -- -- -- (( 88 ))

把第一步分析所得HRV量中提取成分Tk(k=1,…,r)线性组合带入M量对r个成分建立的回归方程,即tr=ωk1HRV1+…+ωkmHRVm代入Mj=t1β1j+…+trβrj(j=1,…,p),即得标准化变量的回归方程Mj=αj1HRV1+…+αjmHRVmBring the linear combination of the extracted components Tk (k=1,...,r) from the HRV volume obtained in the first step analysis into the regression equation established by the M volume for r components, that is, t rk1 HRV 1 +...+ω km HRV Substituting m into M j =t 1 β 1j +...+t r β rj (j=1,...,p), the regression equation of standardized variables M jj1 HRV 1 +...+α jm HRV m is obtained.

最后根据式3,即可求出L。Finally, according to formula 3, L can be obtained.

蚁群算法对PID参数的控制,首先对PID的三个参数进行编码,根据膝关节角度和电流模式,以及实际误差等情况设定PID的三个参数为5位有效数字,其中Kp小数点前2位,小数点后3位;Ki和Kd小数点前1位,小数点后4位。其具体编码示意图如图5所示。The ant colony algorithm controls the PID parameters. First, encode the three parameters of the PID. According to the knee joint angle, current mode, and actual error, the three parameters of the PID are set to 5 significant figures, among which K p before the decimal point 2 digits, 3 digits after the decimal point; K i and K d 1 digit before the decimal point, 4 digits after the decimal point. Its specific coding schematic diagram is shown in Fig. 5 .

如以下公式as the following formula

Kp=y1,j×101+y2,j×100+y3,j×10-1+y4,j×10-2+y5,j×10-3 K p = y 1, j × 10 1 + y 2, j × 10 0 + y 3, j × 10 -1 + y 4, j × 10 -2 + y 5, j × 10 -3

Ki=y6,j×100+y7,j×10-1+y8,j×10-2+y9,j×10-3+y10,j×10-4 K i = y 6, j × 10 0 + y 7, j × 10 -1 + y 8, j × 10 -2 + y 9, j × 10 -3 + y 10, j × 10 -4

Kd=y6,j×100+y7,j×10-1+y8,j×10-2+y9,j×10-3+y10,j×10-4 K d = y 6, j × 10 0 + y 7, j × 10 -1 + y 8, j × 10 -2 + y 9, j × 10 -3 + y 10, j × 10 -4

并且根据输出的超调等误差设计适应函数具体函数为:And according to the output overshoot and other errors to design the adaptation function, the specific function is:

fit=α1×σ+β1×t+c×error         (9)fit=α1×σ+β1×t+c×error (9)

其中,σ为超调量,t为上升时间,error为输出关节角度与预设关节角度的相对误差,α1=0.1,β1=0.8,c=2。Among them, σ is the overshoot, t is the rise time, error is the relative error between the output joint angle and the preset joint angle, α1=0.1, β1=0.8, c=2.

蚁群算法整定PID控制器参数的具体工作流程为:The specific workflow of the ant colony algorithm to tune the parameters of the PID controller is as follows:

Step1:参数初始化。令时间t=0和循环次数Nmax=0,设置最大循环次数Ncmax,将m个蚂蚁置于起始点。Step1: Parameter initialization. Set the time t=0 and the number of cycles N max =0, set the maximum number of cycles N cmax , and place m ants at the starting point.

Step2:设置蚂蚁个数和循环次数Step2: Set the number of ants and the number of cycles

Step3:蚂蚁随机搜索,在一次爬行结束后,决定哪些特征变量被选中作为实际输入变量,修改禁忌表指针,即选择好之后将蚂蚁移动到新的元素,并把该元素移动该蚂蚁个体的禁忌表中Step3: Ants search randomly. After a crawl is over, decide which feature variables are selected as the actual input variables, modify the taboo table pointer, that is, move the ant to a new element after selection, and move the element to the taboo of the ant individual in the table

Step4:计算蚂蚁个体据状态转移概率公式计算的概率,根据此概率选择元素Step4: Calculate the probability calculated by the ant individual according to the state transition probability formula, and select elements according to this probability

Step5:若蚂蚁元素未遍历完,转Step3,否则为Step6Step5: If the ant element has not been traversed, go to Step3, otherwise go to Step6

Step6:更新信息素浓度划分正确率高的特征变量的信息素浓度得到增强,下次搜索时会以更大的概率被选中Step6: Update pheromone concentration The pheromone concentration of the characteristic variable with high classification accuracy is enhanced, and it will be selected with a greater probability in the next search

Step7:满足结束调节,整定结束。Step7: Finish the adjustment when it is satisfied, and the setting is over.

2 蚁群群算法整定PID参数的控制2. Control of PID parameter setting by ant colony algorithm

PID由比例单元P、积分单元I和微分单元D三部分组成,根据系统的误差,通过设定的Kp、Ki和Kd三个参数对系统进行控制。PID is composed of three parts: proportional unit P, integral unit I and differential unit D. According to the error of the system, the system is controlled by setting three parameters K p , K i and K d .

youtyout (( tt )) == KK pp errorerror (( tt )) ++ KK ii ΣΣ jj == 00 tt errorerror (( jj )) ++ KK dd [[ errorerror (( tt )) -- errorerror (( tt -- 11 )) ]] -- -- -- (( 99 ))

其中Kp是比例系数,Ki是积分系数,Kd是微分系数,error为预设输出与实际输出的偏差,u(t)为PID的输出,同时又是受控系统的输入。Among them, K p is the proportional coefficient, K i is the integral coefficient, K d is the differential coefficient, error is the deviation between the preset output and the actual output, u(t) is the output of PID, and it is also the input of the controlled system.

由PID输出公式(1)可以得到From the PID output formula (1), we can get

uu (( tt -- 11 )) == KK pp errorerror (( tt -- 11 )) ++ KK ii ΣΣ jj == 00 tt -- 11 errorerror (( jj )) ++ KK dd [[ errorerror (( tt -- 11 )) -- errorerror (( tt -- 22 )) ]] -- -- -- (( 1010 ))

根据:according to:

Δu(t)=u(t)-u(t-1)Δu(t)=u(t)-u(t-1)

=Kp(error(t)-error(t-1))+Kierror(t)+Kd(error(t)-2error(t-1)+error(t-2))=K p (error(t)-error(t-1))+K i error(t)+K d (error(t)-2error(t-1)+error(t-2))

……………………………………………………………(11)………………………………………………………(11)

有:have:

u(t)=Δu(t)+u(t-1)=u(t)=Δu(t)+u(t-1)=

u(t-1)+Kp(error(t)-error(t-1))+Kierror(t)+Kd(error(t)-2error(t-1)+error(t-2))u(t-1)+K p (error(t)-error(t-1))+K i error(t)+K d (error(t)-2error(t-1)+error(t-2 ))

                                                                ………………(12)……………………(12)

本发明采用蚁群算法进行PID控制参数的自适应优化,把PID的三个参数作为一个组合,利用蚁群算法寻优来解决这个组合问题。蚁群算法是一种源于大自然生物世界的新型仿生算法,用蚁群算法求解最优化问题时,首先将最优化问题转化为了求解最短路径问题。每只蚂蚁从初始接点N00,N01...N0n出发,顺序走过N1,N2...,的其中一子结点,直到终结点Nk0、Nk1...Nkn组成路径(N0tN1t...Nkt),t∈[0,1,2…9]。其路径可代表一个二进制的可行解。每次蚂蚁访问城市时有以下的特征:The invention adopts the ant colony algorithm to carry out self-adaptive optimization of the PID control parameters, takes the three parameters of the PID as a combination, and utilizes the ant colony algorithm to optimize to solve the combination problem. Ant colony algorithm is a new type of bionic algorithm derived from the biological world of nature. When using ant colony algorithm to solve optimization problems, the optimization problem is first transformed into the shortest path problem. Each ant starts from the initial node N 00 , N 01 ... N 0n , and walks sequentially through one of the sub-nodes of N 1 , N 2 ..., until the end point N k0 , N k1 ... N kn Composition path (N 0t N 1t ... N kt ), t ∈ [0, 1, 2 ... 9]. Its path can represent a binary feasible solution. Each time an ant visits a city, it has the following characteristics:

状态转化规则:蚁群算法使用的状态转化规则为基于TSP问题提出的随机比例规则,它给出位于城市i的蚂蚁k选择移动到城市j的概率,State transition rule: The state transition rule used by the ant colony algorithm is a random proportional rule based on the TSP problem, which gives the probability that ant k located in city i chooses to move to city j,

其中τij(i,j)为(i,j)的适应度,ηij(i,j)=(10-|y(i)-y(i)*|)/10,y(i)蚁群搜索时在i处的值,y(i)*为上次搜索时在i处的值。α为残留信息的相对重要程度、β为期望值的相对重要程度。Where τ ij (i, j) is the fitness of (i, j), η ij (i, j) = (10-|y(i)-y(i) * |)/10, y(i) ant The value at i during the group search, y(i) * is the value at i during the last search. α is the relative importance of residual information, and β is the relative importance of expected value.

在蚁群算法中,选择方式为In the ant colony algorithm, the selection method is

其中,q为均匀分布在[0,1]上的一个随机数,q0为[0,1]上的参变量。Among them, q is a random number uniformly distributed on [0, 1], and q 0 is a parameter variable on [0, 1].

全局更新规则:蚂蚁算法有不同的更新算法,蚁群系统采用的全局更新原则,只允许全局最优解的蚂蚁释放信息素,这样是为了使蚂蚁的搜索主要集中在当前循环为止所找出的最好路径的邻域。Global update rules: The ant algorithm has different update algorithms. The global update principle adopted by the ant colony system only allows the ants with the global optimal solution to release pheromone. neighborhood of the best path.

τij(i,j)←(1-ρ)□τij(i,j)+ρ·Δτij(i,j)    (14)τ ij (i, j)←(1-ρ)□τ ij (i, j)+ρ·Δτ ij (i, j) (14)

Figure GDA0000023049830000083
Figure GDA0000023049830000083

其中ρ为信息数挥发系数,Lgb为目前为止找到的全局最优路径Among them, ρ is the volatility coefficient of information number, and L gb is the global optimal path found so far

局部更新信息:每只蚂蚁建立一个解的过程中也有进行信息数素迹的更新Partial update information: each ant also updates the information trace in the process of establishing a solution

τij(i,j)←(1-γ)□τij(i,j)+γ·Δτij(i,j)    (16)τ ij (i, j)←(1-γ) τ ij (i, j)+γ·Δτ ij (i, j) (16)

其中γ∈[0,1]。where γ ∈ [0, 1].

蚁群算法对PID参数的控制,首先对PID的三个参数进行编码,根据膝关节角度和电流模式,以及实际误差等情况设定PID的三个参数为5位有效数字,其中Kp小数点前2位,小数点后3位;Ki和Kd小数点前1位,小数点后4位。其具体编码示意图如图5所示。The ant colony algorithm controls the PID parameters. First, encode the three parameters of the PID. According to the knee joint angle, current mode, and actual error, the three parameters of the PID are set to 5 significant figures, among which K p before the decimal point 2 digits, 3 digits after the decimal point; K i and K d 1 digit before the decimal point, 4 digits after the decimal point. Its specific coding schematic diagram is shown in Fig. 5 .

如以下公式as the following formula

Kp=y1,j×101+y2,j×100+y3,j×10-1+y4,j×10-2+y5,j×10-3 K p = y 1, j × 10 1 + y 2, j × 10 0 + y 3, j × 10 -1 + y 4, j × 10 -2 + y 5, j × 10 -3

Ki=y6,j×100+y7,j×10-1+y8,j×10-2+y9,j×10-3+y10,j×10-4 K i = y 6, j × 10 0 + y 7, j × 10 -1 + y 8, j × 10 -2 + y 9, j × 10 -3 + y 10, j × 10 -4

Kd=y6,j×100+y7,j×10-1+y8,j×10-2+y9,j ×10-3+y10,j ×10-4 K d = y 6, j × 10 0 + y 7, j × 10 -1 + y 8, j × 10 -2 + y 9, j × 10 -3 + y 10, j × 10 -4

蚁群算法整定PID控制器参数的具体工作流程为:The specific workflow of the ant colony algorithm to tune the parameters of the PID controller is as follows:

Step1:参数初始化。令时间t=0和循环次数Nmax=0,设置最大循环次数Ncmax,将m个蚂蚁置于起始点。Step1: Parameter initialization. Set the time t=0 and the number of cycles N max =0, set the maximum number of cycles N cmax , and place m ants at the starting point.

Step2:设置蚂蚁个数和循环次数Step2: Set the number of ants and the number of cycles

Step3:蚂蚁随机搜索,在一次爬行结束后,决定哪些特征变量被选中作为实际输入变量,修改禁忌表指针,即选择好之后将蚂蚁移动到新的元素,并把该元素移动该蚂蚁个体的禁忌表中Step3: Ants search randomly. After a crawl is over, decide which feature variables are selected as the actual input variables, modify the taboo table pointer, that is, move the ant to a new element after selection, and move the element to the taboo of the ant individual in the table

Step4:计算蚂蚁个体据状态转移概率公式计算的概率,根据此概率选择元素Step4: Calculate the probability calculated by the ant individual according to the state transition probability formula, and select elements according to this probability

Step5:若蚂蚁元素未遍历完,转Step3,否则为Step6Step5: If the ant element has not been traversed, go to Step3, otherwise go to Step6

Step6:更新信息素浓度划分正确率高的特征变量的信息素浓度得到增强,下次搜索时会以更大的概率被选中Step6: Update pheromone concentration The pheromone concentration of the characteristic variable with high classification accuracy is enhanced, and it will be selected with a greater probability in the next search

Step7:满足结束调节,整定结束。Step7: Finish the adjustment when it is satisfied, and the setting is over.

3实验方案3 experimental protocol

实验装置采用无线传输的步行器系统和美国SIGMEDICS公司生产的Parastep功能性电刺激系统,该系统包含微处理器和刺激脉冲发生电路,含六条刺激通道,电池供电。实验内容为:利用FES系统对下肢相关肌群进行刺激,使受试者按照预定的动作,同时记录施加在步行器上的HRV首先通过安装在步行器上的12导联应变片(BX3506AA)电桥网络转化成的电压信号以及膝关节角度运动轨迹。要求受试者身体健康,无下肢肌肉、骨骼疾患,无神经疾患及严重心肺疾患。实验时受试者安坐于步行器前,The experimental device uses a wireless transmission walker system and a Parastep functional electrical stimulation system produced by SIGMEDICS of the United States. The system includes a microprocessor and a stimulation pulse generation circuit, includes six stimulation channels, and is powered by batteries. The content of the experiment is: use the FES system to stimulate the relevant muscles of the lower limbs, so that the subjects follow the predetermined movements, and at the same time record the HRV applied on the walker. The voltage signal converted by the bridge network and the trajectory of the knee joint angle. The subjects are required to be in good health, without lower extremity muscle and bone diseases, without neurological diseases and severe cardiopulmonary diseases. During the experiment, the subjects sat in front of the walker,

将刺激电极固定于相应的部位,未施加电刺激时,受试者保持轻松。FES实验场景如图5所示。电刺激脉冲序列采用经典的Lilly波形,脉冲频率为25Hz、脉宽150μs,脉冲电流在0~120m范围内可调。实验中,实时地记录HRV以Fix the stimulating electrodes to the corresponding parts, and keep the subjects relaxed when no electrical stimulation is applied. The FES experimental scene is shown in Fig. 5. The electrical stimulation pulse sequence adopts the classic Lilly waveform, the pulse frequency is 25Hz, the pulse width is 150μs, and the pulse current is adjustable within the range of 0-120m. In the experiment, HRV was recorded in real time to

及可通过改变脉冲电流大小来调整刺激强度以改变由刺激产生的膝关节角度。实验前,设定期望的膝关节角度运动轨迹,实验中利用角度测量计实时检测膝关节张角变化。实验数据采样率为128Hz,数据记录时长为60s。And the stimulation intensity can be adjusted by changing the magnitude of the pulse current to change the angle of the knee joint generated by the stimulation. Before the experiment, set the expected trajectory of the knee joint angle, and use the goniometer to detect the change of the knee joint opening angle in real time during the experiment. The sampling rate of the experimental data is 128Hz, and the data recording time is 60s.

有益效果Beneficial effect

蚁群算法整定PID参数的新算法对FES脉冲电流幅值进行测算和调整,使FES作用所产生的膝关节角度运动贴近预期的运动轨迹。图7为蚁群算法整定的PID控制追踪结果。图中红线表示预期运动轨迹、蓝线为实际输出关节角度。X轴为时间,Y轴为膝关节运动角度。为更清楚地观察蚁群算法整定PID的控制误差,如图8蚁群算法整定PID控制下预设输入膝关节角度与实际膝关节角度的相对误差所示,则可以看出误差均在5%之内,可以达到精确的控制。The new algorithm of ant colony algorithm to adjust PID parameters measures and adjusts the amplitude of FES pulse current, so that the knee joint angular motion generated by FES is close to the expected motion track. Figure 7 shows the tracking results of the PID control set by the ant colony algorithm. The red line in the figure represents the expected motion trajectory, and the blue line represents the actual output joint angle. The X-axis is time, and the Y-axis is the knee joint motion angle. In order to observe the control error of the ant colony algorithm tuning PID more clearly, as shown in Figure 8, the relative error between the preset input knee joint angle and the actual knee joint angle under the ant colony algorithm tuning PID control, it can be seen that the errors are all 5% Within, precise control can be achieved.

本发明的主旨是提出一种新的FES的精密控制方法,利用步行器的HRV参数预测的膝关节角度与实际的膝关节角度预测的关节角度的误差,通过蚁群算法优化PID的比例系数、积分系数以及微分系数,继而准确稳定实时地控制FES系统地电流强度。该项发明可有效地提高FES系统准确性和稳定性,并获得可观的社会效益和经济效益。最佳实施方案拟采用专利转让、技术合作或产品开发。The gist of the present invention is to propose a new precision control method for FES, utilize the error of the knee joint angle predicted by the HRV parameter of the walker and the joint angle predicted by the actual knee joint angle, optimize the proportional coefficient of PID by ant colony algorithm, Integral coefficient and differential coefficient, and then accurately and stably control the current intensity of the FES system in real time. The invention can effectively improve the accuracy and stability of the FES system, and obtain considerable social and economic benefits. The best implementation plan is to use patent transfer, technical cooperation or product development.

Claims (3)

1. the double source feature fusion ant colony setting method of pid parameter in the functional electrostimulation is characterized in that, comprises the following steps:
At first, utilize the muscle model HRV forecasting knee joint angle of walk help process;
Secondly, utilize ant group algorithm tuning PID parameter, real-time monitoring FES levels of current intensity, its flow process of adjusting is: at first according to three decision variable K of PID controller p, K iAnd K dThe bound of span; Confirm to comprise the parameter of ant crowd population size, search volume dimension; And it is encoded; Utilize then through actual joint angles and muscle model HRV and export the fitness value of the corresponding relation of joint angles as the fitness evaluation function calculation, corresponding relation is L=M * HRV -1, wherein, M representes knee joint angle, and HRV representes that the user is applied to the handle retroaction vector of power on the walker, and L representes the relation between HRV and the M, adopts the method for PLS to confirm muscle model HRV output joint angles; Adopt ant group algorithm that the PID controller parameter is controlled, promptly confirm the parameter setting of ant group algorithm, utilize the ant random search to make its variable optimize three decision variable K of PID controller p, K iAnd K d, utilize the fitness evaluation function adjusting each searching route of ant and judge whether to reach goal-selling, as reach goal-selling, calculate three decision variable K that final best position promptly gets the PID controller p, K iAnd K d, as do not reach re-set target continuation optimizing, up to reaching goal-selling; Computing function property electro photoluminescence FES system output yout under the new PID controller parameter and with the deviation of muscle model HRV after get into the self study of next step ant group algorithm and three decision variable K of PID controller again p, K iAnd K dThe weighting coefficient self-adjusting;
Last repeatedly step finally realizes the self-adaptation on-line tuning of PID controller parameter, and is used for functional electrostimulation FES system.
2. the double source feature fusion ant colony setting method of pid parameter is characterized in that in a kind of functional electrostimulation according to claim 1, adopts the method for PLS to find the solution L:
Be provided with m HRV variable HRV 1..., HRV m, p M variable, M 1..., M p, the data set of common i observed reading, i=1 ..., n, T, U are respectively the composition that from HRV variable and M variable, extracts, and concentrate from original variable and extract first couple of composition T 1, U 1Linear combination be:
T 1=ω 11HRV 1+…+ω 1mHRV m=ω′ 1?HRV (4)
U 1=v 11M 1+…+v 1pM p=v′ 1M (5)
ω wherein 1=(ω 11..., ω 1m) ' be model effect weight, v 1=(v 11..., v 1p) ' be M variable weight is converted into the requirement of first pair of composition of said extracted and asks constrained extremal problem:
Figure FDA00001664983800011
T wherein 1, u 1Be the score vector of first pair of composition of trying to achieve, HRV by sample 0, M 0Be initializaing variable, utilize method of Lagrange multipliers, the problems referred to above are converted into asks vector of unit length ω 1And v 1, make θ 1=ω ' 1HRV ' 0M ' 0v 1' maximum is promptly asked matrix H RV ' 0M 0M ' 0HRV 0Eigenwert and proper vector, its eigenvalue of maximum is θ 1 2, corresponding unit character vector is exactly the ω that separates that is asked 1, and v1 is by formula
Figure FDA00001664983800021
Obtain;
Next sets up the equation of initializaing variable to T1
HRV 0 = t 1 α 1 ′ + E 1 M 0 = t 1 β 1 ′ + F 1 - - - ( 7 )
T wherein 1Meaning is the same, α ' 1=(α 11..., α 1m), β ' 1=(β 11..., β 1p) be M variable t only 1The time parameter vector, E 1, F 1Be respectively n * m and n * p residual error battle array, try to achieve coefficient vector α according to common least square method 1And β 1, α wherein 1Be called model effect load capacity;
Wherein, E 1=HRV 0- t1 α ' 1,
F 1=HRV 0-t 1β′ 1
Can not reach the precision of regression model, utilization residual error battle array E like the first pair of composition that extracts 1, F 1Replace HRV 0, M 0, repeat to extract composition, and the like, suppose finally to have extracted r composition, HRV 0, M 0Regression equation to r composition is:
HRV 0 = t 1 α 1 ′ + . . . + t r α r ′ + E r M 0 = t 1 β 1 ′ + . . . + t r β 1 ′ + F r - - - ( 8 )
The first step analyze extract in the gained HRV amount composition Tk (k=1 ..., r) regression equation that the M variable is set up r composition, i.e. t are brought in linear combination into rK1HRV 1+ ... + ω KmHRV mSubstitution M j=t 1β 1j+ ... + t rβ Rj(j=1 ..., p), promptly get the regression equation M of standardized variable jJ1HRV 1+ ... + α JmHRV m
According to formula (3), can obtain L at last.
3. the double source feature fusion ant colony setting method of pid parameter is characterized in that in a kind of functional electrostimulation according to claim 1, and the concrete workflow of ant group algorithm Tuning PID Controller device parameter is:
Step1: parameter initialization makes time t=0 and cycle index N Max=0, maximum cycle N is set Cmax, m ant placed starting point;
Step2: ant number and cycle index are set;
Step3: ant random search; After the end of once creeping, determine the actual input variable of the selected conduct of which characteristic variable, revise the taboo list index; After promptly choosing ant is moved to new element, and move to this element in the individual taboo table of ant;
Step4: calculate the probability that the ant individuality calculates according to the state transition probability formula, select element according to this probability;
Step5:, change Step3, otherwise be Step6 if the ant element has not traveled through;
Step6: the plain concentration of lastest imformation, the pheromone concentration of dividing the high characteristic variable of accuracy is enhanced, and next time can be selected with bigger probability when searching for;
Step7: satisfy termination condition, the end of adjusting.
CN201010184209XA 2010-05-27 2010-05-27 Double source feature fusion ant colony tuning method for PID (Proportion Integration Differention) parameter in functional electro-stimulation Active CN101837164B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010184209XA CN101837164B (en) 2010-05-27 2010-05-27 Double source feature fusion ant colony tuning method for PID (Proportion Integration Differention) parameter in functional electro-stimulation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010184209XA CN101837164B (en) 2010-05-27 2010-05-27 Double source feature fusion ant colony tuning method for PID (Proportion Integration Differention) parameter in functional electro-stimulation

Publications (2)

Publication Number Publication Date
CN101837164A CN101837164A (en) 2010-09-22
CN101837164B true CN101837164B (en) 2012-11-28

Family

ID=42740989

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010184209XA Active CN101837164B (en) 2010-05-27 2010-05-27 Double source feature fusion ant colony tuning method for PID (Proportion Integration Differention) parameter in functional electro-stimulation

Country Status (1)

Country Link
CN (1) CN101837164B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102662317B (en) * 2012-03-27 2014-05-21 中国人民解放军国防科学技术大学 PID controller based on prokaryotic biomimetic array
CN106527491B (en) * 2016-11-21 2019-12-03 南京航空航天大学 A fixed-wing unmanned aerial vehicle control system and lateral flight trajectory control method
CN112286044A (en) * 2020-10-14 2021-01-29 珠海格力电器股份有限公司 PID parameter optimization method and device and related equipment
CN117970785B (en) * 2024-04-01 2024-06-18 济南大学 A control method for walking aid based on improved group optimization algorithm
CN118203762B (en) * 2024-05-20 2024-08-06 北华大学 Electrical stimulation self-adaptive control method for electrical stimulation rehabilitation instrument

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6171239B1 (en) * 1998-08-17 2001-01-09 Emory University Systems, methods, and devices for controlling external devices by signals derived directly from the nervous system
CN101118421A (en) * 2007-09-13 2008-02-06 北京航空航天大学 Parameter Tuning Method of Nonlinear PID Control Based on Adaptive Ant Colony Intelligence
CN101596338A (en) * 2009-04-29 2009-12-09 天津大学 A Precise Control Method of Functional Electrical Stimulation Based on BP Neural Network Tuning PID

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6171239B1 (en) * 1998-08-17 2001-01-09 Emory University Systems, methods, and devices for controlling external devices by signals derived directly from the nervous system
CN101118421A (en) * 2007-09-13 2008-02-06 北京航空航天大学 Parameter Tuning Method of Nonlinear PID Control Based on Adaptive Ant Colony Intelligence
CN101596338A (en) * 2009-04-29 2009-12-09 天津大学 A Precise Control Method of Functional Electrical Stimulation Based on BP Neural Network Tuning PID

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Longlong Cheng et al.Radial Basis Function Neural Network-based PID Model for functional Electrical Stimulation System Control.《31st Annual International Conference of the IEEE EMBS Minneapolis》.2009,3481-3484. *
舒涛等.基于遗传蚁群混合策略的PID控制器参数整定.《弹箭与制导学报》.2009,第29卷(第1期),73-76,80. *

Also Published As

Publication number Publication date
CN101837164A (en) 2010-09-22

Similar Documents

Publication Publication Date Title
CN101816822B (en) Setting method of functional electrical stimulation PID (Proportion Integration Differentiation) parameter double source characteristic fusion particle swarm
Ezati et al. A review of simulation methods for human movement dynamics with emphasis on gait
CN105615890B (en) Human body lower limbs walking joint angles myoelectricity continuous decoding method
CN101596338A (en) A Precise Control Method of Functional Electrical Stimulation Based on BP Neural Network Tuning PID
CN101837164B (en) Double source feature fusion ant colony tuning method for PID (Proportion Integration Differention) parameter in functional electro-stimulation
CN101794114B (en) Method for tuning control parameter in walk-aiding functional electric stimulation system by utilizing genetic algorithm
CN102525795A (en) Fast automatic positioning method of foot massaging robot
Fong et al. A therapist-taught robotic system for assistance during gait therapy targeting foot drop
CN114366556A (en) Multi-mode training control system and method for lower limb rehabilitation
CN101816821B (en) Walking aid functional electrical stimulation precision control method based on ant colony fuzzy controller
CN102274581B (en) Precise control method for functional electric stimulation
CN118203762B (en) Electrical stimulation self-adaptive control method for electrical stimulation rehabilitation instrument
CN101837165B (en) Walking aid electrostimulation fine control method based on genetic-ant colony fusion fuzzy controller
CN101846977B (en) Genetic fuzzy control method of joint angles by functional electrical stimulation
Kim et al. Stimulation pattern-free control of FES cycling: Simulation study
Tiseo Modelling of bipedal locomotion for the development of a compliant pelvic interface between human and a balance assistant robot
Lim et al. Natural gait parameters prediction for gait rehabilitation via artificial neural network
Chambers et al. A model-based analysis of the effect of repeated unilateral low stiffness perturbations on human gait: Toward robot-assisted rehabilitation
Kuo et al. RNN based knee joint muscular torque estimation of a knee exoskeleton for stair climbing
Higgins Characterization, estimation, and realization of human intent for exoskeleton-assisted walking
Ibrahim et al. Fuzzy modelling of knee joint with genetic optimization
Liu et al. Addressing Human-Robot Symbiosis via Bilevel Optimization of Robotic Knee Prosthesis Control
Ahmad et al. Framework of Lower-Limb Musculoskeletal Modeling for FES Control System Development
Arcolezi et al. Identifying the knee joint angular position under neuromuscular electrical stimulation via long short-term memory neural networks
Sasaki et al. Simulation model of a lever-propelled wheelchair

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20210301

Address after: Room 101, building C22, entrepreneurship headquarters base, North Fuyuan Road, Wuqing Development Zone, Wuqing District, Tianjin

Patentee after: DATIAN MEDICAL SCIENCE ENGINEERING (TIANJIN) Co.,Ltd.

Address before: 300072 Tianjin City, Nankai District Wei Jin Road No. 92

Patentee before: Tianjin University

TR01 Transfer of patent right