# A Novel Soft Robotic Exoskeleton System for Hand Rehabilitation and Assistance Purposes
## 2 Development of the SEG Device
### Development of the SEG Device's Software  
After the setup of the device's hardware, the next step is the development of the corresponding software for the proper function of the SEG device. The software is divided into two pieces; the control software that retrieves the control glove data and regulates the movement of the actuator, and the graphical user interface that allows communication between the SEG device and the patient or the healthcare professional. Then, these two pieces of software were integrated into one single software platform that operates the device via the user's commands. The control software consists of two parts: the applied software of the control glove and the control software employed for the electro-pneumatic system that regulates the motion of the actuators. The software of the control glove is relatively simple and is executed on the MCU of the glove's PCB. The main functionality is the detection of the finger's angular motion, the evaluation of the finger's angle, and the transmission of acquired data on the SEG device via the network. Figure 6a presents the main flowchart of the control glove's software. More specifically, the user activates the control glove when a measurement is required. The bend sensors capture the movement of the finger and detect the final angle of the motion (Stable Position-SP). When the SP is achieved, the control glove transmits the measurement to the main SEG device. It is noteworthy that the process could be performed repeatedly, and all measurements are saved on the main SEG device storage for potential use. On the contrary, the control software of the SEG is more complex and sophisticated. When the SEG device is activated, its main components are checked, i.e., bend sensors, electromagnetic valves, network connection, etc. ; then, the software scans for any received data from the control glove. If there are motion data, the control sequence is executed with the corresponding states for the valves, and the desired movement is achieved with the assistance of bend sensor measurements. Finally, the software informs the user of the outcome of the movement (success or failure). Figure 6b illustrates the flowchart of the SEG device control software. Furthermore, it is worth noting that the control of the electromagnetic valves is performed with a proportional integral derivative controller (PID). The PID controller's output is the percentage of time that the valve is activated for a predefined time period due to the valve's binary state, i.e., on or off. Thus, the controller regulates the valve's state depending on the desired goal angle. Moreover, the PID controller receives constant control feedback of the current angle from the bend sensors; hence it compares the current value and the goal value, and a difference value (error) is extracted. The controller minimizes that error based on the PID function protocol and the applied function coefficients [32; 33; 34]. The coefficients have been regulated with the empirical gain tuning achieving accurate and smooth motion without offset and overshoot errors. Figure 6c shows the experimental layout of the control and function tests (left side) coupled with the response diagram of control configuration over time (right side). Figure 5: (**a**) Illustration of flexion (**left side**) and extension (**right side**) of a single actuator coupled with the schematic diagram of the pneumatic circuit; (**b**) Overall pneumatic circuit coupled with the PCB configuration. Finally, the last part of the SEG's software is the graphical user interface (GUI) platform that facilitates the communication between the control glove and SEG with the user. The GUI application was developed in order to be able to function on commercial PCs and laptops; thus, it is compatible with the Microsoft Windows(tm) software platform. Also, the SEG device needs a simple WiFi connection in order to connect the control glove with the SEG and synchronize the acquired data.