Dynamical system identification - the julian way?

Hello all !

I’m working on a structural dynamics identification topic involving the identification of a model coefficients for frequency response functions (or transfer function if your prefer).

The model is the following
H(\omega) = \sum_{m = 1}^{n_m} \left(\frac{R_m}{\mathrm{i}\omega-\lambda_m}+\frac{\bar R_m}{\mathrm{i}\omega-\bar\lambda_m}\right) - \frac{R_\mathrm{L}}{\omega^2} + R_\mathrm{U}
where H(\omega) \in \mathbb{C}^{n_o\times n_i} contains the values of all input-output pairs at one frequency, R_m \in \mathbb{C}^{n_o\times n_i} are the so-called residuals.

Standard (for structural system identification) strategies exist to tackle this kind of problem, but I was wondering how I could use julia’s qualities especially in terms of the ML ecosystem to identify such a model.

Thanks for any help !

We probably have to wait for someone like @baggepinnen who has an idea what you are talking about;)

My only idea is GitHub - JuliaControl/ControlSystems.jl: A Control Systems Toolbox for Julia could be related.

@goerch @zdenek_hurak , I too saw that @baggepinnen is working on closely related topics. Unfortunately the tfest functionnality in ControlSystemIdentification does not seem to support Multiple Input - Multiple Output (MIMO) systems.

I also found Home · DataDrivenDiffEq.jl, but I don’t think it is applicable to frequency domain data.

The main issue with this kind of problem is that the \lambda_m in the denominators also are to be estimated requiring a nonlinear resolution process.

Do you have frequency domain or time domain data? The function
https://baggepinnen.github.io/ControlSystemIdentification.jl/dev/ss/#ControlSystemIdentification.subspaceid
supports both, and estimates a state-space model which you may later convert to a transfer function using tf(model)

1 Like

I have frequency domain data of a MIMO system as a matrix.

Then I suggest trying subspaceid where you package your data in a frequency-response data object FRD. This functionality is fairly new, and there is not yet a fully worked example in the documentation. The link above leads to the docstring that (if you scroll down a bit) contains the method that works on frequency-domain data. If the documentation is insufficient, I’d be happy to hear what trips you up and I’ll try to improve it. You may also look on how it’s used in the tests

Thanks, I’ll try that ASAP and come back to you with some feedback !
Still I’m wondering if more ML-advertised strategies could be leverage, such as Parameter Estimation and Bayesian Analysis · DifferentialEquations.jl

The model you proposed appears linear in the parameters and I see no reason to use anything complicated to estimate it. In general, frequency-domain methods are significantly less attractive for nonlinear systems since the simple frequency response is then no longer a complete characterization of the system, the frequency response for nonlinear systems will in general depend on both amplitude and history.

The estimation is not linear since the \lambda_m (in the denominators) are also to be estimated.

The parametrization you use is not linear in the parameters, but it represents a linear system for which there are efficient estimation methods. Those methods, (like subpsaceid) estimate the model on another, equivalent form, and you can calculate the parameters in your model from the model that was identified. It requires you to calculate the residues of a rational function, Polynomials.jl contains a function for that.

Yes, it represents a LTI system indeed. I actually use some specialized methods myself (not subspace identification though).
One of the difficulties in my case is that I may work on large MIMO systems which make some resolutions troublesome.
I’m using functionalities in Polynomials or SpecialPolynomials to find the poles of some matrix-valued polynomials, but AFAIK there is no implementation specialized for rational functions.
One other potentially helpful link is GitHub - tomasmckelvey/fsid: FSID is an open source toolbox, implemented in the Python Julia and Matlab programming languages. FSID is a toolbox with scripts which estimates linear multi-input multi-output state-space models from sample data using frequency-domain subspace algorithms. Algorithms which estimate models based on samples of the transfer function matrix as well as frequency domain input and output vectors are provided. The algorithms can be used for discrete-time models, continuous-time models as well as for approximation of rational matrices from samples corresponding to arbitrary points in the complex plane.

Have a look at

and also Home · DescriptorSystems.jl (not estimation, but manipulation and analysis of rational models)

Generally subspace identification requires time domain data. How is it done if frequency domain data is available?

You can use subspace methods in the frequency domain as well, there are several papers investigating this, e.g., by the above reference author Tomas McKelvey

Thanks for the reference.