Can we control the maximum iterations and tolerance when calling 'arx'?
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
MathWorks Support Team
le 8 Mai 2023
Réponse apportée : MathWorks Support Team
le 11 Mai 2023
When using the command 'arx', what are the default values for "maximum number of iterations" and "tolerance"? How do we change the values of these settings to improve the fit?
Réponse acceptée
MathWorks Support Team
le 8 Mai 2023
The "arx" function uses a non-iterative (linear least squares) solution approach. Hence numerical search-related options such as "Maximum iterations" and "Tolerance" do not apply to it.
In order to iteratively improve the results of an "arx" model, you can use the "polyest" or "pem" commands, along with the option-set created using the "polyestOptions" command, as demonstrated in the examples below:
Example 1 (Cold Start): Use an iterative approach to determine "arx" coefficients
na = 2;
nb = 2;
nk = 1;
nc = 0;
nd = 0;
nf = 0;
opt = polyestOptions;
opt.SearchOptions.MaxIterations = 100;
opt.Display = 'on';
model = polyest(data, [na nb nc nd nf nk], opt)
Note that nc=nd=nf=0 so that the resulting model has "arx" structure.
Example 2 (Warm Start): Run an iterative minimizer on the results obtained by "arx"
model1 = arx(data, [na nb nk]);
opt = polyestOptions;
opt.SearchMethod = 'lm';
opt.SearchOptions.MaxIterations = 100;
model2 = polyest(data, model1, opt);
Note that if the model obtained by using the "arx" command is not good, it is unlikely that the use of an iterative minimizer (as shown in the examples above) would make a significant difference. In this case, it is suggested to try other model structures such as "armax" or "oe".
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Nonlinear ARX Models 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!