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.
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.
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.
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.
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.
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.
| Controller gain and plant time constant | Fitted time (s) | Sampled error |
|---|---|---|
| Gain 4 · plant 20 s | 2.22222 | 0.11331 |
| Gain 2 · plant 20 s | 4.00000 | 0.20198 |
| Gain 4 · plant 40 s | 4.44444 | 0.11331 |

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
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
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
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
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
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
equivalently \(-A/\tau_1-B/\tau_2=T_z/(\tau_1\tau_2)\). Solving and transforming back gives
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
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
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.
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)

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
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}\),
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}}\),
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.

Read values from the plot
| Time × natural frequency | Damping ratio 0.25 | Damping ratio 0.55 | Damping ratio 0.8 |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 3 | 1.4306 | 1.0794 | 0.90282 |
| 6 | 0.82772 | 1.0124 | 1.0122 |
| 9 | 1.0621 | 0.99325 | 1.0003 |
| 12 | 0.98137 | 1.0016 | 0.99989 |
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.