I am trying to simulate a winch as a speed-regulated motor that works through a gearbox to lift a mass. The output of the gearbox is a drum, which rotates to accumulate cable.
I feel comfortable converting the mass to a moment of inertia and I also feel comfortable with converting that moment of inertia (output-side) to the moment of inertia "seen" by the motor (input-side) with the gearbox ratio. With a simple simulation, I have no problem writing the equations of motion.
My complication comes when I want to model "stretch" in the cable. I thought I could do this by simply putting a spring of arbitrary stiffness between the winch drum and the mass, as pictured below.
With this model, for the sake of simulation, I'm assuming I know the "drum height", which would be how far the drum has turned multiplied by the drum radius, and the height of the load. The spring force would be $k(\phi r - y)$, but how do I apply this to the motor?
I have a motor model:
$$ \frac{\Theta}{V} = \frac{K_T}{R_a Js+K_T K_b} $$ and a PI controller model:
$$ \frac{V}{\Theta_\mbox{error}} = \frac{k_p \left(s + \frac{k_i}{k_p} \right)}{s}\\ $$ where $\Theta$ is the motor speed, $V$ is terminal voltage, $J$ is the inertia of the load and machinery, and $R_a$, $K_T$, and $K_b$ are the motor armature resistance, torque constant, and back EMF constant, respectively.
The interaction I'm interested in studying occurs when the PI controller is tuned to the anticipated load inertia $J$, which would be found with the motor, gearbox, drum, and load mass, but the system actually "sees" the springy-mass.
Simplification is done by setting the $k_i/k_p$ ratio equal to $K_TK_b/R_aJ$, giving:
$$ \frac{\Theta}{\Theta_{\mbox{error}}} = \frac{V}{\Theta_{\mbox{error}}}\frac{\Theta}{V} = \left( \frac{k_p \left( s + \frac{K_TK_b}{R_aJ} \right) }{s} \right) \left( \frac{\frac{K_T}{R_aJ}}{s+\frac{K_T K_b}{R_aJ}} \right) $$
(Note I can leave $k_p$ as variable because the ratio $k_i/k_p$ can be set to whatever I want via $k_i$ as long as $k_p$ isn't zero.)
So, in an ideal world, where the value of "total" inertia $J$ is known in advance, the pole cancels, and the entire system reduces to:
$$ \frac{\Theta}{\Theta_{\mbox{error}}} = \left( \frac{k_p}{s} \right) \left( \frac{\frac{K_T}{R_aJ}}{1} \right) \\ $$ $$ \frac{\Theta}{\Theta_{\mbox{error}}} = \frac{1}{\frac{R_aJ}{k_pK_T}s} $$
Finally, $\Theta_{\mbox{error}} = \Theta_{\mbox{ref}} - \Theta_{\mbox{out}}$, so, with algebra:
$$ \boxed{\frac{\Theta_{\mbox{out}}}{\Theta_{\mbox{ref}}} = \frac{1}{\frac{R_aJ}{k_pK_T}s + 1}}$$
So, kind of sorry to shotgun so much detail, but I wanted to impress on anyone reading that I feel confident with all of my steps so far and that I have spent considerable effort working on this problem. Now, again to my question - I want to simulate stretch in the cable between the drum and the load, but I'm not sure how to use the spring force to modulate load inertia.
One thought I had was to try to fake an "equivalent mass", by assuming:
$$ F = m_{\mbox{equivalent}}a \\ m_{\mbox{equivalent}} = \frac{F_{\mbox{spring}}}{a} \\ $$
but this doesn't feel right, and I'm not sure what I would use for acceleration $a$.
I'm frustrated to be this far along on the problem and getting stumped by what seems like should be an easy issue, but I really can't think of a way to approach this problem. I think if I could frame it correctly I could work out the mechanics, but it's the force-to-inertia conversion I feel like needs to be made that has me stumped.
Finally, for the record, I have also tried back-tracking my motor model to include the load torque. This gives seemingly-reasonable results, but in the end I subtract the load torque from the motor torque to get net torque, then apply that net torque to the total inertia to get motor acceleration. That feeds on down the line and, again, I'm not sure that I'm treating total inertia correctly.