Algebraic Loop Caused by MATLAB Function Block. How to Resolve Without Time Delay?
显示 更早的评论
Hello, I have a block diagram of a closed loop control system that uses a MATLAB Function Block to describe a plant model. In this function block I use MEX functions to acquire data from another software, so that I can generate outputs for the function block. I also use memory blocks to create persistent variables that are inputs and outputs from the function block. Because I am using some of the outputs as feedback in the control loop, it creates algebraic loops. To resolve this I was using delay blocks and memory blocks with initial conditions, but this shifts the signal by one time step which is undesirable.
My sim is a fixed time step of 1 second.
I tried to use the IC block as suggested from another post and a Mathworks page, but this doesn't resolve the algebraic loop for some reason. If I simply ignore the algebraic loop warnings, I get the desired response, but I am unsure if this has negative impacts on my simulation, such as step computation time, incorrect output values, etc.
1 个评论
Paul
2023-1-6
Adding an IC block doesn't remove an algebraic loop. The IC block is intended to help the algebraic loop solver solve the algebraic loop.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!