Simple formulae are derived to tune/design the PI and PID controllers
to meet user-specified gain margin and phase margin. These formulae ar
e particularly useful in the context of adaptive control and auto-tuni
ng, where the controller parameters have to be calculated on-line. The
results in this paper can be used to predict the achievable rise time
of the closed-loop system, which is useful for self-diagnosis-a desir
able feature of 'intelligent' controllers. New insights into the inter
nal model control design for the PID controller are also given.