CodeUC HRI2 v2.0 Microcontroller firmware of the board used during the HRI labs.

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

Macros | Functions
controller.h File Reference
`#include "main.h"`

Go to the source code of this file.

## Macros
#define | REGULATION_TYPE_SYMMETRIC
#define | TE_LOOP_MIN_VALUE 50
#define | TE_LOOP_MAX_VALUE 65534
#define | TE_CURRENT_LOOP_DEFAULT_VAL 50
#define | TE_CONTROL_LOOP_DEFAULT_VAL 350
#define | TE_DATA_LOOP_DEFAULT_VAL 1000
#define | KP_CURRENT_DEFAULT_VAL 200.0f
#define | KI_CURRENT_DEFAULT_VAL 500000.0f
#define | KD_CURRENT_DEFAULT_VAL 0.0f
#define | FF_CURRENT_DEFAULT_VAL MOTOR_RESISTANCE
#define | CURRENT_INTEGRATOR_SAT_DEFAULT_VAL 10.0f
#define | CURRENT_LOOP_PWM_MAX_DUTY_CYCLE 0.98f
#define | KP_POSITION_DEFAULT_VAL 0.01f
#define | KI_POSITION_DEFAULT_VAL 0.0f
#define | KD_POSITION_DEFAULT_VAL 0.0f
#define | POSITION_INTEGRATOR_SAT_DEFAULT_VAL 0.01f
#define | ENCODER_FILT_TAU_DEFAULT_VAL 0.999f
#define | FILTER_TYPE_NONE 0
#define | FILTER_TYPE_FIRST_ORDER 1
#define | FILTER_TYPE_RUNNING_MEAN 2

## Functions
void | ctrl_Init (void)
| Initialize the position and current controllers. More...
void | ctrl_StartCurrentLoop (void)
| Start the current regulation. More...

## Macro Definition Documentation

#define CURRENT_INTEGRATOR_SAT_DEFAULT_VAL 10.0f

#define CURRENT_LOOP_PWM_MAX_DUTY_CYCLE 0.98f

#define ENCODER_FILT_TAU_DEFAULT_VAL 0.999f

#define FF_CURRENT_DEFAULT_VAL MOTOR_RESISTANCE

#define FILTER_TYPE_FIRST_ORDER 1

#define FILTER_TYPE_NONE 0

#define FILTER_TYPE_RUNNING_MEAN 2

#define KD_CURRENT_DEFAULT_VAL 0.0f

#define KD_POSITION_DEFAULT_VAL 0.0f

#define KI_CURRENT_DEFAULT_VAL 500000.0f

#define KI_POSITION_DEFAULT_VAL 0.0f

#define KP_CURRENT_DEFAULT_VAL 200.0f

#define KP_POSITION_DEFAULT_VAL 0.01f

#define POSITION_INTEGRATOR_SAT_DEFAULT_VAL 0.01f

#define REGULATION_TYPE_SYMMETRIC

#define TE_CONTROL_LOOP_DEFAULT_VAL 350

#define TE_CURRENT_LOOP_DEFAULT_VAL 50

#define TE_DATA_LOOP_DEFAULT_VAL 1000

#define TE_LOOP_MAX_VALUE 65534

#define TE_LOOP_MIN_VALUE 50