Brainstorming - Visual Evoked Potential Based PID Controller
This is an attempt to brainstorm the use of Visual Evoked Potentials (VEP) in the brain to control a system. Here in this case, I am assuming the system to be a Wall Follower. I am planning to use a toy car which follows the wall to be controlled by PID controller algorithm. The VEP waveform looks like below.
As we can see, it has positive peak and negative peak. If there is some way to measure the amplitude of these peaks and convert them into power (positive or negative), we can feed that power back into the toy car and the toy car should follow the wall. Below is a little algorithm which shows the use of PID controller using VEP.
while(true) {
Variable Power = getVEPBasedPower();
Error = Variable Power - getSSVEPBasedPower();
Integral = Error + Integral;
Derivative = Error - LastError;
Correction = Kp * Error + Kd * Derivative + Ki * Integral;
PowerToLeftMotor = Reference Power + Correction
PowerToRightMotor = Reference Power - Correction
LastError = Error;
}
while(true) {
Variable Power = getVEPBasedPower();
Error = Variable Power - getSSVEPBasedPower();
Integral = Error + Integral;
Derivative = Error - LastError;
Correction = Kp * Error + Kd * Derivative + Ki * Integral;
PowerToLeftMotor = Reference Power + Correction
PowerToRightMotor = Reference Power - Correction
LastError = Error;
}
Comments
Post a Comment