Synthesis of adaptive controllers using Lyapunov functions