A control device (100, 100A), connected to a plurality of drive devices (200, 200X, 200Y, 200Z) for changing a relative positional relationship between an object and a control object executing a predetermined processing on a surface of the object, the control device configured to output an operation amount (MVX, MVY, MVZ) to the plurality of drive devices (200, 200X, 200Y, 200Z) every control cycle, the plurality of drive devices (200, 200X, 200Y, 200Z) comprising a first drive device for moving the control object relative to the object along a plane facing the surface of the object and a second drive device for moving the control object relative to the object along an orthogonal axis orthogonal to the plane, wherein the control device (100, 100A) comprises: a first generator, configured to generate a first command position of the control object on the plane in each control cycle based on a target trajectory; a first control part, configured to generate a first operation amount output to the first drive device by model predictive control using a first dynamic characteristic model showing a relationship between the first operation amount and a position of the control object on the plane and the first command position; a second generator, configured to generate a second command position of the control object on the orthogonal axis in each control cycle; and a second control part, configured to generate a second operation amount output to the second drive device by model predictive control using a second dynamic characteristic model showing a relationship between the second operation amount and a position of the control object on the orthogonal axis and the second command position, wherein the second generator further being configured to generate, based on shape data (132, 133) indicating a surface shape of the object and the first command position, the second command position so that a distance between the control object and the surface of the object is constant. the plurality of drive devices (200, 200X, 200Y, 200Z) comprising a first drive device for moving the control object relative to the object along a plane facing the surface of the object and a second drive device for moving the control object relative to the object along an orthogonal axis orthogonal to the plane, wherein the control device (100, 100A) comprises: a first generator, configured to generate a first command position of the control object on the plane in each control cycle based on a target trajectory; a first control part, configured to generate a first operation amount output to the first drive device by model predictive control using a first dynamic characteristic model showing a relationship between the first operation amount and a position of the control object on the plane and the first command position; a second generator, configured to generate a second command position of the control object on the orthogonal axis in each control cycle; and a second control part, configured to generate a second operation amount output to the second drive device by model predictive control using a second dynamic characteristic model showing a relationship between the second operation amount and a position of the control object on the orthogonal axis and the second command position, wherein the second generator further being configured to generate, based on shape data (132, 133) indicating a surface shape of the object and the first command position, the second command position so that a distance between the control object and the surface of the object is constant. a first generator, configured to generate a first command position of the control object on the plane in each control cycle based on a target trajectory; a first control part, configured to generate a first operation amount output to the first drive device by model predictive control using a first dynamic characteristic model showing a relationship between the first operation amount and a position of the control object on the plane and the first command position; a second generator, configured to generate a second command position of the control object on the orthogonal axis in each control cycle; and a second control part, configured to generate a second operation amount output to the second drive device by model predictive control using a second dynamic characteristic model showing a relationship between the second operation amount and a position of the control object on the orthogonal axis and the second command position, wherein the second generator further being configured to generate, based on shape data (132, 133) indicating a surface shape of the object and the first command position, the second command position so that a distance between the control object and the surface of the object is constant.