+6 07 553 86 86 arazin@utm.my

Radial Basis Function (RBF)

The radial basis function (RBF), also known as the Radial Point Interpolation Method (RPIM), is a meshfree method used to construct an interpolated function to fit a curve. It uses a set of radial basis functions to interpolate between nodal values, with at least four types of different RBFs used in the literature. The RPIM has no guarantee on the reproduction of polynomial functions since most RBFs use a “radial-basis-power-law” to fit the curve. However, the RBF’s shape parameters can be used to control the smoothness of the fitted curve.

To establish the RPIM formulation, we begin with a representation of a curve function in a 1D system using RBF, with a numerical example of five nodal values given to be fitted. By solving for the unknowns, we can obtain a general fitted function that yields a continuous interpolated function along x based on given nodal values at specified locations. The RPIM has the ability to fit the curve exactly, passing through all the given nodes. The implementation codes for the RPIM are provided in the article, including MATLAB codes that allow us to try any number of given curve nodes, change the parameters’ value, and observe the performance of the RPIM in fitting the curve.

In summary, the RPIM is a useful method for fitting curves based on a set of nodal values using RBFs. Its flexibility and ability to fit the curve exactly make it a popular choice in many applications. However, it’s important to be aware of the limitations of RBFs and their use in the RPIM. The shape parameters used to control the smoothness of the fitted curve and the type of RBFs used can significantly affect the general performance of the RPIM in fitting the curve.

GENERALISED CODES

Here, we provide a more generalised version of the RBF codes that allows for a flexible number of given curve nodes, adjustable parameter values, and easy evaluation of the PIM performance in curve fitting.

 

clear, clc

uc = [0 -0.8 4.8 2 -1 0 0 -4.7 2 1 0]’ % nodal values of a curve

n = length(uc) % number of given nodes
xc = [0:(n-1)]’ % x coordinates (assumed uniform)

% types of RBF (choose only on)
c = 0; q = 2.01; %shape parameters
f_RBF =@(ri) (ri.^2 + c^2).^q; % RBF-MQ
% f_RBF =@(ri) exp(-c*ri.^2); % RBF-EXP
% f_RBF =@(ri) ri.^q; % RBF-TPS
% f_RBF =@(ri) (ri.^q).*log10(ri+0.00001); % RBF-LOG

Rc = [];
for i = 1:n
ri = abs(xc(i)-xc’); % in a vector 1×5
Rci = f_RBF(ri); % RBF
Rc = cat(1,Rc,Rci); % generate the Pc matrix
end
Rc

dxc = 0.1; % step (can be changed if necessary)
x = min(xc):dxc:max(xc) % interpolation locations

R = [];
for i = 1:length(x)
ri = abs(x(i)-xc’); % in a vector 1×5
Ri = f_RBF(ri); % RBF
R = cat(1,R,Ri); % generate the Pc matrix
end
phi = R/Rc

fx = phi*uc

cla
plot(xc,uc,’rx’,’MarkerSize’,10,’LineWidth’,2)
hold on
plot(x,fx,’b–‘)
hold off
box off