CurvFit (tm): creates algebraic series
for fitting ones data.
CurvFit (tm) is a nonlinear curve fitting program. Sine, damped Sine, Lorentz, Modified Lorentz, Power (ie Polynomial) and Exponential series are presently available models to match your data. We strongly suggest trying a Lorentz series for data with multiple peaks or valleys. A calculator exists for interpolation &/or extrapolation of given data. CurvFit has proven excellent for hard to fit data. Hard to fit data may take more time -but- it can be done given the right series and parameter values. For start try curve fitting your data with a Lorentz series!
Anyone seeking an Online math tutor?
I specialize in solving Differential Equations (DEs) or systems. DEs may be explicit or implicit. There is an App, ODEcalc, on my website that is free and may be of help solving an ODE for you.
Phil Brubaker tutors Differential Equations and other App usage or modification of my AppsOnLine via Zoom from Roseburg, OR. He has a Bachelor degree in Math with a Minor in Electrical Engineering. Tutoring fee is $10/h. Contact Phil now!
A Lorentz function equals 1 / (1 + a x^{2}). This is a shortened form of the infinite series inverse (1 + Σ a_{i} x^{2i}). For practical purposes the shortened Lorentz function is accurate enough. The Lorentz function equals the derivative of the arctangent.
Irregular Heartbeat (AFib) is an example of what maybe detected when curve fitting ones Heartbeat. A Heartbeat may be a asymmetric curve where the fitting series of Lorentz function is a symmetric curve.
A Modified Lorentz function equals (1 + x) / (1 + a x^{2}) = (1 + x) * Lorentz function! Use the modified Lorentz when minimizing number of terms in your curve fit series. (Someone suggested that the modified Lorentz is a Bessel function, is it?)
A Heartbeat may be a asymmetric curve where the fitting series of Modified Lorentz function is also asymmetric curve. A Thin-Film-Head in drives is what got us to create Modified Lorentz function by adding x / (1 + a x^{2}) to the Lorentz function.
Fitting Sinusoidal data is simplified by finding good initial starting values for given sinusoidal data. In order to do this try our SpectrumSolvers program using a simple spectral estimator (e.g. AutoCorr). A good estimator will calculate key frequencies. Use these key frequency values as initial starting values in CurvFit. Without these good initial frequencies values Curve fitting sinusoidal data can be tough.
Curve fitting is an Inverse Problem in some cases. For example, you might have some Ordinary Differential Equations (ODEs) where you know the solution data points but question some parameters in the ODEs. The target would be your data points and parameter values would be what you are trying to determine. Another example would be determining a electrical circuit parameters when you know the (target) circuit response desired. Curve fit data to model is quick and easy in a Calculus (level) programming language. There are many industry Inverse Problems that exist but are not classified as such.
CurvFit is an increased productivity example do to using Calculus programming ... ie. minutes to solve, days or years to understand solution and what it implies (e.g. wrong model, sampling rate error, etc.). CurvFit helps one learn ...
Whether math model is good for given data;
Convergence report tells whether a reasonable
solution; and,
How to select new starting initial parameter
values, model, sampling rate error, etc.)
On this page, I will attempt to guide you through the various routines in order to create a 'picture' for you to understand what's going on. First, the code required and then a sample of output summary.
1. Introduce the Find statement that is used to tweak variables until ones objective(s) are met. The variables may have bounds and constraints that restrick where the selected solver may search for an Optimal solution.
! Find statement is key to tweak variables AND obtain an Optimal
! (i.e., Maximum / Minimum) solutions.
FIND y0, a, pw50, t0; IN curve; ! variable list of those to tweak!
BY AJAX; TO MATCH error ! objective Minimize / Match error variable!
2. This is a sample of code necessary to solve this problem, but hope it gives you an idea what is going on. Variables to tweak (e.g. y0) MUST always be on the rightside of an equal sign; so the solver can change a value when it wants too. Follow y0 variable throughout the code for seeing what is required. Plus, see y0 and other tweaked variables in output section.
model curve
include 'fit.inc'
errsum = 0.d0
do 20 i = 1, nPoints
y = y0: x = time(i): eq = 0.d0
do 10 j = 1, nTerms
call equ( j, x, eq)
if(modelX .ne. 7) then
y = y + eq
else
y = y + eq / abs( b(j))
endif
10 continue
plotErr(i) = (y - data(i)): error(i) = plotErr(i)**2
20 continue
end
model equ( j, x, eq)
include 'fit.inc'
anorm = xnorm / ynorm
if( modelx .eq. 1) then ! Lorentzian series
xj = x - t0(j)
eq = a(j) / (1 + (xj / (pw50(j)/2) )**2)
else if( modelx .eq. 2) then ! Mod. Lorentzian series
ooo
endif
end
ooo
3. The following block shows a sample of output from the AJAX solver. The first column lists the variables being tweaked; some variables are arrays. The next column, INITIAL, shows initial values for variables that gets things rolling. The next columns are the values for that iteration. This problem required 20 iterations to solve for an optimal solution. Solution time was less than 1-second on a 5-year old PC.
Are you ready to give it a try? First step is to download our free Calculus (Level) Compiler (i.e., FC-Compiler), install it, and run some Demo (example) files. Next, copy another (Demo) file and save it under another name in your 'user' folder. Edit this file with your equations and (math) models, then save it. Next, try executing it and see how it goes. Enjoy!
CurvFit 6.71 Download (4 MB) Information:
Last Updated: Nov. 27, 2023 First Published: Oct. 13, 1992 License: free software! Edit source and create your own version. OS:Windows XP or newer Requirements:Windows + Visual Basic 6.0 RunTime files Publisher:Optimal Designs Enterprise
CurvFit 6.71
Click on right Link to Download Now
Description (Click to download)
Price
1.
CurvFit: Fits Lorentz, Sine, Damped Sine, etc. series to data. Learn the power of a Lorentz series to fitting real data!
0
All prices in US Dollars
Curve Fitting Problems in Industry:
Abnormal Heart Beats or EKGs;
Ebola epidemic in West Africa;
1918 influenza pandemic in San Francisco, California;
Many Biological systems; and,
many many many more!
HTML code for linking to this page:
<a
href="https://goal-driven.net/apps/curvfit.html"><img
style="float:left; width:100px" src="https://goal-driven.net/image/curvfit-icon.png"/>
<strong>Nonlinear Curvefitting</strong> </a>: Lorentz
Curve Fitting, Sine Curve Fitting, Damped Sinusoid CurveFitting, etc.
CurvFit: a curve fitting program with Lorentzian, Sine, Exponential and Power series are available models to match your data.
Match-n-Freq: a Matched Filter program used to filter signals and slim pulses.
Industry Problem-Solving Descriptions include:
Business Strategies & War Gaming: Buy, Sell, Hold options may be tested for an entire company, individual plant(s), or whole product lines. Imagine an increase in control settings from a 1 or 2 digits (i.e., a guess value) to an 8+ digit accuracy resulting from a Calculus programming calculation!
Voice Coil Motor: basically an electromagnetic transducer in which a coil placed in a magnetic pole gap experiences a force proportional to the current passing through the coil.
Electrical Filter Design: find the transfer function's poles & zeros; H(s) = Y_{out}(s) / Y_{in}(s).
AC Motor Design: a simulation program for A.C. motor design that was reapplied as a constrained optimization problem with 12 unknown parameters and 7 constraints.
PharmacoKinetics: an open-two- compartment model with first order absorption into elimination from central compartment is presented here.
Calculus (level) Problem-Solving for Engineers & Scientists