Shifts a square matrix left on the real axis
so that its spectral abscissa (maximum real part of the eigenvalues)
is strictly less than -margin
.
This is useful for ensuring that continuous-time drift matrices
(e.g. in linear SDEs/state-space models) are Hurwitz-stable.
If the matrix already satisfies the margin,
it is returned unchanged.
Value
A numeric matrix of the same dimensions as x
,
shifted if necessary to satisfy the Hurwitz stability constraint.
Details
The projection is performed by subtracting a multiple of the identity: $$x^\star = x - (\alpha + \text{margin}) I,$$ where \(\alpha = \max \Re\{\lambda_i(x)\}\) is the spectral abscissa.
See also
Other Simulation of State Space Models Data Functions:
LinSDE2SSM()
,
LinSDECovEta()
,
LinSDECovY()
,
LinSDEMeanEta()
,
LinSDEMeanY()
,
ProjectToStability()
,
SSMCovEta()
,
SSMCovY()
,
SSMMeanEta()
,
SSMMeanY()
,
SimAlphaN()
,
SimBetaN()
,
SimBetaN2()
,
SimCovDiagN()
,
SimCovN()
,
SimIotaN()
,
SimPhiN()
,
SimPhiN2()
,
SimSSMFixed()
,
SimSSMIVary()
,
SimSSMLinGrowth()
,
SimSSMLinGrowthIVary()
,
SimSSMLinSDEFixed()
,
SimSSMLinSDEIVary()
,
SimSSMOUFixed()
,
SimSSMOUIVary()
,
SimSSMVARFixed()
,
SimSSMVARIVary()
,
SpectralRadius()
,
TestPhi()
,
TestPhiHurwitz()
,
TestStability()
,
TestStationarity()
Examples
# Unstable (spectral abscissa >= 0):
x <- matrix(
data = c(
0.10, -0.40,
0.50, 0.20
),
nrow = 2
)
SpectralAbscissa(x = x) # >= 0
#> [1] 0.15
SpectralAbscissa(x = ProjectToHurwitz(x = x)) # <= -1e-3 (default margin)
#> [1] -0.001
# Already Hurwitz-stable is returned unchanged up to numerics:
x <- matrix(
data = c(
-0.50, -0.20,
1.00, -0.30
),
nrow = 2
)
SpectralAbscissa(x = x) # < 0
#> [1] -0.4
identical(ProjectToHurwitz(x = x), x)
#> [1] TRUE