0
\$\begingroup\$

In treadmill applications with DC motor, you can't go from 0.5 mph to 1 mph instantly. The speed should be gradually increasing. If I want to design a PID for speed control, my setpoint should be a ramp instead of steps, right? Or, I can give the setpoint in steps and the P gain adjust the time response of the system? Which one is the right approach? I think that once the final setpoint is reached as ramp, the PID controller should compensate the output for changes in the load. My feedback is a speed sensor that will tell the controller the actual speed. If I said my setpoint is 0.5 mph, the PID doesn't care if gave the setpoint as a ramp or step. Am I right?

\$\endgroup\$
1
\$\begingroup\$

Correct. If you use a PID controller with fixed gains and you ramp the command to it, then the loop characteristics will always be the same, and you'll attain your goal of ramping the speed up and down in a way that neither burns up the motor or trips the person on the treadmill.

\$\endgroup\$
  • \$\begingroup\$ So, the ramping can't be achieved by adjusting the time response of the system with the P gain? I just want to be sure because as far as I know, for me to achieve the speed ramping, I shoud use a ramp as setpoint. But I've been told I'm wrong, that the PID should do the ramping itself, \$\endgroup\$ – Blue_Electronx Nov 2 '18 at 15:12
  • \$\begingroup\$ Well, if the person telling you the PID should do it is the one issuing your grades or paying you, then practically speaking, that's how you should do it. Just be sure that the checks get cashed before the thing hits the market. You can do it that way, but it means that the thing won't regulate as well. There are a whole lot of different ways you can achieve the same goals in control system design, and particularly when you're working on a product that interacts with people it's not always obvious which is best. But if the boss is insistent, make the boss happy. \$\endgroup\$ – TimWescott Nov 2 '18 at 15:32
  • \$\begingroup\$ It's for a college project. The point is that I want to think critically. Ramping the setpoint may not be the only way to do it, but it seems the most convenient way for this specific application. The project works perfectly this way because I'm testing it. I don't plan to remove the PID, because I think the PID doesn't have to do with step or ramping the setpoint. So, for example, I'm ramping my setpoint with increment of 1 every 0.5 sec. If I say my setpoint is 100, then it's going to increase from 0 to 100 at this rate. Can PID do this if I don't ramp the setpoint? \$\endgroup\$ – Blue_Electronx Nov 2 '18 at 15:42
  • \$\begingroup\$ @XavierPachecoPaulino: Yes, PID can do this. But you are (presumably) using PID to control the motor because you want to regulate its speed. If you de-tune the controller enough so that it will ramp up slowly, then it will respond with similar slowness to disturbances that affect the treadmill speed. Also, the "ramp" from detuning the PID controller will be a decaying exponential, and users may not like that character of ramp. \$\endgroup\$ – TimWescott Nov 2 '18 at 16:35
  • \$\begingroup\$ Actually, if it's a project perhaps you should try both -- make the thing so you can ramp the setpoint. Then tune the PID controller up nice and tight and try it out with a ramped setpoint. Then de-tune the PID controller so that it gives a "natural ramp" and try it with a step setpoint. Be sure to do things like varying the effort you're putting into walking on the treadmill in each case, so you can see how it responds to disturbances. \$\endgroup\$ – TimWescott Nov 2 '18 at 16:37

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.