Uncertainty of cosine at pi.

51 views
Skip to first unread message

Eric Smith

unread,
Oct 16, 2014, 8:30:38 PM10/16/14
to unc...@googlegroups.com
Hi Michael,

This is perhaps more of a general measurement uncertainty calculation, and less of a specific UncLib question, but I was wondering if you could perhaps shed some insight.

I am trying to determine the uncertainty, after taking the cosine of an angle of pi, with some uncertainty attached. 


>> var = LinProp( pi, 0.2);
>> cos( var )

ans = 
 
  -(1 ± 0)

As you can see, LinProp says that there should be no resulting uncertainty, which clearly makes no physical sense. I understand that measurement uncertainty equation according to the GUM is a taylor series expansion, which is usually truncated after the first term. So, the first derivative of cosine is - sin, which is equal to zero at pi.

I would expect that if you include more terms from the taylor series, you would get a more correct uncertainty value.

>> DistPropGlobalMaxLevel = 4;
>> var = DistProp( pi , 0.2);
>> cos( var )
 
ans = 
 
  -(1 ± 2.44921e-17)


>> DistPropGlobalMaxLevel = 20;
>> var = DistProp( pi , 0.2);
>> cos( var )
 
ans = 
 
  -(1 ± 2.44921e-17)

However, this still isn't right. So, perhaps a monte-carlo analysis will fix the problem :

>> MCPropGlobalN = 1000000;
>> var = MCProp( pi, 0.2);
>> cos( var )
 
ans = 
 
  -(0.980264 ± 0.027616)


This is a very simple example, in which I could easily do my own monte-carlo simulation. But, if I have more complicated equations involving multiple trigonometric functions of angles (which may or may not be equal to exact multiples of pi) , I am concerned I won't be getting the correct uncertainty values if I use LinProp.

Do you have any thoughts, or suggestions?



Thank you,
Eric

Michael Wollensack METAS

unread,
Oct 17, 2014, 5:35:33 AM10/17/14
to unc...@googlegroups.com
Hi Eric,

this is a limitation of linear uncertainty propagation. 

By the way for METAS UncLib V1.4 the DistPropMaxLevel and the MCPropGlobalN have to be set by a function call. See the following code:

>> v = LinProp(pi, 0.2); c = cos(v)
c = 
  -(1 ± 0)

>> DistPropGlobalMaxLevel(1); v = DistProp(pi, 0.2); c = cos(v)
c = 
  -(1 ± 2.44921e-17)
 
>> DistPropGlobalMaxLevel(2); v = DistProp(pi, 0.2); c = cos(v)
c = 
  -(0.98 ± 0.0282843)
 
>> DistPropGlobalMaxLevel(4); v = DistProp(pi, 0.2); c = cos(v)
c = 
  -(0.9802 ± 0.0277205)
 
>> MCPropGlobalN(1e6); v = MCProp(pi, 0.2); c = cos(v)
c = 
  -(0.980168 ± 0.0276951)


The DistProp works. 


Regards
Michael
Reply all
Reply to author
Forward
0 new messages