How do I fit a non linear curve? The Next CEO of Stack OverflowOil drop experiment--How was the result so accurate?How does the Double Slit Experiment work in detail?Curve Fitting and Multiple ExperimentsFitting an exponential when values are negative (while taking error into account)Power fit to some experimental dataDamped Harmonic Curve fit and ForceConstant wind drag while falling?Non-linear graph getting from an experiment finding the enthalpy of vaporization of LNPeriodic, linear increase in photon countsWhat is the scientific method for finding a theoretical explanation for experimental data?
Man transported from Alternate World into ours by a Neutrino Detector
Pulling the principal components out of a DimensionReducerFunction?
Does destroying a Lich's phylactery destroy the soul within it?
Yu-Gi-Oh cards in Python 3
Graph of the history of databases
What does "shotgun unity" refer to here in this sentence?
what's the use of '% to gdp' type of variables?
Help/tips for a first time writer?
Audio Conversion With ADS1243
Traduction de « Life is a roller coaster »
Do I need to write [sic] when including a quotation with a number less than 10 that isn't written out?
Can I calculate next year's exemptions based on this year's refund/amount owed?
Touchpad not working on Debian 9
Could a dragon use its wings to swim?
Is fine stranded wire ok for main supply line?
Reshaping json / reparing json inside shell script (remove trailing comma)
Lucky Feat: How can "more than one creature spend a luck point to influence the outcome of a roll"?
Can Sneak Attack be used when hitting with an improvised weapon?
How to get the last not-null value in an ordered column of a huge table?
Why is the US ranked as #45 in Press Freedom ratings, despite its extremely permissive free speech laws?
Can you teleport closer to a creature you are Frightened of?
Is there a way to save my career from absolute disaster?
Is it okay to majorly distort historical facts while writing a fiction story?
My ex-girlfriend uses my Apple ID to login to her iPad, do I have to give her my Apple ID password to reset it?
How do I fit a non linear curve?
The Next CEO of Stack OverflowOil drop experiment--How was the result so accurate?How does the Double Slit Experiment work in detail?Curve Fitting and Multiple ExperimentsFitting an exponential when values are negative (while taking error into account)Power fit to some experimental dataDamped Harmonic Curve fit and ForceConstant wind drag while falling?Non-linear graph getting from an experiment finding the enthalpy of vaporization of LNPeriodic, linear increase in photon countsWhat is the scientific method for finding a theoretical explanation for experimental data?
$begingroup$
In an experiment that I did, i collected data points $ (ω,υ(ω))$ that are modeled by the equation:
$$ υ(ω)=fracωCsqrt(ω^2-ω_0^2)^2+γ^2ω^2$$
How can do I fit a curve here ? and how can I extract $γ$ through this process ?
experimental-physics experimental-technique
$endgroup$
add a comment |
$begingroup$
In an experiment that I did, i collected data points $ (ω,υ(ω))$ that are modeled by the equation:
$$ υ(ω)=fracωCsqrt(ω^2-ω_0^2)^2+γ^2ω^2$$
How can do I fit a curve here ? and how can I extract $γ$ through this process ?
experimental-physics experimental-technique
$endgroup$
add a comment |
$begingroup$
In an experiment that I did, i collected data points $ (ω,υ(ω))$ that are modeled by the equation:
$$ υ(ω)=fracωCsqrt(ω^2-ω_0^2)^2+γ^2ω^2$$
How can do I fit a curve here ? and how can I extract $γ$ through this process ?
experimental-physics experimental-technique
$endgroup$
In an experiment that I did, i collected data points $ (ω,υ(ω))$ that are modeled by the equation:
$$ υ(ω)=fracωCsqrt(ω^2-ω_0^2)^2+γ^2ω^2$$
How can do I fit a curve here ? and how can I extract $γ$ through this process ?
experimental-physics experimental-technique
experimental-physics experimental-technique
asked 5 hours ago
Andreas MastronikolisAndreas Mastronikolis
725
725
add a comment |
add a comment |
4 Answers
4
active
oldest
votes
$begingroup$
What you want to find is the parameters $theta=(C, omega_0, gamma)$ that minimizes the difference between $nu(omega|theta)$ (the curve given the parameters) and the measured $nu_i$ values.
The most popular method is least mean square fitting, which minimizes the sum of the squares of the differences. One can also do it by formulating the normal equations and solve it as a (potentially big) linear equation system. Another approach is the Gauss-Newton algorithm, a simple iterative method to do it. It is a good exercise to implement the solution oneself, but once you have done it once or twice it is best to rely on some software package.
Note that this kind of fitting works well when you know the functional form (your equation for $nu(omega)$), since you can ensure only that the parameters that matter are included. If you try to fit some general polynomial or function you can get overfitting (some complex curve that fits all the data but has nothing to do with your problem) besides the problem of identifying the parameters you care about.
$endgroup$
add a comment |
$begingroup$
Don't try using any general-purpose curve fitting algorithm for this.
The form of your function looks like a frequency response function, with the two unknown parameters $omega_0$ and $gamma$ - i.e. the resonant frequency, and the damping parameter. The function you specified omits an important feature if this is measured data, namely the relative phase between the "force" driving the oscillation and the response.
If you didn't measure the phase at each frequency, repeat the experiment, because that is critical information.
When you have the amplitude and phase data, there are curve fitting techniques devised specifically for this problem of "system identification" in experimental modal analysis. A simple one is the so-called "circle fitting" method. If you make a Nyquist plot of your measured data (i.e. plot imaginary part of the response against the real part), the section of the curve near the resonance is a circle, and you can fit a circle to the measured data and find the parameters from it.
In practice, a simplistic approach assuming the system only has one resonance often doesn't work well, because the response of a real system near resonance also includes the off-resonance response to all the other vibration modes. If the resonant frequencies are well separated and lightly damped, it is possible to correct for this while fitting "one mode at a time". If this is not the case, you need methods that can identify several resonances simultaneously from one response function.
Rather than re-invent the wheel, use existing code. The signal processing toolbox in MATLAB would be a good starting point - for example https://uk.mathworks.com/help/signal/ref/modalfit.html
$endgroup$
1
$begingroup$
That is, of course, if the phase information is experimentally accessible. It's measurable in plenty of systems, but there are also many cases where it is either inaccessible or much more expensive to access.
$endgroup$
– Emilio Pisanty
2 hours ago
$begingroup$
what is a well-known method for identifying several closely spaced resonances at the same time?
$endgroup$
– IamAStudent
2 hours ago
add a comment |
$begingroup$
Are you looking for something like polynomial regression? The general idea is, if you have measured pairs of (x, y(x)) and you are looking for find a fit of the form:
$$y = alpha_0 + alpha_1 x + alpha_2 x^2 ...$$
You can write this in matrix form as:
$$beginbmatrix y_1 \ y_2 \ y_3 \ vdots \ y_n endbmatrix = beginbmatrix 1 & x_1 & x_1^2 & cdots \ 1 & x_2 & x_2^2 & cdots \ 1 & x_3 & x_3^2 & cdots \ vdots & vdots & vdots & vdots \ 1 & x_n &x_n^2 & cdots endbmatrix beginbmatrix beta_0 \ beta_1 \ beta_2 \ vdots \ beta_m endbmatrix$$
This can now be solved for your coefficients, $beta_i$. That being said, and as was hinted at in your comments, I've never actually done this, and have instead used non-linear fitting functions provided by libraries.
More information on polynomial regression on the wikipedia page.
New contributor
$endgroup$
2
$begingroup$
The answer is yes if the equation can be reduced to a polynomial one. I don't think it can be though.
$endgroup$
– Andreas Mastronikolis
4 hours ago
$begingroup$
Then I think your only choice is to follow the advice as given in Anders Sandberg's answer and use one of the fitting techniques suggested there.
$endgroup$
– Anon1759
4 hours ago
add a comment |
$begingroup$
If we put:
$$Y = fracomega^2u(omega)^2$$
and
$$X = omega^2$$
the equation becomes:
$$Y =fracX^2C^2 +frac(gamma^2 - 2 omega_0^2)C^2 X + fracomega_0^4C^2$$
You can then extract the coefficients using polynomial fitting. To get the least-squares fit right, you have to compute the errors in $Y$ and $X$ for each data point from the measurement errors in $omega$ and $u(omega)$.
$endgroup$
add a comment |
StackExchange.ifUsing("editor", function ()
return StackExchange.using("mathjaxEditing", function ()
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
);
);
, "mathjax-editing");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "151"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fphysics.stackexchange.com%2fquestions%2f469754%2fhow-do-i-fit-a-non-linear-curve%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
What you want to find is the parameters $theta=(C, omega_0, gamma)$ that minimizes the difference between $nu(omega|theta)$ (the curve given the parameters) and the measured $nu_i$ values.
The most popular method is least mean square fitting, which minimizes the sum of the squares of the differences. One can also do it by formulating the normal equations and solve it as a (potentially big) linear equation system. Another approach is the Gauss-Newton algorithm, a simple iterative method to do it. It is a good exercise to implement the solution oneself, but once you have done it once or twice it is best to rely on some software package.
Note that this kind of fitting works well when you know the functional form (your equation for $nu(omega)$), since you can ensure only that the parameters that matter are included. If you try to fit some general polynomial or function you can get overfitting (some complex curve that fits all the data but has nothing to do with your problem) besides the problem of identifying the parameters you care about.
$endgroup$
add a comment |
$begingroup$
What you want to find is the parameters $theta=(C, omega_0, gamma)$ that minimizes the difference between $nu(omega|theta)$ (the curve given the parameters) and the measured $nu_i$ values.
The most popular method is least mean square fitting, which minimizes the sum of the squares of the differences. One can also do it by formulating the normal equations and solve it as a (potentially big) linear equation system. Another approach is the Gauss-Newton algorithm, a simple iterative method to do it. It is a good exercise to implement the solution oneself, but once you have done it once or twice it is best to rely on some software package.
Note that this kind of fitting works well when you know the functional form (your equation for $nu(omega)$), since you can ensure only that the parameters that matter are included. If you try to fit some general polynomial or function you can get overfitting (some complex curve that fits all the data but has nothing to do with your problem) besides the problem of identifying the parameters you care about.
$endgroup$
add a comment |
$begingroup$
What you want to find is the parameters $theta=(C, omega_0, gamma)$ that minimizes the difference between $nu(omega|theta)$ (the curve given the parameters) and the measured $nu_i$ values.
The most popular method is least mean square fitting, which minimizes the sum of the squares of the differences. One can also do it by formulating the normal equations and solve it as a (potentially big) linear equation system. Another approach is the Gauss-Newton algorithm, a simple iterative method to do it. It is a good exercise to implement the solution oneself, but once you have done it once or twice it is best to rely on some software package.
Note that this kind of fitting works well when you know the functional form (your equation for $nu(omega)$), since you can ensure only that the parameters that matter are included. If you try to fit some general polynomial or function you can get overfitting (some complex curve that fits all the data but has nothing to do with your problem) besides the problem of identifying the parameters you care about.
$endgroup$
What you want to find is the parameters $theta=(C, omega_0, gamma)$ that minimizes the difference between $nu(omega|theta)$ (the curve given the parameters) and the measured $nu_i$ values.
The most popular method is least mean square fitting, which minimizes the sum of the squares of the differences. One can also do it by formulating the normal equations and solve it as a (potentially big) linear equation system. Another approach is the Gauss-Newton algorithm, a simple iterative method to do it. It is a good exercise to implement the solution oneself, but once you have done it once or twice it is best to rely on some software package.
Note that this kind of fitting works well when you know the functional form (your equation for $nu(omega)$), since you can ensure only that the parameters that matter are included. If you try to fit some general polynomial or function you can get overfitting (some complex curve that fits all the data but has nothing to do with your problem) besides the problem of identifying the parameters you care about.
answered 4 hours ago
Anders SandbergAnders Sandberg
9,91521429
9,91521429
add a comment |
add a comment |
$begingroup$
Don't try using any general-purpose curve fitting algorithm for this.
The form of your function looks like a frequency response function, with the two unknown parameters $omega_0$ and $gamma$ - i.e. the resonant frequency, and the damping parameter. The function you specified omits an important feature if this is measured data, namely the relative phase between the "force" driving the oscillation and the response.
If you didn't measure the phase at each frequency, repeat the experiment, because that is critical information.
When you have the amplitude and phase data, there are curve fitting techniques devised specifically for this problem of "system identification" in experimental modal analysis. A simple one is the so-called "circle fitting" method. If you make a Nyquist plot of your measured data (i.e. plot imaginary part of the response against the real part), the section of the curve near the resonance is a circle, and you can fit a circle to the measured data and find the parameters from it.
In practice, a simplistic approach assuming the system only has one resonance often doesn't work well, because the response of a real system near resonance also includes the off-resonance response to all the other vibration modes. If the resonant frequencies are well separated and lightly damped, it is possible to correct for this while fitting "one mode at a time". If this is not the case, you need methods that can identify several resonances simultaneously from one response function.
Rather than re-invent the wheel, use existing code. The signal processing toolbox in MATLAB would be a good starting point - for example https://uk.mathworks.com/help/signal/ref/modalfit.html
$endgroup$
1
$begingroup$
That is, of course, if the phase information is experimentally accessible. It's measurable in plenty of systems, but there are also many cases where it is either inaccessible or much more expensive to access.
$endgroup$
– Emilio Pisanty
2 hours ago
$begingroup$
what is a well-known method for identifying several closely spaced resonances at the same time?
$endgroup$
– IamAStudent
2 hours ago
add a comment |
$begingroup$
Don't try using any general-purpose curve fitting algorithm for this.
The form of your function looks like a frequency response function, with the two unknown parameters $omega_0$ and $gamma$ - i.e. the resonant frequency, and the damping parameter. The function you specified omits an important feature if this is measured data, namely the relative phase between the "force" driving the oscillation and the response.
If you didn't measure the phase at each frequency, repeat the experiment, because that is critical information.
When you have the amplitude and phase data, there are curve fitting techniques devised specifically for this problem of "system identification" in experimental modal analysis. A simple one is the so-called "circle fitting" method. If you make a Nyquist plot of your measured data (i.e. plot imaginary part of the response against the real part), the section of the curve near the resonance is a circle, and you can fit a circle to the measured data and find the parameters from it.
In practice, a simplistic approach assuming the system only has one resonance often doesn't work well, because the response of a real system near resonance also includes the off-resonance response to all the other vibration modes. If the resonant frequencies are well separated and lightly damped, it is possible to correct for this while fitting "one mode at a time". If this is not the case, you need methods that can identify several resonances simultaneously from one response function.
Rather than re-invent the wheel, use existing code. The signal processing toolbox in MATLAB would be a good starting point - for example https://uk.mathworks.com/help/signal/ref/modalfit.html
$endgroup$
1
$begingroup$
That is, of course, if the phase information is experimentally accessible. It's measurable in plenty of systems, but there are also many cases where it is either inaccessible or much more expensive to access.
$endgroup$
– Emilio Pisanty
2 hours ago
$begingroup$
what is a well-known method for identifying several closely spaced resonances at the same time?
$endgroup$
– IamAStudent
2 hours ago
add a comment |
$begingroup$
Don't try using any general-purpose curve fitting algorithm for this.
The form of your function looks like a frequency response function, with the two unknown parameters $omega_0$ and $gamma$ - i.e. the resonant frequency, and the damping parameter. The function you specified omits an important feature if this is measured data, namely the relative phase between the "force" driving the oscillation and the response.
If you didn't measure the phase at each frequency, repeat the experiment, because that is critical information.
When you have the amplitude and phase data, there are curve fitting techniques devised specifically for this problem of "system identification" in experimental modal analysis. A simple one is the so-called "circle fitting" method. If you make a Nyquist plot of your measured data (i.e. plot imaginary part of the response against the real part), the section of the curve near the resonance is a circle, and you can fit a circle to the measured data and find the parameters from it.
In practice, a simplistic approach assuming the system only has one resonance often doesn't work well, because the response of a real system near resonance also includes the off-resonance response to all the other vibration modes. If the resonant frequencies are well separated and lightly damped, it is possible to correct for this while fitting "one mode at a time". If this is not the case, you need methods that can identify several resonances simultaneously from one response function.
Rather than re-invent the wheel, use existing code. The signal processing toolbox in MATLAB would be a good starting point - for example https://uk.mathworks.com/help/signal/ref/modalfit.html
$endgroup$
Don't try using any general-purpose curve fitting algorithm for this.
The form of your function looks like a frequency response function, with the two unknown parameters $omega_0$ and $gamma$ - i.e. the resonant frequency, and the damping parameter. The function you specified omits an important feature if this is measured data, namely the relative phase between the "force" driving the oscillation and the response.
If you didn't measure the phase at each frequency, repeat the experiment, because that is critical information.
When you have the amplitude and phase data, there are curve fitting techniques devised specifically for this problem of "system identification" in experimental modal analysis. A simple one is the so-called "circle fitting" method. If you make a Nyquist plot of your measured data (i.e. plot imaginary part of the response against the real part), the section of the curve near the resonance is a circle, and you can fit a circle to the measured data and find the parameters from it.
In practice, a simplistic approach assuming the system only has one resonance often doesn't work well, because the response of a real system near resonance also includes the off-resonance response to all the other vibration modes. If the resonant frequencies are well separated and lightly damped, it is possible to correct for this while fitting "one mode at a time". If this is not the case, you need methods that can identify several resonances simultaneously from one response function.
Rather than re-invent the wheel, use existing code. The signal processing toolbox in MATLAB would be a good starting point - for example https://uk.mathworks.com/help/signal/ref/modalfit.html
edited 3 hours ago
answered 4 hours ago
alephzeroalephzero
5,61621120
5,61621120
1
$begingroup$
That is, of course, if the phase information is experimentally accessible. It's measurable in plenty of systems, but there are also many cases where it is either inaccessible or much more expensive to access.
$endgroup$
– Emilio Pisanty
2 hours ago
$begingroup$
what is a well-known method for identifying several closely spaced resonances at the same time?
$endgroup$
– IamAStudent
2 hours ago
add a comment |
1
$begingroup$
That is, of course, if the phase information is experimentally accessible. It's measurable in plenty of systems, but there are also many cases where it is either inaccessible or much more expensive to access.
$endgroup$
– Emilio Pisanty
2 hours ago
$begingroup$
what is a well-known method for identifying several closely spaced resonances at the same time?
$endgroup$
– IamAStudent
2 hours ago
1
1
$begingroup$
That is, of course, if the phase information is experimentally accessible. It's measurable in plenty of systems, but there are also many cases where it is either inaccessible or much more expensive to access.
$endgroup$
– Emilio Pisanty
2 hours ago
$begingroup$
That is, of course, if the phase information is experimentally accessible. It's measurable in plenty of systems, but there are also many cases where it is either inaccessible or much more expensive to access.
$endgroup$
– Emilio Pisanty
2 hours ago
$begingroup$
what is a well-known method for identifying several closely spaced resonances at the same time?
$endgroup$
– IamAStudent
2 hours ago
$begingroup$
what is a well-known method for identifying several closely spaced resonances at the same time?
$endgroup$
– IamAStudent
2 hours ago
add a comment |
$begingroup$
Are you looking for something like polynomial regression? The general idea is, if you have measured pairs of (x, y(x)) and you are looking for find a fit of the form:
$$y = alpha_0 + alpha_1 x + alpha_2 x^2 ...$$
You can write this in matrix form as:
$$beginbmatrix y_1 \ y_2 \ y_3 \ vdots \ y_n endbmatrix = beginbmatrix 1 & x_1 & x_1^2 & cdots \ 1 & x_2 & x_2^2 & cdots \ 1 & x_3 & x_3^2 & cdots \ vdots & vdots & vdots & vdots \ 1 & x_n &x_n^2 & cdots endbmatrix beginbmatrix beta_0 \ beta_1 \ beta_2 \ vdots \ beta_m endbmatrix$$
This can now be solved for your coefficients, $beta_i$. That being said, and as was hinted at in your comments, I've never actually done this, and have instead used non-linear fitting functions provided by libraries.
More information on polynomial regression on the wikipedia page.
New contributor
$endgroup$
2
$begingroup$
The answer is yes if the equation can be reduced to a polynomial one. I don't think it can be though.
$endgroup$
– Andreas Mastronikolis
4 hours ago
$begingroup$
Then I think your only choice is to follow the advice as given in Anders Sandberg's answer and use one of the fitting techniques suggested there.
$endgroup$
– Anon1759
4 hours ago
add a comment |
$begingroup$
Are you looking for something like polynomial regression? The general idea is, if you have measured pairs of (x, y(x)) and you are looking for find a fit of the form:
$$y = alpha_0 + alpha_1 x + alpha_2 x^2 ...$$
You can write this in matrix form as:
$$beginbmatrix y_1 \ y_2 \ y_3 \ vdots \ y_n endbmatrix = beginbmatrix 1 & x_1 & x_1^2 & cdots \ 1 & x_2 & x_2^2 & cdots \ 1 & x_3 & x_3^2 & cdots \ vdots & vdots & vdots & vdots \ 1 & x_n &x_n^2 & cdots endbmatrix beginbmatrix beta_0 \ beta_1 \ beta_2 \ vdots \ beta_m endbmatrix$$
This can now be solved for your coefficients, $beta_i$. That being said, and as was hinted at in your comments, I've never actually done this, and have instead used non-linear fitting functions provided by libraries.
More information on polynomial regression on the wikipedia page.
New contributor
$endgroup$
2
$begingroup$
The answer is yes if the equation can be reduced to a polynomial one. I don't think it can be though.
$endgroup$
– Andreas Mastronikolis
4 hours ago
$begingroup$
Then I think your only choice is to follow the advice as given in Anders Sandberg's answer and use one of the fitting techniques suggested there.
$endgroup$
– Anon1759
4 hours ago
add a comment |
$begingroup$
Are you looking for something like polynomial regression? The general idea is, if you have measured pairs of (x, y(x)) and you are looking for find a fit of the form:
$$y = alpha_0 + alpha_1 x + alpha_2 x^2 ...$$
You can write this in matrix form as:
$$beginbmatrix y_1 \ y_2 \ y_3 \ vdots \ y_n endbmatrix = beginbmatrix 1 & x_1 & x_1^2 & cdots \ 1 & x_2 & x_2^2 & cdots \ 1 & x_3 & x_3^2 & cdots \ vdots & vdots & vdots & vdots \ 1 & x_n &x_n^2 & cdots endbmatrix beginbmatrix beta_0 \ beta_1 \ beta_2 \ vdots \ beta_m endbmatrix$$
This can now be solved for your coefficients, $beta_i$. That being said, and as was hinted at in your comments, I've never actually done this, and have instead used non-linear fitting functions provided by libraries.
More information on polynomial regression on the wikipedia page.
New contributor
$endgroup$
Are you looking for something like polynomial regression? The general idea is, if you have measured pairs of (x, y(x)) and you are looking for find a fit of the form:
$$y = alpha_0 + alpha_1 x + alpha_2 x^2 ...$$
You can write this in matrix form as:
$$beginbmatrix y_1 \ y_2 \ y_3 \ vdots \ y_n endbmatrix = beginbmatrix 1 & x_1 & x_1^2 & cdots \ 1 & x_2 & x_2^2 & cdots \ 1 & x_3 & x_3^2 & cdots \ vdots & vdots & vdots & vdots \ 1 & x_n &x_n^2 & cdots endbmatrix beginbmatrix beta_0 \ beta_1 \ beta_2 \ vdots \ beta_m endbmatrix$$
This can now be solved for your coefficients, $beta_i$. That being said, and as was hinted at in your comments, I've never actually done this, and have instead used non-linear fitting functions provided by libraries.
More information on polynomial regression on the wikipedia page.
New contributor
New contributor
answered 4 hours ago
Anon1759Anon1759
492
492
New contributor
New contributor
2
$begingroup$
The answer is yes if the equation can be reduced to a polynomial one. I don't think it can be though.
$endgroup$
– Andreas Mastronikolis
4 hours ago
$begingroup$
Then I think your only choice is to follow the advice as given in Anders Sandberg's answer and use one of the fitting techniques suggested there.
$endgroup$
– Anon1759
4 hours ago
add a comment |
2
$begingroup$
The answer is yes if the equation can be reduced to a polynomial one. I don't think it can be though.
$endgroup$
– Andreas Mastronikolis
4 hours ago
$begingroup$
Then I think your only choice is to follow the advice as given in Anders Sandberg's answer and use one of the fitting techniques suggested there.
$endgroup$
– Anon1759
4 hours ago
2
2
$begingroup$
The answer is yes if the equation can be reduced to a polynomial one. I don't think it can be though.
$endgroup$
– Andreas Mastronikolis
4 hours ago
$begingroup$
The answer is yes if the equation can be reduced to a polynomial one. I don't think it can be though.
$endgroup$
– Andreas Mastronikolis
4 hours ago
$begingroup$
Then I think your only choice is to follow the advice as given in Anders Sandberg's answer and use one of the fitting techniques suggested there.
$endgroup$
– Anon1759
4 hours ago
$begingroup$
Then I think your only choice is to follow the advice as given in Anders Sandberg's answer and use one of the fitting techniques suggested there.
$endgroup$
– Anon1759
4 hours ago
add a comment |
$begingroup$
If we put:
$$Y = fracomega^2u(omega)^2$$
and
$$X = omega^2$$
the equation becomes:
$$Y =fracX^2C^2 +frac(gamma^2 - 2 omega_0^2)C^2 X + fracomega_0^4C^2$$
You can then extract the coefficients using polynomial fitting. To get the least-squares fit right, you have to compute the errors in $Y$ and $X$ for each data point from the measurement errors in $omega$ and $u(omega)$.
$endgroup$
add a comment |
$begingroup$
If we put:
$$Y = fracomega^2u(omega)^2$$
and
$$X = omega^2$$
the equation becomes:
$$Y =fracX^2C^2 +frac(gamma^2 - 2 omega_0^2)C^2 X + fracomega_0^4C^2$$
You can then extract the coefficients using polynomial fitting. To get the least-squares fit right, you have to compute the errors in $Y$ and $X$ for each data point from the measurement errors in $omega$ and $u(omega)$.
$endgroup$
add a comment |
$begingroup$
If we put:
$$Y = fracomega^2u(omega)^2$$
and
$$X = omega^2$$
the equation becomes:
$$Y =fracX^2C^2 +frac(gamma^2 - 2 omega_0^2)C^2 X + fracomega_0^4C^2$$
You can then extract the coefficients using polynomial fitting. To get the least-squares fit right, you have to compute the errors in $Y$ and $X$ for each data point from the measurement errors in $omega$ and $u(omega)$.
$endgroup$
If we put:
$$Y = fracomega^2u(omega)^2$$
and
$$X = omega^2$$
the equation becomes:
$$Y =fracX^2C^2 +frac(gamma^2 - 2 omega_0^2)C^2 X + fracomega_0^4C^2$$
You can then extract the coefficients using polynomial fitting. To get the least-squares fit right, you have to compute the errors in $Y$ and $X$ for each data point from the measurement errors in $omega$ and $u(omega)$.
answered 55 mins ago
Count IblisCount Iblis
8,40411439
8,40411439
add a comment |
add a comment |
Thanks for contributing an answer to Physics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fphysics.stackexchange.com%2fquestions%2f469754%2fhow-do-i-fit-a-non-linear-curve%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown