BLDC Hall Sensor Controlling using XMC1300

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

cross mob
lock attach
Attachments are accessible only for community members.
Suraj
Level 2
Level 2
10 replies posted 10 questions asked 10 sign-ins

Greetings of the day,

Am presently working on BLDC Hall sensor Controlling  using XMC1300 MCU with 120W custom motor and testing Current Control Scheme, am able to Run 120W DC Motor, But unable to control/Change Speed by using POTENTIOMETER

Observations:

1) When changing POT (approx from 2 to 5% analog input) the Motor running Slowly and Above 5% Maximum duty is applied and motor running with maximum speed and unable to reduce speed using POT

2) Motor is running When POT is at 0 position with some Feedback speed (65532), In CURRENT CONTROL SCHEME How to control Speed using POT (Analog input)?

3) Is any KP and KI factors to be adjusted to Control current ?

4) How to validate Current Controlling Scheme and what are the parameters to be observed ?

below is the current control PI technique used in XMC1300, please solve my issue ASAP

Thanking you advance

Suraj, N

0 Likes
1 Solution
psb
Moderator
Moderator
Moderator
250 sign-ins 25 solutions authored 100 replies posted

Hello @Suraj , 

  What is the control scheme that you're using ? If it is a current control mode (BLDC_SCALAR_CURRENT_CTRL), then the input to the control loop is the reference current, not the speed. If the control is either BLDC_SCALAR_SPEED_CTRL or BLDC_SCALAR_SPEEDCURRENT_CTRL then the speed control is done. In these two control methods, reference speed is the input to the overall control loop. 

For BLDC_SCALAR_CURRENT_CTRL current control scheme, the reference current is set in the ref_current, if the input is analog.  The reference currents are available in the typedef struct BLDC_SCALAR_CURRENT_CONTROL.
In the current control mode, the speed is not in our control. The torque is set by the current and speed is according to the load torque and motor mechanical parameters. 

In the current control scheme, Kp and Ki values are calculated as 
Kp = (2* 3.14 * Ls * (MOTOR0_BLDC_SCALAR_BASE_CURRENT / MOTOR0_BLDC_SCALAR_BASE_VOLTAGE) * Bandwidth * 2^scale)
* Ki = (2* 3.14 * Rs * (MOTOR0_BLDC_SCALAR_BASE_CURRENT / MOTOR0_BLDC_SCALAR_BASE_VOLTAGE) * Bandwidth * MOTOR0_BLDC_SCALAR_CCU8_PERIOD_uS * 2^scale)

psb_20-1661255363743.png

In order to vary the speed of the motor using potentiometer, do speed control (BLDC_SCALAR_SPEED_CTRL) or speed with current control (BLDC_SCALAR_SPEEDCURRENT_CTRL). 

Best Regards,
Sai

View solution in original post

0 Likes
2 Replies
Owen_Su
Moderator
Moderator
Moderator
250 solutions authored 500 replies posted 50 likes received

Hi, @Suraj ,

    I think that you have changed the control scheme in the codes, the current control scheme has default Kp/Ki values, so when you change the target current a little bit, the speed will grow very fast. I have a test on my XMC1300, when I setting 10% target current, the speed will increase to the maximum, and then, I set 1% target current, waiting the ref current stable, when the current stable, the speed will slow down. So it means that the current control is valid, the problem is the Kp/Ki values are not suitable.

Owen_Su_0-1661237100924.png

Owen_Su_1-1661237178371.png

    Base the situation above, we can set the Kp/Ki values to 0, so we can see the obvious speed change. It can be seen from the control block diagram that the smaller the 'error' value, the better the control effect, and the closer the actual current to the reference current. The best control effect is achieved by adjusting the KP / Ki value. Hope this can help you.

Regards,

Owen_Su

 

0 Likes
psb
Moderator
Moderator
Moderator
250 sign-ins 25 solutions authored 100 replies posted

Hello @Suraj , 

  What is the control scheme that you're using ? If it is a current control mode (BLDC_SCALAR_CURRENT_CTRL), then the input to the control loop is the reference current, not the speed. If the control is either BLDC_SCALAR_SPEED_CTRL or BLDC_SCALAR_SPEEDCURRENT_CTRL then the speed control is done. In these two control methods, reference speed is the input to the overall control loop. 

For BLDC_SCALAR_CURRENT_CTRL current control scheme, the reference current is set in the ref_current, if the input is analog.  The reference currents are available in the typedef struct BLDC_SCALAR_CURRENT_CONTROL.
In the current control mode, the speed is not in our control. The torque is set by the current and speed is according to the load torque and motor mechanical parameters. 

In the current control scheme, Kp and Ki values are calculated as 
Kp = (2* 3.14 * Ls * (MOTOR0_BLDC_SCALAR_BASE_CURRENT / MOTOR0_BLDC_SCALAR_BASE_VOLTAGE) * Bandwidth * 2^scale)
* Ki = (2* 3.14 * Rs * (MOTOR0_BLDC_SCALAR_BASE_CURRENT / MOTOR0_BLDC_SCALAR_BASE_VOLTAGE) * Bandwidth * MOTOR0_BLDC_SCALAR_CCU8_PERIOD_uS * 2^scale)

psb_20-1661255363743.png

In order to vary the speed of the motor using potentiometer, do speed control (BLDC_SCALAR_SPEED_CTRL) or speed with current control (BLDC_SCALAR_SPEEDCURRENT_CTRL). 

Best Regards,
Sai
0 Likes