Once clean, renewable energy sources are used to charge the batteries in electric vehicles (EVs), the vehicles can produce zero gas emissions, greatly improving the environment. EVs and other distributed energy storage devices can be used in a smart microgrid to deliver energy to the loads throughout highest times, reducing the impact of load shading and improving the quality of the electricity. To achieve these goals of energy balance between EVs, the grid, and renewable energy sources, an isolated hybrid multiport converter is required. This paper develops an optimized isolated multi-port DC-DC converter for controlling power flow in multiple directions in an EV. This converter contains a dc-dc unidirectional converter, a bidirectional dc-dc converter, a triple active bridge (TAB), and a multi-port dual active bridge converter. Additionally, the Optimal Controller (OC) is developed to manage the power between the EV and the battery. The power flow is achieved by using the Modified Coati Optimization Algorithm (MCOA). In the MCOA, the optimal gain parameter of the converter is selected. In the planned technique, a bidirectional DC-DC converter can be considered to interconnect the EV battery towards deliver bidirectional power flow ability with the battery. The proposed approach is executed in MATLAB, and presentations are assessed by considering performance measures. Moreover, it is contrasted with the traditional approaches of particle swarm optimization (PSO) and grey wolf optimization (GWO).