1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Van der pol Equation Simulation in Simulink

  1. Jan 25, 2013 #1
    1. The problem statement, all variables and given/known data

    As the title says, I am trying to implement two differential equations into Simulink. I don't know how to start. How do I know what to start with, which block goes where? when do I add something and when do I know to subtract something using the sum block. When I got my model ready, how do I know what I have done is right?

    The system should be realized using the following blocks :

    Integrator, sum, product, gain and To Workspace.


    2. Relevant equations

    Code (Text):
    \begin{align}
    \dot{x_{1}}=x_{2}\\
    \dot{x_{2}}=-x_{1}+\mu(1-x^{2}_{1})x_{2}
    \end{align}
    where
    Code (Text):
    \mu>0
    3. The attempt at a solution
    1. The problem statement, all variables and given/known data



    2. Relevant equations



    3. The attempt at a solution
    1. The problem statement, all variables and given/known data



    2. Relevant equations



    3. The attempt at a solution
     
  2. jcsd
  3. Jan 31, 2013 #2
    Alright boys, thank you for the help on the Simulink part (NOT). I have now managed to set up the model in simulink. Now I am suppose to run the model from a MATLAB M-file (script). I initialize the variables and run the simulation from the script, plotting x1 and x2 against each other.

    The problem is that I dont get any graph? Just an empty figure.

    mu = 5;
    t_sim = 10;
    x_10 = 1;
    x_20 = 2;

    sim('vanderpol');

    time1 = x1.time;
    x1 = x1.signals.values;

    time2 = x2.time;
    x2 = x2.signals.values;

    figure(1);
    grid on;
    plot(x1,x2);
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Van der pol Equation Simulation in Simulink
Loading...