Skip to main content

transmission_sweep

Function transmission_sweep 

Source
pub fn transmission_sweep(
    entry: &MachineEntry,
    cfg: &Config,
    path: &str,
    (from, to, count): (f64, f64, usize),
    snap: Option<(&str, &str, &str)>,
) -> Result<TransmissionSweep, ConfigError>
Expand description

Sweeps path (gearbox.ratio or geometry.pulley_radius_m) of a config over count values spaced logarithmically from from to to, each with the velocity gain retuned for it (catalog::with_value) and run on the cycle; finds the classic optimum by a golden-section search of the torque the motors need per unit acceleration over the same range (unimodal for inertia: J_m i / r + J_L r / i), and runs it too. With snap = (series, motor article, supply) and path the gear ratio: the catalogue gearboxes of that series that fit the motor around the best ratio (catalog::fitting_gearboxes), each run as a row of snapped. The runs share the processors.