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
Pemendra Kumar Pardhi 2020년 9월 2일
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 Community

카테고리

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