📄 vfmrasti.h
字号:
/* ==============================================================================
System Name: ACI3_2
File Name: VFMRASTI.H
Description: Header file for Peripheral independent object for implementation
of Sensorless Volt/Hertz control of a Three Phase AC Induction
Motor using reactive power MRAS speed estimator.
Originator: Digital control systems Group - Texas Instruments
Target dependency: x240/1/2/3/07
To Select the target device see target.h file.
Note that the PWM/sampling frequency in C system is running at 15 kHz, which
is different from the PWM/samping frequency in ASM system (i.e., 20 kHz) as
indicated in the ACI3-2 system documentation. Also, this PWM/samping frequency
in both ASM and C systems are based on x2407 with 40 MHz clock. If the x243 with
20 MHz clock is used, then the PWM/samping frequency may be decreased accordingly.
=====================================================================================
History:
-------------------------------------------------------------------------------------
9-15-2000 Release Rev 1.0
================================================================================= */
#ifndef __VFMRASTI_H__
#define __VFMRASTI_H__
#include <Vhzprof.h>
#include <svgen.h>
#include <volt_cal.h> /* Include header for the PHASEVOLTAGE object */
#include <pid_reg1.h> /* Include header for the PIDREG1 object */
#include <aci_mras.h> /* Include header for the ACIMRAS object */
#include <box_car.h> /* Include header for the BOXCAR object */
#include <rmp_cntl.h> /* Include header for the RMPCNTL object */
#ifndef TRUE
#define FALSE 0
#define TRUE 1
#endif
/*-------------------------------------------------------------------------------
Miscellaneous Items.
-------------------------------------------------------------------------------*/
typedef struct {int a,b,c ;} triad;
typedef struct {int d,q ;} dq;
/*------------------------------------------------------------------------------
Define the structure of the VFMRAS_TI Object. This object has all the data
necessary for one instance of a sensorless V/Hz system.
------------------------------------------------------------------------------*/
typedef struct {
/*------------------------------------------------------------------------------
Declarations for the 'terminal variables' for the Algorithm. The framework
should communicate such quantities as freq_testing, etc to the algorithm by
modifying these terminal variables. It is not recommended that the framework
directly modify the internal varibles of the algorithm.
------------------------------------------------------------------------------*/
int GPR0;
int GPR1;
int GPR2;
int freq_testing;
int freq_testing_rpm;
int speed_ref;
int speed_ref_rpm;
int syn_speed;
int cl_flag;
int Vbus;
/*------------------------------------------------------------------------------
Declare currents variable. The structure object is defined in this header file.
------------------------------------------------------------------------------*/
triad current_abc;
dq current_dq;
/*------------------------------------------------------------------------------
Declare one vhz profile.
------------------------------------------------------------------------------*/
VHZPROFILE vhzprof;
/*------------------------------------------------------------------------------
Declaration for the space vector generation module. The defaults are set in
SVGEN.H
------------------------------------------------------------------------------*/
SVGENMF svgen;
/*------------------------------------------------------------------------------
Declaration for the voltage reconstruction module. The defaults are set in
VOLT_CAL.H
------------------------------------------------------------------------------*/
PHASEVOLTAGE volt;
/*------------------------------------------------------------------------------
Declaration for the PID controller object. The defaults are set in
PID_REG1.H
------------------------------------------------------------------------------*/
PIDREG1 pid;
/*------------------------------------------------------------------------------
Declaration for the speed estimation module. The defaults are set in
ACI_MRAS.H
------------------------------------------------------------------------------*/
ACIMRAS mras;
/*------------------------------------------------------------------------------
Declaration for the box car module. The defaults are set in
BOX_CAR.H
------------------------------------------------------------------------------*/
BOXCAR bc;
/*------------------------------------------------------------------------------
Declaration for the ramp control module. The defaults are set in
RMP_CNTL.H
------------------------------------------------------------------------------*/
RMPCNTL rmpc;
} VFMRAS_TI;
typedef VFMRAS_TI *VFMRAS_TI_handle;
#define DEFAULT_SPEED_PU 0x3333
#define DEFAULT_SPEED_RPM 1440
#define DEFAULT_CLOSELOOP_FLAG 0
#define DEFAULT_CURRENT_ABC {0,0,0}
#define DEFAULT_CURRENT_DQ {0,0}
#define DEFAULT_VBUS 0
#define VFMRAS_TI_INITVALS \
{ \
0,0,0, \
DEFAULT_SPEED_PU, \
DEFAULT_SPEED_RPM, \
DEFAULT_SPEED_PU, \
DEFAULT_SPEED_RPM, \
DEFAULT_SPEED_PU, \
DEFAULT_CLOSELOOP_FLAG, \
DEFAULT_VBUS, \
DEFAULT_CURRENT_ABC, \
DEFAULT_CURRENT_DQ, \
DEFAULT_PROFILE, \
SVGENMF_DEFAULTS, \
PHASEVOLTAGE_DEFAULTS, \
PIDREG1_DEFAULTS, \
ACIMRAS_DEFAULTS, \
BOXCAR_DEFAULTS, \
RMPCNTL_DEFAULTS \
}
/*------------------------------------------------------------------------------
Prototypes for functions implemented in VFMRASTI.C
------------------------------------------------------------------------------*/
void VFMRAS_TI_Init(VFMRAS_TI_handle);
void VFMRAS_TI_Run(VFMRAS_TI_handle);
/*------------------------------------------------------------------------------
Prototypes for following function implemented in mul_q.asm
------------------------------------------------------------------------------*/
int mul_q(int,int,int,int,int); /* Multiplication of any two Q numbers */
#endif /* __VFMRASTI_H__ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -