A computer program product comprising program code stored in a non-transitory computer-readable medium readable by a computer, said computer program product used to control a hybrid powertrain in order to achieve reverse drive, wherein the hybrid powertrain comprises an internal combustion engine;
- 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 main shaft and the output shaft;
- and at least one gear pair connected with the second main shaft and the output shaft, wherein the internal combustion engine is connected with the first planetary gear via the input shaft, said computer program code comprising computer instructions to cause one or more computer processors to perform the operations of:
- a) ensuring that the moveable parts of the first planetary gear are disconnected from each other, and/or that the moveable parts of the second planetary gear are disconnected from each other;
- b) ensuring that an output shaft in the internal combustion engine is prevented from rotating;
- and
- c) controlling the first electrical machine and/or the second electrical machine in such a way that a negative torque is achieved in the output shaft via the first main shaft and/or the second main shaft.