Maximizing healthy life expectancy is essential for enhancing well-being. Optimal exercise intensity is crucial in promoting health and ensuring safe rehabilitation. Since heart rate is related to exercise intensity, the required exercise intensity is achieved by controlling the heart rate. This study aims to control heart rate during exercise by dynamically adjusting the load on a bicycle ergometer using a proportional-integral (PI) control. The choice of PI parameters is very important because the PI parameters significantly affect the performance of heart rate control. Since the dynamic characteristics of heart rate relative to work rate vary widely from subject to subject, the PI parameters for each subject must be determined individually. In this study, PI parameters are optimized directly from exercise data using a data-driven design approach. Thus, the proposed method does not require excessive exercise of the subject to model heart rate dynamics. Using the proposed method, the heart rate can be controlled to follow a designed reference model so that the heart rate is safely increased to the desired value. The quantitative evaluation of the control results of fifteen healthy volunteers confirmed that the proposed method improved the control error of the target heart rate trajectory by approximately 40%, regardless of gender or age. In addition, it was shown that control parameters from the exercise experiment also indicate that females are more likely than males to have an elevated heart rate at the same load.