Optimal Control of Pantograph-Catenary Systems Using MatLab