Increase Minimum Offroad Battery Voltage (#26661)

* Reduce Min Idle Battery Voltage and Idle Time

Updated minimum offroad battery voltage to reduce wear on car batteries and updated max offroad time to reflect the increased power consumption at idle based on EPHOT hardware power draw (this may have changed).

Most vehicles make use of lead acid batteries which during normal use shouldn't ever decrease below ~12V (sources give a range of 11.8-12V). Increasing this limit will prevent premature battery failure by preventing sulfation of the cells.

* Voltage cutoff to 11.8V, max offroad to 30h

Changed lower voltage limit to 11.8V, removed power usage comment entirely, reverted change to max offroad time to 30 hours

* Added Offroad Shutdown conditional

Added IsOffroad Shutdown conditional statement to prevent shutting down due to voltage floor.

* LPF Gain: Tau = 45s

Tau modified to 45s to result in a LPF gain of ~0.011. 

Assuming a dT of 0.5s: (0.5/45)/((0.5/45)+1)

* Revert IsOffroad check

Removed due to unnecessary redundancy.
old-commit-hash: 30165134e8
taco
EdwardApollo 2 years ago committed by GitHub
parent 558a48af28
commit 5be01f56c0
  1. 5
      selfdrive/thermald/power_monitoring.py

@ -7,14 +7,13 @@ from system.hardware import HARDWARE
from system.swaglog import cloudlog
from selfdrive.statsd import statlog
CAR_VOLTAGE_LOW_PASS_K = 0.091 # LPF gain for 5s tau (dt/tau / (dt/tau + 1))
CAR_VOLTAGE_LOW_PASS_K = 0.011 # LPF gain for 45s tau (dt/tau / (dt/tau + 1))
# A C2 uses about 1W while idling, and 30h seens like a good shutoff for most cars
# While driving, a battery charges completely in about 30-60 minutes
CAR_BATTERY_CAPACITY_uWh = 30e6
CAR_CHARGING_RATE_W = 45
VBATT_PAUSE_CHARGING = 11.0 # Lower limit on the LPF car battery voltage
VBATT_PAUSE_CHARGING = 11.8 # Lower limit on the LPF car battery voltage
VBATT_INSTANT_PAUSE_CHARGING = 7.0 # Lower limit on the instant car battery voltage measurements to avoid triggering on instant power loss
MAX_TIME_OFFROAD_S = 30*3600
MIN_ON_TIME_S = 3600

Loading…
Cancel
Save