Did figure out how to isolate only the simulated data, but I'm struggling on how to export the data from my scope - i want a matrix with time, voltage, current, and SOC.
Run Current Profiles on a cell and only receive simulated results
5 views (last 30 days)
Show older comments
I have parameterized a cell based on lab data and would now like to simulate a voltage response based on a current profile. I think I was able to do it once as shown in the picture but I'm having trouble figuring out the settings. Basically I want the current profile (already known) with the simulated voltage based on parameters that were optimized from previous data. I am also interested in known how to export the voltage_sim into an array/csv file in addition to the graph.
I do keep seeing the pop up there is no experiment data for 'voltage_sim,' edit the experiment to specify data for 'voltage_sim.'
3 Comments
Javier Gazzarri
on 8 Aug 2023
Hi Katerina,
To export a signal to the workspace, please click on it, hover over it and click on the "wifi" icon. This will log the signal under the name you've given and create a workspace variable at the end of the simulation. The Simulink Configuration Parameters has a Input/Output section where you can specify the variable data type, un your case an array.
To your second question - If you are running this from the Simulink Design Optimization UI, please bear in mind that it has its own workspace which is different from the base workspace, so changes done on the latter will not affect the former unless you explicitely navigate to the signal in the SDO UI and edit it.
Please send me your model (if you are allowed to do so) if this does not resolve your problem, and I'll take a look on my side.
Best regards,
Javier
Answers (2)
Javier Gazzarri
on 1 Aug 2023
Hello Katarina,
The task you are describing is the validation of the estimated parameters. You need to specify the validation current profile as such in the Parameter Estimation app. Please see the model here where I created an example including both estimation and validation. syntheticData
Please follow these steps:
1) open slx model and run it to see a simulation prior to parameter estimation
2) open Parameter Estimation from the shortcut in the bottom center of the canvas and run the estimation
3) Go to Select Experiments and see how I assigned the validation experiment
4) Run Validation from the VALIDATION tab
Please let me know how it goes.
Best regards,
Javier
3 Comments
Javier Gazzarri
on 8 Aug 2023
Edited: Javier Gazzarri
on 8 Aug 2023
Hello Katarina,
It is not necessary for the validation test to be of any specific length. Its purpose is to evaluate how robustly your parameters are able to predict a response to a stimulus the model never saw before. Ideally it should exercise the model throughout a wide range of states so as to make sure it works well under any condition within the intended use.
Hope this helps and glad you enjoyed our videos. Thank you for your kind words.
Javier
Javier Gazzarri
on 9 Aug 2023
Hi Katarina,
Certainly. If you need to run one or several current profiles through your model, please connect a controlled current source to the battery block and feed it with an "In" block. You will have to connect a S-PS converter downstream of it.
Then go to MODELING->Model Settings->Data Import/Export, and select Input by checking on the box next to it. In the field on the right, write the Nx2 input array as [time, current].
Simulink will run the sim using this current and for the time specified by "time".
Best regards,
Javier
0 Comments
See Also
Categories
Find more on Estimate Parameters and States in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!