I'm trying to control an electric motor via simulink. I'm measuring the speed through encoder, using the tachimeter block. In most cases it works, as you can see in the picture. Here I'm using a PI controller. I'm running it through "Monitor and Tune" and using discrete transfer functions, with a fixed sampling time.
The problem arises when the input signal is a ramp or when I implement the "PID" block, or in general when I enter some kind of transfer function with the "LTI system" block. Apparently, if I just use the "PI" block, everything works. So there must be some problem with the derivative term (my opinion, but I can be wrong).
Here you can see what happens in these cases. The motor works, it is actually spinning, however simulink doesn't show any output.
Thanks for any help you can provide,