Parameter Estimator Error: Output times must be within specified simulation start and stop times.

42 views (last 30 days)
I'm trying to create a supercapacitor model using Simulink and estimating the component parameters using the parameter estimator app.
The model is able to run when I input the current source values but when trying to 'plot model response' or 'Estimate' in the parameter estimator app, the following errors occur:
Error:The function handle passed to the optimize command encountered an error when evaluated with a parameter vector.
Error:Output times for the block diagram 'Dynamic_model' must be within the specified simulation start (0.0) and stop (45.9084) times.
------------
I have tried changing the solver selection type to 'Fixed-Step' as per what some solutions recommended but it creates a different error as shown below:
Error:An error occurred while running the simulation and the simulation was terminated
Caused by:
Derivative of state 'Dynamic_model.Capacitor4.vc' in block 'Dynamic_model/Capacitor4' at time 19.051986 is not finite. The simulation will be stopped. There may be a singularity in the solution. If not, try reducing the step size (either by reducing the fixed step size or by tightening the error tolerances)
Attached is the model file and the data file used (Col 1: time, Col2: Voltage output, Col3: Current Input). Your advice is much appreciated, thank you.
  2 Comments
Arun
Arun on 16 Apr 2024 at 8:57
Please provide more information regarding reproduction steps for the error and MATLAB version.
Chew Yu Cheng
Chew Yu Cheng on 25 Apr 2024 at 8:52
Hi Arun, I get this error (Output times for the block diagram 'Dynamic_model' must be within the specified simulation start (0.0) and stop (45.9084) times.) when i try to plot model response/estimate parameters using the data from the exp_1250uA_data table in the Parameter Estimator App.
In Simulink model:
1) I set the current values in the simulink model to be: exp_1250uA_data(:,[1,3])
These are the columns for time and current in this experiment data set. The model is able to run in simulink.
In the parameter Estimator App:
I set the experiment configured measured data:
1) Dynamic_model/PS-Simulink Converter:1 (voltage) -> exp_1250uA_data(:,[1,2])
These are the columns for time and voltage in this experiment data set.
2) Dynamic_model/PS-Simulink Converter:1 (current) -> exp_1250uA_data(:,[1,3])
These are the columns for time and current in this experiment data set.
After configuring the experiment details in the parameter estimator app, I try to plot and simulate as shown in the screenshots and get the error.
This issue does not occur when i use other table values exp_500uA_data, exp_2500uA_data,exp_5000uA_data, which puzzles me to think if it is an inherent problem in my model or is it due to the time values in the table. As it is my first time using simulink and parameter estimator app, I do not understand the mechanisms behind them, help is very much appreciated!

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!