Fundamentals / Mechanical engineering / Control engineering

Closed-loop poles, damping and performance

Translate a time-domain requirement into acceptable poles and find when additional gain destabilises a higher-order plant.

From first principles

Connect characteristic roots to decay and oscillation

Near an equilibrium, many closed-loop positioning stages reduce to a constant-coefficient second-order equation. Consider the free response after the reference has become constant. Let \(x\) be deviation from its final value, \(\omega_n>0\) the natural frequency and \(\zeta\) the dimensionless damping ratio. Try an exponential response because time derivatives of an exponential reproduce the same waveform.

\[\ddot x+2\zeta\omega_n\dot x+\omega_n^2x=0,\]
\[x=e^{st}\ \Longrightarrow\ s^2+2\zeta\omega_n s+\omega_n^2=0 .\]

For \(0<\zeta<1\) solving the quadratic produces conjugate roots. Their real part sets the exponential decay rate and their imaginary part sets the observed angular oscillation frequency.

\[s_{1,2}=-\zeta\omega_n\pm i\omega_n\sqrt{1-\zeta^2},\]
\[x=e^{-\zeta\omega_nt}(A\cos\omega_dt+B\sin\omega_dt).\]

Here \(\omega_d=\omega_n\sqrt{1-\zeta^2}\) and the initial displacement and velocity set \(A,B\). A measured period gives \(\omega_d\) while the decaying peak envelope gives \(\zeta\omega_n\). Stable poles describe decay of free modes. The numerator of a forced response also influences how prominently each mode appears.

Derivation and applications

Separate a cubic stability boundary from oscillation frequency

Feedback gain can move an oscillatory pair across the imaginary axis even with every characteristic coefficient positive. Take a continuous linear unity-feedback loop whose open-loop transfer is \(K/[s(s+a)(s+b)]\) with positive \(a,b,K\). The integral mode can represent a position obtained from velocity; the other poles can represent actuator and measurement dynamics. Add unity to the loop transfer and clear its denominator to obtain the closed-loop polynomial.

\[p(s)=s^3+(a+b)s^2+ab\,s+K .\]

A marginal oscillation has \(s=i\omega\) with real nonzero \(\omega\). Separate the real and imaginary parts. The imaginary equation sets the frequency without requiring the gain, while the real equation selects the gain that supports it.

\[K-(a+b)\omega^2=0,\]
\[\omega(ab-\omega^2)=0,\]
\[K_{\rm crit}=ab(a+b).\]

At this gain the cubic factors exactly into a real stable pole and a pair of purely imaginary roots. The cubic Routh first column determines which side of the boundary is stable. Its first two entries are positive, making the sign of the third entry decisive for positive gain.

\[p_{\rm crit}(s)=(s+a+b)(s^2+ab),\qquad \text{first column: }1,\ a+b,\ ab-\frac{K}{a+b},\ K .\]

Below the threshold all entries have the same sign. Above it there are two sign changes and therefore two right-half-plane roots. The model treats actuator authority as unlimited and omits nonlinear friction; a finite observed oscillation amplitude requires additional physics beyond the pole crossing.

Worked example

Predict the onset period of a positioning loop

Set \(a=2.00\) s⁻¹ and \(b=8.00\) s⁻¹. Marginal gain is \(K_{\rm crit}=160\) s⁻³. The oscillation has frequency \(4.00\) rad/s, hence period \(2\pi/4.00=1.57\) s. At \(K=120\) s⁻³ the third entry is \(16-12=4.00\), giving stability. At \(K=180\) s⁻³ it is \(-2.00\) and the pair grows.

Change the inputs and inspect this calculation below

Second application

Recover the two lag rates from a marginal test

Another loop reaches marginality at \(K=60.0\) s⁻³ with a measured oscillation of \(\sqrt{10}\) rad/s. The rates have product \(ab=10.0\) s⁻² and sum \(K/(ab)=6.00\) s⁻¹. These observations cannot describe two positive real lag rates because the maximum product at fixed sum is \(6^2/4=9.00\) s⁻². The failed consistency check flags model structure or calibration before attributing a unique time constant to either stage.

Interactive calculation · Change the inputs of this example

Use the adjustable quantities to test the two worked calculations above. The plot recomputes this derivation’s balance or constitutive relation; its numerical readout reports the quantities needed for the forward calculation and the inverse or design question. Keep the fixed assumptions stated in the readout when comparing with the example values.

OneSimulation laboratory

Predict the settling time and offset of a feedback loop

Start from this chapter. Locate the real closed-loop pole for two controller gains. Compare its inverse magnitude with the time constant fitted to the numerical step response.

Compare recorded OneSimulation runs on this page. To test your own inputs, download the notebook and model files and run the model in an activated OneSimulation environment.

The OneSimulation signal graph connects a setpoint, error junction, controller and first-order plant. Start with plant_gain = 2.0 and setpoint = 1.0. Change proportional_gain or time_constant, keeping the other parameters fixed. Before comparing, decide which change affects the asymptotic error.

Numerically fitted time constant and tracking error sampled after six closed-loop time constants. The unit step starts from rest.
Controller gain and plant time constantFitted time (s)Sampled error
Gain 4 · plant 20 s2.222220.11331
Gain 2 · plant 20 s4.000000.20198
Gain 4 · plant 40 s4.444440.11331
Reducing proportional gain slows the loop. Doubling the plant time constant with gain fixed doubles the fitted closed-loop time while leaving the error at six closed-loop time constants almost unchanged.
Reducing proportional gain slows the loop. Doubling the plant time constant with gain fixed doubles the fitted closed-loop time while leaving the error at six closed-loop time constants almost unchanged.

Try \(K_p=9.5\) in the download. Compare the recorded final error against \(e_\infty=0.05\). To explain the difference, evaluate the exponential at the actual last sample time. Inspect the signal graph and its time histories.

Download experiment files (ZIP) Extract the files together and open first_order_plant_p_control.ipynb in a local OneSimulation environment.

Interactive reference for the OneSimulation laboratory

Change gain and plant lag independently. The browser evaluates the unsaturated analytical reference for the linked OneSimulation signal graph.

Problem sheet 2 · Identify a controller from a finite-time observation

Read the model setup and preparatory problems

Relate polynomial coefficients to observed motion

For a normalised second-order system, the free response satisfies \(\ddot y+2\zeta\omega_n\dot y+\omega_n^2y=0\). Substitution of \(e^{st}\) gives

\[s=-\zeta\omega_n\pm\omega_n\sqrt{\zeta^2-1}.\]

The real part sets the decay rate. For \(0<\zeta<1\), the imaginary part \(\omega_d=\omega_n\sqrt{1-\zeta^2}\) sets the time between successive extrema. Doubling \(\omega_n\) at fixed \(\zeta\) halves all characteristic times but leaves the fraction of overshoot unchanged.

Assume a unit DC gain, a constant numerator and zero initial displacement and velocity. The step response is

\[y=1-e^{-\zeta\omega_n t}[\cos(\omega_dt)+(\zeta\omega_n/\omega_d)\sin(\omega_dt)].\]

Differentiate the bracket together with its envelope. The cosine terms cancel and the remaining derivative is proportional to \(e^{-\zeta\omega_n t}\sin(\omega_dt)\). The first peak occurs at \(t_p=\pi/\omega_d\). Substituting that time gives the fractional overshoot

\[M_p=\exp\!\left(-\frac{\pi\zeta}{\sqrt{1-\zeta^2}}\right).\]

Design for a specified peak

Suppose a positioning axis may overshoot a 10 mm command by at most 1 mm. Solving the previous expression for the limiting damping ratio gives

\[\zeta=-\ln M_p/\sqrt{\pi^2+(\ln M_p)^2}=0.591.\]

At \(\omega_n=5\) rad/s the corresponding poles are approximately \(-2.96\pm4.03i\) per second and the first peak occurs at 0.779 s. A nominal oscillatory second-order system with this damping just meets the 1 mm bound. A zero near the dominant poles, a saturated drive or another slow pole changes the transient, so the result should be checked against the full model after the poles are chosen.

A settling specification differs from a peak specification. The absolute normalised error stays below the envelope \(e^{-\zeta\omega_n t}/\sqrt{1-\zeta^2}\). To guarantee a 2% settling band using this bound, solve \(t\ge-\ln[0.02\sqrt{1-\zeta^2}]/(\zeta\omega_n)\). This conservative time for the example is about 1.40 s. The commonly used \(4/(\zeta\omega_n)\) is a convenient estimate. The envelope bound spells out both the tolerance and its assumptions.

Follow a gain change on a third-order plant

A plant with two lags and an integrator has open-loop transfer \(K/[s(s+1)(s+2)]\) in units normalised to a common time base. Close unity negative feedback. The characteristic polynomial is \(s^3+3s^2+2s+K\). Its coefficients are all positive for \(K>0\), which rules out positive real roots but allows an unstable complex pair. Form the first column of the Routh array: \(1,\ 3,\ (6-K)/3,\ K\). All entries must have the same sign for strict stability. Thus \(0<K<6\).

At \(K=6\) the polynomial factors as \((s+3)(s^2+2)\). The step excites an undamped pair at angular frequency \(\sqrt2\), alongside a decaying component. At \(K=7\) the first-column signs change twice, so two roots have crossed into the right half-plane. The input-output gain alone did not reveal this upper bound. Additional lags allow feedback to arrive out of phase with motion. Chapter 4 reaches the same type of conclusion by examining sine-wave responses, which can often be measured even when coefficients of a polynomial are poorly known.

Find the effect of a finite closed-loop zero

Pole locations specify the available exponential terms of a causal linear response. Their coefficients depend on the numerator and initial condition. To isolate this distinction, choose two positive times \(\tau_1\ne\tau_2\) and a transfer function \(G(s)=(1+T_zs)/[(1+\tau_1s)(1+\tau_2s)]\). It has unit static gain for every \(T_z\), so changing the numerator neither moves the poles nor changes the final unit-step response. For zero initial state and a unit step \(Y(s)=G(s)/s\). Write \(Y=1/s+A/(s+1/\tau_1)+B/(s+1/\tau_2)\).

The initial value \(y(0^+)=0\) gives \(A+B=-1\). The initial-slope theorem gives

\[\dot y(0^+)=\lim_{s\to\infty}sG(s)=T_z/(\tau_1\tau_2);\]

equivalently \(-A/\tau_1-B/\tau_2=T_z/(\tau_1\tau_2)\). Solving and transforming back gives

\[y(t)=1-\frac{\tau_1-T_z}{\tau_1-\tau_2}e^{-t/\tau_1}+\frac{\tau_2-T_z}{\tau_1-\tau_2}e^{-t/\tau_2}.\]

For \(T_z=\tau_1\) one mode has zero coefficient in this particular input–output map. A physical internal state with that mode can still respond to a nonzero initial condition or another input. With \(T_z<0\) the zero lies in the right half-plane and the initial output slope opposes the eventual response. That inverse response can be a serious limitation when interpreting an early excursion as a sign error in the actuator.

Time the undershoot of two competing actuator paths

Consider an actuator that changes a measured quantity through a slow positive effect and an immediate faster opposing effect. Let \(\tau_1=4\) s, \(\tau_2=1\) s and \(T_z=-2\) s. The poles are both stable, and the output approaches one under a unit command. Yet the response is

\[y=1-2e^{-t/4}+e^{-t},\]

with initial slope \(-0.50\,\mathrm{s^{-1}}\). Set \(\dot y=0.5e^{-t/4}-e^{-t}=0\). It follows that \(e^{-3t/4}=0.5\), so the minimum occurs after \(t=4\ln2/3=0.924\,\mathrm s\). Its value is

\[1-2(0.794)+0.397=-0.191.\]

For a 10 mm final position change this model briefly produces about 1.91 mm motion in the wrong direction. A physical travel limit 1.0 mm behind the starting point would therefore be violated even though the real parts of both poles meet a settling-time target. Compare instead \(T_z=0\) with identical poles and DC gain: the initial slope vanishes and the response rises monotonically. Before changing controller gain to correct an observed undershoot, measure which pathway acts first. Inverting the right-half-plane zero with a causal stable feedforward filter is impossible, since exact inversion would introduce an unstable pole.

For this response the first crossing back through the initial position is later than the minimum. Let \(u=e^{-t/4}\); solving \(1-2u+u^4=0\) gives the trivial root \(u=1\) at release and a further root near 0.544. Thus the measured position remains on the wrong side for about \(-4\ln(0.544)=2.44\) s. A simple diagnostic that samples only once after two seconds would label the overall gain as negative. At one minute the same test reads nearly the full positive change. Recording the full waveform distinguishes an initial inverse response from an overall sensor polarity error. A disturbance entering the two paths at a different location can exhibit yet another zero, which is why a zero should always be quoted for a specified input and output.

OneSimulation · Which path is responsible for the initial undershoot?

Two stable first-order actuators contribute to the same output. Give the slow path gain \(+2\) and a two-second time constant, the fast path gain \(-1\) and a quarter-second time constant. Both start at rest and receive the same unit step. Predict the direction of the first and last movements from the initial slope and final value.

\[y(t)=1-2e^{-t/2}+e^{-4t},\]
\[\dot y(0)=1-4=-3~\mathrm{s}^{-1},\]
\[y(\infty)=1.\]

Integrate the two state equations using the fourth-order OneSimulation time stepper and compare every sample with the exponential solution. The grid minimum is −0.436 at 0.40 s. The component curves identify the mechanism. Initially the negative path builds up fastest; once it has nearly settled the slow positive path continues to grow. Vary the two time constants while keeping their gains fixed to see when the initial slope changes sign.

"""A positive step drives two stable paths with opposite output signs."""
import matplotlib.pyplot as plt
import numpy as np
from onesim.numerics.time.methods.backends.fixed_step import FixedStepRungeKutta

tau = np.array([2., 0.25])  # seconds, slow and fast paths
weights = np.array([2., -1.])
solver = FixedStepRungeKutta("rk4")
run = solver.integrate(lambda t, x: (1-x)/tau, np.zeros(2), 0., 8., step=0.02)
t = run.times
terms = run.states * weights
output = terms.sum(axis=1)
reference = (1-np.exp(-t[:, None]/tau)) @ weights
assert np.max(abs(output-reference)) < 1e-6
index = np.argmin(output)
print(f"First minimum on the grid: {output[index]:.3f} at {t[index]:.2f} s")

fig, ax = plt.subplots(figsize=(7, 4), constrained_layout=True)
ax.plot(t, terms[:, 0], "--", color="#51809c", label="Slow path")
ax.plot(t, terms[:, 1], ":", color="#a5442e", label="Fast path")
ax.plot(t, output, color="#19596a", label="Measured sum")
ax.axhline(0, color="0.5", linewidth=0.7)
ax.set(xlabel="Time after unit step (s)", ylabel="Normalised output")
ax.legend()
fig.savefig("control-engineering.png", dpi=170)
Slow positive and fast negative step responses sum to a signal that initially falls, then crosses zero and approaches one.
The ability to plot both internal states separates an inverse response caused by competing paths from a sign mistake in the output sensor.

Download the Python example

Change the inputs of this exact example and compare the recalculated curves with the recorded OneSimulation output above. The browser evaluates the stated analytical or modal reference.

Assign the poles of a spring-mounted positioning stage with PID

A positioning loop can measure displacement, accumulate position error and damp measured motion. Let a stage of mass \(m\), viscous damping \(c\) and return spring \(k\) obey \(m\ddot y+c\dot y+ky=u+d\), with actuator force \(u\) and disturbance force \(d\). The controller uses \(e=r-y\), \(\dot z=e\), and \(u=K_pe+K_iz-K_d\dot y\). Differentiating the measured position supplies damping without turning a step in commanded position into an impulsive force command.

To find the natural motion, set \(r=d=0\) and substitute \(u=-K_py+K_iz-K_d\dot y\). Move the feedback terms to the left and differentiate once to eliminate \(z\), using \(\dot z=-y\). The resulting characteristic polynomial is

\[m s^3+(c+K_d)s^2+(k+K_p)s+K_i.\]

The derivative gain adds viscous damping, the proportional gain adds stiffness, and closing an integral loop adds a state. At any stable equilibrium with a constant reference, \(\dot z=0\) requires \(y=r\). The integrator can then supply whatever constant force the spring and disturbance require, within actuator limits. The transient still depends on how the reference enters the controller.

Take \(m=2.0\,\mathrm{kg}\),

\[c=3.0\,\mathrm{N\,s\,m^{-1}},\]
\[k=5.0\,\mathrm{N\,m^{-1}}.\]

Suppose the desired poles are \(-2,-3,-4\,\mathrm{s^{-1}}\). Multiplying the three factors gives the desired polynomial \(2(s+2)(s+3)(s+4)=2s^3+18s^2+52s+48\). Comparing coefficients produces \(K_d=15\,\mathrm{N\,s\,m^{-1}}\),

\[K_p=47\,\mathrm{N\,m^{-1}},\]
\[K_i=48\,\mathrm{N\,m^{-1}s^{-1}}.\]

For a 20 mm command from rest the initial proportional force is \(0.940\,\mathrm N\). At the final resting position with \(d=0\), the spring needs \(0.100\,\mathrm N\). \(K_i z\) supplies it and the proportional contribution is zero. A filtered derivative introduces an additional pole, so this ideal coefficient match must be checked again against the implemented controller bandwidth.

Practise on sheet 2 · Assign a repeated pole and check a holding-force constraint. Further reading · MIT · 16.06 Principles of Automatic Control · Lecture 10, PID Control.

Settle a tracking step without hiding its peak

Apply a unit step to a unity-DC second-order transfer function with no zeros. Keep natural frequency fixed. The first maximum occurs when \(\omega_d t=\pi\); use the waveform both to check the overshoot formula and to see how late oscillations affect a settling band.

Settle a tracking step without hiding its peak. Horizontal axis: Time × natural frequency. Vertical axis: Output / command. Data follow the figure.
At ζ = 0.55 the first overshoot is about 12.6%. A design with a smaller damping ratio may cross the command sooner while taking much longer to stay within a narrow tolerance.
Read values from the plot
Output / command at selected values of Time × natural frequency.
Time × natural frequencyDamping ratio 0.25Damping ratio 0.55Damping ratio 0.8
0000
31.43061.07940.90282
60.827721.01241.0122
91.06210.993251.0003
120.981371.00160.99989

Download all 361 plotted samples (CSV)

Interactive calculation · change the inputs of this example

Move through critical damping and compare overshoot, peak time and the duration of the tail.

The curves below are recalculated from this section’s equations in your browser. The fixed reference plot above remains available for comparison.