A computer-readable medium comprising computer program code, which, when executed by one or more processors, causes performance of a method for controlling propulsion of a marine vessel, the propulsion being at least partly implemented by a foil wheel propulsion system, which foil wheel propulsion system includes a rotatable wheel powered by a wheel motor and controlled by a wheel drive, a plurality of rotatable foils attached perpendicularly to the wheel, each foil powered by a foil motor and controlled by a foil drive, a wheel sensor to measure an actual angular wheel position of the wheel, and a plurality of foil sensors to measure an actual angular foil position of each foil, the method comprising:
- receiving a plurality of foil operation statuses from a plurality of foil drives;
- receiving a command from the vessel control system;
- generating wheel control data for the wheel drive to control a foil pitch function of the foil wheel propulsion system based on the command in view of the wheel operation status;
- generating foil control data for the plurality of the foil drives to further control the foil pitch function of the foil wheel propulsion system based on the command in view of the wheel operation status and the plurality of foil operation statuses, wherein a reference torque of the foil control data for each foil drive is generated using a foil feedforward model;
- receiving the actual angular wheel position as a part of the wheel operation status;
- receiving an actual wheel speed as a part of the wheel operation status, or generating the actual wheel speed based on a plurality of actual angular wheel positions;
- receiving a reference angular foil position for each foil as a part of the foil operation status;
- receiving a reference foil speed for each foil as a part of the foil operation status;
- receiving a reference foil acceleration for each foil as a part of the foil operation status;
- and
- generating the reference torque of the foil control data for each foil drive using the feedforward model, whose inputs are the actual angular wheel position, the reference angular foil position, the actual wheel speed, the reference foil speed, and the reference foil acceleration, and the reference torque is modified by a position feedback torque describing a difference in torque between the reference angular foil position and the actual angular foil position, and by a speed feedback torque describing a difference in torque between the reference foil speed and the actual foil speed.