AM263x Motor Control SDK  09.02.00
esmo.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2024 Texas Instruments Incorporated
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  *
8  * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  *
11  * Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in the
13  * documentation and/or other materials provided with the
14  * distribution.
15  *
16  * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
32 
33 
34 #ifndef ESMO_H
35 #define ESMO_H
36 
37 #ifdef __cplusplus
38 extern "C"
39 {
40 #endif
41 
53 // the includes
54 
55 #include <stdlib.h>
56 #include <math.h>
57 
58 #include "math_types.h"
59 #include "userParams.h"
60 
63 typedef struct _ESMO_Obj_
64 {
66 
67  float32_t speed_sf; // speed PU scale factor
68  float32_t voltage_sf; // voltage PU scale factor
69  float32_t current_sf; // current PU scale factor
70 
71  float32_t Ts; // sampling period in sec
72  float32_t base_wTs; // base_wTs = BASE_FREQ * T ,for lib
73  float32_t filterFc_sf; // smo filter frequency coefficient
74 
75  float32_t Fdsmopos; // motor dependent plant matrix
76  float32_t Fqsmopos; // motor dependent plant matrix
77  float32_t Gdsmopos; // motor dependent control gain
78  float32_t Gqsmopos; // motor dependent control gain
79  float32_t Kslf; // sliding control filter gain
80  float32_t E0; // estimated bemf threshold
81 
82  float32_t Kslide; // sliding control gain
83  float32_t KslideMax; // sliding control gain, maximum value
84  float32_t KslideMin; // sliding control gain, minimum value
85 
86  float32_t Valpha; // stationary d-axis phase voltage (pu)
87  float32_t Vbeta; // stationary q-axis phase voltage (pu)
88 
89  float32_t EstIalpha; // estimated stationary alfa-axis stator current
90  float32_t EstIbeta; // estimated stationary beta-axis stator current
91 
92  float32_t Ealpha; // stationary alfa-axis back EMF
93  float32_t Ebeta; // stationary beta-axis back EMF
94 
95  float32_t Zalpha; // stationary alfa-axis sliding control
96  float32_t Zbeta; // stationary beta-axis sliding control
97 
101 
104 
110  float32_t offsetSF; // Scale factor
112 
116 
117  float32_t pll_Out; // controller output
118  float32_t pll_Umax; // upper saturation limit
119  float32_t pll_Umin; // lower saturation limit
120  float32_t pll_ui; // integral term
121 
122  float32_t pll_Kp; // proportional gain
123  float32_t pll_KpMax; // maximum proportional gain
124  float32_t pll_KpMin; // minimum proportional loop gain
125  float32_t pll_KpSF; // proportional gain coefficient
126  float32_t pll_Ki; // integral gain
127 
128  float32_t lpf_b0; // Low Pass Filter Param b0
129  float32_t lpf_a1; // Low Pass Filter Param a1
130 
131  float32_t lpfFc_Hz; // Low Pass Filter desired cut off frequency (Hz)
132 } ESMO_Obj, *ESMO_Handle;
133 
134 // **************************************************************************
135 // the function prototypes
136 
137 //*****************************************************************************
138 //
144 //*****************************************************************************
145 extern ESMO_Handle ESMO_init(void *pMemory, const size_t numBytes);
146 
147 //*****************************************************************************
148 //
152 //*****************************************************************************
153 extern void ESMO_updateFilterParams(ESMO_Handle handle);
154 
155 //*****************************************************************************
156 //
160 //*****************************************************************************
161 extern void ESMO_updatePLLParams (ESMO_Handle handle);
162 
163 //*****************************************************************************
164 //
172 //*****************************************************************************
173 extern void ESMO_full_run(ESMO_Handle handle,
174  float32_t Vdcbus, MATH_vec3 *pVabc_pu, MATH_vec2 *pIabVec);
175 
176 #define ESMO_inline_run ESMO_run // Backwards compatible
177 
178 //*****************************************************************************
179 //
186 //*****************************************************************************
187 static __attribute__((always_inline))
188 void ESMO_run(ESMO_Handle handle, const float32_t Vdcbus,
189  MATH_vec3 *pVabc_pu, MATH_vec2 *pIabVec)
190 {
191  ESMO_Obj *obj = (ESMO_Obj *)handle;
192 
193  // Scale the incomming modulation functions with the DC bus voltage value
194  // and calculate the 3 Phase voltages
195  float32_t Vtemp = Vdcbus * obj->voltage_sf;
196 
197  float32_t VphaseA = Vtemp *
198  (pVabc_pu->value[0] * 2.0f - pVabc_pu->value[1] - pVabc_pu->value[2]);
199 
200  float32_t VphaseB = Vtemp *
201  (pVabc_pu->value[1] * 2.0f - pVabc_pu->value[0] - pVabc_pu->value[2]);
202 
203  // Voltage transformation (a,b,c) -> (Alpha,Beta)
204  obj->Valpha = VphaseA;
205  obj->Vbeta = (VphaseA + VphaseB * 2.0f) * MATH_ONE_OVER_SQRT_THREE;
206 
207  // Sliding mode current observer
208  float32_t ValphaError = obj->Valpha - obj->Ealpha - obj->Zalpha;
209  float32_t VbetaError = obj->Vbeta - obj->Ebeta - obj->Zbeta;
210 
211  obj->EstIalpha = obj->Gdsmopos * ValphaError + obj->Fdsmopos * obj->EstIalpha;
212  obj->EstIbeta = obj->Gqsmopos * VbetaError + obj->Fqsmopos * obj->EstIbeta;
213 
214  // Current errors
215  float32_t IalphaError = obj->EstIalpha - pIabVec->value[0] * obj->current_sf;
216  float32_t IbetaError = obj->EstIbeta - pIabVec->value[1] * obj->current_sf;
217 
218  // Sliding control calculator
219  obj->Zalpha = MATH_sat(IalphaError, obj->E0, -obj->E0) * obj->Kslide;
220  obj->Zbeta = MATH_sat(IbetaError, obj->E0, -obj->E0) * obj->Kslide;
221 
222  // Sliding control filter -> back EMF calculator
223  obj->Ealpha = obj->Ealpha + obj->Kslf * (obj->Zalpha - obj->Ealpha);
224  obj->Ebeta = obj->Ebeta + obj->Kslf * (obj->Zbeta - obj->Ebeta);
225 
226  // arc tangent of src radians
227  float32_t thetaOffset = atan2f((obj->speedRef * obj->offsetSF), obj->Kslf)/MATH_TWO_PI;
228  obj->thetaPll = obj->theta - thetaOffset;
229 
230  float32_t pllSine = sinf(obj->thetaPll * MATH_TWO_PI);
231  float32_t pllCosine = cosf(obj->thetaPll * MATH_TWO_PI);
232 
233  obj->Ed = obj->Ealpha * pllCosine + obj->Ebeta * pllSine;
234  obj->Eq = obj->Ebeta * pllCosine - obj->Ealpha * pllSine;
235  obj->Eq_mag = sqrtf(obj->Ealpha * obj->Ealpha + obj->Ebeta * obj->Ebeta);
236 
237  //0.1591549431 = 1/6.28 (1/(2*PI())
238  float32_t thetaErrSF = obj->thetaErrSF;
239 
240  if(obj->Eq >= 0.0f)
241  {
242  thetaErrSF = -obj->thetaErrSF;
243  }
244 
245  obj->thetaErr = obj->Ed * thetaErrSF / obj->Eq_mag;
246 
247  // integral term
248  obj->pll_ui = (obj->pll_Ki * obj->thetaErr) + obj->pll_ui;
249 
250  // control output
251  obj->pll_Out = MATH_sat((obj->pll_Kp * obj->thetaErr + obj->pll_ui),
252  obj->pll_Umax, obj->pll_Umin);
253 
254  obj->speedEst = (obj->pll_Out + obj->speedEst) * 0.5f;
255 
256  // low pass filter for estimation speed
257  obj->speedFlt = obj->lpf_b0 * obj->pll_Out + obj->lpf_a1 * obj->speedFlt;
258 
259  // speed integration to get the rotor angle
260  obj->theta = obj->theta + obj->speedFlt * obj->thetaDelta;
261 
262  if(obj->theta > 1.0f)
263  {
264  obj->theta -= 1.0f;
265  }
266  else if(obj->theta < -1.0f)
267  {
268  obj->theta += 1.0f;
269  }
270 
271  obj->thetaEst = obj->theta * MATH_TWO_PI;
272 
273  if(obj->thetaEst > MATH_PI)
274  {
275  obj->thetaEst -= MATH_TWO_PI;
276  }
277  else if(obj->thetaEst < (-MATH_PI))
278  {
279  obj->thetaEst += MATH_TWO_PI;
280  }
281 
282  return;
283 } // end of ESMO_run() function
284 
285 //*****************************************************************************
286 //
290 //*****************************************************************************
291 static inline void ESMO_resetParams(ESMO_Handle handle)
292 {
293  ESMO_Obj *obj = (ESMO_Obj *)handle;
294 
295  obj->pll_ui = 0.0f;
296 
297  obj->speedEst = 0.0f;
298  obj->theta = 0.0f;
299 
300  obj->Kslide = obj->KslideMin;
301  obj->pll_Kp = obj->pll_KpMin;
302 
303  return;
304 }
305 
306 //*****************************************************************************
307 //
312 //*****************************************************************************
313 extern void ESMO_setParams(ESMO_Handle handle, const USER_Params *pUserParams);
314 
315 //*****************************************************************************
316 //
323 //*****************************************************************************
324 static inline void ESMO_setPLLParams(ESMO_Handle handle,
325  const float32_t pll_KpMax,
326  const float32_t pll_KpMin,
327  const float32_t pll_KpSF)
328 {
329  ESMO_Obj *obj = (ESMO_Obj *)handle;
330 
331  obj->pll_KpMax = pll_KpMax;
332  obj->pll_KpMin = pll_KpMin;
333  obj->pll_KpSF = pll_KpSF;
334 
335  return;
336 }
337 
338 //*****************************************************************************
339 //
344 //*****************************************************************************
345 static inline void ESMO_setPLLKi(ESMO_Handle handle, const float32_t pll_Ki)
346 {
347  ESMO_Obj *obj = (ESMO_Obj *)handle;
348 
349  obj->pll_Ki = pll_Ki;
350 
351  return;
352 }
353 
354 //*****************************************************************************
355 //
360 //*****************************************************************************
361 static inline void ESMO_setBEMFThreshold(ESMO_Handle handle, const float32_t bemfThreshold)
362 {
363  ESMO_Obj *obj = (ESMO_Obj *)handle;
364 
365  obj->E0 = bemfThreshold;
366 }
367 
368 //*****************************************************************************
369 //
374 //*****************************************************************************
375 static inline void ESMO_setPLLKpSF(ESMO_Handle handle, const float32_t pll_KpSF)
376 {
377  ESMO_Obj *obj = (ESMO_Obj *)handle;
378 
379  obj->pll_KpSF = pll_KpSF;
380 }
381 
382 //*****************************************************************************
383 //
389 //*****************************************************************************
390 static inline void ESMO_setKslideParams(ESMO_Handle handle,
391  const float32_t KslideMax,
392  const float32_t KslideMin)
393 {
394  ESMO_Obj *obj = (ESMO_Obj *)handle;
395 
396  obj->KslideMax = KslideMax;
397  obj->KslideMin = KslideMin;
398 
399  return;
400 }
401 
402 //*****************************************************************************
403 //
408 //*****************************************************************************
409 static inline void ESMO_setKslide(ESMO_Handle handle, const float32_t Kslide)
410 {
411  ESMO_Obj *obj = (ESMO_Obj *)handle;
412 
413  obj->Kslide = Kslide;
414 }
415 
416 //*****************************************************************************
417 //
421 //*****************************************************************************
422 static inline void ESMO_resetPLL(ESMO_Handle handle)
423 {
424  ESMO_Obj *obj = (ESMO_Obj *)handle;
425 
426  obj->pll_ui = 0.0f;
427  obj->pll_Out = 0.0f;
428 }
429 
430 //*****************************************************************************
431 //
436 //*****************************************************************************
437 static inline void ESMO_setOffsetCoef(ESMO_Handle handle, const float32_t offsetSF)
438 {
439  ESMO_Obj *obj = (ESMO_Obj *)handle;
440 
441  obj->offsetSF = offsetSF;
442 }
443 
444 //*****************************************************************************
445 //
450 //*****************************************************************************
451 static inline void ESMO_setBEMFKslfFreq(ESMO_Handle handle, const float32_t filterFc_sf)
452 {
453  ESMO_Obj *obj = (ESMO_Obj *)handle;
454 
455  obj->filterFc_sf = filterFc_sf;
456 }
457 
458 //*****************************************************************************
459 //
464 //*****************************************************************************
465 static inline void ESMO_setSpeedFilterFreq(ESMO_Handle handle, const float32_t lpfFc_Hz)
466 {
467  ESMO_Obj *obj = (ESMO_Obj *)handle;
468 
469  obj->lpfFc_Hz = lpfFc_Hz;
470 }
471 
472 //*****************************************************************************
473 //
478 //*****************************************************************************
479 static inline void ESMO_setPLLKp(ESMO_Handle handle, const float32_t pll_Kp)
480 {
481  ESMO_Obj *obj = (ESMO_Obj *)handle;
482 
483  obj->pll_Kp = pll_Kp;
484 }
485 
486 //*****************************************************************************
487 //
492 //*****************************************************************************
493 static inline void ESMO_setAnglePu(ESMO_Handle handle, const float32_t theta_rad)
494 {
495  ESMO_Obj *obj = (ESMO_Obj *)handle;
496 
497  obj->theta = theta_rad * MATH_ONE_OVER_TWO_PI;
498 }
499 
500 //*****************************************************************************
501 //
506 //*****************************************************************************
507 static inline void ESMO_setPLLSpeedPu(ESMO_Handle handle, const float32_t speed_Hz)
508 {
509  ESMO_Obj *obj = (ESMO_Obj *)handle;
510 
511  obj->speedFlt = speed_Hz * obj->speed_sf;
512  obj->pll_Out = speed_Hz * obj->speed_sf;
513 }
514 
515 //*****************************************************************************
516 //
521 //*****************************************************************************
522 static inline void ESMO_setSpeedRef(ESMO_Handle handle, const float32_t speedRef_Hz)
523 {
524  ESMO_Obj *obj = (ESMO_Obj *)handle;
525 
526  obj->speedRef = speedRef_Hz * obj->speed_sf;
527 }
528 
529 //*****************************************************************************
530 //
535 //*****************************************************************************
536 static inline float32_t ESMO_getSpeed_Hz(ESMO_Handle handle)
537 {
538  ESMO_Obj *obj = (ESMO_Obj *)handle;
539 
540  return(obj->speedEst * obj->scaleFreq_Hz);
541 }
542 
543 //*****************************************************************************
544 //
549 //*****************************************************************************
550 static inline float32_t ESMO_getSpeedPLL_Hz(ESMO_Handle handle)
551 {
552  ESMO_Obj *obj = (ESMO_Obj *)handle;
553 
554  return(obj->speedFlt * obj->scaleFreq_Hz);
555 }
556 
557 //*****************************************************************************
558 //
563 //*****************************************************************************
564 static inline float32_t ESMO_getAnglePLL(ESMO_Handle handle)
565 {
566  ESMO_Obj *obj = (ESMO_Obj *)handle;
567 
568  return(obj->thetaEst);
569 }
570 
571 //*****************************************************************************
572 //
577 //*****************************************************************************
578 static inline float32_t ESMO_getAngleElec(ESMO_Handle handle)
579 {
580  ESMO_Obj *obj = (ESMO_Obj *)handle;
581 
582  return(obj->thetaElec_rad);
583 }
584 
585 //*****************************************************************************
586 //
590 //*****************************************************************************
591 static inline void ESMO_updateKslide(ESMO_Handle handle)
592 {
593  ESMO_Obj *obj = (ESMO_Obj *)handle;
594 
595  if(obj->Kslide < obj->KslideMax)
596  {
597  obj->Kslide += 0.000002f;
598  }
599 }
600 
601 //*****************************************************************************
602 //
603 // Close the Doxygen group.
605 //
606 //*****************************************************************************
607 
608 //*****************************************************************************
609 //
610 // Mark the end of the C bindings section for C++ compilers.
611 //
612 //*****************************************************************************
613 #ifdef __cplusplus
614 }
615 #endif
616 
617 #endif //end of _ESMO_H_ definition
618 
ESMO_Obj::thetaOffset_rad
float32_t thetaOffset_rad
Definition: esmo.h:102
ESMO_setKslide
static void ESMO_setKslide(ESMO_Handle handle, const float32_t Kslide)
Sets Kslide for the ESMO controller.
Definition: esmo.h:409
ESMO_Obj::speedRef
float32_t speedRef
Definition: esmo.h:113
ESMO_Obj::pll_Umin
float32_t pll_Umin
Definition: esmo.h:119
ESMO_Obj::lpf_b0
float32_t lpf_b0
Definition: esmo.h:128
ESMO_Obj::KslideMin
float32_t KslideMin
Definition: esmo.h:84
ESMO_Obj
Defines the ESMO controller object.
Definition: esmo.h:64
ESMO_Obj::lpfFc_Hz
float32_t lpfFc_Hz
Definition: esmo.h:131
ESMO_Obj::thetaPll
float32_t thetaPll
Definition: esmo.h:108
ESMO_Obj::Ts
float32_t Ts
Definition: esmo.h:71
ESMO_Obj::EstIalpha
float32_t EstIalpha
Definition: esmo.h:89
ESMO_Obj::Zalpha
float32_t Zalpha
Definition: esmo.h:95
ESMO_setPLLKi
static void ESMO_setPLLKi(ESMO_Handle handle, const float32_t pll_Ki)
Set PLL parameters for the ESMO controller.
Definition: esmo.h:345
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:375
ESMO_resetParams
static void ESMO_resetParams(ESMO_Handle handle)
Reset the ESMO controller.
Definition: esmo.h:291
ESMO_run
static void ESMO_run(ESMO_Handle handle, const float32_t Vdcbus, MATH_vec3 *pVabc_pu, MATH_vec2 *pIabVec)
Runs the ESMO controller.
Definition: esmo.h:188
ESMO_init
ESMO_Handle ESMO_init(void *pMemory, const size_t numBytes)
Initializes the ESMO controller.
ESMO_Obj::filterFc_sf
float32_t filterFc_sf
Definition: esmo.h:73
ESMO_Obj::Vbeta
float32_t Vbeta
Definition: esmo.h:87
ESMO_Obj::Kslide
float32_t Kslide
Definition: esmo.h:82
ESMO_Obj::thetaEst
float32_t thetaEst
Definition: esmo.h:111
ESMO_setSpeedRef
static void ESMO_setSpeedRef(ESMO_Handle handle, const float32_t speedRef_Hz)
Set reference speed to the ESMO controller.
Definition: esmo.h:522
ESMO_Obj::scaleFreq_Hz
float32_t scaleFreq_Hz
Definition: esmo.h:65
ESMO_Obj::voltage_sf
float32_t voltage_sf
Definition: esmo.h:68
ESMO_Obj::pll_Kp
float32_t pll_Kp
Definition: esmo.h:122
ESMO_Obj::Ed
float32_t Ed
Definition: esmo.h:98
ESMO_setBEMFThreshold
static void ESMO_setBEMFThreshold(ESMO_Handle handle, const float32_t bemfThreshold)
Set bemfThreshold for the ESMO controller.
Definition: esmo.h:361
ESMO_Obj::KslideMax
float32_t KslideMax
Definition: esmo.h:83
ESMO_Obj::speed_sf
float32_t speed_sf
Definition: esmo.h:67
ESMO_setOffsetCoef
static void ESMO_setOffsetCoef(ESMO_Handle handle, const float32_t offsetSF)
Sets angle offset coefficient for the ESMO controller.
Definition: esmo.h:437
ESMO_setPLLKp
static void ESMO_setPLLKp(ESMO_Handle handle, const float32_t pll_Kp)
Runs the ESMO controller.
Definition: esmo.h:479
USER_Params
Defines a structure for the user parameters.
Definition: userParams.h:75
ESMO_Obj::Gqsmopos
float32_t Gqsmopos
Definition: esmo.h:78
ESMO_Obj::Ebeta
float32_t Ebeta
Definition: esmo.h:93
ESMO_updateKslide
static void ESMO_updateKslide(ESMO_Handle handle)
Update Kslide for the ESMO controller.
Definition: esmo.h:591
ESMO_Obj::offsetSF
float32_t offsetSF
Definition: esmo.h:110
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:465
ESMO_updatePLLParams
void ESMO_updatePLLParams(ESMO_Handle handle)
Reset the ESMO controller.
ESMO_Obj::thetaElec_rad
float32_t thetaElec_rad
Definition: esmo.h:103
ESMO_getAngleElec
static float32_t ESMO_getAngleElec(ESMO_Handle handle)
Gets the angle from the ESMO controller.
Definition: esmo.h:578
ESMO_Obj::thetaErrSF
float32_t thetaErrSF
Definition: esmo.h:106
ESMO_Obj::EstIbeta
float32_t EstIbeta
Definition: esmo.h:90
ESMO_Obj::Zbeta
float32_t Zbeta
Definition: esmo.h:96
ESMO_Obj::Fqsmopos
float32_t Fqsmopos
Definition: esmo.h:76
ESMO_setParams
void ESMO_setParams(ESMO_Handle handle, const USER_Params *pUserParams)
Set the ESMO controller.
ESMO_Obj::Gdsmopos
float32_t Gdsmopos
Definition: esmo.h:77
ESMO_Obj::current_sf
float32_t current_sf
Definition: esmo.h:69
ESMO_Obj::Kslf
float32_t Kslf
Definition: esmo.h:79
ESMO_Obj::Fdsmopos
float32_t Fdsmopos
Definition: esmo.h:75
ESMO_setBEMFKslfFreq
static void ESMO_setBEMFKslfFreq(ESMO_Handle handle, const float32_t filterFc_sf)
Sets speed filter cut off frequency for the ESMO controller.
Definition: esmo.h:451
ESMO_Obj::lpf_a1
float32_t lpf_a1
Definition: esmo.h:129
ESMO_setPLLParams
static 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.
Definition: esmo.h:324
ESMO_updateFilterParams
void ESMO_updateFilterParams(ESMO_Handle handle)
Reset the ESMO controller.
ESMO_Obj::pll_Ki
float32_t pll_Ki
Definition: esmo.h:126
ESMO_getAnglePLL
static float32_t ESMO_getAnglePLL(ESMO_Handle handle)
Gets the PLL angle from the ESMO controller.
Definition: esmo.h:564
ESMO_full_run
void ESMO_full_run(ESMO_Handle handle, float32_t Vdcbus, MATH_vec3 *pVabc_pu, MATH_vec2 *pIabVec)
Runs the any actions that user desires on top of ESMO controller.
ESMO_Obj::pll_Out
float32_t pll_Out
Definition: esmo.h:117
ESMO_Obj::pll_KpMin
float32_t pll_KpMin
Definition: esmo.h:124
ESMO_Obj::pll_KpSF
float32_t pll_KpSF
Definition: esmo.h:125
ESMO_Obj::theta
float32_t theta
Definition: esmo.h:107
ESMO_Obj::Valpha
float32_t Valpha
Definition: esmo.h:86
ESMO_setKslideParams
static void ESMO_setKslideParams(ESMO_Handle handle, const float32_t KslideMax, const float32_t KslideMin)
Set PLL parameters for the ESMO controller.
Definition: esmo.h:390
ESMO_Obj::speedEst
float32_t speedEst
Definition: esmo.h:114
ESMO_Obj::Eq
float32_t Eq
Definition: esmo.h:99
userParams.h
Contains the public interface for the HAL and EST modules.
ESMO_Obj::pll_ui
float32_t pll_ui
Definition: esmo.h:120
ESMO_setAnglePu
static void ESMO_setAnglePu(ESMO_Handle handle, const float32_t theta_rad)
Set Angle to the ESMO controller.
Definition: esmo.h:493
ESMO_getSpeedPLL_Hz
static float32_t ESMO_getSpeedPLL_Hz(ESMO_Handle handle)
Gets the PLL speed from the ESMO controller.
Definition: esmo.h:550
ESMO_Obj::pll_KpMax
float32_t pll_KpMax
Definition: esmo.h:123
ESMO_getSpeed_Hz
static float32_t ESMO_getSpeed_Hz(ESMO_Handle handle)
Gets the speed from the ESMO controller.
Definition: esmo.h:536
ESMO_Obj::Ealpha
float32_t Ealpha
Definition: esmo.h:92
ESMO_Obj::thetaErr
float32_t thetaErr
Definition: esmo.h:105
ESMO_Obj::speedFlt
float32_t speedFlt
Definition: esmo.h:115
ESMO_Obj::E0
float32_t E0
Definition: esmo.h:80
ESMO_Obj::thetaDelta
float32_t thetaDelta
Definition: esmo.h:109
ESMO_Obj::pll_Umax
float32_t pll_Umax
Definition: esmo.h:118
ESMO_setPLLSpeedPu
static void ESMO_setPLLSpeedPu(ESMO_Handle handle, const float32_t speed_Hz)
Set Angle to the ESMO controller.
Definition: esmo.h:507
float32_t
float float32_t
Definition: dcl_common.h:58
ESMO_Obj::Eq_mag
float32_t Eq_mag
Definition: esmo.h:100
ESMO_Obj::base_wTs
float32_t base_wTs
Definition: esmo.h:72
ESMO_resetPLL
static void ESMO_resetPLL(ESMO_Handle handle)
Resets PLL integration for the ESMO controller.
Definition: esmo.h:422