0
\$\begingroup\$

I am writing an application that will maintain heart rate within a specified range by adjusting the amount of work required on a turbo trainer.

I could cobble together something that would gradually increase resistance until heart rate reached the right level but I imagine reaching the desired heart rate quickly, not overshooting and maintaining it might not be a trivial exercise.

I imagine that this problem has been solved many times before and I was hoping for a relatively simple algorithm that I can implement without spending a long time fine tuning and improving it.

\$\endgroup\$
3
  • \$\begingroup\$ It has probably been "solved" many times before by every company that makes training equipment. How well they solved it is a different question. I used to go to a gym that had crosstrainers made by two different manufacturers. One would keep jacking up the load to try to get my pulse rate up. The other would at some point stop raising the load - the reduced load would cause my heart rate to skyrocket. The load didn't bother me at all, but being able to move fast drove my heart rate through the roof. \$\endgroup\$
    – JRE
    Feb 8 at 12:10
  • \$\begingroup\$ The point being that people are different. What works well with one person may be exactly the wrong thing for another. \$\endgroup\$
    – JRE
    Feb 8 at 12:11
  • \$\begingroup\$ On the one machine, I could pump away for an hour at the highest load with a decent heart rate and getting a good workout. On the other, I'd have to either take breather breaks or else intentionally pump slower at low load - and get pretty much no excercise out of it \$\endgroup\$
    – JRE
    Feb 8 at 12:20
0
\$\begingroup\$

This is not an 'engineering' problem, but a human factors problem.

Presumably you want people to like using your machine. That means implementing lots of algorithms, or at least tuning for them, and trying them out on a wide range of people.

Some may prefer the feel of a PID where the goal is to get a steady work rate for a given heart rate, some may prefer a much simpler system that switches abruptly between a stressing level and a coasting level, perhaps with some time delay.

Probably you'll need to provide both, and a few more, for people to select betwee, depending on how they're feeling.

\$\endgroup\$
1
  • \$\begingroup\$ It is most likely to just be me that uses it to be honest. I was planning on allowing people to set max power, min power and interval which would allow them to control the experience to some degree. \$\endgroup\$
    – Roaders
    Feb 9 at 8:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.