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.

Overmodulation and other questions

Other Parts Discussed in Thread: LAUNCHXL-F28027F, BOOSTXL-DRV8301, MOTORWARE, TIDA-00643, DRV8312

I have been playing around with motoware on the LAUNCHXL-F28027F + BOOSTXL-DRV8301 platform for a while now.  For the most part I am coming to terms with it.  However I am left with several questions I haven't been able to solve to my satifaction.

How do I add overmodulation to lab11?  The lab notes say it is the same as lab 10a, but lab10a also uses the CTRL object.  I copied runCurrentIgnore, runCurrentReconstruction, and runSetTrigger from 11a.  I also copied the relevant svgencurrentHandle, etc initializations.  The motor runs, but the results are kind of odd.  In lab10 I can acheive ~3900rpm with modulation set to 0.67 and ~3100rpm with modultion of 0.5.  In lab11, with all my additions commented out and USER_MAX_VS_MAG_PU =0.5 I can still reach 3900rpm, shouldn't it only be 3100?


Is there a reccomended way to add stall detection?  I'm thinking of the case where foriegn objects cause the rotor to lock and the motor needs to be shut down to prevent damage.  I noticed when I lock the shaft, speed estimates of ~1krpm are returned in most cases.  My current techniques is to declare a stall when est. rpm is <1.5k and reference rpm is >2.5krpm for > 1 second.  In the case where ref rpm is <2.5k I declare stall if current is >5A for more than 1 second.  Is there a more elegant way?  This is for a fan application.

The motor/controller will need to be tested with the fan removed, but this will wreak havok when used with the high gains required for the fan, the motor will oscillate and be very noisy.  Is there a way to detect the presence of the fan inertia?  Current on startup maybe?  Any other suggestions for how to solve this problem?


Is there a way to selectively optimize files in the motorware projects?  I noticed by default the debug level is 2, this make actually debugging anything quite a challenge.  If I set optimization to 0 the code is either too large or doesn't run.  I would like to be able to optimize most of the files, but leave the ones I am working on at -o0.

Should Is_A match up with the measured input current?  I had to increase USER_IQ_FULL_SCALE_CURRENT_A to 25 for my motor to reach full power.  When testing at full power Is_A shows >20A, but my power supply shows like 18A.

That's all I have for now.  Thanks in advance for the help.

  • lab10 vs. lab11 depends on if you want to use the more rigid CTRL structure (<= lab10) or the simplified version where you have more control over the forward control (>= lab11) but lose out on all the CTRL features, including Motor ID.

    MotorWare 16 is currently scheduled for a late February release.
  • I would much rather use lab 11 since I don't need motor ID or any of that other stuff.  Jorge's response led me to believe there are some problems with lab 11, is there any particular precaution I need to take?

  • I agree, I would use lab 11 in your case.

    As far as some recommendations, first of all, make sure your target DC bus matches your nominal DC bus. So if you are driving your motor with 20V, make sure this is set:

    #define USER_IQ_FULL_SCALE_VOLTAGE_V      (20.0)

    This is so that Vbus compensation is not done unnecessarily.

    Second, to have an accurate measurement of the vector Vs, please use alpha and beta, which are scaled with Vbus. To do that, declare this new global variable:

    MATH_vec2       gVab_out_pu = {_IQ(0.0),_IQ(0.0)};

    Then, AFTER scaling Vab with 1/Vbus, save the values in the global variable:

            // save the 1/Vbus scaled alpha and beta values
            gVab_out_pu.value[0] = Vab_pu.value[0];
            gVab_out_pu.value[1] = Vab_pu.value[1];

    And finally, change the Vs vector calculation, so it uses Vab instead of Vdq:

        // calculate vector Vs in per units: (Vs = sqrt(Valpha^2 + Vbeta^2))
        gMotorVars.Vs = _IQsqrt(_IQmpy(gVab_out_pu.value[0],gVab_out_pu.value[0])
                + _IQmpy(gVab_out_pu.value[1],gVab_out_pu.value[1]));

    -Jorge

  • This application will be connected to a battery. The peak battery voltage will be 17.4v, and the lowest will be 12v. Nominal is somewhere around 15. Should I use the peak voltage or the nominal voltage in this case?

    Will the code you posted actually affect motor operation or just the telemetry values?
  • I would use 15V as the nominal voltage.

    The code I posted does not affect operation, only the variables to be monitored.

    -Jorge