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.

Torque Limitation



Hi Guys,

thank you very much for your last answers.

Do you have an idea where to implement a fast an reliable limitation of the motor torque - and by the way how does the software know the current-to-torque factor of the motor.

I guess it samples it out when doing the initial tests.

In my eyes it is a miracle because  we only give the rated current to system (as user input) and not the rated torque nor the motors inertia. Is it really possible to calculate the torque factor out of the maximum current step response without knowing the mass of the rotor?

May be someone could explain that ;-)

But the main problem remains still the implementation of a fast and reliable torque limit (the motor current should shut down when the limit is reached).

I tried to trigger on the

EST_getTorque_Nm(obj->estHandle);

variable. This works very well until 4.8Nm. The motor limits on every value below this point.

If we raise the load and increase the limit to 5.5 the motor does increase its torque to its maximum (of about 8Nm) and does never stop because the value limits at 4.8Nm.

This value is built in the Estimator which is closed.

Are there any known reasons for such a limitation (e.g. variable overflow etc.)

 

Thank you very much for your comments.

Ralf, Alex

 

  • You are using the correct variable, but I don't understand your problem statement.

    You _get a value over 4.8Nm, and in your logic what do you do to limit the torque?  Do you set a lower speed? To you set a new USER_MOTOR_MAX_CURRENT to limite the output of the speed controller?  Do you directly set an Iq_ref? Do you set a new maximum value in the PI controller?

    The getTorque function should provide a reliabe torque estimate that you can poll in your main interrupt (if that critical) or in you background (if not as cycle by cycle critical).

    Have you first plotted out the getTorque function to make sure it agrees with your load / dyno controller?

     

  • Dear Chris,

    thank you for your comments.

    I try to explain Alex's and my problem (we are colleagues and work together on the same project).

    1.) you confirmed we use the right variable to check and control the motor torque - OK

    2.) Explanation of the situation:

    We have 230V 3 motor. We drive this motor with the HV KIT from ti. We have test stand with computer controllable brake, a fast sampling torque meter with built-in speed sensor etc. With this test stand we have the ability to simulate different torque/speed profiles.

    Our motor is capable to handle 6Nm with the maximum current of the HV Kit (about 10A). The relation between the current and the maximum torque is linear (=> 5A ~ 3.0Nm, 7.5A ~ 4.5Nm etc.).

    We checked the motor torque curve with our test stand.

    Now we tried to implement the customers demand: 

    We used the variable: EST_getTorque_Nm(obj->estHandle) to check it constantly and to trip the motor (e.g. switch off the PWM) when it reaches our target value (e.g. 3.5Nm, 3.7Nm and so on).

    We found out that this mechanism was working correct on every value below 4.8Nm. If we go above 4.8Nm the motor does never stop even on much higher torque loads.

    The reason is: 

    The value of EST_getTorque_Nm(obj->estHandle) never goes over 4.8Nm although the motor can deliver 6Nm without any problems.

    We do not know why the value of the torque variable is "limited" to 4.8Nm - and exactly this was our question.

    Do you have any idea what happens in this case and what reason makes the variable "clip"

    II.) In the long run this is also not the correct way to solve the customers problem.

    We need to stop at a certain torque value immediately and hold the stop position (or very close nearby) for a specific time.

    Immediately means as fast as possible because every additional rotation angle adds additional (and unwanted) torque to the screw (project target is to make a torque controlled driver).

    I think the way could be to increase the acceleration rate to its absolute maximum just before triggering the stop and the stop within 90 or 180° rotation angle.

    What do you think about the problem.

    Is there a way to stop the vector engine without ramp immediately?

    Thank you for your answers.

    Ralf

  • Ralf,

    Do you mind doing an experiment for me?

    Please change in your user.h the following line

    #define USER_IQ_FULL_SCALE_FREQ_Hz        (4 * USER_VOLTAGE_FILTER_POLE_Hz)

    While you are doing this can you also get the following variable

    EST_getFlux_VpHz(obj->estHandle);

    Can you then provide the Torque and Flux variable value as you increase the load across your full range?

    Ideally seeing 3 columns of Measure Torque, Est Torque, Est Flux in an Excel or CSV file.

    Thank You.

  • Also, please also capture the Iq_A current as a fourth column.

    Then in your 5th column add Calc_Torque which you will calculate as

    Calc_Torque=EST_FLUX* Iq_A*polepairs*3/ (4*pi)

     

  • Dear Chris,

    no problem.

    Alex and me we will try it with all the wanted data tomorrow and be back to you with our latest stuff then.

    THX

    Ralf

  • Hi Chris, 

    I have Problems to measure the Values you need.

    This is what i have done.

    In Function updateGlobalVariable i put this code:

     // get the torque estimate

     //gMotorVars.Torque_lbin = EST_getTorque_lbin(obj->estHandle);

      gMotorVars.Torque_lbin = EST_getTorque_Nm(obj->estHandle);

     // get the flux

      gMotorVars.Flux_VpHz = EST_getFlux_VpHz(obj->estHandle);

      Calc_Torque = gMotorVars.Flux_VpHz * gMotorVars.Iq_A * USER_MOTOR_NUM_POLE_PAIRS  * 3 /( 4* 3.1415);

    In user.h have done this

    #define USER_IQ_FULL_SCALE_VOLTAGE_V      (4 *USER_VOLTAGE_FILTER_POLE_Hz) 

    I defined Calc_Torque as 

    float Calc_Torque;

    Then I watched the Variables in the Expression Window like this

    gMotorVars.Torque_lbin long 0.0 (Q-Value(24)) 0x00CADC@Program

    gMotorVars.Flux_VpHz float 0.0 0x00CAEE@Program

    gMotorVars.Iq_A long 0.0 (Q-Value(24)) 0x00CB02@Program

    Calc_Torque float 0.0 0x00CA90@Program

    gMotorVars.Iq_A and Calc_Torque are always 0.

    The Variable gMotorVars.Torque_lbin are not stable on higher Torque measurements.

    Here are the Table:

    Torque  -    gMotorVars.Torque_lbin  -   gMotorVars.Flux_VpHz    -    gMotorVars.Iq_A      -    Calc_Torque

    0                        0,06                                          0,6                                              0                                   0

    0,252               0,23 - 0,27                               0,6                                              0                                   0

    1,67                   1,3                                          0,6                                               0                                   0

    6,1                    5,0 - 6,0                                  0,8 - 0,85                                   0                                    0

    Can you help me.

    Alex

  • you need to get the Iq_A value

    gMotorVars.Iq_A = _IQmpy(CTRL_getIq_in_pu(ctrlHandle), _IQ(USER_IQ_FULL_SCALE_CURRENT_A));

    Please also capture / put in the table the Torque_Nm value

    I suspect that the get_Torque value is clipping/saturating.  If it is we should the Calc_Torque continue to track correctly.

     

     

  • Hi Chris, 

    Here are my Measurements.

    Brake mA Measured Torque Nm

    EST_getTorque_Nm

    gMotorVars.Flux_VpHz

    gMotorVars.Iq_A

    Calc_Torque

    50 0,100 0,115 0,607 0,20 0,115
    100 0,255 0,23 - 0,29 0,607 0,37 - 0,50 0,25 - 0,29
    200 1,7 1,35 - 1,38 0,607 2,1 - 2,3 1,23 - 1,38
    300 4,1 3,0 - 3,45 0,64 5,2 - 5,4 3,2 - 3,4
    400 5,8 5,2 - 6,2 0,86 6,7 - 7,2 4,5 - 6,0

    I can see that the EST_getTorque_Nm Function are not clipping but the Torque measurement are not stable.

    You see at the last line I put an constant Torque about 5,8 Nm. The Function measured about 5,2 - 6,2.

    Why are the values not so stable.?.

    I attached you some videos.

    MFG Alex

  • alex,

    In torque2.mov note that your flux suddenly drops in half.  That should not happen.

    please option-attach file  your user.h you used for this testing

     

  • Hi Chris,

    In the end of torque2.mov the load where disconnected. Can this explain why the flux drops?.

    I have done some more measurements and i knowing more.

    With your user.h

    #define USER_IQ_FULL_SCALE_VOLTAGE_V      (4 *USER_VOLTAGE_FILTER_POLE_Hz)

    there where no torque clipping -> see movie torque_not_clipping.

    with my user.h

    #define USER_IQ_FULL_SCALE_VOLTAGE_V      (450.0)

    there where an torque clipping at 5.500394285 -> see movie torque_clipping.

    thats all what in user.h is different.

    In the movie you can see on the left side the load.

    I give an constant load about 6,5 Nm and measured with an extern torque sensor -> you can see at the table Drehm

    My question is why are your measurements of torque are so unstable.

    otherwise can you explain why i must set the USER_IQ_FULL_SCALE_VOLTAGE_V to that value.

    Alex

    user.h
  • Alex,

    In your two scenarios can you also compare the flux values?

    So, to confirm, with the 4 * Filter is everything as expected?

    I'll explain more later. 

  • Chris,

    How should i compare the flux values. You see the Flux Values in the 2 Movies.

    The flux values seems to be not different between the 2 movies.

    With this line in user.h

    #define USER_IQ_FULL_SCALE_VOLTAGE_V      (4 *USER_VOLTAGE_FILTER_POLE_Hz)

    there where no clipping. thats ok. but the torque value changes from 5.0 Nm upto 6.5 Nm

    with fully constant load about 6.5Nm.

    I think i must filter the torque values with an average filter.

    Alex

     

  • You may need to. The Torque value is INSTANTANEOUS, from the last set of currents and voltages. You may want to average that in your background loop if you want something easier to track on.

     

  • Alex,

    Instead of relying on the watch window (where the data is not synchronized), can you instead write the getTorque, getFlux, and getIq values to a sector of RAM for a few seconds and then pull into a .txt file?  This would allow you to have a synchronized data set.

    Then you can calc_torque in the spreadsheet. calc_torque shoudl track the getTorque quite well.

     

     

  • Alex,

    Someone pointed out a typo to me

    #define USER_IQ_FULL_SCALE_VOLTAGE_V      (4 *USER_VOLTAGE_FILTER_POLE_Hz)

    should of course be

    #define USER_IQ_FULL_SCALE_FREQ_Hz  (4 *USER_VOLTAGE_FILTER_POLE_Hz)

    #define USER_IQ_FULL_SCALE_VOLTAGE_V 

    is chosen by other methods. In general, setting it just greater than your Vbus is most appropriate.

     

    Please post your USER_IQ_FULL_SCALE  FREQ_Hz and VOLTAGE_V just to double check.

     

     

  • hi Chris,

    Can you tell me how can I write the data out into a text file?.

    I write the data into an Buffer Array for few seconds. thats ok.

    Now I want to write the Data out to an Konsole (like printf).

    Or gives there an other solution? I use the XDS100V2 Debugger.

    How can I do that?. I am a newbi in CCS5, sorry.

    Alex

  • alex,

    I've never done this myself either, so I've started a post on the CCS forum to get an example

    http://e2e.ti.com/support/development_tools/code_composer_studio/f/81/t/319660.aspx

     

  • alex,

    from the post, it looks like this is straightforward in CCS:

    with my clarification added

     Get the data you want all buffered up in RAM, and then open the View --> Memory Browser while in the debug perspective.  In the memory window near the top there is an icon that looks like a green IC with a white arrow in it.  This opens the "Save Memory" dialog and will allow you to export any part of the memory map you'd like.  I'm thinking you'll probably want the plain text TI Data Format (*.dat).