History log of /openbmc/phosphor-pid-control/pid/pidcontroller.hpp (Results 1 – 13 of 13)
Revision Date Author Comments
# 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 ...


# 22579ca4 07-Nov-2022 Harvey Wu <Harvey.Wu@quantatw.com>

fix cppcheck warning

- Fix warnings:
[noExplicitConstructor]
ipmi/manualcmds.hpp:20:5: style: Class 'ZoneControlIpmiHandler' has a
constructor with 1 argument that is not explicit.

[red

fix cppcheck warning

- Fix warnings:
[noExplicitConstructor]
ipmi/manualcmds.hpp:20:5: style: Class 'ZoneControlIpmiHandler' has a
constructor with 1 argument that is not explicit.

[redundantInitialization]
dbus/dbusutil.cpp:96:15: style: Redundant initialization for 'layer'.
The initialized value is overwritten before it is read.

[uninitMemberVar]
pid/pidcontroller.hpp:23:5: warning: Member variable
'PIDController::_pid_info' is not initialized in the constructor.

[memsetClassFloat]
pid/util.cpp:29:10: portability: Using memset() on struct which
contains a floating point number.

[constParameter]
ipmi/manualcmds.cpp:108:72: style: Parameter 'dataLen' can be
declared as pointer to const

Signed-off-by: Harvey Wu <Harvey.Wu@quantatw.com>
Change-Id: Ib368c6e3a609e446529573cd0b9fa03858232db1

show more ...


# ccc8bb62 17-Feb-2022 Nirav Shah <nirav.j2.shah@intel.com>

For each zone log sensor name with max setpoint

Add sensor name that has the maximum setpoint for a PID zone.
Log a debug message when the sensor is changed.
The name is also added to the log file f

For each zone log sensor name with max setpoint

Add sensor name that has the maximum setpoint for a PID zone.
Log a debug message when the sensor is changed.
The name is also added to the log file for each log record.

Tested:
Override one CPU temperature sensor
busctl set-property xyz.openbmc_project.CPUSensor /xyz/openbmc_project/sensors/temperature/DTS_CPU1 xyz.openbmc_project.Sensor.Value Value d 82
Observed log message:
swampd[443]: PID Zone 0 max SetPoint 34.5546 requested by DTS_CPU1

Signed-off-by: Nirav Shah <nirav.j2.shah@intel.com>
Signed-off-by: Zhikui Ren <zhikui.ren@intel.com>
Change-Id: Ifc12cb9a106da1bf41dd35697210f74ba1b589db

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


# a83a3ecc 04-Aug-2020 Patrick Venture <venture@google.com>

update clang-format from Latest in docs

Updates the clang-format file and then applies it.

Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Ia9faf13ce171f90bf07547

update clang-format from Latest in docs

Updates the clang-format file and then applies it.

Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Ia9faf13ce171f90bf07547efd781139bee23e8c7

show more ...


# e30916c9 20-May-2020 Andrew Geissler <geissonator@yahoo.com>

add needed include for numeric_limits

Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: I3dd819833048c1c5787814df064511913397ae78


# 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 implem

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 v

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 ...


# ee30648e 30-Oct-2018 Patrick Venture <venture@google.com>

pid: add missing override specifiers

[pid/controller.hpp:18] -> [pid/pidcontroller.hpp:28]: (style) The
function 'inputProc' overrides a function in a base class but is not
marked wi

pid: add missing override specifiers

[pid/controller.hpp:18] -> [pid/pidcontroller.hpp:28]: (style) The
function 'inputProc' overrides a function in a base class but is not
marked with a 'override' specifier.
[pid/controller.hpp:20] -> [pid/pidcontroller.hpp:30]: (style) The
function 'outputProc' overrides a function in a base class but is not
marked with a 'override' specifier.
[pid/controller.hpp:22] -> [pid/pidcontroller.hpp:32]: (style) The
function 'process' overrides a function in a base class but is not
marked with a 'override' specifier.
[pid/controller.hpp:24] -> [pid/pidcontroller.hpp:34]: (style) The
function 'getID' overrides a function in a base class but is not marked
with a 'override' specifier.

Change-Id: I29a6bbe644a5f7aad933eb49e7b6f7fdc6e33f19
Signed-off-by: Patrick Venture <venture@google.com>

show more ...


# 563a356f 30-Oct-2018 Patrick Venture <venture@google.com>

style: member functions should be lower camel

Rename member functions to be lower camel instead of snake case.

Change-Id: Ib227fd3dadb6d9607290277205223a4324cd4ce5
Signed-off-by

style: member functions should be lower camel

Rename member functions to be lower camel instead of snake case.

Change-Id: Ib227fd3dadb6d9607290277205223a4324cd4ce5
Signed-off-by: Patrick Venture <venture@google.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 fr

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 ...