Variable-size signals within an algebraic loop

3 次查看(过去 30 天)
Dear Team & Users,
I am quite new to Matlab and Simulink and have been struggling for a couple of days with my newest model.
It is supposed to represent a multicomponent chemical reactor (FTS Reactor) and a product separation unit (Flash). My goal is to represent the behaviour of the system with a product recyle loop (algebraic loop) until it reaches a steady state. (see Diagram)
I work with a multicomponent reaction which produces variable-size signals. (M_dot_'')
I haven´t been able to get the loop to work. I already tried to implement the following:
  • Unit Delay
  • Memory Block
  • Transfer Fcn.
and failed.
I then tried it with a unit delay in an enabled subsystem which resets its states when enabled (next image) and got the following Error:
Block '.../MATLAB Function' has variable-size signals, and it resides within an algebraic loop. Variable-size signals do not support algebraic loops. Consider eliminating the algebraic loop.
How can I eliminate the algebraic loop and still solve my problem?
Let me know if you need any additional information
Best regards
Uli
  1 个评论
Uli Sommer
Uli Sommer 2019-6-26
编辑:Uli Sommer 2019-6-27
In the following thread a similiar problem is described:
I tried to implement the 2-Level Matlab by saving it to an m.file and calling it in an S-Function
I got the following error:
Error evaluating registered method 'PostPropagationSetup' of MATLAB S-Function 'msfcn_varsize_delay' in 'recycle_FTS/Level-2 MATLAB S-Function'. The following is the MATLAB call stack (file names and line numbers) that produced this error:
['C:\Users\ulric\Desktop\MA\Simulink\FTS\msfcn_varsize_delay.m'] [67]
Caused by:
Invalid dimensions specified for Dwork 1 of 'recycle_FTS/Level-2 MATLAB S-Function'. Dwork must be a vector, and its width must be a positive integer
It´s the first time I ever use such a function and I´m quite lost to be honest.
I am grateful for any help and will supply you with any information that might be lacking.
Kind regards
Uli

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 General Applications 的更多信息

产品


版本

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by