Errors in Battery simulator

I am trying to create this circuit as an example of "ssc_battery_management"... My circuit is this: http://img856.imageshack.us/img856/9189/batrj.png
But i have had some difficulties, as the erros like: "Error setting parameter 'Main branch time constant, Tau1>0': Expected a single string or a cell array of strings." "Error setting parameter 'Resistance, R10': '0' is not a valid unit."
Someone can help me?

4 commentaires

Arnaud Miege
Arnaud Miege le 11 Mai 2011
Can you upload your model to a filesharing site?
Nuno
Nuno le 11 Mai 2011
Here: http://www.4shared.com/file/N3H1H6LF/Battery.html
Arnaud Miege
Arnaud Miege le 11 Mai 2011
You forgot to include the Simscape library files used to model the battery cell. I assume you must have a directory called +LeadAcidBattery with the source files for the R0, R1, R2, etc... Right now, the model won't run because it can't find those files. Can you upload those as well?
Nuno
Nuno le 11 Mai 2011
Ok... Files added: http://www.4shared.com/file/SydriTCj/Battery.html
Thanks!

Connectez-vous pour commenter.

Réponses (3)

Arnaud Miege
Arnaud Miege le 11 Mai 2011

0 votes

I can't run the model Celula.mdl, I get an error message similar to:
Failed to find 'Main Branch Capacitance, C1/Slave_input.R1' in library 'LeadAcidBattery_lib' referenced by 'Celula/Condensador C1/Slave_input.R1'
I am not sure what you did to break it, but what you need to do is generate the LeadAcidBattery_lib by running ssc_build LeadAcidBattery and then use the blocks from the generated library file into the model to replace the existing ones.
I can't run the other models either because I'm missing the file Battery_Management_Lib.mdl.
Arnaud

11 commentaires

Nuno
Nuno le 11 Mai 2011
In this new file i add library: http://www.4shared.com/file/R2XIWerd/Battery_new.html
How i generate the LeadAcidBattery_lib by running ssc_build LeadAcidBattery and then use the blocks from the generated library file into the model to replace the existing ones?
Arnaud Miege
Arnaud Miege le 11 Mai 2011
You need to read the documentation about the Simscape language, in particular "Using Simscape Files in Block Diagrams":
http://www.mathworks.com/help/releases/R2011a/toolbox/physmod/simscape/lang/brnot06-1.html
Nuno
Nuno le 11 Mai 2011
If i understand, you said for me to create new blocks built by me? A new block for R0, R1 , .... ?
What is the name of block that i use to create this blocks?
Arnaud Miege
Arnaud Miege le 12 Mai 2011
You already have the source code written in the +LeadAcidBattery directory. Go to the parent directory and run the command 'ssc_build LeadAcidBattery' (without the single quotes). This will generate the Simulink library LeadAcidBattery_lib.mdl. Use the blocks from this library to replace the ones you have in your model Celula.mdl, which don't work.
Arnaud Miege
Arnaud Miege le 12 Mai 2011
Also, I have tried the other models, ssc_battery_management.mdl and ssc_sf_battery_management.mdl and they run just fine.
Nuno
Nuno le 12 Mai 2011
But when i write this in parent directory appear:
"Generating 'LeadAcidBattery_lib.mdl' in the current directory 'C:\Program Files\MATLAB\R2009b\toolbox\physmod\simscape\simscapedemos' ...
??? Failed to generate 'LeadAcidBattery_lib'
Caused by:
Error using ==> save_system at 38
Error saving "C:\Program
Files\MATLAB\R2009b\toolbox\physmod\simscape\simscapedemos\LeadAcidBattery_lib.mdl":
Permission denied
Cannot overwrite read-only files or write to read-only storage."
Arnaud Miege
Arnaud Miege le 12 Mai 2011
You didn't say you were doing this in the installation directory of MATLAB, where you don't have write permission. The library LeadAcidBattery_lib.mdl should alreayd exist in the parent directory. Just drag the blocks from the library and replace the blocks in your model Celula.mdl.
Nuno
Nuno le 12 Mai 2011
but I can not find LeadAcidBattery_lib.mdl ...
Nuno
Nuno le 12 Mai 2011
I have found... I will try to create my model... Thanks!
Nuno
Nuno le 12 Mai 2011
Dont´t exist a Thermal Model in library?
Arnaud Miege
Arnaud Miege le 12 Mai 2011
If you look at ssc_lead_acid_battery, you'll see that in the cell model, there is a thermal model, constructed with the blocks from the Simscape foundation library.

Connectez-vous pour commenter.

Nuno
Nuno le 12 Mai 2011

0 votes

Arnaud i have implemented the circuit but now it appears this error: "Unable to compile the physical network."
I already introduce the solver configuration. Waht is the error?

7 commentaires

Arnaud Miege
Arnaud Miege le 13 Mai 2011
What other error messages are you getting?
Nuno
Nuno le 13 Mai 2011
Now appear the next error:
Nonlinear solver: Linear Algebra error. Failed to solve using iteration matrix.
Initial conditions solve failed to converge.
Dependency found among topology equations. Check for missing reference node.
Problems possible for transient initialization, as well as stepsize control for transient solve, due to equations of one or more components:
ModeloBateria/D Voltage Source
ModeloBateria/Main Branch Capacitance, C1
Arnaud Miege
Arnaud Miege le 13 Mai 2011
You need an electrical reference block (from Simscape -> Foundation Library -> Electrical -> Electrical Elements). Similarly, if you use thermal blocks, you need a thermal reference block. This is documented:
http://www.mathworks.com/help/releases/R2011a/toolbox/physmod/simscape/ug/bq22y4u.html
Nuno
Nuno le 13 Mai 2011
But i already used the DC Voltage Source from Electrical Elements...
Arnaud Miege
Arnaud Miege le 13 Mai 2011
Yews, but have you got an electrical (and thermal) reference block in your network. Again, if you read the documentation page I mention, each domain in a network needs at least one reference block.
Nuno
Nuno le 17 Mai 2011
I already resolve the problem... Now i create the subsystem and I added other components, but appear the same error:
Unable to compile the physical network.
I don´t understand why?
Arnaud Miege
Arnaud Miege le 17 Mai 2011
Again, it's difficult to comment without seeing the model. Make sure that you follow the rules in the Simscape documentation for connecting components (help browser -> Simscape -> user's guide -> Modeling physical systems) and read through the documentation to make sure you understand how the software works and how to use it properly.
I would also strongly recommend the following training course:
http://www.mathworks.co.uk/services/training/courses/SLPM-S_1.html
For these types of problems, you should also contact technical support:
http://www.mathworks.co.uk/support/service_requests/contact_support.do

Connectez-vous pour commenter.

Nuno
Nuno le 18 Mai 2011

0 votes

You know if this warnigs afects the model?
Warning: The solver chosen is not recommended if the model is stiff, which is typical for models containing Simscape components. These solvers are typically preferred for Simscape models: ode23t, ode15s or ode14x (fixed-step). To disable this diagnostic, change the explicit solver diagnostic setting on the Simscape node of Configuration Parameters.
Warning: Using a default value of 0.2 for maximum step size. The simulation step size will be equal to or less than this value. You can disable this diagnostic by setting
'Automatic solver parameter selection' diagnostic to 'none' in the Diagnostics page of the configuration parameters dialog
Warning: Problems possible for transient initialization, as well as stepsize control for transient solve, due to equations of one or more components:
'ModeloBateria_testes/Subsystem1/DC Voltage Source'
'ModeloBateria_testes/Subsystem1/Electrical Reference'
'ModeloBateria_testes/Subsystem1/Main Branch Capacitance, C1'

1 commentaire

Arnaud Miege
Arnaud Miege le 18 Mai 2011
Again, you should really read the documentation, in particular "Setting Up Solvers for Physical Models" (http://www.mathworks.com/help/releases/R2011a/toolbox/physmod/simscape/ug/brsbz56.html) and "Customizing Solvers for Physical Models" (http://www.mathworks.com/help/releases/R2011a/toolbox/physmod/simscape/ug/bsigllk.html).

Connectez-vous pour commenter.

Communautés

Plus de réponses dans  Power Electronics Control

Produits

Question posée :

le 11 Mai 2011

Community Treasure Hunt

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

Start Hunting!

Translated by