MATLAB Answers

0

Why do I receive incorrect results when I use the Derivative block in Simulink?

I implemented a PID controller using a Derivative block, but the output of the closed-loop system does not match the expected results, which were computed using the closed-loop transfer function.

Products

1 Answer

Answer by MathWorks Support Team on 14 Sep 2009
 Accepted Answer

The Derivative block is not equivalent to the ideal s-domain derivative, i.e. "s". The main reason for this is that a pure derivative is not causal, i.e., it needs to know future inputs to tell its value at the present time. The Derivative block outputs the value (u[t]-u[t-dt])/dt where "dt" is the last time step taken by the ODE solver. When using variable-step solvers, this is only faintly related to "h(s)=s". This is why the simulated results do not match the closed-loop transfer function results.
To work around this issue, implement an approximate derivative via a high-pass filter of the form "s/(1+a*s)", where "a" is small compared to the dominant time constant of the plant. This will not only eliminate time-domain discrepancies, but also ensure that the PID controller can be implemented.
A PID block that uses an approximate derivative is implemented in Simulink and can be found in the Additional Linear section of Simulink Extras library.

  0 Comments

Sign in to comment.