Simulink model problem. Input depending on its output

3 Ansichten (letzte 30 Tage)
Mehdi Kemp
Mehdi Kemp am 18 Apr. 2016
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.

Antworten (1)

Joachim Schlosser
Joachim Schlosser am 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.

Kategorien

Mehr zu Programmatic Model Editing finden Sie in Help Center und File Exchange

Tags

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by