What is causing my algebraic loop?

26 views (last 30 days)
Jamie Shaffer
Jamie Shaffer on 12 Jan 2022
Answered: Jamie Shaffer on 14 Jan 2022
I have a somewhat complex model utilizing the general blockset, Specialized Power Systems, and Simscape Electrical physical systems. I am receiving an error that I have an algebraic loop, containing blocks that contain persistent states, which are not allowed in algebraic loops. I have seen answers explaining that these blocks tend to be integrators, Stateflow charts, Matlab function blocks, and physical systems circuits. Of those things, I only have the physical systems circuit. The physical systems circuit contains capacitors which could count as "persistent states", but if that is the cause, I do not know the solution. The error message is copied below. Can anyone help me spot the cause of the error?
Edit: After digging further, the identified loop goes Voltage Measurement -> Gain -> Subtract -> Gain -> Controlled Current Source. The Controlled Current Source does not directly interact with the Voltage Measurement. I don't see loop here..
'Full_Model_2/Control/Voltage Loop/Solver Configuration' or the model referenced by it contains a block that updates persistent or state variables while computing outputs and is not supported in an algebraic loop. It is in an algebraic loop with the following blocks.
Component:Simulink | Category:Model error
Input ports (1) of 'Full_Model_2/powergui/EquivalentModel1/State-Space' are involved in the loop.
Component:Simulink | Category:Model error
Input ports (1) of 'Full_Model_2/Converter 3/Voltage Measurement/do not delete this gain' are involved in the loop.
Component:Simulink | Category:Model error
Input ports (1) of 'Full_Model_2/Control/LM5170/Current Loop 3/Gain1' are involved in the loop.
Component:Simulink | Category:Model error
Input ports (1) of 'Full_Model_2/Control/LM5170/Product' are involved in the loop.
Component:Simulink | Category:Model error
Input ports (1, 2) of 'Full_Model_2/Control/LM5170/Current Loop 3/Subtract' are involved in the loop.
Component:Simulink | Category:Model error
Input ports (1) of 'Full_Model_2/Control/LM5170/Current Loop 3/Gain' are involved in the loop.
Component:Simulink | Category:Model error
Input ports (1) of 'Full_Model_2/Control/LM5170/Current Loop 3/Saturation' are involved in the loop.
Component:Simulink | Category:Model error
Input ports (1) of 'Full_Model_2/Converter 2/Voltage Measurement/do not delete this gain' are involved in the loop.
Component:Simulink | Category:Model error
Input ports (1) of 'Full_Model_2/Control/LM5170/Current Loop 2/Gain1' are involved in the loop.
Component:Simulink | Category:Model error
Input ports (1, 2) of 'Full_Model_2/Control/LM5170/Current Loop 2/Subtract' are involved in the loop.
Component:Simulink | Category:Model error
Input ports (1) of 'Full_Model_2/Control/LM5170/Current Loop 2/Gain' are involved in the loop.
Component:Simulink | Category:Model error
Input ports (1) of 'Full_Model_2/Control/LM5170/Current Loop 2/Saturation' are involved in the loop.
Component:Simulink | Category:Model error
Input ports (1) of 'Full_Model_2/Converter 1/Voltage Measurement/do not delete this gain' are involved in the loop.
Component:Simulink | Category:Model error
Input ports (1) of 'Full_Model_2/Control/LM5170/Current Loop 1/Gain1' are involved in the loop.
Component:Simulink | Category:Model error
Input ports (1) of 'Full_Model_2/Control/Vbus^UF/do not delete this gain' are involved in the loop.
Component:Simulink | Category:Model error
Input ports (1) of 'Full_Model_2/Control/Voltage Loop/Solver Configuration' are involved in the loop.
Component:Simulink | Category:Model error
Input ports (2) of 'Full_Model_2/Control/Voltage Loop/Solver Configuration' are involved in the loop.
Component:Simulink | Category:Model error
Input ports (2, 3) of 'Full_Model_2/Control/Voltage Loop/Solver Configuration' are involved in the loop.
Component:Simulink | Category:Model error
Input ports (1, 2) of 'Full_Model_2/Control/LM5170/Current Loop 1/Subtract' are involved in the loop.
Component:Simulink | Category:Model error
Input ports (1) of 'Full_Model_2/Control/LM5170/Current Loop 1/Gain' are involved in the loop.
Component:Simulink | Category:Model error
Input ports (1) of 'Full_Model_2/Control/LM5170/Current Loop 1/Saturation' are involved in the loop.
Component:Simulink | Category:Model error
  4 Comments
Jamie Shaffer
Jamie Shaffer on 13 Jan 2022
Edited: Jamie Shaffer on 13 Jan 2022
I've commented out possible causes and discovered the "Algebraic Loops" window that highlights involved blocks. The identified loop goes Voltage Measurement -> Gain -> Subtract -> Gain -> Controlled current source. The Powergui block is also somehow involved. The controlled current source does not interact directly with the Voltage Measurement. I don't see a loop here..
Ankit
Ankit on 14 Jan 2022
if you can't share model, could you please share some screenshots? it would be easy to find out the root cause. Solution is already mentioned by @James Tursa

Sign in to comment.

Answers (1)

Jamie Shaffer
Jamie Shaffer on 14 Jan 2022
I replaced a piece of the loop that was modeled with a Specialized Power Systems circuit with a transfer function block and the Algebraic loop disappeared. I believe this to be a bug in the solver.

Products


Release

R2021b

Community Treasure Hunt

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

Start Hunting!