Hello, I am simulating the speed control of a DC machine in Plecs Standalone. I am using EMF compensation at the output of the current controller. Afterwards the resulting voltage is limited with a saturation block. Therefore I am using the “external saturation” setting in the current controller and subtract the emf before connected that to the u* input of the PI controller. All this is according to the documentation. However there seems to be a problem that the conditional saturation is triggered even though the output is not saturating. I suspect that this is a numerical error as you can see that “sat(u+emf)-emf” is not equal to “u” but slightly different
When looking under the mask of the PI controller I see that the implementation of the conditional integration is different from the documentation where there is an additional deadzone block for the difference between controller output and saturated signal. When I add this deadzone manually the controller behaves as expected. I tested this with Plecs standalone 4.8 and 4.9 with the same result.
I attached a model which compares the default controller from the library with the modified (with deadzone) controller. In the two scopes in the middle I have plotted the current and also speed to highlight the difference.
Simulation_FEGM_fix.plecs (330.2 KB)