Can we control the maximum iterations and tolerance when calling 'arx'?
    3 visualizzazioni (ultimi 30 giorni)
  
       Mostra commenti meno recenti
    
    MathWorks Support Team
    
 il 8 Mag 2023
  
    
    
    
    
    Risposto: MathWorks Support Team
    
 il 11 Mag 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?
Risposta accettata
  MathWorks Support Team
    
 il 8 Mag 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 Commenti
Più risposte (0)
Vedere anche
Categorie
				Scopri di più su Nonlinear ARX Models in Help Center e File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
