thermal: enable model based vskin calculation

- Use VT_MODEL to do thermal throttle
- Clamp VT_MODEL prediction based on training set max_surface
- Use VT_MODEL_LEGACY_DIFF to decide on switch
- Enable smooth transition with weights

Bug: 354939290
Test: Build and boot to home, verify vskin-legacy can trigger shutdown b/354939290#comment3
Flag: EXEMPT (bug 337358613)
Change-Id: I8c2a071b8f34c4ab055adfd9d2363f2158775c99
Signed-off-by: Peter (YM) <peterym@google.com>
This commit is contained in:
Peter (YM) 2024-07-24 06:44:36 +00:00
parent fb6bf7e862
commit 8a95f6c471

View file

@ -176,6 +176,16 @@
"Coefficient": [1.0, 1.0, 1.0, 1.0, 1.0], "Coefficient": [1.0, 1.0, 1.0, 1.0, 1.0],
"Multiplier": 0.001 "Multiplier": 0.001
}, },
{
"Name": "VIRTUAL-SKIN-LEGACY-SHUTDOWN",
"Type": "UNKNOWN",
"Hidden": true,
"VirtualSensor": true,
"Formula": "COUNT_THRESHOLD",
"Combination": ["VIRTUAL-SKIN-LEGACY"],
"Coefficient": [60000.0],
"Multiplier": 1.0
},
{ {
"Name": "VIRTUAL-SKIN-MODEL", "Name": "VIRTUAL-SKIN-MODEL",
"Type": "UNKNOWN", "Type": "UNKNOWN",
@ -200,6 +210,74 @@
"SendPowerHint":true, "SendPowerHint":true,
"Multiplier": 1 "Multiplier": 1
}, },
{
"Name": "VIRTUAL-SKIN-MODEL-UPPER-CLAMPED",
"Type": "UNKNOWN",
"VirtualSensor": true,
"Hidden": true,
"Formula": "MINIMUM",
"Combination": ["60000", "VIRTUAL-SKIN-MODEL"],
"CombinationType": ["CONSTANT", "SENSOR"],
"Coefficient": [1.0, 1.0],
"Multiplier": 1
},
{
"Name": "VIRTUAL-SKIN-MODEL-CLAMPED",
"Type": "UNKNOWN",
"VirtualSensor": true,
"Hidden": true,
"Formula": "MAXIMUM",
"Combination": ["20000", "VIRTUAL-SKIN-MODEL-UPPER-CLAMPED"],
"CombinationType": ["CONSTANT", "SENSOR"],
"Coefficient": [1.0, 1.0],
"Multiplier": 1
},
{
"Name": "VIRTUAL-SKIN-LEGACY-MODEL-DIFF",
"Type": "UNKNOWN",
"VirtualSensor": true,
"Hidden": true,
"Formula": "WEIGHTED_AVG",
"Combination": ["VIRTUAL-SKIN-LEGACY", "VIRTUAL-SKIN-MODEL"],
"Coefficient": [1.0, -1.0],
"Multiplier": 1
},
{
"Name": "VT_LEGACY_WEIGHT",
"Type": "UNKNOWN",
"Hidden": true,
"VirtualSensor": true,
"Formula": "COUNT_THRESHOLD",
"StepRatio": 0.2,
"Combination": ["VIRTUAL-SKIN-MODEL-LEGACY-DIFF", "VIRTUAL-SKIN-LEGACY-MODEL-DIFF"],
"Coefficient": [10000, 7000],
"Multiplier": 1,
"PassiveDelay": 7000
},
{
"Name": "VT_MODEL_WEIGHT",
"Type": "UNKNOWN",
"Hidden": true,
"VirtualSensor": true,
"Formula": "WEIGHTED_AVG",
"Combination": ["1", "VT_LEGACY_WEIGHT"],
"CombinationType": ["CONSTANT", "SENSOR"],
"Coefficient": [1.0, -1.0],
"Multiplier": 1
},
{
"Name": "VIRTUAL-SKIN-MODEL-UPDATED",
"Type": "UNKNOWN",
"VirtualSensor": true,
"Hidden": true,
"Formula": "WEIGHTED_AVG",
"Combination": ["VIRTUAL-SKIN-LEGACY", "VIRTUAL-SKIN-MODEL-CLAMPED"],
"Coefficient": ["VT_LEGACY_WEIGHT", "VT_MODEL_WEIGHT"],
"CoefficientType": ["SENSOR", "SENSOR"],
"Multiplier": 1,
"StepRatio": 0.4,
"PassiveDelay": 7000
},
{ {
"Name":"VIRTUAL-SKIN", "Name":"VIRTUAL-SKIN",
"Type":"SKIN", "Type":"SKIN",
@ -207,8 +285,9 @@
"VirtualSensor":true, "VirtualSensor":true,
"TriggerSensor":["north_therm", "soc_therm", "charging_therm", "disp_therm", "quiet_therm", "usb_pwr_therm", "rfpa_therm", "btmspkr_therm"], "TriggerSensor":["north_therm", "soc_therm", "charging_therm", "disp_therm", "quiet_therm", "usb_pwr_therm", "rfpa_therm", "btmspkr_therm"],
"Formula":"MAXIMUM", "Formula":"MAXIMUM",
"Combination":["VIRTUAL-SKIN-LEGACY"], "Combination": ["VIRTUAL-SKIN-MODEL-UPDATED", "VIRTUAL-SKIN-LEGACY"],
"Coefficient":[1.0], "Coefficient": [1.0, "VIRTUAL-SKIN-LEGACY-SHUTDOWN"],
"CoefficientType":["CONSTANT", "SENSOR"],
"HotThreshold":["NAN", 39.0, 43.0, 45.0, 46.5, 52.0, 60.0], "HotThreshold":["NAN", 39.0, 43.0, 45.0, 46.5, 52.0, 60.0],
"HotHysteresis":[0.0, 1.9, 1.9, 1.9, 1.4, 1.9, 1.9], "HotHysteresis":[0.0, 1.9, 1.9, 1.9, 1.4, 1.9, 1.9],
"Multiplier":0.001, "Multiplier":0.001,
@ -1198,4 +1277,4 @@
} }
} }
} }
} }