Hi All, having some issues with a PID controller project I'm working on using the simulink PID block.
I've been trying to tune the controller manually, but the behavior I'm seeing from the simulink output does not match both the basic step response graph as well as the PID Tuner app.
simIn = Simulink.SimulationInput("proj1sim");
simIn = setModelParameter(simIn,'StopTime',stoptime);
simIn = setModelParameter(simIn,'TimeStep',timestep);
denom = [J*L R*J+b*L b*R+K^2];
out = sim("proj1sim.slx");
controller = out.controller;
title('Controller Output');
The main problem I'm seeing is that when I put any value other than zero for the derivative gain, the system completely breaks down.
As shown in the images, when I use the values given by PID Tuner, the graph makes no sense. But when I sed Kd to zero and change nothing else, it sort of works suddenly.
PID tuner:
Output with PID tuner Values:
Output with Kd=0:
Simulink Model:
Any help would be grealty appreciated.