I am triying to fit a NLARX model using MATLAB 2024a but for some reason the fit is poor, but I have used the same code with MATLAB 2023b and the fit is good.
조회 수: 5 (최근 30일)
이전 댓글 표시
I am using the LM estimation method and the estimation dataset is the same. The only difference is that for the MATLAB 2024 the fitting is very bad, but for MATLAB 2023b it is okay. It is very strange. I have test also the same code in differnet computers and the behavior is the same. The erros seems to happen in the 2024a version of the nlarx function.
What can I do ?
답변 (1개)
Animesh
2024년 8월 29일
In MATLAB R2024a release, the linear model specified in the Nonlinear ARX model is preserved as-is during the model coefficient initialization stage. In contrast, previous releases modified the specified linear model beforehand to minimize the 1-step prediction errors.
In this situation, the provided linear model does not offer a good initial guess for the linear component of the Nonlinear ARX model. It worked in previous releases because the linear model was adjusted beforehand. Allowing the algorithm to select a better linear model can improve its quality.
Here’s something you can try:
Instead of using the linear model ("linsys_d"), use an ARX-order matrix that matches its order:
na = eye(2) * 4;
nb = ones(2, 10) * 4;
nk = ones(2, 10);
Order = [na nb nk];
Net = nlarx(data.tData, Order, NonlinearFcn, nlarxopt);
This approach gives the NLARX algorithm full freedom to choose the coefficients of the linear component (`Net.OutputFcn(i).LinearFcn` for `i=1,2`).
This is also how the MATLAB R2023a version operates. The specified linear model is not retained as the starting point for simulation-error minimization; instead, it is modified beforehand to provide the optimizer with a good starting point.
Hope this resolves your query.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Nonlinear ARX Models에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!