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.

MCF8329EVM: Flux weakening and overmodulation

Part Number: MCF8329EVM
Other Parts Discussed in Thread: MCF8329A, MOTORSTUDIO, , MCT8329A

I am trying to get a motor to run a bit faster than the top speed I'm currently achieving with the MCF8329A (at a fixed bus voltage).  Preferably close to the speed I can get with a trapezoidal controller.  I have tried experimenting with the flux weakening controls in MotorStudio, but they seem to have no effect at all.  Can anyone provide some guidance on this?  I also notice a control in MotorStudio named "OVERMODULATION_ENABLE" which is grayed out.  This sounds as if it might be of interest, but I find no documentation about it anywhere.  What is this for?

Ideally the controller would operate in normal FOC mode up to the maximum speed that can be achieved that way, and then switch into a more trapezoidal waveform for speeds above that.  If an automatic switchover is not available, explicitly switching would work for my application.

  • Hello Marc,

    The MCF8329A does not support overmodulation which is why it is greyed out. For a description of this feature please refer to section 7.3.11.4 of the MCF8316A datasheet

    Just to make sure, are you attempting to achieve the desired motor top speed while in modulation index mode? If not, please change to this mode, this disables the speed and current loop and is useful for determining if the MCF8329A has the capability of driving the motor at the desired motor speed.

    Some hardware changes may need to be made so that the MCF8329A's CSA can have the best resolution if the current which should improve the performance of the motor driver. To start please use the following equations to determine a good CSA  gain and Rsenese (R44 on the MCF8329EVM) value caombination to use:

    If you are using the CSA in Bi-directional mode:

    1.5/(CSA_GAIN*RSENSE) = Max peak motor current

    If you are using the CSA in uni-directional mode:

    0.375/(CSA_GAIN*RSENSE) = Max peak motor current

    Once the values for Rsense and CSA gain are determined please use the following equations to program the base current based on the CSA mode used:

    If you are using the CSA in Bi-directional mode:

    BASE_CURRENT = (1.5/(CSA_GAIN*RSENSE))*(32768 / 1200)

    If you are using the CSA in uni-directional mode:

    BASE_CURRENT = (0.375/(CSA_GAIN*RSENSE))*(32768 / 1200)

    With the CSAs max measurable current (BASE_CURRENT) set you can also add a filter on the CSA input by replacing R45 and R43 with 10 Ω resistors and placing a 10nF capacitor on C31.

    For register changes, please try and adjust the lead angle using the LEAD_ANGLE bit field (bits 26-22) in the PIN_CONFIG register (0xA4) to try an increase the max speed. I would also recommend enabling the VDS filter, this setting is also in PIN_CONFIG register (0xA4). 

    Regards,

    Joshua

  • Is "overmodulation" the same as "flux weakening"?  The GUI does have non-grayed fields for some flux weakening parameters.  If flux weakening is available, does that allow increasing the top speed?  How should the parameters be set?

    Regarding modulation index mode, I do need to have the speed loop functioning for my application, so I'm not sure how that would help.

    I have already changed the Rsense to 5 milliohms to better match my motor.  I did not notice any significant change in performance.

    Can you expand on CSA unidirectional mode vs. bidirectional mode?  I don't find any reference to this in the datasheet.  What are the effects of this selection?

    I will experiment with LEAD_ANGLE and the VDS filter.

    To clarify, I believe that the board is reaching the top speed that is achievable with this motor, this bus voltage, and a sinusoidal waveform.  I'd like to find out if the MCF8329A has any support for driving with a waveform closer to trapezoidal, to achieve higher RPMs when desired.  As mentioned before, I need the speed loop to be active, and the ideal behavior would be for the controller to drive the motor with sinusoidal waveforms up to the maximum possible RPM, and then to flatten the top of the waveform to achieve higher RPM, when commanded, all under the control of the speed loop.

  • Hi Marc,

    Both overmodulation and flux weakening are both used to spin a motor at higher speeds but with different methods. Overmodulation will modify the applied PWM pattern to increase the fundamental phase voltage while flux weakening will adjust the I_dref in the current control PI loop to allow a motor to achieve higher speeds at the cost of lowering the available torque.

    Regarding modulation index mode, I do need to have the speed loop functioning for my application, so I'm not sure how that would help.

    The suggestion to use modulation index is only for tuning purposes and not for the full implementation. In this mode a lot of variables (the ones used for the current and speed PI loops) are turned off so the number of variables that could be limiting the speed is smaller and the current and speed loops are additions to the modulation index mode. So if the motor can spin at the desired speed in modulation index mode, then the motor will be able to spin at that speed with both the current and speed loops enabled as well, but some tuning to these loops settings may be required. Hopefully this provides some clarity to why I suggested using modulation index mode for tuning purposes.

    Can you expand on CSA unidirectional mode vs. bidirectional mode?

    Sorry, I made a mistake, the MCF8329A does not support unidirectional CSA mode, this feature is available on the MCT8329A. In unidirectional mode the CSA has less negative current sensing range allowing for greater resolution of the positive phase current. In bidirectional mode the CSA is able to sense both the positive and negative current but the positive current has less range than when in unidirectional mode.

    I'd like to find out if the MCF8329A has any support for driving with a waveform closer to trapezoidal, to achieve higher RPMs when desired.

    The MCF8329A does not offer the ability to make the phase current more trapezoidal. To achieve higher RPMs tuning of settings like the speed loops Kp and Ki, lead angle, flux weakening, the current loop Kp and Ki, etc. will be the best method.

    Regards,

    Joshua

  • Thank you, that was very helpful.  It seems that the only method available to increase the top speed would be using flux weakening.  I have some questions about implementing that.

    - The only controls I see under "Advanced Tuning" referencing flux weakening are FLUX_WEAKENING_KP, FLUX_WEAKENING_KI, and FLUX_WEAKENING_REF.  I don't see anything to enable/disable flux weakening.  However, under the register map there is a bit called FLUX_WEAKENING_EN, which defaults to Disabled.  There is also FLUX_WEAKENING_RATIO, which also is not exposed in the Advanced Tuning section.

    I have experimented with these five parameters.  Setting FLUX_WEAKENING_EN to Enabled does allow the top motor speed to increase slightly, about 1%.  Varying the other four parameters does not seem to have any effect at all on the top speed.  Does this indicate that the design of this particular motor does not allow for significant speed increases with flux weakening?

    Can you provide practical advice on configuring this feature of the Controller?

  • Hi Marc,

    We will look into adding the missing Flux Weakening registers to the Advanced Tuning page, thank you for bring this to our attention.

    For advice on tuning the Flux Weakening settings, I will get back with you by Thursday.

    Regards,

    Joshua

  • While you're at it, in your first response in this thread, you suggested I try adjusting the LEAD_ANGLE parameter.  Although this is listed in the datasheet, it is not exposed in the Advanced Tuning page, and under the Register Map, it is grayed out in the Field View.  If I try to change it in the hex value for the register (A4), those bits are immediately reset to zero.

    Further, you suggest enabling the "VDS filter" in the Pin Config register.  There is no such setting in the Register Map nor the datasheet.  There is a setting called "VdcFilterDisable" in the Register Map and the datasheet, with the recommendation that it be set (disabling the filter) during MPET.  Is this the setting you are talking about, and are you suggesting that I set the bit to zero, thus enabling the filter?  Or did you mean to set the bit to 1, to disable the filter?  Or were you rather talking about the "VDS Fault" enable, in a different register?

  • Hi Marc,

    Would you mind providing more information about your application, such as is this for a vacuum? 

    Please see the procedure below for tuning the Flux weakening setting:

    1. Enable flux weakening using: FLUX_WEKANING_EN = 1b
    2. Set FLUX_WEAKENING_CURRENT_RATIO: Start with 30-40% and increase if needed. Even lower numbers can be used to limit the id.
    3. Set FLUX_WEAKENING_REFERENCE: Recommend to start with 70% for Flux weakening Kp and Ki tuning. Once tuned, recommended to try with 80% or 90% based on the max modulation index.
    4. Tune FLUX_WEAKENING_KP and FLUX_WEAKENING_KI : start with 0x10 for both Kp and Ki. If you do not see improvement try increasing these gains. Tuning the Kp and Ki values is mostly a process of trial and error.

    The lead angle parameter is incorrectly set to reserved on Motor Studio for the MCF8329A, we are actively working to correct this issue. In the meantime if you have a MSP430 LaunchPad available, please refer to our FAQ on programming the MCF8329A using a MSP430 LaunchPad to change the LEAD_ANGLE value.

    Made a typo, I meant to type VDC filter. The recommendation is to set the VdcFilterDisable to 0b to enable the filter if it is not already set to 0b.

    Regards,

    Joshua

  • Hi Joshua,

    I'm sorry, I can't provide any details about the application at this time.

    I followed your procedure, and didn't get any better speed increase than I had before--still just approximately 1% higher speed than without flux weakening.  None of the five parameters you discuss seemed to have any noticeable effect.  But, in experimenting, I found that I *was* able to get significant speed increase by increasing the value of "Reference for Torque PI Loop [ILIMIT]".  The default was 15%.  Each increase gave me a higher top speed.  Setting it to 50% allowed me to get the 10% increase in speed that I was looking for.  With that higher ILIMIT, I found that increasing Flux Weakening Ratio made the motor sound a little smoother--setting it to 80% was best.  Similarly, decreasing Flux Weakening Reference improved the sound of the motor--setting it to 70% was best.

    So I'm now seeing the speed that I want.  However, I suspect that the available torque may now be reduced too much.  So in the end, I may have to move to trapezoidal drive to get the combination of speed and torque that I am looking for.  It seems like "overmodulation" is what I really want, to allow me to use FOC at lower speeds for quietest operation, but switch to something more like trapezoidal drive when I need the highest speed.

    I don't have an MSP430 launchpad available, and don't want to spend the time on setting that up to program the LEAD_ANGLE, unless you think that it's likely to be productive (allow higher speed while maintaining torque).

  • Hi Marc,

    I am glad that you were able to find that the ILIMIT setting was limiting the speed of the motor.

    Tuning the lead angle can lead to higher speeds and higher efficiency for your motor driver system. The amount that lead angle will help improve the efficiency and top speed of your particular motor will require experimentation so I ultimately cannot say if it will be productive to go through the set up required to program the Lead Angle. 

    Please let me know if you require any further support.

    Regards,

    Joshua

  • Ok, I will consider looking into adjusting the Lead Angle.  Is it expected that I needed to adjust ILIMIT?  Is it connected to the Flux Weakening algorithm, or is it just another limit that was being bumped into?

  • Hello Marc,

    Is it expected that I needed to adjust ILIMIT?

    ILIMIT will limit the current that can be supplied to the motor to the set % of the value set in BASE_CURRENT. Depending on the rated peak current of the motor and the value programmed into BASE_CURRENT, 15% could have been limiting the maximum current being supplied to the motor resulting in lower speed. If ILIMIT was setting the max current available to the motor to below the motors max rated current, then it is expected that ILIMIT would have to be adjusted to allow more current to the motor but without exceeding the motors maximum peak current.

    Is it connected to the Flux Weakening algorithm, or is it just another limit that was being bumped into?

    FLUX_WEAKENING_CURRENT_RATIO is dependent on the ILIMIT setting so long as it is not set to 0b. This setting will limit the maximum value of the Id_FW to the set % of ILIMIT. Before you increased ILIMIT I think that the motor's current was being limited by the set ILIMIT value leading to the restricted speed and increasing ILIMIT allowed for more current to be available to the motor.

    Regards,

    Joshua

  • Ok, that all makes sense.  I had earlier changed the sense resistor to better scale the sense current for my motor, but I hadn't changed the setting of ILIMIT from the default.  It was probably just high enough to run my motor up to speed unloaded.  As I understand it, using flux weakening requires additional current to balance the flux, so it was then running into the limit.  I would probably also have run into the limit once I was running the motor at higher load.

  • Hi Marc,

    We recommend setting ILIMIT to the motors rated max peak current. Since ILIMIT is a % of the value stored within BASE_CURRENT, I would recommend making sure value in BASE_CURRENT = (1.5/(CSA_GAIN*Rsense))*(32768 / 1200) and then choosing the appropriate ILIMIT setting.

    Please let me know if you have any more questions on this topic.

    Regards,

    Joshua