summaryrefslogtreecommitdiffstats
path: root/pid/pidcontroller.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add Hysteresis to pid controllersJames Feist2019-02-051-2/+34
| | | | | | | | | | | | 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>
* Move all floats to doublesPatrick Venture2018-11-111-3/+3
| | | | | | | | | 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-0/+48
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>
OpenPOWER on IntegriCloud