A computer program product comprising computer program code stored on a non-transitory computer readable medium readable by a computer, said computer program product used to optimize the torque from a combustion engine, arranged in the hybrid powertrain, wherein the hybrid powertrain also comprises;
- a gearbox with an input shaft and an output shaft;
- a first planetary gear, connected to the input shaft and a first main shaft;
- a second planetary gear, connected to the first planetary gear and a second main shaft;
- a first electrical machine, connected to the first planetary gear;
- a second electrical machine, connected to the second planetary gear;
- at least one gear pair connected with the first planetary gear and the output shaft;
- and at least one gear pair connected with the second planetary gear and the output shaft, wherein the combustion engine is connected with a first planetary wheel carrier, arranged in the first planetary gear via the input shaft of the gearbox, and wherein the second main shaft is connected with a planetary wheel carrier, arranged in the second planetary gear,
- said computer program code comprising computer instructions to cause one or more computer processors to perform the operations of:
- a) if connected, disconnecting the moveable parts of the first planetary gear from each other and the moveable parts of the second planetary gear from each other;
- b) to control the combustion engine to a predetermined engine speed (nice);
- and
- c) to control the first and the second electrical machines in such a way that a desired torque (TDrv) is achieved in the output shaft, while simultaneously a requested total power consumption (PEM) of the first and the second electrical machines is achieved.