Technical background
(Functional Electrical Stimulation is to stimulate limb motion muscle group and peripheral nerve thereof by current pulse sequence FES) to functional electrostimulation, recovers or rebuild the technology of the componental movement function of paralytic patient effectively.At present, because the spinal cord regeneration ability is faint, at the spinal cord injury paralysed patient, Shang Weiyou can directly repair effective treatment method of damage, and implementing function rehabilitation training is effective measures.According to statistics, spinal cord injury paralysed patient number increases year by year, and function rehabilitation training is a technology of demanding demand urgently.The sixties in 20th century, Liberson successfully utilizes the electro photoluminescence nervus peronaeus to correct the gait of hemiplegic patient's drop foot first, has started the new way that functional electrostimulation is used to move and Sensory rehabilitation is treated.At present, FES has become the componental movement function of recovering or rebuilding paralytic patient, is important rehabilitation means.Yet how accurate triggering sequential and the pulse current intensity of controlling FES can accurately be finished the key problem in technology that the intended function action is still FES with assurance electro photoluminescence action effect.According to statistics, the mode of the triggering of FES control is at present studied still few, and according to action effect and predetermined action deviation, automatically adjust FES stimulus intensity and time sequence parameter with closed-loop control, thereby improved real-time, accuracy and the stability of FES system greatly, but now effective control method is still among exploring.
Handle retroaction vector (handle reactions vector, HRV) according in the process of standing and walking under the walker help, in fact the effectiveness that walker offers the patient can be divided into clear and definite independently 3 parts: sagittal trying hard to recommend into, about to dynamic balance and the power support of upward and downward, this also can be regarded as the patient in fact and keeps the new ideas that the required to external world additional mechanics demand of self normal stand walking proposes, promptly be that the patient is reduced to centre-point load to the effect of walker is synthetic in the walking process of standing, represent with two mechanics vectors that are positioned at handle mid point xsect centre of form place respectively, as shown in Figure 1.Vector is at x, y, and the size of making a concerted effort of the durection component on the z axle can characterize the patient respectively by trying hard to recommend into that walker obtained, dynamic balance and power support level.Wherein, the x axle forward that sets of definition coordinate system is patient's dextrad, and y axle forward be patient's a forward direction, z axle forward be the patient on to.Like this, the defined formula of HRV can be written as:
[HRV]=[HRV
1,HRV
r]
T=[F
lx,F
ly,F
lz,F
rx,F
ry,F
rz]
T (1)
HRV is used at present monitoring that the situation when patient walks prevents that patient from falling down in the electro photoluminescence process, causes the secondary injury.
Ratio infinitesimal analysis (proportional-integral-differential, PID) be a kind of very practical feedback regulation algorithm, it detects according to system or the operation deviation, proportion of utilization, integration, the required regulated quantity of acquisition of differentiating are widely used in engineering practice so that system is carried out FEEDBACK CONTROL because of it is easy to operate.Especially indeterminate or when being difficult to timely on-line determination, safe closed-loop control can be adopted the PID setting algorithm when the controlled system characterisitic parameter.In the face of the complicacy and the time variation operating environment of muscle, because good stability, the reliable operation of PID have still obtained in the functional electrostimulation field using widely at present.The PID core technology is accurate determine wherein ratio, integration, differential coefficient, especially in the FES field, system stability is required very strictness, so select particularly important to pid parameter.PID control will obtain controls effect preferably, must adjust ratio, integration and three kinds of control actions of differential, forms in the controlled quentity controlled variable not only to cooperatively interact but also the relation of mutual restriction.
Summary of the invention
For overcoming the deficiencies in the prior art, the objective of the invention is to realize accurately stablize and control systematically strength of current of FES in real time, improve FES system accuracy and stability effectively.
For achieving the above object, the technical solution used in the present invention is: the adjust method of ratio infinitesimal analysis parameter control of the genetic algorithm in the walk-aiding functional electric stimulation system comprises the following steps:
At first walker is applied power, cause that the HRV parameter changes, and then utilize fuzzy Control to start, HRV is: handle retroaction vector is the vector combination that is applied to the reacting force of power on the walker;
Secondly, utilize the genetic algorithm pid parameter of adjusting, according to kneed variation real-time monitoring walk-aiding functional electric stimulation system levels of current intensity, close the walk help electric stimulation according to the variation of HRV at last, PID is made up of ratio unit P, integral unit I and differentiation element D three parts.
The described HRV parameter that causes changes, and utilizes fuzzy Control walk help electric stimulation to start then and is meant: at first the HRV parameter is carried out obfuscation, calculating according to different control laws then, and last de-fuzzy, different control laws refer to:
As dHRV (t)/dt>a and for occurring then starting the walk help electric stimulation for the first time;
As dHRV (t)/dt<-a and dHRV (t+T)/dt>α then walk line state;
As | dHRV (t)/dt|<α and HRV (t
s)-HRV (0)>β is standing state then;
As dHRV (t)/dt<-α and HRV (t
s)=HRV (0) then closes the walk help electric stimulation.
The described genetic algorithm pid parameter of adjusting, its flow process of adjusting is: three decision variable K that at first determine PID
p, K
iAnd K
dApproximate range and code length, and to its initial population P (0) that encodes and produce n individual composition at random;
Secondly select the parameter of suitable genetic algorithm: whole evolutionary generation G, crossover probability P
cAnd variation probability P
m
Export the corresponding relation of joint angles at last by actual joint angles and muscle model, set up the minimum target function, each individuality in the population is decoded into the corresponding parameters value, and ask for corresponding cost function value and adapt to functional value, use again duplicate, intersection and mutation operator operate population P (t), produces population P of future generation (t+1), repeats above operation repeatedly, up to parameter convergence or reach predetermined index, the final output of calculating neural network promptly gets the K of PID
p, K
iAnd K
dThree coefficients, computing system output yout under the new PID coefficient and with the deviation of muscle model after enter the self study and the weighting coefficient self-adjusting of next step neural network again;
This process finally realizes the self-adaptation on-line tuning of pid control parameter repeatedly, and is used for the walk help electric stimulation.
The described genetic algorithm pid parameter of adjusting, its flow process of adjusting is refined as:
Pid parameter is carried out chromosome coding;
Produce initial population at random;
Gene Selection is intersected and mutation operation;
The chromosome decoding obtains new argument;
The input and output of sampling controlled process;
Optimal selection to controlled output;
Colony's fitness statistics also produces new colony;
Judge that whether colony is stable, returns gene Selection if not and intersects and mutation operation;
The pid parameter that output is optimized.
Describedly pid parameter is carried out chromosome coding be, adopt multiparameter mapping binary-coding, promptly three substrings are represented three parameter: 0100010011|1100100110|1001100100 respectively on a chromosome.
Described colony fitness statistics also produces new colony, and fitness function is the feedback deviation error (t) optimum prediction and expectation value, the rate of change error ' of deviation (t) with the relation of controlled quentity controlled variable u (t), as the optimum index J of selection of parameter:
Wherein, w
1, w
2And w
3Be weights, generally all get w
1=100, w
2=10, w
3=1;
The appropriateness function is
F=C/J (11)
Wherein, C=10
n, n is an integer, when individuality is overstrain one's nervesly to differ when big n≤0; Differ hour n 〉=0.
The present invention has following technique effect: the present invention at first utilizes the method for fuzzy control to open the FES system by walker HRV parameter and variation thereof, the optimized method of passing through the parallel random search of genetic algorithm is then optimized scale-up factor, differential coefficient and the integral coefficient of PID, then control the current impulse intensity of walk help electric stimulation FES system, according to walker HRV parameter and variation, utilize the method for fuzzy control to close the FES system at last.The present invention can improve walk help electric stimulation FES system real time, accuracy and stability effectively, and obtains considerable social benefit and economic benefit.
Embodiment
The present invention proposes by the startup of fuzzy control control FES and the duty of closing, and come adaptive optimization to adjust ratio, integration and the differential coefficient of PID with the new method of accurate control FES strength of current by genetic algorithm.Its techniqueflow is: at first the HRV parameter by walk helper changes the method control FES startup of cause fuzzy control and the duty of closing, the optimized method of passing through the parallel random search of genetic algorithm is then optimized scale-up factor, differential coefficient and the integral coefficient of PID, controls the current impulse intensity of FES system then.The present invention is a kind of brand-new functional electrical stimulation accurate control technique, and what the present invention proposed can obtain good effect based on the adjust horizontal aspect of method FES system power of the accurate control of functional electrostimulation of PID of genetic algorithm.
Further describe the present invention below in conjunction with drawings and Examples.
In the walk-aiding functional electric stimulation system genetic algorithm adjust controlled variable the method application structure as shown in Figure 2.Its workflow is: when patient relies on walker to stand, at first walker is applied power, cause that the HRV parameter changes, utilize fuzzy Control FES to start then; Secondly, utilize the genetic algorithm pid parameter of adjusting, real-time monitoring FES levels of current intensity is closed the FES system according to the variation of HRV at last.The genetic algorithm structured flowchart of pid parameter control method of adjusting, as shown in Figure 3, its flow process of adjusting is: three decision variable K that at first determine PID
p, K
iAnd K
dApproximate range and code length, and it is encoded and produces n the individual initial population P (0) that forms at random, the parameter of secondly selected suitable genetic algorithm: whole evolutionary generation G, crossover probability P
cAnd the general P that makes a variation
m, by the corresponding relation of actual joint angles and muscle model output joint angles, set up the minimum target function at last; Each individuality in the population is decoded into the corresponding parameters value, and ask for corresponding cost function value and adapt to functional value, use again duplicate, intersection and mutation operator operate population P (t), produce population P of future generation (t+1), repeat above operation repeatedly, up to parameter convergence or reach predetermined index; The final output of calculating neural network promptly gets the K of PID
p, K
iAnd K
dThree coefficients.Computing system output yout under the new PID coefficient and with the deviation of muscle model after enter next step genetic algorithm optimization adjustment again.This process finally realizes the self-adaptation on-line tuning of pid control parameter repeatedly, and is used for the FES system.
1 control based on the triggering FES starting state of HRV parameter
Fuzzy control structural principle block diagram as shown in Figure 4, its principle of work is according to HRV parameter and rate of change thereof, control the startup of FES and the duty of closing, its workflow is: at first the HRV parameter is carried out obfuscation, calculating according to different control laws then, last de-fuzzy, the signal that controlled FES starts and closes, and then the duty of control FES switch.
In the walker use, the HRV parameter changes in real time.Before not using, there is not power to be added to walker, then HRV is expressed as HVR (0); In the walker use, the power that is added on the walker changes constantly, and then HRV is expressed as HVR (t).Its workflow is as shown in table 1.
When patients with spinal cord injury stands, at first to apply power to walker, then HRV changes:
Wherein, α is the certain value vector, starts the FES system works this moment.
Patient in the process of walking, the power that is applied on the walker also is constantly to change, and then HRV also is a real-time change:
Wherein α is the certain value vector, and this moment, the FES system was in running order.
The duty that table 1 is opened and closed based on HRV fuzzy control FES
1 |
As dHRV (t)/dt>α and for occurring then starting FES for the first time |
2 |
As dHRV (t)/dt<-a and dHRV (t+T)/dt>α then walk line state |
3 |
As | dHRV (t)/dt|<α and HRV (t
s)-HRV (0)>β is standing state then
|
4 |
As dHRV (t)/dt<-a and HRV (t
s)=HRV (0) then closes FES
|
When patient stood, the power that is applied on the walker was constant, and this moment, HRV then had
HRV(t
s)-HRV(0)>β(4)
HRV (t wherein
s) being the HRV constantly that stands, β is the certain value vector.
When patient sat down, the power that applies on the walker device was removed, and this moment, HRV then had
HRV(t
s)=HRV(0)(5)
Can close the FES system this moment.
The control that 2 genetic algorithms are adjusted pid parameter
PID is made up of ratio unit P, integral unit I and differentiation element D three parts, according to the error of system, by the K that sets
p, K
iAnd K
dThree parameters are controlled system.
K wherein
pBe scale-up factor, K
iBe integral coefficient, K
dBe differential coefficient, error is the deviation of default output with actual output, and u (t) is the output of PID, is again the input of controlled system simultaneously.
Can obtain by PID output formula (1)
According to:
Δu(t)=u(t)-u(t-1)
=K
p(error(t)-error(t-1))+K
ierror(t)+K
d(error(t)-2error(t-1)+error(t-2))……………………………………………………………(8)
Have:
u(t)=Δu(t)+u(t-1)=
u(t-1)+K
p(error(t)-error(t-1))+K
ierror(t)+K
d(error(t)-2error(t-1)+error(t-2))
………………(9)
Based on the PID controller parameter optimizing process flow diagram of genetic algorithm as shown in Figure 5, at first be to determine code length according to the approximate range of three parameters of PID, then PID three parameters are carried out random coded, should note the difference between the chromosome in the colony when noting coding, guarantee the diversity of initial population; Gene Selection, intersection and mutation operation, the selection of gene is the thought according to the occurring in nature survival of the fittest, utilize and select operator to screen, intersect and make a variation and decide, when adaptive value is lower than average adaptive value, adopt bigger crossing-over rate and aberration rate according to adaptive value, when adaptive value during more greater than average adaptive value, the crossing-over rate and the aberration rate that adopt are more little, and concrete operations are: intersection is to utilize the hybridization operator to realize that variation utilizes mutation operator to realize; By selecting, intersection and mutation operation obtain new chromosome, with new chromosome decoding, new pid parameter will be obtained, utilize this parameter according to joint angles FEEDBACK CONTROL FES system, and with next joint angles constantly of data prediction of this output data and muscle model output, and ask this constantly joint angles and the output of predetermined joint angles error and PID, bring optimum target function into, and ask for adaptive value and judge then whether new colony is stable, if unstable rule is carried out gene Selection once more, intersection and mutation operation are up to stable, to its decoding output pid parameter, if stable then to its coding and decoding output pid parameter.Promptly finish genetic algorithm adjusting to pid parameter.Adaptive value is lower than average adaptive value then, and genetic algorithm is adjusted to pid parameter once more, finishes the real-time monitoring pid parameter, and then reaches the precision control to the FES system.
1, the optimizing parameter of PID controller
The input of PID control is optimum prediction knee joint angle and given angle feedback deviation, in control procedure, according to the state of a certain moment t, by PREDICTIVE CONTROL t+1 state constantly, improves the stability of control system.The optimizing parameter is the K of PID controller
p, K
iAnd K
dThree decision parameters.
2, chromosomal coding method
Owing to be the parameter optimization problem, and problem separates and is real number value, so adopt multiparameter to shine upon binary-coding, promptly three substrings are represented three parameters respectively on a chromosome:
0100010011|1100100110|1001100100
3, the design of fitness function
Owing to weigh three indexs of control system is stability, accuracy and rapidity, for control deviation is gone to zero, response speed and less overshoot are faster arranged, therefore fitness function should be the feedback deviation error (t) of optimum prediction and expectation value, the rate of change error ' of deviation (t) and the relation of controlled quentity controlled variable u (t), as the optimum index J of selection of parameter
Wherein, w
1, w
2And w
3Be weights, generally all get w
1=100, w
2=10, w
3=1.
The appropriateness function is
F=C/J (11)
Wherein, C=10
n(n is an integer), when individuality is overstrain one's nervesly to differ when big n≤0; Differ hour n 〉=0.
4, the end condition of algorithm
The individual in population state that tended towards stability of evolving promptly finds to account for a certain proportion of individuality of colony for same when individual, and iteration stops.
3 experimental programs
Experimental provision adopts the walker system of wireless transmission and the Parastep functional electric stimulation system that U.S. SIGMEDICS company produces, and this system comprises microprocessor and boost pulse generation circuit, contains six stimulation channels, powered battery.Experiment content is: utilize the FES system that the relevant muscle group of lower limb is stimulated, make the experimenter according to predetermined actions, record is applied to HRV and knee joint angle movement locus on the walker simultaneously, and HRV at first demarcates the force vector that forms by being installed in the voltage signal that foil gauge (BX350-6AA) network of electrical bridge changes into that leads of 12 on the walker.Require the experimenter healthy, no lower limb muscles, bone illness, impassivity illness and severe cardiac pulmonary disease.Before the experimenter sits on walker during experiment, stimulating electrode is fixed in corresponding position, when not applying electro photoluminescence, the experimenter keeps easily when the experimenter has a mind to stand, applying power to walker, triggers FES work, and under FES helped, the experimenter stood and walks.The FES experiment scene as shown in Figure 6.The electric stimulation pulse sequence adopts classical Lilly waveform, and pulsed frequency is 25Hz, pulsewidth 150 μ s, and pulse current is adjustable in 0~120m scope.In the experiment, write down HRV in real time and can adjust stimulus intensity to change the knee joint angle that produces by stimulating by changing the pulse current size.Before the experiment, set the knee joint angle movement locus of expectation, utilize the measurement of angle meter to detect the knee joint subtended angle in real time in the experiment and change.The experimental data sampling rate is 128Hz, and the data recording duration is 60s.
The PID new algorithm that heredity is adjusted is calculated the FES pulse current amplitude and is adjusted, the approaching movement locus of expecting of knee joint angle motion that the FES effect is produced.Fig. 7 follows the trail of the result for the PID control that the genetic algorithm adaptive optimization is adjusted.Red line represents that desired movement track, blue line are actual output joint angles among the figure, and X-axis is the time, and Y-axis is the motion of knee joint angle.For more clearly observing the departure that genetic algorithm is adjusted PID, shown in the relative error of default input knee joint angle and actual knee joint angle under Fig. 8 genetic algorithm Tuning PID Controller, then error can reach accurate control all within 5% as can be seen.
Purport of the present invention is the precision control method that proposes a kind of new FES: according to the HRV parameter of walker, utilize fuzzy control to control the duty of the unlatching of FES accurately; Calculate scale-up factor, integral coefficient and the differential coefficient of optimizing PID by heredity, the accurately stable then strength of current of controlling the FES system in real time effectively.This invention can improve FES system real time, accuracy and stability effectively, and obtains considerable social benefit and economic benefit.Optimum implementation intends adopting patent transfer, technological cooperation or product development.