#### File Exchange > DataAnalysis >    Fit ODE

Author:
OriginLab Technical Support
11/27/2018
Last Update:
12/23/2019
673
Total Ratings:
3
File Size:
1092 KB
Average Rating:
File Name:
Fit ODE.opx
File Version:
1.3
Minimum Versions:
Free
Summary:

Fit ordinary differential equation

Screen Shot and Video:
Description:

• Purpose
This app is capable of fitting ordinary differential equation.
• Installation
Download the file "Fit ODE.opx", and then drag-and-drop onto the Origin workspace. An icon will appear in the Apps gallery window.
• Operation
1. Import the related XY data into Origin.
2. Create a 2d scatter or line plot using the imported data.
3. With this graph activated, click the icon of this app from the Apps gallery window to bring up the main dialog.
4. Then set the equation, integration for equation and initial conditions.
5. Click the Create FDF button to create fitting function with the settings. You can also save the fitting function by clicking Save FDF button.
6. Click Fit Control button to open Fit Control dialog.
7. In Fit Control dialog, input the initial values for parameters, or load/save/reinit the parameters. You can also change the settings for iteration, together to change the output result options. Click 1 Iter./Fit button to perform the fitting. And click OK button to go back the main dialog.
8. In the main dialog, if fitting is not done yet, you can also click the Fit button to perform fitting. Click OK button to generate the report.
• Dialog Settings:
• Equation(s) Group
• Type: Options include
• Equation: Solve ordinary differential equation.
• System of Equations: Solve system of first order differential equations.
• Order: If Type is Equation, this specifies order of the differential equation.
• y'': Specify the ordinary differntial equation.
• Parameters: The fitting parameters parsed from the specified equation.
• Number of Equations: If Type is System of Equations, this specifies number of equations of the system.
• dy#/dx =: Specify the system of differential equations.
• Choose Dependent: For system of differential equations, this is for choosing y# as dependent of fitting, at lease one is chosen.
• y#: Select plot data for the dependent.
• Integration
• Range: Specify the start and end values of integration interval.
• Number of Points: Specify number of points to output. The points are evenly sampled from the integration interval.
• Method: Specify integration algorithm. Options include Runge-Kutta (usually this is your first choice), Adams, and BDF(Stiff) (Backward Differentiation Formulae, is suitable for stiff problems). For Runge-Kutta, RK order is avaiable, and options include RK23, RK45 and RK78.
• Relative Tolerance: This is for controlling the error in the integration, and is avaiable for Runge-Kutta and BDF(Stiff) methods. When method is Runge-Kutta, experience suggests for relative tolerance are as following according to RK order: RK23 - (1e-2~1e-4), RK45 - (1e-3 1e-6), RK78 - (1e-5).
• Mixed Tolerance: This is available when method is Adams. It is used to control the error in the integration.
• Initial Conditions
• Initial Value: Specify initial values of the independent variable.
• Include as Parameter: If include the initial value as parameter of the fitting function.
• Parameter Name: Specify the parameter name of the initial value used in fitting function.
• Fixed: Specify if to fix this initial value in fitting function.
• Output Derivatives: Specify derivatives to output. This is available only when Equation has been selected for Type and Order is larger than 1.
• Buttons
• Fit Control: Open the Fit Control for the fitting settings.
• Fit: Perform the fitting with the created/saved FDF (fitting function) on the current data.
• OK: Output report and close dialog. If fitting is not done, make it done first.
• Create FDF: Create FDF file (fitting function) using the current settings.
• Save FDF: Save the created FDF file to User Files Folder.
• Cancel: Do nothing but close dialog.
• Fit Control Dialog
• Parameters Tab: In the table, all parameters are listed. You can change their initial values, whether to fix them, and set lower/upper bounds for them.
• Fit Control Tab: Please refer to Fit Control and Constraints for details.
• Quantities Tab: Please refer to Quantities to Compute for the details.
• Buttons
• Load: Load initial settings for parameters.
• Save: Save the current initial settings of parameters.
• Reinit: Re-initialize parameter values.
• 1 Iter.: Perform 1 iteration with current parameter settings.
• Fit: Perform fitting until converged or the max number of iterations is reached, or meet the tolerance.
• OK: Close the Fit Control dialog.