It's because the PID block in Simulink implements a PID controller in this form:
where a first-order transfer function filters the derivative action.
The continuous-time PID Formula is given by
where
. If you manually construct the PID action with the pure derivative term
using the Derivative block where the derivative term is approximated using the numerical difference method, then it is obvious that both will give different responses. It is important to note that the pure derivative term
exists in math only and it cannot be physically realizable. Even if the Derivative block is used, it is, in fact, just an approximation. Moreover, when there is an abrupt change in the setpoint, it would cause a sudden spike in the output of the controller. To circumvent this issue, the first-order filter is introduced:
.Reading your description the second time, if your 2nd-order system is linear, and it is assumed that the derivative state
can be measured and noise-free, then you can still implement the manually designed PID controller using the rate feedback approach. The second output port 'dx' can be connected to the Gain block
on the feedback loop. The response should give the same result as predicted by the closed-loop transfer function that uses the pure PID form: