Algebraic Loop Caused by MATLAB Function Block. How to Resolve Without Time Delay?
Mostra commenti meno recenti
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 Commento
Paul
il 6 Gen 2023
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.
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Loops and Conditional Statements in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!