esmo.h
Go to the documentation of this file.
1 //#############################################################################
2 // $TI Release: MotorControl SDK v3.03.00.00 $
3 // $Release Date: Tue Sep 21 16:33:26 CDT 2021 $
4 // $Copyright:
5 // Copyright (C) 2017-2018 Texas Instruments Incorporated - http://www.ti.com/
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
17 // distribution.
18 //
19 // Neither the name of Texas Instruments Incorporated nor the names of
20 // its contributors may be used to endorse or promote products derived
21 // from this software without specific prior written permission.
22 //
23 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
26 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
27 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
28 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
29 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
30 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
31 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
33 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 // $
35 //#############################################################################
36 
41 
42 #ifndef _ESMO_H_
43 #define _ESMO_H_
44 
45 //*****************************************************************************
46 //
47 // If building with a C++ compiler, make all of the definitions in this header
48 // have a C binding.
49 //
50 //*****************************************************************************
51 #ifdef __cplusplus
52 extern "C"
53 {
54 #endif
55 
56 //*****************************************************************************
57 //
60 //
61 //*****************************************************************************
62 
63 
64 // the includes
65 #ifdef __TMS320C28XX_CLA__
66 #include "libraries/math/src/float/CLAmath.h"
67 #else
68 #include <math.h>
69 #endif
70 
72 
73 //modules
74 #include "userParams.h"
75 
76 // **************************************************************************
77 // the defines
78 
79 
80 // the typedefs
81 
84 typedef struct _ESMO_Obj_
85 {
87 
88  float32_t speed_sf; // speed PU scale factor
89  float32_t voltage_sf; // voltage PU scale factor
90  float32_t current_sf; // current PU scale factor
91 
92  float32_t Ts; // sampling period in sec
93  float32_t base_wTs; // base_wTs = BASE_FREQ * T ,for lib
94  float32_t filterFc_Hz; // smo filter frequency
95 
96  float32_t Fdsmopos; // motor dependent plant matrix
97  float32_t Fqsmopos; // motor dependent plant matrix
98  float32_t Gdsmopos; // motor dependent control gain
99  float32_t Gqsmopos; // motor dependent control gain
100  float32_t Kslf; // sliding control filter gain
101  float32_t E0; // estimated bemf threshold
102 
103  float32_t Kslide; // sliding control gain
104  float32_t KslideMax; // sliding control gain, maximum value
105  float32_t KslideMin; // sliding control gain, minimum value
106 
107  float32_t Valpha; // stationary d-axis phase voltage (pu)
108  float32_t Vbeta; // stationary q-axis phase voltage (pu)
109 
110  float32_t EstIalpha; // estimated stationary alfa-axis stator current
111  float32_t EstIbeta; // estimated stationary beta-axis stator current
112 
113  float32_t Ealpha; // stationary alfa-axis back EMF
114  float32_t Ebeta; // stationary beta-axis back EMF
115 
116  float32_t Zalpha; // stationary alfa-axis sliding control
117  float32_t Zbeta; // stationary beta-axis sliding control
118 
122 
125 
131  float32_t offsetSF; // Scale factor
133 
137 
138  float32_t pll_Out; // controller output
139  float32_t pll_Umax; // upper saturation limit
140  float32_t pll_Umin; // lower saturation limit
141  float32_t pll_ui; // integral term
142 
143  float32_t pll_Kp; // proportional gain
144  float32_t pll_KpMax; // maximum proportional gain
145  float32_t pll_KpMin; // minimum proportional loop gain
146  float32_t pll_KpSF; // proportional gain coefficient
147  float32_t pll_Ki; // integral gain
148 
149  float32_t lpf_b0; // Low Pass Filter Param b0
150  float32_t lpf_a1; // Low Pass Filter Param a1
151 
152  float32_t lpfFc_Hz; // Low Pass Filter desired cut off frequency (Hz)
153 } ESMO_Obj;
154 
155 
158 typedef struct _ESMO_Obj_ *ESMO_Handle;
159 
160 // **************************************************************************
161 // the function prototypes
166 extern ESMO_Handle ESMO_init(void *pMemory, const size_t numBytes);
167 
168 
171 extern void ESMO_resetParams(ESMO_Handle handle);
172 
173 
177 extern void ESMO_setParams(ESMO_Handle handle, const USER_Params *pUserParams);
178 
179 
185 extern void ESMO_setPLLParams(ESMO_Handle handle,
186  const float32_t pll_KpMax,
187  const float32_t pll_KpMin,
188  const float32_t pll_KpSF);
189 
190 
194 extern void ESMO_setPLLKi(ESMO_Handle handle, const float32_t pll_Ki);
195 
196 
200 static inline void ESMO_setBEMFThreshold(ESMO_Handle handle, const float32_t bemfThreshold)
201 {
202  ESMO_Obj *obj = (ESMO_Obj *)handle;
203 
204  obj->E0 = bemfThreshold;
205 
206  return;
207 }
208 
212 static inline void ESMO_setPLLKpSF(ESMO_Handle handle, const float32_t pll_KpSF)
213 {
214  ESMO_Obj *obj = (ESMO_Obj *)handle;
215 
216  obj->pll_KpSF = pll_KpSF;
217 
218  return;
219 }
220 
225 extern void ESMO_setKslideParams(ESMO_Handle handle,
226  const float32_t KslideMax,
227  const float32_t KslideMin);
228 
229 
233 static inline void ESMO_setKslide(ESMO_Handle handle, const float32_t Kslide)
234 {
235  ESMO_Obj *obj = (ESMO_Obj *)handle;
236 
237  obj->Kslide = Kslide;
238 
239  return;
240 }
241 
244 extern void ESMO_updateFilterParams(ESMO_Handle handle);
245 
246 
249 extern void ESMO_updatePLLParams (ESMO_Handle handle);
250 
256 extern void ESMO_full_run(ESMO_Handle handle,
257  float32_t Vdcbus, MATH_vec3 *pVabc_pu, MATH_vec2 *pIabVec);
258 
259 
262 static inline void ESMO_resetPLL(ESMO_Handle handle)
263 {
264  ESMO_Obj *obj = (ESMO_Obj *)handle;
265 
266  obj->pll_ui = 0.0f;
267  obj->pll_Out = 0.0f;
268 
269  return;
270 }
271 
275 static inline void ESMO_setOffsetCoef(ESMO_Handle handle, const float32_t offsetSF)
276 {
277  ESMO_Obj *obj = (ESMO_Obj *)handle;
278 
279  obj->offsetSF = offsetSF;
280 
281  return;
282 }
283 
287 static inline void ESMO_setBEMFKslfFreq(ESMO_Handle handle, const float32_t filterFc_Hz)
288 {
289  ESMO_Obj *obj = (ESMO_Obj *)handle;
290 
291  obj->filterFc_Hz = filterFc_Hz;
292 
293  return;
294 }
295 
299 static inline void ESMO_setSpeedFilterFreq(ESMO_Handle handle, const float32_t lpfFc_Hz)
300 {
301  ESMO_Obj *obj = (ESMO_Obj *)handle;
302 
303  obj->lpfFc_Hz = lpfFc_Hz;
304 
305  return;
306 }
307 
311 static inline void ESMO_setPLLKp(ESMO_Handle handle, const float32_t pll_Kp)
312 {
313  ESMO_Obj *obj = (ESMO_Obj *)handle;
314 
315  obj->pll_Kp = pll_Kp;
316 
317  return;
318 }
319 
323 static inline void ESMO_setAnglePu(ESMO_Handle handle, const float32_t theta_rad)
324 {
325  ESMO_Obj *obj = (ESMO_Obj *)handle;
326 
327  obj->theta = theta_rad * MATH_ONE_OVER_TWO_PI;
328 
329  return;
330 }
331 
335 static inline void ESMO_setPLLSpeedPu(ESMO_Handle handle, const float32_t speed_Hz)
336 {
337  ESMO_Obj *obj = (ESMO_Obj *)handle;
338 
339  obj->speedFlt = speed_Hz * obj->speed_sf;
340  obj->pll_Out = speed_Hz * obj->speed_sf;
341 
342  return;
343 }
344 
348 static inline void ESMO_setSpeedRef(ESMO_Handle handle, const float32_t speedRef_Hz)
349 {
350  ESMO_Obj *obj = (ESMO_Obj *)handle;
351 
352  obj->speedRef = speedRef_Hz * obj->speed_sf;
353 
354  return;
355 }
356 
361 {
362  ESMO_Obj *obj = (ESMO_Obj *)handle;
363 
364  return(obj->speedEst * obj->scaleFreq_Hz);
365 }
366 
367 
372 {
373  ESMO_Obj *obj = (ESMO_Obj *)handle;
374 
375  return(obj->speedFlt * obj->scaleFreq_Hz);
376 }
377 
382 {
383  ESMO_Obj *obj = (ESMO_Obj *)handle;
384 
385  return(obj->thetaEst);
386 }
387 
392 {
393  ESMO_Obj *obj = (ESMO_Obj *)handle;
394 
395  return(obj->thetaElec_rad);
396 }
397 
400 static inline void ESMO_updateKslide(ESMO_Handle handle)
401 {
402  ESMO_Obj *obj = (ESMO_Obj *)handle;
403 
404  if(obj->Kslide < obj->KslideMax)
405  {
406  obj->Kslide += 0.000002f;
407  }
408 
409  return;
410 }
411 
417 #define ESMO_inline_run ESMO_run // for compatible with old version
418 
419 static inline void ESMO_run(ESMO_Handle handle,
420  float32_t Vdcbus, MATH_vec3 *pVabc_pu, MATH_vec2 *pIabVec)
421 {
422  ESMO_Obj *obj = (ESMO_Obj *)handle;
423 
424  // Scale the incomming modulation functions with the DC bus voltage value
425  // and calculate the 3 Phase voltages
426  float32_t Vtemp = Vdcbus * obj->voltage_sf;
427 
428  float32_t VphaseA = Vtemp *
429  (pVabc_pu->value[0] * 2.0f - pVabc_pu->value[1] - pVabc_pu->value[2]);
430 
431  float32_t VphaseB = Vtemp *
432  (pVabc_pu->value[1] * 2.0f - pVabc_pu->value[0] - pVabc_pu->value[2]);
433 
434  // Voltage transformation (a,b,c) -> (Alpha,Beta)
435  obj->Valpha = VphaseA;
436  obj->Vbeta = (VphaseA + VphaseB * 2.0f) * MATH_ONE_OVER_SQRT_THREE;
437 
438  // Sliding mode current observer
439  float32_t ValphaError = obj->Valpha - obj->Ealpha - obj->Zalpha;
440  float32_t VbetaError = obj->Vbeta - obj->Ebeta - obj->Zbeta;
441 
442  obj->EstIalpha = obj->Gdsmopos * ValphaError + obj->Fdsmopos * obj->EstIalpha;
443  obj->EstIbeta = obj->Gqsmopos * VbetaError + obj->Fqsmopos * obj->EstIbeta;
444 
445  // Current errors
446  float32_t IalphaError = obj->EstIalpha - pIabVec->value[0] * obj->current_sf;
447  float32_t IbetaError = obj->EstIbeta - pIabVec->value[1] * obj->current_sf;
448 
449  // Sliding control calculator
450  obj->Zalpha = __fsat(IalphaError, obj->E0, -obj->E0) * obj->Kslide;
451  obj->Zbeta = __fsat(IbetaError, obj->E0, -obj->E0) * obj->Kslide;
452 
453  // Sliding control filter -> back EMF calculator
454  obj->Ealpha = obj->Ealpha + obj->Kslf * (obj->Zalpha - obj->Ealpha);
455  obj->Ebeta = obj->Ebeta + obj->Kslf * (obj->Zbeta - obj->Ebeta);
456 
457  // arc tangent of src radians
458  float32_t thetaOffset = __atan2puf32((obj->speedRef * obj->offsetSF), obj->Kslf);
459  obj->thetaPll = obj->theta - thetaOffset;
460 
461  float32_t pllSine = __sinpuf32(obj->thetaPll);
462  float32_t pllCosine = __cospuf32(obj->thetaPll);
463 
464  obj->Ed = obj->Ealpha * pllCosine + obj->Ebeta * pllSine;
465  obj->Eq = obj->Ebeta * pllCosine - obj->Ealpha * pllSine;
466  obj->Eq_mag = sqrtf(obj->Ealpha * obj->Ealpha + obj->Ebeta * obj->Ebeta);
467 
468  //0.1591549431 = 1/6.28 (1/(2*PI())
470 
471  if(obj->Eq >= 0.0f)
472  {
473  thetaErrSF = -obj->thetaErrSF;
474  }
475 
476  obj->thetaErr = obj->Ed * thetaErrSF / obj->Eq_mag;
477 
478  // integral term
479  obj->pll_ui = (obj->pll_Ki * obj->thetaErr) + obj->pll_ui;
480 
481  // control output
482  obj->pll_Out = __fsat((obj->pll_Kp * obj->thetaErr + obj->pll_ui),
483  obj->pll_Umax, obj->pll_Umin);
484 
485  obj->speedEst = (obj->pll_Out + obj->speedEst) * 0.5f;
486 
487  // low pass filter for estimation speed
488  obj->speedFlt = obj->lpf_b0 * obj->pll_Out + obj->lpf_a1 * obj->speedFlt;
489 
490  // speed integration to get the rotor angle
491  obj->theta = obj->theta + obj->speedFlt * obj->thetaDelta;
492 
493  if(obj->theta > 1.0f)
494  {
495  obj->theta -= 1.0f;
496  }
497  else if(obj->theta < -1.0f)
498  {
499  obj->theta += 1.0f;
500  }
501 
502  obj->thetaEst = obj->theta * MATH_TWO_PI;
503 
504  if(obj->thetaEst > MATH_PI)
505  {
506  obj->thetaEst -= MATH_TWO_PI;
507  }
508  else if(obj->thetaEst < (-MATH_PI))
509  {
510  obj->thetaEst += MATH_TWO_PI;
511  }
512 
513  return;
514 } // end of ESMO_run() function
515 
516 
517 //*****************************************************************************
518 //
519 // Close the Doxygen group.
521 //
522 //*****************************************************************************
523 
524 //*****************************************************************************
525 //
526 // Mark the end of the C bindings section for C++ compilers.
527 //
528 //*****************************************************************************
529 #ifdef __cplusplus
530 }
531 #endif
532 
533 #endif //end of _ESMO_H_ definition
534 
ESMO_setPLLSpeedPu
static void ESMO_setPLLSpeedPu(ESMO_Handle handle, const float32_t speed_Hz)
Set Angle to the ESMO controller.
Definition: esmo.h:335
_MATH_Vec2_
Defines a two element vector.
Definition: math.h:218
_ESMO_Obj_::pll_Umin
float32_t pll_Umin
Definition: esmo.h:140
_ESMO_Obj_::Eq_mag
float32_t Eq_mag
Definition: esmo.h:121
_ESMO_Obj_
Defines the ESMO controller object.
Definition: esmo.h:84
ESMO_init
ESMO_Handle ESMO_init(void *pMemory, const size_t numBytes)
Initializes the ESMO controller.
_ESMO_Obj_::pll_KpMax
float32_t pll_KpMax
Definition: esmo.h:144
_ESMO_Obj_::EstIalpha
float32_t EstIalpha
Definition: esmo.h:110
_ESMO_Obj_::thetaErr
float32_t thetaErr
Definition: esmo.h:126
float32_t
float float32_t
Definition: sfra_f32.h:42
_ESMO_Obj_::pll_Kp
float32_t pll_Kp
Definition: esmo.h:143
MATH_TWO_PI
#define MATH_TWO_PI
Defines 2*pi.
Definition: math.h:154
MATH_ONE_OVER_TWO_PI
#define MATH_ONE_OVER_TWO_PI
Defines 1/(2*pi)
Definition: math.h:133
_ESMO_Obj_::thetaEst
float32_t thetaEst
Definition: esmo.h:132
_ESMO_Obj_::lpfFc_Hz
float32_t lpfFc_Hz
Definition: esmo.h:152
_ESMO_Obj_::E0
float32_t E0
Definition: esmo.h:101
_ESMO_Obj_::speedFlt
float32_t speedFlt
Definition: esmo.h:136
_ESMO_Obj_::base_wTs
float32_t base_wTs
Definition: esmo.h:93
ESMO_getAnglePLL
static float32_t ESMO_getAnglePLL(ESMO_Handle handle)
Gets the PLL angle from the ESMO controller.
Definition: esmo.h:381
_ESMO_Obj_::offsetSF
float32_t offsetSF
Definition: esmo.h:131
ESMO_getSpeedPLL_Hz
static float32_t ESMO_getSpeedPLL_Hz(ESMO_Handle handle)
Gets the PLL speed from the ESMO controller.
Definition: esmo.h:371
MATH_PI
#define MATH_PI
Defines pi.
Definition: math.h:140
ESMO_setKslideParams
void ESMO_setKslideParams(ESMO_Handle handle, const float32_t KslideMax, const float32_t KslideMin)
Set PLL parameters for the ESMO controller.
ESMO_setBEMFThreshold
static void ESMO_setBEMFThreshold(ESMO_Handle handle, const float32_t bemfThreshold)
Set kp of the pll for the ESMO controller.
Definition: esmo.h:200
ESMO_updateFilterParams
void ESMO_updateFilterParams(ESMO_Handle handle)
Reset the ESMO controller.
_ESMO_Obj_::voltage_sf
float32_t voltage_sf
Definition: esmo.h:89
_ESMO_Obj_::thetaElec_rad
float32_t thetaElec_rad
Definition: esmo.h:124
_ESMO_Obj_::Fdsmopos
float32_t Fdsmopos
Definition: esmo.h:96
ESMO_Handle
struct _ESMO_Obj_ * ESMO_Handle
Defines the ESMO handle.
Definition: esmo.h:158
_ESMO_Obj_::Kslf
float32_t Kslf
Definition: esmo.h:100
_ESMO_Obj_::filterFc_Hz
float32_t filterFc_Hz
Definition: esmo.h:94
_ESMO_Obj_::Gdsmopos
float32_t Gdsmopos
Definition: esmo.h:98
_ESMO_Obj_::speedRef
float32_t speedRef
Definition: esmo.h:134
_ESMO_Obj_::Gqsmopos
float32_t Gqsmopos
Definition: esmo.h:99
_ESMO_Obj_::pll_ui
float32_t pll_ui
Definition: esmo.h:141
math.h
ESMO_setPLLParams
void ESMO_setPLLParams(ESMO_Handle handle, const float32_t pll_KpMax, const float32_t pll_KpMin, const float32_t pll_KpSF)
Set PLL parameters for the ESMO controller.
ESMO_getAngleElec
static float32_t ESMO_getAngleElec(ESMO_Handle handle)
Gets the angle from the ESMO controller.
Definition: esmo.h:391
ESMO_setPLLKp
static void ESMO_setPLLKp(ESMO_Handle handle, const float32_t pll_Kp)
Runs the ESMO controller.
Definition: esmo.h:311
ESMO_getSpeed_Hz
static float32_t ESMO_getSpeed_Hz(ESMO_Handle handle)
Gets the speed from the ESMO controller.
Definition: esmo.h:360
_ESMO_Obj_::Kslide
float32_t Kslide
Definition: esmo.h:103
_ESMO_Obj_::EstIbeta
float32_t EstIbeta
Definition: esmo.h:111
_ESMO_Obj_::speed_sf
float32_t speed_sf
Definition: esmo.h:88
_ESMO_Obj_::lpf_b0
float32_t lpf_b0
Definition: esmo.h:149
_ESMO_Obj_::Fqsmopos
float32_t Fqsmopos
Definition: esmo.h:97
_ESMO_Obj_::Zalpha
float32_t Zalpha
Definition: esmo.h:116
_MATH_Vec3_::value
float32_t value[3]
Definition: math.h:232
_ESMO_Obj_::pll_Out
float32_t pll_Out
Definition: esmo.h:138
ESMO_updatePLLParams
void ESMO_updatePLLParams(ESMO_Handle handle)
Reset the ESMO controller.
ESMO_resetParams
void ESMO_resetParams(ESMO_Handle handle)
Reset the ESMO controller.
_ESMO_Obj_::KslideMax
float32_t KslideMax
Definition: esmo.h:104
_ESMO_Obj_::lpf_a1
float32_t lpf_a1
Definition: esmo.h:150
_ESMO_Obj_::scaleFreq_Hz
float32_t scaleFreq_Hz
Definition: esmo.h:86
_ESMO_Obj_::Ealpha
float32_t Ealpha
Definition: esmo.h:113
ESMO_setSpeedRef
static void ESMO_setSpeedRef(ESMO_Handle handle, const float32_t speedRef_Hz)
Set reference speed to the ESMO controller.
Definition: esmo.h:348
_ESMO_Obj_::Vbeta
float32_t Vbeta
Definition: esmo.h:108
ESMO_setPLLKi
void ESMO_setPLLKi(ESMO_Handle handle, const float32_t pll_Ki)
Set PLL parameters for the ESMO controller.
_ESMO_Obj_::Eq
float32_t Eq
Definition: esmo.h:120
_ESMO_Obj_::pll_KpSF
float32_t pll_KpSF
Definition: esmo.h:146
ESMO_updateKslide
static void ESMO_updateKslide(ESMO_Handle handle)
Update Kslide for the ESMO controller.
Definition: esmo.h:400
_ESMO_Obj_::thetaErrSF
float32_t thetaErrSF
Definition: esmo.h:127
ESMO_setOffsetCoef
static void ESMO_setOffsetCoef(ESMO_Handle handle, const float32_t offsetSF)
Sets angle offset coefficient for the ESMO controller.
Definition: esmo.h:275
ESMO_setKslide
static void ESMO_setKslide(ESMO_Handle handle, const float32_t Kslide)
Sets Kslide for the ESMO controller.
Definition: esmo.h:233
ESMO_full_run
void ESMO_full_run(ESMO_Handle handle, float32_t Vdcbus, MATH_vec3 *pVabc_pu, MATH_vec2 *pIabVec)
Runs the ESMO controller.
_ESMO_Obj_::Zbeta
float32_t Zbeta
Definition: esmo.h:117
ESMO_setBEMFKslfFreq
static void ESMO_setBEMFKslfFreq(ESMO_Handle handle, const float32_t filterFc_Hz)
Sets speed filter cut off frequency for the ESMO controller.
Definition: esmo.h:287
ESMO_setPLLKpSF
static void ESMO_setPLLKpSF(ESMO_Handle handle, const float32_t pll_KpSF)
Set kp of the pll for the ESMO controller.
Definition: esmo.h:212
ESMO_setSpeedFilterFreq
static void ESMO_setSpeedFilterFreq(ESMO_Handle handle, const float32_t lpfFc_Hz)
Sets speed filter cut off frequency for the ESMO controller.
Definition: esmo.h:299
_ESMO_Obj_::speedEst
float32_t speedEst
Definition: esmo.h:135
ESMO_setAnglePu
static void ESMO_setAnglePu(ESMO_Handle handle, const float32_t theta_rad)
Set Angle to the ESMO controller.
Definition: esmo.h:323
_ESMO_Obj_::pll_KpMin
float32_t pll_KpMin
Definition: esmo.h:145
_ESMO_Obj_::Valpha
float32_t Valpha
Definition: esmo.h:107
_ESMO_Obj_::thetaDelta
float32_t thetaDelta
Definition: esmo.h:130
_ESMO_Obj_::thetaPll
float32_t thetaPll
Definition: esmo.h:129
_ESMO_Obj_::KslideMin
float32_t KslideMin
Definition: esmo.h:105
_ESMO_Obj_::Ed
float32_t Ed
Definition: esmo.h:119
_ESMO_Obj_::Ts
float32_t Ts
Definition: esmo.h:92
ESMO_run
static void ESMO_run(ESMO_Handle handle, float32_t Vdcbus, MATH_vec3 *pVabc_pu, MATH_vec2 *pIabVec)
Definition: esmo.h:419
_USER_Params_
Defines a structure for the user parameters.
Definition: include/userParams.h:98
MATH_ONE_OVER_SQRT_THREE
#define MATH_ONE_OVER_SQRT_THREE
Defines 1/sqrt(3)
Definition: math.h:119
ESMO_Obj
struct _ESMO_Obj_ ESMO_Obj
Defines the ESMO controller object.
_ESMO_Obj_::Ebeta
float32_t Ebeta
Definition: esmo.h:114
_ESMO_Obj_::current_sf
float32_t current_sf
Definition: esmo.h:90
_ESMO_Obj_::pll_Umax
float32_t pll_Umax
Definition: esmo.h:139
ESMO_setParams
void ESMO_setParams(ESMO_Handle handle, const USER_Params *pUserParams)
Set the ESMO controller.
_ESMO_Obj_::theta
float32_t theta
Definition: esmo.h:128
_ESMO_Obj_::pll_Ki
float32_t pll_Ki
Definition: esmo.h:147
_ESMO_Obj_::thetaOffset_rad
float32_t thetaOffset_rad
Definition: esmo.h:123
ESMO_resetPLL
static void ESMO_resetPLL(ESMO_Handle handle)
Resets PLL integration for the ESMO controller.
Definition: esmo.h:262
_MATH_Vec2_::value
float32_t value[2]
Definition: math.h:220
_MATH_Vec3_
Defines a three element vector.
Definition: math.h:230

Copyright 2023, Texas Instruments Incorporated