326cd762 | 08-Dec-2024 |
Jayanth Othayoth <ojayanth@gmail.com> |
clang-tidy: Add Tag Names to Anonymous Structs
The following errors were reported during clang-tidy enablement due to anonymous non-C-compatible types being given names for linkage purposes by typed
clang-tidy: Add Tag Names to Anonymous Structs
The following errors were reported during clang-tidy enablement due to anonymous non-C-compatible types being given names for linkage purposes by typedef declarations. This fix addresses the issue by adding tag names to the anonymous structs, making them compatible with C.
''' pid/ec/pid.hpp:20:15: error: anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here [-Werror pid/ec/pid.hpp:11:15: error: anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here [-Werror '''
Tested: Build and unit testing verified.
Change-Id: I1a998d23b515f2ff570867935cc1a6c8b040f4b1 Signed-off-by: Jayanth Othayoth <ojayanth@gmail.com>
show more ...
|
1b3b7304 | 04-Oct-2024 |
Harvey Wu <Harvey.Wu@quantatw.com> |
fix CI failed
- Refs about removing add_object_vtable: https://gerrit.openbmc.org/c/openbmc/phosphor-hwmon/+/73009
- initial some struct data
Signed-off-by: Harvey Wu <Harvey.Wu@quantatw.com> Chan
fix CI failed
- Refs about removing add_object_vtable: https://gerrit.openbmc.org/c/openbmc/phosphor-hwmon/+/73009
- initial some struct data
Signed-off-by: Harvey Wu <Harvey.Wu@quantatw.com> Change-Id: Iacc62eb1b8cd2b1e092efdbcb3abafb8afb896c7
show more ...
|
9788963c | 05-Nov-2023 |
Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com> |
Support to accumulate PWM of different controllers for same sensor
Description: 1. Add one property: accumulateSetPoint in zone of fan table that could be used to enable accumulation of output PW
Support to accumulate PWM of different controllers for same sensor
Description: 1. Add one property: accumulateSetPoint in zone of fan table that could be used to enable accumulation of output PWM of different controllers with same sensor.
2. Add one property: checkHysterWithSetpt in pid info of fan table to select to compare current input and setpoint to check hysteresis.
3. The purpose of accumulate the stepwise output and PID output for one sensor is that the setting of stepwise could use to prevent the fan speed from suddenly increasing from a very low speed to a very high speed due to reaching the setpoint.
Use stepwise before setpoint could also keep the PWM steady at low ambient temperature.
Design: 1. Search "accumulateSetPoint" field in fan table. If the value was true, accumulate the output PWM of different controllers 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" to true and check PID output would not be calculated if the input temperature was lower than setpoint - pass.
Please see more details in gist: https://gist.github.com/DelphineCCChiu/a6170d3e1a12fc4ee76fad324382fba3
Change-Id: I9f38f250d72545784c6c11be2fde7d45f0b385c4 Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>
show more ...
|
31058fd3 | 13-Jan-2023 |
Josh Lehan <krellan@google.com> |
Implementing the TempToMargin feature
Wrapping the input name std::string in a new structure SensorInput, so that the TempToMargin information can be cleanly carried along with it, all the way down
Implementing the TempToMargin feature
Wrapping the input name std::string in a new structure SensorInput, so that the TempToMargin information can be cleanly carried along with it, all the way down to the PID input processing layer where it is needed. This allows the conversion to be done just-in-time before the temperature reading is interpreted, minimizing the blast radius of this change. Nonetheless, because of the type change, there was a somewhat large blast radius to implement this feature.
The design, and the documentation, is already here: https://github.com/openbmc/phosphor-pid-control/issues/23
Tested: Added unit tests for JSON parsing and for proper execution of the TempToMargin feature. They pass. Ran it locally, on our appropriately-configured system, and it seems to work for me.
Change-Id: I598ba485195aaa70c26e91a1da3ab88fff8c3a4c Signed-off-by: Josh Lehan <krellan@google.com>
show more ...
|
8c051121 | 10-May-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest
clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest .clang-format from the docs repository and reformat the repository.
Change-Id: Icbc50d46e84ee7ef756705e2b19741439a325074 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
56ed7870 | 15-Dec-2022 |
Josh Lehan <krellan@google.com> |
Fixing crash when core logging was enabled
The operator=() function tried to use the "=" operator to copy the entire structure at once, which of course called the same function again, leading to inf
Fixing crash when core logging was enabled
The operator=() function tried to use the "=" operator to copy the entire structure at once, which of course called the same function again, leading to infinite recursion, and thus, segfault.
Worked around this braino by simply copying each field individually, forgoing the convenience of copying the structure as a whole.
Tested: Use of the core logging feature no longer crashes
Signed-off-by: Josh Lehan <krellan@google.com> Change-Id: Id472d03409296a45bb14180f5c1897dfb42be1aa
show more ...
|
de74542c | 07-Nov-2020 |
Josh Lehan <krellan@google.com> |
Adding new feature of core PID loop logging
This differs from the normal logging, as this focuses on the core of the PID loop computations.
All variables within the core pid/ec/pid.cpp pid() functi
Adding new feature of core PID loop logging
This differs from the normal logging, as this focuses on the core of the PID loop computations.
All variables within the core pid/ec/pid.cpp pid() function are now logged, so math can be debugged.
Output is throttled to only log a new line when it changes, or when 60 seconds have elapsed.
Creates 2 files for each PID loop, one showing coefficients that were configured for it, and one showing the variables changing over time.
Enable by --corelogging command line option, or by creating /etc/thermal.d/corelogging file.
Tested: Log files appear as expected, when enabled. No changes noticed, when this feature is disabled.
Signed-off-by: Josh Lehan <krellan@google.com> Change-Id: I3f37fe918e7cbc6fb885ffa2f268600d5a317d32
show more ...
|
0e8fc398 | 04-Oct-2022 |
Bonnie Lo <Bonnie_Lo@wiwynn.com> |
Support derivative term in PID algorithm and support to set cycle interval time from fan table
1. Support to calculate derivative term in PID algorithm. 2. Add two properties: cycleIntervalTimeMS an
Support derivative term in PID algorithm and support to set cycle interval time from fan table
1. Support to calculate derivative term in PID algorithm. 2. Add two properties: cycleIntervalTimeMS and updateThermalsTimeMS in fan table that could be used to decide "time interval of PID control loop" and "time interval to update thermals' cached value".
Tested:
- PID algorithm: 1. Check pid-control-service could calculate output PWM according to the fan table.
[Test log] root@greatlakes:~# systemctl status phosphor-pid-control -l * phosphor-pid-control.service - Phosphor-Pid-Control Margin-based Fan Control Daemon Loaded: loaded (/lib/systemd/system/phosphor-pid-control.service; enabled; preset: enabled) Active: active (running) since Fri 2018-03-09 05:09:35 PST; 1min 47s ago Main PID: 3105 (swampd) CGroup: /system.slice/phosphor-pid-control.service `-3105 /usr/bin/swampd -c /usr/share/entity-manager/configurations/fan-table.json ... Mar 09 05:10:29 greatlakes phosphor-pid-control[3105]: PID Zone 1 max SetPoint 3.75 requested by PID_NIC_SENSOR_TEMP BMC_SENSOR_FAN0_TACH BMC_SENSOR_FAN2_TACH BMC_SENSOR_FAN4_TACH BMC_SENSOR_FAN6_TACH
- Cycle interval time: 1. Set cycleIntervalTimeMS and updateThermalsTimeMS to 1000 ms in fan table 2. Check service would update thermal every second from debug log.
[Test log] root@greatlakes:~# journalctl -u phosphor-pid-control --since "Mar 09 04:52:16" Mar 09 04:52:16 greatlakes systemd[1]: Started Phosphor-Pid-Control Margin-based Fan Control Daemon. ... Mar 09 04:53:28 greatlakes phosphor-pid-control[2795]: processThermals Mar 09 04:53:28 greatlakes phosphor-pid-control[2795]: processFans Mar 09 04:53:29 greatlakes phosphor-pid-control[2795]: processThermals Mar 09 04:53:29 greatlakes phosphor-pid-control[2795]: processFans Mar 09 04:53:30 greatlakes phosphor-pid-control[2795]: processThermals Mar 09 04:53:30 greatlakes phosphor-pid-control[2795]: processFans
Change-Id: I04e1b440603c3ad66a1e26c96451992785da6fe6 Signed-off-by: Bonnie Lo <Bonnie_Lo@wiwynn.com>
show more ...
|
a076487a | 08-Aug-2020 |
Patrick Venture <venture@google.com> |
sensors/zones: place in namespace and cleanup
Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I527dbc8477a232945f696227a7b0b2adbee45175 |
608304da | 25-Feb-2019 |
James Feist <james.feist@linux.intel.com> |
stepwise: Add ceiling type
Add a stepwise ceiling type, this is used as a upper clipping curve to limit the max output based on a temperature sensor. This is commonly used for quiet fan mode where C
stepwise: Add ceiling type
Add a stepwise ceiling type, this is used as a upper clipping curve to limit the max output based on a temperature sensor. This is commonly used for quiet fan mode where CPU throttling is allowed to preserve a max fan noise.
Change-Id: I181d5913c92e5498a34e6d3f67cf99b67471479c Signed-off-by: James Feist <james.feist@linux.intel.com>
show more ...
|
7442c37a | 11-Feb-2019 |
Patrick Venture <venture@google.com> |
conf change: pid: all pid details are now camelCase
Convert all PID configuration details are now camelCase instead of snake case.
Change-Id: Id132053f122dfcd8abaace17df91c99758eb2b0c Signed-off-by
conf change: pid: all pid details are now camelCase
Convert all PID configuration details are now camelCase instead of snake case.
Change-Id: Id132053f122dfcd8abaace17df91c99758eb2b0c Signed-off-by: Patrick Venture <venture@google.com>
show more ...
|
a23468ef | 11-Feb-2019 |
Patrick Venture <venture@google.com> |
pid: rename variables with full names
Use full names and camelcase for the variables in the pid loop to improve readability and consistency.
Change-Id: I86be69d94d3008faa497eace050d1f3b9b6a9ff4 Sig
pid: rename variables with full names
Use full names and camelcase for the variables in the pid loop to improve readability and consistency.
Change-Id: I86be69d94d3008faa497eace050d1f3b9b6a9ff4 Signed-off-by: Patrick Venture <venture@google.com>
show more ...
|
4b0df320 | 11-Feb-2019 |
Patrick Venture <venture@google.com> |
pid: rename structure components for style
Rename the struct components to camelCase.
Change-Id: I0e76c4bd5aed0ec2d78edd31ddef66f852ddc71e Signed-off-by: Patrick Venture <venture@google.com> |
572c43da | 31-Jan-2019 |
James Feist <james.feist@linux.intel.com> |
Add Hysteresis to pid controllers
Add hysteresis to pid controllers to lower pwm changes. It is defaulted to 0 so it should be transparent to any controller that choses not to implement it. This is
Add Hysteresis to pid controllers
Add hysteresis to pid controllers to lower pwm changes. It is defaulted to 0 so it should be transparent to any controller that choses not to implement it. This is the same pattern used by the stepwise controller.
Tested-by: Unit tests passed
Change-Id: Ib47114285b0017258b7f77eaf067d310f95a0c60 Signed-off-by: James Feist <james.feist@linux.intel.com>
show more ...
|
5f59c0fd | 11-Nov-2018 |
Patrick Venture <venture@google.com> |
Move all floats to doubles
The code was developed initially around a pid loop implemented using floats. Therefore, the code was converting back and forth between double for sensor values as inputs
Move all floats to doubles
The code was developed initially around a pid loop implemented using floats. Therefore, the code was converting back and forth between double for sensor values as inputs and outputs from this PID loop.
Change-Id: I2d2919e1165103040729c9f16bb84fde3dd6b81b Signed-off-by: Patrick Venture <venture@google.com>
show more ...
|
df766f25 | 13-Oct-2018 |
Patrick Venture <venture@google.com> |
cleanup: reduce scope of variables
Various things caught by cppcheck that are non-critical.
Change-Id: I495453c84bc15788b85036a163ee36b0ac601fa1 Signed-off-by: Patrick Venture <venture@google.com> |
3dfaafda | 20-Sep-2018 |
James Feist <james.feist@linux.intel.com> |
Add hysteresis to stepwise controller
Tested-by: Ran on platform monitoring output and wrote unit test
Change-Id: I74a1d21544c1a9cb4c1cb26dd4a353cbff0442d0 Signed-off-by: James Feist <james.feist@l
Add hysteresis to stepwise controller
Tested-by: Ran on platform monitoring output and wrote unit test
Change-Id: I74a1d21544c1a9cb4c1cb26dd4a353cbff0442d0 Signed-off-by: James Feist <james.feist@linux.intel.com>
show more ...
|
22c257ab | 31-Aug-2018 |
James Feist <james.feist@linux.intel.com> |
Add stepwise controller
This adds the ability to use stepwise curves alongside pid control. This creates a base controller class that pidcontroller and stepwise controller inherit from.
Note: Hyste
Add stepwise controller
This adds the ability to use stepwise curves alongside pid control. This creates a base controller class that pidcontroller and stepwise controller inherit from.
Note: Hysteresis to come in follow-on patch
Tested-by: Created a stepwise controller and noticed that when it crossed a threshold that it contributed to the pwm setting.
Change-Id: I6cf842f80eaccafc905d620970afe91e2092d568 Signed-off-by: James Feist <james.feist@linux.intel.com>
show more ...
|
da4a5dd1 | 31-Aug-2018 |
Patrick Venture <venture@google.com> |
add .clang-format
Change-Id: I6627b5569c2e0f730be7331403218b823a2c622f Signed-off-by: Patrick Venture <venture@google.com> |
d8012181 | 08-Mar-2018 |
Patrick Venture <venture@google.com> |
PID Objects & Algo
These are the PID controller implementations for fans, and thermals. This also includes the PID algorithm used.
Change-Id: I30471fbf7a8a7ed65f78bf105970d62815fedc56 Signed-off-b
PID Objects & Algo
These are the PID controller implementations for fans, and thermals. This also includes the PID algorithm used.
Change-Id: I30471fbf7a8a7ed65f78bf105970d62815fedc56 Signed-off-by: Patrick Venture <venture@google.com>
show more ...
|