opinf.post
#
Tools for computing errors of reduced-order model solutions.
Absolute and Relative Error#
Given a norm \(\|\cdot\|\), “true” data \(\Q\), and an approximation \(\breve{\Q}\) to \(\Q\), the absolute and relative errors of the approximation \(\breve{\Q}\) are defined as
In the context of this package, \(\Q\in\RR^{n \times k}\) is typically a matrix whose \(j\)-th column is the true state vector at time \(t_{j}\), and the approximation \(\breve{\Q}\in\RR^{n\times k}\) is the corresponding matrix of reduced-order model solutions.
Projection Error#
The projection error is defined by the low-dimensional representation of the state, not the solution of a reduced-order model per se. For a true state \(\q \in \RR^{n}\), consider the low-dimensional (linear) approximation
where \(\Vr\in\RR^{n\times r}\). The projection error associated with this approximation is
The following function computes this projection error, given a basis matrix \(\Vr\).
Calculate the absolute and relative projection errors induced by projecting states to a low dimensional basis, i.e., |
Basis classes such as opinf.basis.PODBasis
also have a projection_error()
method.
Reduced-order Model Error#
The following functions compute the error between a true state solution \(\q(t) \in \RR^{n}\) of the system of interest and an approximation \(\breve{\q}(t) \in \RR^{n}\) generated by a reduced-order model. Each uses a different norm to measure the absolute and relative errors.
Compute the absolute and relative Frobenius-norm errors between the snapshot sets Qtrue and Qapprox, where Qapprox approximates Qtrue: |
|
Compute the absolute and relative lp-norm errors between the snapshot sets Qtrue and Qapprox, where Qapprox approximates to Qtrue: |
|
Compute the absolute and relative Lp-norm error (with respect to time) between the snapshot sets Qtrue and Qapprox, where Qapprox approximates Qtrue: |