# Design of a lead compensator with root locus in matlab

For the transfer function G(s), I tried to design a lead compensator for the function to have a response to the step with the following specifications: Overshoot= 10%; Ts (2%) = 5s.

When I simulate the function already with the lead compensator by the rlocus () command the system shows the desired behavior. However when I simulate with the step () function the parameters do not match and unfortunately I could not find where the error is.

• After designing the controller, ask yourself does the compensated system behave as an actual second-order system or at least an approximated second-order system or not? If not, then you have no choice other than tuning the controller to meet the requirements. The formula for the overshoot is solely for second-order or an approximated second-order systems. I may come back to double check gains of the controller. – CroCo Jan 22 at 22:02
• @CroCo observing the image of the response to the step the function looks like at least one approximation, I made others calculated for the pole and for zero of the compensator because I noticed that in this compensated function the pole is well away from the calculated dominant poles (-0.8 + 1.091506 j) which I found to have affected the performance of the controller, but even with the pole closest to the dominant poles the performance of the compensated function continues to go wrong. – Max Jan 25 at 22:29