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.

problem in identifing the motor params

Other Parts Discussed in Thread: DRV8301, MOTORWARE

hi,

I am using an boostxl- drv8301 kit with f28027F launchpad board and running a 8 poles(4 pair poles), 3krpm(max), 24vdc motor. but i can't get a suitable response.

when i use identification procedure to identify the motor, Lsd and Lsq parameters do not assign correctly. ex: they assigned < 1.0e-6 that cause a fault in running motor. also this values differ in every time that i run the identification procedure.
meanwhile sometimes this params to valus bigger than 1.0e-6, but this values cause a other errors. for example motor run with shaking in low speed(60rpm) or it can reach to max speed(3000 rpm)
how can i achieve the motor parameters correctly?

thanks

  • sorry for bad writing :
    "it can't reach to max speed(3000 rpm)"
  • you need to run proj_lab02c to properly identify the inductance of this machine. Try that, and attach the user.h you are using.
  • hi,

    i used proj_lab02c but the result wasn't good. ex: the lsd and lsq differ every time i use the identification process.

    finally this is my user.h file:

    5037.user.h

  • you can try changing

    #define USER_R_OVER_L_EST_FREQ_Hz (300)

    but it will have only a minor effect on the motor ID

    during ID does the motor reach

    #define USER_MOTOR_FLUX_EST_FREQ_Hz     (100.0) // 1500 RPM with 8 poles

    and keep spinning until completion?

    if this motor is actually only 1.56A peak max you should lower

    #define USER_MOTOR_RES_EST_CURRENT      (0.3)
    #define USER_MOTOR_IND_EST_CURRENT      (-0.3)

    and see if you can get more consistent results on the inductance testing.

    Once you have the values the motor should work well in TORQUE mode (proj_lab05a) for any given Iq_Ref_A command.  You should test this to make sure it's stable.

    For speed mode (what happens after you ID or by using any other lab) you need to tune the speed loop gains. For high speed motors this usually requires reducing the gains by up to a factor of 10.

    Give this a try. Please describe what happens once you run the motor.

  • hi,
    i changed USER_R_OVER_L_EST_FREQ_Hz to 300 , and find that my motor current rating is 1.56 and calculating that current peak max is 2.3, so assign USER_MOTOR_RES_EST_CURRENT and USER_MOTOR_IND_EST_CURRENT respectively to 0.5 and -0.5.
    then i tried to identify the motor with this params with lab proh_lab2c.

    result in params:

    1- RS= 1.25

    2- Lsd = Lsq = 5.889263e-05

    3- Rated Flux = 0.053

    when i assigned this params to user.h and try to use motor with user parameterin proj_lab5a and proj_lab5b, the error code displaying: "USER_ErrorCode_ctrlFreq_Hz_Low".

    this error will eliminate by reducing Lsd and Lsq. in this case using proj_lab5a and setting Iq_Ref_A to 1, results to constant speed_krpm(1.6) and incrementing Iq_Ref_A to 2 and 3, didn't make any change to speed.
    by this params, using proj_lab5b max speed that ruslt is 1.6 krpm and incrementing speedref to upper speed(2 or 3 krpm) didn't make any change to speed.

    after all of that, i changed USER_MOTOR_FLUX_EST_FREQ_Hz from 20 to 100, no diffrence has been made to reaching speed to destination.

    i am confused, why the motor can't reach to destination speed? is this because of bad identifying?

    by the way, this is my user.h file: 

    7167.user.h

  • hi,
    about your question:
    during identification when USER_MOTOR_FLUX_EST_FREQ_Hz assigned to 100, in EST_State_Rated_Flux, the speed reach to 1.5 krpm(checked by tacho meter) that displayed by "gMotorVars.Speed_krpm", but in EST_State_Ramp_Up when gMotorVars.Speed_krpm display up to 8.3 krpm, the speed don't go upper than 1.5 krpm.
  • I'm not sure what you mean with your last post. 1.5 KRPM is the target frequency (100 Hz with 8 poles).

    I believe these values are correct:
    1- RS= 1.25

    2- Lsd = Lsq = 5.889263e-05

    3- Rated Flux = 0.053

    try updating these correctly in your user.h

    in user.h try commenting out the error check section that is causing the error:
    if((USER_MOTOR_Rs != 0.0) && (USER_MOTOR_Ls_d != 0.0) && (USER_MOTOR_Ls_q != 0.0))
    {
    if(((float_t)USER_CTRL_FREQ_Hz <= (USER_MOTOR_Rs / (USER_MOTOR_Ls_d + 1e-9))) ||
    ((float_t)USER_CTRL_FREQ_Hz <= (USER_MOTOR_Rs / (USER_MOTOR_Ls_q + 1e-9))))
    {
    USER_setErrorCode(pUserParams, USER_ErrorCode_ctrlFreq_Hz_Low);
    }
    }


    this is to check that the CTRL Freq > Rs / Ls.

    Most Rs / Ls should be designed to be ~2x the rated frequency (yours is 200 Hz) of the motor. The problem is that you have a very unusual motor where Rs / Ls >> rated frequency.

    Try just commenting out this error and see how it runs with proj_lab05a and 2A of Iq_Ref_A.
  • actually, we found a little issue with this error checking logic. please change it to the following and the error will disappear.

    Fixed Code:

    if((USER_MOTOR_Rs != 0.0) && (USER_MOTOR_Ls_d != 0.0) && (USER_MOTOR_Ls_q != 0.0))
    {
    if(((float_t)USER_CTRL_FREQ_Hz <= (USER_MOTOR_Rs / (USER_MOTOR_Ls_d + 1e-9) / MATH_TWO_PI)) ||
    ((float_t)USER_CTRL_FREQ_Hz <= (USER_MOTOR_Rs / (USER_MOTOR_Ls_q + 1e-9) / MATH_TWO_PI)))
    {
    USER_setErrorCode(pUserParams, USER_ErrorCode_ctrlFreq_Hz_Low);
    }
    }
  • hi,
    first of all thank you for your consideration.
    i respectively do what you have said. at first i comment the error check section in user.c then add the code that you have said. the error has elliminate but the main problem still on. also after identification the speed still on the maximum of 1500rpm and setting 2A for Iq_Ref_A in proj_lab05a has no effect on speed(max of 1500).

    before saying the problem i have a question. i'm using a 8 poles(4 pair poles), 3krpm(max), 24vdc PMSM motor. you said that :"1.5 KRPM is the target frequency (100 Hz with 8 poles)".
    1- what is it mean? it means that 1500 is my max speed at all or this is a max speed in identification? if i set it to bigger number like 200, does it make a change?

    2- second question, is there a problem that my motor LS is too low and Rs / Ls >> rated frequency?

    3- how can i convey the speed of motor to 3000rpm?
  • sorry,

    4- is this right that reducing USER_IQ_FULL_SCALE_VOLTAGE_V may cause a better resolution in identification?
  • are you sure you have the poles set correctly?  It's strange that you are seeing half your expected max RPM value. 

    1. 3 KRPM with 8 poles = 200 Hz = maximum frequency (you think).  I was saying that you have USER_MOTOR_FLUX_EST_FREQ_Hz (100.0) so you are trying to run it at 1.5 KRPM during identification. I wanted you to verify that it reaches that speed. In actuality, you should probably set USER_MOTOR_FLUX_EST_FREQ_Hz (20.0) // 10% of rated frequency during ID

    2. It's not a problem per se, InstaSPIN-FOC should work just fine. 

    3. to do some debug use proj_lab10 please.  Command 3 KRPM and note the speed and the value of gMotorVars.Vs  .

  • Hi, ChrisClearman, you mentioned that most Rs/Ls should be designed to be ~2x the rated frequency, is this rule only applied to FOC/sinewave motor or any motor (like square wave control motor)?
  • hi,

    the poles are right, i tested it. only with setting of 4 pole pairs the speed between 0~1500 rpm are set and get correctly. with other pole pairs(2 , 8) the speed that set and get respectively half or double of real one(checked with tachometer).

    1. with setting USER_MOTOR_FLUX_EST_FREQ_Hz  to 100, the speed reach to 1500 rpm during identification. by increasing this param(ex. 200), when the motor want to go upper than 1700 rpm during identification, the rotor locks, the spinnig stop but the sound of increasing speed will continue. 

    3. i have ran the  proj_lab10a and command 3 KRPM to motor , the result shown in pic below:

    using over-modulation in proj_lab10a result these:

  • motor manufacturers have over designed certain types of motors to give very large R / L. This is for voltage stability with open loop style techniques. With InstaSPIN-FOC you could design the motors better (would reduce the torque ripple). We know this isn't really the case though, people use what motors are available.
  • I can tell there is something wrong because your Id_A value isn't close to zero. All your current is in the Id vector and very little in the torque producing Iq vector. This suggests the estimator is off. Could be from poor current/voltage feedback or from improper motor parameters.

    Is the motor you are using available on-line? Is there a datasheet?

    in the over modulation lab you can't use a value of 2.0.
    if using MotorWare v14 you must limit this to 1.333
    If using MotorWare v15 the limit is 0.666
  • i'v checked the overmodulation( MotorWare v14), the values below the 1.33 have no effect on speed.

    i couldn't find the link of my PMSM motor on line but i have a paper of motor parameters, i can write them for you.
    i write it completely. i don't know many of this parameter:

    1- rated power : 31W
    2- the rated line voltage : 24vdc
    3- rated speed : 3000r/min
    4-rated torque: 0.1N.M
    5- current rating 1.56A
    6- encoder lines : 1000 lines
    7- peak torque : 0.3 N.M
    8- motor pole pairs: 4
    9-moment coefficient: 0.057N.M/A
    10- rotor inertia : 0.9*10E-4kg.m2
    11-winding wire resistance beetween : 2.26
    12- winding wire inductance between : 1.31 mh
    13- the electrical time constant: 2ms
    14- the counter electromotive force : 4.3/1000r/min
    15-encoder eat electricity : 5v
    16- ABZ signal: Diffrential
    17-Hall signals: single points
    18-frame size:42 mm
    19-the flange diameter: 22mm
    20-the motor shaft diameter: 5mm
    21- connection : axis
    22-motor weight: 0.25kg
  • i forgot it:
    i think motor made in china, and there is no official link.
    if i found it i will write the link.
  • I think the identified inductance is incorrect.

    try setting half of 12- winding wire inductance between : 1.31 mh
    #define USER_MOTOR_Ls_d (0.000650)
    #define USER_MOTOR_Ls_q USER_MOTOR_Ls_d

    and see if things improve
  • hi,

    i changed USER_MOTOR_Ls_d to 0.000655 but the result didn't changed. i am using the proj_lab05b, proj_lab09 and proj_lab10a but the result is as same as usual.

    also i changed rated flux to lower value like 0.027 or 0.039, result become worst and the speed become unreal. it means that the gMotorVars.Speed_krpm display a value but the real speed(checked by tachometer) is another thing. when using the 0.053 as a USER_MOTOR_RATED_FLUX, the speed become real.
    the problem is, in this state, the speed don't go over the 1650 rpm.

    also i used proj_lab04 and set the iq_a value to 1, the speed don't go over the 1650 rpm, seting iq_a value upper than 1, has made no chenage to speed.

    also when i set value a little precise around the 0.053, the max speed change. a question is, the primitive Rated_flux, that i set in user.h, update during morot spinnig or use and don't change?


    i am confused, it seems to be something wrong but a don't know what is it. i am trying true/false exam but it has no result,

    what can i do to take speed upper than 1650 rpm?
    and final question, is there a relation between Ls and flux?
  • I doubt this is it, but if you are using CCSv5 please check the properties to insure that the effective compiler is NOT 6.2.0 - 6.2.2

    Other than that I'm stumped.  We can get every synchronous motor running these days...Is this a motor you could send me?

  • hi,

    i am using CCS5 and unfortunately my effective compiler version is "TI v6.2.0" . how can i change that?

    is this a serious problem?

  • hi ChrisClearman,
    that was a problem, found and solved. thank you.
    i migrate to CCS 6.0 and all the problems solved.

    is suggest to any one who use CCS5.0 to migrate to CCS6.0.

    the identification in CCS6.0 and also running motorware projects are more better than CCS5.0.

    it seems that the compiler version must not to be 6.2.0 - 6.2.2. in compiler version in CCS6 is 6.4.6