TMS320F2800157: MOTOR IS NOT RUNNING SMOOTHLY AND OSCILLATING IN OPPSITE DIRECTION IN CUSTOM BOARD

Part Number: TMS320F2800157
Other Parts Discussed in Thread: DRV8353

Hello team,

As we work on developing the custom board, we tested it with the DRV8353 and the f2800157 launchpad to ensure that the motor operates properly before moving on to the custom board.

1) encountering problems when using a motor. The motor makes one complete spin in the opposite direction before running at the specified speed on the first try when we set a positive speed_ref value. What criteria must be followed in order to lessen this rotation in the other direction?

2) Another problem I'm having is that the motor won't start when I set the speed_ref value to zero, even though it's drawing greater current from the supply—more than 19 amps—and I have the same problem when I set the negative speed_ref value.

3)We are seeing the same problem as before, where the motor starts and rotates fully in the other way. I have activated POT in the UMC, and I can now control the motor speed using POT.

What parameters should we calibrate for this, in your opinion?

3)is there any way to control motor torque and which are the calibration parameter is required to change motor torque.

4)if motor parameters are updated and make motor_identifications = true, no need to identify again but still expression windows not showing the updated value from user_mtr.h .

 every time need to enter the motor parameter values in expression window. Which is not updated directly from user_mtr.h

Thanks in Advance

Regards

Kirana H P

  • Kirana,

    1. Refer to my answer in the other thread.
    2. A speed_ref value of 0 means the motor should not be moving. This behavior is correct. The fact that this is showing up for negative speed as well is more concerning. Check to see if the issue is still present after resolving issue (1).
    3. See (1)
    4. Ensure "#define USER_MOTOR1 NAME_OF_YOUR_MOTOR" is set to the correct motor.
      1. Ensure the adjustments to user_mtr1.h are being beneath the appropriate motor elif
        1. "#elif (USER_MOTOR1 == NAME_OF_YOUR_MOTOR)"

    Regards,
    Jason Osborn

    • Note: The CCS "folding" functionality is very useful to see what's active in user_mtr1.h. In the window->preferences menu, show advanced settings. Use the filter box to search for "fold" and enable the folding functionality. Check the first 3 boxes and the final box.
  • Hello Jason,

    1. I have referred the E2E query you have mentioned, and I have set flagEnableAlignment = false, now the motor is not running in the opposite direction, and   it is running in the mentioned direction. 

    2. I have checked the user_mtr1.h and I have set the proper motor parameters.

    3. When I set the speed_ref = 0 motor is not stopping and suddenly it is running with the negative high frequency like speed_ref = -250f.

    4. When I set the negative speed_ref value motor is not running, and it is taking motor current (more than 19A) in without load condition.

    5. Now I am running the motor by using the POT and it is running fine, but I am facing issue like motor is not responding suddenly to the POT (throttle).

     When I give the throttle motor is responding after 3 seconds and I need to hold the throttle for few seconds. Can you please suggest me that any calibration need to do for this issue and motor should respond to the throttle immediately without any delay.

    Regards,

    Kirana H P

  • Kirana,

    Quick note while I look into the rest of the issue- are you adjusting the value of speedRef_Hz or speed_ref_Hz ? Make sure you're adjusting speedRef_Hz !

    Regards,
    Jason Osborn

  • Hello Jason,

    1. I am adjusting the value of speedRef_Hz by using throttle (POT).

    2. Currently, the motor stops when I set the speed_ref = 0, however it tries to start again after five seconds and experiences an under-voltage problem. for this I have adjusted the Kp and Ki values.

    3. The motor is not operating and is using more than 19 amps of motor current without a load when I set the negative speed_ref value.

    4. We are changing the torque_Nm value in motor_common.c using the MOTOR1_FAST function here, but not for other methods like HALL and ENCODER. I need to read the motor torque (torque_Nm) value in the debugger window. I have gone through the Universal motor code (UMC).

    Could you kindly advise me on the things we need to take care of in order to read this motor torque value for the MOTOR1_HALL method in BUILD_LEVEL_4?

    5. Still, we are facing the throttle delay issue, it is not responding suddenly. Can you please suggest me that any calibration need to do for this issue and motor should respond to the throttle immediately without any delay.

    Regards,

    Kirana H P

  • Hello Jason,

    I have checked the motor torque (torque_Nm) updation in MOTOR1_FAST method but torque_Nm value is oscillating and not giving the proper value. Below I have shared the video of the debugger window for the torque oscillation. what are the things we need to take care for proper torque updation in UMC.

    I need to check motor torque (torque_Nm) in MOTOR1_HALL but in UMC we are reading motor_torque value for only MOTOR1_FAST method. can you please suggest some method to read the motor torque (torque_Nm) in MOTOR1_HALL method.

    Regards,

    Kirana H P


  • Kirana,

    Going through each of your posts:

    • Setting speedRef_Hz to 0.0f is not something I recommend. This does not properly bring the motor to a halted state in the Universal Motor Control Lab. I would recommend taking a look at the flagEnableRunAndIdentify flag for bringing the motor to a halted/idle state.
    • I'm not certain why a negative speed would be nonfunctional. I've not seen this before. Please post a video of this behavior.
    • In the UMCL, the only observer which allows you to view torque is FAST. If you want one of the other observers to include this functionality, you would need to write any necessary math & code to do so.
      • For FAST, I've noticed the torque has seemed to be inconsistent before, but when I've viewed the torque value on the DAC, it's actually not as inconsistent as it appears. Averaging the torque value over a few cycles should be sufficient.
    • If your system is not exiting the startup state quickly enough, there's still a delay being utilized somewhere.

    Regards,
    Jason Osborn

  • Hello Jason,

    1. As per your previous comment, I am now utilizing the flagEnableRunAndIdentify to send the motor to a halted/idle state instead of setting speedRef_Hz to 0.0f.

    2. As previously indicated, negative speed would not function since I changed the motor macro name in user_mtr1.h and did the same in user_common.h and motor1_drive.c for the hallAngleBuf. At now, the motor is operating at a negative speed_ref value, and I have modified it to the default macro name as outlined below.

        

         But now I am facing the issue like sometimes motor consuming the maximum (more than 17A) current and giving the under-voltage fault.

         Can you suggest the method to eliminate this issue.

    3. Can we able to change the motor macros name in user_mtr1.h?

        If we are able to change means, what all are the things we need to take care in universal motor code (UMC).

    4. I need to read the precise hall angle from our 48-volt mid-drive hall motor and update the file below as indicated.
        Would you kindly advise on how to read the hall Angle from the universal motor code?

           

     

     Regards,

     Kirana H P

  • Kirana,

    • Under-voltage fault is, in my experience, typically related to power supply issues or improperly connected hardware. Double check all external connections, as well as power supply stability.
    • When you change #define USER_MOTOR1 in user_mtr1.h, you're changing the motor specifications (such as Ls and Rs) to use the specifications of a different motor, as the name would imply. You need to make sure that you're using the correct motor specifications for your motor.
    • Refer to the following comments from motor1_drive.c:

    Regards,
    Jason Osborn

  • Hello Jason,

    I am grateful for your reply.

    After following your recommendations in the last message, the motor is now operating without any problems. However, I am still having trouble with the motor phase currents in my 48v HALL motor.

    In order to confirm that problem, I have now connected the 24-volt HALL motor. I have also given the 24-volt HALL motor specifications and detailed the problems I am having with the 24-volt motor below.

    1. The motor phase current is appropriate, but when I operate the 24V motor with HALL feedback, it consumes more current from the DC source and fluctuates continuously. I've given the DC source current for different speed_ref values below.

    As I mentioned before, when I set the speed_ref to 180f, the starting motor consumes 5.2A, and later on, the DC input current decreases gradually to 0.14A. On the other hand, when I set the speed_ref to -180f, the starting motor consumes 1.2A, and later on, the DC input current gradually increases to more than 3.5A.

    2. The ki and kp values for the 24V motor mentioned below have been maintained. DC input current oscillation decreases when I decrease the Kp_Id, Kp_Iq, and Kp_spd values but it is consuming more current in all three phases and DC input current consumption also more. 

    when I increase the above Kp_Id,Kp_Iq and Kp_spd values phase current and DC input current consumption is less but when I run the motor starting it is consuming more current during positive speed_ref value then it will come to minimum value and for negative speed_ref value starting it is consuming less current from DC source and then it will consume more current (more than 4A).

    Is modifying Kp_Id, Kp_Iq, and Kp_spd appropriate for the above-mentioned issue, or is there a different path we should consider?

    3. I have taken the Rs_ohm, Ls_dh and Ls_dq values from instapin_foc by connecting the motor with DRV8353rs and now I am doing the above things in our custom board.

    Please let me know how to solve this problem with the 24-volt motor. We also have same problem with the 48-volt HALL motor.

     Regards,

     Kirana H P

  • Kirana,

    With current values that much higher than the given spec, the first thing I would do is adjust the overcurrent limit of the motor to match the spec. Damaging the motor is not ideal.

    1. A higher current value initially which then settles lower is typical behavior, though these are rather high values. See (2).
    2. Default Kp/Ki values are calculated based on the provided motor parameters. If adjusting these values lets you see notably improved performance, I would suspect something in the motor parameters is wrong. Rated flux is a common culprit in my experience, as it is heavily reliant on accurate values for motor inertia, which I've seen often not provided in motor datasheets.
      1. See what happens when you tune the rated flux value. A recent motor I was tuning had identification give a flux value that was too low (likely because I do not have the motor's inertia), and the calculated value from the motor's spec ended up being too high- I split the difference, and the motor's performance was much improved.
    3. To clarify, you're saying that the Rs, Ls_d, Ls_q, and rated flux values were obtained from the Motor Identification routine in InstaSPIN-FOC FAST, as described in the user's guide for build 4?

    Regards,
    Jason Osborn

  • Hello Jason,

    1. I have taken the Rs, Ls_d, Ls_q, and rated flux values from the Motor Identification routine in InstaSPIN-FOC FAST, as described in the user's guide for build 4.

    2. As you suggested I have tuned the USER_MOTOR1_RATED_FLUX_VpHz (motor rated flux) value but there is no difference in the motor phase current and DC input current.

    3.Once more, I've calibrated the values for Kp_Id, Kp_Iq, Kp_spd, and Ki_Id, Ki_Iq, and Ki_spd. As a result, the motor phase current and DC input current have improved, and there is no oscillation when operating at the negative speed_ref value. I can also run at my maximum speed (speed_ref = -300f).

    4. However, the motor does not operate over the 160f speed_ref value when the speed_ref value is positive due to higher phase current and DC input current consumption. I've included the level 2 and level 4 motor DC input current and phase current below (with HALL feedback).

                                                                                      

    5. I have taken the USER_MOTOR1_RES_EST_CURRENT_A = 1.5 and USER_MOTOR1_IND_EST_CURRENT_A = -1.0A these values from InstaSPIN-FOC like Rs, Ls_d, Ls_q, and rated flux. wethere we need to calibrate above mentioned current values for our issue.

    6. Once you verify the values, I will provide the final calibrated Kp_Id, Kp_Iq, Kp_spd, and Ki_Id, Ki_Iq, Ki_spd, and rated flux values below.

          

    The motor data sheet does not include the motor back EMF, motor inertia, or additional parameters that are mentioned in instaSPIN_FOC in order for calculating the motor Kp_Id, Kp_Iq, Kp_spd, and Ki_Id, Ki_Iq, Ki_spd and rated flux values.

    Can you please suggest how to resolve this issue because I am not able to see any difference in motor phase current after tuning motor rated flux (USER_MOTOR1_RATED_FLUX_VpHz).

    Regards,

    Kirana H P

  • Kirana,

    I've reached out to a colleague to see if they might have any insights on this issue. We'll get back to you soon.

    Regards,
    Jason Osborn

  • Hello Jason,

    Thank you for your proactive approach. Looking forward to hearing back soon.

    Regards,

    Kirana H P