Skip to main content

Software Chassis Power Limiting

Software power limiting controls chassis power by limiting the motor output torque for the purpose of limiting the actual power to below near the maximum power when the chassis is moving violently and the actual power is about to exceed the given maximum power.

Theory

The output power of the motor is.

Pout=τω(1)P_{out} = \tau \omega\tag{1}

The input power of the motor is the sum of the output power and the lost power, which can be expressed as

Pin=Pout+k1τ2+k2ω2(2)P_{in} = P_{out} + k_1 \tau^2 + k_2 \omega^2\tag{2}

where $$ k_1$$ and $$ k_2$$ are constants.

Implementation

The constants of equation (2) are harder to measure, and we approximate using equation (1). Knowing: the maximum power PmaxP_{max}, the current speed of each motor ωreal\omega_{real} and the raw torque command τcmd\tau_{cmd} calculated by the motor PID, we can calculate the maximum torque output from each motor according to the equiproportional distribution of the raw torque command.

τmax=kτcmdτtotalPmaxωreal(3)\tau_{max}=k \frac{\tau_{cmd}} {\tau_{total}} \frac{P_{max}}{\omega_{real}}\tag{3}

where kk safety factor, the effect of lost power can be conservatively reduced by adjusting the magnitude of kk; τtotal\tau_{total} is the sum of the absolute values of the command moments of all motors. To prevent the maximum torque allowed from being calculated too large when the motor speed is low, we introduce the minimum speed ωmin\omega_{min} to calculate the maximum torque using the minimum speed when the motor speed is lower than the minimum speed. Combining with equation (3) the final formula for calculating the maximum output torque of the motor is:

τmax={kτcmdτtotalPmaxωmin,ωreal<ωmin kτcmdτtotalPmaxωreal,ωrealωmin(4)\tau_{max}=\left\{\begin{array}{lcr} k \frac{\tau_{cmd}} {\tau_{total}} \frac{P_{max}}{\omega_{min}} &,\omega_{real} < \omega_{min} \\\ k \frac{\tau_{cmd} } {\tau_{total}} \frac{P_{max}}{\omega_{real}} &,\omega_{real} \geq \omega_{min} \\ \end{array}\right.\tag{4}

The following figure shows the curves of power (top), speed command (middle) and actual speed (bottom) for the infantry robot entering the high-speed small gyro at rest and then entering the slow small gyro and finally panning in the high-speed small gyro state. It can be seen that in the high-speed small gyro state, the power is limited below near the red line and the actual speed is smaller than the speed command, and after entering the slow small gyro, the power decreases, at which time the actual speed is equal to the speed command, and finally when panning in the high-speed small gyro state, the power is still limited below near the cyan line (maximum power). Software chassis power limit