What are the signs that my parameter estimator is on the right track before convergence?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen

and the optimization is taking hours
but i have noticed as shown in photo attached that EXP (Minimize ) is not converging and Shows NAN , and i gues this is a bad sign
So How to evaluate parameter estimator performance mid-optimization?
7 Kommentare
Sam Chak
am 12 Mai 2025
If you attach the data here, someone will be able to check whether the data isNaN or not.
Antworten (1)
Sam Chak
am 13 Mai 2025
Bearbeitet: Sam Chak
am 13 Mai 2025
Hi @YASSER
In MATLAB, a 'NaN' result is primarily produced when there are indeterminate operations, such as Inf/Inf or 0/0. A secondary occurrence of NaN can result from operations involving NaN, such as 2*NaN or NaN^2. However, even if the data contain 'NaN', we can still plot the data. See the demo below.
Since you are certain that the data contains only numerical values, the third explanation for this occurrence is that extracting measured data from a spreadsheet with unmatched dimensions can also lead to 'NaN', specifically if empty cells are present. The time data comes from internal clock, and the measured data comes from the sensor.
If you have studied instrumentation and control before, you will know that 'no data' can sometimes happen due to malfunctioning sensors, momentary power outages, during hotline maintenance, or human error in data management. Typically, the device should indicate 'no data' at this timestamp.
Data in 'Book1' spreadsheet

Data loaded onto MATLAB

Plotting the data contain 'NaN'.
% time data
t = linspace(0, 4000, 4001);
% artificially inject a NaN at a specific indexed location
t(2001) = NaN;
% output data
y = 2300*exp(- ((t - 2000)/800).^2);
disp('Output y(t) at time, t = 2000'), disp(y(2001))
% plot
plot(t, y), grid on
ylim([0, 2500])
xlabel('Time (seconds)'), ylabel('Amplitude')
9 Kommentare
Torsten
am 14 Mai 2025
Bearbeitet: Torsten
am 14 Mai 2025
Getting NaN values in the course of your computation can have many reasons. Maybe your Simulink model gives back model values that are NaN for the parameters supplied by the fitting program. Or the fitting program itself approaches a set of NaN parameters.
I have no experience about coupling Simulink and normal MATLAB, but I guess that there should be a way to survey the parameter values and the model values during the optimization process.
Siehe auch
Kategorien
Mehr zu Parameter Estimation finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!