Disclosure of Invention
1. Technical problem to be solved by the invention
The invention aims to provide a brain-computer interface method facing vehicle continuous control, which can improve the control stability of a brain-controlled vehicle and reduce the work load of a driver, and under the premise of ensuring the safety of the brain-controlled vehicle and the real intention of the driver, the steering wheel corner with lower error cost is output through a probabilistic output port and fuzzy logic, so that the error correcting time of the driver is reduced, and the control stability in the whole control process is kept.
2. Technical scheme
In order to achieve the purpose, the invention provides the following technical scheme:
a brain-computer interface method for vehicle continuous control comprises the following steps:
s1, constructing an integral control framework, wherein the control framework consists of a driver, a probabilistic output interface, a fuzzy logic interface, other auxiliary controllers and a controlled vehicle;
s2, making a decision by the driver according to the current road vehicle information, sending out a corresponding electroencephalogram signal, and collecting the electroencephalogram signal of the driver;
s3, performing frequency domain feature extraction and probabilistic processing on the electroencephalogram signal of the driver acquired in the S2 by using a probabilistic output interface;
and S4, carrying out fuzzy logic processing on each probability processed in the S3 by using a fuzzy logic interface, and finely adjusting output signals by using other auxiliary controllers according to environmental information so as to obtain the pose of the controlled vehicle.
Preferably, the step of collecting the electroencephalogram signal of the driver mentioned in S2 adopts an experimental paradigm of steady-state visual evoked potentials, and simultaneously, the electroencephalogram signal is processed by using CCA.
Preferably, the probabilistic process mentioned in S3 includes a probabilistic process of performing a logistic regression on the acceleration, deceleration, start/stop, left turn, right turn instructions at the steady state visual evoked potential and the commands at the non-steady state visual evoked potential.
Preferably, the fuzzy logic processing mentioned in S4 specifically includes the following steps:
s41, fuzzifying the probability of each command;
s42, obtaining a membership function according to the fuzzification processing in S41, and carrying out longitudinal fuzzy logic reasoning on the side of the brain-controlled vehicle;
and S43, performing defuzzification according to the fuzzy inference result, and outputting the change quantity of the steering wheel angle of the vehicle and the acceleration of the vehicle.
Preferably, the fuzzification process mentioned in S41 is implemented by including two membership functions, i.e., an S-type function and a Z-type function, for each input command.
Preferably, the step of performing the defuzzification on the result of the fuzzy inference mentioned in the step S43 uses a mean center of gravity method.
3. Advantageous effects
The fuzzy logic module is established through the fuzzy logic interface and the fuzzy logic structure, and the originally discrete command set is converted into the continuously distributed command set, so that the operation mode of a driver is more flexible; meanwhile, the probabilistic output interface can reduce the cost of the process of correcting errors when classification of the electroencephalogram signals is wrong, and the control precision is finer.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example 1:
referring to fig. 1, a brain-computer interface method for vehicle continuous control includes the following steps:
s1, constructing an integral control framework, wherein the control framework consists of a driver, a probabilistic output interface, a fuzzy logic interface, other auxiliary controllers and a controlled vehicle;
s2, making a decision by the driver according to the current road vehicle information, sending out a corresponding electroencephalogram signal, and collecting the electroencephalogram signal of the driver;
the electroencephalogram signal of the driver is collected in the S2 by adopting an experimental paradigm of steady-state visual evoked potential, and meanwhile, the electroencephalogram signal is processed by using CCA.
S3, performing frequency domain feature extraction and probabilistic processing on the electroencephalogram signal of the driver acquired in the S2 by using a probabilistic output interface;
the probabilistic processing mentioned in S3 includes probabilistic processing of performing logistic regression on the acceleration, deceleration, start/stop, left turn, right turn instructions under the steady-state visual evoked potential and the commands under the unsteady-state visual evoked potential;
s4, carrying out fuzzy logic processing on each probability processed in S3 by using a fuzzy logic interface, and meanwhile, finely adjusting an output signal by using other auxiliary controllers according to environmental information so as to obtain the pose of the controlled vehicle;
the fuzzy logic processing in S4 specifically includes the following steps:
s41, fuzzifying the probability of each command;
the fuzzification processing mentioned in S41 is specifically that each input command includes two membership functions, which are an S-type function and a Z-type function respectively;
s42, obtaining a membership function according to the fuzzification processing in S41, and carrying out longitudinal fuzzy logic reasoning on the side of the brain-controlled vehicle;
s43, performing defuzzification according to the fuzzy inference result, and outputting the change quantity of the steering wheel angle of the vehicle and the acceleration of the vehicle;
the blurring operation of the result of the blurring inference mentioned in S43 employs the mean-gravity-center method.
The fuzzy logic module is established through the fuzzy logic interface and the fuzzy logic structure, and the originally discrete command set is converted into the continuously distributed command set, so that the operation mode of a driver is more flexible; meanwhile, the probabilistic output interface can reduce the cost of the process of correcting errors when classification of the electroencephalogram signals is wrong, and the control precision is finer.
Example 2:
referring to fig. 2-6, the basic difference between theembodiments 1,
the overall control framework is composed of a driver, a probabilistic output interface, an adaptive control interface, an MPC auxiliary controller and a controlled vehicle, as shown in FIG. 2.
Making a decision by a driver according to the current road vehicle information, and sending out a corresponding electroencephalogram signal; the probabilistic output calculates a corresponding probability value according to the quality of the electroencephalogram signal; the fuzzy logic interface outputs a signal with the minimum error cost according to the error information, and fine adjustment is carried out according to the environment information, so that the control precision is finer.
Referring to fig. 3-5, the experimental paradigm of the electroencephalogram signal selected by the present invention is five instructions selected for Steady State visual Evoked Potential (EEVEP), which correspond to five different stimulation frequencies, namely acceleration, deceleration, start-stop, left turn, and right turn.
In order to reduce the workload of the driver, the invention introduces commands in an uncontrolled state. The command is not the evoked stimulus of the SSVEP, so training is required before testing, and experimental data of the subject is collected.
After the traditional CCA processing, the classification with the maximum correlation coefficient is directly selected as output.
At a certain moment, the correlation coefficient obtained after the acquired electroencephalogram signals are processed by CCA is rho ═ rho1 ρ2 ρ3ρ4 ρ5]Where ρ isiAnd indicating the CCA processing result of the ith instruction corresponding to the current time.
The fitting probabilistic output model adopts a logistic regression method, and the expression is as follows:
wherein, and B are parameters to be fitted; ρ is the corresponding correlation coefficient; p is the probability of the final output.
The fitting process employs minimization of a cross entropy loss function:
in the formula, tiIs a label thereof; t isti1 indicates that the ith sample belongs to such an instruction; t isti0 means that the ith sample does not belong to such an instruction.
The SSVEP output middle start-stop command can affect the start and stop functions of the automobile, namely the start-stop command corresponds to a boul type variable and has higher priority than other 5 commands, and therefore, a built-in counter is designed. Wherein count satisfies the condition: 0 is more than or equal to count and is less than or equal to k. And when the start-stop command is activated, adding 1 to the count, otherwise, subtracting 1, resetting when the count reaches k each time, and changing the start-stop state of the automobile.
A simplified diagram of a fuzzy logic interface is shown in fig. 4. The fuzzy logic interface comprises fuzzification, fuzzy logic reasoning and defuzzification. The fuzzification contains five inputs: left turn, right turn, acceleration, deceleration, hold; comprises two output quantities: the amount of change Δ θ in the steering angle, and the acceleration a. The membership function of the input quantities is shown in fig. 5.
The membership functions of the five input quantities are the same, each instruction comprises two membership functions of H and L, and after fuzzification, the probability of each instruction is converted into two corresponding membership of an H and L fuzzy set. The membership function uses an S-type function and a Z-type function.
And logically reasoning the membership function of each input quantity to meet the following principle: logic or taking the maximum value of the membership degree of the logic or the maximum value of the membership degree of the logic or the membership degree of the logic or the maximum value of the logic or the membership degree of the logic or the maximum value of the logic or the membership degree of the logic or the maximum value of the logic or the membership degree; taking the minimum value of the membership degrees of the logic AND and the AND; the logic is not to take 1 and the membership difference. Fuzzy logic reasoning in the text adopts AND logic, and a specific reasoning process is made into a table display as shown in a table 1 and a table 2.
TABLE 1 longitudinal fuzzy logic
TABLE 2 side fuzzy logic
In table 1, GF indicates a longitudinal non-control command (i.e., constant speed travel indicates a state where the acceleration is close to 0); SU, SD represent acceleration and deceleration commands, respectively. In table 2, GF indicates a lateral non-control command (i.e., the steering wheel angle does not change from the previous time), and R and L respectively indicate left-turn and right-turn commands.
The defuzzification adopts an average gravity center method. And solving the output quantity membership degree obtained by inference through an average gravity center method to obtain the output quantity.
u(t)=u(t-1)+Δu(t) (6)
In the formula, xθIs the abscissa, x, of the corner portion of the steering wheelaThe abscissa of the acceleration portion. f (-) is a membership function of the output quantity, as shown in FIG. 6.
The left side represents a membership function of the steering angle of the steering wheel of the vehicle, and the right side represents a membership function of the acceleration of the vehicle; the obtained steering wheel angle and acceleration of the vehicle can be used as input quantities of other auxiliary controllers.
The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art should be considered to be within the technical scope of the present invention, and the equivalent replacement or change according to the technical solution and the modified concept of the present invention should be covered by the scope of the present invention.