MATLAB: How can we model this equation in simulink dx/dy + x + y = 1 where x is the input and y is the output.

differential equationsequationodesimulink

how to model this equation in simulink dx/dy + x + y = 1

Best Answer

Re-write as
dx/dy = 1 - x - y % y is your independent variable, sort of "t"
therefore
dy/dx = 1/(1 - x - y)
Then, from left to right (in your Simulink block diagram) you have
  • a summation block, adding up the right hand side, and taking the reciprocal value
  • the output goes into an integrator block that outputs y, which is the solution and also feeds back into the summation block
Related Question