The Food Winch - Part II
System Diagram
In the last post, I gave an overview of The Food Winch and some of the basic design goals and the general architecture I’ve chosen. In this post, I’m going to talk a bit about how I’ve modeled the system. There are some parts that have gone well and other aspects that can be improved, but seem to work for the time being.
In this case when I talk about modeling, I’m referring to deriving the equations of motion that describe the dynamics of the system. To start with, we need a simplified diagram of the system, which describes the key aspects, the coordinates, which describe the key measures, some reference frames, and a diagram of the forces. Below is a combined diagram, which captures all of these aspects.
In the physical design, there are several aspects which have been simplified here. In reality, there will be more than two gears and more than two types of gears - a planetary gear set for the primary gear reduction, as well as a worm gear for the final gear reduction and to act as a brake to resist back driving. In this model we simply consider the total gear reduction of the whole gear-train. This is represented by the ratio of r-a and r-b in the diagram above.
Similarly the rotational moments of inertia are also lumped where the J-a is the lumped moment of inertia of all the gears and J-b is the lumped inertia of the drum. Further simplifications are made which aid in the derivation of the final equations, but complicate the simulation. I’ll come back to those a bit later in the post.
Equations of Motion
Gears
Considering the inertia of each drum, ignoring any system friction, and considering the system input as tau-m, we can derive the following equations of motion for the two drums. Note that since there is an assumption of no slipping between the two gears, the state of gear-b is directly derived from the state of gear-a
Rope Dynamics
The rope dynamics for this simulation are kept pretty simple. For this project the “natural rope length” and the “unspooled rope length” both simply refer to the linear displacement of the drum, given it’s diameter and angular displacement. It’s a kinematic relationship and no real dynamics of the rope are considered.
s = pi * 2r * theta
Bucket Dynamics
The dynamics of the rope and the bucket start to get a bit complicated. There are a few things to keep in mind, but the main point I’m about to make is that ropes are terrible at pushing.
Originally I had derived a second set of equations of motion for the bucket. This turned out to clever on paper, but rather difficult in practice to properly simulate without considering a more complex model of the rope. Before putting any of the equations down that I finally settled on, consider the following observations
When lowering the bucket, the bucket’s maximum acceleration downward is equal to 1 g (9.81 m/s/s)
While the bucket is traveling up, the bucket’s maximum deceleration is equal to 1 g (9.81 m/s/s)
As long as the linear rate that the rope is unspooling is less than 1 g, the bucket position will be equivalent to the rope’s unspooled length
If the drum suddenly stops, such that the linear rope deceleration rate is greater than 1 g, the bucket’s momentum will carry higher, past the natural end position of the rope. This will create a sudden jerk when the bucket then falls back down and is quickly stopped by the rope
For the time being in the simulation, I’m considering the rope as infinitely stiff. This means it has no springing effect. When the bucket is travelling downward, deceleration to 0 m/s can happen as quickly as the motor can stop. Similarly if the bucket does overshoot the unspooled rope length while traveling upward, when it falls, it will experience both a high jerk and acceleration as it is nearly instantaneously stopped. None of this is strictly correct, but as I’m trying to avoid high jerks in the overall system design, adding these effects may add realism, but don’t help in the design process. Maybe they’ll be relevant for the controller in the real world, but that is a problem for the future.
Worm Gear Effects
The worm gear and the winch go hand in hand like Bode and Nyquist. Or perhaps hot chocolate and peppermint sticks if you’re an Epicurean Christmas fanatic. While there are some very nice resources online which describe the physics in a worm drive, it was a bit overkill to fully model. While it’s not elegant, I used the two following assumptions to simplify the calculations in my simulation. One key definition here is the overcoming torque: the motor torque (tau-m) necessary, given the current bucket, payload, and gear ratio to produce an infinitesimal acceleration of the bucket upward. In other words, the absolute minimum torque need to raise the bucket. Also, the coordinates are defined such that a positive angular displacement of the motor will raise the bucket.
While the motor torque is less than the overcoming torque, the angular acceleration of the motor cannot be greater than zero.
If the motor torque dips below the overcoming torque while the motor has some speed, it can continue with that speed. If the torque is increased, until it crosses the overcoming torque threshold, the speed will remain the same.
If the motor is not moving and the torque is ramped up, the motor will not begin to move until the torque input crosses the overcoming torque.
Points two and three are really just illustrative examples of the first point.
Initial Results
After struggling to get all the conditionals just right, I was able to get the reasonably sane result below. There are a few different test cases that I’ve run to verify the assumptions above. If you’re interested in more of the details, check them out on my github.