I am simulating a simple closed loop speed controller for a DC motor in Simulink.
I have a continuous PI controller working just fine.
I have then discretized the continuous controller and implemented it in two different, but equivalent ways, and it seems that the two discrete implementations provide different results, even though they are supposed to be equivalent.
Both discrete controllers are obtained by the same discretization method (Tustin), but one is implemented as a single discrete transfer function, whereas the other is implemented as a sum of the P and I parts individually.
The attached model contains all setup in the InitFcn callback, and illustrates both the continuous controller as well as both of the discrete controllers.
The "Decomposed Discrete Control Structure" tracks the continuous controller reasonably well, whereas the "Discrete Transfer Function Control Structure" has large deviations, and is even unstable for longer sample times. Conversely, the issue is resolved for faster sample times.
Best Answer