Modelling, simulation and control of spacecraft with flexible appendages