blob: 80fbaf46fca10ef0c806de21209d70460a9d4e49 [file] [log] [blame] [edit]
edition = "2023";
package milotic_tlbmc;
// The config of thermal zone debug mode.
message ThermalDebugModeConfig {
bool tuning_enabled = 1;
bool debug_enabled = 2;
bool debug_pid_enabled = 3;
}
// The sensor info needed by a PID controller.
message PidControllerSensorInfo {
string sensor_key = 1;
// `max_junction_temperature` is `Tjmax`, the hottest temperature a CPU can
// operate at before it begins thermal throttling to reduce performance and
// prevent damage. It must be explicitly specified for a margin PID sensor.
double max_junction_temperature = 2;
bool convert_temperature_to_margin = 3;
}
// The sensor info needed by a zone manager.
message ZoneManagerSensorInfo {
string sensor_key = 1;
bool is_missing_acceptable = 2;
// The scale factor to apply to sensor readings. The eventual sensor reading
// value used by the thermal loop will be: `reading * pow(10, scale)`.
double scale = 3;
double failsafe_percent = 4;
// For a sensor reading outside the critical thresholds, failsafe mode will be
// triggered for the zones owning that sensor.
double max_threshold_critical = 5;
double min_threshold_critical = 6;
}
// The config of thermal zone managers.
message ZoneManagerConfig {
int32 id = 1;
double setpoint_upper_bound = 2;
double setpoint_lower_bound = 3;
double minimum_thermal_setpoint = 4;
double zone_failsafe_percent = 5;
ThermalDebugModeConfig debug_mode = 6;
// The time interval in milliseconds between two fan cycles.
uint64 ms_per_fan_cycle = 7;
// The time interval in milliseconds between two thermal cycles.
uint64 ms_per_thermal_cycle = 8;
repeated ZoneManagerSensorInfo input_sensors = 9;
}
// The config of PID thermal loops.
message PidLoopConfig {
// Sample time in seconds.
double sample_time_sec = 1;
// Coefficient for P (proportional gain), aka Kp.
double coeff_proportional = 2;
// Coefficient for I (integral gain), aka Ki.
double coeff_integral = 3;
// Coefficient for D (derivative gain), aka Kd.
double coeff_derivative = 4;
// Offset coeff for feed-forward term.
double feed_forward_offset = 5;
// Gain for feed-forward term.
double feed_forward_gain = 6;
// Clamp of integral value upper bound.
double integral_limit_max = 7;
// Clamp of integral value lower bound.
double integral_limit_min = 8;
// Clamp of output value upper bound.
double output_limit_max = 9;
// Clamp of output value lower bound.
double output_limit_min = 10;
// Is this a thermal PID? If yes, no output limit clamping will happen during
// the calculation.
bool is_thermal_pid = 11;
// Negative slew rate.
double slew_neg = 12;
// Positive slew rate.
double slew_pos = 13;
// Negative hysteresis.
double hysteresis_neg = 14;
// Positive hysteresis.
double hysteresis_pos = 15;
// Compare current input and setpoint to check hysteresis.
// If this is true, the hysteresis check will be performed regardless of the
// value of `hysteresis_pos` and `hysteresis_neg`. If this is false, input
// hysteresis check will be performed if any of `hysteresis_pos` and
// `hysteresis_neg` is significant.
bool check_hysteresis_with_setpoint = 16;
}
// The the input process type of PID thermal controllers.
enum PidControllerInputProcessType {
UNSUPPORTED_PID = 0;
MARGIN_PID = 1;
TEMP_PID = 2;
POWER_PID = 3;
POWERSUM_PID = 4;
}
// The config of PID thermal controllers.
message PidControllerConfig {
// The ID of the PID controller.
string id = 1;
// The config of the PID loop.
PidLoopConfig pid_loop_config = 2;
// The ID of the owner zone manager.
repeated int32 zone_manager_id = 3;
double setpoint = 4;
PidControllerInputProcessType input_process_type = 5;
repeated PidControllerSensorInfo input_sensors = 6;
}
// The config of fan PID thermal controllers.
message FanPidControllerConfig {
// The ID of the fan PID controller.
string id = 1;
// The config of the PID loop.
PidLoopConfig pid_loop_config = 2;
// The ID of the owner zone manager.
repeated int32 zone_manager_id = 3;
repeated string input_fans = 4;
repeated string output_fans = 5;
}
// The critical point of stepwise thermal loops.
message StepwiseCriticalPoint {
// The threshold value.
double threshold = 1;
// The output value.
double stepwise_output = 2;
}
// The config of stepwise thermal loops.
message StepwiseLoopConfig {
// Sample time in seconds.
double sample_time_sec = 1;
// Enumerated list of threshold values with its corresponding output value.
// The threshold values must be monotonically increasing.
repeated StepwiseCriticalPoint critical_points = 2;
// How much the input value must raise to allow the switch to the next step.
double positive_hysteresis = 3;
// How much the input value must drop to allow the switch to the previous
// step.
double negative_hysteresis = 4;
// Whether this controller provides a setpoint or a ceiling for the zone.
bool is_ceiling = 5;
}
// The config of stepwise thermal controllers.
message StepwiseControllerConfig {
// The ID of the stepwise controller.
string id = 1;
// The config of the stepwise loop.
StepwiseLoopConfig stepwise_loop_config = 2;
// The ID of the owner zone manager.
repeated int32 zone_manager_id = 3;
// Whether this controller provides a setpoint or a ceiling for the zone.
bool is_ceiling = 4;
repeated string input_sensors = 5;
}
message ZoneManagerConfigs {
repeated ZoneManagerConfig zone_manager_configs = 1;
}
message PidControllerConfigs {
repeated PidControllerConfig pid_controller_configs = 1;
}
message StepwiseControllerConfigs {
repeated StepwiseControllerConfig stepwise_controller_configs = 1;
}
message FanPidControllerConfigs {
repeated FanPidControllerConfig fan_pid_controller_configs = 1;
}
message ThermalConfigs {
ZoneManagerConfigs zones = 1;
PidControllerConfigs pid_controllers = 2;
StepwiseControllerConfigs stepwise_controllers = 3;
FanPidControllerConfigs fan_pid_controllers = 4;
}