Hi all,
It has been a while since I posted something here, but recently I picked up a new project using SimpleFOC. My current setup consists of an emax GB4114 BLDC motor with a as5047p encoder and I use an stm32f411re with the Simplefoc v1.3.3 shield to control it.
For my application I need to move the BLDC around in a stepwise motion of 8 steps per revolution. So I control it using the position control loop and set a target angle of the first step, the motor moves to this position in around 40 msec., and after another 10 msec I set a the target angle of the next step, etc. All in all, this result in a step wise continues rotation in one direction
This seems to work ok, and I am quite pleased with the step response of the system. Right after startup its behavior look like this:
For my application, I need it to be able to keep the behaving the same for hours. For the current implementation, the system makes 1/0.05 * 3600 = 72000 steps per hour (=72000/8 = 9000 revolutions per hour). However, after running the system for around 30 min, its step response behavior changes:
I have the feeling that this time dependency in behavior is caused by the integrated error of the inner velocity loop slowly increasing, since the motor only rotates in one direction, and therefore the windup is not compensated. I tested this by setting the velocity integrator to 0, which resulted in a slower dynamics, but it did not seem to change over time when running it for an hour or so. I think this kind of confirms my suspicion.
Therefore my question: is this it somehow possible to reset the integrated error of the velocity PID loop every time I set a new target angle? I would highly appreciate your input!