MSPM0G3519SensoredFOCMotorControlLibrary  1.0
Data Structures | Macros | Enumerations | Functions
closeLoop.h File Reference

Detailed Description

closeLoop Module


Overview


#include <ti/iqmath/include/IQmathLib.h>
#include "IQmath_mathacl.h"
#include "pi.h"
#include "stdint.h"
#include "idReferencing.h"
#include "mcLib.h"
#include "iqNum.h"
#include "measure.h"
#include "main.h"
Include dependency graph for closeLoop.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

union  CLOSE_LOOP_FLAGS_T
 Close Loop Flags. More...
 
struct  CLOSE_LOOP_FLAGS_T::closeLoopFlags
 Close Loop Flags Structure. More...
 
struct  CLOSE_LOOP_T
 Closed Loop Working variables. More...
 

Macros

#define SPEED_ERROR_THRESHOLD_PU   0.05
 Speed Error Thresold.
 
#define SPEED_CMD_THRESHOLD   _IQ(0.04)
 Speed command Threshold.
 
#define TRANSITION_SIN_ANGLE_ALIGN_THRESHOLD   _IQ(0.08715574275)
 Transition Parameter.
 

Enumerations

enum  COMMUTATION_STATE_TYPES {
  COMMUTATION_UNALIGNED = 0,
  COMMUTATION_ALIGNED = 1
}
 Commutation States. More...
 
enum  SPEED_CHANGE_STATE_TYPES {
  CLOSE_LOOP_UNDEFINED_STATE = 0,
  CLOSE_LOOP_STEADY_STATE = 1,
  CLOSE_LOOP_ACCELERATE = 2,
  CLOSE_LOOP_DECELERATE = 3
}
 Transition States. More...
 
enum  APP_CONTROL_TYPES {
  CONTROL_SPEED = 0,
  CONTROL_POWER = 1,
  CONTROL_TORQUE = 2,
  CONTROL_VOLTAGE = 3
}
 Control types. More...
 

Functions

void closeLoopInit (CLOSE_LOOP_T *pCloseLoop)
 Close Loop Init. More...
 
void closeLoopRun (CLOSE_LOOP_T *pCloseLoop)
 Close Loop Run. More...
 
void closeLoopLowPriorityRun (CLOSE_LOOP_T *pCloseLoop)
 Close Loop Low Priority run. More...
 
_Bool getCloseLoopAlignedStatus (CLOSE_LOOP_T *pCloseLoop)
 get Closed loop align status More...
 
_Bool getAvsStatus (CLOSE_LOOP_T *pCloseLoop)
 get AVS Status More...
 

Enumeration Type Documentation

§ COMMUTATION_STATE_TYPES

Commutation States.

Enumerator
COMMUTATION_UNALIGNED 

Commutation not aligned to estimator

COMMUTATION_ALIGNED 

Commutation aligned to estimator

§ SPEED_CHANGE_STATE_TYPES

Transition States.

Enumerator
CLOSE_LOOP_UNDEFINED_STATE 

Speed reference: undefined

CLOSE_LOOP_STEADY_STATE 

Speed reference reached steady state

CLOSE_LOOP_ACCELERATE 

Speed reference: accelerate

CLOSE_LOOP_DECELERATE 

Speed reference: decelerate

§ APP_CONTROL_TYPES

Control types.

Enumerator
CONTROL_SPEED 

Speed Control

CONTROL_POWER 

Power Control

CONTROL_TORQUE 

Torque Control

CONTROL_VOLTAGE 

Voltage Control

Function Documentation

§ closeLoopInit()

void closeLoopInit ( CLOSE_LOOP_T pCloseLoop)

§ closeLoopRun()

void closeLoopRun ( CLOSE_LOOP_T pCloseLoop)

§ closeLoopLowPriorityRun()

void closeLoopLowPriorityRun ( CLOSE_LOOP_T pCloseLoop)

§ getCloseLoopAlignedStatus()

_Bool getCloseLoopAlignedStatus ( CLOSE_LOOP_T pCloseLoop)
inline

get Closed loop align status

Parameters
[in]*pCloseLoopPointer
Returns
Returns the status

References COMMUTATION_ALIGNED, and CLOSE_LOOP_T::commutationState.

Referenced by focLowPriorityRun().

§ getAvsStatus()

_Bool getAvsStatus ( CLOSE_LOOP_T pCloseLoop)
inline
© Copyright 1995-2025, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale