![]() |
SimpleFOClibrary
2.1
|
#include <CurrentSense.h>
Public Member Functions | |
virtual void | init ()=0 |
virtual int | driverSync (BLDCDriver *driver)=0 |
virtual int | driverAlign (BLDCDriver *driver, float voltage)=0 |
virtual PhaseCurrent_s | getPhaseCurrents ()=0 |
virtual float | getDCCurrent (float angle_el=0) |
DQCurrent_s | getFOCCurrents (float angle_el) |
Public Attributes | |
bool | skip_align = false |
variable signaling that the phase current direction should be verified during initFOC() More... | |
Current sensing abstract class defintion Each current sensoring implementation needs to extend this interface
Definition at line 11 of file CurrentSense.h.
|
pure virtual |
Function intended to verify if:
This function corrects the alignment errors if possible ans if no such thing is needed it can be left empty (return 1)
Implemented in InlineCurrentSense.
|
pure virtual |
Function intended to implement all that is needed to sync and current sensing with the driver. If no such thing is needed it can be left empty (return 1)
Implemented in InlineCurrentSense.
|
virtual |
Function reading the magnitude of the current set to the motor It returns the abosolute or signed magnitude if possible It can receive the motor electrical angle to help with calculation This function is used with the current control (not foc)
angle_el | - electrical angle of the motor (optional) |
Definition at line 7 of file CurrentSense.cpp.
DQCurrent_s CurrentSense::getFOCCurrents | ( | float | angle_el | ) |
Function used for FOC contorl, it reads the DQ currents of the motor It uses the function getPhaseCurrents internally
angle_el | - motor electrical angle |
Definition at line 37 of file CurrentSense.cpp.
|
pure virtual |
Function rading the phase currents a, b and c This function will be used with the foc control throught the function CurrentSense::getFOCCurrents(electrical_angle)
Implemented in InlineCurrentSense.
|
pure virtual |
Function intialising the CurrentSense class All the necessary intialisations of adc and sync should be implemented here
Implemented in InlineCurrentSense.
bool CurrentSense::skip_align = false |
variable signaling that the phase current direction should be verified during initFOC()
Definition at line 28 of file CurrentSense.h.