How to choose a solver, Simulation start and stop time for auto-code generation of simulink model??
Mostra commenti meno recenti
Hello
Iam doing a SIMULINK model to estimate the State of charge of the battery-pack. I need to generate the autocode to integrate with my real system.
Iam confused with how to choose a solver and how to set start and stop simulation time??
when i run the model i set stop time to 1000 seconds. In Powergui i selected discrete solver with sample time of 50e-6. Will this solver time affects the real-system performance?? Please suggest me how to select solver and sample time to generate the auto-code??
Risposta accettata
Più risposte (1)
Chirag
il 6 Mar 2020
0 voti
Hi Dileepa,
You may want to take a look at this Battery Management Systme Example. https://www.mathworks.com/matlabcentral/fileexchange/72865-design-and-test-lithium-ion-battery-management-algorithms
This example shows you the concepts Joel Van Sickel talked about. Using Model Referencing, Rate Transition Block etc.
What other electrical components are you simulating in addition to Battery?
Also, what's your final embedded target? We may have example to help you get started.
Sample Time of 50e-6 is very small for Battery Algorithms. You may not want to calculate your SOC at every 50microsecond. You can use Multirate modeling to run your SOC Estimation algorithm at slower rate.
Chirag
2 Commenti
Dileepa B S
il 10 Mar 2020
lee stone
il 23 Nov 2021
Hi Chirag, the example runs with errors for 2019b or 2020a:
Updating Model Reference Simulation Targets
Starting serial model reference simulation build ### Build procedure for Battery_Model aborted due to an error.
Battery_System_R2020a\work\slprj\sim\Battery_Model\tmwinternal\binfo_mdlref.mat: Invalid argument。
so how to solve it?
I couldnot find the binfo_mdlref.mat location.
Community
Più risposte nel Power Electronics Control
Categorie
Scopri di più su Simulink in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!