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.

control torque

Other Parts Discussed in Thread: MOTORWARE, DRV8301-69M-KIT, LAUNCHXL-F28069M, DRV8312, BOOSTXL-DRV8301, LVSERVOMTR, CONTROLSUITE

Hello, 

I use in my project a piccolo F28069 M and drv 8312kit_revD.

I would like to control a torque with BLDC 'BLY172S-24V-4000' and generate an accuracy torque for my application.

I have run lab_2a succesfully, where the identification gives the  results : (see file.rar)

Afterwards, I have run lab_5a, The spreadsheet which can be found in the folder:

"C:\ti\motorware\motorware_1_01_00_13\docs\labs\motorware_selecting_user_variables.xlsx " helps me to setup user.h parameters (see file.rar).

Following procedures cited in instaspin_labs (lab_5a) I found gains of the controller exactely the same thing as calculated in calcPIgains(see file.rar).

Spining the motor under a load:

-“Flag_enableSys” true

-“Flag_Run_Identify” true

-Increasing the variable “gMotorVars.IqRef_A”: firstely the force angle is enabled, when the oscillations are above 1Hz the force angle is desabled

Continue to increase the Iq reference I noted how the torque provided by the motor changes (which is logic).

my problem is the appearence of high oscillations (the system will be instable) after a threshold of Iq reference.

I joined my user.h (see file .rar ); where did this instability come from?

Thank you0118.file_lab_5a.zip

  • "my problem is the appearence of high oscillations (the system will be instable) after a threshold of Iq reference."

    What threshold of Iq reference?

    What sort of current can your power supply provide?
  • Hello chris,

    Oscillations appear when Iq_ref= 1.1 A and my power supply is:

    AC input: 220 V, 1.5 A , 50 Hz

    DC output: 24.0V   with 2.5A max  of current.

    Best Regard

  • are you providing more load than the torque you can produce with Iq_Ref_A = 1.1A?

    an eBike motor can typically produce MUCH more current/torque than this...

    by oscillations do you mean the motor is stalling - you remove load - and then it comes back?  Please be more descriptive.

    I don't see anything inherently wrong with the user.h

  • oh, you are using the motor with the kit.

    there isn't any reason you should be seeing this in torque mode.

    can you check the compiler revision being used? There is a bug in compiler 6.2.0 - 6.2.2 which could cause strange behavior like this...
  • "are you providing more load than the torque you can produce with Iq_Ref_A = 1.1A?"
    No, just a small load.

    "by oscillations do you mean the motor is stalling - you remove load - and then it comes back?"
    -gMotorVars.Flag_enableSys and gMotorVars.Flag_Run_Identify sont mis à 1
    -I initialize the Iq_ref at 0.1A
    -I increment Iq_ref with a step of 0.1
    -At Iq_ref=0.3 --> gMotorVars.Flag_enableForceAngle=0
    -Increasing Iq_ref, I fix the load in one position to equalize the torque motor(by my hand) and note how the torque changes (more stiff)
    -Around 1.1A ooops the load changes direction and starts to oscillate!

    "can you check the compiler revision being used?"
    Compiler version : v6.2.11
  • possible that your no-load speed is going 2x greater than the 400 Hz you set as the max frequency?
    400 Hz, 8 poles = 6 KRPM.
    If I recall no load speed for this motor is about 6KRPM.
    So that doesn't seem to be the problem.....hmmmm

    go ahead and change this just to make sure
    #define USER_IQ_FULL_SCALE_FREQ_Hz (800.0)

    I'll set-up the HW and see if I can duplicate this on my end. It obviously isn't anything we've seen before and not the expected results.
  • I can't reproduce this at all. I even used your user.h file settings exactly and 6.2.11

    Obviously at 1.1A the torque produced is not very large. It's easy to stall to 0 speed, but when the hand load is removed it recovers perfectly in the proper direction. I see no oscillations.

    setting the Iq_Ref command over 3.0 you start to see better torque produced. I have a hard time stalling it with my fingers.


    Can you try deleting proj_lab05a from CCS, restarting CCS, and re-importing?

    A few of us have had a strange behavior once on a torque lab where it wouldn't start-up. Cleaning the project / restarting CCS repaired...which is bizarre.
  • with no load :

    USER_IQ_FULL_SCALE_FREQ_Hz (400.0):
    5.110 KRPM (theorically == 6 Krpm )

    USER_IQ_FULL_SCALE_FREQ_Hz (800.0):
    5.120 KRPM small variations (theorically == 12 Krpm ) --> (Hz =(RPM * Poles) / 120)

    "Obviously at 1.1A the torque produced is not very large. It's easy to stall to 0 speed"
    Isn't the matter to stall easily or not to 0 speed: in fact I tied an aluminium bar (cylindfric one about 10cm length and 0.3 cm radius ) to the shaft andI'd like to be inert when I oppose the torque motor by my hand (without oscillations and don't change the direction).
  • are you saying you expect to be able to produce a torque to match a load and keep 0 speed?

    that's not possible with InstaSPIN-FOC. The FAST observer requires rotor movement (Bemf from the flux as well as currents) to make estimates. At zero speed it can not make estimates. The InstaSPIN-FOC solution only works to transition you THROUGH zero speed or start-up FROM zero speed (but not always in a smooth movement or with 100% torque).

    to do what you want you will require the use of rotor sensors.
  • Yes Chris I expect to produce a torque to match a load and keep 0 speed.

    "to do what you want you will require the use of rotor sensors."
    In this case, what are the projects I must do to produce it accurately?
  • there is not a project that does this, especially with the motor you are using.

    if you get a motor with encoder - like LVSERVOMTR - you could use instaspin_motion proj_lab12 (velocity) or 13 (position) to do encoder based control. The DRV8312 can't quite handle the current requirement of this motor for full torque though. You would need to use BOOSTXL-DRV8301 + LAUNCHXL-F28069M or DRV8301-69M-KIT
  • Thank you for your clarifications Chris.

    knowing my motor is equiped with Hall sensors, labs for this last may be available in a future release?

  • this isn't planned for the InstaSPIN solutions.
    With InstaSPIN we focus on sensorless torque/velocity or encoder velocity/position.
    If we add anything for hall sensors it will just be to show start-up improvement (switching to sensorless).

    There is a hall BLDC project for the DRV8312 EVM, but it is just doing current/velocity control. You could potentially use it to control 0 speed and add your own software to control relative position.

    C:\ti\controlSUITE\development_kits\DRV8312-C2-KIT_v128\BLDC_Sensored
  • hi,


    I change my motor now, I use Faulhaber BLDC (see file.zip).


    After identification of this motor (Lab 2a), I passed to Lab 5c where the  inertia was identified  successfuly.

    But in the lab 12a, unfortunately my identification is failed. I verified all connections (motor phases and encoders), also I decreased 

    "gMotorVars.SpinTAC.VelIdGoalSpeed_krpm", also I tried USER_R_OVER_L_EST_FREQ_Hz to 100 (and 300) to get rid of the  errors, but without exit.

    I joined my user.h

    Best regardLab_12a.zip

  • did you try switching two of the motor phases?
  • No, but I switched the A & B lines on the encoder then it worked well.

    I passed to the Lab 13a, I found the bandwith of the system. For doing now a force feedback (haptic effect), I noted how the the torque pull the motor back to the reference, unfortunately with oscillations.

    I 'd like to act on the shaft and the torque pull the motor back to the reference once (an haptic), without oscillations!!

    Best regard