cancel
Showing results for 
Search instead for 
Did you mean: 

STSPIN based Motor Controller acceleration and deacceleration setting in Torque Control

PPate.2
Associate II

Hello,

I have STSPIN32F0 Based Board for PMSM motor Drive. This Motor Works for Water Pump Application. we have Created 5 step in start up sequence using  MC workbench. Motor Rotate as per Profile upto start up sequence Complete. But as soon as Motor Switch to Close Loop it start to rotate on Full Speed Suddenly and that create problem in actual application for us(some time motor stall hear OR we receive Speed Feed Back error sometime). we need to set some acceleration time. after switching to close loop it will take some time to get high RPM. Also same thing we need when we send a STOP Command, Motor deaccelerate slowly and then Stop.

We can't find any solution we are trying from many days, Please let me know that how can i implement above function of acceleration and deacceleration in MC workbench Generated Code.

we are using sensor less FOC drive with single shunt measurement. 

I am using keil IDE for Coding..

 

Thanks

6 REPLIES 6
Gael A
ST Employee

Hello PPate.2,

In your application, is Torque Mode really necessary ? If you want to control speed, I recommend to use the Speed Mode. If you really need Torque Mode at high speed (I would like to know why if you don't mind), you can still start in Speed Mode for rev-up until max speed, and then switch to Torque Mode. The MCSDK allows this feature on the fly.

Last case scenario, if you really want Torque Mode for your entire application (then again, I would be curious why) you can define speed by playing with the Modulation Index : gradually increasing it to speed up while keeping desired Torque. Be aware that this method is not really convenient energy wise and therefore not recommended. This is basically Speed Mode with extra steps.

If you agree with my answer, please consider accepting it by clicking on 'Accept as solution'.

Hope this will help,
Gaël A.

Hello Sir,

Thanks for your Reply,

 

Our Application is  water Pump. in that case we require maximum Torque to get maximum water flow.

Is there any example code that will operate in Open Loop for STSPIN32F0601 MCU ?

In Our Current Code we are facing problem of speed position feedback because load on motor is dynamic, so when motor switch from Open Loop to Close Loop it try to get suddenly High Speed and that will stall Motor Or Give Speed Position Feedback error.

 

also some Other parameters like cable length and gauge of cable from Our Control Circuit to Motor is variable inevery case.

Please suggest a best solution that how can we overcome this speed feedback error. 

thanks

Gael A
ST Employee

Hello PPate.2,

I think we have a little misunderstanding here. Could you help me to clarify ?

Does the speed feedback error occur as soon as the system try to close the loop, or is the motor speeding up to max speed, then the speed feedback occurs ?

In any case, know that you can deliver full Torque at each instant even in speed mode, it will adapt as soon as resistive torque is applied.

Concerning the Open Loop code, depending on the MCSDK version you are on, it may change. For our latest MCSDK version (6.2.1) you can enable Open Loop feature in the Stage Configuration tab. Please refer to the User Manual for a start-up guide. You can find it in WorkBench -> About -> Documentations -> Documentation

If you agree with my answer, please consider accepting it by clicking on 'Accept as solution'.

Hope this will help,
Gaël A.

Hello sir

"speed feedback error occur as soon as the system try to close the loop " in most of the cases.

in some cases(about 1 %  cases) motor runs at max speed for some duration like 10 minutes and then Speed Feedback error comes.

Thanks

Gael A
ST Employee

Hello PPate.2,

Thank you for your reply. Then the issue is different than what I figured first. Sorry for the misunderstanding.

In that case there are plenty of parameters you can play with to see if this increases performance. 

- First things first, have a look at your currents, if they seem noisy, maybe you should check your ADC sampling time, Trise and Tnoise values to improve current sensing.

- Then you can maybe increase PWM Frequency to improve current sensing precision. This may be difficult to do on a F0 (especially if you have increased ADC sampling time, Trise or Tnoise) but may be worth a shot. This works especially well for low inductance motors, I don't feel like it is your case though.

- Thirdly when you are sure your currents are sampled correctly, I would play a bit with the Speed Regulator gains (Kp and Ki), you may need to change your control to cope with the abrupt change in load.

- Take a look at the cut-off frequency of your Torque and Flux regulators, you may need to filter more noise.

- Finally have a look at your BEMF signal, if it is too noisy, then maybe your speed estimation has trouble. You would then need to modify your G2 Observer setting.

If you agree with my answer, please consider accepting it by clicking on 'Accept as solution'.

Hope this will help,
Gaël A.

Hello sir,

Thanks for your reply,

It's Our Bed Luck that all things Works Very Fine in Our Factory Conditions. Problem starts only in Field Condition as i mentioned above some field parameters are not in our Control.

So what we have Observed till is when motor switch from Open Loop (suppose it rotating at 800 RPM as Observer Conversion speed) to Close Loop it try to get maximum Speed suddenly but Due to Loading of water actual motor not go with magnetic field Rotation and resulted in Speed Feedback error.

in place of this if we can Do Open loop to close loop switch with slow speed ramp and motor go to max speed slowly then i think  i will get out of this issue.

but we don't have any idea that how can we slow down this RPM ramp when it switch to close loop.

thanks