I am working on a robot project in which I use an arduino mega as the main processing unit, L298N h bridge module as the motor driver and motors like these in a differential drive configuration. I have a problem dealing with this robot which is simply that the open loop behavior is not consistent. For example, if I give the left and right motors the same PWM input, making sure that both motors have the same effective input (measured by a voltmeter), sometimes the robot goes straight ahead, and sometimes veers to the right.

This is a problem for me because I am trying to build a model for the robot's behavior (knowing the trajectory given the motor input voltages) and at some point I have to estimate the robot parameters (motor constants, robot inertia and other properties) using the parameter estimation toolbox in simulink. Having inconsistent behavior like this causes the estimated parameters to be strange and unrealistic.

Has anybody faced such a problem? what may be the potential causes? non reliable hardware? battery problems? terrain problems (or interaction with the ground)?

Thanks in advance.

  • $\begingroup$ Could you give more details on the robot and your test setup? It could be any of the things that you mentioned at the bottom, in addition to the fact that differential drive and those wheels are never going to be a great steering solution. If you want to measure motor parameters, maybe an isolated test would be better. $\endgroup$
    – combo
    Sep 1, 2017 at 16:32

1 Answer 1


You should use feedback. Motor parameters such as internal resistance, torque constant, effective flux per pole would have slight variations even in two identical motors which would result in two slightly different rates of rotation, hence your robot turning. You are also assuming there is uniform grip so equal traction for both wheels, which would not be the case.

Use PID to control your motors and you should be fine. This paper should be helpful for your particular problem.

  • $\begingroup$ I totally agree with you, I have already used PID controllers to control the wheel speed and orientation and it works well. My question though is related to the consistency of the open loop response. If the motor parameters are a little bit different (assuming having same traction) the robot should turn in the same manner every test. However, this is not the case with my robot which for the same voltage applied for both motors sometimes goes straight or sometimes goes to the right. I don't know why, or to be more precise, what change to cause such variation in response. $\endgroup$
    – Hassan Ali
    Aug 31, 2017 at 14:21
  • $\begingroup$ This is a late response but here goes. Even after applying the same voltage to the motors there are still disturbances to the system that you cannot reliably reproduce and/or model. These can be the grip between the wheel and rolling surface, the change in rpm response with respect to heat etc. $\endgroup$
    – Ozymandias
    Jan 15, 2018 at 16:17

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.