Text this: A Closed-Loop Brain Stimulation Control System Design Based on Brain-Machine Interface for Epilepsy