go away spammer

Author Topic: Using PWM to control DC motor output torque  (Read 2504 times)

0 Members and 1 Guest are viewing this topic.

Offline kevinthesunTopic starter

  • Jr. Member
  • **
  • Posts: 10
  • Helpful? 0
Using PWM to control DC motor output torque
« on: April 23, 2014, 06:51:03 PM »
Hey, I am using Roboclaw as my dc motor driver and changing the duty cycle of input PWM can control speed. Now I have some robotic applications which requires certain value of torque from the dc motor. As for the dc motor, the output torque is proportional to the armature current and RoboClaw can directly read armature current, I plan to use the current value as feedback to control the torque. However, it seems that the duty cycle of PWM directly controls speed, not torque. So can I just use PID to complete this control requirement?

Offline jwatte

  • Supreme Robot
  • *****
  • Posts: 1,345
  • Helpful? 82
Re: Using PWM to control DC motor output torque
« Reply #1 on: April 23, 2014, 08:54:42 PM »
If you do not use encoder feedback, then the PWM duty cycle controls exactly the PWM duty cycle.
If the load is constant, then a specific duty cycle will correspond to a specific speed.
A specific duty cycle will also correspond to a specific amp draw with constant load, if the motor is either running well, or is perfectly stalled with brushes in contact. For very slow moving motors, the brush mechanism may introduce non-trivial nonlinearities.

If you have a motor with a known current/torque relation, and you can read the present current back, and you can control the duty cycle, then a P (or PID) controller can be a reasonable substitute for constant-torque control.

Offline kevinthesunTopic starter

  • Jr. Member
  • **
  • Posts: 10
  • Helpful? 0
Re: Using PWM to control DC motor output torque
« Reply #2 on: April 24, 2014, 12:00:46 AM »
Thank you for replying! If I'd like to generate more complicated torque, such as increasing linearly in 5 second. Can I still tune the armature current? Or I need torque sensor?

Offline jwatte

  • Supreme Robot
  • *****
  • Posts: 1,345
  • Helpful? 82
Re: Using PWM to control DC motor output torque
« Reply #3 on: April 24, 2014, 10:18:40 AM »
I don't know how often the current sensor will sample and return information, although there is a command to return encoder information with 8 milliseconds resolution, so that may be the resolution. If you are OK with the resolution you will get from transmitting serial commands, then yes, you can adjust the current through PWM over the serial bus.
I recommend that you do the math on timing yourself -- how tight a control loop do you need, how many milliseconds of latency, how much overshoot, ...

 


Get Your Ad Here

data_list