MotorWare f2806x Module API Documentation

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

fast/src/32b/userParams.h
Go to the documentation of this file.
1 #ifndef _USERPARAMS_H_
2 #define _USERPARAMS_H_
3 /* --COPYRIGHT--,BSD
4 * Copyright (c) 2012, Texas Instruments Incorporated
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 *
11 * * Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 *
14 * * Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the
16 * documentation and/or other materials provided with the distribution.
17 *
18 * * Neither the name of Texas Instruments Incorporated nor the names of
19 * its contributors may be used to endorse or promote products derived
20 * from this software without specific prior written permission.
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
24 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
25 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
26 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
27 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
28 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
29 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
30 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
31 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
32 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 * --/COPYRIGHT--*/
34
39
40
41 // **************************************************************************
42 // the includes
43
44 // modules
45 #include "sw/modules/types/src/types.h"
46 #include "sw/modules/motor/src/32b/motor.h"
47
48 #include "sw/modules/est/src/est_states.h"
49 #include "sw/modules/est/src/est_Flux_states.h"
50 #include "sw/modules/est/src/est_Ls_states.h"
51 #include "sw/modules/est/src/est_Rs_states.h"
52
53 #include "sw/modules/ctrl/src/ctrl_states.h"
54
55
60
61
62
63 #ifdef __cplusplus
64 extern "C" {
65 #endif
66
67
68 // **************************************************************************
69 // the defines
70
71
72
73
74 // **************************************************************************
75 // the typedefs
76
79 typedef enum
80 {
81 USER_ErrorCode_NoError=0,
82 USER_ErrorCode_iqFullScaleCurrent_A_High=1,
83 USER_ErrorCode_iqFullScaleCurrent_A_Low=2,
84 USER_ErrorCode_iqFullScaleVoltage_V_High=3,
85 USER_ErrorCode_iqFullScaleVoltage_V_Low=4,
86 USER_ErrorCode_iqFullScaleFreq_Hz_High=5,
87 USER_ErrorCode_iqFullScaleFreq_Hz_Low=6,
88 USER_ErrorCode_numPwmTicksPerIsrTick_High=7,
89 USER_ErrorCode_numPwmTicksPerIsrTick_Low=8,
90 USER_ErrorCode_numIsrTicksPerCtrlTick_High=9,
91 USER_ErrorCode_numIsrTicksPerCtrlTick_Low=10,
92 USER_ErrorCode_numCtrlTicksPerCurrentTick_High=11,
93 USER_ErrorCode_numCtrlTicksPerCurrentTick_Low=12,
94 USER_ErrorCode_numCtrlTicksPerEstTick_High=13,
95 USER_ErrorCode_numCtrlTicksPerEstTick_Low=14,
96 USER_ErrorCode_numCtrlTicksPerSpeedTick_High=15,
97 USER_ErrorCode_numCtrlTicksPerSpeedTick_Low=16,
98 USER_ErrorCode_numCtrlTicksPerTrajTick_High=17,
99 USER_ErrorCode_numCtrlTicksPerTrajTick_Low=18,
100 USER_ErrorCode_numCurrentSensors_High=19,
101 USER_ErrorCode_numCurrentSensors_Low=20,
102 USER_ErrorCode_numVoltageSensors_High=21,
103 USER_ErrorCode_numVoltageSensors_Low=22,
104 USER_ErrorCode_offsetPole_rps_High=23,
105 USER_ErrorCode_offsetPole_rps_Low=24,
106 USER_ErrorCode_fluxPole_rps_High=25,
107 USER_ErrorCode_fluxPole_rps_Low=26,
108 USER_ErrorCode_zeroSpeedLimit_High=27,
109 USER_ErrorCode_zeroSpeedLimit_Low=28,
110 USER_ErrorCode_forceAngleFreq_Hz_High=29,
111 USER_ErrorCode_forceAngleFreq_Hz_Low=30,
112 USER_ErrorCode_maxAccel_Hzps_High=31,
113 USER_ErrorCode_maxAccel_Hzps_Low=32,
114 USER_ErrorCode_maxAccel_est_Hzps_High=33,
115 USER_ErrorCode_maxAccel_est_Hzps_Low=34,
116 USER_ErrorCode_directionPole_rps_High=35,
117 USER_ErrorCode_directionPole_rps_Low=36,
118 USER_ErrorCode_speedPole_rps_High=37,
119 USER_ErrorCode_speedPole_rps_Low=38,
120 USER_ErrorCode_dcBusPole_rps_High=39,
121 USER_ErrorCode_dcBusPole_rps_Low=40,
122 USER_ErrorCode_fluxFraction_High=41,
123 USER_ErrorCode_fluxFraction_Low=42,
124 USER_ErrorCode_indEst_speedMaxFraction_High=43,
125 USER_ErrorCode_indEst_speedMaxFraction_Low=44,
126 USER_ErrorCode_powerWarpGain_High=45,
127 USER_ErrorCode_powerWarpGain_Low=46,
128 USER_ErrorCode_systemFreq_MHz_High=47,
129 USER_ErrorCode_systemFreq_MHz_Low=48,
130 USER_ErrorCode_pwmFreq_kHz_High=49,
131 USER_ErrorCode_pwmFreq_kHz_Low=50,
132 USER_ErrorCode_voltage_sf_High=51,
133 USER_ErrorCode_voltage_sf_Low=52,
134 USER_ErrorCode_current_sf_High=53,
135 USER_ErrorCode_current_sf_Low=54,
136 USER_ErrorCode_voltageFilterPole_Hz_High=55,
137 USER_ErrorCode_voltageFilterPole_Hz_Low=56,
138 USER_ErrorCode_maxVsMag_pu_High=57,
139 USER_ErrorCode_maxVsMag_pu_Low=58,
140 USER_ErrorCode_estKappa_High=59,
141 USER_ErrorCode_estKappa_Low=60,
142 USER_ErrorCode_motor_type_Unknown=61,
143 USER_ErrorCode_motor_numPolePairs_High=62,
144 USER_ErrorCode_motor_numPolePairs_Low=63,
145 USER_ErrorCode_motor_ratedFlux_High=64,
146 USER_ErrorCode_motor_ratedFlux_Low=65,
147 USER_ErrorCode_motor_Rr_High=66,
148 USER_ErrorCode_motor_Rr_Low=67,
149 USER_ErrorCode_motor_Rs_High=68,
150 USER_ErrorCode_motor_Rs_Low=69,
151 USER_ErrorCode_motor_Ls_d_High=70,
152 USER_ErrorCode_motor_Ls_d_Low=71,
153 USER_ErrorCode_motor_Ls_q_High=72,
154 USER_ErrorCode_motor_Ls_q_Low=73,
155 USER_ErrorCode_maxCurrent_High=74,
156 USER_ErrorCode_maxCurrent_Low=75,
157 USER_ErrorCode_maxCurrent_resEst_High=76,
158 USER_ErrorCode_maxCurrent_resEst_Low=77,
159 USER_ErrorCode_maxCurrent_indEst_High=78,
160 USER_ErrorCode_maxCurrent_indEst_Low=79,
161 USER_ErrorCode_maxCurrentSlope_High=80,
162 USER_ErrorCode_maxCurrentSlope_Low=81,
163 USER_ErrorCode_maxCurrentSlope_powerWarp_High=82,
164 USER_ErrorCode_maxCurrentSlope_powerWarp_Low=83,
165 USER_ErrorCode_IdRated_High=84,
166 USER_ErrorCode_IdRated_Low=85,
167 USER_ErrorCode_IdRatedFraction_indEst_High=86,
168 USER_ErrorCode_IdRatedFraction_indEst_Low=87,
169 USER_ErrorCode_IdRatedFraction_ratedFlux_High=88,
170 USER_ErrorCode_IdRatedFraction_ratedFlux_Low=89,
171 USER_ErrorCode_IdRated_delta_High=90,
172 USER_ErrorCode_IdRated_delta_Low=91,
173 USER_ErrorCode_fluxEstFreq_Hz_High=92,
174 USER_ErrorCode_fluxEstFreq_Hz_Low=93,
175 USER_ErrorCode_ctrlFreq_Hz_High=94,
176 USER_ErrorCode_ctrlFreq_Hz_Low=95,
177 USER_ErrorCode_estFreq_Hz_High=96,
178 USER_ErrorCode_estFreq_Hz_Low=97,
179 USER_ErrorCode_RoverL_estFreq_Hz_High=98,
180 USER_ErrorCode_RoverL_estFreq_Hz_Low=99,
181 USER_ErrorCode_trajFreq_Hz_High=100,
182 USER_ErrorCode_trajFreq_Hz_Low=101,
183 USER_ErrorCode_ctrlPeriod_sec_High=102,
184 USER_ErrorCode_ctrlPeriod_sec_Low=103,
185 USER_ErrorCode_maxNegativeIdCurrent_a_High=104,
186 USER_ErrorCode_maxNegativeIdCurrent_a_Low=105,
187 USER_numErrorCodes=106
188 } USER_ErrorCode_e;
189
190
193 typedef struct _USER_Params_
194 {
195 float_t iqFullScaleCurrent_A;
196 float_t iqFullScaleVoltage_V;
197 float_t iqFullScaleFreq_Hz;
198
199 uint_least16_t numIsrTicksPerCtrlTick;
200 uint_least16_t numCtrlTicksPerCurrentTick;
201 uint_least16_t numCtrlTicksPerEstTick;
202 uint_least16_t numCtrlTicksPerSpeedTick;
203 uint_least16_t numCtrlTicksPerTrajTick;
204 uint_least8_t numCurrentSensors;
205 uint_least8_t numVoltageSensors;
206
207 float_t offsetPole_rps;
208 float_t fluxPole_rps;
209 float_t zeroSpeedLimit;
210 float_t forceAngleFreq_Hz;
211 float_t maxAccel_Hzps;
212 float_t maxAccel_est_Hzps;
213 float_t directionPole_rps;
214 float_t speedPole_rps;
215 float_t dcBusPole_rps;
216 float_t fluxFraction;
217 float_t indEst_speedMaxFraction;
218 float_t powerWarpGain;
219
220 uint_least16_t systemFreq_MHz;
221
222 float_t pwmPeriod_usec;
223 float_t voltage_sf;
224 float_t current_sf;
225 float_t voltageFilterPole_rps;
226 float_t maxVsMag_pu;
227 float_t estKappa;
228
229 MOTOR_Type_e motor_type;
230 uint_least16_t motor_numPolePairs;
231
232 float_t motor_ratedFlux;
233 float_t motor_Rr;
234 float_t motor_Rs;
235 float_t motor_Ls_d;
236 float_t motor_Ls_q;
237 float_t maxCurrent;
238 float_t maxCurrent_resEst;
239 float_t maxCurrent_indEst;
240 float_t maxCurrentSlope;
241 float_t maxCurrentSlope_powerWarp;
242 float_t IdRated;
243 float_t IdRatedFraction_indEst;
244 float_t IdRatedFraction_ratedFlux;
245 float_t IdRated_delta;
246 float_t fluxEstFreq_Hz;
247
248 uint_least32_t ctrlWaitTime[CTRL_numStates];
249 uint_least32_t estWaitTime[EST_numStates];
250 uint_least32_t FluxWaitTime[EST_Flux_numStates];
251 uint_least32_t LsWaitTime[EST_Ls_numStates];
252 uint_least32_t RsWaitTime[EST_Rs_numStates];
253 uint_least32_t ctrlFreq_Hz;
254 uint_least32_t estFreq_Hz;
255 uint_least32_t RoverL_estFreq_Hz;
256 uint_least32_t trajFreq_Hz;
257
258 float_t ctrlPeriod_sec;
259
260 float_t maxNegativeIdCurrent_a;
261
262 USER_ErrorCode_e errorCode;
263 } USER_Params;
264
265
266 // **************************************************************************
267 // the functions
268
269
270 #ifdef __cplusplus
271 }
272 #endif // extern "C"
273
275 #endif // end of _USERPARAMS_H_ definition
USER_ErrorCode_RoverL_estFreq_Hz_Low
RoverL_estFreq_Hz too low error code.
Definition: fast/src/32b/userParams.h:180
USER_ErrorCode_motor_Rs_High
motor_Rs too high error code
Definition: fast/src/32b/userParams.h:149
USER_ErrorCode_ctrlFreq_Hz_High
ctrlFreq_Hz too high error code
Definition: fast/src/32b/userParams.h:175
_USER_Params_::iqFullScaleVoltage_V
float_t iqFullScaleVoltage_V
Defines the full scale voltage for the IQ variable, V.
Definition: fast/src/32b/userParams.h:196
_USER_Params_::fluxPole_rps
float_t fluxPole_rps
Defines the pole location for the flux estimation, rad/s.
Definition: fast/src/32b/userParams.h:208
USER_ErrorCode_voltageFilterPole_Hz_High
voltageFilterPole_Hz too high error code
Definition: fast/src/32b/userParams.h:136
USER_ErrorCode_IdRatedFraction_ratedFlux_Low
IdRatedFraction_ratedFlux too low error code.
Definition: fast/src/32b/userParams.h:170
_USER_Params_::fluxFraction
float_t fluxFraction
Defines the flux fraction for Id rated current estimation.
Definition: fast/src/32b/userParams.h:216
_USER_Params_::forceAngleFreq_Hz
float_t forceAngleFreq_Hz
Defines the force angle frequency, Hz.
Definition: fast/src/32b/userParams.h:210
USER_ErrorCode_motor_numPolePairs_Low
motor_numPolePairs too low error code
Definition: fast/src/32b/userParams.h:144
USER_ErrorCode_numCtrlTicksPerSpeedTick_High
numCtrlTicksPerSpeedTick too high error code
Definition: fast/src/32b/userParams.h:96
_USER_Params_::motor_Ls_q
float_t motor_Ls_q
Defines the quadrature stator inductance, H.
Definition: fast/src/32b/userParams.h:236
_USER_Params_::IdRated_delta
float_t IdRated_delta
Defines the Id rated delta current value, A.
Definition: fast/src/32b/userParams.h:245
_USER_Params_::estWaitTime
uint_least32_t estWaitTime[EST_numStates]
Defines the wait times for each estimator state, estimator ticks.
Definition: fast/src/32b/userParams.h:249
types.h
Contains the public interface to the types definitions.
USER_ErrorCode_systemFreq_MHz_Low
systemFreq_MHz too low error code
Definition: fast/src/32b/userParams.h:129
USER_ErrorCode_motor_Rs_Low
motor_Rs too low error code
Definition: fast/src/32b/userParams.h:150
USER_ErrorCode_pwmFreq_kHz_Low
pwmFreq_kHz too low error code
Definition: fast/src/32b/userParams.h:131
USER_ErrorCode_numCurrentSensors_Low
numCurrentSensors too low error code
Definition: fast/src/32b/userParams.h:101
_USER_Params_::RsWaitTime
uint_least32_t RsWaitTime[EST_Rs_numStates]
Defines the wait times for each Rs estimator, estimator ticks.
Definition: fast/src/32b/userParams.h:252
USER_ErrorCode_maxAccel_Hzps_High
maxAccel_Hzps too high error code
Definition: fast/src/32b/userParams.h:112
_USER_Params_::iqFullScaleCurrent_A
float_t iqFullScaleCurrent_A
Defines the full scale current for the IQ variables, A.
Definition: fast/src/32b/userParams.h:195
_USER_Params_::IdRated
float_t IdRated
Defines the Id rated current value, A.
Definition: fast/src/32b/userParams.h:242
USER_ErrorCode_fluxFraction_High
fluxFraction too high error code
Definition: fast/src/32b/userParams.h:122
est_Flux_states.h
Contains the states for the flux estimator (EST_Flux) module routines.
ctrl_states.h
USER_ErrorCode_numIsrTicksPerCtrlTick_High
numIsrTicksPerCtrlTick too high error code
Definition: fast/src/32b/userParams.h:90
USER_ErrorCode_powerWarpGain_Low
powerWarpGain too low error code
Definition: fast/src/32b/userParams.h:127
USER_ErrorCode_maxAccel_Hzps_Low
maxAccel_Hzps too low error code
Definition: fast/src/32b/userParams.h:113
_USER_Params_::motor_Rr
float_t motor_Rr
Defines the rotor resistance, ohm.
Definition: fast/src/32b/userParams.h:233
USER_Params
struct _USER_Params_ USER_Params
Defines a structure for the user parameters.
USER_ErrorCode_ctrlFreq_Hz_Low
ctrlFreq_Hz too low error code
Definition: fast/src/32b/userParams.h:176
_USER_Params_::maxAccel_Hzps
float_t maxAccel_Hzps
Defines the maximum acceleration for the speed profiles, Hz/s.
Definition: fast/src/32b/userParams.h:211
_USER_Params_::maxNegativeIdCurrent_a
float_t maxNegativeIdCurrent_a
Defines the maximum negative current that the Id PID is allowed to go to, A.
Definition: fast/src/32b/userParams.h:260
CTRL_numStates
the number of controller states
Definition: ctrl_states.h:39
USER_ErrorCode_motor_ratedFlux_High
motor_ratedFlux too high error code
Definition: fast/src/32b/userParams.h:145
USER_ErrorCode_motor_Ls_q_High
motor_Ls_q too high error code
Definition: fast/src/32b/userParams.h:153
_USER_Params_::ctrlPeriod_sec
float_t ctrlPeriod_sec
Defines the controller execution period, sec.
Definition: fast/src/32b/userParams.h:258
USER_ErrorCode_maxCurrentSlope_powerWarp_Low
maxCurrentSlope_powerWarp too low error code
Definition: fast/src/32b/userParams.h:164
_USER_Params_::systemFreq_MHz
uint_least16_t systemFreq_MHz
Defines the system clock frequency, MHz.
Definition: fast/src/32b/userParams.h:220
USER_ErrorCode_offsetPole_rps_High
offsetPole_rps too high error code
Definition: fast/src/32b/userParams.h:104
_USER_Params_::LsWaitTime
uint_least32_t LsWaitTime[EST_Ls_numStates]
Defines the wait times for each Ls estimator, estimator ticks.
Definition: fast/src/32b/userParams.h:251
USER_ErrorCode_forceAngleFreq_Hz_Low
forceAngleFreq_Hz too low error code
Definition: fast/src/32b/userParams.h:111
USER_ErrorCode_NoError
no error error code
Definition: fast/src/32b/userParams.h:81
USER_ErrorCode_iqFullScaleVoltage_V_Low
iqFullScaleVoltage_V too low error code
Definition: fast/src/32b/userParams.h:85
USER_ErrorCode_numCtrlTicksPerCurrentTick_High
numCtrlTicksPerCurrentTick too high error code
Definition: fast/src/32b/userParams.h:92
_USER_Params_::ctrlWaitTime
uint_least32_t ctrlWaitTime[CTRL_numStates]
Defines the wait times for each controller state, estimator ticks.
Definition: fast/src/32b/userParams.h:248
_USER_Params_
Defines a structure for the user parameters.
Definition: fast/src/32b/userParams.h:193
EST_numStates
the number of estimator states
Definition: est_states.h:70
_USER_Params_::numCurrentSensors
uint_least8_t numCurrentSensors
Defines the number of current sensors.
Definition: fast/src/32b/userParams.h:204
_USER_Params_::IdRatedFraction_ratedFlux
float_t IdRatedFraction_ratedFlux
Defines the fraction of Id rated current to use during rated flux estimation.
Definition: fast/src/32b/userParams.h:244
USER_ErrorCode_motor_Rr_Low
motor_Rr too low error code
Definition: fast/src/32b/userParams.h:148
USER_ErrorCode_ctrlPeriod_sec_High
ctrlPeriod_sec too high error code
Definition: fast/src/32b/userParams.h:183
motor.h
_USER_Params_::RoverL_estFreq_Hz
uint_least32_t RoverL_estFreq_Hz
Defines the R/L estimation frequency, Hz.
Definition: fast/src/32b/userParams.h:255
_USER_Params_::powerWarpGain
float_t powerWarpGain
Defines the PowerWarp gain for computing Id reference.
Definition: fast/src/32b/userParams.h:218
USER_ErrorCode_numCtrlTicksPerCurrentTick_Low
numCtrlTicksPerCurrentTick too low error code
Definition: fast/src/32b/userParams.h:93
_USER_Params_::maxCurrent
float_t maxCurrent
Defines the maximum current value, A.
Definition: fast/src/32b/userParams.h:237
USER_ErrorCode_directionPole_rps_Low
directionPole_rps too low error code
Definition: fast/src/32b/userParams.h:117
_USER_Params_::numCtrlTicksPerCurrentTick
uint_least16_t numCtrlTicksPerCurrentTick
Defines the number of controller clock ticks per current controller clock tick.
Definition: fast/src/32b/userParams.h:200
USER_ErrorCode_iqFullScaleFreq_Hz_High
iqFullScaleFreq_Hz too high error code
Definition: fast/src/32b/userParams.h:86
est_states.h
Contains the states for the estimator (EST) module routines.
USER_ErrorCode_IdRated_delta_High
IdRated_delta too high error code.
Definition: fast/src/32b/userParams.h:171
USER_ErrorCode_IdRatedFraction_indEst_Low
IdRatedFraction_indEst too low error code.
Definition: fast/src/32b/userParams.h:168
USER_ErrorCode_motor_Ls_q_Low
motor_Ls_q too low error code
Definition: fast/src/32b/userParams.h:154
est_Ls_states.h
Contains the states for the stator inductance estimator (EST_Ls) module routines. ...
USER_ErrorCode_maxAccel_est_Hzps_High
maxAccel_est_Hzps too high error code
Definition: fast/src/32b/userParams.h:114
USER_ErrorCode_numPwmTicksPerIsrTick_High
numPwmTicksPerIsrTick too high error code
Definition: fast/src/32b/userParams.h:88
_USER_Params_::voltageFilterPole_rps
float_t voltageFilterPole_rps
Defines the analog voltage filter pole location, rad/s.
Definition: fast/src/32b/userParams.h:225
USER_ErrorCode_current_sf_High
current_sf too high error code
Definition: fast/src/32b/userParams.h:134
USER_ErrorCode_numCtrlTicksPerEstTick_Low
numCtrlTicksPerEstTick too low error code
Definition: fast/src/32b/userParams.h:95
USER_ErrorCode_motor_Rr_High
motor_Rr too high error code
Definition: fast/src/32b/userParams.h:147
USER_ErrorCode_speedPole_rps_High
speedPole_rps too high error code
Definition: fast/src/32b/userParams.h:118
USER_ErrorCode_numCtrlTicksPerTrajTick_Low
numCtrlTicksPerTrajTick too low error code
Definition: fast/src/32b/userParams.h:99
USER_ErrorCode_ctrlPeriod_sec_Low
ctrlPeriod_sec too low error code
Definition: fast/src/32b/userParams.h:184
USER_ErrorCode_directionPole_rps_High
directionPole_rps too high error code
Definition: fast/src/32b/userParams.h:116
_USER_Params_::directionPole_rps
float_t directionPole_rps
Defines the pole location for the direction filter, rad/s.
Definition: fast/src/32b/userParams.h:213
MOTOR_Type_e
MOTOR_Type_e
Enumeration for the motor types.
Definition: 32b/motor.h:71
USER_ErrorCode_forceAngleFreq_Hz_High
forceAngleFreq_Hz too high error code
Definition: fast/src/32b/userParams.h:110
_USER_Params_::motor_type
MOTOR_Type_e motor_type
Defines the motor type.
Definition: fast/src/32b/userParams.h:229
USER_ErrorCode_trajFreq_Hz_Low
trajFreq_Hz too low error code
Definition: fast/src/32b/userParams.h:182
USER_ErrorCode_fluxFraction_Low
fluxFraction too low error code
Definition: fast/src/32b/userParams.h:123
USER_ErrorCode_iqFullScaleVoltage_V_High
iqFullScaleVoltage_V too high error code
Definition: fast/src/32b/userParams.h:84
_USER_Params_::voltage_sf
float_t voltage_sf
Defines the voltage scale factor for the system.
Definition: fast/src/32b/userParams.h:223
USER_ErrorCode_voltageFilterPole_Hz_Low
voltageFilterPole_Hz too low error code
Definition: fast/src/32b/userParams.h:137
_USER_Params_::trajFreq_Hz
uint_least32_t trajFreq_Hz
Defines the trajectory frequency, Hz.
Definition: fast/src/32b/userParams.h:256
USER_ErrorCode_maxVsMag_pu_High
maxVsMag_pu too high error code
Definition: fast/src/32b/userParams.h:138
_USER_Params_::numVoltageSensors
uint_least8_t numVoltageSensors
Defines the number of voltage sensors.
Definition: fast/src/32b/userParams.h:205
EST_Ls_numStates
the number of stator inductance estimator states
Definition: est_Ls_states.h:54
USER_ErrorCode_fluxEstFreq_Hz_Low
fluxEstFreq_Hz too low error code
Definition: fast/src/32b/userParams.h:174
USER_ErrorCode_numCtrlTicksPerTrajTick_High
numCtrlTicksPerTrajTick too high error code
Definition: fast/src/32b/userParams.h:98
USER_numErrorCodes
the number of user error codes
Definition: fast/src/32b/userParams.h:187
USER_ErrorCode_estFreq_Hz_Low
estFreq_Hz too low error code
Definition: fast/src/32b/userParams.h:178
USER_ErrorCode_dcBusPole_rps_High
dcBusPole_rps too high error code
Definition: fast/src/32b/userParams.h:120
_USER_Params_::offsetPole_rps
float_t offsetPole_rps
Defines the pole location for the voltage and current offset estimation, rad/s.
Definition: fast/src/32b/userParams.h:207
USER_ErrorCode_maxCurrent_resEst_High
maxCurrent_resEst too high error code
Definition: fast/src/32b/userParams.h:157
USER_ErrorCode_motor_type_Unknown
motor type unknown error code
Definition: fast/src/32b/userParams.h:142
USER_ErrorCode_maxCurrent_indEst_Low
maxCurrent_indEst too low error code
Definition: fast/src/32b/userParams.h:160
USER_ErrorCode_speedPole_rps_Low
speedPole_rps too low error code
Definition: fast/src/32b/userParams.h:119
_USER_Params_::pwmPeriod_usec
float_t pwmPeriod_usec
Defines the Pulse Width Modulation (PWM) period, usec.
Definition: fast/src/32b/userParams.h:222
USER_ErrorCode_IdRated_High
IdRated too high error code.
Definition: fast/src/32b/userParams.h:165
USER_ErrorCode_maxCurrentSlope_powerWarp_High
maxCurrentSlope_powerWarp too high error code
Definition: fast/src/32b/userParams.h:163
_USER_Params_::errorCode
USER_ErrorCode_e errorCode
Definition: fast/src/32b/userParams.h:262
_USER_Params_::zeroSpeedLimit
float_t zeroSpeedLimit
Defines the low speed limit for the flux integrator, pu.
Definition: fast/src/32b/userParams.h:209
_USER_Params_::current_sf
float_t current_sf
Defines the current scale factor for the system.
Definition: fast/src/32b/userParams.h:224
USER_ErrorCode_fluxPole_rps_High
fluxPole_rps too high error code
Definition: fast/src/32b/userParams.h:106
USER_ErrorCode_maxCurrent_High
maxCurrent too high error code
Definition: fast/src/32b/userParams.h:155
USER_ErrorCode_current_sf_Low
current_sf too low error code
Definition: fast/src/32b/userParams.h:135
USER_ErrorCode_iqFullScaleCurrent_A_Low
iqFullScaleCurrent_A too low error code
Definition: fast/src/32b/userParams.h:83
USER_ErrorCode_dcBusPole_rps_Low
dcBusPole_rps too low error code
Definition: fast/src/32b/userParams.h:121
_USER_Params_::indEst_speedMaxFraction
float_t indEst_speedMaxFraction
Defines the fraction of SpeedMax to use during inductance estimation.
Definition: fast/src/32b/userParams.h:217
_USER_Params_::fluxEstFreq_Hz
float_t fluxEstFreq_Hz
Defines the flux estimation frequency, Hz.
Definition: fast/src/32b/userParams.h:246
_USER_Params_::IdRatedFraction_indEst
float_t IdRatedFraction_indEst
Defines the fraction of Id rated current to use during inductance estimation.
Definition: fast/src/32b/userParams.h:243
USER_ErrorCode_IdRatedFraction_indEst_High
IdRatedFraction_indEst too high error code.
Definition: fast/src/32b/userParams.h:167
USER_ErrorCode_fluxEstFreq_Hz_High
fluxEstFreq_Hz too high error code
Definition: fast/src/32b/userParams.h:173
_USER_Params_::dcBusPole_rps
float_t dcBusPole_rps
Defines the pole location for the DC bus filter, rad/s.
Definition: fast/src/32b/userParams.h:215
USER_ErrorCode_IdRated_Low
IdRated too low error code.
Definition: fast/src/32b/userParams.h:166
_USER_Params_::numCtrlTicksPerTrajTick
uint_least16_t numCtrlTicksPerTrajTick
Defines the number of controller clock ticks per trajectory clock tick.
Definition: fast/src/32b/userParams.h:203
_USER_Params_::numCtrlTicksPerSpeedTick
uint_least16_t numCtrlTicksPerSpeedTick
Defines the number of controller clock ticks per speed controller clock tick.
Definition: fast/src/32b/userParams.h:202
USER_ErrorCode_numVoltageSensors_High
numVoltageSensors too high error code
Definition: fast/src/32b/userParams.h:102
_USER_Params_::maxCurrent_indEst
float_t maxCurrent_indEst
Defines the maximum current value for inductance estimation, A.
Definition: fast/src/32b/userParams.h:239
USER_ErrorCode_trajFreq_Hz_High
trajFreq_Hz too high error code
Definition: fast/src/32b/userParams.h:181
USER_ErrorCode_numPwmTicksPerIsrTick_Low
numPwmTicksPerIsrTick too low error code
Definition: fast/src/32b/userParams.h:89
USER_ErrorCode_maxCurrentSlope_High
maxCurrentSlope too high error code
Definition: fast/src/32b/userParams.h:161
est_Rs_states.h
Contains the public interface to the stator resistance estimator (EST_Rs) module routines.
_USER_Params_::maxCurrentSlope
float_t maxCurrentSlope
Defines the maximum current slope for Id current trajectory.
Definition: fast/src/32b/userParams.h:240
_USER_Params_::speedPole_rps
float_t speedPole_rps
Defines the pole location for the speed control filter, rad/s.
Definition: fast/src/32b/userParams.h:214
_USER_Params_::motor_Rs
float_t motor_Rs
Defines the stator resistance, ohm.
Definition: fast/src/32b/userParams.h:234
USER_ErrorCode_fluxPole_rps_Low
fluxPole_rps too low error code
Definition: fast/src/32b/userParams.h:107
USER_ErrorCode_motor_ratedFlux_Low
motor_ratedFlux too low error code
Definition: fast/src/32b/userParams.h:146
_USER_Params_::numIsrTicksPerCtrlTick
uint_least16_t numIsrTicksPerCtrlTick
Defines the number of Interrupt Service Routine (ISR) clock ticks per controller clock tick...
Definition: fast/src/32b/userParams.h:199
USER_ErrorCode_RoverL_estFreq_Hz_High
RoverL_estFreq_Hz too high error code.
Definition: fast/src/32b/userParams.h:179
USER_ErrorCode_voltage_sf_High
voltage_sf too high error code
Definition: fast/src/32b/userParams.h:132
USER_ErrorCode_maxCurrent_indEst_High
maxCurrent_indEst too high error code
Definition: fast/src/32b/userParams.h:159
_USER_Params_::ctrlFreq_Hz
uint_least32_t ctrlFreq_Hz
Defines the controller frequency, Hz.
Definition: fast/src/32b/userParams.h:253
USER_ErrorCode_numVoltageSensors_Low
numVoltageSensors too low error code
Definition: fast/src/32b/userParams.h:103
USER_ErrorCode_maxVsMag_pu_Low
maxVsMag_pu too low error code
Definition: fast/src/32b/userParams.h:139
USER_ErrorCode_indEst_speedMaxFraction_Low
indEst_speedMaxFraction too low error code
Definition: fast/src/32b/userParams.h:125
USER_ErrorCode_numCtrlTicksPerEstTick_High
numCtrlTicksPerEstTick too high error code
Definition: fast/src/32b/userParams.h:94
_USER_Params_::motor_numPolePairs
uint_least16_t motor_numPolePairs
Defines the number of pole pairs for the motor.
Definition: fast/src/32b/userParams.h:230
USER_ErrorCode_motor_numPolePairs_High
motor_numPolePairs too high error code
Definition: fast/src/32b/userParams.h:143
USER_ErrorCode_estKappa_Low
estKappa too low error code
Definition: fast/src/32b/userParams.h:141
_USER_Params_::numCtrlTicksPerEstTick
uint_least16_t numCtrlTicksPerEstTick
Defines the number of controller clock ticks per estimator clock tick.
Definition: fast/src/32b/userParams.h:201
USER_ErrorCode_iqFullScaleCurrent_A_High
iqFullScaleCurrent_A too high error code
Definition: fast/src/32b/userParams.h:82
USER_ErrorCode_motor_Ls_d_High
motor_Ls_d too high error code
Definition: fast/src/32b/userParams.h:151
_USER_Params_::maxCurrentSlope_powerWarp
float_t maxCurrentSlope_powerWarp
Defines the maximum current slope for Id current trajectory during PowerWarp.
Definition: fast/src/32b/userParams.h:241
USER_ErrorCode_pwmFreq_kHz_High
pwmFreq_kHz too high error code
Definition: fast/src/32b/userParams.h:130
USER_ErrorCode_e
USER_ErrorCode_e
Enumeration for the user error codes.
Definition: fast/src/32b/userParams.h:79
_USER_Params_::FluxWaitTime
uint_least32_t FluxWaitTime[EST_Flux_numStates]
Defines the wait times for each Ls estimator, estimator ticks.
Definition: fast/src/32b/userParams.h:250
_USER_Params_::maxAccel_est_Hzps
float_t maxAccel_est_Hzps
Defines the maximum acceleration for the estimation speed profiles, Hz/s.
Definition: fast/src/32b/userParams.h:212
USER_ErrorCode_zeroSpeedLimit_Low
zeroSpeedLimit too low error code
Definition: fast/src/32b/userParams.h:109
_USER_Params_::estFreq_Hz
uint_least32_t estFreq_Hz
Defines the estimator frequency, Hz.
Definition: fast/src/32b/userParams.h:254
USER_ErrorCode_maxNegativeIdCurrent_a_High
maxNegativeIdCurrent_a too high error code
Definition: fast/src/32b/userParams.h:185
USER_ErrorCode_voltage_sf_Low
voltage_sf too low error code
Definition: fast/src/32b/userParams.h:133
USER_ErrorCode_motor_Ls_d_Low
motor_Ls_d too low error code
Definition: fast/src/32b/userParams.h:152
USER_ErrorCode_maxCurrentSlope_Low
maxCurrentSlope too low error code
Definition: fast/src/32b/userParams.h:162
EST_Rs_numStates
the number of stator resistance estimator states
Definition: est_Rs_states.h:43
USER_ErrorCode_maxAccel_est_Hzps_Low
maxAccel_est_Hzps too low error code
Definition: fast/src/32b/userParams.h:115
USER_ErrorCode_maxNegativeIdCurrent_a_Low
maxNegativeIdCurrent_a too low error code
Definition: fast/src/32b/userParams.h:186
USER_ErrorCode_IdRatedFraction_ratedFlux_High
IdRatedFraction_ratedFlux too high error code.
Definition: fast/src/32b/userParams.h:169
USER_ErrorCode_numIsrTicksPerCtrlTick_Low
numIsrTicksPerCtrlTick too low error code
Definition: fast/src/32b/userParams.h:91
USER_ErrorCode_systemFreq_MHz_High
systemFreq_MHz too high error code
Definition: fast/src/32b/userParams.h:128
_USER_Params_::estKappa
float_t estKappa
Defines the convergence factor for the estimator.
Definition: fast/src/32b/userParams.h:227
USER_ErrorCode_maxCurrent_Low
maxCurrent too low error code
Definition: fast/src/32b/userParams.h:156
USER_ErrorCode_indEst_speedMaxFraction_High
indEst_speedMaxFraction too high error code
Definition: fast/src/32b/userParams.h:124
USER_ErrorCode_IdRated_delta_Low
IdRated_delta too low error code.
Definition: fast/src/32b/userParams.h:172
USER_ErrorCode_estKappa_High
estKappa too high error code
Definition: fast/src/32b/userParams.h:140
USER_ErrorCode_powerWarpGain_High
powerWarpGain too high error code
Definition: fast/src/32b/userParams.h:126
USER_ErrorCode_numCtrlTicksPerSpeedTick_Low
numCtrlTicksPerSpeedTick too low error code
Definition: fast/src/32b/userParams.h:97
USER_ErrorCode_numCurrentSensors_High
numCurrentSensors too high error code
Definition: fast/src/32b/userParams.h:100
USER_ErrorCode_offsetPole_rps_Low
offsetPole_rps too low error code
Definition: fast/src/32b/userParams.h:105
EST_Flux_numStates
the number of flux estimator states
Definition: est_Flux_states.h:54
_USER_Params_::iqFullScaleFreq_Hz
float_t iqFullScaleFreq_Hz
Defines the full scale frequency for IQ variable, Hz.
Definition: fast/src/32b/userParams.h:197
USER_ErrorCode_iqFullScaleFreq_Hz_Low
iqFullScaleFreq_Hz too low error code
Definition: fast/src/32b/userParams.h:87
USER_ErrorCode_zeroSpeedLimit_High
zeroSpeedLimit too high error code
Definition: fast/src/32b/userParams.h:108
USER_ErrorCode_estFreq_Hz_High
estFreq_Hz too high error code
Definition: fast/src/32b/userParams.h:177
float_t
float float_t
Defines the portable data type for 32 bit, signed floating-point data.
Definition: types.h:121
_USER_Params_::motor_Ls_d
float_t motor_Ls_d
Defines the direct stator inductance, H.
Definition: fast/src/32b/userParams.h:235
USER_ErrorCode_maxCurrent_resEst_Low
maxCurrent_resEst too low error code
Definition: fast/src/32b/userParams.h:158
_USER_Params_::maxCurrent_resEst
float_t maxCurrent_resEst
Defines the maximum current value for resistance estimation, A.
Definition: fast/src/32b/userParams.h:238
_USER_Params_::motor_ratedFlux
float_t motor_ratedFlux
Defines the rated flux of the motor, V/Hz.
Definition: fast/src/32b/userParams.h:232
_USER_Params_::maxVsMag_pu
float_t maxVsMag_pu
Defines the maximum voltage magnitude, pu.
Definition: fast/src/32b/userParams.h:226