# \[ANN\] PeriodicMatrices.jl - Handling of periodic time-varying matrices

**URL:** <https://discourse.julialang.org/t/ann-periodicmatrices-jl-handling-of-periodic-time-varying-matrices/124425>\
**Category:** Package Announcements\
**Tags:** package, announcement, diffeq, symbolics, approxfun\
**Created:** [January 4, 2025, 3:32pm UTC](https://discourse.julialang.org/t/ann-periodicmatrices-jl-handling-of-periodic-time-varying-matrices/124425 "2025-01-04T15:32:51Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![andreasvarga](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/andreasvarga/32/11634_2.png) [@andreasvarga](https://discourse.julialang.org/u/andreasvarga)\
**Post date:** [January 4, 2025, 3:32pm UTC](https://discourse.julialang.org/t/ann-periodicmatrices-jl-handling-of-periodic-time-varying-matrices/124425/1 "2025-01-04T15:32:52Z")

</div>

[`PeriodicMatrices.jl`](https://github.com/andreasvarga/PeriodicMatrices.jl) provides the basic tools to handle periodic time-varying matrices. This package is the basis for developing the [`PeriodicMatrixEquations.jl`](https://github.com/andreasvarga/PeriodicMatrixEquations.jl) and [`PeriodicSystems.jl`](https://github.com/andreasvarga/PeriodicSystems.jl) packages.

For a real periodic matrix `A(t)` with period `T`, the dependence of the time variable `t` can be either continuous or discrete.

A continuous-time periodic matrix can be specified in one of the following forms:

- _periodic matrix function_, with `A(t)` a matrix function of the real variable `t ∈ [0, T)`;

- _periodic symbolic matrix_, with `A(t)` a symbolic matrix as defined in the [`Symbolics.jl`](https://github.com/JuliaSymbolics/Symbolics.jl) package depending on the (symbolic) real variable `t ∈ [0, T)`;

- _harmonic matrix series_, with `A(t)` defined as

- _periodic matrix time series with constant dimensions on a uniform time grid_;

- _periodic matrix time series with constant dimensions on a non-uniform time grid_;

- _Fourier matrix series approximation_, with `A(t)` a Fourier series representation (similar to the harmonic matrix series representation) as defined in the [`ApproxFun.jl`](https://github.com/JuliaApproximation/ApproxFun.jl) package.

A discrete-time periodic matrix can be specified in the following forms:

- _periodic matrix time series with time-varying dimensions on a uniform time grid_;

- _periodic matrix time series with time-varying dimensions on a non-uniform time grid_;

- _periodic matrix time series with constant dimensions on a uniform time grid_;

- _periodic matrix time series with constant dimensions on a non-uniform time grid_.

All possible conversions between the above representations are supported.  
The usage of the [`FFTW`](https://github.com/JuliaMath/FFTW.jl), [`Symbolics.jl`](https://github.com/JuliaSymbolics/Symbolics.jl), [`ApproxFun.jl`](https://github.com/JuliaApproximation/ApproxFun.jl) and [`Interpolations`](https://github.com/JuliaMath/Interpolations.jl) packages to implement some conversions is highly acknowledged.

Several operations on periodic matrices are implemented, such as, inversion, transposing, norms, derivative/time-shifting, trace. All operations with two periodic matrices such as addition/substraction, multiplication, horizontal/vertical concatenation, block-diagonal appending, allow different, but commensurate, periods.

Several advanced computational functions are provided to compute the characteristic multipliers and characteristic exponents of periodic matrices, using methods based on the periodic Schur decomposition of matrix products (provided in the [`SLICOT`](https://github.com/SLICOT/SLICOT-Reference/) library or in the [`PeriodicSchurDecompositions.jl`](https://github.com/RalphAS/PeriodicSchurDecompositions.jl) package) or structure exploitung fast algorithms requiring no external supporting packages. These functions are instrumental to apply [Floquet theory](https://en.wikipedia.org/wiki/Floquet_theory) to study the properties of solutions of various classes of differential equations (e.g., Mathieu, Hill, Meissner) and the stability of linear periodic systems (see [`PeriodicSystems.jl`](https://github.com/andreasvarga/PeriodicSystems.jl) package). The implementations of several functions rely on the high performance ODE solvers available in the [`OrdinaryDiffEq`](https://github.com/SciML/OrdinaryDiffEq.jl) and [`IRKGaussLegendre`](https://github.com/SciML/IRKGaussLegendre.jl) packages.

In developing this package I benefitted from the generous support of the Julia developers community, with special mention of @kellertuer, Ralph A. Smith, @ChrisRackauckas, [mikelehu](https://github.com/mikelehu), @mkitti, @dlfivefifty.

I am open to constructive critics and suggestions. I am aware of many possible improvements for this package, addressing issues such as, the reduction of the number of allocations, improvements of the definitions of periodic matrix objects, extension with new periodic matrix representations, better support of large periodic matrices, to mention a few of them.

---

_[View the full topic](https://discourse.julialang.org/t/ann-periodicmatrices-jl-handling-of-periodic-time-varying-matrices/124425)._
