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

조회 수: 1 (최근 30일)
Hi,
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?

답변 (1개)

Debadipto
Debadipto 2024년 2월 1일
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:

카테고리

Help CenterFile Exchange에서 Linear Model Identification에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by