Spline Based Controller For Nonlinear Systems