Oscillations and stability of a mass-varying system