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.

InstaSPIN: Torque control

Other Parts Discussed in Thread: DRV8301

Dear all,

I have problems to run correctly the lab4 (torque control) when a load is fixed to the axle of the motor.

I have run lab2a, lab3a, lab3b and lab4 using a PMSM motor with no load. The labs has been executed without problems. (Lab4 has been modify in order to limit the speed and to receive iq references via CAN).

Then I have fixed (using a flexible copling) a load to this motor. The load is basically an asynchronous motor with a speed control and a reference speed fixed to 0 rpm. The torque used by this control is modified by CAN and it is used as a resistive torque for the PMSM controlled with instaspin.

If the resistive torque (TL) applied to the PMSM is fixed to 0Nm then the lab4 works OK. Once the cogging torque and static torque is overtaken the motor accelerates (depending on the iq reference). Once the motor is spinning the load (resistive torque) can be increased without any problem.

Now, if we try to start the motor with a load fixed to the axle (for instance 1Nm of resistive torque) the motor do not start spinning or a huge current is needed to start it. The controls moves the motor roughly (start, stop, start, stop and so on) during some seconds and then (sometimes) the motors start to spin softly.

It seems like the controls has problem to identify the motor position. In fact, I have repeated lab3b and I have seen that the motor is moving roughly with speeds below 300rpm (5% Rated Speed). When no load is present the motor has a huge acceleration and this speed (300rpm) is achived easily with small Iq references. When a load is fixed to the motor the motor the acceleration rate is limited and it probably has problem to identify the position. Could it be posible?

My application implies a heavy loads and the motor itself has a quite big cogging torque (10s to achive rated speed). Having this in count is it possible to have a soft start with sensorless methods or is it an unrealistic target?

Thank you in advance

  • please read ch. 14 of SPRUHJ1

    Borja Gomez said:
    It seems like the controls has problem to identify the motor position.

    The control system does not know the rotor position at time 0.

    Borja Gomez said:
    When a load is fixed to the motor the motor the acceleration rate is limited and it probably has problem to identify the position. Could it be posible?

    probable

    Borja Gomez said:
    My application implies a heavy loads and the motor itself has a quite big cogging torque (10s to achive rated speed). Having this in count is it possible to have a soft start with sensorless methods or is it an unrealistic target?

    It will be challenging if it takes multiple seconds to get from 0 speed to a frequency where FAST is estimating good feedback.  Please try the tips in chapter 14 first though.

  • Dear Chris,

    I have followed the tips given in chapter 4 and the performance under load has been improved: it runs with smalls loads but not with heavy loads.

    Just to verify that our HW works ok I have run the lab 12a and 12b (encoder instead of sensorless) and it works ok for full load. 

    Our hardware is quite similar to HVMTR kit, but the inverter has been substituted. The new inverter needs a switching frequencies of 5KHz and a minimum deadtime of 3.5us. Is this low switching frequency a problem for position estimation for fully load operation? I have seen some sensorless applications that use a different frequencies for pmw updates and estimations (higher frequency) in order to improve the estimator performance. It is possible to improve the performance under full load with this method?

    Thank you in advance,

    Borja

  • If you have a low frequency on the PWM (5 kHz) make sure all your decimation rates are 1 for CTRL, EST and CURRENT, and 5 for TRAJ and SPEED. This will allow you to have a fast controller and estimator at a 5 kHz rate, and a trajectory and speed at 1 kHz. Also, make sure you tune you PI of the speed controller.

    Are you confident on your motor parameters?

    Is it possible for you to try TI's HVKIT first, at 15 kHz, and then try our kit at 5 kHz, then yours at 5 kHz? Just to make sure the hardware is ok on the current sensing, etc. Not sure what current sensing topology you implemented on your board, and if your user.h matched your hardware?

    -Jorge

  • Dear Jorge,

    For my application torque control is more recommendable than speed control so i'm not using the speed control (just for some tests). 

    The original sensing topology is almost the same as HVKIT. The only difference is the current sensing resistor value (A maximum of 50A have to be measured). We have seen that it would be desirable to adjust the resistors used for voltage measurement. If we reduced the DC bus from 300V to 60V (bigger currents) (since 300V is the rated voltage this is posible only for tests) and then adjust the resistors for this new voltage the performance of the control is improved. the problem is that this modification can not be done for my application. 

    I have not HVKIT, but i will try with DRV8301 just to verify the influence of switching frequency on the performance,

    Thank you in advance

    - Borja.

     

  • Could you share your use.h file so I can see how the decimation rates are configured? Also, if possible, please share your schematics.

    For testing purposes, can you enable the speed controller and operate it in speed mode at full load? I understand speed mode is only for tests, but we need more information of how or where it fails to be able to suggest something.

    Thanks!

    -Jorge

  • Dear Zambada,

    Please, find attached the schematics and user.h

    In the following lines I have summarized the test we have done:

    We have made the following test with speed control (lab3b) and (Lab5c)

    1. Original resistor values (HVKIT) and DCbus 300V Rsense: 0.005

    #define USER_IQ_FULL_SCALE_VOLTAGE_V (450.0) 

    #define USER_ADC_FULL_SCALE_VOLTAGE_V (409.6) 

    #define USER_IQ_FULL_SCALE_CURRENT_A (41.0)

    #define USER_ADC_FULL_SCALE_CURRENT_A (79.55)

    The system works ok with no load, or when the load is fixed to the system once the motor is spinning. The control is not able to start the movement when a load is present. Lab 3b works ok with no load and speeds bigger than 200rpms. Below this speed the motor movement is not soft.

    -------------------------------------------------------------------------------------------------------------------------------------------------

    2. Rvl and Rvu has been modified to measure a maximum of 112.21V. DC bus has been reduced to 60V just to have a bigger currents

    The speed control works ok if resistive torque is smaller than 5Nm. The minimun speed that the control can manage is 100rpm (instead of 200rpm)

    -------------------------------------------------------------------------------------------------------------------------------------------------

    3. Rvl and Rvu has been modified to measure a maximum of 39.60V. DC bus has been reduced to 30V just to have bigger currents

    The speed control works ok if resistive torque is smaller than 10Nm. The minimum speed that the control can manage is 30rpm (instead of 200rpm)

    -------------------------------------------------------------------------------------------------------------------------------------------------

    4 An encoder has been used in order to verify current and voltage sensing circuits. We have used the original resistor values (so a maximum of 409.9v can be measured). Lab12b

    The speed controls works OK with full load (a maximum value of 40Nm of constant resistive torque has been tested). The minimum speed that the control can manage is 30rpm (instead of 200rpm). Below this speed the movement is not soft. 

    -------------------------------------------------------------------------------------------------------------------------------------------------

    Thank you in advance,

    Borja

    InstaSpin_TorqueControl.rar
  • In 12b have you run the inertia ID and tuned your speed controller?

    In 3b I know you haven't tuned your speed controller (since you don't have access until 5b).  I would run this test with proj_lab05a with just torque mode.  But you should be aware that if your Iq_Ref_A is large enough the motor could run to full speed (1.0 modulation), so have your set-up be able to accommodate that situation.

    When you run 5a, for testing purposes make sure you enableRsRecalc with appropriate RES_CURRENT in your user.h (I would use 20%+ of rated).  As noted in the User's Guide it can also help to directly inject Id_Ref_A so you can achieve a higher current value without changing the RES_CURRENT and enabling RsRecalc. To do this you would have to take some of the code from proj_lab09 that updates the IdRef.

  • Dear Chris,

    I have run the lab5a

    USER_IQ_FULL_SCALE_VOLTAGE_V = (450.0);

    USER_IQ_FULL_SCALE_CURRENT_A = (41);

    USER_PWM_FREQ_KHZ = 10;
    USER_NUM_PWM_TICKS_PER_ISR_TICK = 1;
    USER_NUM_ISR_TICKS_PER_CTRL_TICK = 1;
    USER_NUM_CTRL_TICKS_PER_CURRENT_TICK = 1;

    USER_MOTOR_Rs = 0.1729048; 
    USER_MOTOR_Ls_d = 0.001579751;
    USER_MOTOR_Ls_q = 0.001579751;

    Ti = 0.1ms

    Bandwidth = 3.1416e+003

    Kiseries = 0.0109

    Kpseries: 0.4522

     

    Test 1:

    Iq_ref = 2.3A (0.7Nm) Speed =1000rpm. Tl = 0Nm (just the planetary gear, the axle and the couplings to 'resistive motor')

    The control becomes unstable with Kp > 1.8087. (Kp = Lsq*Bandwidth/5)

    The following figure shows the phase A current waveform with an stable kp (Kp = 1.75)

    Test 2:

    A little load has been attached to the system and we have repeated the experiment. The control has become unstble with a Kp value of 0.9 (Bandwidth/10)

    Test 3:

    The load has been increased from 1Nm to 5Nm. The motor is not able to move the motor (no matter the current reference or Kp value). If high currents references are sent to the motor it starts to vibrate. The following figure shows the current across phase A.

    Thank you in advance,

    Borja

  • Borja,

    The current control PI gains are calculated based on Rs / Ls and the timing frequencies.  These values work very well for most motors, and certainly stable. At most you may choose to increase the Kp value by up to 4x, especially for low speed improvement.

    What are these default values that appear?

    How different are they from the values you have used in above post?

    In Test 3: what Iq_Ref are you using?  It must be > 17A, correct?  Are you trying to START the motor from 0 speed with this load?  Or are you running at a nominal speed and then applying this load?

  • Dear Chris

    What are these default values that appear?

    By defaults we have the following values:

    Ki = 0.010945 (OK)

    Kp = 0.359832 (if you applied the formula given in the labs reference manual it had to be 0.45217, but the difference is small)

    How different are they from the values you have used in above post?

    In Test 3: what Iq_Ref are you using?  It must be > 17A, correct?  

    Iq_ref =3A (1Nm). 

    The motor has a gear with 1:8 reduction so 1Nm in the motor means 8Nm at the gear output

    I have also tested with an Iq_ref = 10Nm (3.3Nm in the motor and 26Nm at the gear output), This value should be enough to spin the motor but it only vibrates. The measured current amplitude seems to be ok (they follow the iq_ref)

    Are you trying to START the motor from 0 speed with this load? Or are you running at a nominal speed and then applying this load?

    Once the motor is in movement (e.g 10%Rated Speed) there is no problem to apply the load (the performace is similar to test 1). It works ok for both o torque and speed control. The problem is to speed up the motor when it is stopped.

    Thank you in advance

    Borja

  • Borja Gomez said:

    Kp = 0.359832 (if you applied the formula given in the labs reference manual it had to be 0.45217, but the difference is small)

    How different are they from the values you have used in above post?

    Ok, I would not use a Kp > 4 * 0.36 > 1.4

    Borja Gomez said:
    ). It works ok for both o torque and speed control. The problem is to speed up the motor when it is stopped.

    Yes, this is the most challenging. Are you enabling ForceAngle or not?  I find that it helps to have it enabled, then immediately disable after you set a new speed command

    If running with speed control mode, the output of the speed controller will be limited to the user.h value USER_MAX_MOTOR_CURRENT and you need to remember that this is actually the Iq_Ref_A value, not the I-bus value.  So this value is going to need to be larger than what you expect for your "average" or "rated" current.  It needs to be large enough to create a large enough current for initial start-up, which will be lower than the current required to keep the load moving at speed.

    Try increasing the Iq_Ref_A you are using.  You have plenty of headroom on your hardware to command much more than the 1-3A you are currently using.

  • Dear Chris,

    The problem is nearly solved.

    Running Lab 5a I have realized that Rs is not being correctly recalculated. I have also noticed that Vdc bus value is changing a lot during this process. 

    I have increased the DC link capacitor (from 40uF to 500uF) to make sure that DC bus was estable, but DC voltage values read by ADC has a considerable variation (20%). Our hardware was designed with an EMI filter with a fc 125MHz and it has been replaced by an RC filter with a fc of 100KHz (switching frequency: 10KHz). 

    Now HW seems to work better:

    Lab3b -> The motor starts to move even if a big load is fixed to the system (20Nm).

    With no load, the motor did not smoothly for speed below 300rpm. Now (with the filter) the motor move smoothly at 50rpm (< 1% rated speed).

    Thank you for your help

    Borja.

  • Borja,

    one final thing which I have posted about but we have not updated to my liking in user.h

    #define USER_ZEROSPEEDLIMIT   (1.0 / USER_IQ_FULL_SCALE_FREQ_Hz)

    this value of 1.0 is default. This is the minimum Hz, so at 1.0 Hz+ you will use estimates from FAST.  You need to figure out if this is a good value for your motor. With large Bemf motor 1.0 Hz may be fine, or you may even be able to go lower. For small Bemf motors this may need to be increased.

    Whichever value you settle on, the next portion is critical if you will use ForceAngle.

    #define USER_FORCE_ANGLE_FREQ_Hz   (2.0* USER_ZEROSPEEDLIMIT * USER_IQ_FULL_SCALE_FREQ_Hz)

    You MUST set the force angle frequency - the frequency of the "fake" rotating angle you will generate when ForceAngle is active - to a value at least 2.0 * the value used for your zero speed limit. Using this formula will make sure it is always two.

    With this setting, and assuming you have enough peak current being commanded to your Iq_Ref_A (either by yourself in a torque control project or as the output from the speed controller) you should be able to start-up under near full load everytime.