State-space formulation and controller design for three-dimensional channel flows