I am trying to design a system in which a bucket of water is held by two cables, lifted up/down while remaining stable. The cables can be retracted/detracted by two individual motors, controlled by their own PID system. The distance the cables travel is measured by an encoder that provides a discrete signal.

However, when I set a target distance (e.g., lift 10 cm), the output of the PID system controlling the motor speeds are different due to a difference in load on each motor. As a result, the bucket is destabilizing and water is leaking out.

What is the best way to ensure that the distance traveled by the bucket follows a smooth curve (i.e. no large changes in motor speed) and still remains stable? I am not looking for a complete solution to my problem, just a direction of terms and theory to look for. Thank you.

enter image description here


2 Answers 2


There's several different ways that you could approach this problem.

You can make the motors more consistent by making sure that they are more deterministic in their response. This might involve making them stronger such that they are less effected by the weight. This can also be done by using a higher gear ratio.

The other approach to making them more robust to loading concerns is to control them simultaneously such that they can respond to the load of the other cable. The simplest way is to slow the progress of the less loaded motor until the faster moving one catches up. But in general you need more feedback on the system than your two independent PID controllers.

Lastly, you mention going up and down, but not side to side, so by far the simplest solution would be to directly couple the cables on one shaft and only use one motor. This will guarantee to keep the cables level.


Tully's response is spot on 👍🏻

I'd only like to add a few comments:

  • Improving the hardware setup as Tully suggested is definitely the first way to go. However, the controllers certainly need some careful tuning.
  • It's important to select the right reference position trajectory to your system to minimize the jerk. To this end, you should rely on the well-known 5th-order polynomial (see also https://robotics.stackexchange.com/a/21571/6941).
  • There are MIMO approaches that are suitable to this case, but the simplest way of coupling the two PIDs is:
    • Pick one PID as the primary and keep using it standalone.
    • Send the exact output of the primary PID to the secondary motor as the feed-forward term and provide a further feedback term with the secondary PID that is instructed to reduce the error $\text{distance}_1 - \text{distance}_2$. If the PIDs (especially the secondary) are properly tuned, then the former error is kept low so that the bucket will remain stable.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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