Design of mechatronics system