Skip to content

Instantly share code, notes, and snippets.

@DelphineCCChiu
Last active January 8, 2024 10:48
Show Gist options
  • Save DelphineCCChiu/a6170d3e1a12fc4ee76fad324382fba3 to your computer and use it in GitHub Desktop.
Save DelphineCCChiu/a6170d3e1a12fc4ee76fad324382fba3 to your computer and use it in GitHub Desktop.
Support to accumulate controllers' output PWM and don't calculate PID output if input temperature was lower than setpoint
Description:
1. Add one property, accumulateSetPoint, in fan table that could be used to enable accumulation of the output PWM of
different controllers with same sensors.
e.g. If we have two controllers named "Stepwise_Temp_CPU0" and "PID_Temp_CPU0" in fan table that used to monitor
the temperature of CPU, their profile name would be "Temp_CPU0".
If we set accumulateSetPoint to true in zones field, the output PWM of "Stepwise_Temp_CPU0" and "PID_Temp_CPU0"
will be accumulated.
2. Add one property, checkHysterWithSetpt, in pid info of fan table to select to calculate PID output by checking the
hysteresis using setpoint temperature and don't calculate PID output if input temperature was lower than setpoint.
Design:
1. Search accumulateSetPoint field in fan table, if the value was true, accumulate the output PWM of different
contorllers with same profile name.
2. Support two method to calculate PID output that could be chosen by setting the "checkHysterWithSetpt" to true in
pid info of fan table.
If the flag was set to true, it won't calculate PWM output if the input lower than setpoint.
Test Case:
1. Check the output PWM of different controllers with same profile name could be accumulated - pass.
2. Set "checkHysterWithSetpt" and check PID output would not be calculated if the input temperature was lower than setpoint - pass.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment