[go: up one dir, main page]

CN101816822B - Setting method of functional electrical stimulation PID (Proportion Integration Differentiation) parameter double source characteristic fusion particle swarm - Google Patents

Setting method of functional electrical stimulation PID (Proportion Integration Differentiation) parameter double source characteristic fusion particle swarm Download PDF

Info

Publication number
CN101816822B
CN101816822B CN2010101841330A CN201010184133A CN101816822B CN 101816822 B CN101816822 B CN 101816822B CN 2010101841330 A CN2010101841330 A CN 2010101841330A CN 201010184133 A CN201010184133 A CN 201010184133A CN 101816822 B CN101816822 B CN 101816822B
Authority
CN
China
Prior art keywords
hrv
pid
error
parameters
particle
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
CN2010101841330A
Other languages
Chinese (zh)
Other versions
CN101816822A (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 CN2010101841330A priority Critical patent/CN101816822B/en
Publication of CN101816822A publication Critical patent/CN101816822A/en
Application granted granted Critical
Publication of CN101816822B publication Critical patent/CN101816822B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Feedback Control In General (AREA)

Abstract

本发明涉及以电脉冲刺激进行肢体康复的器械领域。提供一种功能性电刺激中PID参数的双源特征融合混沌微粒子群整定方法,能够准确稳定实时地控制FES系统地电流强度,有效地提高FES系统准确性和稳定性,本发明采用的技术方案是,首先,利用助行过程的柄反作用矢量HRV预测膝关节角度;其次,利用混沌微粒群算法整定比例微积分PID参数,实时调控FES电流水平强度,最终实现比例微积分PID控制参数的自适应在线整定,并用于功能性电刺激FES系统。本发明主要应用于整定功能性电刺激中PID参数。

Figure 201010184133

The invention relates to the field of equipment for limb rehabilitation by electric pulse stimulation. Provide a dual-source feature fusion chaotic particle swarm tuning method for PID parameters in functional electrical stimulation, 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. The technical solution adopted by the invention Yes, firstly, use the handle reaction vector HRV of the walking aid process to predict the knee joint angle; secondly, use the chaotic particle swarm optimization algorithm to set the proportional calculus PID parameters, adjust the FES current level and intensity in real time, and finally realize the adaptive proportional calculus PID control parameters Online tuning, and used for functional electrical stimulation FES system. The invention is mainly applied to setting PID parameters in functional electrical stimulation.

Figure 201010184133

Description

功能性电刺激PID参数双源特征融合微粒子群整定方法Functional Electrical Stimulation PID Parameters Dual-source Feature Fusion Particle Swarm Tuning Method

技术领域 technical field

本发明涉及以电脉冲刺激进行肢体康复的器械领域,尤其是功能性电刺激中PID参数的双源特征融合混沌微粒子群整定方法。The invention relates to the field of equipment for limb rehabilitation by means of electrical pulse stimulation, in particular to a method for setting dual-source feature fusion chaotic particle groups of 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 is still little research on the trigger control of FES 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]=[HRV1,HRVr]T=[Flx,Fly,Flz,Frx,Fry,Frz]T              (1)[HRV] = [HRV 1 , 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 deficiencies of the existing technology, a dual-source feature fusion chaotic particle swarm 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 chaotic microparticle swarm tuning method of PID parameters in functional electrical stimulation, including:

首先,利用助行过程的柄反作用矢量HRV预测膝关节角度;First, the knee joint angle is predicted using the handle reaction vector HRV of the walking aid process;

其次,利用混沌微粒群算法整定比例微积分PID参数,实时调控FES电流水平强度,整定流程为:首先根据比例微积分PID的三个决策变量Kp、Ki和Kd取值范围的上下界,确定粒子群群体规模、搜索空间维数等参数,并初始化粒子群体的速度和位置,然后利用通过实际关节角度与肌肉模型输出关节角度的相应关系作为适度评价函数计算粒子群中每一个粒子的适应度值,并将其适应度与本身的最佳位置适应度值作比较,并将其作为粒子代表值,然后在调整粒子的速度及其他参数,改变粒子的最佳位置,直到稳定为止,计算最终最佳的位置即得比例微积分PID的Kp、Ki和Kd三个系数,在新的比例微积分PID系数下计算系统输出yout及其与肌肉模型输出关节角度的偏差后再进入下一步神经网络的自学习与加权系数自调整,反复此过程,最终实现比例微积分PID控制参数的自适应在线整定,并用于功能性电刺激FES系统。Secondly, use the chaotic particle swarm optimization algorithm to tune the proportional calculus PID parameters, and adjust the FES current level in real time. The tuning process is as follows: first, according to the upper and lower bounds of the value ranges of the three decision variables K p , K i and K d of the proportional calculus PID , determine the parameters such as the size of the particle swarm, the dimension of the search space, and initialize the velocity and position of the particle swarm, and then use the corresponding relationship between the actual joint angle and the output joint angle of the muscle model as a moderate evaluation function to calculate the value of each particle in the particle swarm The fitness value, and compare its fitness with its own best position fitness value, and use it as the representative value of the particle, and then adjust the speed and other parameters of the particle to change the best position of the particle until it is stable. Calculate the final optimal position to get the three coefficients K p , K i and K d of the proportional calculus PID, calculate the system output yout and its deviation from the muscle model output joint angle under the new proportional calculus PID coefficients Enter the next step of neural network self-learning and weighting coefficient self-adjustment, repeat this process, and finally realize the adaptive online tuning of proportional calculus PID control parameters, and use it in the functional electrical stimulation FES system.

所述肌肉模型输出关节角度是采用偏最小二乘回归的方法,即:The muscle model output joint angle adopts the method of partial least squares regression, namely:

设有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, 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 variables, 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=ω1′HRV                   (4)T 1 =ω 11 HRV 1 +...+ω 1m HRV m =ω 1 ′HRV (4)

U1=v11M1+…+v1pMp=v1′M                            (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 GDA0000021781110000021
Figure GDA0000021781110000021

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

Figure GDA0000021781110000022
得到;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 θ 11 ′ 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 , the largest eigenvalue of which is θ 1 2 , and the corresponding unit eigenvector is the obtained The solution of ω 1 , and v 1 is given by the formula
Figure GDA0000021781110000022
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 t 1 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 respectively n×m and n×p residual matrix, according to the ordinary least squares method, the coefficient vectors α 1 and β 1 can be obtained, 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 ′′ ++ .. .. .. ++ tt rr αα rr ′′ ++ EE. rr Mm 00 == tt 11 ββ 11 ′′ ++ .. .. .. ++ 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 ;

最后根据公式L=M×HRV-1,即可求出L,M表示膝关节角度,HRV表示使用者施加在步行器上力的柄反作用矢量,L表示HRV与M之间的关系。Finally, according to the formula L=M×HRV -1 , L can be obtained. 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.

所述利用混沌微粒群算法整定PID参数,进一步细化为:The PID parameter tuning by using the chaotic particle swarm optimization algorithm is further refined as:

比例微积分PID采用比例单元P、积分单元I和微分单元D三部分组成,根据系统的误差,通过设定的Kp、Ki和Kd三个参数对系统进行控制:Proportional calculus 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的输出,同时又是受控系统的输入,由PID输出公式 yout ( t ) = K p error ( t ) + K i Σ j = 0 t error ( j ) + K d [ error ( t ) - error ( t - 1 ) ] 可以得到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. output formula yout ( t ) = K p error ( t ) + K i Σ j = 0 t error ( j ) + K d [ error ( t ) - error ( t - 1 ) ] 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控制参数的自适应优化,选择收索空间为3维,即分别为PID控制器的三参数,选取群体规模m=20,群体的初始速度和位置在一定的空间范围内随机产生,分别表示为:vi=(vi1,vi2,vi3),xi=(xi1,xi2,xi3),记第i个粒子迄今搜索到最优位置为pi=(pi1,pi2,pi3),整个粒子群迄今为止搜索到得最优位置为pgi=(pgi1,pgi2,pgi3),其中,i=1,2,…,20,粒子群优化算法采用以下公式对粒子群操作,The chaotic particle swarm optimization algorithm is used for the adaptive optimization of proportional calculus PID control parameters. The search space is selected as 3-dimensional, that is, the three parameters of the PID controller. The group size m=20 is selected. Randomly generated within the space range of , respectively expressed as: v i = (v i1 , v i2 , v i3 ), x i = (x i1 , x i2 , x i3 ), remember that the i-th particle has searched for the optimal position so far is p i =(p i1 , p i2 , p i3 ), the optimal position searched so far by the entire particle swarm is p gi =(p gi1 , p gi2 , p gi3 ), where i=1, 2,... , 20, the particle swarm optimization algorithm uses the following formula to operate on the particle swarm,

vid←vid+c1r1(pid-xid)+c2r2(pgid-xid)+c3r3(qid-xid)              (13)v id ←v id +c 1 r 1 (p id -x id )+c 2 r 2 (p gid -x id )+c 3 r 3 (q id -x id ) (13)

xid←xid+vid                                                     (14)x id ← x id +v id (14)

其中,i=1,2,…,20;学习因子c1、c2和c3是非负数,一般取值为0.5;r1、r2和r3是介于[0,1]之间的随机数,qid是随机选取粒子的位置;Among them, i=1, 2, ..., 20; the learning factors c 1 , c 2 and c 3 are non-negative numbers, generally set at 0.5; r 1 , r 2 and r 3 are between [0, 1] Random number, q id is the position of randomly selected particles;

实现的具体步骤为:The specific steps to realize are:

1、确定参数:学习因子c1、c2和c3,和群体的规模N,进化次数以及混沌寻优次数;1. Determine the parameters: learning factors c 1 , c 2 and c 3 , and the size N of the group, the times of evolution and the times of chaos optimization;

2、随机产生N个粒子进行操作;2. Randomly generate N particles for operation;

3、按公式(13)和(14)对粒子进行操作;3. Operate the particles according to formulas (13) and (14);

4、对最优位置pgi=(pgi1,pgi2,pgi3)进行混沌优化,将pgid(i=1,2,…,20),映射到4. Perform chaos optimization on the optimal position p gi =(p gi1 , p gi2 , p gi3 ), and map p gid (i=1, 2, ..., 20) to

Logistic方程zi+1=μzi(1-zi)i=0,1,2,…的定义域[0,1];i=1,2,…,20,然后,用Logistic方程进行迭代产生混沌变量

Figure GDA0000021781110000042
m=1,2,…再把产生的混沌变量序列
Figure GDA0000021781110000043
(m=1,2,…)通过逆映射
Figure GDA0000021781110000044
(m=1,2,…)返回到原解空间,得
Figure GDA0000021781110000045
(m=1,2,…)The definition domain [0, 1] of Logistic equation z i+1 = μ z i (1-z i ) i = 0, 1, 2, ...; i=1, 2,..., 20, then, use the Logistic equation to iterate to generate chaotic variables
Figure GDA0000021781110000042
m=1, 2, ... and then the generated chaotic variable sequence
Figure GDA0000021781110000043
(m=1, 2, ...) by inverse mapping
Figure GDA0000021781110000044
(m=1, 2, ...) Return to the original solution space, get
Figure GDA0000021781110000045
(m=1, 2,...)

在原解空间对混沌变量经历的每一个可行解

Figure GDA0000021781110000046
(m=1,2,…)计算其适应值,保留性能最好的可行解p*;Every feasible solution experienced by the chaotic variable in the original solution space
Figure GDA0000021781110000046
(m=1, 2, ...) calculates its fitness value, retains the best feasible solution p * of performance;

5、随机从当前群体中选出的一个粒子用p*取代;5. A particle randomly selected from the current population is replaced by p * ;

6、若达到最大代数或者得到满意解,则优化过程结束,否则返回步骤3。6. If the maximum algebra is reached or a satisfactory solution is obtained, the optimization process ends, otherwise, return to step 3.

本发明的特点在于:利用助行器的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 chaotic particle swarm 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 the control method of PID parameter tuning by chaotic particle swarm algorithm.

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

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

图6混沌粒子群算法整定的PID控制追踪结果。Figure 6 PID control tracking results of chaotic particle swarm optimization algorithm tuning.

图7混沌粒子群算法整定PID参数控制下预设输入关角度与实际输出的相对误差。Figure 7 The relative error between the preset input closing angle and the actual output under the control of the PID parameters adjusted by the chaotic particle swarm algorithm.

具体实施方式 Detailed ways

基于HRV的功能性电刺激助行中的精密控制新技术的应用的结构如图2所示,其工作流程为:首先,利用助行过程的HRV预测膝关节角度,其次,利用混沌微粒群算法整定PID参数,实时调控FES电流水平强度。其整定结构示意图如图3所示,为:首先根据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, and its workflow is as follows: firstly, the knee joint angle is predicted using the HRV during the walking aiding process, and secondly, the chaotic particle swarm optimization algorithm is used Adjust the PID parameters and adjust the FES current level in real time. 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 particle swarm group size and the dimension of the search space, and initialize The velocity and position of the particle swarm, and then use the corresponding relationship between the actual joint angle and the output joint angle of the muscle model as a moderate evaluation function to calculate the fitness value of each particle in the particle swarm, and adapt its fitness to its own best position Then, adjust the particle speed and other parameters, change the best position of the particle until it is stable, and calculate the final best position to get K p , K i and PID K d three coefficients. Calculate the system output yout and its deviation from the muscle model under the new PID coefficient, and then enter the next step of neural network 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.

一、HRV预测膝关节角度模型1. HRV Prediction Model of Knee Joint Angle

助行过程中,当使用者在功能性电刺激作用下,抬腿迈步时,为了支持身体稳定,使用者在步行器上所施加的力则有所不同,因为关节的大小不同会使人体重心处于不同位置,则克服重力所施加的力也不同,同时人体所处的平面位置也有所改变,为了位置倾翻则在平面上所施加的力也有所变化,因此,关节角度和使用者对步行器所施加的力有一定的关系,如图4所示。During the walking aid process, when the user raises 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 solving L in this patent, the method of partial least squares regression is adopted.

设有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=ω1′ HRV    (4)T 1 =ω 11 HRV 1 +…+ω 1m HRV m =ω 1 ′ HRV (4)

U1=v11M1+…+v1pMp=v1′M              (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 GDA0000021781110000061
Figure GDA0000021781110000061

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

Figure GDA0000021781110000062
得到。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 the 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 The eigenvalues and eigenvectors of , its maximum eigenvalue is θ 1 2 , the corresponding unit eigenvector is the solution ω 1 , and v 1 is given by the formula
Figure GDA0000021781110000062
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 respectively n ×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 ′′ ++ .. .. .. ++ 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参数的控制2. Control of PID parameter tuning by chaotic particle swarm 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控制参数的自适应优化,选择收索空间为3维,即分别为PID控制器的三参数,选取群体规模m=20,群体的初始速度和位置在一定的空间范围内随机产生,分别表示为:vi=(vi1,vi2,vi3),xi=(xi1,xi2,xi3),记第i个粒子迄今搜索到最优位置为pi=(pi1,pi2,pi3),整个粒子群迄今为止搜索到得最优位置为pgi=(pgi1,pgi2,pgi3)。其中,i=1,2,…,20,粒子群优化算法采用以下公式对粒子群操作。The present invention adopts chaotic particle swarm algorithm to carry out self-adaptive optimization of PID control parameters, selects the search space to be 3 dimensions, namely respectively the three parameters of the PID controller, selects the group scale m=20, and the initial speed and position of the group are in a certain Randomly generated within the space range, respectively expressed as: v i = (v i1 , v i2 , v i3 ), x i = (x i1 , x i2 , x i3 ), record the optimal position of the i-th particle searched so far as p i =(p i1 , p i2 , p i3 ), the optimal position searched so far by the entire particle swarm is p gi =(p gi 1 , p gi2 , p gi3 ). Among them, i=1, 2, ..., 20, the particle swarm optimization algorithm uses the following formula to operate on the particle swarm.

vid←vid+c1r1(pid-xid)+c2r2(pgid-xid)+c3r3(qid-xid)                   (13)v id ←v id +c 1 r 1 (p id -x id )+c 2 r 2 (p gid -x id )+c 3 r 3 (q id -x id ) (13)

xid←xid+vid                                                          (14)x id ← x id +v id (14)

其中,i=1,2,…,20;学习因子c1、c2和c3是非负数,一般取值为0.5;r1、r2和r3是介于[0,1]之间的随机数,qid是随机选取粒子的位置。Among them, i=1, 2, ..., 20; the learning factors c 1 , c 2 and c 3 are non-negative numbers, generally set at 0.5; r 1 , r 2 and r 3 are between [0, 1] Random number, q id is the position of randomly selected particles.

其实现的具体步骤为:The specific steps for its realization are:

1、确定参数:学习因子c1、c2和c3,和群体的规模N,进化次数以及混沌寻优次数;1. Determine the parameters: learning factors c 1 , c 2 and c 3 , and the size N of the group, the times of evolution and the times of chaos optimization;

2、随机产生N个粒子进行操作;2. Randomly generate N particles for operation;

3、按公式(13)和(14)对粒子进行操作;3. Operate the particles according to formulas (13) and (14);

4、对最优位置pgi=(pgi1,pgi2,pgi3)进行混沌优化,将pgid(i=1,2,…,20),映射到Logistic方程zi+1=μzi(1-zi)i=0,1,2,…的定义域[0,1];

Figure GDA0000021781110000073
Figure GDA0000021781110000074
i=1,2,…,20,然后,用Logistic方程进行迭代产生混沌变量m=1,2,…,再把产生的混沌变量序列(m=1,2,…)通过逆映射
Figure GDA0000021781110000081
(m=1,2,…)返回到原解空间,得
Figure GDA0000021781110000082
(m=1,2,…)4. Perform chaos optimization on the optimal position p gi = (p gi1 , p gi2 , p gi3 ), and map p gid (i=1, 2,..., 20) to the Logistic equation z i+1 = μ z i ( 1-z i ) the domain [0, 1] of i=0, 1, 2, ...;
Figure GDA0000021781110000073
Figure GDA0000021781110000074
i=1, 2,..., 20, then, use the Logistic equation to iterate to generate chaotic variables m=1, 2, ..., and then the generated chaotic variable sequence (m=1, 2, ...) by inverse mapping
Figure GDA0000021781110000081
(m=1, 2, ...) Return to the original solution space, get
Figure GDA0000021781110000082
(m=1, 2,...)

在原解空间对混沌变量经历的每一个可行解

Figure GDA0000021781110000083
(m=1,2,…)计算其适应值,保留性能最好的可行解p*。Every feasible solution experienced by the chaotic variable in the original solution space
Figure GDA0000021781110000083
(m=1, 2, . . . ) calculate its fitness value, and keep the feasible solution p * with the best performance.

5、随机从当前群体中选出的一个粒子用p*取代。5. A particle randomly selected from the current population is replaced by p * .

6、若达到最大代数或者得到满意解,则优化过程结束,否则返回步骤3.6. If the maximum algebra is reached or a satisfactory solution is obtained, the optimization process ends, otherwise return to step 3.

三、实验方案3. Experimental plan

实验装置采用无线传输的步行器系统和美国SIGMEDICS公司生产的Parastep功能性电刺激系统,该系统包含微处理器和刺激脉冲发生电路,含六条刺激通道,电池供电。实验内容为:利用FES系统对下肢相关肌群进行刺激,使受试者按照预定的动作,同时记录施加在步行器上的HRV首先通过安装在步行器上的12导联应变片(BX3506AA)电桥网络转化成的电压信号以及膝关节角度运动轨迹。要求受试者身体健康,无下肢肌肉、骨骼疾患,无神经疾患及严重心肺疾患。实验时受试者安坐于步行器前,将刺激电极固定于相应的部位,未施加电刺激时,受试者保持轻松。FES实验场景如图5所示。电刺激脉冲序列采用经典的Lilly波形,脉冲频率为25Hz、脉宽150μs,脉冲电流在0~120m范围内可调。实验中,实时地记录HRV以及可通过改变脉冲电流大小来调整刺激强度以改变由刺激产生的膝关节角度。实验前,设定期望的膝关节角度运动轨迹,实验中利用角度测量计实时检测膝关节张角变化。实验数据采样率为128Hz,数据记录时长为60s。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, and the stimulating electrodes were fixed on the corresponding parts. When no electrical stimulation was applied, the subjects remained relaxed. 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 is recorded in real time and the stimulation intensity can be adjusted by changing the magnitude of the pulse current to change the knee joint angle 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作用所产生的膝关节角度运动贴近预期的运动轨迹。图6为混沌微粒子群算法整定的PID控制追踪结果。图中红线表示预期运动轨迹、蓝线为实际输出关节角度。X轴为时间,Y轴为膝关节运动角度。为更清楚地观察混沌粒子群算法整定PID的控制误差,如图7混沌微粒子群整定PID控制下预设输入膝关节角度与实际膝关节角度的相对误差所示,则可以看出误差均在5%之内,可以达到精确的控制。The new algorithm of chaotic particle swarm algorithm to tune 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 trajectory. Figure 6 is the tracking result of PID control tuned by chaotic particle swarm optimization 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 PID tuning by chaotic particle swarm optimization algorithm more clearly, as shown in Figure 7, the relative error between the preset input knee joint angle and the actual knee joint angle under the control of chaotic particle swarm optimization PID, it can be seen that the errors are all within 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, and optimize the proportional coefficient of PID through the chaotic particle swarm 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 (2)

1.一种功能性电刺激PID参数双源特征融合微粒子群整定方法,其特征是,包括下列步骤: 1. A functional electric stimulation PID parameter dual-source feature fusion microparticle swarm tuning method is characterized in that it comprises the following steps: 首先,利用助行过程的柄反作用矢量HRV预测膝关节角度; First, the knee joint angle is predicted using the handle reaction vector HRV of the walking aid process; 其次,利用混沌微粒群算法整定比例微积分PID参数,实时调控FES电流水平强度,整定流程为:首先根据比例微积分PID参数的三个决策变量Kp、Ki和Kd取值范围的上下界,确定包括粒子群群体规模、搜索空间维数的参数,并初始化粒子群体的速度和位置,然后利用通过实际关节角度与肌肉模型输出关节角度的相应关系作为适度评价函数计算粒子群中每一个粒子的适应度值,相应关系是L=M×HRV-1,其中,M表示膝关节角度,HRV表示使用者施加在步行器上力的柄反作用矢量,L表示HRV与M之间的关系,采用偏最小二乘回归的方法确定肌肉模型输出关节角度,并将该粒子的适应度值与最佳位置适应度值作比较,且将该粒子的适应度值与该粒子本身的最佳位置作为粒子代表值,然后再调整粒子的速度及其他参数,改变粒子的最佳位置,直到稳定为止,计算最终最佳的位置即得比例微积分PID参数的三个决策变量Kp、Ki和Kd,在新的比例微积分PID参数下计算功能性电刺激FES系统输出yout及其与肌肉模型输出关节角度的偏差后再进入下一步混沌微粒群算法神经网络的自学习与当时PID参数的三个决策变量Kp、Ki和Kd的加权系数的自调整,反复此过程,最终实现比例微积分PID参数的自适应在线整定,并用于功能性电刺激FES系统。 Secondly , use the chaotic particle swarm optimization algorithm to adjust the proportional calculus PID parameters, and adjust the FES current level in real time. Boundary, determine the parameters including the size of the particle swarm and the dimension of the search space, and initialize the velocity and position of the particle swarm, and then use the corresponding relationship between the actual joint angle and the output joint angle of the muscle model as a moderate evaluation function to calculate each of the particle swarm The fitness value of the particle, the corresponding relationship is L=M×HRV -1 , where 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, The partial least squares regression method is used to determine the output joint angle of the muscle model, and the fitness value of the particle is compared with the best position fitness value, and the fitness value of the particle and the best position of the particle itself are taken as The representative value of the particle, and then adjust the speed of the particle and other parameters, change the optimal position of the particle until it is stable, and calculate the final optimal position to get the three decision variables K p , K i and K of the proportional calculus PID parameters d , under the new proportional calculus PID parameters, calculate the output yout of the functional electrical stimulation FES system and its deviation from the output joint angle of the muscle model, and then enter the next step of the self-learning of the chaotic particle swarm algorithm neural network and the three-dimensional PID parameters at that time The self-adjustment of the weighting coefficients of the decision variables K p , K i and K d is repeated, and finally the adaptive online tuning of the proportional calculus PID parameters is realized and used in the functional electrical stimulation FES system. 2.根据权利要求1所述的一种功能性电刺激PID参数双源特征融合微粒子群整定方法,其特征是,肌肉模型输出关节角度是采用偏最小二乘回归的方法,即: 2. a kind of functional electrical stimulation PID parameter dual-source feature fusion microparticle swarm tuning method according to claim 1, is characterized in that, muscle model output joint angle is the method that adopts partial least squares regression, namely: 设有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 of i observations in total, i=1, ..., n; T and U are respectively from HRV variables and M The components extracted from the variables are called partial least squares factors, and 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, and the above-mentioned requirement for extracting the first pair of components is transformed into the condition Extreme value problem:
Figure FDA00001724155900011
Figure FDA00001724155900011
其中t1、u1为由样本求得的第一对成分的得分向量,HRV0、M0为初始变量,利用拉格朗日乘子法,上述问题转化为求单位向量ω1和v1,使θ1=ω′1HRV′0M′0v1′最大,即求矩阵HRV′0M0M′0HRV0的特征值和特征向量,其最大特征值为θ1 2,相应的单位特征向量就是所求的解ω1,而v1由公式得到; 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 , the largest eigenvalue of which is θ 1 2 , and the corresponding unit eigenvector is The desired solution ω 1 , and v 1 is given by the formula get; 其次建立初始变量对T1的方程  Secondly, establish the equation of the initial variable to T1 其中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 variable t1, and E1 and F1 are n respectively ×m and n×p residual matrix, the coefficient vectors α 1 and β 1 are obtained according to the ordinary least square method, where α 1 is called the model effect load; 如提取的第一对成分不能达到回归模型的精度,运用残差阵E1、F1代替HRV0、M0,重复提取成分,依次类推,假设最终提取了r个成分,HRV0、M0对r个成分的回归方程为: If the first pair of components extracted cannot reach the accuracy of the regression model, use the residual matrix E1, F1 instead of HRV 0 , M 0 , repeat the extraction of components, and so on, assuming that r components are finally extracted, HRV0, M0 pair r components The regression equation for is:
Figure FDA00001724155900022
Figure FDA00001724155900022
把第一步分析所得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) into the regression equation established by M variables for r components from the HRV volume obtained in the first step analysis, 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 ; 最后根据公式L=M×HRV-1,即可求出L。 Finally, L can be obtained according to the formula L=M×HRV -1 . 3.根据权利要求1所述的一种功能性电刺激PID参数双源特征融合微粒子群整定方法,其特征是,利用混沌微粒群算法整定PID参数,进一步细化为: 3. A kind of functional electrical stimulation PID parameter dual-source feature fusion microparticle swarm tuning method according to claim 1, is characterized in that, utilizes chaotic particle swarm algorithm tuning PID parameter, further refines as: 比例微积分PID采用比例单元P、积分单元I和微分单元D三部分组成,根据功能性电刺激系统的误差,通过设定的Kp、Ki和Kd三个参数对功能性电刺激系统进行控制: Proportional calculus PID is composed of three parts: proportional unit P, integral unit I and differential unit D. According to the error of the functional electrical stimulation system, the functional electrical stimulation system can be adjusted by setting three parameters K p , K i and K d Take control:
Figure FDA00001724155900023
Figure FDA00001724155900023
其中Kp是比例系数,Ki是积分系数,Kd是微分系数,error为预设输出与实际输出的偏差,u(t)为PID的输出,同时又是受控系统的输入,由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. output formula
Figure FDA00001724155900024
可以得到
Figure FDA00001724155900024
can get
Figure FDA00001724155900025
Figure FDA00001724155900025
根据: 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))……………………………………………………………(11) =K p (error(t)-error(t-1))+K i error(t)+K d (error(t)-2error(t-1)+error(t-2))……… …………………………………………(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控制参数的自适应优化,选择搜索空间为3维,即分别为PID控制器的三参数,选取群体规模m=20,群体的初始速度和位置在一定的空间范围内随机产生,分别表示为:vi=(vi1,vi2,vi3),xi=(xi1,xi2,xi3),记第i个粒子迄今搜索到最优位置为pi=(pi1,pi2,pi3),整个粒子群迄今为止搜索到得最优位置为pgi=(pgi1,pgi2,pgi3),其中,i=1,2,…,20,粒子群优化算法采用以下公式对粒子群操作,vid←vid+c1r1(pid-xid)+c2r2(pgid-xid)+c3r3(qid-xid)       (13) The chaotic particle swarm optimization algorithm is used for the adaptive optimization of the proportional calculus PID control parameters. The search space is selected as 3-dimensional, that is, the three parameters of the PID controller, and the group size m=20 is selected. Randomly generated within the space range, respectively expressed as: v i = (v i1 , v i2 , v i3 ), x i = (x i1 , x i2 , x i3 ), record the optimal position of the i-th particle searched so far as p i =(p i1 , p i2 , p i3 ), the optimal position searched so far by the entire particle swarm is p gi =(p gi1 , p gi2 , p gi3 ), where i=1, 2,..., 20. The particle swarm optimization algorithm uses the following formula to operate particle swarms, v id ←v id +c 1 r 1 (p id -x id )+c 2 r 2 (p gid -x id )+c 3 r 3 (q id -x id ) (13) xid←xid+vid     (14) x id ← x id +v id (14) 其中,学习因子c1、c2和c3是非负数,取值为0.5;r1、r2和r3是介于[0,1]之间的随机数,qid是随机选取粒子的位置,d表示离子的编码方法,d=10; Among them, the learning factors c 1 , c 2 and c 3 are non-negative numbers with a value of 0.5; r 1 , r 2 and r 3 are random numbers between [0, 1], and q id is the position of randomly selected particles , d represents the encoding method of ions, d=10; 实现的具体步骤为: The specific steps to realize are: 1、确定参数:学习因子c1、c2和c3,和群体的规模N,进化次数以及混沌寻优次数; 1. Determine the parameters: learning factors c 1 , c 2 and c 3 , and the size N of the group, the times of evolution and the times of chaos optimization; 2、随机产生N个粒子进行操作; 2. Randomly generate N particles for operation; 3、按公式(13)和(14)对粒子进行操作; 3. Operate the particles according to formulas (13) and (14); 4、对最优位置pgi=(pgi1,pgi2,pgi3)进行混沌优化,将pgid映射到Logistic方程zi+1=μzi(1-zi),zi+1为混沌变量的值,其定义域为[0,1],μ为Logistic控制参数,控制混沌状态; 
Figure FDA00001724155900031
然后,用Logistic方程进行迭代产生混沌变量 
Figure FDA00001724155900032
m=1,2,……,再把产生的混沌变量序列 
Figure FDA00001724155900033
通过逆映射 
Figure FDA00001724155900034
返回到原解空间,得 
Figure FDA00001724155900035
aid表示PID参数中每个最小的参数,bid表示PID参数中每个最大的参数;
4. Perform chaos optimization on the optimal position p gi = (p gi1 , p gi2 , p gi3 ), map p gid to the Logistic equation z i+1 = μ z i (1-z i ), z i+1 is chaos The value of the variable, its definition domain is [0, 1], μ is the Logistic control parameter, which controls the chaotic state;
Figure FDA00001724155900031
Then, use the Logistic equation to iterate to generate chaotic variables
Figure FDA00001724155900032
m=1, 2, ..., and then the generated chaotic variable sequence
Figure FDA00001724155900033
by inverse mapping
Figure FDA00001724155900034
Returning to the original solution space, we get
Figure FDA00001724155900035
a id represents each smallest parameter among PID parameters, b id represents each largest parameter among PID parameters;
在原解空间对混沌变量经历的每一个可行解 
Figure FDA00001724155900036
计算其适应值,保留性能最好的可行解p*
Every feasible solution experienced by the chaotic variable in the original solution space
Figure FDA00001724155900036
Calculate its fitness value and keep the feasible solution p * with the best performance;
5、随机从当前群体中选出的一个粒子用p*取代; 5. A particle randomly selected from the current population is replaced by p * ; 6、若达到最大迭代次数或者得到满意解,则优化过程结束,否则返回步骤3。  6. If the maximum number of iterations is reached or a satisfactory solution is obtained, the optimization process ends, otherwise, return to step 3. the
CN2010101841330A 2010-05-27 2010-05-27 Setting method of functional electrical stimulation PID (Proportion Integration Differentiation) parameter double source characteristic fusion particle swarm Active CN101816822B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2010101841330A CN101816822B (en) 2010-05-27 2010-05-27 Setting method of functional electrical stimulation PID (Proportion Integration Differentiation) parameter double source characteristic fusion particle swarm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2010101841330A CN101816822B (en) 2010-05-27 2010-05-27 Setting method of functional electrical stimulation PID (Proportion Integration Differentiation) parameter double source characteristic fusion particle swarm

Publications (2)

Publication Number Publication Date
CN101816822A CN101816822A (en) 2010-09-01
CN101816822B true CN101816822B (en) 2012-11-28

Family

ID=42652190

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2010101841330A Active CN101816822B (en) 2010-05-27 2010-05-27 Setting method of functional electrical stimulation PID (Proportion Integration Differentiation) parameter double source characteristic fusion particle swarm

Country Status (1)

Country Link
CN (1) CN101816822B (en)

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
MX344095B (en) * 2011-03-24 2016-12-05 Univ Louisville Res Found Inc Neurostimulator.
CN103472731B (en) * 2013-09-24 2016-05-25 南方电网科学研究院有限责任公司 Method for analyzing stability of small signals of micro-grid and coordinating and setting parameters
CN104090490B (en) * 2014-07-04 2018-11-02 北京工业大学 A kind of input shaper closed loop control method based on Chaos particle swarm optimization algorithm
CN104834215B (en) * 2015-03-24 2018-02-09 浙江师范大学 A kind of BP neural network pid control algorithm of mutation particle swarm optimization
CN106647247B (en) * 2016-12-29 2019-08-20 西安工程大学 A Control Algorithm Applicable to Servo Controller
CN109491349B (en) * 2018-12-18 2020-06-23 江南大学 Adjustment method of batch running trajectory and space applied in continuous stirring reactor
CN109848990B (en) * 2019-01-28 2022-01-11 南京理工大学 PSO-based knee joint exoskeleton gain variable model-free angle control method
CN110404168B (en) * 2019-09-11 2023-06-13 中山大学 An Adaptive Electrical Stimulation Training System
CN110768558A (en) * 2019-09-24 2020-02-07 山东电工电气集团新能科技有限公司 Inverter midpoint voltage balancing method based on time distribution factor method
CN111166294B (en) * 2020-01-29 2021-09-14 北京交通大学 Automatic sleep apnea detection method and device based on inter-heartbeat period
CN111643321B (en) * 2020-04-30 2023-05-12 北京精密机电控制设备研究所 Exoskeleton joint angle prediction method and system based on sEMG signals
CN113941090B (en) * 2021-09-18 2023-01-17 复旦大学 An adaptive closed-loop deep brain stimulation method, device and electronic equipment
WO2023040521A1 (en) * 2021-09-18 2023-03-23 复旦大学 Adaptive closed-loop deep brain stimulation method and apparatus, and electronic device
CN114967423B (en) * 2022-05-09 2024-11-29 电子科技大学 Composite temperature control method of fuel cell test system
CN117899358B (en) * 2024-01-19 2024-10-15 天津大学 Adaptive electrical stimulation balance rehabilitation training system
CN118304577B (en) * 2024-06-07 2024-08-30 首都医科大学宣武医院 Mirror image task training system suitable for hand function rehabilitation

Citations (2)

* 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
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 (2)

* 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
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 (3)

* Cited by examiner, † Cited by third party
Title
Abolfazl Jalilvand.Advanced Particle Swarm Optimization-Based PIDController Parameters Tuning.《Proceedings of the 12th IEEE International Multitopic Conference》.2008,430-435. *
Longlong Cheng et al.Radial Basis Function Neural Network-based PID Model Electrical Stimulation System Control.《31st Annual International Conference of the IEEE EMBS Minneapolis》.2009,3481-3484. *
栾丽君等.基于粒子群算法的PID参数自整定.《2006中国控制与决策学术年会论文集》.2006,476-482. *

Also Published As

Publication number Publication date
CN101816822A (en) 2010-09-01

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
CN109589247A (en) It is a kind of based on brain-machine-flesh information loop assistant robot system
CN105615890B (en) Human body lower limbs walking joint angles myoelectricity continuous decoding method
Fong et al. A therapist-taught robotic system for assistance during gait therapy targeting foot drop
CN101596338A (en) A Precise Control Method of Functional Electrical Stimulation Based on BP Neural Network Tuning PID
CN105213153A (en) Based on the lower limb rehabilitation robot control method of brain flesh information impedance
CN101837164B (en) Double source feature fusion ant colony tuning method for PID (Proportion Integration Differention) parameter in functional electro-stimulation
Zhang et al. Modeling biological motor control for human locomotion with functional electrical stimulation
CN101794114A (en) Method for tuning control parameter in walk-aiding functional electric stimulation system by utilizing genetic algorithm
CN102274581B (en) Precise control method for functional electric stimulation
Abdulla et al. Functional electrical stimulation-based cycling assisted by flywheel and electrical clutch mechanism: A feasibility simulation study
Kim et al. Stimulation pattern-free control of FES cycling: Simulation study
CN102521508B (en) Adaptive neural fuzzy muscle modeling method under functional electrical stimulation
Chen et al. Control strategies for lower limb rehabilitation robot
Wannawas et al. Towards ai-controlled movement restoration: Learning fes-cycling stimulation with reinforcement learning
Poliakov et al. Transfemoral prostheses control in a frame of intellectual-synergetic concept
Sasaki et al. Simulation model of a lever-propelled wheelchair
Higgins Characterization, estimation, and realization of human intent for exoskeleton-assisted walking
Schiehlen On the historical development of human walking dynamics
Benahmed et al. Comparative study of non-linear controllers for the regulation of the paraplegic knee movement using functional electrical stimulation
Zhang et al. Structure design and simulation on bionic lower extremity rehabilitation robot
Asadi Motor Control Quantification and Necessary Improvements for Individuals with Post-stroke Gait: Implications for Future Customizable Rehabilitation Approaches
Ahmad et al. Framework of Lower-Limb Musculoskeletal Modeling for FES Control System Development
CN107391940A (en) Electro photoluminescence simulation optimization method based on flesh bone model
Ahmad et al. Framework of Lower-Limb Musculoskeletal Modeling for FES Control System Development

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
TR01 Transfer of patent right

Effective date of registration: 20210301

Address after: Room 50, room 03, 8 / F, phase I, zhikongjian Plaza, Southeast of the intersection of Huizhi North Road and Huizhi Ring Road, Dongli Lake, Tianjin

Patentee after: Yuxi Technology (Tianjin) Co.,Ltd.

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

Patentee before: Tianjin University

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20240924

Address after: Room 101, Building C22, Entrepreneurship Headquarters Base, North Fuyuan Road, Wuqing Development Zone, Wuqing District, Tianjin City 301700

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

Country or region after: China

Address before: Room 50, room 03, 8 / F, phase I, zhikongjian Plaza, Southeast of the intersection of Huizhi North Road and Huizhi Ring Road, Dongli Lake, Tianjin

Patentee before: Yuxi Technology (Tianjin) Co.,Ltd.

Country or region before: China