How this calculation works
Compute the continuous-time H2 norm and squared impulse energy from a stable strictly proper state-space model.
AP+PAᵀ+BBᵀ=0; AᵀQ+QA+CᵀC=0; ||G||₂²=tr(CPCᵀ)=tr(BᵀQB).A worked example
A=diag(−1,−2), B=(1,1)ᵀ, C=(1,1) has impulse response e^(−t)+e^(−2t), energy 17/12 and H2 norm≈1.1902380714.
Good to know
State order 1–4, one or two inputs and outputs, compatible real matrices. Strictly stable state matrix and identically zero feedthrough; Lyapunov residual and dual-trace agreement checks. No unstable, nonzero-feedthrough or discrete-time H2 calculation.
Reference: MathWorks: norms of linear systems (opens in a new tab) ↗
Energy rather than the largest gain
The H2 norm summarizes the integrated squared impulse response of a stable continuous-time linear system. In a multi-input multi-output model, the integrand uses the squared Frobenius norm of the impulse-response matrix. This is a total energy measure rather than a maximum over frequencies.
The H-infinity norm asks for a worst frequency-response gain and can rank systems differently. A narrow high peak and a broad lower response need not have the same integrated energy. This page keeps those objectives separate instead of labeling both as a generic system norm.
Compare this with the SISO H infinity norm calculator for a stable rational transfer function. Compute integrated squared impulse-response energy, not the maximum frequency-response magnitude.
The state-space model being entered
The model has state derivative A x plus B u and output C x. There is no direct feedthrough term in this interface: it is identically zero by definition. Compatible matrices must share the declared state dimension, with one or two input and output channels.
For continuous time, nonzero direct feedthrough produces an impulse at time zero and generally an infinite H2 norm under this convention. Omitting a known physical feedthrough would therefore change the model, not repair that infinity. Use this calculator only when the strictly proper assumption actually applies.
The two-decay example
The default diagonal state matrix has decay rates minus one and minus two. With both input and output vectors equal to one-one, the scalar impulse response is exp minus t plus exp minus two t. Squaring it gives three ordinary exponential terms.
Their integrals are one-half, two-thirds and one-quarter, totaling seventeen-twelfths. Taking the square root gives approximately 1.1902380714. This elementary time-domain calculation independently verifies the Gramian-based output and clarifies why the squared-energy field differs from the norm itself.
Solving two Lyapunov equations
The reachability Gramian solves a continuous Lyapunov equation driven by B B transpose. The observability Gramian solves its dual equation driven by C transpose C. Small dense linear systems are formed by vectorizing each matrix equation and solved with numerical pivot checks.
Two trace formulas then compute the same energy from opposite perspectives. Their agreement is a certificate of internal consistency, accompanied by the residual of each original Lyapunov equation. A finite solve alone would not justify the result if its matrix residual remained large.
Checking stability independently
A Lyapunov equation can have a finite algebraic solution even for an unstable state matrix. The implementation therefore does not infer stability merely from successful elimination. It also checks a positive-definite solution for an identity-driven Lyapunov equation under the stated strict-stability theorem.
The positivity test includes a numerical conditioning margin. A model with eigenvalues extremely close to the imaginary axis may be rejected as unresolved rather than assigned a huge fragile energy. An unstable realization is outside this page's domain even if an input-output cancellation could hide one state.
Interpreting a multi-channel result
For several inputs and outputs, the total energy sums the squared impulse responses across channel pairs. It is not the energy from applying all unit impulses simultaneously and coherently to one combined input, which would introduce cross-channel terms under a different experiment.
Coordinate similarity transformations of a well-conditioned state realization should preserve the norm. Individual Gramian entries can change substantially under such a transformation, so compare the invariant trace rather than expecting equal matrix elements. Units depend on the input-output scaling and time convention of the model.
Checks before using the norm
Verify matrix dimensions, continuous-time units and the absence of feedthrough before comparing against another package. A discretized model needs the discrete-time Gramian equations and has a different sampling convention. Entering its transition matrix as a continuous A matrix would not compute the intended norm.
Use the residuals and dual trace to inspect numerical quality, then validate a representative impulse response if the result drives a design decision. The calculator does not estimate model uncertainty or guarantee physical performance. Its output applies to the finite stable linear model and channel scaling you supplied.
A few questions, answered
Is the norm the same as impulse energy?
The squared H2 norm is the integrated squared impulse energy; the norm itself is its square root.
Can I enter direct feedthrough?
No. This model sets it identically to zero; nonzero continuous-time feedthrough generally makes this norm infinite.
Does the model need to be minimal?
No. Stable nonminimal states are allowed, but the entered state matrix must still pass strict stability checks.
Can I use a discrete transition matrix?
No. Discrete-time H2 uses different Gramian equations and sampling conventions.