A method of controlling a power supply system for an electric vehicle comprising a battery, a fuel cell and a power conversion device connected to the battery and the fuel cell, the power supply system being configured to supply power to an electric drivetrain of the vehicle and to at least one auxiliary apparatus, characterised in that the method comprises the steps of: - acquiring a first power setpoint value corresponding to the electrical power to be supplied by the battery, said first power setpoint value being determined based on a target value of a state of charge of the battery; - determining the electrical power required by the drivetrain and the electrical power required by the at least one auxiliary apparatus; - determining the state of the battery, particularly the state of charge of the battery and the maximum available power that the battery can provide; - calculating at least one value of electrical power to be delivered by the fuel cell depending on the state of the battery and the electrical power required by the drivetrain and the at least one auxiliary apparatus; - calculating, from the calculated value of electrical power, a second setpoint value for the electrical power to be delivered by the fuel cell, this value being optimised so that the fuel cell operates at or near its maximum efficiency point; - controlling the power supply system according to the second calculated electrical power setpoint value, characterized in that calculating at least one value of electrical power to be delivered by the fuel cell comprises the calculating of a minimum and a maximum value of power to be delivered by the fuel cell, the second electrical power setpoint value being between said minimum and said maximum value, in that the calculated electrical power value corresponds to the power required from the fuel cell to supplement the power supplied by the battery, the calculated electrical power value being equal to the power required for the battery to reach said target value of the state of charge, minus the power required by the drivetrain and the power required by said at least one auxiliary equipment, and in that the calculating of the second power setpoint value is carried out on the basis of a predefined efficiency curve of the fuel cell, by selecting an operating point of the fuel cell corresponding to the maximum of the efficiency curve within an operating range comprised between the minimum value and the previously calculated maximum value, and by satisfying at least a plurality of the following criteria: - the power supplied by the battery converge towards the first setpoint value, - control commands issued by a driver are complied, - said at least one auxiliary equipment is powered, and - the fluctuations in the power required from the fuel cell over time are slow. - acquiring a first power setpoint value corresponding to the electrical power to be supplied by the battery, said first power setpoint value being determined based on a target value of a state of charge of the battery; - determining the electrical power required by the drivetrain and the electrical power required by the at least one auxiliary apparatus; - determining the state of the battery, particularly the state of charge of the battery and the maximum available power that the battery can provide; - calculating at least one value of electrical power to be delivered by the fuel cell depending on the state of the battery and the electrical power required by the drivetrain and the at least one auxiliary apparatus; - calculating, from the calculated value of electrical power, a second setpoint value for the electrical power to be delivered by the fuel cell, this value being optimised so that the fuel cell operates at or near its maximum efficiency point; - controlling the power supply system according to the second calculated electrical power setpoint value, characterized in that calculating at least one value of electrical power to be delivered by the fuel cell comprises the calculating of a minimum and a maximum value of power to be delivered by the fuel cell, the second electrical power setpoint value being between said minimum and said maximum value, in that the calculated electrical power value corresponds to the power required from the fuel cell to supplement the power supplied by the battery, the calculated electrical power value being equal to the power required for the battery to reach said target value of the state of charge, minus the power required by the drivetrain and the power required by said at least one auxiliary equipment, and in that the calculating of the second power setpoint value is carried out on the basis of a predefined efficiency curve of the fuel cell, by selecting an operating point of the fuel cell corresponding to the maximum of the efficiency curve within an operating range comprised between the minimum value and the previously calculated maximum value, and by satisfying at least a plurality of the following criteria: - the power supplied by the battery converge towards the first setpoint value, - control commands issued by a driver are complied, - said at least one auxiliary equipment is powered, and - the fluctuations in the power required from the fuel cell over time are slow. - the power supplied by the battery converge towards the first setpoint value, - control commands issued by a driver are complied, - said at least one auxiliary equipment is powered, and - the fluctuations in the power required from the fuel cell over time are slow.