An optimization technique for the transient response of passively stable satellites