Closed sheim closed 5 years ago
As per conversation with Matt:
The force-equilibrium between the damper-actuator (DA) and the spring is:
$f(x,t) - \beta \dot{l}_{da} = k (l_s-l_0)$
where $f$ is the actuator force output, $\beta$ is the damping coefficient, $l_{da}$ is the damper-actuator length, $k$ is the spring coefficient, $l_s$ is the leg-spring length and $l_0$ is the legspring resting length. We therefore only need to solve for $\dot{l}{da}$.
The negative force being output was just integration error and is ~6 orders of magnitude less than the energy, so nothing to worry about. I just didn't think through the scaling.
I have some questions on the damping in stance_dynamics (see below). This started from the 6th plot in the demo "Work". Without perturbations, the actuator is doing negative work, which doesn't make sense to me. Since the damper is doing negative work, I expected the actuator to do positive work. I wanted to separate the active work from the
actuator_open_loop_force
and the passive work from theactuator_damping_force
. During a nominal (limit-cycle) step, these should cancel out. If I just track them naively separately however this isn't the case (see branchsplit_work
f95184a54ad90ab533ec3ac4c0cdf95067f01ff3, you can pull and run the same demo locally. The red line is the SLIP model with perturbation. )From what I understand from the code:
actuator_force
is computed as the total force output by the linear spring during a nominal stanceactuator_force
and actual spring force is computed, and accounts for theactuator_damping_force
. This is then converted toladot
(actuator_velocity) through the damper.la
, compressing the actuator, which in turn extends the spring, resulting in higher spring forces at the next step.From this I don't see a clear way to separate the passive (intrinsic damping) force and the open_loop active force...?
https://github.com/sheim/slippy/blob/0f6d9f6754318692798e2a882c9a4aea4cd65265/slippy/daslip.py#L178-L215