Quick start guide for Duffing Equation


Duffing Equation

For example, let us consider the Duffing equation:


index.php?plugin=attach&refer=Duffing_Equation&openfile=eq_img01.gif


and calculate the period-doubling bifurcation set of a periodic solution observed in the index.php?plugin=attach&refer=Duffing_Equation&openfile=eq_img02.gif-plane.
In the following, we make the following programs, and use these:
  1. PP
  2. FIX
  3. BF


Configurations

  • First, please refer to the Installation section to install BunKi, then go to the Preferences.
  • Complement. 1
    • If the Symbolic Math Toolbox (MATLAB additional package) is not available, please consult the following sample for a demo. It is a file where we gathered all the analysis tools required for the analysis of the Duffing equation, and the configuration files in a compressed project directory. Please extract its content in any location.
    • Attention:starting BunKi from the MATLAB command in the expanded directory, the SE program starts. If choosing "system create" there, an install without the "Symbolic Math Toolbox" will return an error. If the "Symbolic Math Toolbox" is not available, please skip the Creation of the Programs and directly continue to PP.
  • Complement. 2
    • In the extracted directory of the BunKi program, there is a sample directory.
      /BUNKI/Sample/Duffing
      The various files placed down this directory are used in the following explanations. It is possible to save some time by using such files instead of filling up each configuration field manually. The files prepared are as follows:
      • fileDuffing.sed : file containing the model equations: configuration file for use with SE
      • filePd_point.ppd : The example of a stable periodic solution: configuration file for use with PP
      • file2Pd_point.ppd : The example of a stable 2-periodic solution: configuration file for use with PP
      • file4Pd_point.ppd : The example of a stable 4-periodic solution: configuration file for use with PP
      • file8Pd_point.ppd : The example of a stable 8-periodic solution: configuration file for use with PP
      • filechaos.ppd : The example of a chaotic solution: configuration file for use with PP
      • filePd_point.fixd : For the detection of the period-doubling bifurcation : configuration file for use with FIX
      • file2Pd_point.fixd : For the detection of the period-doubling bifurcation of a 2-periodic solution : configuration file for use with FIX
      • file4Pd_point.fixd : For the detection of the period-doubling bifurcation of a 4-periodic solution : configuration file for use with FIX
      • filePd_point_PD.bfd : Setup file for the calculation of the period-doubling bifurcation of a periodic solution : configuration file for use with BF


Creation of the Programs

The following steps are done in a sub-directory. Any name can be used for the sub-directory. First, the following is executed in the MATLAB command window:

>> BUNKI

After the execution, a window named Select BUNKI Project Directory will open.

index.php?plugin=attach&refer=Duffing_Equation&openfile=project.png

Here the Project to be analyzed is created or selected. At this stage, no Project is generated. Therefore, input a Project name for identification in the Name field and click the OK button. In this case, since the project is the analysis of the Duffing equation, Duffing is used as the project name.*1

index.php?plugin=attach&refer=Duffing_Equation&openfile=project2.png

When creating a new Project, you are asked whether it is okay to create a directory (or folder). Please select Yes. SE (system editor) will start.

index.php?plugin=attach&refer=Duffing_Equation&openfile=startSE.png

We now create the programs for analysis.*2

  • Description of system
    • First, we select what type of system is going to be analyzed. The Duffing equation has two variables and is an Non-autonomous system. Therefore, the Dimension is set to 2,and Nonautonomous is checked as the system type.

      index.php?plugin=attach&refer=Duffing_Equation&openfile=startSE2.png

    • The equations for the Duffing equation is input into the Equations field. Please follow the following rules.
      • State variables : Each state variable should be written as x[i], i = 1,2,...,n . In other words, equations are input using the substitutions x -> x[1]y -> x[2].
      • Parameters : Parameters are placed between two $ symbols to identify that the variable is a parameter. For example, items placed between two $ symbols, such as $para$,$Vm$,$alpha$,etc, are considered parameters. Parameter names can be chosen freely.
      • Sinusoidal force : When handling non-autonomous equations, external forces that can be applied are limited to sinusoidal forces with single frequency. In this case, in the equations, the force is described as cos(t) or sin(t). The angular frequency or the frequency is normarized with a parameter eq_img03.gif.*3.

        index.php?plugin=attach&refer=Duffing_Equation&openfile=startSE3.png

  • Syntax check & program creation
    • The above figure shows the screenshot after the input of the system equation. Click the check button to check whether there are no inconsistencies in the equations. The syntax checking will start.

      index.php?plugin=attach&refer=Duffing_Equation&openfile=startSE4.png

    • After the syntax check, if there are no errors, then programs are created. The bottom-right check button controls which programs are created. To obtain a bifurcation curve, check all of PPFIXBF. Please click Create button to start program creations.

      index.php?plugin=attach&refer=Duffing_Equation&openfile=startSE5.png

      (a): The status bar will be displayed when the system creation starts.

      index.php?plugin=attach&refer=Duffing_Equation&openfile=startSE6.png

      (b): After system creation, a message is shown to indicate that the programs were created without problem in the log window.

PP

Here, we import the initial values of parameters and state variables to draw a phase portrait and to capture a stable periodic solution.

First, start the PP (phase portrait) program from SE. Select Program -> PP.

index.php?plugin=attach&refer=Duffing_Equation&openfile=pp.png

The drawing window and the control panel will start. In the first run, the drawing window is the (x[1],x[2]) plane.*4 Here, there is no need to change the drawing window.

index.php?plugin=attach&refer=Duffing_Equation&openfile=pp2.png

Next, we deal with the control panel. First, we input the values of Initial states and Parameters as the initial condition.*5. The initial points to start the simulations are input (x[1],x[2]) in the Initial states field. Here, let us start from the origin (0,0) !

Please do not forget to input the parameter values before drawing. When first ran, 1 is entered for all parameters. Parameters are configured as follows.

parametervalue
B0.1
B00.1
c10
c31
k0.1
omega1


Next, click the Start button to start simulations. Can you see that the orbit of a solution starting from the origin converges to a periodic solution ? The blue line and red point indicate the orbit of the periodic solution and the points of the stroboscopic map every time of eq_img04.gif, i.e., the point of the Poincare map.

index.php?plugin=attach&refer=Duffing_Equation&openfile=pp3.png

Parameters can be changed in real time. Let us change the parameter B. By increasing the parameter B, the generation of a 2-periodic solution occurs. Then, to click the Clear Button the 2-periodic solution can be check to erase the transient response. By further increasing the value of B, a cascade of the period-doubling bifurcations can be observed. Then, you will see the generation of a chaotic attractor.

index.php?plugin=attach&refer=Duffing_Equation&openfile=pp4.png

Next, we resume simulations after changing the parameter B to the initial value 0.1. Then, let us check the check box states flow in the Plot field. In this way, we can check the current values of the state variables in the list box during numerical integration. The values of the state variables sampled once per 2π/omega-period is output in the list box. In this example, we can see to converge to a stable fixed point of the Poincare map since the same number repeatedly appears in the list box.

index.php?plugin=attach&refer=Duffing_Equation&openfile=pp5.png

Here, by clicking the Clear button, the orbit during the transient response shown in the drawing window can be erased, and the steady state can be observed. Uncheck the check box Orbit, and stop drawing the orbit of the solution. Then only one point corresponding to the stable fixed point is shown on the drawing window since the system converges to a stable fixed point.

index.php?plugin=attach&refer=Duffing_Equation&openfile=pp6.png

Next, let us investigate bifurcations of this periodic solution (the fixed point of the Poincare map). The eigenvalues of the variational equation for the fixed point are evaluated when the parameters are changed. For this purpose, the FIX tool can be used. We pass the initial values to use FIX from PP. The important thing is that the values of the state variables and parameters at the steady state must be passed to FIX.

To confirm whether the system reached a steady state, either check the check box states flow switch and confirm that the values of the state variables no longer change as described above, or click the Status button a few times and confirm that the information displayed in the list box does not change.

index.php?plugin=attach&refer=Duffing_Equation&openfile=pp7.png

After confirming that there are no more changes, select Export current status from Tools in the menu bar. With this procedure, the values of state variables, the parameter values, and other configuration values at the steady state are preserved and can be passed to the next program (see section on FIX).

index.php?plugin=attach&refer=Duffing_Equation&openfile=pp8.png

(a): Select export.

index.php?plugin=attach&refer=Duffing_Equation&openfile=pp9.png

(b): The export of configuration values finished.

FIX

Here, the objective is to track the accurate location of a periodic solution when the parameters are changed and also to monitor the eigenvalues during tracking.

Users must adjust the configurations to run FIX. For simplicity, here let us run FIX as is. Normally, the FIX program is run after the values saved by the PP program (using Export Current status) is imported as the initial values for Newton’s method.*6

First, let us start up the FIX program from the PP control panel. Select Program -> FIX.

index.php?plugin=attach&refer=Duffing_Equation&openfile=fix.png

When initially starting up the FIX, default values are entered in each field.

index.php?plugin=attach&refer=Duffing_Equation&openfile=fix2.png

Information on the fixed point for a periodic solution obtained with PP is imported as the initial configuration value. Select Tools ->Import initial point.

index.php?plugin=attach&refer=Duffing_Equation&openfile=fix3.png

After the selection, the information obtained with PP such as the parameter values and the coordinates of the fixed point for the periodic solution are reflected.

index.php?plugin=attach&refer=Duffing_Equation&openfile=fix4.png

By using PP, we saw that the dynamics of the system changes by increasing the parameter B. Therefore, select the parameter to be changed as B and configure the step size to increase the parameter.

index.php?plugin=attach&refer=Duffing_Equation&openfile=fix5.png

Click the Start button to start calculations. A new window will open when the calculations start. This window is to monitor the location of the eigenvalues on a Gauss plane. The period-doubling bifurcation of a periodic solution occurs when one of the eigenvalues becomes "-1". We can observe that as the parameter changes, the location of the eigenvalues change, and one eigenvalue on the window approaches "-1".

Parameters are continuously changed, and when a bifurcation point is detected, the program stops.*7 In this example, the period-doubling bifurcation is detected because one of the eigenvalues became -1.

index.php?plugin=attach&refer=Duffing_Equation&openfile=fix6.png

The values of the parameters and the state variables when the program stopped can be used as the initial point for BF, the program to track bifurcation curves. The information when the bifurcation point is detected are exported for BF. When Export BF point is selected here, the status, parameter values, and other necessary configuration values are preserved. The preserved values are passed to the next program (see section on BF).

index.php?plugin=attach&refer=Duffing_Equation&openfile=fix7.png

(a): Select the Export BF point.

index.php?plugin=attach&refer=Duffing_Equation&openfile=fix8.png

(b): The exported information is displayed in the list box.

BF

The BF tool is used to obtain a bifurcation curve by changing system parameters.

The user must adjust the configuration to run BF. For simplicity, here let us run BF as is. Normally, the BF program is run after the values of the state variables and parameters at the bifurcation point detected by the FIX program are imported as the initial values for Newton's method.*8

First, let us run the BF program from the FIX main panel. Select Program -> BF.

index.php?plugin=attach&refer=Duffing_Equation&openfile=bf.png

When starting up BF at the first time, default values are entered in each field.

index.php?plugin=attach&refer=Duffing_Equation&openfile=bf2.png

Various information on the bifurcation point obtained with FIX is imported as the initial value. Select Tools ->Import BF point from main panel.

index.php?plugin=attach&refer=Duffing_Equation&openfile=bf3.png

After the selection, various information such as the type of bifurcation and the period of the periodic solution are input automatically into each field. To tracke the bifurcation set on the (B,B0) plane, check the radio button B as the X parameter and B0 as the Y parameter. Furthermore, configure items such as step size to change the parameters and the value to stop the BF when reaching end parameter. To save the calculated results as a data file, input the output file name in Output.

index.php?plugin=attach&refer=Duffing_Equation&openfile=bf4.png

After these configurations, click Start button to start tracking of the bifurcation curve. Then, the Eigenvalues window and Bifurcation diagram window will open as new windows. The Eigenvalues window is used to visualize the change in the root locus of the eigenvalues during calculation of the bifurcation curve. Furthermore, to monitor the change of the root locus, we can visually understand occurrence of a bifurcation point with co-dimension 2. The Bifurcation diagram window is a window to monitor how the period-doubling bifurcation is being tracked in real time.

index.php?plugin=attach&refer=Duffing_Equation&openfile=bf5.png

(a):The root locus of eigenvalues and the status of the list box when BF runs.

index.php?plugin=attach&refer=Duffing_Equation&openfile=bf6.png

(b):Bifurcation diagram in the (B,B0)-plane. The calculation result can be monitored in real time.




*1 Project name can be changed freely. The user should choose a name that is easy to identify.
*2 There is a configuration file for SE as fileDuffing.sed in the sample directory. To import this file, it's able to apply several important information to each field in SE. You can create the programs to only click the Create button. Thus, you can skip various configurations for SE. Please refer to see How to import the configuration file for SE.
*3 The parameters are automatically added during tool generation.
*4 This configuration can be changed from the setting menu of the Main panel.
*5 There is a configuration file of PP as filePd_point.ppd in the sample directory. This file is the configuration file saved the values of state variables and parameters to simulate the behavior related to a periodic solution. To import this file, it's able to simulate the system behavior to only click the Start button. Please refer to see How to import a configuration files for PP. In addition, there are other samples of the configuration file of PP as file2Pd_point.ppdfile4Pd_point.ppdfile8Pd_point.ppdfilechaos.ppd in the sample directory. The configuration files differ to the above example. Please enjoy simulations to import their interesting configuration files.
*6 Another method is to import a file describing the values of the parameters and the state variables. There is a file named filePd_point.fixd under the sample directory where configurations for FIX are saved. This file is a FIX settings file where parameters and initial conditions of the periodic solution described below are saved. Numerical calculations can start after just clicking the Start Button after loading this file. For directions on how to load the file, see How to import configuration files for FIX. The other configuration files file2Pd_point.fixdfile4Pd_point.fixd are also included. These are the initial configuration files for FIX for a stable 2-periodic and a 4-periodic solutions that can be observed with different parameters than the above periodic solution. Calculations with these files detects the period-doubling bifurcation points. Load one of these files to FIX, and please enjoy to search bifurcation points.
*7 Details of this operation can be controlled by using the option of the detection from Settings. For detail, see manual or User's Guides:About FIX.
*8 Another method is to import a file describing parameter and state variable values. There is a file named filePd_point_PD.bfd under the sample directory where configurations for BF are saved. This file is a BF settings file where parameters and initial conditions to track the period-doubling bifurcation of the fixed point for a periodic solution described below are saved. The bifurcation curve can be tracked after just clicking the start button after loading this file. For directions on how to load the file, see How to import a configuration files for BF.

Attach file: fileeq_img04.gif 362 download [Information] fileeq_img03.gif 360 download [Information] fileeq_img02.gif 239 download [Information] fileeq_img01.gif 243 download [Information]

Front page   Edit Freeze Diff Backup Upload Copy Rename Reload   New List of pages Search Recent changes   Help   RSS of recent changes
Last-modified: 2009-07-23 (Thu) 20:13:30 (3309d)