Hi,
Working with my own HW, a PMSM motor (attached user.h) and InstaSpin-FOC, I’m getting a strange behavior sometimes, so in the same environment I observe different feebacks. I’ll try to explain although it’s a little bit difficult.
The scenario is as follow:
- The goal is to move a mass of 30kg, from 0 rpm up to 400 rpm, first of all in one direction and after that in the other direction, in a distance of 800mm.
- The movement is repetitive.
- The initial and final positions are always the same.
- My system is sensorless.
I found two problems:
PROBLEM 1
In both directions, at the very beginning of the movement, sometimes the motor can’t start to spin softly. As you can see in the second picture, there is a current peak so high, as opposed to the first picture where the movement is really soft and any peak is found in current wave.
In this situation, I try to change the speed from 0 to 10rpm in a short distance (about 43mm), and the speed controller and accelerations are as follow:
gMotorVars.MaxAccel_krpmps=_IQ(0.06);
gMotorVars.Kp_spd = _IQ(7);
gMotorVars.Ki_spd = _IQ(0.1);
I know in the document Spruhj1f, chapter 14, some recommendations are explained in order to improve the motor startups, so now stator Rs recalibration is enabled as well the forced angle (never disabled), but the problem is not solved in any case.
I guess this issue could be related with the speed controller, but I would like to know an expert opinion.
PROBLEM 2
After some cycles (not always the same number) and when the mass should be accelerating, it can’t follow the speed reference and the movement is so “dirty”. As you can see in last picture, the current wave is really weird, like in a resonance. To solve this, I tried different few changes without a success result:
- Check the user.h according to my HW so I thought the current could be saturating.
- I reduced the acceleration.
- Reset the integral start value in the PID controller when the speed reference is 0rpm.
In this case, the parameters are as follows:
gMotorVars.MaxAccel_krpmps=_IQ(0.7);
gMotorVars.Kp_spd = _IQ(3.9);
gMotorVars.Ki_spd = _IQ(0.043);
Let me say that when this happens once, the problem frequency is higher or even the oscillation occurs in every movement, as if some controller part would be adding any type of error. Besides this, if I reduce the load, the problems never happen.
And nothing more, I hope my explanation was sufficiently clear and easily comprehensible.
Many thanks in advance.



