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.

LAUNCHXL-F28027F: DTV8305EVM

Part Number: LAUNCHXL-F28027F

Hi

I am using Piccolo F28027F and DRV8305EVM for controlling BLDC sensor less motor. My application requires motor to run in oscillation mode. Ex 170 times forward and reverse i.e oscillate in 1sec .

However I want to set Max Acclr per sec value to 200000. But currently i am able to set only hoto 128000. 

Please help me to set this value to 200000.

  • Vaishali, can you share which example code you are using?

  • Hello sir 

    I am using Projlab05b.c. In that I have added following code

    float A_RPM = -18.0; // 18000 rpm - But Gear head ratio is 1:6 so motor will run at 3000 rpm


    int count =0;

    count++;
    if(count > 210)   // for value less than 210 oscillations are not proper. Motor rotates more in one direction and less in other.
    {
    count = 0;
    A_RPM = -A_RPM;
    }
    CTRL_setSpd_ref_krpm(ctrlHandle,gMotorVars.SpeedRef_krpm=_IQ(A_RPM));


    // set the speed acceleration
    CTRL_setMaxAccel_pu(ctrlHandle,_IQmpy(MAX_ACCEL_KRPMPS_SF,gMotorVars.MaxAccel_krpmps=2147483647));

    gMotorVars.MaxAccel_krpmps=2147483647 this is the max value (128000) that i can give. If  I enter value as gMotorVars.MaxAccel_krpmps=2147483648 it becomes greater than integer 128000 and truncated to some negative value.

    Is it problem of GUI or something else?

    Since in main.hvariable  MaxAccel_krpmps is mentioned as _iq MaxAccel_krpmps and its datatype  typedef long _iq.

    Thanks

    Vaishali

  • You are right. The _IQ24 format is using in all of the InstaSPIN-FOC labs, the maximum value of all variables must be lower than _IQ(128.0), so the MaxAccel_krpmps has to be less than _IQ(128.0), 2147483647 by default as you mentioned above.

    You may try below method to change some ciodes within CCS, just change the MAX_ACCEL_KRPMPS_SF in main.h as below, and please note that the setting acceleration unit will be 10krmps for gMotorVars.MaxAccel_krpmps variable.

    #define MAX_ACCEL_KRPMPS_SF  _IQ(USER_MOTOR_NUM_POLE_PAIRS*1000.0 * 10.0 /USER_TRAJ_FREQ_Hz/USER_IQ_FULL_SCALE_FREQ_Hz/60.0)

  • Thank you sir for your help. It still didn't resolve m problem. 

    I want motor to oscillate (Forward and Reverse) in 1min 170 times i.e in 0.175 sec fwd and in 0.15sec reverse so i thought Max Acceleration/ sec needed is 200000.

    Here i am giving you my motor parameters which I have set in USER.h file.

    #define USER_IQ_FULL_SCALE_FREQ_Hz        (1000.0) 

    #define USER_PWM_FREQ_kHz                (45.0)

    #elif (USER_MOTOR == New_Motor)
    #define USER_MOTOR_TYPE MOTOR_Type_Pm
    #define USER_MOTOR_NUM_POLE_PAIRS (2)
    #define USER_MOTOR_Rr (NULL)
    #define USER_MOTOR_Rs (0.1681252)
    #define USER_MOTOR_Ls_d (0.0000275016)
    #define USER_MOTOR_Ls_q (0.0000275016)
    #define USER_MOTOR_RATED_FLUX (0.0092132)
    #define USER_MOTOR_MAGNETIZING_CURRENT (NULL)
    #define USER_MOTOR_RES_EST_CURRENT (1.0)
    #define USER_MOTOR_IND_EST_CURRENT (-1.0)
    #define USER_MOTOR_MAX_CURRENT (5.0)
    #define USER_MOTOR_FLUX_EST_FREQ_Hz (20.0)
    #define USER_MOTOR_INERTIA_Kgm2 (12.6)

    #define USER_MOTOR_FREQ_LOW (10.0) // Hz - suggested to set to 10% of rated motor frequency
    #define USER_MOTOR_FREQ_HIGH (100.0) // Hz - suggested to set to 100% of rated motor frequency
    #define USER_MOTOR_FREQ_MAX (120.0) // Hz - suggested to set to 120% of rated motor frequency
    #define USER_MOTOR_VOLT_MIN (10.0) // Volt - suggested to set to 15% of rated motor voltage
    #define USER_MOTOR_VOLT_MAX (24.0) // Volt - suggested to set to 100% of rated motor voltage

    Motor has gear head with ratio 1:6. So whenever I am setting 3000rpm it is running at 18000rpm.

    In projlab05b.c I have mentioned this code:

    float A_RPM = -18.0; // 18000 rpm at gear head for motor it is 3000
    int count =0;

    if(EST_isMotorIdentified(obj->estHandle))
    {
    // set the current ramp
    EST_setMaxCurrentSlope_pu(obj->estHandle,gMaxCurrentSlope);
    gMotorVars.Flag_MotorIdentified = true;

    // set the speed reference
    count++;
    if(count>215)
    {
    count = 0;
    A_RPM = -A_RPM;
    }
    CTRL_setSpd_ref_krpm(ctrlHandle,gMotorVars.SpeedRef_krpm=_IQ(A_RPM));


    // set the speed acceleration
    CTRL_setMaxAccel_pu(ctrlHandle,_IQmpy(MAX_ACCEL_KRPMPS_SF,gMotorVars.MaxAccel_krpmps));

    And gMotorVars.MaxAccel_krpmps I am setting to 200000.

    Here motor RPM is 3000. And count set is 215 i.e in this count motor will oscillate 170 times. But does not oscillate properly.  It is rotating more in one direction and less in other. Sometimes it oscillates properly. sometime not.

    Can you please guide me what is actual problem ? 

    Thank you

    Vaishali

  • I want motor to oscillate (Forward and Reverse) in 1min 170 times i.e in 0.175 sec fwd and in 0.15sec reverse so i thought Max Acceleration/ sec needed is 200000.

    This requirement could be very tough for current sensorless-FOC example lab. You may have to use sensored-FOC to get so fast forward and reverse control for your motor. The sensolress-FOC can't start and run the motor to a high speed in such short time.

  • Hello sir,

    After doing  changes as suggested by you code works better for higher RPM i.e 2400 to 3000 (gear head rpm=14400 to 18000 as gearhead ratio is 6:1)

    #define MAX_ACCEL_KRPMPS_SF  _IQ(USER_MOTOR_NUM_POLE_PAIRS*1000.0 * 10.0 /USER_TRAJ_FREQ_Hz/USER_IQ_FULL_SCALE_FREQ_Hz/60.0)

    Now by adjusting few parameters motor oscillates (Forward and Reverse) in 1min 170 times i.e in 0.175 sec fwd and in 0.175sec reverse for 3000 rpm .

    But for low RPM------>

    1. for 900rpm of motor (gear head output=5400) it is needed to oscillate motor 85 times in 1min i.e in 0.70sec fwd and 0.70sec reverse

    2.for 1200rpm of motor (gear head output=7200) it is needed to oscillate motor 105 times in 1min i.e in 0.29sec fwd and 0.29sec reverse

    3. for 1500rpm of motor (gear head output=9000) it is needed to oscillate motor 120 times in 1min i.e in 0.25sec fwd and 0.25sec reverse

    4. for 2100rpm of motor (gear head output=12600) it is needed to oscillate motor 130 times in 1min i.e in 0.23sec fwd and 0.23sec reverse

    For above rpms motor oscillates properl but vibrates. I tried to adjust KP KI values but problem still Persists. Rest code is same as mentioned above. 

    What possible changes can i make to stop vibrations at low speed.

    your suggested answers help me a lot.

    Thank you in advance

    Regards,

    Vaishali

     

  • You can try to tune the PI controllers for both speed and current, and make sure that the motor parameters are correct for FAST estimator. But I don't think it's easy to meet your requirements to avoid the oscillation during start running the motor. As mentioned above, the sensored-FOC should be a good choice for your application.

  • Okay will try do that.

    Thanks a lot