# Homework Help: Uncertainty Analysis

1. Dec 31, 2013

### Mech-Master

1. The problem statement, all variables and given/known data

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?
3. 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??

2. Dec 31, 2013

### Staff: Mentor

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.

3. Dec 31, 2013

### Mech-Master

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(...).

4. Dec 31, 2013

### Staff: Mentor

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.

5. Dec 31, 2013

### Mech-Master

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?

6. Dec 31, 2013

### Staff: Mentor

I'm unable to follow what you did. Maybe someone else can.
Chet

7. Jan 1, 2014

### Staff: Mentor

The estimates for those δi are not independent of each other. I don't see how this would help.

8. Jan 1, 2014

### Staff: Mentor

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

9. Jan 2, 2014

### Staff: Mentor

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. Jan 2, 2014

### Staff: Mentor

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. Jan 3, 2014

### Staff: Mentor

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. Jan 3, 2014

### Staff: Mentor

The other parameters have an uncertainty, too.

That is indeed a huge overestimate of the uncertainty.

See my previous posts.