Dynamic system modeling and control