Index-> contents reference index search external Previous Next Up-> ckbs ckbs_nonlinear vanderpol_ok.m vanderpol_sim ckbs-> license ckbs_t_general ckbs_nonlinear ckbs_L1_nonlinear ckbs_affine ckbs_affine_singular ckbs_L1_affine utility all_ok.m whatsnew wishlist bib ckbs_nonlinear-> get_started_ok.m sine_wave_ok.m vanderpol_ok.m nonlinear_utility vanderpol_ok.m-> vanderpol_sim vanderpol_g.m vanderpol_sim-> vanderpol_sim_ok.m Headings-> Syntax Differential Equation mu xi n_out step x_out Method Example

Van der Pol Oscillator Simulation (No Noise)

Syntax
[x_out] = vanderpol_sim( mu, xi, n_out, step)

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