Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

MOTIX™ MCU Forum Discussions

User19528
Level 1
Level 1
Hello,
In BLDC_SENSORLESS_FOC_LIN_EXAMPLE_TLE987X SW demo for BLDC motor control we find in Emo.c "Emo_lInitFocPar"
void Emo_lInitFocPar(void)
{
/* set to 15V */
float KU = 15.0;
float KI;
/* set to 0.1V/s */
float KPSIE = 0.1;
float KUZ;
static float x;
float CoAFlux = 200.0;
float OpGain;
uint16 i;
Emo_Status.MotorStartError = 0;
Emo_Svm.MaxAmp = (CCU6_T12PR / EMO_CFG_FOC_TABLE_SCALE);
/*vectorial voltage limitation, for block limitation algorithm*/
/*0.9091 * MaxAmp*/
Emo_Svm.MaxAmp9091pr = (29789 * Emo_Svm.MaxAmp) >> MAT_FIX_SHIFT;
/*0.4164 * MaxAmp*/
Emo_Svm.MaxAmp4164pr = (13643 * Emo_Svm.MaxAmp) >> MAT_FIX_SHIFT;
Emo_Svm.MaxAmpQuadrat = (uint32)Emo_Svm.MaxAmp * Emo_Svm.MaxAmp;
Emo_Svm.Kfact256 = 8388608 / Emo_Svm.MaxAmp; //2 exp23/MaxAmp

Could you please give as more information and clarification about the previous code

Please tell me what is?
KU
KI
KPSIE
EMO_CFG_FOC_TABLE_SCALE
Emo_Svm.MaxAmp
Emo_Svm.MaxAmp9091pr
Emo_Svm.MaxAmp4164pr
Emo_Svm.MaxAmpQuadrat
Emo_Svm.Kfact256

Same for the following code:
Emo_Foc.PhaseInd = x;
Emo_Foc.Kdcdivident1 = KU * 1.7320508 * Emo_Svm.MaxAmp / KUZ * 32768 / 2.0;
Emo_Foc.Kdcfactor2 = KUZ * 32768.0 * 32768.0 / (KU * 1.7320508 * Emo_Svm.MaxAmp * 64);
Emo_Foc.Kdcfactoriqc = 32768.0 * KUZ / (1.7320508 * KU * 32.0);
mo_Foc.PolePair = Emo_Focpar_Cfg.PolePair;
x = Emo_Focpar_Cfg.StartCurrent / KI * 32768.0;

Please tell me what is?
Emo_Foc.Kdcdivident1
Emo_Foc.Kdcfactor2
Emo_Foc.Kdcfactoriqc

thanks in advance for your support
0 Likes
3 Replies
User17952
Level 3
Level 3
Hi,
These values are part of Infineon FOC algorithm.I guess only the Infineon engineer know the real meaning of these value.But you can find some clues in the figure below.
4793.attach
0 Likes
User21580
Level 1
Level 1
LiangXiao wrote:
Hi,
These values are part of Infineon FOC algorithm.I guess only the Infineon engineer know the real meaning of these value.But you can find some clues in the figure below.
4793.attach


Can you help me about :
/* KI current regulator parameter **
** 5.0 => 5V ADC referenc voltage */
KI = 5.0 * 2.0 / (Emo_Focpar_Cfg.Rshunt * OpGain);

in the EMO.C,line 240,
I have no idea what is the " 2.0",
thank you !
0 Likes
User17952
Level 3
Level 3
Hi,
I think you shouldn't pay much attention to these details.First, you shoud suppose the demo code is right, then change the parameter and run your motor.
"2.0" is for futher mathematical operation in other code.
0 Likes