Friday 20 February 2015

Haptic device force feedback control optimisation using PID

I am developing a force-haptic device that displays the force of virtual simulated juggling balls to a user's hands.  The system tracks the users hands using a Wii remote infrared camera, and the tracked positions of the hands control hand game-objects that interact with virtual juggling balls.  The force is calculated and fed into a feedback control system, the output of which controls a motor which is coupled to the user's hands via chords.  

Here is a block diagram to make it clearer.


The feedback control is particularly tricky.  A proportional-integral-differential (PID) negative feedback controls the motor.  In addition, the position of the hand also feeds into the system.



The motor can be seen attached to a 3D printed mount with pulley and string, mounted on a weight which is on top of some hacked kitchen scales.  The scales sensor output is amplified by an instrumental amplifier before being fed to an Arduino, and ultimately to the virtual reality (VR) simulation program.  The amplifier gain is controlled using a variable resistor, and uses capacitors to remove high-frequency noise.  The simulation calculates the required signal and outputs via the Arduino and motor controller to the motor. 




In the picture below, the Nintendo Wii remote (IR camera) and infrared illuminator can be seen balancing on an oscilloscope, which is used to look at the output of the force-sensor.




The user holds a (low weight) ball with retroreflector for tracking via the Wii remote and string attached for coupling to the haptic feedback via the motor.




Thanks to Sean Shao-An Tsai, a masters student at KMD, for designing and 3D printing the motor's mount.




At the moment there are several places that require improvement.  The feedback system's gain parameters need to be optimised.  Laggy components in the system must be minimised.  The main laggy components are currently, I think, the springyness of the string coupling the motor to the user's hands, the weight/force-sensor which acts like a mass-spring combination, and the Unity software and frame rate (which is limited by serial communications between Arduino and Unity).  I plan to mitigate by getting a stiffer string (suggestions welcome, please comment below), designing the weight out of the force-sensor system, and moving some of the feedback loop calculations into the Arduino itself, thereby increasing the rate at which the output to the motor is calculated, and allowing some software-level control of averaging and smoothing.

Any suggestions, etc, please comment below!

No comments: