A frequently encountered periodic differential equation is of second order, expressible as
where
The above equation for
The above equation can be equivalently expressed as a first order system of differential equations, by defining
to recast the second order differential equation into the form
where
The state transition matrix
and the monodromy matrix
The Floquet-theory based stability analysis of the above equations addresses the determination of characteristic multipliers
The solution
In what follows we illustrate how to perform the stability analysis for the three types of equations based on the characteristic multipliers/exponents.
This is the Example of Fig 3.1 in [3].
Assume the period is
using PeriodicMatrices
# set parameters
a = 1; q = .1; T = pi
ts = [0; τ; T]
ψ(t,ts) = isodd(findfirst(mod(t,T) .< ts)) ? -1 : 1
# setup of A(t)
A = PeriodicSwitchingMatrix([[0. 1.; -a+2*q*ψ(t,ts) 0] for t in ts[1:end-1]], ts[1:end-1], T)
ce = psceig(A)
# stability test
all(real(ce) .< 0)
The computed characteristic exponents are:
julia> ce
2-element Vector{ComplexF64}:
0.041379744661220644 + 1.0im
-0.0413797446612206 + 1.0im
and therefore the solutions are unstable. The computations can be easily extended to several switching points in
For a lossy Meissner equation with
# setup of A(t)
ζ = 0.2
A = PeriodicSwitchingMatrix([[0. 1.; -a+2*q*ψ(t,ts) -2ζ] for t in ts[1:end-1]], ts[1:end-1], T)
ce = psceig(A)
# stability test
all(real(ce) .< 0)
and
julia> ce
2-element Vector{ComplexF64}:
-0.14798307933724503 + 1.0im
-0.252016920662755 + 1.0im
This is the Example of Fig 3.3 in [3]. Assume again the period is
using PeriodicMatrices
# set parameters
a = 1; q = .1; T = pi
ψ(t) = -2*t/pi+1
# setup of A(t)
A = PeriodicFunctionMatrix(t->[0. 1.; -a+2*q*ψ(t) 0], T)
ce = psceig(A)
# stability test
all(real(ce) .< 0)
The computed characteristic exponents are:
julia> ce
2-element Vector{ComplexF64}:
0.031815620244098085 + 1.0im
-0.0318155972239221 + 1.0im
and therefore the solutions are unstable.
Stability can be illustrated with the lossy Hill equation with
# setup of A(t)
ζ = 0.2
A = PeriodicFunctionMatrix(t->[0. 1.; -a+2*q*ψ(t) -2ζ], T)
ce = psceig(A)
# stability test
all(real(ce) .< 0)
and
julia> ce
2-element Vector{ComplexF64}:
-0.17487078757796817 + 1.0im
-0.22513738474355782 + 1.0im
Alternatively, the same computations can be performed with
using PeriodicMatrices
using Symbolics
# set parameters
a = 1; q = .1; T = pi
@variables t
ψ1 = -2*t/pi+1
# setup of A(t)
A = PeriodicSymbolicMatrix([0. 1.; -a+2*q*ψ1 0], T)
ce = psceig(A)
# stability test
all(real(ce) .< 0)
Consider the following periodic matrix of period
which has the characteristic exponents equal to
Using the standard settings to compute the characteristic exponents, one of the resulting characteristic exponents has no one exact digit even by imposing a high relative tolerance for solving the underlying differential equations:
julia> using PeriodicMatrices
julia> A = PeriodicFunctionMatrix(t -> [0 1; -10*cos(t) -24-10*sin(t)],2pi);
julia> ce = psceig(A; reltol = 1.e-10)
2-element Vector{Float64}:
-6.398432404426897
-1.4291292368715818e-13
However, full accuracy can be achieved with the multiple shooting approach by determining the monodromy matrix as a product of, say 500, matrices and computing the characteristic multipliers (i.e., the eigenvalues of the monodromy matrix) using the periodic Schur decomposition:
julia> ce = psceig(A,500; reltol = 1.e-10)
2-element Vector{Float64}:
3.180554681463513e-16
-23.99999999998858
Note that the evaluation of the 500 factors can be done in parallel, in which case a substantial speedup of computations can be achieved.
Satisfactory accuracy can be also achieved using frequency lifting techniques based on the FourierFunctionMatrix representaion of
julia> using PeriodicMatrices, ApproxFun
julia> A = FourierFunctionMatrix(Fun(t -> [0 1; -10*cos(t) -24-10*sin(t)], Fourier(0..2π)));
julia> ce = psceigfr(A,50)
2-element Vector{Float64}:
-24.000000200907923
-3.4668116010166546e-14
Let
A discrete-time periodic matrix
The following examples are taken from [2], to illustrate some unexpected features.
Consider first a discrete-time periodic matrix
In spite of this, the matrix is unstable as can be checked using a PeriodicArray representation of
julia> using PeriodicMatrices
julia> A = PeriodicArray(cat([0 0;2 0],[0 2;0 0], dims=3),2);
julia> pseig(A)
2-element Vector{Float64}:
4.0
0.0
Consider a discrete-time periodic matrix
In spite of this, the matrix is stable as can be checked using a PeriodicMatrix representation of
julia> using PeriodicMatrices
julia> A = PeriodicMatrix([[2 0;-3.5 0],[2 1;0 0]],2);
julia> pseig(A)
2-element Vector{Float64}:
0.4999999999999999
0.0
The above examples illustrate that there is no direct relation between the eigenvalues of component matrices and stability.
Consider a discrete-time periodic matrix
The matrix has a core characteristic multiplier equal to 1 and therefore can be considered marginally stable. The core characteristic multiplier can be isolated using the shifting of component matrices, which reverts the order of components used to form the monodromy matrix.
julia> using PeriodicMatrices
julia> A = PeriodicMatrix([[ 1 0 ], [ 1; 1]],2);
julia> pseig(A)
2-element Vector{Float64}:
0.9999999999999997
0.0
julia> pseig(pmshift(A,1))
1-element Vector{Float64}:
0.9999999999999997
[1] A. Varga. A Periodic Systems Toolbox for Matlab. Proc. of IFAC 2005 World Congress, Prague, Czech Republic, 2005.
[2] S. Bittanti and P. Colaneri. Periodic Systems - Filtering and Control, Springer Verlag, 2009.
[3] J. A. Richards. Analysis of Periodically Time-Varying Systems, Springer Verlag, 1983.