Method, program, and apparatus for controlling endoscope device
According to one embodiment of the present disclosure, there is disclosed a method of controlling an endoscope scope, which is performed by a computing device including at least one processor. The method includes: obtaining first data regarding the actual movement state of a motor included in an endoscope device and second data regarding the target movement state of a scope included in the endoscope device; and controlling the motor based on the obtained first data and second data.
1 . A method of controlling a flexible endoscope device having a scope insertable into a human body and being configured to observe an organ inside the human body, the method being performed by a processor, the method comprising:
obtaining first data regarding an actual movement state of the motor of the endoscope device;
obtaining second data regarding a target movement state of the scope of the endoscope device, the second data corresponding to and determined, in real time, by an input value received from the user input device; and
controlling the motor based on the obtained first data and second data to adjust the motion of the scope substantially in real time based on the obtained first data,
wherein controlling the motor based on the obtained first data and second data comprises:
obtaining third data regarding an estimated movement state of the scope using a motor-scope motion estimation model based on the obtained first data and second data,
wherein the motor-scope motion estimation model is a model that generates the estimated movement state of the scope as output upon receiving the obtained first data regarding the actual movement state of the motor and the obtained second data regarding the target movement state of the scope as input,
wherein the motor-scope motion estimation model includes a backlash model, the backlash model being a model that, when the motor-scope motion estimation model determines that a backlash has occurred, generates an amount of backlash based on the obtained first data regarding the actual movement state of the motor;
computing, by a first controller, a first torque for controlling the motor, wherein the first torque for controlling the motor is determined based on the obtained first data regarding the actual movement state of the motor, the obtained second data regarding the target movement state of the scope, and the third data regarding the estimated movement state of the scope;
computing, by a second controller which is a friction compensation model, a second torque which compensates for a friction between the motor and a gear, wherein the friction compensation model includes a nonlinear compensator that generates the second torque as output upon receiving the obtained first data regarding the actual movement state of the motor and the obtained second data regarding the target movement state of the scope as input; and
controlling the motion of the scope according to the determined first torque and the second torque.
2 . The method of claim 1 , wherein the actual movement state of the motor includes at least one of an actual position of the motor and actual speed of the motor, which are measured by a sensor.
3 . The method of claim 1 , wherein the target movement state of the scope includes at least one of a target position of the scope, target speed of the scope, and target acceleration of the scope, which are computed via the endoscope device.
4 . The method of claim 1 , wherein the estimated movement state of the scope includes at least one of an estimated position of the scope and estimated speed of the scope, which are computed based on actual position data of the motor included in the first data and actual speed data of the motor included in the first data.
5 . The method of claim 1 , wherein obtaining the third data regarding the estimated movement state of the scope comprises:
determining whether backlash for the scope has occurred based on actual position data of the motor included in the first data and actual speed data of the motor included in the first data; and
generating the third data based on the actual position data of the motor, the actual speed data of the motor, and first compensation data regarding the amount of backlash, which is determined based on whether the backlash for the scope has occurred.
6 . The method of claim 1 , wherein
the first torque for controlling the motor is determined so that the scope follows a target position and a target speed in the second data regarding the target movement state of the scope.
7 . The method of claim 6 , wherein the first torque is computed using the first controller including a mathematical model that uses the second data and the third data as input variables.
8 . The method of claim 7 , wherein the mathematical model included in the first controller includes sliding mode control.
9 . The method of claim 1 , wherein controlling the motor based on the obtained first data and second data comprises computing a position of the motor based on target position data of the motor determined by the second data and second compensation data regarding an amount of occurred backlash, which is determined based on whether backlash for the scope has occurred.
10 . The method of claim 9 , wherein the second compensation data is a combination of an estimated value regarding the amount of occurred backlash computed based on the first data and a current state value at a time when the backlash occurs.
11 . The method of claim 9 , wherein the second compensation data is updated whenever the backlash occurs.
12 . A computer program stored in a computer-readable storage medium, the computer program, when executed on at least one processor, causing the processor to perform operations for controlling a flexible endoscope device having a scope insertable into a human body and being configured to observe an organ inside the human body, wherein the operations comprise operations of:
obtaining first data regarding an actual movement state of the motor of the endoscope device;
obtaining second data regarding a target movement state of the scope of the endoscope device, the second data corresponding to and determined, in real time, by an input value received from the user input device; and
controlling the motor based on the obtained first data and second data to adjust the motion of the scope substantially in real time based on the obtained first data,
wherein controlling the motor based on the obtained first data and second data comprises:
obtaining third data regarding an estimated movement state of the scope using a motor-scope motion estimation model based on the obtained first data and second data,
wherein the motor-scope motion estimation model is a model that generates the estimated movement state of the scope as output upon receiving the obtained first data regarding the actual movement state of the motor and the obtained second data regarding the target movement state of the scope as input,
wherein the motor-scope motion estimation model includes a backlash model, the backlash model being a model that, when the motor-scope motion estimation model determines that a backlash has occurred, generates an amount of backlash based on the obtained first data regarding the actual movement state of the motor;
computing, by a first controller, a first torque for controlling the motor, wherein the first torque for controlling the motor is determined based on the obtained first data regarding the actual movement state of the motor, the obtained second data regarding the target movement state of the scope, and the third data regarding the estimated movement state of the scope;
computing, by a second controller which is a friction compensation model, a second torque which compensates for a friction between the motor and a gear, wherein the friction compensation model includes nonlinear compensator that generates the second torque as output upon receiving the obtained first data regarding the actual movement state of the motor and the obtained second data regarding the target movement state of the scope as input; and
controlling the motion of the scope according to the determined first torque and the second torque.
13 . A computing device for controlling a flexible endoscope device having a scope insertable into a human body and being configured to observe an organ inside the human body, the computing device comprising:
a processor including at least one core; and
a memory including program codes executable on the processor;
wherein the processor, when executing the program codes, is configured to perform:
obtaining first data regarding an actual movement state of the motor of the endoscope device;
obtaining second data regarding a target movement state of the scope of the endoscope device, the second data corresponding to and determined, in real time, by an input value received from the user input device; and
controlling the motor based on the obtained first data and second data to adjust the motion of the scope substantially in real time based on the obtained first data,
wherein the processor is further configured to perform, in controlling the motor based on the obtained first data and second data;
obtaining third data regarding an estimated movement state of the scope using a motor-scope motion estimation model based on the obtained first data and second data,
wherein the motor-scope motion estimation model is a model that generates the estimated movement state of the scope as output upon receiving the obtained first data regarding the actual movement state of the motor and the obtained second data regarding the target movement state of the scope as input,
wherein the motor-scope motion estimation model includes a backlash model, the backlash model being a model that, when the motor-scope motion estimation model determines that a backlash has occurred, generates an amount of backlash based on the obtained first data regarding the actual movement state of the motor;
computing, by a first controller, a first torque for controlling the motor, wherein the first torque for controlling the motor is determined based on the obtained first data regarding the actual movement state of a motor, the obtained second data regarding the target movement state of the scope, and the third data regarding the estimated movement state of the scope;
computing, by a second controller which is a friction compensation model, a second torque which compensates for a friction between the motor and a gear, wherein the friction compensation model includes nonlinear compensator that generates the second torque as output upon receiving the obtained first data regarding the actual movement state of the motor and the obtained second data regarding the target movement state of the scope as input; and
controlling the motion of the scope according to the determined first torque and the second torque.