25 void config(
float output_min,
float output_max) {
49 if (
state == RELAY_FUNCTION_INIT)
51 if (
state == RELAY_FUNCTION_POSITIVE)
60 }
state = RELAY_FUNCTION_INIT;
61 float noiseband = 0.5;
62 float output_positive = 1;
63 float output_negative = -1;
64 uint32_t phase_count = 0;
67 void update(uint32_t now,
float error);
69 bool has_enough_data()
const;
71 float get_mean_oscillation_period()
const;
73 bool is_increase_decrease_symmetrical()
const;
80 float noiseband = 0.05;
81 uint32_t last_zerocross{0};
87 bool has_enough_data()
const;
89 float get_mean_oscillation_amplitude()
const;
91 bool is_amplitude_convergent()
const;
93 float phase_min = NAN;
94 float phase_max = NAN;
100 void print_rule_(
const char *
name,
float kp_factor,
float ki_factor,
float kd_factor);
void config(float output_min, float output_max)
struct esphome::pid::PIDAutotuner::OscillationAmplitudeDetector amplitude_detector_
void set_autotuner_id(std::string id)
struct esphome::pid::PIDAutotuner::OscillationFrequencyDetector frequency_detector_
std::vector< float > phase_mins
optional< PIDResult > result_params
struct esphome::pid::PIDAutotuner::RelayFunction relay_function_
PIDResult calculate_pid_(float kp_factor, float ki_factor, float kd_factor)
std::vector< float > phase_maxs
PIDAutotuneResult update(float setpoint, float process_variable)
void set_output_positive(float output_positive)
void set_output_negative(float output_negative)
uint32_t enough_data_phase_
std::vector< uint32_t > zerocrossing_intervals
float current_target_error() const
void print_rule_(const char *name, float kp_factor, float ki_factor, float kd_factor)
Implementation of SPI Controller mode.
enum esphome::pid::PIDAutotuner::State state_
void set_noiseband(float noiseband)
PIDResult get_ziegler_nichols_pid_()