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.

MOTORWARE: Variable switching frequency

Part Number: MOTORWARE

Hello,

I am trying to adapt our project based on motorware (particulary on example project 5e) to work with variable switching frequency (see link below).

https://e2e.ti.com/support/microcontrollers/c2000/f/171/t/813951

I got something that sort of works but I am having some problems with stability and current ripple at higher speeds when running sensorless and when reviewing the code I came across the variable pUserParams->pwmPeriod_usec, which is then forward onto the estimator (the whole UserParams structure is, I don't know if this variable in particular is used at all). If I am trying to vary the switching frequency while the motor is running, what value should I load to that variable on startup? Or should I update it online while running? Does this have any effect at all on the sensorless algorithm?

Assuming that variable doesn't have any effect on the angle estimation, is there anything else I might be missing that would affect the angle estimation? What parameters have an effect on the angle estimated?

Also I have noticed when running the tests that with the new variable switching frequency I get a drop on the produced torque when I run sensorless with respect to sensored. This would support the idea that the estimated angle is not quite right.

Any help would be very much appreciated.

Thanks!

  • You don't need to change any variables and parameters for FAST estimator if the FAST and motor control algorithms are executed in a fixed frequency timer ISR, not in the variable frequency ISR.

    That's right, the sensorless-FOC should have a little lower torque output than sensored-FOC, especially on low speed or heavy load since the resolution and stability of the estimated rotor angle maybe has a bit different with the angle from the position sensor.

  • Thanks for the quick reply but it doesn't quite answer my question. I am running FAST and the motor control algorithms in a fixed frequency timer ISR yes. But in particular with the variable pUserParams->pwmPeriod_usec, since the switching frequency is varying, what value should I put on? Max freq? Min freq? average? it doesn't matter?

  • The variable should be equal to the PWM period you want, it's a variable value. The initial value depends on what starting PWM frequency you want to use.

  • The example project is12_variable_pwm_frequency that you provide sets that variable userparams.pwmPeriod_usec to a fixed value. It does not vary it as the switching frequency changes as far as I can tell. This contradicts what you just said. I am just trying to understand the usage of this variable and its potential effect (if any) on the angle estimator. 

  • That variable is just used once for keeping compatible with other labs, not used in this project.

    You may take a look at the chapter lab12 of lab guide that can be found in the below folder of MCSDK.

    \ti\c2000\C2000Ware_MotorControl_SDK_2_01_00_00\solutions\common\sensorless_foc\docs\labs

  • ok. Thanks. I'll have a look.