why PV panels gives algebraic loop errors?
조회 수: 35(최근 30일)
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
Christos Bethanis 2019년 5월 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
- mask parameters->advanced-> check "break algebraic loop..."
- 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
Gert Kruger 2019년 5월 29일
편집: Gert Kruger 2019년 5월 29일
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:
- right-click on the PV arrary->library->disable link
- Bypass the low-pass filters with the one provided here: https://www.mathworks.com/matlabcentral/fileexchange/58498-real-time-tunable-filters
- Set the cut-off frequency equal to 1/Tf, i.e. the same cutoff frequency of the V-Filter and I-Filter
- 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.