Dynamic modeling for functional data