Dynamics of nanotube-based NEMS