Greetings all,
I am trying to simulate a simple plant by verifying the out of the plant when controlled with a PID controller The plant is 1/s(s+1). I converted it in the z-domain. Then, designed a Gc(z) as
9.15*(z-.9802)/(z-.8187). The closeloop step response of the system gives satisfactory results. But when I run it in simulink with my s-function, I don't get the same results. I tryed looking over every line of my code, but I am not able to the discrepancy.
I'd appreciate your help, thanks in advace.