MotorWare f2806x Module API Documentation
float/user.c
Go to the documentation of this file.
1 
6 
7 // **************************************************************************
8 // the includes
9 
10 #include "user.h"
11 
12 
13 // **************************************************************************
14 // the defines
15 #ifdef __TMS320C28XX_CLA__
16 #pragma CODE_SECTION(USER_setParams,"Cla1Prog2");
17 #endif
18 
19 
20 // **************************************************************************
21 // the typedefs
22 
23 
24 // **************************************************************************
25 // the functions
26 
27 
28 void USER_setParams(USER_Params *pUserParams)
29 {
30  pUserParams->dcBus_nominal_V = USER_NOMINAL_DC_BUS_VOLTAGE_V;
31 
32  pUserParams->numIsrTicksPerCtrlTick = USER_NUM_ISR_TICKS_PER_CTRL_TICK;
33  pUserParams->numIsrTicksPerEstTick = USER_NUM_ISR_TICKS_PER_EST_TICK;
34  pUserParams->numIsrTicksPerTrajTick = USER_NUM_ISR_TICKS_PER_TRAJ_TICK;
35 
36  pUserParams->numCtrlTicksPerCurrentTick = USER_NUM_CTRL_TICKS_PER_CURRENT_TICK;
37  pUserParams->numCtrlTicksPerSpeedTick = USER_NUM_CTRL_TICKS_PER_SPEED_TICK;
38 
39  pUserParams->numCurrentSensors = USER_NUM_CURRENT_SENSORS;
40  pUserParams->numVoltageSensors = USER_NUM_VOLTAGE_SENSORS;
41 
42  pUserParams->systemFreq_MHz = USER_SYSTEM_FREQ_MHz;
43 
44  pUserParams->pwmPeriod_usec = USER_PWM_PERIOD_usec;
45 
46  pUserParams->voltage_sf = USER_VOLTAGE_SF;
47 
48  pUserParams->current_sf = USER_CURRENT_SF;
49 
50  pUserParams->dcBusPole_rps = USER_DCBUS_POLE_rps;
51 
52  pUserParams->offsetPole_rps = USER_OFFSET_POLE_rps;
53 
54  pUserParams->speedPole_rps = USER_SPEED_POLE_rps;
55 
56  pUserParams->voltageFilterPole_rps = USER_VOLTAGE_FILTER_POLE_rps;
57 
58  pUserParams->maxDutyCycle = USER_MAX_DUTY_CYCLE;
59 
60  pUserParams->motor_type = USER_MOTOR_TYPE;
61 
62  pUserParams->motor_numPolePairs = USER_MOTOR_NUM_POLE_PAIRS;
63  pUserParams->motor_numEncSlots = USER_MOTOR_NUM_ENC_SLOTS;
64 
65  pUserParams->motor_ratedFlux_Wb = USER_MOTOR_RATED_FLUX_VpHz / MATH_TWO_PI;
66 
67  pUserParams->motor_Rr_d_Ohm = USER_MOTOR_Rr_Ohm;
68  pUserParams->motor_Rr_q_Ohm = USER_MOTOR_Rr_Ohm;
69 
70  pUserParams->motor_Rs_a_Ohm = USER_MOTOR_Rs_Ohm;
71  pUserParams->motor_Rs_b_Ohm = USER_MOTOR_Rs_Ohm;
72 
73  pUserParams->motor_Rs_d_Ohm = USER_MOTOR_Rs_Ohm;
74  pUserParams->motor_Rs_q_Ohm = USER_MOTOR_Rs_Ohm;
75 
76  pUserParams->motor_Ls_d_H = USER_MOTOR_Ls_d_H;
77  pUserParams->motor_Ls_q_H = USER_MOTOR_Ls_q_H;
78 
79  pUserParams->maxCurrent_A = USER_MOTOR_MAX_CURRENT_A;
80 
81  pUserParams->IdRated_A = USER_MOTOR_MAGNETIZING_CURRENT_A;
82 
83  pUserParams->Vd_sf = USER_VD_SF;
84  pUserParams->maxVsMag_V = USER_NOMINAL_DC_BUS_VOLTAGE_V;
85 
86  /*LDRA_INSPECTED 139 S MR12 14.3 ""Its a compile time flag providing user a choice to use or bypass motor identification; so OK"*/
87  if(USER_BYPASS_MOTOR_ID == 1)
88  {
89  // Marathon 56H17T2001
90 // pUserParams->BWc_rps = MATH_TWO_PI * 100.0;
91 // pUserParams->BWdelta = (float_t)4.0;
92 // pUserParams->Kctrl_Wb_p_kgm2 = 3.0 * pUserParams->motor_numPolePairs * 0.1 / (2.0 * 0.0001); // 3.0 * numPolesPairs * rotorFlux_Wb / (2.0 * J_kg_m2);
93 
94  // Estun
95 // pUserParams->BWc_rps = MATH_TWO_PI * 40.0;
96 // pUserParams->BWdelta = (float_t)4.0;
97 // pUserParams->Kctrl_Wb_p_kgm2 = 3.0 * pUserParams->motor_numPolePairs * 0.0625 / (2.0 * 0.000031); // 3.0 * numPolesPairs * rotorFlux_Wb / (2.0 * J_kg_m2);
98 
99  // Anaheim
100  pUserParams->BWc_rps = MATH_TWO_PI * (float_t)100.0;
101  pUserParams->BWdelta = (float_t)4.0;
102  pUserParams->Kctrl_Wb_p_kgm2 = (float_t)3.0 * pUserParams->motor_numPolePairs * pUserParams->motor_ratedFlux_Wb /(float_t) (2.0 * 0.000004802); // 3.0 * pUserParams->motor_numPolePairs * 0.1 / (2.0 * 0.00001);
103 
104  // nidec_fan
105 // pUserParams->BWc_rps = MATH_TWO_PI * (float_t)4000.0;
106 // pUserParams->BWdelta = (float_t)4.0;
107 // pUserParams->Kctrl_Wb_p_kgm2 = (float_t)3.0 * pUserParams->motor_numPolePairs * pUserParams->motor_ratedFlux_Wb /(float_t) (2.0 * 0.000004802); // 3.0 * pUserParams->motor_numPolePairs * 0.1 / (2.0 * 0.00001);
108  }
109  else
110  {
111  pUserParams->BWc_rps = MATH_TWO_PI * (float_t)100.0;
112  pUserParams->BWdelta = (float_t)10.0;
113  pUserParams->Kctrl_Wb_p_kgm2 = (float_t)3.0 * pUserParams->motor_numPolePairs * (float_t)(0.001) / (float_t)(2.0 * 0.000001); // 3.0 * pUserParams->motor_numPolePairs * 0.1 / (2.0 * 0.00001);
114  }
115 
116  pUserParams->angleDelayed_sf_sec = (float_t)0.5 * USER_CTRL_PERIOD_sec;
117 
118  pUserParams->fluxExcFreq_Hz = USER_MOTOR_FLUX_EXC_FREQ_Hz;
119 
120  pUserParams->calWaitTime[CAL_State_Error] = 0;
121  pUserParams->calWaitTime[CAL_State_Idle] = 0;
122  pUserParams->calWaitTime[CAL_State_AdcOffset] = (int_least32_t)( 5.0 * USER_CTRL_FREQ_Hz);
123  pUserParams->calWaitTime[CAL_State_Done] = 0;
124 
125  pUserParams->ctrlWaitTime[CTRL_State_Error] = 0;
126  pUserParams->ctrlWaitTime[CTRL_State_Idle] = 0;
127  pUserParams->ctrlWaitTime[CTRL_State_OnLine] = 0;
128 
129  pUserParams->estWaitTime[EST_State_Error] = 0;
130  pUserParams->estWaitTime[EST_State_Idle] = 0;
131  pUserParams->estWaitTime[EST_State_RoverL] = (int_least32_t)( 5.0 * USER_EST_FREQ_Hz);
132  pUserParams->estWaitTime[EST_State_Rs] = 0;
133  pUserParams->estWaitTime[EST_State_RampUp] = (int_least32_t)((USER_MOTOR_FLUX_EXC_FREQ_Hz / USER_MAX_ACCEL_Hzps + (float_t)1.0) * USER_EST_FREQ_Hz);
134  pUserParams->estWaitTime[EST_State_ConstSpeed] = (int_least32_t)( 1.0 * USER_EST_FREQ_Hz);
135  pUserParams->estWaitTime[EST_State_IdRated] = (int_least32_t)(20.0 * USER_EST_FREQ_Hz);
136  pUserParams->estWaitTime[EST_State_RatedFlux_OL] = (int_least32_t)( 1.0 * USER_EST_FREQ_Hz);
137  pUserParams->estWaitTime[EST_State_RatedFlux] = 0;
138  pUserParams->estWaitTime[EST_State_RampDown] = (int_least32_t)( 0.0 * USER_EST_FREQ_Hz);
139  pUserParams->estWaitTime[EST_State_LockRotor] = 0;
140  pUserParams->estWaitTime[EST_State_Ls] = 0;
141  pUserParams->estWaitTime[EST_State_Rr] = (int_least32_t)( 5.0 * USER_EST_FREQ_Hz);
142  pUserParams->estWaitTime[EST_State_MotorIdentified] = 0;
143  pUserParams->estWaitTime[EST_State_OnLine] = 0;
144 
145  pUserParams->FluxWaitTime[EST_Flux_State_Error] = 0;
146  pUserParams->FluxWaitTime[EST_Flux_State_Idle] = 0;
147  pUserParams->FluxWaitTime[EST_Flux_State_CL1] = (int_least32_t)(10.0 * USER_EST_FREQ_Hz);
148  pUserParams->FluxWaitTime[EST_Flux_State_CL2] = (int_least32_t)( 0.2 * USER_EST_FREQ_Hz);
149  pUserParams->FluxWaitTime[EST_Flux_State_Fine] = (int_least32_t)(20.0 * USER_EST_FREQ_Hz);
150  pUserParams->FluxWaitTime[EST_Flux_State_Done] = 0;
151 
152  pUserParams->LsWaitTime[EST_Ls_State_Error] = 0;
153  pUserParams->LsWaitTime[EST_Ls_State_Idle] = 0;
154  pUserParams->LsWaitTime[EST_Ls_State_RampUp] = (int_least32_t)(10.0 * USER_EST_FREQ_Hz);
155  pUserParams->LsWaitTime[EST_Ls_State_Coarse] = (int_least32_t)(30.0 * USER_EST_FREQ_Hz);
156  pUserParams->LsWaitTime[EST_Ls_State_Fine] = (int_least32_t)(30.0 * USER_EST_FREQ_Hz);
157  pUserParams->LsWaitTime[EST_Ls_State_Done] = 0;
158 
159  pUserParams->RrWaitTime[EST_Rr_State_Error] = 0;
160  pUserParams->RrWaitTime[EST_Rr_State_Idle] = 0;
161  pUserParams->RrWaitTime[EST_Rr_State_RampUp] = (int_least32_t)( 1.0 * USER_EST_FREQ_Hz);
162  pUserParams->RrWaitTime[EST_Rr_State_Coarse] = (int_least32_t)(10.0 * USER_EST_FREQ_Hz);
163  pUserParams->RrWaitTime[EST_Rr_State_Fine] = (int_least32_t)(30.0 * USER_EST_FREQ_Hz);
164  pUserParams->RrWaitTime[EST_Rr_State_Done] = 0;
165 
166  pUserParams->RsWaitTime[EST_Rs_State_Error] = 0;
167  pUserParams->RsWaitTime[EST_Rs_State_Idle] = 0;
168  pUserParams->RsWaitTime[EST_Rs_State_RampUp] = (int_least32_t)( 1.0 * USER_EST_FREQ_Hz);
169  pUserParams->RsWaitTime[EST_Rs_State_Coarse] = (int_least32_t)( 2.0 * USER_EST_FREQ_Hz);
170  pUserParams->RsWaitTime[EST_Rs_State_Fine] = (int_least32_t)(10.0 * USER_EST_FREQ_Hz);
171  pUserParams->RsWaitTime[EST_Rs_State_Done] = 0;
172 
173  pUserParams->trajWaitTime[EST_Traj_State_Error] = 0;
174  pUserParams->trajWaitTime[EST_Traj_State_Idle] = 0;
175  pUserParams->trajWaitTime[EST_Traj_State_Est] = 0;
176  pUserParams->trajWaitTime[EST_Traj_State_OnLine] = 0;
177 
178  pUserParams->ctrlFreq_Hz = USER_CTRL_FREQ_Hz;
179 
180  pUserParams->estFreq_Hz = USER_EST_FREQ_Hz;
181 
182  pUserParams->RoverL_excFreq_Hz = USER_R_OVER_L_EXC_FREQ_Hz;
183 
184  pUserParams->trajFreq_Hz = USER_TRAJ_FREQ_Hz;
185 
186  pUserParams->ctrlPeriod_sec = USER_CTRL_PERIOD_sec;
187 
188  pUserParams->maxAccel_Hzps = USER_MAX_ACCEL_Hzps;
189 
190  pUserParams->maxCurrent_resEst_A = USER_MOTOR_RES_EST_CURRENT_A;
191  pUserParams->maxCurrent_indEst_A = USER_MOTOR_IND_EST_CURRENT_A;
192 
193  pUserParams->maxCurrentDelta_A = USER_MAX_CURRENT_DELTA_A;
194  pUserParams->maxCurrentDelta_pw_A = USER_MAX_CURRENT_DELTA_PW_A;
195 
196  pUserParams->IdRated_delta_A = USER_IDRATED_DELTA_A;
197 
198  pUserParams->forceAngleFreq_Hz = USER_FORCE_ANGLE_FREQ_Hz;
199 
200  pUserParams->indEst_speedMaxFraction = USER_SPEEDMAX_FRACTION_FOR_L_IDENT;
201 
202  pUserParams->IdRatedFraction_indEst = USER_IDRATED_FRACTION_FOR_L_IDENT;
203 
204  pUserParams->pwGain = USER_PW_GAIN;
205 
206  pUserParams->Kp_min_VpA = (float_t)0.001;
207  pUserParams->Kp_max_VpA = (float_t)1000.0;
208 
209  pUserParams->RoverL_Kp_sf = USER_R_OVER_L_KP_SF;
210  pUserParams->RoverL_min_rps = MATH_TWO_PI * (float_t)5.0;
211  pUserParams->RoverL_max_rps = MATH_TWO_PI * (float_t)5000.0;
212 
213  pUserParams->oneOverDcBus_min_invV = (float_t)1.0 / (float_t)400.0;
214  pUserParams->oneOverDcBus_max_invV = (float_t)1.0 / (float_t)10.0;
215 
216  pUserParams->Ls_d_H = (float_t)1.0e-6;
217  pUserParams->Ls_q_H = (float_t)1.0e-6;
218  pUserParams->Ls_coarseDelta_H = (float_t)0.0000001;
219  pUserParams->Ls_fineDelta_H = (float_t)0.00000001;
220  pUserParams->Ls_min_H = (float_t)0.000001;
221  pUserParams->Ls_max_H = (float_t)100.0;
222 
223  pUserParams->Rr_Ohm = (float_t)0.0;
224  pUserParams->Rr_coarseDelta_Ohm = (float_t)0.0001;
225  pUserParams->Rr_fineDelta_Ohm = (float_t)0.00001;
226  pUserParams->Rr_min_Ohm = (float_t)0.0;
227  pUserParams->Rr_max_Ohm = (float_t)1000.0;
228 
229  pUserParams->Rs_Ohm = (float_t)0.0;
230  pUserParams->Rs_coarseDelta_Ohm = (float_t)0.01;
231  pUserParams->Rs_fineDelta_Ohm = (float_t)0.00001;
232  pUserParams->Rs_min_Ohm = (float_t)0.001;
233  pUserParams->Rs_max_Ohm = (float_t)1000.0;
234 
235  pUserParams->RsOnLine_DeltaInc_Ohm = (float_t)0.00001;
236  pUserParams->RsOnLine_DeltaDec_Ohm = (float_t)0.00001;
237  pUserParams->RsOnLine_min_Ohm = (float_t)0.001;
238  pUserParams->RsOnLine_max_Ohm = (float_t)1000.0;
239 
240  pUserParams->RsOnLine_angleDelta_rad = (float_t)0.00001;
241  pUserParams->RsOnLine_pole_rps = MATH_TWO_PI * (float_t)0.2;
242 
243  pUserParams->flag_bypassMotorId = USER_BYPASS_MOTOR_ID;
244 
245  return;
246 } // end of USER_setParams() function
247 
248 // end of file
249 
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.
the controller error state
Definition: ctrl_states.h:35
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.
lock the rotor
Definition: est_states.h:65
stator inductance estimation state
Definition: est_states.h:66
uint_least32_t estWaitTime[EST_numStates]
Defines the wait times for each estimator state, estimator ticks.
uint_least32_t RsWaitTime[EST_Rs_numStates]
Defines the wait times for each Rs estimator, estimator ticks.
the coarse estimation state
Definition: est_Rr_states.h:39
constant speed after ramp up
Definition: est_states.h:59
motor identified state
Definition: est_states.h:68
estimate the open loop rated flux
Definition: est_states.h:62
float_t motor_Rs_d_Ohm
Defines the direct stator resistance, Ohm.
float_t Rr_coarseDelta_Ohm
Defines the delta resistance value during coarse rotor resistance estimation, Ohm.
the ramp up state
Definition: est_Ls_states.h:49
float_t maxAccel_Hzps
Defines the maximum acceleration for the speed profiles, Hz/s.
the done state
Definition: est_Rs_states.h:42
float_t motor_Rs_a_Ohm
Defines the alpha stator resistance, Ohm.
#define MATH_TWO_PI
Defines 2*pi.
Definition: 32b/math.h:109
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_least16_t systemFreq_MHz
Defines the system clock frequency, MHz.
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.
the controller idle state
Definition: ctrl_states.h:36
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.
control Id and estimate the rated flux
Definition: est_states.h:61
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.
uint_least8_t numCurrentSensors
Defines the number of current sensors.
the fine estimation state
Definition: est_Rs_states.h:41
error state
Definition: cal_states.h:48
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.
uint_least16_t numCtrlTicksPerCurrentTick
Defines the number of controller clock ticks per current controller clock tick.
float_t Ls_d_H
Defines the default stator inductance in the direct direction, H.
estimate the rated flux
Definition: est_states.h:63
the fine estimation state
Definition: est_Rr_states.h:40
float_t Rr_Ohm
Defines the default rotor resistance value, Ohm.
the coarse estimation state
Definition: est_Rs_states.h:40
Rs estimation state.
Definition: est_states.h:56
the fine estimation state
Definition: est_Ls_states.h:52
float_t voltageFilterPole_rps
Defines the analog voltage filter pole location, rad/s.
ramp down the speed
Definition: est_states.h:64
int_least32_t RrWaitTime[EST_Rr_numStates]
Defines the wait times for each Rr estimator state, estimator ticks.
the done state
Definition: est_Rr_states.h:41
online parameter estimation
Definition: est_states.h:69
the Id ramp up state
Definition: est_Rs_states.h:39
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.
the trajectory generator error state
MOTOR_Type_e motor_type
Defines the motor type.
float_t Rs_max_Ohm
Defines the maximum stator resistance value allowed, Ohm.
float_t Ls_q_H
Defines the default stator inductance in the quadrature direction, H.
the Id ramp up state
Definition: est_Rr_states.h:38
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 maxDutyCycle
Defines the maximum duty cycle.
uint_least32_t trajFreq_Hz
Defines the trajectory frequency, Hz.
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 coarse estimation state
Definition: est_Ls_states.h:51
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.
the trajectory generator parameter estimation state
ramp up the speed
Definition: est_states.h:57
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.
idle state
Definition: cal_states.h:49
the controller online state
Definition: ctrl_states.h:38
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.
the trajectory generator idle state
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.
closed loop control stage 2
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.
void USER_setParams(USER_Params *pUserParams)
Definition: float/user.c:28
float_t RsOnLine_DeltaInc_Ohm
Defines the delta resistance increment value during online stator resistance estimation, Ohm.
uint_least16_t numCtrlTicksPerSpeedTick
Defines the number of controller clock ticks per speed controller clock tick.
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.
float_t speedPole_rps
Defines the pole location for the speed control filter, rad/s.
uint_least16_t numIsrTicksPerCtrlTick
Defines the number of Interrupt Service Routine (ISR) clock ticks per controller clock tick...
float_t motor_Rr_q_Ohm
Defines the quadrature rotor resistance, Ohm.
float_t Rs_Ohm
Defines the default stator resistance value, Ohm.
R/L estimation.
Definition: est_states.h:55
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.
uint_least32_t ctrlFreq_Hz
Defines the controller 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...
closed loop control stage 1
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.
the done state
Definition: est_Ls_states.h:53
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.
ADC offset calibration state.
Definition: cal_states.h:50
uint_least32_t FluxWaitTime[EST_Flux_numStates]
Defines the wait times for each Ls estimator, estimator ticks.
the trajectory generator online state
done state
Definition: cal_states.h:51
uint_least32_t estFreq_Hz
Defines the estimator frequency, Hz.
float_t oneOverDcBus_min_invV
Defines the minimum estimated 1/dcBus value allowed, 1/V.
rotor resistance estimation state
Definition: est_states.h:67
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.
fine estimate of flux
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.
float_t motor_Ls_d_H
Defines the direct stator inductance, H.
float_t motor_Ls_q_H
Defines the quadrature stator inductance, H.
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...