Skip to content

Struct SYN_AutoTune

ClassList > SYN_AutoTune

Auto-tuner instance.

  • #include <syn_autotune.h>

Public Attributes

Type Name
SYN_AutoTune_AbortReason abort_reason
bool above_setpoint
uint8_t amplitude_count
int32_t amplitude_sum
SYN_AutoTune_Config cfg
SYN_MotorCtrl * ctrl
int32_t current_output
uint8_t half_cycles
int32_t history_v
bool ka_p1_captured
bool ka_p2_captured
uint32_t ka_t1
uint32_t ka_t2
int32_t ka_v1
int32_t ka_v2
uint32_t last_check_tick
uint32_t last_cross_tick
uint32_t last_update_tick
int32_t osc_peak_neg
int32_t osc_peak_pos
uint8_t period_count
uint32_t period_sum
uint32_t phase_start_tick
int32_t relay_output
SYN_AutoTune_Result result
int32_t start_output
int32_t start_position
SYN_AutoTune_State state
uint32_t velocity_samples
int64_t velocity_sum

Public Attributes Documentation

variable abort_reason

SYN_AutoTune_AbortReason SYN_AutoTune::abort_reason;

Reason if aborted


variable above_setpoint

bool SYN_AutoTune::above_setpoint;

Current side of setpoint


variable amplitude_count

uint8_t SYN_AutoTune::amplitude_count;

Number of amplitude samples


variable amplitude_sum

int32_t SYN_AutoTune::amplitude_sum;

Sum of oscillation amps


variable cfg

SYN_AutoTune_Config SYN_AutoTune::cfg;

Configuration snapshot


variable ctrl

SYN_MotorCtrl* SYN_AutoTune::ctrl;

Controlled motor


variable current_output

int32_t SYN_AutoTune::current_output;

Current applied output percentage


variable half_cycles

uint8_t SYN_AutoTune::half_cycles;

Half-cycle counter


variable history_v

int32_t SYN_AutoTune::history_v;

Velocity sample from previous check


variable ka_p1_captured

bool SYN_AutoTune::ka_p1_captured;

Point 1 captured


variable ka_p2_captured

bool SYN_AutoTune::ka_p2_captured;

Point 2 captured


variable ka_t1

uint32_t SYN_AutoTune::ka_t1;

Initial tick for Ka identification


variable ka_t2

uint32_t SYN_AutoTune::ka_t2;

Final tick for Ka identification


variable ka_v1

int32_t SYN_AutoTune::ka_v1;

Initial velocity for Ka identification


variable ka_v2

int32_t SYN_AutoTune::ka_v2;

Final velocity for Ka identification


variable last_check_tick

uint32_t SYN_AutoTune::last_check_tick;

Tick of last steady-state check


variable last_cross_tick

uint32_t SYN_AutoTune::last_cross_tick;

Last zero-crossing tick


variable last_update_tick

uint32_t SYN_AutoTune::last_update_tick;

Tick count of last update() call


variable osc_peak_neg

int32_t SYN_AutoTune::osc_peak_neg;

Min position in half-cycle


variable osc_peak_pos

int32_t SYN_AutoTune::osc_peak_pos;

Max position in half-cycle


variable period_count

uint8_t SYN_AutoTune::period_count;

Number of full periods


variable period_sum

uint32_t SYN_AutoTune::period_sum;

Sum of full periods (ms)


variable phase_start_tick

uint32_t SYN_AutoTune::phase_start_tick;

Tick count when current phase started


variable relay_output

int32_t SYN_AutoTune::relay_output;

Current relay sign × amp


variable result

SYN_AutoTune_Result SYN_AutoTune::result;

Computed results


variable start_output

int32_t SYN_AutoTune::start_output;

Output at start of ramp-down


variable start_position

int32_t SYN_AutoTune::start_position;

Position when tuning started


variable state

SYN_AutoTune_State SYN_AutoTune::state;

Current state machine state


variable velocity_samples

uint32_t SYN_AutoTune::velocity_samples;

Number of velocity samples


variable velocity_sum

int64_t SYN_AutoTune::velocity_sum;

Accumulated velocity sum



The documentation for this class was generated from the following file src/syntropic/control/syn_autotune.h