Simulink model problem. Input depending on its output

4 views (last 30 days)
Hello, I have a slight problem with my model: the input of my model is depending on the output of it. To make it easy I started with a simple model (only ramp and constant) and to solve this I had the following structure in mind: (ramp goes from 0 to 9 and the treshold of the switch is 0.5).
However this appears to be not working. It either outputs only the constant, either the simulations doesn't even start. I have no idea why and how to solve it because I don't see a mistake in my model. Can someone explain me or tell me how to modify the structure. Thank you in advance.

Answers (1)

Joachim Schlosser
Joachim Schlosser on 18 Apr 2016
The solver is trying to solve the system that you specified at time 0. So in order to get to to work, you need some sort of delay before feeding the comparison back into the switch. See https://www.mathworks.com/help/simulink/ug/algebraic-loops.html for learning about algebraic loops.
Second, what you are trying could also be described with an easier construct without feedback, by placing the comparison directly after the ramp block.

Categories

Find more on Simulink in Help Center and File Exchange

Tags

Products

Community Treasure Hunt

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

Start Hunting!