MotorWare f2806x Module API Documentation
user/src/float/userParams.h
Go to the documentation of this file.
1 #ifndef _USERPARAMS_H_
2 #define _USERPARAMS_H_
3 
8 
9 
10 // **************************************************************************
11 // the includes
12 
13 // modules
25 
26 
27 // platforms
28 
29 
34 
35 
36 
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40 
41 
42 // **************************************************************************
43 // the defines
44 
45 
46 // **************************************************************************
47 // the typedefs
48 
51 typedef struct _USER_Params_
52 {
54 
55  int_least16_t numIsrTicksPerCtrlTick;
56  int_least16_t numIsrTicksPerEstTick;
57  int_least16_t numIsrTicksPerTrajTick;
58 
60  int_least16_t numCtrlTicksPerSpeedTick;
61 
62  uint_least8_t numCurrentSensors;
63  uint_least8_t numVoltageSensors;
64 
66 
68 
70 
72 
74 
76 
78 
80 
82 
84 
85  uint_least16_t motor_numPolePairs;
86  uint_least16_t motor_numEncSlots;
87 
89 
92 
95 
98 
101 
103 
105 
108 
112 
114 
116 
117  int_least32_t calWaitTime[CAL_numStates];
118 
119  int_least32_t ctrlWaitTime[CTRL_numStates];
120 
121  int_least32_t estWaitTime[EST_numStates];
122 
124 
125  int_least32_t LsWaitTime[EST_Ls_numStates];
126 
127  int_least32_t RrWaitTime[EST_Rr_numStates];
128 
129  int_least32_t RsWaitTime[EST_Rs_numStates];
130 
132 
134 
136 
138 
140 
142 
144 
147 
150 
152 
154 
156 
158 
160 
163 
167 
170 
177 
183 
189 
194 
197 
199 
201 
202 } USER_Params;
203 
204 
205 // **************************************************************************
206 // the functions
207 
208 
209 #ifdef __cplusplus
210 }
211 #endif // extern "C"
212 
214 #endif // end of _USERPARAMS_H_ definition
215 
float_t fluxExcFreq_Hz
Defines the flux excitation frequency, Hz.
float_t angleDelayed_sf_sec
Defines the scale factor for computing the angle considering system delay, sec.
float_t Rr_min_Ohm
Defines the minimum rotor resistance value allowed, Ohm.
uint_least16_t motor_numEncSlots
Defines the number of encoder slots if quadrature encoder is connected.
float_t forceAngleFreq_Hz
Defines the force angle frequency, Hz.
uint_least32_t estWaitTime[EST_numStates]
Defines the wait times for each estimator state, estimator ticks.
Contains the public interface to the types definitions.
uint_least32_t RsWaitTime[EST_Rs_numStates]
Defines the wait times for each Rs estimator, estimator ticks.
int_least16_t numCtrlTicksPerSpeedTick
Defines the number of controller clock ticks per speed controller clock tick.
Contains the states for the flux estimator (EST_Flux) module routines.
float_t motor_Rs_d_Ohm
Defines the direct stator resistance, Ohm.
Contains the states for the flux estimator (EST_Flux) module routines.
float_t Rr_coarseDelta_Ohm
Defines the delta resistance value during coarse rotor resistance estimation, Ohm.
Contains the public interface to the math (MATH) module routines.
struct _USER_Params_ USER_Params
Defines a structure for the user parameters.
float_t maxAccel_Hzps
Defines the maximum acceleration for the speed profiles, Hz/s.
float_t motor_Rs_a_Ohm
Defines the alpha stator resistance, Ohm.
the number of controller states
Definition: ctrl_states.h:39
float_t BWc_rps
Defines the bandwidth of the current controllers, rad/sec.
float_t ctrlPeriod_sec
Defines the controller execution period, sec.
float_t maxCurrent_A
Defines the maximum current value, A.
uint_least32_t LsWaitTime[EST_Ls_numStates]
Defines the wait times for each Ls estimator, estimator ticks.
float_t Kp_max_VpA
Defines the maximum Kp value for the current controller, V/A.
float_t Rs_min_Ohm
Defines the minimum stator resistance value allowed, Ohm.
uint_least32_t ctrlWaitTime[CTRL_numStates]
Defines the wait times for each controller state, estimator ticks.
float_t pwGain
Defines the power warp gain for computing Id reference.
float_t motor_Rs_q_Ohm
Defines the quadrature stator resistance, Ohm.
Defines a structure for the user parameters.
the number of estimator states
Definition: est_states.h:70
uint_least8_t numCurrentSensors
Defines the number of current sensors.
float_t Rr_max_Ohm
Defines the maximum rotor resistance value allowed, Ohm.
float_t Kp_min_VpA
Defines the minimum Kp value for the current controller, V/A.
float_t Ls_max_H
Defines the maximum stator inductance value allowed, H.
Contains the states for the estimator (EST) module routines.
float_t Ls_d_H
Defines the default stator inductance in the direct direction, H.
float_t Rr_Ohm
Defines the default rotor resistance value, Ohm.
Contains the states for the stator inductance estimator (EST_Ls) module routines. ...
float_t voltageFilterPole_rps
Defines the analog voltage filter pole location, rad/s.
int_least32_t RrWaitTime[EST_Rr_numStates]
Defines the wait times for each Rr estimator state, estimator ticks.
float_t maxVsMag_V
Defines the maximum stator voltage magnitude, V.
float_t RsOnLine_pole_rps
Defines the filter pole for online stator resistance estimation, rad/sec.
float_t RoverL_excFreq_Hz
Defines the R/L excitation frequency, Hz.
int_least16_t numCtrlTicksPerCurrentTick
Defines the number of controller clock ticks per current controller clock tick.
MOTOR_Type_e
Enumeration for the motor types.
Definition: 32b/motor.h:71
MOTOR_Type_e motor_type
Defines the motor type.
float_t Rs_max_Ohm
Defines the maximum stator resistance value allowed, Ohm.
float_t ctrlFreq_Hz
Defines the controller frequency, Hz.
float_t Ls_q_H
Defines the default stator inductance in the quadrature direction, H.
float_t voltage_sf
Defines the voltage scale factor for the system.
float_t BWdelta
Defines the bandwidth scaling to maximize phase margin.
float_t Reserved[20]
Reserved Section.
float_t maxDutyCycle
Defines the maximum duty cycle.
float_t RoverL_Kp_sf
Defines the Kp scale factor used during R/L, pu.
float_t Ls_fineDelta_H
Defines the delta inductance value during the fine stator inductance estimation, H.
uint_least8_t numVoltageSensors
Defines the number of voltage sensors.
float_t Vd_sf
Defines the Vd scale factor to prevent a Vd only component for the Vdq vector.
float_t Rr_fineDelta_Ohm
Defines the delta resistance value during fine rotor resistance estimation, Ohm.
the number of stator inductance estimator states
Definition: est_Ls_states.h:54
float_t offsetPole_rps
Defines the pole location for the voltage and current offset estimation, rad/s.
float_t RsOnLine_min_Ohm
Defines the minimum online stator resistance value allowed, Ohm.
float_t maxCurrent_indEst_A
Defines the maximum current value for inductance estimation, A.
int_least32_t trajWaitTime[EST_Traj_numStates]
Defines the wait times for each trajectory state, isr ticks.
float_t trajFreq_Hz
Defines the trajectory frequency, Hz.
float_t RsOnLine_max_Ohm
Defines the maximum online stator resistance value allowed, Ohm.
float_t pwmPeriod_usec
Defines the Pulse Width Modulation (PWM) period, usec.
float_t Kctrl_Wb_p_kgm2
Defines the speed controller constant, Wb/(kg*m^2)
float_t RsOnLine_DeltaDec_Ohm
Defines the delta resistance decrement value during online stator resistance estimation, Ohm.
float_t current_sf
Defines the current scale factor for the system.
bool flag_bypassMotorId
A flag to bypass motor identification and use the motor parameters.
the number of stator resistance estimator states
Definition: est_Rr_states.h:42
float_t indEst_speedMaxFraction
Defines the fraction of SpeedMax to use during inductance estimation.
float_t RsOnLine_angleDelta_rad
Defines the delta angle value during online stator resistance estimation, rad.
float_t IdRatedFraction_indEst
Defines the fraction of Id rated current to use during inductance estimation.
float_t dcBusPole_rps
Defines the pole location for the DC bus filter, rad/s.
float_t RsOnLine_DeltaInc_Ohm
Defines the delta resistance increment value during online stator resistance estimation, Ohm.
Contains the public interface to the rotor resistance estimator (EST_Rr) module routines.
float_t IdRated_delta_A
Defines the Id rated delta current value, A.
float_t Ls_min_H
Defines the minimum stator inductance value allowed, H.
float_t Ls_coarseDelta_H
Defines the delta inductance value during the coarse stator inductance estimation, H.
Contains the public interface to the stator resistance estimator (EST_Rs) module routines.
float_t speedPole_rps
Defines the pole location for the speed control filter, rad/s.
float_t motor_Rr_q_Ohm
Defines the quadrature rotor resistance, Ohm.
float_t Rs_Ohm
Defines the default stator resistance value, Ohm.
float_t motor_ratedFlux_Wb
Defines the rated flux of the motor, Wb.
float_t Rs_coarseDelta_Ohm
Defines the delta resistance value during coarse stator resistance estimation, Ohm.
the number of trajectory generator states
float_t estFreq_Hz
Defines the estimator frequency, Hz.
float_t motor_Rr_d_Ohm
Defines the direct rotor resistance, Ohm.
float_t RoverL_min_rps
Defines the minimum estimated R/L value allowed, rad/sec.
int_least16_t numIsrTicksPerTrajTick
Defines the number of Interrupt Service Routine (ISR) clock ticks per controller clock tick...
float_t dcBus_nominal_V
Defines the nominal DC bus voltage, V.
uint_least16_t motor_numPolePairs
Defines the number of pole pairs for the motor.
int_least16_t numIsrTicksPerCtrlTick
Defines the number of Interrupt Service Routine (ISR) clock ticks per controller clock tick...
float_t systemFreq_MHz
Defines the system clock frequency, MHz.
float_t maxCurrentDelta_pw_A
Defines the maximum current delta for Id current trajectory during power warp mode.
float_t maxCurrentDelta_A
Defines the maximum current delta for Id current trajectory.
float_t motor_Rs_b_Ohm
Defines the beta stator resistance, Ohm.
uint_least32_t FluxWaitTime[EST_Flux_numStates]
Defines the wait times for each Ls estimator, estimator ticks.
Contains the public interface to the calibration (CAL) module routines.
float_t oneOverDcBus_min_invV
Defines the minimum estimated 1/dcBus value allowed, 1/V.
float_t Rs_fineDelta_Ohm
Defines the delta resistance value during fine stator resistance estimation, Ohm. ...
float_t maxCurrent_resEst_A
Defines the maximum current value for resistance estimation, A.
the number of stator resistance estimator states
Definition: est_Rs_states.h:43
float_t IdRated_A
Defines the Id rated current value, A.
float_t RoverL_max_rps
Defines the maximum estimated R/L value allowed, rad/sec.
the total number of states
Definition: cal_states.h:52
float_t motor_Ls_d_H
Defines the direct stator inductance, H.
float_t motor_Ls_q_H
Defines the quadrature stator inductance, H.
the number of flux estimator states
float_t oneOverDcBus_max_invV
Defines the maximum estimated 1/dcBus value allowed, 1/V.
int_least32_t calWaitTime[CAL_numStates]
Defines the wait times for each calibrator state, isr ticks.
float float_t
Defines the portable data type for 32 bit, signed floating-point data.
Definition: types.h:121
int_least16_t numIsrTicksPerEstTick
Defines the number of Interrupt Service Routine (ISR) clock ticks per controller clock tick...