SimpleFOClibrary  2.1
FOCMotor.h File Reference
#include "Arduino.h"
#include "Sensor.h"
#include "CurrentSense.h"
#include "../time_utils.h"
#include "../foc_utils.h"
#include "../defaults.h"
#include "../pid.h"
#include "../lowpass_filter.h"

Go to the source code of this file.

Classes

class  FOCMotor
 

Macros

#define _MON_TARGET   0b1000000
 
#define _MON_VOLT_Q   0b0100000
 
#define _MON_VOLT_D   0b0010000
 
#define _MON_CURR_Q   0b0001000
 
#define _MON_CURR_D   0b0000100
 
#define _MON_VEL   0b0000010
 
#define _MON_ANGLE   0b0000001
 

Enumerations

enum  MotionControlType {
  torque, velocity, angle, velocity_openloop,
  angle_openloop
}
 
enum  TorqueControlType { voltage, dc_current, foc_current }
 
enum  FOCModulationType { SinePWM, SpaceVectorPWM, Trapezoid_120, Trapezoid_150 }
 

Macro Definition Documentation

◆ _MON_ANGLE

#define _MON_ANGLE   0b0000001

Definition at line 23 of file FOCMotor.h.

◆ _MON_CURR_D

#define _MON_CURR_D   0b0000100

Definition at line 21 of file FOCMotor.h.

◆ _MON_CURR_Q

#define _MON_CURR_Q   0b0001000

Definition at line 20 of file FOCMotor.h.

◆ _MON_TARGET

#define _MON_TARGET   0b1000000

Definition at line 17 of file FOCMotor.h.

◆ _MON_VEL

#define _MON_VEL   0b0000010

Definition at line 22 of file FOCMotor.h.

◆ _MON_VOLT_D

#define _MON_VOLT_D   0b0010000

Definition at line 19 of file FOCMotor.h.

◆ _MON_VOLT_Q

#define _MON_VOLT_Q   0b0100000

Definition at line 18 of file FOCMotor.h.

Enumeration Type Documentation

◆ FOCModulationType

FOC modulation type

Enumerator
SinePWM 

Sinusoidal PWM modulation.

SpaceVectorPWM 

Space vector modulation method.

Trapezoid_120 
Trapezoid_150 

Definition at line 47 of file FOCMotor.h.

◆ MotionControlType

Motiron control type

Enumerator
torque 

Torque control.

velocity 

Velocity motion control.

angle 

Position/angle motion control.

velocity_openloop 
angle_openloop 

Definition at line 27 of file FOCMotor.h.

◆ TorqueControlType

Motiron control type

Enumerator
voltage 

Torque control using voltage.

dc_current 

Torque control using DC current (one current magnitude)

foc_current 

torque control using dq currents

Definition at line 38 of file FOCMotor.h.