Effacer les filtres
Effacer les filtres

How to efficiently pass and read parameters using the system identification toolbox?

6 vues (au cours des 30 derniers jours)
I have been working on estimating friction parameters for a system and this question is about cubic friction, beta1*v + beta2*v^3, and piecewise linear friction [see attachment "frictionExample" and "parameters"].
When estimating the model parameters the sec/iteration goes from ~50 for the cubic friction model with 3 parameters to ~300 for the piecewise-linear model with 11 friction parameters. Looking at the profile, it seems like reading/writing the variables takes a significant amount of time [see attachment "profile"].
While playing around with the model and the "sim" function, I found that by adding a simple reassignment of the model argument [see attachment "simulationExmaple"] I could reduce the simulation time from ~100 sec to ~4 sec. This makes me think that I have some memory problems. However, I have not been able to test this out on the "nlgrest" function.
Have any of you experienced something similar?

Réponses (1)

Debadipto le 1 Fév 2024
It is hard to say for sure if the improvement in computational efficiency is due to an underlying memory issue without looking further into the model itself.
However, if you are looking for ways to optimize parameter estimation with the greybox modeling tool (as you mention the "nlgrest" function, which I'm assuming to be "nlgreyest"), then you can try the following strategies:
  1. Converting the physical model into a MEX file can significantly speed up simulations that are called repeatedly during parameter estimation.
  2. You can modify the GradientOptions to choose a less computationally intensive differencing scheme while trading off for accuracy.
Refer to the following MATLAB answer for more information and other related strategies:


En savoir plus sur Linear Model Identification dans Help Center et File Exchange




Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by