Curve fitting for 2D Data and Interpolation

391 Views Asked by At

I have polygon with $n$ Corner points where stresses are known to me. I have to fit a sutface $F(x,y)$, which can give the value of stress at anypoint inside the polygon.

I fitted a curve using a polynomial with $n$ terms. The fitted curve exactly matches with those at the given points. but gives abnormal values inside the polygon.

I get a feeling that the function I fitted is applicable only at the boundary of the polygon and can not be used for interpolation of values inside the polygon.

Can anybody help me ?

Prem.

1

There are 1 best solutions below

0
On

kernel interpolation : $f : \mathbb{R}^N \to \mathbb{R}$ should be $\approx$ equal to $y_k$ at $x_k$, $k \in \{1 \ldots K\}$.

$$f(x) = \sum_{k=1}^K \alpha_k h(x-x_k)$$

thus : $$\text{for } m \in \{1\ldots K\} : f(x_m) = \sum_{k=1}^K \alpha_k h(x_m-x_k) \approx y_m$$

this is a linear system, which leads to the cost function :

$$J(\alpha) = \sum_{m=1}^K || \sum_{k=1}^K \alpha_k h(x_m-x_k) - y_m||^2 = || H \alpha - y||^2$$

where $H$ is a $K \times K$ matrix where $H(k,m) = h(x_m-x_k)$ , $\alpha$ is a $K\times 1$ vector, and so is $y$,

$$\frac{\partial J}{\partial \alpha} = 2 H^T H \alpha - 2H^T y = 0 \implies \alpha = \left( H^T H\right)^{-1} H^T y$$