I have been trying to build a Simulink Model for a while, but I'm not really sure if it is correct, so I need some confirmation. The equations I was given are:
x1' = x1 - x1*x2
x2' = -x2 + 2*x1*x2
I was told that the initial conditions for the integrators were ( I assumed that each value was for each separate integrator):
(.5, .5)
(1, .5)
(2, 2)
(.5, 1)
(1, 1)
For a total of 5 graphs and output using the XY grapher. I have no clue what it should look like but any tips or hint to add to this model would be very helpful. Usually I have dealt with differential equations with some sort of input, but from the equations I do not know what to do.
Plot using initial conditions of (1,1) for integrators
There's not really much to answer here. The Simulink block diagram is correct per your equations.
If you want to confirm that your Simulink model is correct, try verifying it by some calculations "by hand".
x1' = x1 - x1 * x2
x2' = -x2 + 2 * x1 * x2
For (1,1)
x1' = 1 - 1 * 1 = 0
x2' = -1 + 2 * 1 * 1 = 1
So, starting with (1,1), the direction of change is 0 for x1 and 1 for x2. Now, take a relatively small step (0.1 * x'):
x1(0.1) = 1
x2(0.1) = 1.1
x1' = 1 - 1 * 1.1 = -0.1
x2' = -1.1 + 2 * 1.1 * 1 = 1.1
So, the x1 value is slowly decreasing, while the x2 value is rapidly increasing, so at the very start, you should have a curve that goes upwards and to the left.
x1(0.2) = 1-0.1*0.1 = 0.99
x2(0.2) = 1.1 + 0.1*1.1 = 1.21
Take a few more steps and see in which direction you're heading. Does it look like the Simulink plot? (Of course, I would suggest you use MATLAB for this, and not pen and paper, since pen and paper is cumbersome.
Also, compare hand calculations with other points in your plot, for instance:
Check (0.5,2)
. Can you see what direction the line goes in your plot? Horizontally to the left (i.e. derivative in y direction is zero, and derivative in x direction is negative. By hand, you get: x1' = -0.5
and x2' = 0
. It's spot on! =) Of course, the results you get when calculating by hand are a bit off, as the step size is quite large.
Anyway: Your model is correct!