An optimal nonparametric adaptive control without external excitation