This paper focuses on the modeling of two mechanical translation systems and the design of a linear quadratic controller. The state-space model for both systems is obtained and implemented, with the purpose of simulating the operation. Related to the design of the linear quadratic controller, the K matrix is obtained, which allows for minimizing the cost function related to the energy costs, produced in the states and inputs present in the state-space models of both mechanical systems. Then the optimized system model is obtained and studied.