Hello everybody I have a question why when I'm simulating my PV sistem, especifically the PV panel send me an arror for algebaric loop, if it is a model constructed by mathworks, and it should work without any problem so that it has been optimiced. I do my question because i can disable in the diagnostic page the message, but i still appear the error message.
This is the message: An error occurred while running the simulation and the simulation was terminated Caused by: Algebraic state in algebraic loop containing 'Mec2cea_TODO_Prueba/PV Array/I Filter/First-Order Filter/Model/Sum1' computed at time 85508.67136121988 is Inf or NaN. There may be a singularity in the solution. If the model is correct, try reducing the step size (either by reducing the fixed step size or by tightening the error tolerances

댓글 수: 2

Seyma Biskin
Seyma Biskin 2018년 4월 28일
Hello, have you solved the problem? I encountered with the same error and I am also using PV array whic is included simscape renewables library.
This is the error exactly: Algebraic state in algebraic loop containing 'micro_grid_last/PV Array/Diode Rsh/Product5' computed at time 0.0 is Inf or NaN. There may be a singularity in the solution. If the model is correct, try reducing the step size (either by reducing the fixed step size or by tightening the error tolerances)
It will be great to share if you solved it because everywhere I found solution as inserting unit delay or memory but as you also said pv array is not editable and error is within the pv module.
nisha jithin
nisha jithin 2022년 4월 27일
hello sir, in offline the system was running fine with good results. but when i am going to real time controller OPALRT, during the c code coverting process i faced algebraic loop error. "Algebraic loops are not supported in generated code. Use the 'ashow' command in the Simulink Debugger to see the algebraic loops". how to solve this error

댓글을 달려면 로그인하십시오.

 채택된 답변

Muhammed Fasil
Muhammed Fasil 2016년 4월 10일

2 개 추천

Use a "unit delay" block near that error area. Possibly just before division/multiplication blocks

댓글 수: 13

Aman Agarwal
Aman Agarwal 2018년 4월 21일
We do not have the permission to edit the library and I tried to add a delay locally but that lead to other errors saying link not present
Tony Castillo
Tony Castillo 2018년 5월 2일
You must not have the need of edit the library, use either a memory block, or a unit delay, should be enough to solve this issue.
handy mana
handy mana 2018년 8월 16일
How do we bypass this situation?
Tony Castillo
Tony Castillo 2018년 8월 17일
You should use either a memory block or a unit delay, it is enough to solve this issue.
handy mana
handy mana 2018년 8월 17일
편집: handy mana 2018년 8월 17일
Hi Tony, I tried to add a unit delay block before the addition but it won't allow me to add it .Then it says disable link , after disabling it , i can add the delay block however error comes with missing filter library.
I have added the snippet of the original error message.Thanks.
I tried adding the delay before the addition .
Lucas RICHARD
Lucas RICHARD 2018년 10월 11일
Hi Handy, I have the exact same problem. Have you find a way to solve it ? Thanks a lot in advance.
Tony Castillo
Tony Castillo 2018년 10월 11일
Hi Lucas, if you added the Unit Delay and even that you haven't solved the issue, I strongly recommend you click the option Break Algebraic Loop in internal model.
Sunny Sonandkar
Sunny Sonandkar 2018년 11월 27일
Hi Tony, I have the same problem while running it in fix step discrete type. I click on Break Algebraic Loop in internal model. But then my output comes for only a fix resistance. If I change the resistance then the readings goes trmendously high.
If you have solve the issue then please tell the way to do it. Thanks a lot in advance.
Tony Castillo
Tony Castillo 2018년 11월 27일
Hi Sunny, the issue has been solved by adding either an Unit delay or a Memory block, and also in the same PV block, you should click on the mask, then click on ADVANCED, and finally activate the option BREAK ALGEBRAIC LOOP IN INTERNAL MODEL. If you follow thoses steps you easily overpass this problem.
Regards
Nikhil Joshi
Nikhil Joshi 2019년 3월 3일
편집: Nikhil Joshi 2019년 3월 3일
sir can u plzz tell me where can i connect unit step or memory block iam new to simulink and i dont know how to connect plzz sir tell me fast
Nikhil Joshi
Nikhil Joshi 2019년 3월 3일
편집: Nikhil Joshi 2019년 3월 3일
when i go to advanced and click on to break algebraic loop in internal model and run simulation then error not occured but my values are nan on display and dont show and curve on scope what can i do ....
Gert Kruger
Gert Kruger 2019년 6월 3일
I'm sorry, but I do not agree with your answer.
Sandra Silva
Sandra Silva 2020년 9월 17일
Hello,
I had the same problem. I was using a discrete model, with a sample time of 2.5e-6s. I changed it to 2.5e-7s and solved the problem.

댓글을 달려면 로그인하십시오.

추가 답변 (2개)

Christos Bethanis
Christos Bethanis 2019년 5월 4일

4 개 추천

I found it!
I have fixed step size and auto size, auto solver.
Just look at the example "power_pvarray_250kw". Go to the pv array
  1. mask parameters->advanced-> check "break algebraic loop..."
  2. You may face "Derivative of state in block /PV Array/Diode Rsh/BAL/Transfer Fcn' at time is not finite. There are problems with the radiance input. This maybe has to do with the rate and causes inf or nan.If you put variable step you may solve this problem but it will be really slow. So just put a rate limiter before linking the radiance to the pv array and also inside the "bal" of the PV it has a specific unit delay put your own in your project or copy the pv module of this project. The example has done this and it worked for me also.
I hope that it will work for you because I read many posts for this problem and the module is probably buggy

댓글 수: 3

Ahmed
Ahmed 2019년 6월 22일
Thanks for your notification
your solution is working
Daniel Azlan
Daniel Azlan 2020년 5월 17일
why i cannot open mask parameter?
Mahesh P
Mahesh P 2020년 6월 16일
its not working if we have two or more panels in series

댓글을 달려면 로그인하십시오.

Gert Kruger
Gert Kruger 2019년 5월 29일
편집: Gert Kruger 2019년 5월 29일

2 개 추천

The provided suggestion of the unit delay is a work around, but it does not provide the reason for the presence of the algebraic loop.
Here is the real answer to "why?":
The unit delay proposed in the answer is not supposed to be necessary, since the V-Filter and I-Filter in the model, for the computation of Vd, is supposed to break the algbraic loop. Vd which is dependent on the model output is fed-back to the model inputs which would have caused an algebraic loop if the filters were not present. The presence of the algebraic loop indicates that the V-Filter and I-Filter implementation probably has an unintended direct feed-through at some point during the simulation.
Adding a unit delay forces the model to be a mixed simulation problem, even if the rest of the model consist out of continuous state models. Secondly, what is an appropriate sample time for the unit delay?
A much better solution:
Replace the faulty filters with ones which actually work as intended:
  1. right-click on the PV arrary->library->disable link
  2. Bypass the low-pass filters with the one provided here: https://www.mathworks.com/matlabcentral/fileexchange/58498-real-time-tunable-filters
  3. Set the cut-off frequency equal to 1/Tf, i.e. the same cutoff frequency of the V-Filter and I-Filter
  4. Keep the old I Filter and V Filter models inside the original PV array model, but comment them out. The old filters have to be inside the subsystem for model initialization to work correctly.
Or download the model with the required modifications made at:
The proposed solution has been tested.
Kind regards,
Gert

질문:

2016년 2월 11일

댓글:

2022년 4월 27일

Community Treasure Hunt

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

Start Hunting!

Translated by