Taking flexible spacecraft with solar panels as study object,this paper established the system's dynamics model.A sliding mode variable structure control law to control the vibration of solar panels was put forward.SMA wires were embedded into solar panels,and the classical linear optimal control was used to control the SMA drive.The simulation results show the control law suppresses the vibration of the panels effectively.