fsm: thermal predictions appear to overflow

Bug #1802431 reported by Selene ToyKeeper on 2018-11-09
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Flashlight Firmware Repository
Low
Unassigned

Bug Description

The thermal regulation code in FSM misbehaves when the host is heating up very quickly, causing it to not regulate downward until the rate of change decreases.

Currently, Anduril has a workaround for this by defining THERM_HARD_TURBO_DROP on lights which are prone to heating too fast, but this shouldn't be necessary.

FSM's thermal code needs to be changed to react better to fast changes.

Tried a PID loop.

Problems found:
* Even with a 16x average, the temperature value jumps a lot
* Using 1°C based values provides a too coarse adjustment
* Using 1/8°C based values would need a KP of <1 ==> float math needed?
* Calculating with floats takes too much space

My conclusion: Trying something else.

Selene ToyKeeper (toykeeper) wrote :

I pretty much fixed this in a recent revision, but I think it may still be possible to overflow sometimes. I'm not sure; it still needs more testing on a super-overpowered hot-rod host. But on almost every host I've tried so far, the new thermal code gets nearly-optimal results.

The new code is, as far as I can tell, more of a PD system instead of PID. But in my testing so far, it works way better than previous versions, and in many cases the result is almost identical to what I'd get if I drew an ideal response curve by hand. So I'm calling it good for now and may do a few more tweaks later when I get better testing hosts.

Changed in flashlight-firmware:
importance: Critical → Low
status: Confirmed → New
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers