Uncertainty Analysis Homework: Vel Calc from Line of Best Fit

AI Thread Summary
The discussion revolves around calculating the uncertainty in velocity derived from a fitted oscillatory motion equation using MATLAB. The user has successfully determined the line of best fit and calculated the root mean square error (u_y) but is uncertain about how to propagate this error to find the uncertainty in velocity (u_v). Various approaches are suggested, including using Kline Mcclintock error propagation and focusing on the amplitude parameter A as the primary source of uncertainty. The conversation highlights the importance of understanding correlations between uncertainties and emphasizes that time is not a variable of concern in this analysis. Ultimately, the participants are working towards a clearer method for estimating the uncertainty in velocity based on their fitted model.
Mech-Master
Messages
13
Reaction score
0

Homework Statement



Hey everyone,

I've data for some oscillatory motion. I used MATLAB to find line of best fit for the data. I got a line of the following form

y = A*sin(2*pi*f*t + ø)

I got the root mean square error between my data and the line of best fit (call it u_y)

Now I want to differentiate the above equation to get the velocity

V = dy/dt.

How do I get the uncertainity for V?

The Attempt at a Solution



I'm really stuck. I'm trying to use Kline Mcclintock error propagation to solve for uncertainty of the Velocity.

V = dy/dt

u_v = √( (dv/dy * u_y)^2 + (dv/dt*u_y)^2 )

Is this the right approach??
 
Physics news on Phys.org
Do you mean (dv/dt*u_t)^2 for the second expression?
Do you have a time uncertainty?

V=2 pi f A cos(...), you can do the uncertainty analysis based on that formula (but keep correlations between the individual uncertainties in mind).
Alternatively, you can try to use other parameters such that the velocity is a more direct function of them. Then Matlab can do more of the work.
 
mfb said:
Do you mean (dv/dt*u_t)^2 for the second expression?
Do you have a time uncertainty?

V=2 pi f A cos(...), you can do the uncertainty analysis based on that formula (but keep correlations between the individual uncertainties in mind).
Alternatively, you can try to use other parameters such that the velocity is a more direct function of them. Then Matlab can do more of the work.

Yes I mean (dv/dt*u_t)^2.

I do not have time uncertainty. The only thing I have is position (y) uncertainty. For this reason, I could not do the uncertainty analysis based on V=2 pi f A cos(...).
 
Let Yi be the data point at time ti, and assume that there is no time uncertainty. Also, let yi represent the value of your fit at time ti. Then your estimate of the average velocity from your data on the interval from ti to ti+1 is V=(Yi+1-Y1)/(ti+1-ti). Similarly, your estimate of the average velocity from you fit to the data on the same interval is v=(yi+1-y1)/(ti+1-ti). So your estimate of the deviation of the average velocity over the interval is
δv=\frac{Y_{i+1}-Y_i}{t_{i+1}-t_i}-\frac{y_{i+1}-y_i}{t_{i+1}-t_i}=\frac{δ_{i+1}-δ_i}{t_{i+1}-t_i}
where δi=Yi-yi
The square of the deviation on velocity is:
(δv)^2=\left(\frac{δ_{i+1}-δ_i}{t_{i+1}-t_i}\right)^2=\frac{δ_{i+1}^2+δ_{i}^2-2δ_{i+1}δ_{i}}{(t_{i+1}-t_i)^2}
Just multiply each of these by ti+1-ti, add them up, and divide by the total amount of time T.
 
  • Like
Likes 1 person
Thank you,

Does the following work out as well?

V = f(y)

therefore,

u_v = √( (dv/dy * u_y)^2)

where dv/dy = dv/dt * dt/dy

y = Asin(2*pi*t*f + ø)

t = (arcsin(y/A) - ø) / (2*pi*f) (then differentiate to get dt/dy)

?

Also, if this DOES work. I will need to sum up dv/dt and divide it by number of data. is this correct?
 
Mech-Master said:
Thank you,

Does the following work out as well?

V = f(y)

therefore,

u_v = √( (dv/dy * u_y)^2)

where dv/dy = dv/dt * dt/dy

y = Asin(2*pi*t*f + ø)

t = (arcsin(y/A) - ø) / (2*pi*f) (then differentiate to get dt/dy)

?

Also, if this DOES work. I will need to sum up dv/dt and divide it by number of data. is this correct?
I'm unable to follow what you did. Maybe someone else can.
Chet
 
Chestermiller said:
So your estimate of the deviation of the average velocity over the interval is
δv=\frac{Y_{i+1}-Y_i}{t_{i+1}-t_i}-\frac{y_{i+1}-y_i}{t_{i+1}-t_i}=\frac{δ_{i+1}-δ_i}{t_{i+1}-t_i}
where δi=Yi-yi
The estimates for those δi are not independent of each other. I don't see how this would help.
 
mfb said:
The estimates for those δi are not independent of each other. I don't see how this would help.
Are you saying you don't recognize this as the deviation in velocity over the time interval from ti to ti+1?

After this I calculated the square of the deviation in velocity over the interval. If all the time intervals are of equal size, so that ti+1-ti=Δt, then the average of the square of the velocity deviations averaged over all the time intervals is (\overline{δ_i^2}+\overline{δ_{i+1}^2}-2\overline{δ_iδ_{i+1}})/(Δt)^2
But, \overline{δ_i^2} and \overline{δ_{i+1}^2} are both equal to (u_y)2. So the square of the velocity deviations averaged over all the time intervals is given by (2u_y^2-2\overline{δ_iδ_{i+1}})/(Δt)^2. If the deviations of the displacements at successive times are uncorrelated with one another, then the root mean square deviation of the velocity is just √2u_y/Δt. However, the data may indicate otherwise. In that case, the second term would have to be calculated and included.

Chet
 
Chestermiller said:
Are you saying you don't recognize this as the deviation in velocity over the time interval from ti to ti+1?
Then I have no idea how this is related to the uncertainty on v. Remember, we know t exactly, the only uncertain things are the parameters in the equation for y, and based on those parameters we have to calculate our uncertainty on dy/dt (not the spread of the source values).
 
  • #10
mfb said:
Then I have no idea how this is related to the uncertainty on v. Remember, we know t exactly, the only uncertain things are the parameters in the equation for y, and based on those parameters we have to calculate our uncertainty on dy/dt (not the spread of the source values).
I've been looking at it from a different perspective. From the fitted equation for y, we can calculate dy/dt. The question is, "what is the uncertainty on this calculated velocity dy/dt?" According to the OP, the root mean square error on y (interpreted by me to be the "uncertainty" on y) is u_y. My focus was on getting an estimate of the rms error on the velocity dy/dt, which I'm interpreting as the "uncertainty" on dy/dt. My method of doing this is by estimating the local deviation between the "fitted" velocity, and the velocity that would be obtained by differentiating the displacement data with respect to time. Assuming that the deviations in the displacements at the various times are uncorrelated with each other, I came up with the result that u_v=√2u_y/Δt.
Do you have a different approach to estimating the rms error on the velocity? If so, can you provide some details? It sounds interesting.
I had thought of what you may be alluding to, but I couldn't figure out a way of estimating the uncertainties on the parameters A, f, and ø in the displacement fit.

Chet
 
  • #11
mfb said:
Then I have no idea how this is related to the uncertainty on v. Remember, we know t exactly, the only uncertain things are the parameters in the equation for y, and based on those parameters we have to calculate our uncertainty on dy/dt (not the spread of the source values).
I think I'm beginning to see what you are driving at. If I read you correctly, you are saying that essentially the only uncertainty on displacement is the uncertainty on the amplitude parameter A. So this should determine the uncertainty on the velocity dy/dt. Is this a correct interpretation of your point? If this is the case, then my estimate of the uncertainty on the velocity is a huge overestimate of the actual uncertainty.

Chet
 
  • #12
Chestermiller said:
I think I'm beginning to see what you are driving at. If I read you correctly, you are saying that essentially the only uncertainty on displacement is the uncertainty on the amplitude parameter A.
The other parameters have an uncertainty, too.

My method of doing this is by estimating the local deviation between the "fitted" velocity, and the velocity that would be obtained by differentiating the displacement data with respect to time.
That is indeed a huge overestimate of the uncertainty.

Do you have a different approach to estimating the rms error on the velocity? If so, can you provide some details? It sounds interesting.
See my previous posts.
 
Back
Top