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.

TMDSHVMTRINSPIN and gmotorvars questions

Other Parts Discussed in Thread: TMDSHVMTRINSPIN

I have been testing a new, fairly high flux, motor on the HV kit (TMDSHVMTRINSPIN) using instatspin-motion. I have modified the hardware and user.h per the qsg and your spreadsheet. It was great to see the system up and running so quickly, but I’ve run into a few problems and questions:

1. Low torque capability at low speeds (50 - 200 RPM). It seems like the max torque (and current) output rises with RPM. At low speeds, increasing load to just a low level will “knock out” the regulation. Upon load removal, the motor will stutter a bit and recover to the set speed. My motor manufacturer said the motor will output highest torque at these low speeds, so I must not be driving it properly.
2. The torque reading from gmotorvars is way too high, whether long or float, the figure goes to +- millions of InLbs
3. Is there a listing of gmotorvars variables and their definitions? For instance, I would like to monitor current, but don’t know the variable name and what it represents (eg: a running RMS current averaged across all legs). Also, when investigating the bandwidth parameter, it wasn’t clear what the range should be. I ran into problems below 4, which didn’t seem high and I wonder if there is something that I can do to get higher bandwidth.

  • Bill,

    Can you attach your user.h file?

    1. When this occurs will the motor stall but continue to push or will it stutter around 0 speed?

    2. This is a bug in MW12.  You can correct it by replacing this line in updateGlobalVaraibles_motor

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

    3. One issue with the gMotorVars structure is that not all variables are updated in all of the labs.  For example the D & Q currents (and the resultant S current) are only updated in InstaSPIN-MOTION Lab 10b.

    The settable value for Bandwidth is a scale value that will be multiplied by 20 when used for control.  So if you set gMotorVars.SpinTAC.VelCtlBwScale to 4, you are really setting the bandwidth to 80 rad/sec.  You can increase the maximum settable bandwidth by decreasing the sample time of the controller.  A 1ms sample time has a maximum bandwidth of 200 rad/sec for velocity control (and 100 rad/sec for position control).

  • >Can you attach your user.h file?

    Attached

    > When this occurs will the motor stall but continue to push or will it stutter around 0 speed?

    The motor initially seems to stall, then do a bit of "stuttering," then accelerate to the correct speed. This occurs quickly, just a second or two and it is back.

    user-to-TI.h
  • The torque values now seem reasonable.

    I added the line:

    expAdd ("gMotorVars.Id_A", getQValue(24));

    and the other two, to lab 5e script file. However, the currents do not update in the viewing window. Additionally, the speed variable sometimes freezes, then I'll click in the value field and it will start updating again.

  • Bill,

    I took a look at your user.h file.  The only thing I think you could modify is to set USER_IQ_FULL_SCALE_VOLTAGE_V equal to 221.  This will help increase your voltage resolution a little bit.  The other option is to follow the guide here to tune the location of the voltage filter pole.  I've found this will help with low speed control.  

    Another thing you could look at is adjusting the current regulators in order to make them stiffer.  These can be modified in the function calcPIgains.  The place to adjust is to modify the 0.25 scalar.  This scalar is used to set the bandwidth of the current regulators.  By increasing this value you are making the current regulators stiffer.

    The reason those current do not update is because in the Lab 05e code we are never providing values to those variables.  Look at the updateGlobalVariables_motor function in Lab 10b to see an example of how to update those variables.  If you modifying a value CCS will not update any values in the watch window.  Which is why you see the variables sometime freeze.  It is because a variable is currently being edited.

  • Thanks. I'm getting good readings now and will try the calcPIgains later.

  • >Another thing you could look at is adjusting the current regulators in order to make them stiffer.  These can be modified in the function calcPIgains.  The place to adjust is to modify the 0.25 scalar.  This scalar is used to set the bandwidth of the current regulators.  By increasing this value you are making the current regulators stiffer.

    I increased the scalar to 0.4, then 0.6, and got higher torque measurements, though not nearly as high as the motor advertized. I also noticed the current (Iq) seemed to max at roughly 3.3A at 50 RPM, also a fraction of what the motor can endure for short periods. I have two questions:

    1. The scalar increase did not seem to negatively affect anything. Am I compromising stability, or? My reading seemed to indicate that 1.0 is max, but is there a problem with high numbers?

    2. Any idea why the system doesn't pump current at higher levels? My max current setting was 8 A. Thanks.

  • Bill,

    1. The default scalar for the current regulators is fairly conservative.  If you increase the scalar too much you will get some noise and oscillations in the current regulators.  You could go above 1.0, it would just keep increasing the gain.

    2. By default, the maximum modulation is set to peak at 100% duty cycle.  If you increase the maximum modulation, you will increase the amount of time spent at 100% duty cycle which will produce additional torque by using additional current.  Is the current you are reading done from the Iq Reference or from the DC supply?

  • LineStream - Adam Reynolds said:

    Is the current you are reading done from the Iq Reference or from the DC supply?

    I am reading the gMotorVars.Iq_A value. I did get a bit higher current/torque with the scalar at 1.0 and increased bandwidth (our torque load is probably not too uniform). This seems adequate enough to go to the next stage of testing. Thanks!