chaospy icon indicating copy to clipboard operation
chaospy copied to clipboard

Divergence for higher orders using Pseudo-spectral projection

Open hamzabuw opened this issue 2 years ago • 3 comments

Hi Jonathan,

I am trying to use projection method to quantify uncertainty in mass output (as mass loss rate) due to uncertainty in activation energy (E) using Arrhenius equation: image

Up till order 4 of PCE, I get a reasonable result as below: image The shaded region in blue is the standard deviation.

But from order 5 on, the solution diverges as below: image

I used truncated normal distribution to generate quadrature as below:

E_1_exact = 188E+03 E_variation = 0.02 E_alpha = chaospy.Normal(E_1_exact, E_variation*E_1_exact) E_alpha = chaospy.Trunc(E_alpha, lower= E_1_exact -2*E_variation*E_1_exact,upper= E_1_exact+ 2*E_variation*E_1_exact) gauss_quads = chaospy.generate_quadrature(order, joint, rule="gaussian")

Can you guide me why does the solution diverge from order 5 on? I am experiencing similar issue with other variables even without using the truncation.

hamzabuw avatar Jan 03 '23 20:01 hamzabuw

Could you try using chaospy.TruncNormal instead of composing with chaospy.Normal and chaospy.Trunc? I suspect numerical instabilities in the truncation approximation.

jonathf avatar Jan 12 '23 08:01 jonathf

Chaospy.TruncNormal creates undefined weights for me using the code below: E_1_exact = 188E+03 E_variation = 0.02 E_alpha = chaospy.TruncNormal(lower= E_1_exact -2*E_variation*E_1_exact, upper= E_1_exact+ 2*E_variation*E_1_exact, mu=E_1_exact, sigma=E_variation*E_1_exact) gauss_quads = chaospy.generate_quadrature(order, joint)

But even without truncation and just using normal distribution, I am unable to reach higher order even though the weights appear to be well defined.

hamzabuw avatar Jan 12 '23 14:01 hamzabuw

Then that is not it. I don't have all information available about your problem, so I can only suggest ideas of what is wrong.

I have two other hypothesis hat can be tested.

  1. You order is too low. Try to increase it.

  2. The equation hints at a latent log-normal probability distribution. Log-normal is one of those distributions that behaves really bad with polynomial chaos expansion. In that case, you are out of luck, as the problem is inherently not stable.

jonathf avatar Jan 12 '23 20:01 jonathf