An integrated approach to modeling and adaptive control