algorithm of electrical stimulation haptics