# Stabilizing water bucket with two retractable cables and motors

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.

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 👍🏻

• 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.