首页 > 解决方案 > Problems with step size Simulink

问题描述

What I want my model to do is to execute the entire model before moving on to the next step.

The idea of the model is to compare two inputs. If there is a greater difference than 500 then the output of the function should be 1000, else 0. I then run the output through an integrator but the value integrated is never 1000 at that time step which is what I want it to do.

I've played around with difference solver options but none has worked thus far. Fixed step doesn't solve it.

Graph:

enter image description here

Model:

enter image description here

The red value should jump from 0 to 1000 when there's a greater difference than 500 between the two values. Thanks!

标签: matlabsimulink

解决方案


Fixed step with euler as solver fixed it!


推荐阅读