Theoretical analysis of two types of motion is presented. The first type is a motion inside stationary flow. The main task is to find an optimal control law for variation of additional surface area of the working head interacting with water medium. The optimization criterion is the time required to move the object from the initial position to the given end position. The second type of motion was a fin type horizontal pendulum motion and corresponding model optimization. The task was to find an optimal control law for variation of additional area of vibrating horizontal tail which ensures maximal positive impulse of forces acting on a pivot. Both problems were solved by using Pontryagin’s minimum principle. It is shown that optimal control actions correspond to the case of “bang – bang” control. Examples of synthesis of real mechatronic systems are given. As a result, a real prototype of robot fish was made. Such prototype was experimentally investigated in linear water tanks to solve different problems, e.g., to find the maximal motion velocity depending on the power pack capacity and to find the minimal propulsion force, depending on the system parameters. The robot fish prototype was investigated in a lake with autonomous power pack and distance control system, moving in real underwater conditions. The results of the theoretical and experimental investigations may be used for development of new underwater robotic systems.