matlab compressor map modul error

3 次查看(过去 30 天)
I want to model a compressor with a published compressor performance map using Grabit code and the MATLAB compressor map module, but I keep getting the following error. Thank you in advance.
An error occurred while running the simulation and the simulation was terminated
Caused by:
  • ['CompressorMap/Solver Configuration']: Transient initialization at time 0.002337348464843343, solving for consistent states and modes, failed to converge.
  • Nonlinear solver: failed to converge, residual norm too large.
  • Here is the set of components with unconverged equations: 'CompressorMap/Compressor (G)'Equation location is: 'C:\Program Files\MATLAB\R2023b\toolbox\physmod\fluids\fluids\+fluids\+gas\+turbomachinery\compressor.sscp'(no line number info)

采纳的回答

atharva
atharva 2023-11-9
Hey Alper,
I understand that you are facing an issue when you model a compressor with a published compressor performance map using Grabit code and the MATLAB compressor map module.
The error is saying that Simscape is incapable of solving your system. This can occur for a variety of reasons; however, most often it is caused by a sudden transition within the model. To troubleshoot the issue, you can try the following:
1) Check to see if there are any sudden changes, such as a change in pressure, or unexpected events, such as a very low pressure, in your model at the time of the error. The following MATLAB Answers post may provide additional information about events like this. https://www.mathworks.com/matlabcentral/answers/11852-nonlinear-solver
2) Switch your solver and increase your tolerances, for example if you are using 'Variable Step Auto', try 'ode23t' and if your tolerances are 1e-5 try increasing to 1e-3. For more information on solver selection visit the following documentation page. https://www.mathworks.com/help/releases/R2020b/simulink/ug/choose-a-solver.html
3) Use the Solver Profiler to determine what the solver is doing just before you receive the error. In the step size tab, you should see a graph showing the step spike down as it approaches the time of the error occurring. If you zoom in on that spike there should be more information, such as an indication that there is a zero crossing. The following link contains more information on the Solver Profiler: https://www.mathworks.com/help/releases/R2020b/simulink/slref/solverprofiler.html
Please note that this error is very generic and that these steps are only a starting point to help find the cause of the error.
However if you are not using such type of components and are mainly using switches and parasitic components like resistors and capacitors you could find the fillowing information useful:
1.Rapid switching behavior could be the cause of the transient initialization failures. The general ways that you want to approach this type of problem is include smoothing the dynamics, simplifying the equations, and adjusting the solver settings. For e.g. Using a variable resistor and transfer function would smooth the dynamics.
2.Simplify the model: This includes removing unnecessary sensors since these add extra equations, and you can get the plots after running the simulation for e.g using the MATLAB file exchange command ‘ssc_explore’ and combining components. To get more information on this submission please refer to the following link on MATLAB central:
(If you have specific questions about SSC_EXPLORE please contact the author of the submission directly for more information on that file.)
3.Simplifying resistor and capacitor networks: There were instances of five resistors in series could be combined into one, etc. A large bank of capacitors could be next.
4.Tightening solver tolerances: One obstacle in this was that the initial conditions were not quite right. For a capacitor the initial voltage was set to 70,000 kV, and the parallel voltage source was set to 70,000 V. This huge difference only allowed loose solver settings to converge on the first time step. Fixing this issue helped a bit. There are likely other similar issues in this model that might need fixing. Running for a short time and using SSC_EXPLORE to look for any jumping states will give you a clue.
5.Lastly, incremental building and testing: We encourage you to start with a simpler version and gradually build up before it gets to this level. After confirming that it gives expected results at smaller levels (including looking for correct initial states like I mentioned above), you could then start to combine the pieces. This is because debugging small models is always easier.
I hope this helps!
  1 个评论
Alper
Alper 2023-11-19
As you mentioned, the module is not working seamlessly between the Kg/s and g/s units. I will try to troubleshoot the system using SSC_EXPLORE, as you suggested. Thank you for your assistance.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Multibody Modeling 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by