Warning: Matrix is close to singular or badly scaled ( simulink model with simscape blocks simpowersystems)

39 次查看(过去 30 天)
I have my model having simpower systems generating the follwoing warnings. solutions are availalbe for matlab code but none for simulink model containing simscape blocks.
----------------------------------------------------------------------------------------------------------
Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 1.667047e-18.
Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 1.667047e-18.
----------------------------------------------------------------------------------------------------------
Thanks in Advance

采纳的回答

Joel Van Sickel
Joel Van Sickel 2020-9-2
Hello Sreeraj,
there is the chance you can get good results even with this warning, so you might be able to ignore it. The main issue is likely that you have an area where resistances are too low. I see this warning the most when using specialized power systems and having breakers in the system. In those cases, increasing the breaker resistance will make the error go away. If you have other components with very low resistance, you could also try increasing the resistance of them.
Regards,
Joel
  1 个评论
Sreeraj A
Sreeraj A 2020-9-3
Hello Joel,
Thank you for the information. I have ideal switches in my model and when commented out the usage the warnigns go away ensuring the source of the warning. I will look further on how can i increase the resistance in the path and clear the warning.
Thank you very much.

请先登录,再进行评论。

更多回答(2 个)

Pemendra Kumar Pardhi
Dear Sreeraj
This kind of error is occure whenever your simulink model having denomenator zero,
If you are using for code genration please try this procces,
Go on configuration parametrs> diagnostics > consecutive zero crossing violation> none

Rom Lhx
Rom Lhx 2020-11-13
Hello Sreeraj,
In complement of the answer of Joel, here is the answer from our Technical Support to a similar pain:
The reason you are seeing this error is that a matrix somewhere in your model has a large 'scale' difference.
For instance, take the example of the following 2x2 matrix:
  • A=[1e8,0;0,1e-8]
The singular values of this matrix differ by 16 orders of magnitude and solving a linear system such as 'Ax=b' will trigger this RCOND warning message.
You can see this for example:
  • b = [1;1]
  • A\b % solves for x in Ax=b
MATLAB warns that this may lead to errors, in particular for badly conditioned matrices, small changes in 'b' could lead to large changes in 'x'. Documentation for the condition number can be found here: https://uk.mathworks.com/help/matlab/ref/rcond.html
You can highlight the ill-conditioned matrix by tracing it back to a specific block. The power_analyze function may be useful for this, documentation can be found here: https://uk.mathworks.com/help/physmod/sps/powersys/ref/power_analyze.html .
Looking at the condition number of the corresponding state-space matrix will help you pin down the origin of the issue. This can be achieved for example by running: sps = power_analyze('sys','structure') rcond(sps.A)
Regards,
Romain
  1 个评论
Kevin Pilgrim
Kevin Pilgrim 2021-1-5
Thanks for the detailed feedback. Could you provide further information to "trace back" the origin of the problem? What numbers/state/values should I pay attention to to find the error?
rcond(sps.A) is 8.4e-24 for my state matrix A.
I know that block is causing the issue (by commenting it in and out), but I would like to gain some insights how the warning is caused in order to improve my model!
Thanks!
Kevin

请先登录,再进行评论。

社区

更多回答在  Power Electronics Control

类别

Help CenterFile Exchange 中查找有关 Trimming and Linearization 的更多信息

产品


版本

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by