Previous Next

Van der Pol Oscillator Simulation (No Noise)

Syntax
[x_out] = vanderpol_sim( muxin_outstep)

Differential Equation
We use  x_1 (t) and  x_2 (t) to denote the oscillator position and velocity as a function of time. The ordinary differential equation for the Van der Pol oscillator with no noise satisfies the differential equation  \[
\begin{array}{rcl}
      x_1 '(t) & = & x_2 (t)
      \\
      x_2 '(t) & = & \mu [ 1 - x_1(t)^2 ] x_2 (t) - x_1(t)
\end{array}
\] 


mu
Is a scalar specifying the value of  \mu is the differential equation above.

xi
is a column vector with two elements specifying the initial value for  x(t) \in \B{R}^2  . To be specific,  x_1 (0) is equal to xi(1) and  x_2(0) is equal to xi(2) .

n_out
is an integer scalar that specifies the number of time points at which the approximate solution to the ODE is returned.

step
is a scalar that specifies the difference in time between points at which the solution of the ODE is approximated.

x_out
is a matrix with row size two and column size n_out that contains the approximation solution to the ODE. To be specific, for k = 1 , ... , n_out , x_out(i,k) is an approximation for  x_i [ (k-1) \Delta t ] .

Method
A fourth-order Runge method with step size step is used to approximate the solution of the ODE.

Example
The file vanderpol_sim_ok.m is an example and test of vanderpol_sim. It returns true, if the test passes, and false otherwise.
Input File: example/nonlinear/vanderpol_sim.m