SMS: Linear System Analysis and Optimal Control of Natural Gas Dynamics in Pipeline Networks