State-space design and optimization of linear time-invariant systems