Advanced maths

Linear state feedback and observer pole placement calculator

Assign an exact characteristic polynomial to a controllable single-input state model, or design its dual single-output observer.

Your numbers

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Behind the numbers

How this calculation works

Assign an exact characteristic polynomial to a controllable single-input state model, or design its dual single-output observer.

THE FORMULAK=e_nᵀ W⁻¹ φ(A), W=[B,AB,…,Aⁿ⁻¹B]; observer L=K_dualᵀ.

A worked example

For A=[[0,1],[0,0]], B=[[0],[1]] and desired polynomial s²+3s+2, K=[2,3]. The closed-loop matrix [[0,1],[-2,-3]] has poles −1 and −2.

Good to know

Initial release: rational real A with 2–6 states and one input (feedback) or one measured output (observer). Desired monic real characteristic polynomial allows repeated and complex-conjugate roots without promising a robust multi-input optimizer. Exact controllability/observability rank and substitution certificate; explain conditioning and no actuator constraints.

What pole placement actually chooses

Pole placement chooses coefficients of a linear feedback law so the closed-loop state matrix has a specified characteristic polynomial. The input is a state-space model, not sampled time-series data. Its entries must already describe the same state order, input convention and time unit. A model measured per second cannot be combined with desired poles interpreted per minute without conversion.

This calculator handles one input in feedback mode and one measured output in observer mode. These dual problems share the same algebra, so they belong together rather than on two nearly identical pages. Multi-input robust pole assignment, input saturation and feedback based on an unavailable state are outside this implementation.

Exact assignment for a double integrator−2−10s² + 3s + 2 = (s + 1)(s + 2)A − BK = [[0, 1], [−2, −3]]
Scroll across to see the full diagram.
Negative feedback K=[2,3] moves the double pole at zero to −1 and −2. The displayed polynomial confirms both targets.

Compare this with the Continuous algebraic Riccati equation calculator for infinite horizon LQR. Assign user-prescribed closed-loop poles and recover feedback or dual observer gains. The existing LQR page optimizes a quadratic cost; it does not assign a requested characteristic polynomial. Keep feedback and observer duality together on one page.

Enter a polynomial rather than a list of roots

For n states enter n+1 descending coefficients, starting with one. The default list 1,3,2 means s²+3s+2. If your desired roots are −1 and −2, multiplying (s+1)(s+2) produces that list. Complex poles in a real model must occur in conjugate pairs, giving real polynomial coefficients; the calculator accepts those coefficients directly.

Repeated roots are permitted algebraically. For example, coefficients 1,2,1 assign a double root at −1. Equal characteristic polynomials do not imply equal transient behavior: a repeated eigenvalue may have a nontrivial Jordan block. Inspect the closed-loop matrix and consider robustness separately, especially when high degree or large gains amplify rounding in a physical implementation.

Why the controllability test comes first

The controllability matrix W concatenates B, AB and successive powers through Aⁿ⁻¹B. Full rank means the single input can influence every state direction over time. A deficient W prevents arbitrary assignment of all n poles. Rather than invert a singular matrix and produce misleading gains, the calculator rejects the requested full-state assignment.

In observer mode the corresponding test applies to the dual pair Aᵀ,Cᵀ. Full rank of its controllability matrix is equivalent to observability of the original model. This is a structural test, not a sensor-noise assessment. An observable model may still be numerically difficult to estimate when the measurements carry very little information about a particular state direction.

Follow Ackermann’s construction

The exact computation first builds W and solves Wᵀr=e_n to obtain the last row of W⁻¹ without explicitly forming every inverse entry. It then evaluates the requested monic matrix polynomial φ(A) and multiplies rᵀφ(A). The resulting row K uses the convention u=−Kx, which makes the closed-loop matrix A−BK.

The sign convention matters when copying a gain to another program. Software that writes u=Fx expects F=−K. Observer mode returns a column L used in xhatdot=Axhat+Bu+L(y−Cxhat). Its error dynamics are A−LC, not A+LC. The interface returns the gain and the appropriate closed-loop matrix so this distinction can be checked directly.

Check the double-integrator example

For the default double integrator, W=[B,AB]=[[0,1],[1,0]], which is invertible. The desired polynomial is s²+3s+2, and A² is the zero matrix. Thus φ(A)=3A+2I. Multiplying the last row of W⁻¹ gives K=[2,3], so the position and velocity coefficients are both positive under negative feedback.

Substitution gives A−BK=[[0,1],[-2,-3]]. Its characteristic determinant is s(s+3)+2=s²+3s+2, exactly as requested. This substitution is more informative than merely printing two negative eigenvalues. It verifies every polynomial coefficient and also exposes an accidental state-order swap or feedback-sign reversal.

Read the certificate and the limits

The calculator uses bounded rational arithmetic for the entered integers, decimal fractions and rational fractions. It reconstructs the closed-loop characteristic polynomial and compares its coefficients exactly with the requested list. This certifies the algebra within the entered model; it does not certify an approximate measured model or a floating-point controller deployed elsewhere.

Exact fractions can grow rapidly, and the arithmetic has a size limit. Large intermediate numerators may therefore produce a resource error even when the underlying problem has a solution. Rescale state variables or simplify fractions, then check whether the resulting gains are physically reasonable. Very large gains often signal sensitivity that exact symbolic agreement alone cannot reveal.

Choose targets with the application in mind

For a continuous-time model, roots strictly in the left half-plane give asymptotic stability of the exact closed-loop linear model. Choosing roots farther left generally seeks faster response, but it may demand more control effort and amplify noise. Pole placement imposes no penalty on effort, whereas an LQR design balances state deviation against an explicit input cost.

A successful assignment should therefore be followed by a trajectory and actuator review using realistic initial conditions, disturbances and parameter uncertainty. Observer poles also need a noise trade-off; making estimation arbitrarily fast is not automatically beneficial. The calculation is a transparent linear-algebra step in that process, not a complete controller safety assessment.

A few questions, answered

Can I enter two inputs?

This implementation supports one feedback input or one observer output. Multi-input assignment requires a different gain-selection algorithm and is not inferred from a wide B matrix.

Are repeated poles rejected?

No. A repeated-root monic polynomial is supported when the pair is controllable or observable. Repeated roots may still be sensitive and can create Jordan-block transients.

Why does observer mode need a row B field?

The field represents C in observer mode. Enter the measured-output row; the calculation uses Aᵀ,Cᵀ and transposes the resulting feedback gain.

Does a correct gain prove my controller is robust?

No. The certificate verifies the entered exact model and polynomial. Model uncertainty, sampling, actuator limits, noise and numerical implementation need separate checks.

Find your calculator

Start typing to explore the library.