Ticket #44 (closed defect: fixed)
Rotational.ElastoBacklash Miscalculation
| Reported by: | JustinKGriffiths@… | Owned by: | otter |
|---|---|---|---|
| Priority: | normal | Milestone: | MSL3.0 |
| Component: | Mechanics.Rotational | Version: | 2.2.2 |
| Severity: | major | Keywords: | backlash phi_rel0 |
| Cc: | Hide ticket: |
Description
I believe there is a mistake in the Standard Library. Currently I’m using version 2.2.1 but it is also in the latest release, version 2.2.2. In the …Rotational.ElastoBacklash model the torque function has a mistake. The function currently reads as follows,
tau = if b2 > b_min then (if phi_rel > b2 then c*(phi_rel - phi_rel0 - b2)
+ d*w_rel else (if phi_rel < -b2 then c*(phi_rel - phi_rel0 + b2) + d*
w_rel else 0)) else c*(phi_rel - phi_rel0) + d*w_rel;
At first glance this all looks fine but when both the backlash (b2) and phi_rel0 are non-zero then issues arise. Take for instance if b2 > 0 and phi_rel0 > 0 and phi_rel > b2 then (phi_rel – phi_rel0 – b2) < 0 which causes phi_rel to increase instead decrease. The same happens on the negative side when phi_rel < -b2 and phi_rel0 < 0. I believe the function should read,
tau = if b2 > b_min then (if phi_rel – phi_rel0 > b2 then c*(phi_rel - phi_rel0 - b2)
+ d*w_rel else (if phi_rel – phi_rel0 < -b2 then c*(phi_rel - phi_rel0 + b2) + d*
w_rel else 0)) else c*(phi_rel - phi_rel0) + d*w_rel;
This will remove the discontinuities from the equation.
