Why do I get algebraic loop error when using "PV Array" block?

125 vues (au cours des 30 derniers jours)
MathWorks Support Team
MathWorks Support Team le 26 Sep 2018
Modifié(e) : MathWorks Support Team le 29 Fév 2024 à 12:41
When I try to run my Simscape model containing the "PV Array" block, the following error is returned: 
Block diagram 'pvArray' contains 1 algebraic loop(s). To see more details about the loops use the command Simulink.BlockDiagram.getAlgebraicLoops('pvArray') or the command line Simulink debugger by typing sldebug('pvArray') in the MATLAB command window. To eliminate this message, set Algebraic loop to "none".
Component:Simulink | Category:Block diagram warning
Found algebraic loop containing:
pvArray/PV Array/Diode Rsh/Product5 (algebraic variable)
pvArray/PV Array/Diode Rsh/Product2
pvArray/PV Array/Diode Rsh/Product1
pvArray/PV Array/Diode Rsh/Math Function
pvArray/PV Array/Diode Rsh/Add
pvArray/PV Array/Diode Rsh/Product
pvArray/PV Array/Diode Rsh/Add1
pvArray/powergui/EquivalentModel1/State-Space
pvArray/PV Array/I_PV/do not delete this gain
pvArray/PV Array/I Filter/First-Order Filter/Model/D
pvArray/PV Array/I Filter/First-Order Filter/Model/Sum1 (algebraic variable)
pvArray/PV Array/Product2
pvArray/PV Array/V_PV/do not delete this gain
pvArray/PV Array/V Filter/First-Order Filter/Model/D
pvArray/PV Array/V Filter/First-Order Filter/Model/Sum1
pvArray/PV Array/Add1 (algebraic variable)
Component:Simulink | Category:Model
An error occurred while running the simulation and the simulation was terminated
Caused by:
Algebraic state in algebraic loop containing 'pvArray/PV Array/I Filter/First-Order Filter/Model/Sum1' computed at time 3.5826011128367485E-8 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)
How do I resolve this error? I am using R2018b.

Réponse acceptée

MathWorks Support Team
MathWorks Support Team le 18 Jan 2024
Modifié(e) : MathWorks Support Team le 29 Fév 2024 à 12:41
The error is likely resulted from the algebraic loop present inside the "PV Array" block which is described in its documentation page. Please run the below command in the MATLAB R2018b command window to get the release specific documentation of the "PV Array" block:
web(fullfile(docroot, 'physmod/sps/powersys/ref/pvarray.html?searchHighlight=pvarray&s_tid=doc_srchtitle#bum9t3o'))
By default, the "Break algebraic loop in internal model" parameter is not selected. This means that the "PV Array" block has an algebraic loop in it. If you use the block in a discrete system using large sample times, this algebraic loop is required to get an iterative, accurate solution for the highly nonlinear diode characteristics. For continuous system, when the "PV array" block is connected to a detailed power electronic converter where real switches are simulated, you need to specify a small sample time to get accurate resolution in PWM pulse generation (for example, 1e-6 sec with a 5 kHz PWM inverter).
If you do not want to break the algebraic loop and you know that your model is correct, please consider the following:
  1. Reducing the error tolerances (Relative tolerance and Absolute tolerance in Solver tab of the Configuration Parameters) of the solver as suggested by the error message. This might slow down the computation.
  2. Changing the solver type to "ode23tb" which typically works better when you have Simscape components in your model. 
Additionally, please be aware of the "measurement filter time constant" in the advanced tab for "PV Array" blocks. If the time constant is zero, the solver will have a harder time solving the model with an algebraic loop.
Please follow the below link to search for the required information regarding the current release:

Plus de réponses (0)

Catégories

En savoir plus sur Discrete Events and Mode Charts dans Help Center et File Exchange

Produits


Version

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by