# 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.

• Why are you using the closed loop transfer function in rlocus()? – fibonatic Jan 22 at 7:34
• I just noticed that you look at the overshoot of the rootlocus plot with a gain of zero, which should yield just the closed loop. However I can't find any documentation about how Matlab calculates the overshoot in rlocus, but it looks like it it is just based on the damping coefficient thus only take into consideration one complex conjugate pole pair. So the overshoot given by rlocus might not hold if there are more than two poles or any zeros. – fibonatic Jan 22 at 14:23
• @fibonatic To see if the poles at the origin went to the calculated location and to see the overshoot in closed loop. I calculated a new pole and zero for the compensator because I noticed that the pole is very far from the dominant poles which I think affects the performance of the controller, but even one pole closer to the desired dominant poles, the performance of the function continues going wrong. – Max Jan 25 at 22:31