# Can I remove my step response overshoot?

I am working on a balance controller for a robot. I found the open loop transfer function between the motor voltage and robot pitch angle:

G1 =

-589300 s^4 - 7.71e08 s^3 - 1.435e11 s^2 - 2.566e12 s - 7.683e09
--------------------------------------------------------------------------------------------------
s^7 + 2418 s^6 + 1.317e06 s^5 + 1.977e08 s^4 + 1.312e10 s^3 + 1.796e11 s^2 - 9.658e11 s - 1.525e13

The system has the open loop bode plot and nyquist plot:-

This system has one RHP pole and no RHP zeroes, so it is an unstable system (beucase there are no encirclements of -1). To fix stability while also enhancing the performance I added the following terms to my balance controller.

1. A negative proportional gain: $$\K_p = -1 \$$
2. A post integrator: $$\G_{ip} = \frac{0.05s + 1}{0.05s} \$$
3. An integrator: $$\ G_i\frac{0.5s + 1}{0.5s}\$$
4. A lead term in the forward branch: $$\G_d = \frac{0.06086s + 1}{0.01826s + 1} \$$

After adding these to my controller, the entire system is now stable. I plotted the step response with the following code (there is unity feedback):

Gcl = feedback(G1*Kp*Gip*Gi*Gd,1)

The step response has a fast rise time, but about 50% overshoot. The settling time is also fine and there is no oscillations, so I am just looking for a way to remove that overshoot, even if it means a slower system. Is there a way to do that?

## Edit

Playing and reducing the gains gives me these step responses:-

Here is the root locus plot of the original open loop system without my terms:-

## Edit 2

I added a lowpass filter like Andy suggested, and I hope I did it right, by first finding the closed loop transfer function (there is unity feedback): $$\G_{cl}=\frac{G_{ol} \cdot G_{low}}{1+G_{ol}} \$$ and it gives me these step responses for different lowpass filters:-

• OK, instead of altering anything, what if you forcibly slowed down the input step change with a low pass filter (outside the loop)? Try it. Mess with it and understand it. – Andy aka Apr 18 at 17:54
• yes. root locus of plant * Gip * Gi * Gd * Kp. zoom in to show region bounded by +-100 on both axis as well as +-10 also. see if any gain values exist where all poles are to the left of a line described by y=-x; for x<0. if not, a low overshoot solution probably doesn't exist for this combination of controller poles and zeros. tune the zeros of the controller to see if the root locus will take all poles to the left of the above mentioned line for a single gain value. It is difficult to give a ready made solution for such a problem (IMHO). – AJN Apr 18 at 18:09
• @Andyaka I edited the question and added the step responses after I added a lowpass filter to the system. And it seems the overshoots for 1/(s+1) and 1/(0.5s+1) actually disappear! – Carl Apr 18 at 18:17
• root locus that i plotted – AJN Apr 18 at 18:19
• Somewhere between s and 0.5s looks about right then. – Andy aka Apr 18 at 20:34