From fa03ddcceaa45b18a9c6a0af36bdbd96869f46e6 Mon Sep 17 00:00:00 2001 From: "Peter (YM)" Date: Tue, 6 Aug 2024 06:21:31 +0000 Subject: [PATCH] thermal: Add VSkin-Speaker Model - Add linear regression model for VSkin-Speaker - Setup abnormality monitoring: - 0 <= VSkin-Speaker <= 55 - Residency for Vskin-Speaker Model Bug: 342046516 Test: Local build and verify lshal Flag: EXEMPT NDK Change-Id: I611daee70359414203eeb0cd074d207a27dd3cf9 Signed-off-by: Peter (YM) --- device-tegu.mk | 1 + thermal/thermal_info_config_tegu.json | 63 +++++++----------- .../vt_speaker_estimation_model_tegu.tflite | Bin 0 -> 4542 bytes 3 files changed, 24 insertions(+), 40 deletions(-) create mode 100644 thermal/vt_speaker_estimation_model_tegu.tflite diff --git a/device-tegu.mk b/device-tegu.mk index 608d5db..89084d0 100644 --- a/device-tegu.mk +++ b/device-tegu.mk @@ -115,6 +115,7 @@ PRODUCT_PACKAGES += \ TARGET_VENDOR_THERMAL_CONFIG_PATH := device/google/tegu/thermal PRODUCT_COPY_FILES += \ $(TARGET_VENDOR_THERMAL_CONFIG_PATH)/vt_estimation_model_tegu.tflite:$(TARGET_COPY_OUT_VENDOR)/etc/vt_estimation_model.tflite \ + $(TARGET_VENDOR_THERMAL_CONFIG_PATH)/vt_speaker_estimation_model_tegu.tflite:$(TARGET_COPY_OUT_VENDOR)/etc/vt_speaker_estimation_model.tflite \ # Bluetooth HAL PRODUCT_COPY_FILES += \ diff --git a/thermal/thermal_info_config_tegu.json b/thermal/thermal_info_config_tegu.json index 8ae3564..5ea6b06 100644 --- a/thermal/thermal_info_config_tegu.json +++ b/thermal/thermal_info_config_tegu.json @@ -704,50 +704,29 @@ "PassiveDelay":7000 }, { - "Name":"VIRTUAL-SKIN-SPEAKER-SUB-0", - "Type":"UNKNOWN", - "Hidden":true, - "VirtualSensor":true, - "Formula":"WEIGHTED_AVG", - "Combination":["north_therm", "rfpa_therm", "soc_therm", "charging_therm", "disp_therm", "battery", "btmspkr_therm", "quiet_therm", "usb_pwr_therm"], - "Coefficient":[0, 0.14, 0, 0.15, 0, 0, 0, 0.88, 0], - "Offset":-11750, - "Multiplier":0.001 - }, - { - "Name":"VIRTUAL-SKIN-SPEAKER-SUB-1", - "Type":"UNKNOWN", - "Hidden":true, - "VirtualSensor":true, - "Formula":"WEIGHTED_AVG", - "Combination":["north_therm", "rfpa_therm", "soc_therm", "charging_therm", "disp_therm", "battery", "btmspkr_therm", "quiet_therm", "usb_pwr_therm"], - "Coefficient":[0.01, 0.18, 0, 0, 0, 0.24, 0, 0.01, 0.35], - "Offset":3600, - "Multiplier":0.001 - }, - { - "Name":"VIRTUAL-SKIN-SPEAKER-SUB-2", - "Type":"UNKNOWN", - "Hidden":true, - "VirtualSensor":true, - "Formula":"WEIGHTED_AVG", - "Combination":["north_therm", "rfpa_therm", "soc_therm", "charging_therm", "disp_therm", "battery", "btmspkr_therm", "quiet_therm", "usb_pwr_therm"], - "Coefficient":[0, 0.01, 0, 0, 0.13, 0.31, 0.11, 0.18, 0.09], - "Offset":2140, - "Multiplier":0.001 + "Name": "VIRTUAL-SKIN-SPEAKER-MODEL", + "Type": "UNKNOWN", + "VirtualSensor": true, + "ModelPath": "vt_speaker_estimation_model.tflite", + "Formula": "USE_ML_MODEL", + "Combination": ["battery", "btmspkr_therm", "charging_therm", "disp_therm", "north_therm", "quiet_therm", "rfpa_therm", "soc_therm", "usb_pwr_therm"], + "Multiplier": 0.001, + "PreviousSampleCount": 1 }, { "Name":"VIRTUAL-SKIN-SPEAKER", "Type":"UNKNOWN", "Version":"2.0", "VirtualSensor":true, - "TriggerSensor":["north_therm", "soc_therm", "charging_therm", "disp_therm", "quiet_therm", "usb_pwr_therm", "rfpa_therm", "btmspkr_therm"], - "Formula":"MAXIMUM", - "Combination":["VIRTUAL-SKIN-SPEAKER-SUB-0", "VIRTUAL-SKIN-SPEAKER-SUB-1", "VIRTUAL-SKIN-SPEAKER-SUB-2"], - "Coefficient":[1, 1, 1], - "HotThreshold":["NAN", 47.0, "NAN", "NAN", "NAN", "NAN", "NAN"], - "HotHysteresis":[0.0, 1.9, 0.0, 0.0, 0.0, 0.0, 0.0], + "Formula": "MAXIMUM", + "Combination": ["VIRTUAL-SKIN-SPEAKER-MODEL"], + "Coefficient": [1.0], + "HotThreshold": ["NAN", 37.0, "NAN", "NAN", "NAN", "NAN", "NAN"], + "HotHysteresis": [0.0, 1.9, 0.0, 0.0, 0.0, 0.0, 0.0], "Multiplier":0.001, + "StepRatio": 0.4, + "PollingDelay": 300000, + "PassiveDelay": 7000, "SendCallback":true }, { @@ -1050,8 +1029,8 @@ "QUIET_THERM-VSKIN-DIFF-DURING-VSKIN-OVER-52", "QUIET_THERM-VSKIN-DIFF-DURING-QUIET_THERM-OVER-THRESHOLD", "SOC_THERM-VSKIN-DIFF-DURING-VSKIN-OVER-52", "SOC_THERM-VSKIN-DIFF-DURING-SOC_THERM-OVER-THRESHOLD", "NORTH_THERM-VSKIN-DIFF-DURING-VSKIN-OVER-52", "NORTH_THERM-VSKIN-DIFF-DURING-NORTH_THERM-OVER-THRESHOLD", - "RFPA_THERM-VSKIN-DIFF-DURING-VSKIN-OVER-52", "RFPA_THERM-VSKIN-DIFF-DURING-RFPA_THERM-OVER-THRESHOLD"], - "Coefficient": [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], + "RFPA_THERM-VSKIN-DIFF-DURING-VSKIN-OVER-52", "RFPA_THERM-VSKIN-DIFF-DURING-RFPA_THERM-OVER-THRESHOLD", "VIRTUAL-SKIN-SPEAKER-MODEL"], + "Coefficient": [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], "Multiplier": 1, "SendPowerHint": true, "PollingDelay": 300000, @@ -1176,7 +1155,7 @@ "Thresholds": [41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 75] }, { - "Name": "VIRTUAL-SKIN-SPEAKER", + "Name": "VIRTUAL-SKIN-SPEAKER-MODEL", "Thresholds": [41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 75] }, { @@ -1270,6 +1249,10 @@ { "Monitor": ["VIRTUAL-SKIN-MODEL-LEGACY-DIFF"], "TempRange": [-7000, 7000] + }, + { + "Monitor": ["VIRTUAL-SKIN-SPEAKER"], + "TempRange": [-20.0, 55.0] } ] } diff --git a/thermal/vt_speaker_estimation_model_tegu.tflite b/thermal/vt_speaker_estimation_model_tegu.tflite new file mode 100644 index 0000000000000000000000000000000000000000..5224afba3dcd0f90b3a044c2c5966b990ef22976 GIT binary patch literal 4542 zcmbtX4Nz3q6}|`}MTQhZ)Fj$IS54JX*j;vo)!qA+3RnUt0%A-c>w|sZ!~OHUx2Pya zn`$vt(Nq&24TG|+DO;T&L8KXFX&~x6~1woi8_0D{I z@1Aq+Ip>~x?!D)YBZL%X<)$POhKwU)Nh0|+i33^;iGnc!8X?;NaS?<>jUXfuU>ZqC zB+!5a(%53vSvV&a{^5L_mj-wOAn{_g;Hh*t`3lbOlGS-pK$p9_yFneyA_RLU?~!S*@c8_)YWoGCO#vXk5%i!8j?o^hC%Y)qk(XJNo{?UZPTGKvej)!! zz?}K>iZcrev**w2m5Bkb(f=6Wf9oMxx8QMzevd4;c}F!bN`lv;uJ7(}LjDbC1=Io3 zARwO&Bjg&O6>tG?7?2A_nFS|LS2E?iOA`E25=nqL z#n}Z#3)6FF6y{{lV~RiwXyCrOE<#3yas>!#ivo(4Gj`}V15h@cSLhXH2ksxVVHiua zp=N@k-0P_jDwC=t*cC#40GQ+T$eiGjz_SW3!_;zA5D#*WF9Ao)0uCcpby%b_BW)AlUBCucEUlK_N7tF&ksVXU;) z_k7|y5XeV4W0D~y3D%|S)byh+Lx=`LwRON*>;w?VBVl)0~*w^g>q2j7Y= zq1)Us!L~0W*(VqMOer2aiVj<2wOzX1N!R`IWokS*RXIz3L(i?-)40LT2H&3j72Q}r zpDtMIRz9r07nrns0X=d0W*|Q9z{xX5UqAV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