Control humidity using cascade PID: outer PID loop sets setpoints of two inner flow controllers, which drive a solenoid valve each. Adjust the public setpoint variable and call update().
More...
#include <CascadeHumidistat.h>
|
| CascadeHumidistat (HumiditySensor *hs, const ConfigStore *cs, etl::span< const FlowSensor, 2 > flowSensors, etl::array< uint8_t, 2 > pins_solenoid, uint8_t pwmRes) |
| Constructor.
|
|
const FlowController * | getInner (uint8_t n) const |
| Get a pointer to a inner FlowController instance.
|
|
void | update () |
|
void | updatePIDParameters () |
|
| Humidistat (const ConfigStore *cs, HumiditySensor *hs, double Kp, double Ki, double Kd, double Kf, uint16_t dt, double cvMin, double cvMax) |
| Constructor.
|
|
double | getHumidity () const |
| Read the humidity.
|
|
double | getTemperature () const |
| Read the temperature.
|
|
double | getCvMin () const |
|
double | getCvMax () const |
|
| Controller (const ConfigStore *cs, double Kp, double Ki, double Kd, double Kf, uint16_t dt, double cvMin, double cvMax, double defaultSP, double defaultCV) |
| Constructor.
|
|
void | getTerms (double &pTerm, double &iTerm, double &dTerm) const |
| Get the three PID terms by reference.
|
|
void | update () |
| Run the controller: Typically reads a sensor, runs a cycle of the PID loop and drives some actuator.
|
|
void | updatePIDParameters () |
| Update the PID parameters from the configStore.
|
|
const ConfigStore * | getConfigStore () |
| Get a pointer to the ConfigStore instance.
|
|
Control humidity using cascade PID: outer PID loop sets setpoints of two inner flow controllers, which drive a solenoid valve each. Adjust the public setpoint variable and call update().
Definition at line 15 of file CascadeHumidistat.h.
◆ CascadeHumidistat()
CascadeHumidistat::CascadeHumidistat |
( |
HumiditySensor * | hs, |
|
|
const ConfigStore * | cs, |
|
|
etl::span< const FlowSensor, 2 > | flowSensors, |
|
|
etl::array< uint8_t, 2 > | pins_solenoid, |
|
|
uint8_t | pwmRes ) |
Constructor.
- Parameters
-
hs | Pointer to a HumiditySensor instance |
cs | Pointer to a ConfigStore instance |
flowSensors | Span over 2 FlowSensor instances |
pins_solenoid | Array of 2 integers corresponding to the solenoid pins |
pwmRes | PWM resolution (bits) |
Definition at line 3 of file CascadeHumidistat.cpp.
◆ getInner()
◆ update()
void CascadeHumidistat::update |
( |
| ) |
|
◆ updatePIDParameters()
void CascadeHumidistat::updatePIDParameters |
( |
| ) |
|
◆ fcs
The documentation for this class was generated from the following files: