Various investigations that have used electrical stimulation systems for tissues and cell cultures have reported biochemical effects [1 - 4]. These studies show that, with square, exponential and/or synodal waveforms applied to a cell group, different biological responses are obtained . However, waveforms analogous to cellular response have not been thoroughly studied, therefore the effects on cellular metabolism of applying a time-varying electric field are largely unknown. For example, in open-angle glaucoma, it was found that a specific waveform can lower IOP . Low frequency electric fields are known to evoke polarization of the cell membrane, cytosol, and other charged proteins , however, the effects on cell metabolism for various electric fields are not clear. The experimental data demonstrated that the reactions in the stimulation of tissues and/or cell cultures are proportional to the type of waveform applied, as well as the parameters of amplitude, duration and frequency [1 , 2 , 4 , 7]. Different stimulation devices have been designed and built in the past decade [1 - 3 , 7]. However, these devices do not have a monitoring system for the transmission of electrical signals in biological bodies. Therefore, it is not certain whether the signal applied in stimulation undergoes any change when a cell body is stimulated. By not having a clear study of the effects of stimulation with unconventional waveforms, there is a danger of causing counterproductive reactions in tissues or organs where said stimulation is applied, without knowing the consequences of these effects due to the few or no studies on the metabolic effect in the face of undefined electric fields.
In previous works by Feliz Gill et al. , it was found that a specific waveform is possible to lower intraocular pressure in patients suffering from open-angle glaucoma. The correct operation of the device that generates these signals guarantees the adequate treatment of this pathology. In the present work, a control system is exposed to manage these stimulation equipment.
The proposed system conserves the electric fields through mathematical equations that describe them and are stored through a database on a server. These equations are generated through a software I carry out for this purpose and the study of various channelopathies . With this method of transmitting the action potential by mathematical functions corresponding to the therapy to be treated, the quantization noise generated by storing discretized values of an action potential in memory locations is minimized.
The way to transmit these mathematical equations stored on the server to the medical device is through a mobile application APP that is interlinked with the server through the communication protocol SOAP (Simple Object Access Protocol), as seen in Figure 1. This application also establishes an interface for the patients of the treatment and the doctor in charge of it. The APP is linked by means of the bluetooth communication protocol to the medical device to transmit the mathematical equations corresponding to the therapy, and with this, the electric field generator will be able to create its own action potential characterized particularly by each patient through the proposed control system.
Figure 1. Operation of the Control System. The stimulation devices connect via Bluetooth or USB to the mobile application, which will transmit data via Wi-Fi or 4G network to the server.
3. PROTECTION MEASURES FOR CORRECT SIGNALING
Before the specific electric field generating system comes into operation and its output port is activated, a pilot action potential is generated inside the device and is monitored by means of an analog-digital converter, to be transmitted to the control system. The waveforms generated by each device are compared by the service with the waveform corresponding to the specialized mathematical equation for therapy , for this, the error function is created that is shown in Equation (1).
with this error function, we can find the mean square error, raising it to the square to later integrate it and dividing it into the intervals where this error exists, see Equation (2).
It should be noted that the functions and are discrete functions and therefore the error function as well. Consequently, the mean square error becomes a summation of the difference of and , as observed in Equation (3).
The time interval depends on the duration of the signal generated in the medical device and is represented by the number of samples N and their sampling period T, if the result of Equation (3) is greater than 0.03, the web service will not send authorization to activate the output port of the assigned electric field generator in therapy. With this protection methodology, the system guarantees the correct generation of the waveform corresponding to each treatment. The battery energy levels of the devices are also controlled so that with them the necessary amplitudes of each waveform are guaranteed during their reproduction, so action potentials will not be generated if the device battery does not have at least 90% of its energy storage capacity, to ensure that the root mean square error does not exceed 0.03 when the device is reproducing the action potential.
The data of each therapy session is stored in a history within a database. The way to see the effects of IOP in open-angle glaucoma on the electric fields applied to each patient is studied by acquiring the pressures of each one of them, which is obtained by the ophthalmologist in charge and stored in the server. These pressures are plotted during the duration of the treatment to see the evolution of the patient as shown in Figure 2, in addition to evaluating the effectiveness of each equation and its characterization.
The web service was in the research protocol phase in the Association to Avoid Blindness APEC, located in the Hospital “Dr. Luis Sánchez Bulñes” where 38 patients were registered on the web platform, of which 19 suffer from open-angle glaucoma, 17 retinitis pigmentosa and two from macular degeneration. In addition, to register 50 computers, to monitor the operation of the database, the web interface and the mobile application.
The simulated treatment events were recorded in the database, which saves the date and time of the discretized data of the signal before its execution, as shown in Table 1. To verify the correct operation of said control, they tested three different types of signal, with high, medium and low noise interference, to identify the effectiveness of the mean square error evaluation.
The signal delivered by the system to compare and verify the waveform, in this case, a test signal, is represented in Figures 3(a)-5(a). The high noise signal delivered by the stimulation equipment is shown in Figure 3(b), the medium noise signal in Figure 4(b) and the low noise signal in Figure 5(b).
The high noise test signal is shown in Figure 3(b) could represent the worst case of a therapy during electrical stimulation. In this case, the mean square error was greater than 0.9, consequently the system did not activate the output port of the stimulation equipment for the treatment of the patient.
Figure 2. Graph of intraocular pressure on the tests performed by the software on a simulated patient.
Figure 3. Web system tests where a comparison is made between the signal sent to the server to the stimulation equipment (a), and the response signal that the stimulator sends to the server during electrical stimulation therapy for pigmentary retinitis (b).
The mean noise test signal depicted in Figure 4(b) is likewise not the appropriate waveform for electrical stimulation therapy. Its mean square error value was greater than 0.19, therefore, as in the first case, the system did not grant any authorization either.
Figure 4. Web system tests, where a comparison is made between the signal sent to the server to the stimulation equipment (a), and the response signal that the stimulator sends to the server during electrical stimulation therapy for pigmentary retinitis (b).
Figure 5. Web system tests, where a comparison is made between the signal sent to the server to the stimulation equipment (a), and the response signal that the stimulator sends to the server during electrical stimulation therapy for pigmentary retinitis (b).
The test signal with low or no noise represented in Figure 5(b), is the ideal form of therapy with which a patient should be stimulated if it was designed for a particular treatment. In this test, a mean square error value less than 0.0001 was found, and consequently the system activated the medical device.
In tests carried out on storage energy levels in medical devices, it was found that the mean square error
Table 1. Table captured from the web system, which indicates the date and time the stimulation started as well as informing the type of user who performed the stimulation therapy.
Figure 6. Graphs of the ideal signal to reproduce and the real signal that is reproduced in the stimulation devices at different levels of energization. (a) Graph that represents the signals and when the battery levels are between 90% to 100% charge. (b) Graph that represents the signals and when the battery levels are between 80% to 90% charged. (c) Graph that represents the signals and when the battery levels are between 70% to 80% charged.
changed proportionally to the charge of the batteries. For the first case with levels between 100% to 90% Figure 6(a), the mean square error is almost zero, but it increases as the energy storage of the batteries decreases, as can be seen in Figure 6(b) and Figure 6(c), to have an error of approximately 0.27 with a battery charge of 70%. However, the system is designed so that it does not reproduce the action potential with a mean square error greater than 0.03, therefore the devices will only be able to work if the energy is stable enough to establish the adequate time-varying electric field.
The control system presented in this article is intended to establish safety on electrical stimulation treatments in biological bodies. The methodology of guaranteeing the correct stimulation to patients suffering from open-angle glaucoma is subject to the continuous supervision of the waveforms applied for each session of the same. For this reason, the mean square error method is established, which quantitatively supports the veracity of the generation of adequate action potentials in the therapies of these pathologies. In addition, this system has the capacity to store relevant data on the monitoring of each patient, so that an analysis of the progress of the disease and the effectiveness of the stimulation systems can be established. Consequently, from the tests carried out and the data obtained on the mean square error, it is certain that the system is capable of preventing the generation of undefined and poorly studied electric fields, with this argument the safety in treatment on patients subjected to controllable electrical stimuli.
Studies of the effects of stimulation have shown to have a significant effect in the treatment of various pathologies related to specific ion channel dysfunction . The different signals coming from cell membranes in their communication processes establish the correct functioning of a given cell group . Poor cell signaling can cause various channelopathies . It is hypothesized that with electric fields, certain dysfunctions in specific ion channels can be reversed, leading to correct signaling and cellular communication and, therefore, proper functioning. The purpose of the proposed system is to maintain control of the electric fields that are applied to biological bodies subjected, in addition to monitoring the follow-up of the treatment of patients. Future work on this system is to generate a range of bio-sensors that report the health status of each patient in real time to have sufficient data and establish a clear certainty about the behavior of multiplex diseases such as angle glaucoma. Open at least clinically.
 Gil-Carrasco, F., Ochoa-Contreras, D., Torres, M.A., Santiago-Amaya, J., Pérez-Tovar, F.W., González-Salinas, R. and Niño-de-Rivera, L. (2018) Transpalpebral Electrical Stimulation as a Novel Therapeutic Approach to Decrease Intraocular Pressure for Open-Angle Glaucoma: A Pilot Study. Journal of Ophtalmology, 2018, Article ID: 2930519.
 Fujikado, T., Morimoto, T., Kanda, H., et al. (2007) Evaluation of Phosphenes Elicited by Extraocular Stimulation in Normals and by Suprachoroidal-Transretinal Stimulation in Patients with Retinitis Pigmentosa. Graefe’s Archive for Clinical and Experimental Ophthalmology, 245, 1411-1419.
 Kamiyama, Y., Wu, S.M. and Usui, S. (2009) Simulation Analysis of Bandpass Filtering Properties of a Rod Photoreceptor Network. Vision Research, 49, 970-978.
 Robles-Camarillo, D., Nino-de-Rivera, L., Quiroz-Mercado, H. and Lopez-Miranda, M.J. (2008) Waveform Generator System to Transcorneal Stimulation Based on a Digital Adaptive Model. 2008 5th International Conference on Electrical Engineering, Computing Science and Automatic Control, Mexico City, 12-14 November 2008, 207-211.
 Sahin, M. and Tie, Y. (2007) Non-Rectangular Waveforms for Neural Stimulation with Practical Electrodes. Journal of Neural Engineering, 4, 227-233.
 Schatz, A., Röck, T., Naycheva, L., Willmann, G., Wilhelm, B., Peters, T., Bartz-Schmidt, K.U., Zrenner, E., Messias, A. and Gekeler, F. (2011) Transcorneal Electrical Stimulation for Patients with Retinitis Pigmentosa: A Prospective, Randomized, Sham-Controlled Exploratory Study. Investigative Ophthalmology & Visual Science, 52, 4485-4496.
 Santiago, J., Romero, C., Guerrero, S., Trejo, F. and Robles, D. (2021) Bio-Informatic Model of Tyrosine Kinases Inhibitors in Trabecular Meshwork Cells. New Trends in Intelligent Software Methodologies, Tools and Techniques, Vol. 337, 351-358.