© 2025 The authors. This article is published by IIETA and is licensed under the CC BY 4.0 license (http://creativecommons.org/licenses/by/4.0/).
OPEN ACCESS
In this research proportional-integral, sigmoid function of neural network and fuzzy logic controllers is used with pacemaker for heart-rate regulation. It based on second-order model of pacemaker with system of beat-rate sensor. Heart Rate regulation is a challenging problem with newest economic impact around the world. To take use of the nonlinear elements involved in heart rate control, a physical system theory for pacemakers was developed. A reliable control strategy based on artificial intelligence is proposed for adjusting controller parameters in order to obtain optimal tracking performance. Three controller structures are proposed to focus on the optimality in control the process. The three types of peacemaker controller comparisons have been made between performance parameters for proposed controllers. The obtained results with fuzzy logic controller show the best improvement with zero overshoot (Mp), 0.45 sec. of rising time (tr), 0.8 sec.
P-I controller, sigmoid function of neural network, fuzzy logic controller, heart-rate regulation
Cardiac illnesses provide significant health hazards and obstacles. Researchers have created a systems-based pacemaker design that depends on activity inherent characteristics of heart for enhancement patient outcomes by guaranteeing greater performance and flexibility. Coronary artery disease and tachycardia constitute two common heart conditions that cause dyspnea, syncope, and occasionally even mortality [1, 2]. The American Heart Association describes a human adult's normal resting heartbeat to be (60-100 beats / minute). One form irregular rate is bradycardia. It occurs when a person drops below (50 beats / minute), which is lower than average. Bradycardia causes these signals to slow down or become blocked in some other way. Heart problems can be treated in several ways, including the most basic dietary to the most advanced cardiac transplants. Technology is developing quickly, providing a middle ground that is safer than heart transplantation but more effective than dietary alone. This can be accomplished by employing an electrical gadget that monitors cardiac activity and corrects any defect. Anderson [3] used reliable control strategy based on artificial intelligence is proposed for best cardiac activity. The performance capabilities of embedded devices obtained by interacting with digital input/output devices. Data measurements were obtained via software timing probes and through hardware. Pacemakers can be fitted in people of any age, including children, but are most often fitted in the over-60s.
Nowadays, many researchers have been creating heart-beat control PID controller, which is advised to a pacemaker according to the novel tuning methods [4-6]. Lu et al. [7] used online learning algorithms for controlling heart-rate. The suggested controller's usefulness and validity were empirically confirmed when it was compared to a traditional PI controller [7]. Shin et al. [8], proposed a fuzzy controller for heart rate using an artificial cardiac pacemaker to control temperature and oxygen consumption. A neuron fuzzy logic controller was proposed to investigate the rate-adaptive pacemaker by motion and oxygen consumption. The proposed neurone fuzzy inference (HR) demonstrates superior accuracy compared to alternative methods, such as the fuzzy lookup approach referenced in the study [8]. Many researchers have proposed a series of fuzzy logic control system for heart rate regulation. The certain algorithm presents obvious personalization with an efficient response to changes in heart rate based on the patient's physiological profile [9-11]. Neogi et al. [12] have been focusing on developing and examining a control system for heart rate regulation with pacemakers. The performance of the pacemaker determines the bondedness in operation, which is concentrated in the design. The results were obtained when a compensator is used in connection with the cardiac system’s cascade arrangement controlled by a pacemaker. This image shows device used for the remote monitoring of pacemaker patients that actually communicates with the pacemaker through the peripheral that is placed over the pacemaker in the patient's chest.
The human heart may be represented by numerous mathematical models. In the study [13], the authors represented a Nobel Model by illustrating and building according to the fundamental electrophysiological principles driving ion channel dynamics. With this improvement, ionic currents may be shown in more detail, better illustrating the intricate relationships between excitation and conduction in the unique cardiac conduction system [14]. Beeler and Reuter [15] described an electrical behaviour of ventricular myo-cardial cell. Furthermore, the action potential behaviour of the Sino Atrial (SA) nodal cell is the UNI model [16-18]. The conductance and ionic currents of each of these Hodgkin-Huxley (HH) type models are represented. Control systems are generally constituted and analysed using mathematical models to characterize the behaviour of the electrical, mechanical, physical, or physiological systems [19].
In this work, simulation of the heart rate controllers designed using three types of controllers i.e. Different methods to system control are provided by the P-I controller, Neural Network (NN) controller, and fuzzy logic controller (FLC), which vary in complexity, flexibility, and application applicability. The P-I controller reduces steady-state error for linear systems by combining proportional and integral actions; nevertheless, it has trouble with extremely nonlinear dynamics The NN controller, on the other hand, uses machine learning to adjust to nonlinear and time-varying systems; this offers flexibility but comes with a high computational cost and training data need. Although it requires a more complicated design, the FLC is well-suited for complex systems without the need for an explicit mathematical model because it effectively manages uncertainty and imprecise inputs using fuzzy sets and linguistic conventions [20, 21]. System parameters, performance requirements and implementation viability all influence which of these controllers is optimal. The MATLAB program is used here for the system simulation.
The heart rate mathematical model is shown in Figure 1. Where G1 represent the controller transfer function and G2 is the heart rate transfer function. H(s) is the sensor feedback. In Figure 1, R(S) is the patient's actual heart rate, G1(S) is the type of controller, and G2(S) is the heart rate's transfer function. They allow an efficient closed loop control system for controlling a patient's heart rate. H(S) is sensor feedback, while Y(S) refers to the desired output.
Figure 1. Block diagram of controlled system
3.1 P-I controller
This section will introduce the P-I controller design, which will apply to the heart rate regulator system. Fundamental algorithms have been employed by proportional-integral controllers to generate excellent reliability and stability margins. The controllers adjust the system’s control input. The constant coefficient of P-I controller should be tuned based on the characteristic of the system with the noise [22]. The P-I controller contains two main variables: gain (Kp) gain (Ki). Eq. (1) illustrates the total P-I controller [23].
$\begin{gathered}G_1(\mathrm{~s})=\mathrm{K}_{\mathrm{P}} \cdot \mathrm{E}(\mathrm{s})+\frac{\mathrm{K}_{\mathrm{i}}}{\mathrm{s}} \cdot \mathrm{E}(\mathrm{s}) \\ G_1(\mathrm{~s})=\mathrm{K}_{\mathrm{P}}\left(1+\frac{\mathrm{K}_{\mathrm{i}}}{\mathrm{k}_{\mathrm{p}} \mathrm{s}}\right) \mathrm{E}(\mathrm{s})\end{gathered}$ (1)
Tuning the controller is essential to setting the starting values for the PI controller parameters. This entails modifying the $\mathrm{K}_{\mathrm{P}}$, and $\mathrm{K}_{\mathrm{i}}$ constants. Both transient and steady-state measurements can be used to evaluate the controller's efficiency. P-I controller is inserted into the forward path to regulate the heart rate as shown in Figure 2.
Figure 2. P-I controller is inserted into the forward path to regulate the heart rate
To mention the values of KP and Ki many methods of tuning can be obtained. The suggested method is particle swarm optimization method [24]. By using MATLAB tuning method of the KP and Ki parameters using particle swarm optimization method we get 0.95 and 0.001 respectively.
3.2 Neural network controller
Neural network applications enable intelligent controllers to handle uncertainties and nonlinearities in control systems. By using a sigmoidal function of neural network controller in feed forward path the dynamic system response can be enhanced (Figure 3) where neural network sigmoid function is inserted to regulate the heart rate.
Figure 3. Neural network sigmoid function is inserted to regulate the heart rate
A sigmoidal function with the conventional P-I controller, increases performance and flexibility while managing the dynamics of complicated system.
$\mathrm{u}(\mathrm{t})=\left(\frac{2}{1+\mathrm{e}^{-\mathrm{Ks} \cdot \mathrm{q}(\mathrm{t})}}-1\right) K_a$ (2)
where, $q$ represent a controlled signal of sigmoid function $K_S$. $K_a$ is the gain amplifier. Figure 4 shows the sigmoid function construction [24]. If heart rate is in beats/min, scaled heart rate variable is:
$\mathrm{H}(\mathrm{t})=\left(\frac{h-h min }{h max -h min }\right)$ (3)
The heart rates are, $h, h max$ and $h min$ are prescribed measured, maximum and minimum heart rates with unity scaling [25].
Figure 4. System with P-I controller
3.3 PI and FLC design
This section will introduce the PI-FLC design, which will apply to the heart rate regulator system. For the stability of the controller leads to mention that the values of $K_P$, and $K_i$ equal to 1.2 and 0.2 respectively.
3.3.1 Formation of decision-making procedure
Mamdani and Assilian initially constructed the FLC based on Lotfi A. Zada’s fuzzy set theory-generalized FLC [26]. Figure 5 illustrates FLC block diagram which consists four basic elements:
Figure 5. The schematic of fuzzification and defuzzification process
3.3.2 Fuzzy logic controller
Figure 6 presents the controller with optimized 49 rule-bases (each I/P are of 7 MFs).
The simulation uses multiple trigonometric membership functions with a sum/product inference scheme on zero-degree Takagi-Sugino output functions. The output sets are singular values. A weighted average defuzzification method is used to compute the final output value, from i = 1 to R output subsets, zi, weighted by the input fuzzy set membership values, µj, for j = 1 to n [26]. Seven triangular membership function (MF) as shown in Figure 7. Where the Figure 7(a) input for error function (ER), Figure 7(b) input for change of error function (CER) and Figure 7(c) is the output function (U).
Figure 6. Block diagram for the system with fuzzy logic controller
(a)
(b)
(c)
Figure 7. Regulator and fuzzy membership function
The effective universe of discourse is given by the range [-1 1] for the error (ER) and [-1 1] for the change of error (CER) and [-1 1] for the output. The shown linguistic values for those MF's are for I/P and O/P. Table 1 shows the rule base for the optimaized FLC for 49-rules.
Table 1. Rule-base table for 49-rules
ER/CER |
NB |
NM |
NS |
ZE |
PS |
PM |
PB |
NB |
PB |
PM |
PM |
PS |
ZE |
PM |
PS |
NM |
PM |
PM |
PS |
PB |
PS |
ZE |
NS |
NS |
PM |
PS |
ZE |
PS |
NS |
NM |
NB |
ZE |
PB |
PM |
PS |
ZE |
NS |
NS |
NM |
PS |
PM |
ZE |
ZE |
NS |
NM |
NB |
NB |
PM |
ZE |
NS |
NM |
NB |
NS |
NM |
NB |
PB |
NM |
NB |
NS |
NM |
ZE |
PS |
NB |
In this section we will show the response of heart rate system without controller and with three types of controllers that we were built in Section 3. By comparing the results between them the optimal controller is obtained according to the parameters (steady-state error, rise time, settling time and maximum overshoot). Simple functional process shown in Figure 8.
Figure 8. Simple functional process
Firstly, a program used to find the response of closed loop system to a step input without any controller whose transfer function is given by:
$\mathrm{G}(\mathrm{s})=\frac{1}{s^2+0.7 s+1}$
The result as shown in Figure 9.
Figure 9. System response
The performance parameters for the system response are: Steady state error Ess = 0.5, rise time tr = 2.38 sec. for 10% & 90 rise, settling time ts= 2.374 sec. at 2% and maximum overshoot Mp = 0.75, this indicates that the system has poor transient response, slow and undesirable overshoot, and large steady state error.
a- Simulation using P-I controller
With adjustable parameters of P-I controller using practical swarm optimization technique for proportional and integral gain optimization [27], it is noticed that the simulation results with proposed controller can follow the desired input value. Figure 10 shows a step-response for PI control system with controller parameters $\mathrm{K}_{\mathrm{P}}=1.2 \quad$ and $\mathrm{K}_{\mathrm{i}}=0.2$. The performance parameters for system response are:
Steady-state error (Ess) = 0.2, rise time (tr) = 1.6 sec. for 10% & 90 rise, settling time (ts) = 12 sec. at 2% and maximum overshoot (Mp) = 0.31. This indicates that the system is slow and has high overshoot and steady-state error.
Figure 10. Step-response using P-I controller
b- Neural network sigmoid function effect
The simulation results using neural network sigmoid function to control the proposed system compared by P-I controller presented in Figure 11.
Figurer 11. Step-response of neural network sigmoid function
The neural control system exhibited smoother responses with fewer variations. More accurate and consistent heart rate regulation resulted from the large reduction of overshoot and the elimination of steady-state error. Figure 12 shows the response obtained by a neural network with different values of sigmoid function gain.
Figure 12. Step-response of the NN controller with different values of sigmoidal function λ
By increasing sigmoid function gain it is noticed that the response can be enhanced with lower rise time with a low effect of increased overshoot value. Figure 12 shows an effect for NN controller where the closed loop step response system parameters are:
Ess = 0.1, tr = 4 sec. for 10% & 90 rise, ts = 16 sec. at 2% and Mp = 0.05 (5%) at tp = 7.4 sec.
Indicates that the system is slow and have an overshoot.
c- Fuzzy controller effect
The fuzzy controller implemented to the system. The coefficient Kp and Ki and are tuned by PSO for the best desired response and they were 1.2 and 0.2 respectively. Then, a fuzzy controller program with 7 triangular MFs for I/P & O/P (input and output) with 49 rules. The rule base for the optimum FLC scaling factors g0 and g1 were tuned for the best desired response, [g0=0.1 and g1=0.2] with K=-80. The response after added FLC as the following:
Mp = 0%, tr = 0.45s, ts = 0.8s, and Ess = 0.
Figure 13 shows the response obtained by added FLC.
Figure 13. Step-response of the fuzzy controller
A good response parameter obtained by using 49-rule fuzzy controller from the result obtained by Figure 13.
By choosing the optimised integrals gain value. The response after added FLC as the following (Figure 14):
Figure 14. Step-response of the FLC 49-rules control system with different values of Ki
The obtained results are, Mp = 0%, tr varied according to values of Ki from 0.45s, to 2,5 seconds and settling time ts is varied from 0.8s, to 6 seconds, and Ess=0.
Table 2 summarized the step response for the desired system with PI, NN and FLC controllers.
Table 2. Step response for the heart rate regulator with different controller types
Step Response/Type of Controller |
Mp |
tr/sec. |
ts/sec. |
Ess |
Without controller |
0.75 |
2.3 |
2.374 |
0.5 |
PI |
0.31 |
1.6 |
12 |
0.2 |
NN |
0.05 |
4 |
16 |
0.1 |
FLC |
0 |
0.45 |
0.8 |
0 |
The objective in evaluating their performance was to determine the best strategy for developing a heart rate regulation system. According to the analysis, the FLC outperformed the others, by eliminating steady-state error and having the smallest rising time (0.45 sec), shortest settling time (0.8 sec), and no overshoot. The NN controller was less appropriate for fast-response applications since it required 16 seconds to attain stability while successfully reducing overshoot. The FLC is the most efficient option when comparing the proposed controllers since it achieves an acceptable compromise between stability, accuracy, and speed of response. It is a good challenger for practical uses due to its capacity to manage changes in heart rate dynamics.
Deep reinforcement learning (DRL) suggested as future work based multi-instance model for enhanced Heart failure (HF) and timely diagnosis for effective management.
The authors would like to thanks University of Technology, Baghdad, Iraq for the assistance in completing this work.
[1] Dutta, S.M., Ghorbel, F.H. (2005). Differential hysteresis modeling of a shape memory alloy wire actuator. IEEE/ASME Transactions on Mechatronics, 10(2): 189-197. https://doi.org/10.1109/TMECH.2005.844709
[2] Shi, W.V., Zhou, M. (2013). Optimal single-pulse for pacemakers based on a sinoatrial model. IEEE/ASME Transactions on Mechatronics, 18(1): 348-354. https://doi.org/10.1109/TMECH.2011.2176745
[3] Anderson, K.P. (2005). Sudden cardiac death unresponsive to implantable defibrillator therapy: An urgent target for clinicians, industry and government. Journal of Interventional Cardiac Electrophysiology, 14: 71-78. https://doi.org/10.1007/s10840-005-4547-9
[4] Arunachalam, S.P., Kapa, S., Mulpuru, S.K., Friedman, P.A., Tolkacheva, E.G. (2016). Intelligent fractional-order PID (FOPID) heart rate controller for cardiac pacemaker. In 2016 IEEE Healthcare Innovation Point-Of-Care Technologies Conference (HI-POCT), Cancun, Mexico, pp. 105-108. https://doi.org/10.1109/HIC.2016.7797708
[5] Azzawi, H.A., Ameen, N.M., Gitaffa, S.A. (2023). Comparative performance evaluation of swarm intelligence-based FOPID controllers for PMSM speed control. Journal Européen des Systèmes Automatisés, 56(3): 475-482. https://doi.org/10.18280/jesa.560315
[6] Kadhim, N.N., Abood, L.H., Abd Mohammed, Y. (2023). Design an optimal fractional order PID controller for speed control of electric vehicle. Journal Européen des Systèmes Automatisés, 56(5): 735-741. https://doi.org/10.18280/jesa.560503
[7] Lu, C.H., Wang, W.C., Tai, C.C., Chen, T.C. (2016). Design of a heart rate controller for treadmill exercise using a recurrent fuzzy neural network. Computer Methods and Programs in Biomedicine, 128: 27-39. https://doi.org/10.1016/j.cmpb.2016.02.009
[8] Shin, J.W., Yoon, J.H., Yoon, Y.R. (2000). A study on the rate-adaptive pacemaker by motion and respiration using neuro-fuzzy. In Proceedings of the 22nd Annual International Conference of the IEEE Engineering in Medicine and Biology Society, Chicago, IL, USA, pp. 992-994. https://doi.org/10.1109/IEMBS.2000.897890
[9] Jaworski, Z., Kuzmicz, W., Sadowski, M., Sarna, D., Walkanis, A., Wielgus, A., Wojtasik, A. (2000). VLSI implementations of fuzzy logic controllers for rate-adaptive pacemakers. In 1st Annual International IEEE-EMBS Special Topic Conference on Microtechnologies in Medicine and Biology. Proceedings, Lyon, France, pp. 475-478. https://doi.org/10.1109/MMB.2000.893829
[10] Bansal, D., Khan, M., Salhan, A.K. (2009). A computer based wireless system for online acquisition, monitoring and digital processing of ECG waveforms. Computers in Biology and Medicine, 39(4): 361-367. https://doi.org/10.1016/j.compbiomed.2009.01.013
[11] Werner, J., Hexamer, M., Meine, M., Lemke, B. (1999). Restoration of cardio-circulatory regulation by rate-adaptive pacemaker systems: The bioengineering view of a clinical problem. IEEE Transactions on Biomedical Engineering, 46(9): 1057-1064. https://doi.org/10.1109/10.784136
[12] Neogi, B., Ghosh, R., Tarafdar, U., Das, A. (2010). Simulation aspect of an artificial pacemaker. International Journal of Information Technology and Knowledge Management, 3(2): 723-727.
[13] Noble, D. (1962). A modification of the Hodgkin—Huxley equations applicable to Purkinje fibre action and pacemaker potentials. The Journal of Physiology, 160(2): 317-352. https://doi.org/10.1113/jphysiol.1962.sp006849
[14] McAllister, R.E., Noble, D., Tsien, R.W. (1975). Reconstruction of the electrical activity of cardiac Purkinje fibres. The Journal of Physiology, 251(1): 1-59. https://doi.org/10.1113/jphysiol.1975.sp011080
[15] Beeler, G.W., Reuter, H. (1977). Reconstruction of the action potential of ventricular myocardial fibres. The Journal of Physiology, 268(1): 177-210. https://doi.org/10.1113/jphysiol.1977.sp011853
[16] Yanagihara, K., Noma, A., Irisawa, H. (1980). Reconstruction of sino-atrial node pacemaker potential based on the voltage clamp experiments. The Japanese Journal of Physiology, 30(6): 841-857. https://doi.org/10.2170/jjphysiol.30.841
[17] Keener, J.P., Sneyd, J. (1998). Mathematical Physiology. New York, NY, USA: Springer.
[18] Liu, X.H., Chen, X.H., Zheng, X.H., Li, S.P., Wang, Z.B. (2014). Development of a GA-Fuzzy-Immune PID controller with incomplete derivation for robot dexterous hand. The Scientific World Journal, 2014(1): 564137. https://doi.org/10.1155/2014/564137
[19] Yadav, J., Rani, A., Garg, G. (2011). Intelligent heart rate controller for cardiac pacemaker. International Journal of Computer Applications, 36(7): 22-29.
[20] Ali, A.A., Kaleel, A.H., Abbas, N.H. (2025). Decision-making model for aircraft landing based on fuzzy logic approach. Journal Européen des Systèmes Automatisés, 58(2): 329-336. https://doi.org/10.18280/jesa.580213
[21] Salleh, Z.M.T., Alsammak, A.N.B., Mohammed, H.A. (2024). Enhancing power system transient stability using static var compensator based on a fuzzy logic controller. Journal Européen des Systèmes Automatisés, 57(6): 1565-1572. https://doi.org/10.18280/jesa.570603
[22] Issa, A.H., Mahmood, S.A., Humod, A.T., Ameen, N.M. (2023). Robustness enhancement study of augmented positive identification controller by a sigmoid function. IAES International Journal of Artificial Intelligence, 12(2): 686. https://doi.org/10.11591/ijai.v12.i2.pp686-695
[23] Copot, C., Muresan, C.I., De Keyser, R. (2013). Speed and position control of a DC motor using fractional order PI-PD control. In 3rd International Conference on Fractional Signals and Systems (FSS-2013).
[24] Mahmood, S.A., Humod, A.T., Issa, A.H., Ameen, N.M. (2023). Robust AVR based on augmented PI controller for synchronous generator. AIP Conference Proceedings, 2804(1): 030005. https://doi.org/10.1063/5.0154585
[25] Alvarez-Rodríguez, S., Taleb, M., Peña-Lecona, F.G. (2024). An adaptive solution for sliding mode controllers based on PID tuning gains. International Journal of Control, Automation and Systems, 22(11): 3409-3423. https://doi.org/10.1007/s12555-024-0167-y
[26] Ross, T.J. (2005). Fuzzy Logic with Engineering Applications. John Wiley & Sons.
[27] Yahya, A.A., Ameen, N.M., Juhi, H.H., Mahmood, S.A. (2025). PMDC motor control using pulse width modulated speed sensor design and implementation. AIP Conference Proceedings, 3169(1): 040071. https://doi.org/10.1063/5.02541