#include <math.h>
#include "stdbool.h"
#include "stdint.h"
#include "f28x_project.h"
#include "device.h"
#include "f28x_bmsk.h"
#include "fcl_enum.h"
#include "fcl_cmplx_ctrl.h"
#include "qep_defs.h"
#include "epwm.h"
#include "eqep.h"
#include "rampgen.h"
#include "rmp_cntl.h"
#include "ipark.h"
#include "clarke.h"
#include "park.h"
#include "speed_fr.h"
#include "svgen.h"
#include "pi.h"
#include "pid_grando.h"
#include "DCLF32.h"
#include "DCL_NLPID.h"
#include "motor_drive_settings.h"
#include "motor_drive_user.h"
Go to the source code of this file.
Data Structures | |
struct | _FCL_Parameters_t_ |
typedefs for motorVars More... | |
struct | _MOTOR_Vars_t_ |
typedefs for motorVars More... | |
Macros | |
#define | PI 3.14159265358979 |
#define | FCL_PARS_DEFAULTS |
#define | MOTOR_DEFAULTS |
#define | MOTOR_DEFAULTS |
#define | MOTOR_DEFAULTS |
Typedefs | |
typedef struct _FCL_Parameters_t_ | FCL_Parameters_t |
typedefs for motorVars More... | |
typedef struct _MOTOR_Vars_t_ | MOTOR_Vars_t |
typedefs for motorVars More... | |
Functions | |
uint32_t | FCL_getSwVersion (void) |
void | FCL_initPWM (MOTOR_Vars_t *pMotor, const uint32_t pwmBaseU, const uint32_t pwmBaseV, const uint32_t pwmBaseW) |
void | FCL_initQEP (MOTOR_Vars_t *pMotor, const uint32_t qepBaseA) |
void | FCL_initADC_2In (MOTOR_Vars_t *pMotor, uint32_t adcBaseW, const uint32_t adcResultBaseV, ADC_PPBNumber adcV_PPBNum, const uint32_t adcResultBaseW, ADC_PPBNumber adcW_PPBNum) |
void | FCL_initADC_3In (MOTOR_Vars_t *pMotor, uint32_t adcBaseW, const uint32_t adcResultBaseU, ADC_PPBNumber adcU_PPBNum, const uint32_t adcResultBaseV, ADC_PPBNumber adcV_PPBNum, const uint32_t adcResultBaseW, ADC_PPBNumber adcW_PPBNum) |
static void | FCL_readCount (MOTOR_Vars_t *pMotor) |
static void | FCL_resetController (MOTOR_Vars_t *pMotor) |
static void | FCL_runPI (FCL_cmplxCtrl_t *pPI) |
static void | FCL_runCCSyn (FCL_cmplxCtrl_t *pId, FCL_cmplxCtrl_t *pIq) |
static void | FCL_runPICtrl (MOTOR_Vars_t *pMotor) |
static void | FCL_runPICtrlWrap (MOTOR_Vars_t *pMotor) |
static void | FCL_runComplexCtrl (MOTOR_Vars_t *pMotor) |
static void | FCL_runComplexCtrlWrap (MOTOR_Vars_t *pMotor) |
static void | FCL_runQEPPosEst (MOTOR_Vars_t *pMotor) |
static void | FCL_runQEPPosEstWrap (MOTOR_Vars_t *pMotor) |
Variables | |
MOTOR_Vars_t | motorVars |
#define PI 3.14159265358979 |
#define FCL_PARS_DEFAULTS |
#define MOTOR_DEFAULTS |
#define MOTOR_DEFAULTS |
#define MOTOR_DEFAULTS |
typedef struct _FCL_Parameters_t_ FCL_Parameters_t |
typedefs for motorVars
typedef struct _MOTOR_Vars_t_ MOTOR_Vars_t |
typedefs for motorVars
uint32_t FCL_getSwVersion | ( | void | ) |
void FCL_initPWM | ( | MOTOR_Vars_t * | pMotor, |
const uint32_t | pwmBaseU, | ||
const uint32_t | pwmBaseV, | ||
const uint32_t | pwmBaseW | ||
) |
void FCL_initQEP | ( | MOTOR_Vars_t * | pMotor, |
const uint32_t | qepBaseA | ||
) |
void FCL_initADC_2In | ( | MOTOR_Vars_t * | pMotor, |
uint32_t | adcBaseW, | ||
const uint32_t | adcResultBaseV, | ||
ADC_PPBNumber | adcV_PPBNum, | ||
const uint32_t | adcResultBaseW, | ||
ADC_PPBNumber | adcW_PPBNum | ||
) |
void FCL_initADC_3In | ( | MOTOR_Vars_t * | pMotor, |
uint32_t | adcBaseW, | ||
const uint32_t | adcResultBaseU, | ||
ADC_PPBNumber | adcU_PPBNum, | ||
const uint32_t | adcResultBaseV, | ||
ADC_PPBNumber | adcV_PPBNum, | ||
const uint32_t | adcResultBaseW, | ||
ADC_PPBNumber | adcW_PPBNum | ||
) |
|
inlinestatic |
References _MOTOR_Vars_t_::fclCycleCount, and _MOTOR_Vars_t_::pwmBaseU.
Referenced by FCL_runComplexCtrl(), and FCL_runPICtrl().
|
inlinestatic |
|
inlinestatic |
References FCL_cmplxCtrl_t::carryOver, FCL_cmplxCtrl_t::err, FCL_cmplxCtrl_t::Kerr, FCL_cmplxCtrl_t::out, FCL_cmplxCtrl_t::Umax, and FCL_cmplxCtrl_t::Umin.
Referenced by FCL_runPICtrl().
|
inlinestatic |
|
inlinestatic |
References _MOTOR_Vars_t_::adcBaseW, _FCL_Parameters_::carrierMid, _FCL_Parameters_::cmidsqrt3, _MOTOR_Vars_t_::cmplx_Id, _MOTOR_Vars_t_::cmplx_Iq, _MOTOR_Vars_t_::curA_PPBRESULT, _MOTOR_Vars_t_::curB_PPBRESULT, FCL_cmplxCtrl_t::err, _MOTOR_Vars_t_::FCL_params, FCL_readCount(), FCL_runPI(), FCL_cmplxCtrl_t::out, _MOTOR_Vars_t_::pADCIntFlag, _MOTOR_Vars_t_::pangle, _MOTOR_Vars_t_::pwmCompA, _MOTOR_Vars_t_::pwmCompB, _MOTOR_Vars_t_::pwmCompC, and FCL_cmplxCtrl_t::ref.
|
inlinestatic |
References _FCL_Parameters_::BemfK, FCL_cmplxCtrl_t::carryOver, _MOTOR_Vars_t_::cmplx_Id, _MOTOR_Vars_t_::cmplx_Iq, FCL_cmplxCtrl_t::err, FCL_cmplxCtrl_t::fbk, _MOTOR_Vars_t_::FCL_params, _FCL_Parameters_::Ibase, FCL_cmplxCtrl_t::Kerr, FCL_cmplxCtrl_t::KerrOld, FCL_cmplxCtrl_t::Ki, FCL_cmplxCtrl_t::Kp, _FCL_Parameters_::Ld, _FCL_Parameters_::Lq, _FCL_Parameters_::Rd, FCL_cmplxCtrl_t::ref, _FCL_Parameters_::Rq, _MOTOR_Vars_t_::speedWe, _MOTOR_Vars_t_::speedWePrev, _FCL_Parameters_::tSamp, _FCL_Parameters_::Vdcbus, _FCL_Parameters_::wccD, and _FCL_Parameters_::wccQ.
|
inlinestatic |
References _MOTOR_Vars_t_::adcBaseW, _FCL_Parameters_::carrierMid, _FCL_Parameters_::cmidsqrt3, _MOTOR_Vars_t_::cmplx_Id, _MOTOR_Vars_t_::cmplx_Iq, _MOTOR_Vars_t_::curA_PPBRESULT, _MOTOR_Vars_t_::curB_PPBRESULT, FCL_cmplxCtrl_t::err, _MOTOR_Vars_t_::FCL_params, FCL_readCount(), FCL_runCCSyn(), FCL_cmplxCtrl_t::out, _MOTOR_Vars_t_::pADCIntFlag, _MOTOR_Vars_t_::pangle, _MOTOR_Vars_t_::pwmCompA, _MOTOR_Vars_t_::pwmCompB, _MOTOR_Vars_t_::pwmCompC, and FCL_cmplxCtrl_t::ref.
|
inlinestatic |
References _FCL_Parameters_::BemfK, FCL_cmplxCtrl_t::carryOver, _MOTOR_Vars_t_::cmplx_Id, _MOTOR_Vars_t_::cmplx_Iq, FCL_cmplxCtrl_t::cosWTs, FCL_cmplxCtrl_t::err, FCL_cmplxCtrl_t::expVal, FCL_cmplxCtrl_t::fbk, _MOTOR_Vars_t_::FCL_params, _FCL_Parameters_::Ibase, FCL_cmplxCtrl_t::kDirect, _FCL_Parameters_::Ld, _FCL_Parameters_::Lq, _FCL_Parameters_::Rd, FCL_cmplxCtrl_t::ref, _FCL_Parameters_::Rq, FCL_cmplxCtrl_t::sinWTs, _MOTOR_Vars_t_::speedWe, _MOTOR_Vars_t_::speedWePrev, _FCL_Parameters_::tSamp, _FCL_Parameters_::Vdcbus, _FCL_Parameters_::Wbase, _FCL_Parameters_::wccD, and _FCL_Parameters_::wccQ.
|
inlinestatic |
|
inlinestatic |
References ENC_ALIGNMENT, _MOTOR_Vars_t_::lsw, _MOTOR_Vars_t_::pQEPRegs, QEP_FLAG_IEL_EVENT, and QEP_FLAG_UTO_EVENT.
MOTOR_Vars_t motorVars |