Warning: Matrix is close to singular or badly scaled ( simulink model with simscape blocks simpowersystems)
22 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Sreeraj A
el 2 de Sept. de 2020
Comentada: Kevin Pilgrim
el 5 de En. de 2021
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
0 comentarios
Respuesta aceptada
Joel Van Sickel
el 2 de Sept. de 2020
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
Más respuestas (2)
Dr. Pemendra Kumar Pardhi
el 2 de Sept. de 2020
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
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/355229/image.png)
Rom Lhx
el 13 de Nov. de 2020
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 comentario
Kevin Pilgrim
el 5 de En. de 2021
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
Comunidades de usuarios
Más respuestas en Power Electronics Control
Ver también
Categorías
Más información sobre General Applications en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!