Control optimization in a hyperbolic linear system