summaryrefslogtreecommitdiffstats
path: root/pid/controller.hpp
Commit message (Collapse)AuthorAgeFilesLines
* Move all floats to doublesPatrick Venture2018-11-111-2/+2
| | | | | | | | | 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>
* style: member functions should be lower camelPatrick Venture2018-10-301-4/+4
| | | | | | | Rename member functions to be lower camel instead of snake case. Change-Id: Ib227fd3dadb6d9607290277205223a4324cd4ce5 Signed-off-by: Patrick Venture <venture@google.com>
* Add stepwise controllerJames Feist2018-09-121-45/+11
| | | | | | | | | | | | | | | 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>
* add .clang-formatPatrick Venture2018-08-311-45/+45
| | | | | Change-Id: I6627b5569c2e0f730be7331403218b823a2c622f Signed-off-by: Patrick Venture <venture@google.com>
* test: pid: fancontrollerPatrick Venture2018-06-221-0/+1
| | | | | | | | | Adds unit-tests for the fancontroller. Bugfix: set point not initialized to 0, although bug has no impact. Tested: Ran on quanta-q71l board and it behaved as expected. Change-Id: I516833d8c9ed806b765ff9333801f3d57932a17b Signed-off-by: Patrick Venture <venture@google.com>
* test: pid: zonePatrick Venture2018-06-221-3/+3
| | | | | | | | | | Add unit-tests for the PID zone module. Add zone_mock. Tested: Ran on quanta-q71l board and it behaved as expected. Change-Id: I51185b2d2daacea6ffb687e8f38c4fe2b2a1bed3 Signed-off-by: Patrick Venture <venture@google.com>
* pid: zone split out buildersPatrick Venture2018-06-141-2/+2
| | | | | | | | | | To enable unit-testing, split the builders into their own object files. Tested: Ran on quanta-q71l board and it behaved as expected. Change-Id: I92168ec9ae4946d12328e9c0b94a36bb89d0f718 Signed-off-by: Patrick Venture <venture@google.com>
* PID Objects & AlgoPatrick Venture2018-03-081-0/+58
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>
OpenPOWER on IntegriCloud