This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DRV8301-HC-C2-KIT: Torque Control Only Not Regulating Torque Properly

Part Number: DRV8301-HC-C2-KIT
Other Parts Discussed in Thread: DRV8301, DRV8303EVM

I am creating a dyno using a BLDC and the DRV8301-HC-C2-KIT with IS-FOC. I plan on having the motor under test using IS-BLDC as this is what we have implemented in our motor controller. Right now, I am using the same type of motor with the DRV8303EVM. With IS-FOC and the DRV8301 Kit, I uploaded Lab5a for torque mode only. The motor parameters were identified using the MOTION GUI and then statically defined in user.h. Some of the parameters in user.h like  USER_IQ)FULL_SCALE_FREQ_HZ, voltage, and current was changed to the appropriate values.

When I command the IqRef to 0.2-0.3A it accelerates to it's max speed (voltage bus @ 48V) in an unloaded condition. At current 0.2A, the Torque_Nm value in the expressions window shows ~0.023 which is close to what is calculated with the motor constants below. The current draw from the motor is similar to what is set for IqRef.

When I load the motor with my hand, the current increases slightly to a certain point and as I increase the pressure with my hands down to when the motor does not move, the current decreases down towards zero. Based on this, it seems like the constant torque is not working correctly. I assume that when I load the motor so that it does not move, the current should be at 0.2A. Any ideas on what's causing this behavior? I tried the same thing when using the IS-Motion GUI (not the universal one developed for the labs) and it does the same thing. When I use IS-BLDC GUI in current mode, it works as expected. 

 

Maxon EC60 Flat

Torque Constant = 114mNm/A

Speed Constant = 83.4 rpm/V

Speed/Torque Gradient = 0.798rpm/mNm

  • The sensorless-FOC is difficult to run the motor stably at zero speed and very low speed because the bemf is too low to calculate the precise rotor position. You'd better to use sensored-FOC like instaSPIN-motion if you want to use a BLDC to simulate a dyno at full speed range.
  • ok, I understand your comment but I'm trying to figure out why it's not regulating the torque/current in general. Even when it's running at full speed (3-4krpm) when unloaded, and I put some slight torque on the motor, the current draw from the supply is not constant. It's decreasing as more pressure is put on the motor. It should be constant as more pressure is applied...

    Any suggestions?

    I have used the MOTION-GUI with the given appProgram.out file, it doesn't work. I have uploaded Lab5a and used the universal FOC GUI and it does not work.
  • Another thing that I noticed is that when I just run the motor using IS-FOC in speed+torque mode, it will regulate the speed to a certain point, but once it hits a peak current point, the RPM's and current reading from the supply will decrease. This specific point is much lower than the USER_IQ_FULL_SCALE_CURRENT_A that I specified in user.h (which is set at 3.0A). When I define my motor parameters, I set USER_MOTOR_MAX_CURRENT as 2.78A.

    I assume with these settings, the motor should maintain speed up to 2.78A until then the speed will decrease but current will stay at 2.78A?
  • What's your DC bus voltage? Are you able to supply enough power to support the torque you're commanding?

    Sean
  • DC bus voltage is running at 48V. The max current of the supply is 3A.

    For torque only mode (Lab 5A)
    When I command iqRefA in motorVars to 0.2, the motor ramps up and draws 0.18A. It does not reach the max rpms which is ~4krpms. When debugger is stopped, the electronics draw 0.05A. Based on the Maxon EC60 flat torque constant, 0.2A should correspond to 0.0228Nm. In The motorVars.Torque_Nm, it shows the correct value around 0.18-0.24Nm. MotorVars.Iq_A is correct also at approximately 0.2A. When I start loading the motor down with my hand, the motor rpms and current draw from supply decreases. When I totally stop the motor from spinning, the torque still shows ~0.02Nm with Iq_A as ~0.2A. The strange thing is that the current draw from the supply only shows 0.11A.

    I see this same behavior when I increase IqRef_A to 0.4, 0.6, 1A. The only difference I see is that the motor spins at max speed when unloaded, and when I put slight load on the motor, the current draw increases until it hits a peak (not the peak of the supply or what was in the user.h). When more load is placed on the motor after the "peak", the current draw decreases and the motor rpm's decrease. For IqRef_A as 1A, when I stop the motor shaft when running, torque is at ~0.1Nm, Iq_A is 0.98A, supply current is 0.13A.

    Is Iq_A suppose to be the same as the supply current draw?


    For speed+torque only mode (Lab 5B)
    Since it is cascaded speed+torque, is it possible to have a constant speed (specified by the user) but have the torque unrestricted up to the max limited in user.h or the supply? I believe I understand how the cascaded mode work from my obversations below, can you confirm?

    When testing this mode, I command it to a certain speed (1-1.5krpm). The supply draws around 0.18A, torque_Nm value shows ~0.024Nm unloaded. When I load down the motor, the current peak is around 1.2A. The speed stays fairly constant up until then and then the current and rpms decrease. When I load it down enough to stop it, torque_Nm is 0.24Nm and current draw from supply is 0.3A.

    One thing that I notice from the crtl handle variable is in the pid_Iq and pid_spd variables. When the motor is loaded, the pid_spd.Ui reaches the outMax value. This corresponds to the 1.2A peak I see from the supply. The pid_spd.Ui becomes the refvalue for pid_Iq. If I understand correctly, the RPM must be set to the level at which the desired max torque can be achieved at that specific RPM, but it is all being limited by outMin/Max. How is outMin and outMax calculated? Can it be modified so that they are much higher values to allow the max torque to be higher?

    I did some more experimenting and I changed the USER_MOTOR_MAX_CURRENT value from 2.87A to 5.0A, and the outMin/max values for pid_spd are higher. When the motor is loaded, the supply current peak is much higher than before. It seems like the Max_Current value is not the true value or is somehow decimated that it does not full get to the 2.87A (more like half of it) before the controller saturates the output limit.

    The only thing that I could find with the parameters being set is in the ctrl.c/h files, where it sets the default minMax to IQ(-/+0.95) and IQ(-/+1.0), but do not see where the min/Max values are updated or re-computed...


    Sorry for all the questions

    Thanks
    -David

  • Hi David,

    We ask for patience for the rest of the week. 

    The majority of the team are based in Houston, and most are affected by the hurricane & the subsequent flooding, in some way.

    Your question is also pretty detailed.


    Thank you,
    Brett

  • Please refer to the InstaSPIN-FOC block diagrams (section 1.1.2, page 25) of InstaSPIN user's guide (spruhj1g.pdf) which can help you to understand the torque mode and speed mode. Your experimental result is right for FOC.
    1. For torque mode and unload mode, the motor will run up to maximum running speed which depends on motor parameters, dc bus input voltage and shaft friction if you set the reference torque current to a fixed value, and the reference is enough to run motor to overcome the shaft friction.
    The maximum running speed of motor is limit to dc bus voltage, you can check the variables of gMotorVars.Vs and gMotorVars.OverModulation, the gMotorVars.Vs should be equal to gMotorVars.OverModulation which means the dc bus voltage is not enough.

    2. For torque mode with load is similar the item 1, the reference torque current need to be set to enough value to overcome the load+friction to run the motor. If yes, the motor run, if no, the motor stop. The maximum running speed is limit to dc bus voltage also.

    3. For speed mode with load or without load, the output of speed PI is the reference torque current for motor control, will increase or decrease the reference torque current to keep the motor speed to the setting reference speed. The maximum running speed is limit to both dc bus voltage and maximum current which set in user.h. The maximum current will be set to the outMin and outMax of speed PI controller which limit the reference torque current for the PI controller of Iq. The setting is done in instaSPIN code.

    Btw, the maximum running speed depends on motor specification also, which is always less than the maximum speed of motor.
  • I understand what you are saying and here are some extra questions.

    For torque mode only:
    Is Iq_A suppose to be the same as the supply current draw? If so, then I am not seeing that behavior (as I described above).

    For speed + torque mode:
    Since the output of speed PI is the reference torque current for the motor control, if I command it to 1krpm versus the max 4krpm, I assume that the 1k will have a much smaller torque reference compared to 4krpm. If so, then technically there is no way to get the maximum torque/current that the motor can produce at 1krpm. It will only give me the amount of torque that is calculated relative to 1krpm?

    If that is correct, how would you maximize the torque/current output to reach the max_current set in user.h for any rpm?