ESPHome  2022.9.1
Public Types | Public Member Functions | Data Fields
esphome::pid::PIDAutotuner::OscillationFrequencyDetector Struct Reference

#include <pid_autotuner.h>

Public Types

enum  FrequencyDetectorState { FREQUENCY_DETECTOR_INIT, FREQUENCY_DETECTOR_POSITIVE, FREQUENCY_DETECTOR_NEGATIVE }
 

Public Member Functions

void update (uint32_t now, float error)
 
bool has_enough_data () const
 
float get_mean_oscillation_period () const
 
bool is_increase_decrease_symmetrical () const
 

Data Fields

enum esphome::pid::PIDAutotuner::OscillationFrequencyDetector::FrequencyDetectorState state
 
float noiseband = 0.05
 
uint32_t last_zerocross {0}
 
std::vector< uint32_t > zerocrossing_intervals
 

Detailed Description

Definition at line 62 of file pid_autotuner.h.

Member Enumeration Documentation

◆ FrequencyDetectorState

Enumerator
FREQUENCY_DETECTOR_INIT 
FREQUENCY_DETECTOR_POSITIVE 
FREQUENCY_DETECTOR_NEGATIVE 

Definition at line 71 of file pid_autotuner.h.

Member Function Documentation

◆ get_mean_oscillation_period()

float esphome::pid::PIDAutotuner::OscillationFrequencyDetector::get_mean_oscillation_period ( ) const

Definition at line 261 of file pid_autotuner.cpp.

◆ has_enough_data()

bool esphome::pid::PIDAutotuner::OscillationFrequencyDetector::has_enough_data ( ) const

Definition at line 257 of file pid_autotuner.cpp.

◆ is_increase_decrease_symmetrical()

bool esphome::pid::PIDAutotuner::OscillationFrequencyDetector::is_increase_decrease_symmetrical ( ) const

Definition at line 273 of file pid_autotuner.cpp.

◆ update()

void esphome::pid::PIDAutotuner::OscillationFrequencyDetector::update ( uint32_t  now,
float  error 
)

Definition at line 231 of file pid_autotuner.cpp.

Field Documentation

◆ last_zerocross

uint32_t esphome::pid::PIDAutotuner::OscillationFrequencyDetector::last_zerocross {0}

Definition at line 77 of file pid_autotuner.h.

◆ noiseband

float esphome::pid::PIDAutotuner::OscillationFrequencyDetector::noiseband = 0.05

Definition at line 76 of file pid_autotuner.h.

◆ state

enum esphome::pid::PIDAutotuner::OscillationFrequencyDetector::FrequencyDetectorState esphome::pid::PIDAutotuner::OscillationFrequencyDetector::state

◆ zerocrossing_intervals

std::vector<uint32_t> esphome::pid::PIDAutotuner::OscillationFrequencyDetector::zerocrossing_intervals

Definition at line 78 of file pid_autotuner.h.


The documentation for this struct was generated from the following files: