TLE9879 EvalKit KP KI in FOC or BEMF mode

Announcements

Webinar: Integrated solutions for smaller, simpler low-voltage motor control design.
Join the webinar to experience!

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

cross mob
Julien33
Level 2
Level 2
25 sign-ins 10 sign-ins 10 replies posted

Dear community,

On https://community.infineon.com/t5/MOTIX-MCU/BLDC-Sensorless-FOC-TLE9879-Arduino-Kit-24VDC-and-high-s... we solved how to run the TLE9879 with 24VDC main voltage. Because the TLE9879 Arduino Kit is not possible to configure if we don't have the Segger J-Link for programming it, I confirmed the solution with the TLE9879 EvalKit V1.4 configurable by USB.

I open a new discussion about this time the PI Controller and the BEMF and FOC projects that I try to adapt for my application of driller:

Motor used: 16mm diameter 1 pole pair 24VDC sensorless BLDC motor with 30.000rpm maximum speed, 90µH and 1,3ohm phase to phase, 1750rpm/V.

Objective: to apply a varying load on the axis without stopping the motor and with a speed remaining constant. When a blocking current is reached (maximum torque), the motor is blocked then.

The BEMF software has not so much documentation but after several tunings in the Config Wizard I can obtain good performances and drive the motor from 2.000rpm to 30.000rpm. On middle/high speeds the blocking current is around 5A and on lowest speeds, around 2A.
The improved settings are: "2" polepair, "400" Ki, "100" Kp, "0.01" Speed Filter Time, 15 KHz PWM.
I got also good performances with: "2" polepair, "0" Ki, "400" Kp, "0.01" Speed Filter Time, 10 KHz PWM.

Now I would like to increase the current on the low speeds without affecting the high speeds performances. But when I change the PI Controller parameters for low speeds, the high speeds performances are degraded. Is there existing a documentation for the TLE9879 PI Controller with the formulas used by the BEMF software and its PI Controller? Perhaps someone can propose me good PI values to test for the motor parameters I use?

If found this interesting application note https://www.infineon.com/dgdl/TLE7242G-TLE8242-2L%20-Application-Note_KP_KI_V2_0.pdf?fileId=db3a3043... but it is for another software driver I guess, and after calculation of the KP KI values it didn't improved my application. Also the formulas from a comment in my previous post didn't help.

The FOC software is more complexe to configure but more documented. Is this FOC method compatible with my motor and application? Because after several trials, I cannot run my motor as good as on the BEMF method.

Many thanks in advance for support.

Best Regards,

Julien

0 Likes
1 Solution
RupakC
Moderator
Moderator
Moderator
100 solutions authored 250 sign-ins 25 likes received

Hello @Julien 

Hello Julien. 

I hope you are doing good. To go for field weakening control FOC code has to  be modified. 

In the Emo_RAM.C file of the BLDC_SENSORLESS_FOC, make the following change :

RupakC_0-1664255914112.png

You may change the value of 0 to some suitable negative value that suits your purpose. On implementing this, your speed should increase. As an example I have the following two results :

Julien1.jpg

Julien2.jpg

In both the cases, the reference speed was around 1.8 A. The first result was taken with the value 0 as in the top image. Upon changing that value to -500, we could go up to a speed of  1751. Also you can see the speed profile where it shows that there is steady operation at constant speed. No speed fluctuations are observed

I hope this helps to resolve your issue.

Regards

RupakC

View solution in original post

0 Likes
14 Replies
RupakC
Moderator
Moderator
Moderator
100 solutions authored 250 sign-ins 25 likes received

Hello @Julien33 

From your question, I understand that you have figured out the suitable Kp Ki values for high speed operation of the motor.  However, using those values of Kp and Ki the motor does not give desired performance in for low speed operations. The manual of how to tune the Kp and Ki values are already shared with you in the thread below by @Raj_C .

https://community.infineon.com/t5/MOTIX-MCU/BLDC-Sensorless-FOC-TLE9879-Arduino-Kit-24VDC-and-high-s...

The procedure mentioned in the manual should work fine. I am sorry that we do not have any other document for tuning of Kp and Ki values. 

To solve your problem at low speeds, can you tune the PI controller parameters and optimize it for the low speed operations? So you would have two sets of Kp and Ki values for two different speed range of operations. When speed of the motor reaches a particular value, you can replace the PI parameters as is necessary. 

Please let me know if this helps.. If not, I will be happy to look for other solutions to your problem. 

Thanks and Regards

RupakC
0 Likes

Hello @RupakC ,

Many thanks for your support and reply. It is very helpful. Indeed, when I optimize the PI parameters for low speeds, the high speeds performances are affected, and reverse. I will try to adapt two sets of parameters for low and high speeds, but the speed is constantly changed during the operation so I hope to not have issue to switch the values during the motor is turning.

I meet another issue previously mentioned: I cannot drive my motor more than 30.000 rpm speed. I define my motor pole pair as 2 and send 20.000 command value (so 40.000 rpm should be expected) but it doesn't pass the 30k. I changed as most as possible sint16 to sint32 variables but without any improvement. Do you have any trick or solution to drive my motor at 40.000 rpm please? (it is a 1 pole pair motor but I configure as 2 pole pairs to work fine).

Many thanks for reply.

Best Regards,

Julien

0 Likes
RupakC
Moderator
Moderator
Moderator
100 solutions authored 250 sign-ins 25 likes received

Hello @Julien33 

Could you run your motor while configuring the pole pair as 4 instead of 2 ?

Please let me know if the solution works.

Regards 

RupakC
0 Likes

Hello @RupakC 

When I change to 4 pole pairs or more, the motor starts the procedure but then stops before the motor closed loop. Even if I define 10.000 speed value.

Is there any example or instruction where the speed value has been defined more than a 32767 value? Perhaps a formula or variable is blocking the motor speed to less than 32767.

Thank you in advance.

Best Regards,

Julien

 

0 Likes
RupakC
Moderator
Moderator
Moderator
100 solutions authored 250 sign-ins 25 likes received

Hii @Julien33 

May I know what is the motor voltage and current that you are getting when the motor is running at 30Krpm and not exceeding that speed ? Maybe there is some saturation of the controller due to which the speed is not increasing beyond 30krpm.  Please provide with the motor voltage and current values or waveforms for the entire range of operation. 

Also please provide waveforms of the dc bus voltage for the entire range of operation. If the dc bus voltage drops, the motor will fail to achieve desired speeds. what is the back emf constant of the motor ?

Thanks and Regards

RupakC
0 Likes

Hello @RupakC 

Thank you for taking time to help me. I made some tests with a lab power supply to play with the main voltage, with the same motor and a max. speed set to 40krpm on software:

- 24VDC: 250 mA no-load current, rough behavior with motor heating, max. real speed is 30krpm

- 18VDC: 130 mA no-load current, smoother with less heating, max. real speed remains 30krpm

(the DC bus remains constant over the operations, I use a 200W PSU which allows no voltage drop)

The back-EMF constant of the motors I use is around 0,5 to 0,6 mV/rpm.

Do you think the suspected saturation of the controller is coming from the hardware or software?

Best Regards,

Julien

0 Likes
RupakC
Moderator
Moderator
Moderator
100 solutions authored 250 sign-ins 25 likes received

Hii @Julien33 

I have the following points to make:

1. Since you have mentioned that the rated speed of the motor is 30Krpm, trying to run it beyond 30Krpm would need you to go into field weakening control.  Make sure you activate that in the code. 

2. You have mentioned that your back emf constant may be 0.6mV/rpm. So at 40Krpm speed, your back emf should be 24V. Now, the sum of your back emf and resistive voltage drop should be less than the motor input voltage. If you use 24V as dc bus, make sure that the input voltage to motor is more than the sum of back emf and resistive drop.

3. I think your motor may be running in overmodulation at 18V dc bus and 30Krpm because your back emf (if it is 0.6mV/rpm) in that case should be 18V. Please check and confirm this. 

Please let me know your comments and conclusion from your analysis based on my observations mentioned above.  

Regards

RupakC
0 Likes

Hello @RupakC 

1. Since you have mentioned that the rated speed of the motor is 30Krpm, trying to run it beyond 30Krpm would need you to go into field weakening control.  Make sure you activate that in the code. 

Can you give me the good code line for activate this please?

Best Regards,

Julien

0 Likes

Hello @RupakC 

Another question, in the "BLDC_BC_BEMF_EXAMPLE_TLE987X" code example, which function or code line is defining and adapting the current speed period?

On the picture below, it is the scope screen of the signal observed on a phase line of the motor:

20220525_141647.jpg

We can measure the 15KHz PWM frequency I defined.

Also we can measure the speed commutation period of 2,06ms (current speed = 1/2,06ms * 60 = 30.000rpm) and I want to know where in the code I can find the control of this 2ms period. Perhaps it can help to find and solve the speed limitation by writing higher values for 40.000rpm.

Best Regards,

Julien

0 Likes

In addition, I made another test with the same setup (same 24V power supply, same software and parameters than previously) but with another motor reference. This new motor is a 19VDC also 1 pole pair motor where 19VDC = 40.000rpm.

I can drive this motor from Emo_setspeedreferenz(1000) 3500rpm:

20220525_152331.jpg

to Emo_setspeedreferenz(18000) 36Krpm (18000 x 2polepairsetting):

20220525_152156.jpg

If I send 19000 or 20000 command it cannot reach 40Krpm: the motor blocks at startup procedure.

Maybe this can help you @RupakC to understand the behavior with my 24VDC 40Krpm motor.

Thank you in advance!

Best Regards,

Julien

0 Likes
RupakC
Moderator
Moderator
Moderator
100 solutions authored 250 sign-ins 25 likes received

Hello @Julien33 

Thank you for trying to provide more analysis and waveforms to help me understand the problem better. 

However, I am not sure I could completely understand your last comment. What do you mean by 19VDC=40Krpm ?
What is shown in the waveform? what waveform is it ? 

Are you giving a speed reference of 18000 and the motor runs at 36000 rpm ?

Could you clarify these and help me understand what you are trying to do?

Thank you

RupakC
0 Likes

Hello @RupakC 

Are you giving a speed reference of 18000 and the motor runs at 36000 rpm ? >>> Yes, the real measured speed is 2 times the speed reference (I configured 2 pole pairs on ConfigWizard).

 

The tests are made with two differents sensorless bldc motors on the same test setup and same 24V power supply. Both motors maximum speed is 40.000rpm.

First, I made my tests with a 24VDC(max rating) motor: I can make it turning from 2.000 (weak) to 30.000 rpm (rough). If I send a command for more rpm speed, the motor speed doesn't change and remains at 30.000rpm.

Then I made a test with another reference 19VDC(max rating) motor I have: it turns from 3500 to 36.000 rpm. This time I can read higher speed than 30.000rpm. But after 36.000 rpm command, the motor blocks at starting. It cannot reach 40.000 rpm.

 

The waveform is taken on a wire of the motor. It is the motor's Phase A, B or C voltage waveform.

Best Regards,

Julien

0 Likes
RupakC
Moderator
Moderator
Moderator
100 solutions authored 250 sign-ins 25 likes received

Hello @Julien33 

Field Weakening control is not possible with the BEMF algorithm. For field weakening control, you need to  modify the FOC code. Else, you can use a motor that has a higher rated speed of up to 40Krpm. 

Regards

RupakC
0 Likes
RupakC
Moderator
Moderator
Moderator
100 solutions authored 250 sign-ins 25 likes received

Hello @Julien 

Hello Julien. 

I hope you are doing good. To go for field weakening control FOC code has to  be modified. 

In the Emo_RAM.C file of the BLDC_SENSORLESS_FOC, make the following change :

RupakC_0-1664255914112.png

You may change the value of 0 to some suitable negative value that suits your purpose. On implementing this, your speed should increase. As an example I have the following two results :

Julien1.jpg

Julien2.jpg

In both the cases, the reference speed was around 1.8 A. The first result was taken with the value 0 as in the top image. Upon changing that value to -500, we could go up to a speed of  1751. Also you can see the speed profile where it shows that there is steady operation at constant speed. No speed fluctuations are observed

I hope this helps to resolve your issue.

Regards

RupakC
0 Likes