Breast biopsy motor control method, system, device and readable storage medium
By using a single-stroke motion deviation accumulation and delay compensation mechanism, the problems of high hardware cost and inability to compensate for accumulated deviation in breast cutting motor control are solved, thus achieving high-precision and stable breast cutting motor control.
Patent Information
- Application Number
- CN202611540937.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-30
- Publication Date
- 2026-11-24
AI Technical Summary
Existing mammary gland excision motor control schemes suffer from high hardware costs, high assembly complexity, inability to systematically compensate for accumulated deviations in position control chips, underutilization of current detection signals, and independent limit detection for each motor, all of which affect sampling accuracy and stability.
By using a deviation accumulation and delay compensation mechanism based on single-stroke motion, the motor position and load current are obtained by encoders and bidirectional current sensors. Compensation is only performed when the continuous same-direction deviation exceeds the threshold, thus avoiding real-time interference with the cutting action and forming a unified control architecture.
The positioning accuracy and operational stability of the breast rotary cutting motor have been improved, hardware costs and assembly complexity have been reduced, and the repeatability of multiple sampling positions and the smoothness of the cutting process have been ensured.
Smart Images

Figure CN123163471A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of medical device technology, specifically relating to a method, system, device, and readable storage medium for controlling a breast excision motor. Background Technology
[0002] Breast biopsy systems are essential medical devices used in minimally invasive breast biopsy procedures. Modern breast biopsy systems generally employ a multi-motor drive structure to separately control the puncture angle, inner tube rotation, and inner tube axial feed, which places extremely high demands on the precision and reliability of motor control.
[0003] However, existing motor control solutions still have significant shortcomings in the following aspects. First, travel limit switches generally rely on physical limit switches, such as microswitches or photoelectric sensors. These switches not only increase hardware costs and assembly complexity but also occupy valuable internal space, hindering the miniaturization design of components such as biopsy needles. Furthermore, mechanical contacts are susceptible to wear and oxidation, leading to decreased reliability after long-term use. Second, position control chips accumulate slight deviations after multiple positioning operations, and existing solutions lack a systematic compensation mechanism, relying mostly on manual reset or simple software zeroing, making it difficult to guarantee position repeatability between multiple samples. Third, the function of current detection signals has not been fully utilized. Existing solutions typically only use them for adaptive speed adjustment during the cutting process or stall protection during initialization, without systematically applying them to limit judgment and position correction during daily operation.
[0004] More significantly, existing deviation compensation schemes mostly provide immediate, one-time corrections, failing to consider the natural laws governing forward and reverse motion within the motor's motion sequence. Adding compensation amounts during the cutting stroke may interfere with the ongoing cutting action, introducing new positional disturbances and consequently affecting sampling accuracy. Furthermore, the limit detection, positioning control, and deviation compensation of each motor are often independent, failing to form a unified control architecture for coordinated operation.
[0005] Therefore, in order to address the above-mentioned technical problems, it is necessary to provide a method, system, device, and readable storage medium for controlling a breast excision motor. Summary of the Invention
[0006] The purpose of this invention is to provide a method, system, device and readable storage medium for controlling a breast rotary cutting motor, which can solve the problem of cumulative deviation of the motor after multiple positioning and the impact of the compensation process on the cutting work.
[0007] To achieve the above objectives, the technical solution provided by the present invention is as follows:
[0008] In a first aspect, the present invention provides a method for controlling a motor in a breast tissue excision procedure, comprising:
[0009] The deviation of the single-stroke motion is determined based on the actual position of the rotary cutting motor during the single-stroke motion.
[0010] If the deviation is within a preset threshold range, the deviation is added to the cumulative deviation corresponding to the current single-journey movement direction.
[0011] When at least two consecutive single-stroke movements are along the first direction, and the deviation of the at least two consecutive single-stroke movements is within the preset threshold range, the stroke endpoint of the subsequent first single-stroke movement along the second direction is corrected based on the cumulative deviation of the first direction, wherein the second direction is the opposite direction of the first direction.
[0012] Based on the corrected travel endpoint, the subsequent first single-pass motion along the second direction is performed.
[0013] In one or more embodiments of the present invention, the preset threshold interval includes a first sub-interval and a second sub-interval, wherein the lower limit of the first sub-interval is greater than the upper limit of the second sub-interval.
[0014] The method further includes:
[0015] If the deviation is less than the lower limit of the first sub-interval and greater than the upper limit of the second sub-interval, then the deviation will not be added to the cumulative deviation corresponding to this single-journey direction of motion; and / or,
[0016] If the deviation is greater than the upper limit of the first sub-interval or less than the lower limit of the second sub-interval, the rotary cutting motor is stopped and / or an alarm signal is generated.
[0017] In one or more embodiments of the present invention, after performing the subsequent first one-way motion along the second direction, the method further includes:
[0018] The residual deviation is determined based on the actual stroke endpoint of the rotary cutting motor and the corrected stroke endpoint.
[0019] If the residual deviation is within the preset threshold range, then the residual deviation is added to the cumulative deviation in the first direction or the cumulative deviation in the second direction; and / or,
[0020] If the residual deviation is greater than the upper limit of the second sub-interval and less than the lower limit of the first sub-interval, then the residual deviation is not added to the cumulative deviation of the single-journey motion corresponding to the first and second directions; and / or,
[0021] If the residual deviation is greater than the upper limit of the first sub-interval or less than the lower limit of the second sub-interval, the rotary cutting motor is stopped and / or an alarm signal is generated.
[0022] In one or more embodiments of the present invention, when the cumulative deviation in the first direction is not zero and there are no consecutive single-journey movements along the first direction with deviations all within the preset threshold range, the method further includes:
[0023] If the subsequent first single-trip motion is along the first direction and its deviation is greater than the upper limit of the second sub-interval and less than the lower limit of the first sub-interval, then the cumulative deviation in the first direction is corrected based on the deviation of the subsequent first single-trip motion.
[0024] If the corrected cumulative deviation is greater than the upper limit of the second sub-interval and less than the lower limit of the first sub-interval, then the cumulative deviation in the first direction is set to zero; and / or,
[0025] If the corrected cumulative deviation is within the preset threshold range, then the corrected cumulative deviation is taken as the cumulative deviation in the first direction.
[0026] In one or more embodiments of the present invention, the method further includes:
[0027] Based on the corrected travel endpoint, after performing the subsequent first single-trip movement along the second direction, the cumulative deviation in the first direction is set to zero; and / or,
[0028] If the cumulative deviations of the first direction and the second direction are in the same direction and are not set to zero within a preset number of movements, then the cumulative deviation with the smaller absolute value is set to zero and the cumulative deviation with the larger absolute value is used to offset the cumulative deviation with the smaller absolute value.
[0029] In one or more embodiments of the present invention, the method further includes:
[0030] The load current of the rotary cutting motor is collected when it moves along the first direction, and when the load current reaches the first limit current threshold, the position of the rotary cutting motor is recorded and the travel range of the rotary cutting motor in the first direction is calibrated.
[0031] The magnitude of the load current is collected when the rotary cutting motor moves along the second direction, and when the load current reaches the second limit current threshold, the position of the rotary cutting motor is recorded and the travel range of the rotary cutting motor in the second direction is calibrated.
[0032] In one or more embodiments of the present invention, when performing the subsequent first one-way motion along the second direction, the method further includes:
[0033] Collect the load current of the rotary cutting motor;
[0034] If the magnitude of the load current reaches the third limit current threshold, the current single-journey movement is stopped, and the cumulative deviation in the first direction is retained.
[0035] In a second aspect, the present invention provides a breast tissue excision motor control system, comprising:
[0036] The determination module is used to determine the deviation of the single-stroke motion based on the actual position of the rotary cutting motor during the single-stroke motion.
[0037] An accumulation module is used to accumulate the deviation amount into the cumulative deviation amount corresponding to the current single-journey movement direction when the deviation amount is within a preset threshold range;
[0038] The triggering module is used to correct the stroke endpoint of the first subsequent single-stroke movement along the second direction based on the cumulative deviation in the first direction when at least two consecutive single-stroke movements are along the first direction and the deviation of the at least two consecutive single-stroke movements is within the preset threshold range, wherein the second direction is the opposite direction of the first direction.
[0039] The compensation module is used to perform the subsequent first single-stroke motion along the second direction based on the corrected stroke endpoint.
[0040] Thirdly, the present invention provides an electronic device comprising:
[0041] At least one processor; and a memory storing instructions that, when executed by the at least one processor, cause the at least one processor to perform the breast excision motor control method.
[0042] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to execute the described breast excision motor control method.
[0043] Compared with the prior art, the breast cutting motor control method provided by the present invention determines the deviation amount by taking a single-stroke motion as the unit, which directly corresponds to the interrupt triggering mechanism of the position control chip, making the deviation identification more timely and accurate, and providing a reliable data basis for subsequent judgment.
[0044] Based on this, the deviation is only accumulated separately according to the direction of movement when it is within a preset threshold range. This avoids unnecessary compensation caused by repeated accumulation of minor deviations, and also prevents serious deviations from being masked by normal compensation logic, thus delaying fault handling. Maintaining the accumulated deviation separately according to the direction ensures that the accumulation of deviations in the positive and negative directions is independent of each other, avoiding overlap and providing an accurate basis for subsequent judgment.
[0045] Crucially, compensation is only triggered when at least two consecutive single-stroke movements in the same direction exceed a threshold deviation. This effectively eliminates erroneous actions caused by single, accidental deviations, ensuring that the compensated deviations are systematic deviations with repeatability and directional consistency, thus avoiding overcorrection and system oscillations. Compensation is completed during the planning phase by correcting the endpoints of subsequent reverse single-stroke movements, eliminating the need to add compensation amounts in real time during movement execution. Therefore, it does not interfere with the current cutting stroke, and the movement process remains stable. After compensation, deviations can be detected again to form a closed-loop verification, improving positioning accuracy and operational stability while eliminating accumulated deviations. Attached Figure Description
[0046] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0047] Figure 1 This is a schematic diagram illustrating an implementation scenario of the breast tissue excision motor control method according to an embodiment of the present invention;
[0048] Figure 2 This is a flowchart of a breast tissue excision motor control method according to an embodiment of the present invention;
[0049] Figure 3 This is a structural block diagram of the breast tissue cutting motor control system according to another embodiment of the present invention;
[0050] Figure 4 This is a structural block diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0051] To enable those skilled in the art to better understand the technical solutions of this invention, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this invention.
[0052] Unless otherwise expressly stated, throughout the specification and claims, the term "comprising" or its variations such as "including" or "comprises" shall be understood to include the stated elements or components without excluding other elements or other components.
[0053] In existing breast biopsy equipment, position control relies on pulse counting and closed-loop position adjustment. Deviation handling often involves simple zeroing after interruption or immediate correction after a single operation. In this approach, the placement of discrete detection points is limited by the equipment's internal space and assembly conditions, meaning the detection results only reflect a few fixed positions and cannot cover the entire stroke range. The detection elements are easily contaminated by blood, tissue fluid, or mist, leading to misjudgments. Furthermore, the cumulative deviation generated by multiple positioning operations lacks a systematic compensation method. Immediate correction during the cutting stroke may interfere with the ongoing cutting action. Therefore, this technical solution inevitably suffers from problems such as stroke detection accuracy limited by the number of detection points and the degree of contamination, high hardware costs and assembly complexity, poor repeatability of multiple sampling positions, and compensation actions interfering with the cutting stroke.
[0054] To address the aforementioned shortcomings, the inventors proposed a new technical approach: instead of using a fixed-position trigger signal to determine the stroke endpoint, and instead of relying on a one-time current threshold determination during the initialization phase to establish a position reference, the inherent reciprocating motion of the motor during operation is broken down. The deviation is determined by using the single-stroke motion as a unit and accumulated separately according to the direction of motion. Only when at least two consecutive single-stroke motions in the same direction have deviations exceeding the compensation threshold, the stroke endpoint is corrected during the planning phase of the subsequent reverse single-stroke motion, so that the accumulated deviation is naturally absorbed in the next reverse single-stroke motion.
[0055] The inventors deconstructed the reciprocating motion, moving the compensation action forward to the planning stage of subsequent single-stroke motions, thus separating it from the currently ongoing cutting action in terms of timing and avoiding interference with the current cutting action. Whether the subsequent single-stroke motion itself participates in the cutting depends on the specific motion sequence and does not affect the execution of the compensation strategy. Simultaneously, the directional information of the motor load current is introduced into the stroke endpoint judgment during daily operation, freeing stroke protection from the limitations of the number and location of discrete detection points. This forms a technical path distinct from existing technologies: using single-stroke motion as the deviation processing unit to achieve directional accumulation and delay compensation, replacing real-time correction with stroke endpoint pre-correction, and replacing discrete position detection with directional multiplexing of current signals. This systematically eliminates accumulated deviations and ensures the stability of the cutting process while eliminating discrete position detection elements.
[0056] Please refer to Figure 1The diagram shows an application scenario of the breast cutting motor control method provided by the present invention under one embodiment. The scenario specifically includes: a control unit 101, a position control chip 102, a motor drive chip 103, a bidirectional current sensor 104, a cutting motor 105, and an encoder 106.
[0057] The control unit 101 can be connected to the display module via a display interface to drive the display module to present the device's operating status or parameter information. The control unit 101 is also connected to the position control chip 102 via an interface for bidirectional data interaction. For example, it can send position commands and motion parameters to the position control chip 102 or read status information from it. The output of the position control chip 102 is connected to the input of the motor drive chip 103, outputting control signals to the motor drive chip 103, including PWM signals and direction signals. The output of the motor drive chip 103 is connected to the rotary cutting motor 105, driving the rotary cutting motor 105 to perform a single-stroke motion. The encoder 106 is coaxially connected to the rotary cutting motor 105, and its output is directly connected to the control unit 101, feeding back the encoder signal representing the actual position of the rotary cutting motor 105 to the control unit 101. A bidirectional current sensor 104 is connected in series in the drive circuit between the motor driver chip 103 and the rotary cutting motor 105. Its output terminal is connected to the control unit 101, and it outputs a current AD that represents the magnitude and direction of the load current of the rotary cutting motor 105 to the control unit 101. The rotary cutting motor 105 drives the rotary cutting needle to perform cutting and retraction actions.
[0058] During operation, the control unit 101 receives encoder signals from the encoder 106 to obtain the actual position of the rotary cutting motor 105; simultaneously, it receives the current AD output from the bidirectional current sensor 104 to obtain the magnitude and direction of the load current of the rotary cutting motor 105. Based on this, the control unit 101 executes the deviation determination, directional accumulation, and compensation control methods in the aforementioned embodiments, and sends the corrected stroke endpoint or related control commands to the position control chip 102 through an interface. The position control chip 102 and the motor drive chip 103 then work together to complete the subsequent single-stroke motion.
[0059] In one embodiment of the present invention, the rotary cutting motor 105 includes a first motor for controlling the sampling angle, a second motor for controlling the rotational cutting motion of the inner blade tube, and a third motor for controlling the axial feed motion of the inner blade tube. Each motor is equipped with an independent motor drive chip 103, a bidirectional current sensor 104, and an encoder 106, and is respectively connected to a position control chip 102 and a control unit 101. The control unit 101 sends position commands to each motor drive chip 103 through the position control chip 102, and each motor drive chip 103 drives the corresponding rotary cutting motor 105 to perform a single-stroke motion. Each encoder 106 feeds back the actual position of the corresponding rotary cutting motor 105 to the control unit 101, and each bidirectional current sensor 104 outputs the load current of the corresponding rotary cutting motor 105 to the control unit 101. The control unit 101 performs soft limit detection and safety boundary monitoring based on the load current, and determines the deviation of the single-stroke motion based on the encoder signal, and then executes the deviation accumulation and compensation control method in the aforementioned embodiments. The deviation accumulation and compensation strategies of each motor are executed independently and do not interfere with each other.
[0060] Specifically, the position control chip 102 can be an LM629 motion control processor chip. The LM629 has a built-in PID filter and achieves closed-loop control of position and speed through quadrature encoder signal feedback, triggering a position interrupt signal each time the target position is reached. The control unit 101 obtains the actual position of the rotary cutting motor 105 by reading the actual position register of the LM629 and sends the corrected travel endpoint to the LM629 as the new target position. The position control chip 102 can also be a TMS320 series DSP, which has an embedded quadrature encoder interface and PWM generator, and can replace the LM629 to achieve position closed-loop control; it can also be an STM32 series MCU with software PID algorithm, using the advanced timer and encoder interface of STM32 to achieve position servo control; for high-speed and high-precision applications, an FPGA can also be used to implement customized position control logic.
[0061] In addition, the motor driver chip 103 can be an LMD18200 H-bridge motor driver chip. The LMD18200 supports PWM speed regulation and forward / reverse control. Its DIRECTION pin is used to control the motor direction, and the PWM pin is used to adjust the motor speed. The direction signal and PWM signal output by the position control chip 102 are connected to the DIRECTION pin and PWM pin of the LMD18200, respectively. The output of the LMD18200 is connected to the rotary cutting motor 105, driving the rotary cutting motor 105 to move in a specified direction and speed. The motor driver chip 103 can also be a DRV88 series chip such as DRV8870, DRV8871, etc., which integrates H-bridge and current detection functions; it can also be a TB67 series chip such as TB67H450, etc., which supports PWM control and current detection; for high-power applications, discrete MOSFETs can be used in conjunction with a gate driver IC to build an H-bridge driver circuit.
[0062] The bidirectional current sensor 104 can be an ACS712 linear Hall effect bidirectional current sensor. The ACS712 is connected in series in the motor drive circuit, and its output voltage is linearly proportional to the AC or DC current flowing through it. The zero-current output is VCC / 2. When the current direction changes, the output voltage shifts positively or negatively from VCC / 2, thus directly identifying the current magnitude and direction. The control unit 101 acquires the output voltage of the ACS712's VIOUT pin via an ADC, thereby simultaneously determining the current magnitude and direction. On the other hand, the bidirectional current sensor 104 can also use the CURRENT SENSE pin of LMD18200 in conjunction with the DIRECTION direction signal as an alternative; or indirectly obtain complete current magnitude and direction information by synchronously sampling the current detection signal with the logic level of the DIRECTION pin; or use dedicated bidirectional current detection chips such as ACS758, ACS770, INA240, etc.; or use a sampling resistor in conjunction with a differential amplifier and dual-channel ADC acquisition scheme, in which a low-resistance sampling resistor is connected in series in the motor drive circuit, the sampling voltage is amplified by the differential amplifier, and the two ends of the sampling resistor are respectively connected to the positive and negative input terminals of the differential amplifier. The current direction is determined by the offset direction of the output signal relative to the reference voltage; or dual-channel ADCs are used to simultaneously acquire the voltage across the sampling resistor, and the current direction is determined by calculating the positive and negative signs of the voltage difference between the two ends; or fluxgate or giant magnetoresistive current sensors, such as Melexis' MLX91208, are used to provide high bandwidth, isolated bidirectional current measurement.
[0063] Finally, encoder 106 can be a quadrature encoder, outputting two-phase square wave signals. Control unit 101 determines the motor rotation direction by comparing the phase relationship of the two-phase square wave signals, and achieves position detection by counting the rising and falling edges of the two-phase square wave signals. The pulse count value output by encoder 106 represents the actual position of rotary cutting motor 105.
[0064] The specific models and alternative solutions of the above-mentioned hardware components are merely illustrative examples. Those skilled in the art can select appropriate hardware to implement the motor control method of the present invention according to actual needs, as long as it can achieve position closed-loop control, bidirectional current detection and encoder position feedback. The embodiments of the present invention do not limit this.
[0065] Please refer to Figure 2 The diagram shown is a flowchart illustrating the control of a breast tissue excision motor according to an embodiment of the present invention. The breast tissue excision motor control method specifically includes the following steps:
[0066] S201: Determine the deviation of the single-stroke motion based on the actual position of the rotary cutting motor during the single-stroke motion;
[0067] It's important to note that the process of breast biopsy is essentially a series of repeated sampling cycles. Under ultrasound or mammography guidance, after the biopsy needle is inserted into the lesion area, the system uses negative pressure to draw the target tissue into the sampling slot. Then, the inner blade is advanced to cut the drawn-in tissue. After cutting, the inner blade needs to return to its initial position to allow for the next sampling or to end the procedure. This workflow dictates that the biopsy motor must return to its starting position after completing one cutting motion, thus creating a reciprocating motion.
[0068] Specifically, in the three-motor architecture, each motor's motion exhibits reciprocating characteristics. The motor controlling the axial feed of the inner blade advances forward during cutting and retracts after cutting, with each sampling consisting of a complete forward-reverse cycle. The motor controlling the rotational cutting of the inner blade rotates along a certain direction to cut the tissue during cutting and rotates in the opposite direction to return to the initial angle after cutting, also constituting reciprocating motion. The motor controlling the sampling angle, after adjusting to the target angle, also needs to return to the initial angle position upon completion of sampling. Therefore, each complete sampling operation consists of a single-stroke motion along the first direction and a single-stroke motion in the opposite direction. After completing one sampling, each motor returns to its initial position, ready for the next positioning. The aforementioned single-stroke motion in the first direction and the single-stroke motion in the opposite direction constitute the single-stroke motion described in this step.
[0069] Based on the above motion sequence, the present invention determines the deviation of the single-stroke motion based on the actual position of the rotary cutting motor during the single-stroke motion.
[0070] Specifically, each single-stroke movement has a desired endpoint, which is the position to be reached in this single-stroke movement. It can be predetermined based on the surgical plan or initial calibration results. This invention does not restrict the configuration method or numerical selection of the endpoint.
[0071] After a single stroke, the actual position reached by the rotary cutting motor is called the actual position. Based on this actual position and the expected stroke endpoint, the deviation of this single stroke can be determined. In one embodiment, the deviation can be expressed as the difference between the expected stroke endpoint and the actual position. When the actual position does not reach the expected stroke endpoint, the deviation is positive, indicating that there is a lag in this single stroke; when the actual position exceeds the expected stroke endpoint, the deviation is negative, indicating that there is a lead in this single stroke. The absolute value of the deviation reflects the degree to which the actual position deviates from the expected stroke endpoint.
[0072] In one specific embodiment, the actual position and the desired travel endpoint can be characterized in the form of position parameters. The rotary cutting motor can be equipped with a corresponding position detection device, which outputs a position feedback signal in real time during a single stroke. This signal represents the current position of the rotary cutting motor. The desired travel endpoint can be preset to a corresponding position parameter value. When the rotary cutting motor reaches the desired travel endpoint, the actual position value corresponding to the position feedback signal is obtained, and this actual position value is compared with the preset desired travel endpoint value to calculate the deviation of this single stroke.
[0073] The position detection device can be an encoder, a Hall sensor, or other devices capable of characterizing changes in motor position. Position parameters can be signal counts output by the encoder, voltage output by the position sensor, digital values, or parameters that uniquely correspond to the motor's position. This embodiment of the invention does not impose specific limitations on the selection of the aforementioned devices and parameters. Based on this implementation, this step can obtain a deviation evaluation result after each single-stroke motion, providing a data foundation for subsequent direction-based cumulative calculations and delay compensation.
[0074] Taking the motor controlling the axial feed of the inner cutter tube as an example, the motor position is characterized by the signal count output by the encoder. In one cutting motion, the motor performs a single forward stroke, with the expected stroke endpoint being 5000 encoder pulses forward. After the motor reaches its destination, the actual position reported by the position detection device is 4400 encoder pulses forward. Subtracting the actual position of 4400 from the expected stroke endpoint of 5000 yields a deviation of +600 encoder pulses for this single stroke. This positive value indicates that the actual position did not reach the expected stroke endpoint, and there is a lag in this single stroke, with a lag of 600 encoder pulses.
[0075] It should be noted that the desired stroke endpoint needs to be set within the stroke range that the rotary cutting motor can execute. If the desired stroke endpoint exceeds this stroke range, the motor will be unable to reach the target position, and the position control chip will continuously output drive signals until it stalls. This not only prevents the normal positioning operation from being completed but may also lead to a safety accident. Therefore, before setting the desired stroke endpoint for a single stroke, it is necessary to first determine the executable stroke range of the rotary cutting motor in each direction.
[0076] In an exemplary embodiment, before configuring the desired endpoint, the load current of the rotary cutting motor when it moves along the first direction can be collected, and when the load current reaches a first limit current threshold, the position of the rotary cutting motor is recorded and the travel range of the rotary cutting motor in the first direction is calibrated; the magnitude of the load current of the rotary cutting motor when it moves along the second direction can be collected, and when the load current reaches a second limit current threshold, the position of the rotary cutting motor is recorded and the travel range of the rotary cutting motor in the second direction is calibrated.
[0077] When the rotary cutting motor moves to the mechanical endpoint in the first direction, the motor stalls due to obstruction, and the load current increases accordingly. When the load current reaches the preset first limit current threshold, it indicates that the rotary cutting motor has reached the limit position in the first direction. The position of the rotary cutting motor at this time is recorded, and this position is taken as the end point of the stroke of the rotary cutting motor in the first direction, thereby completing the calibration of the stroke range in the first direction.
[0078] Similarly, based on the same implementation method, the travel range in other directions can be further calibrated. In the above exemplary embodiment, the second direction is the opposite direction of the first direction. The first limit current threshold and the second limit current threshold can be preset according to the rated current of the motor, the resistance characteristics of the mechanical structure, and the actual working conditions. They can be the same or different to adapt to different mechanical resistances in the positive and negative directions.
[0079] Specifically, a bidirectional current sensor connected in series in the motor drive circuit can be used to collect the load current. The sensor's output voltage is linearly proportional to the current flowing through it, with a zero-current output of half the power supply voltage. When the motor rotates forward, the output voltage is higher than half the power supply voltage; when the motor rotates in reverse, the output voltage is lower than half the power supply voltage. Therefore, the magnitude and direction of the current can be determined simultaneously without additional direction signals. The control unit acquires this voltage signal through analog-to-digital conversion to obtain the magnitude and direction of the load current.
[0080] Through the above calibration method, the travel range of the rotary cutting motor in the first and second directions is accurately recorded. The expected travel endpoint of each subsequent single-stroke movement can be set within this travel range, thereby ensuring that the motor can reach the target position normally and avoiding stalling or damage caused by exceeding the mechanical travel. This calibration process does not rely on physical limit switches or discrete position detection elements; it can be completed automatically only through changes in current signals, reducing hardware costs and assembly complexity. At the same time, the calibration of the travel range is not limited by the internal space and contamination level of the equipment.
[0081] S202: If the deviation is within a preset threshold range, the deviation is added to the cumulative deviation corresponding to the current one-way movement direction;
[0082] It should be noted that, in this embodiment of the invention, the preset threshold range is a numerical range used to determine whether the deviation needs to be included in the cumulative logic. If the deviation falls within this range, it indicates that the deviation of this single-trip motion is a systemic deviation that needs attention and should be recorded for subsequent compensation judgment. Simultaneously, each direction of motor motion maintains an independent cumulative deviation, and different deviations are independent of each other. When it is determined that the above deviation is within the preset threshold range, the deviation is added to the cumulative deviation corresponding to that direction, based on the direction of this single-trip motion. By accumulating the deviations separately according to the direction of motion, the cumulative deviations in each direction do not overlap, providing an accurate data basis for subsequent compensation triggering based on the condition of continuous motion in the same direction.
[0083] Since the deviation itself can be positive or negative, in one embodiment of the present invention, the preset threshold range may include at least two sub-ranges that are adapted to positive and negative deviations respectively.
[0084] Specifically, the preset threshold interval may include a first sub-interval and a second sub-interval. The first sub-interval covers the allowable range of positive deviations, with its lower limit being the minimum cumulative positive deviation and its upper limit being the maximum allowable positive deviation. The second sub-interval covers the allowable range of negative deviations, with its upper limit being the maximum cumulative negative deviation and its lower limit being the minimum allowable negative deviation. The lower limit of the first sub-interval is greater than the upper limit of the second sub-interval, thus forming an intermediate interval between the first and second sub-intervals.
[0085] When the deviation is positive and falls within the first sub-interval, it indicates that there is a positive deviation that needs to be recorded in this single-trip motion; when the deviation is negative and falls within the second sub-interval, it indicates that there is a negative deviation that needs to be recorded in this single-trip motion. Furthermore, if the deviation is less than the lower limit of the first sub-interval and greater than the upper limit of the second sub-interval, meaning the deviation is within the middle interval, it indicates that the absolute value of this deviation has not yet reached the level that needs to be accumulated, and it will not be added to the cumulative deviation in any direction. If the deviation is greater than the upper limit of the first sub-interval or less than the lower limit of the second sub-interval, it indicates that this deviation has exceeded the normal allowable range, and is judged as motor step loss or a serious fault, requiring control to stop the rotary cutting motor and / or synchronously generate an alarm signal.
[0086] It should also be noted that when adding the deviation value to the cumulative deviation corresponding to the current single-trip movement direction, the sign of the deviation value must be retained. That is, if the current deviation value is positive, the cumulative deviation value in the corresponding direction increases in the positive direction after accumulation; if the current deviation value is negative, the cumulative deviation value in the corresponding direction increases in the negative direction after accumulation. Through algebraic accumulation while retaining the sign, the cumulative deviation value can accurately reflect the net value of the deviation from multiple single-trip movements in that direction.
[0087] Understandably, the cumulative deviation reflects the accumulated deviation of each single-stroke movement in a certain direction, and its purpose is to compensate for this cumulative deviation in a subsequent reverse single-stroke movement. However, after the cumulative deviation is generated and before the compensation opportunity arrives, several more single-stroke movements may be performed in the same direction. Although the deviations of these subsequent single-stroke movements are small and do not reach the level that requires independent accumulation, they still accurately reflect the positional offset of the motor in that direction. If these subsequent small deviations are completely ignored, the previously accumulated deviation will no longer accurately reflect the current true net deviation, and overcorrection may occur during subsequent compensation.
[0088] Therefore, in an optional embodiment of the present invention, when the cumulative deviation in a certain direction is no longer zero and has not yet been used to correct the endpoint of the stroke, if the deviation of the subsequent single-stroke movement in the same direction is small in absolute value and therefore does not fall into the preset threshold range, it can be used as a correction value and algebraically added to the existing cumulative deviation to update the net value of the cumulative deviation.
[0089] If the absolute value of the cumulative deviation after algebraic addition is less than or equal to the upper limit of the second sub-interval, the cumulative deviation is set to zero; if the absolute value of the cumulative deviation after algebraic addition is still within the preset threshold range, the result of algebraic addition is used as the updated cumulative deviation, and we continue to wait for subsequent compensation opportunities.
[0090] Based on this implementation method, the cumulative deviation always tracks the true net deviation, avoiding over-correction caused by ignoring subsequent small deviations. Simultaneously, when the net value becomes negligible, it is promptly zeroed, preventing meaningless compensation actions from introducing new disturbances. This reduces unnecessary compensation operations while ensuring compensation accuracy, thereby improving the system's stability and positioning accuracy.
[0091] S203: When at least two consecutive single-stroke movements are along the first direction, and the deviation of the at least two consecutive single-stroke movements is within the preset threshold range, the stroke endpoint of the subsequent first single-stroke movement along the second direction is corrected based on the cumulative deviation in the first direction.
[0092] It should be noted that when at least two consecutive single-stroke movements are detected to be executed along the first direction, and the deviation of these consecutive single-stroke movements in the same direction is within a preset threshold range, the compensation trigger condition is determined to be met. Here, "at least two consecutive" refers to two or more adjacent single-stroke movements in the motion sequence, both in the first direction, and each deviation falling within the preset threshold range. Furthermore, in this invention, the second direction is the opposite direction of the first direction.
[0093] Setting a continuous unidirectional condition avoids unnecessary compensation actions triggered by a single random deviation. If a deviation occurs within a preset threshold range in only one single-stroke movement, it may be caused by random factors such as instantaneous load fluctuations, uneven tissue density, or position detection errors. In this case, immediate compensation may introduce new disturbances. However, if corresponding deviations occur in at least two consecutive unidirectional single-stroke movements, it indicates that the deviation is repeatable and directionally consistent, belonging to a systematic deviation that needs correction. Triggering compensation in this case can effectively eliminate accumulated deviations without causing system oscillations.
[0094] Furthermore, when the aforementioned continuous unidirectional condition is met, the cumulative deviation in the first direction is obtained. Based on this cumulative deviation in the first direction, the stroke endpoint of the subsequent first single-trip motion along the second direction is corrected.
[0095] The cumulative deviation is the result obtained by successively accumulating the deviations of at least two consecutive single-stroke movements in the same direction in step S202. Its value is equal to the algebraic sum of the deviations of these consecutive single-stroke movements in the same direction, and its sign reflects the offset direction of the actual position relative to the desired stroke endpoint. The subsequent first single-stroke movement along the second direction mentioned here refers to the first single-stroke movement executed along the second direction in the movement sequence after the last single-stroke movement in the first direction that satisfies the consecutive same-direction condition.
[0096] In one embodiment, correcting the stroke endpoint of a single-stroke movement in the second direction may include adding the cumulative deviation in the first direction to the original stroke endpoint of the single-stroke movement in the second direction. The original stroke endpoint is a target position preset by the control unit based on surgical planning or initial calibration results. The corrected stroke endpoint is equal to the original stroke endpoint plus the cumulative deviation in the first direction. Since the cumulative deviation retains its positive or negative sign, the corrected stroke endpoint is correspondingly offset relative to the original stroke endpoint.
[0097] For example, suppose the first direction is forward and the second direction is reverse. The cumulative deviation in the first direction is 600 encoder pulses, meaning a cumulative lag of 600 pulses in a single forward stroke. The initial stroke endpoint of the single stroke in the second direction is 0, i.e., the initial position. The control unit adds 600 pulses to the initial stroke endpoint 0, resulting in a corrected stroke endpoint of 600. Since the second direction is reverse motion, the corrected stroke endpoint is shifted 600 pulses forward relative to the initial stroke endpoint. When the motor performs this single stroke in the second direction, the target position is 600 pulses forward, meaning it moves backward to 600 pulses and stops, rather than returning to 0. Thus, the 600-pulse lag deviation accumulated in the forward direction is canceled out in this reverse single stroke. If the cumulative deviation in the first direction is negative, the corrected stroke endpoint is shifted backward by the corresponding amount relative to the initial stroke endpoint, similarly achieving deviation cancellation.
[0098] It should be noted that the correction action in this step occurs during the motion planning phase, rather than being added in real-time during motion execution. After confirming that the continuous unidirectional condition is met, the corrected stroke endpoint is first calculated, and then this corrected stroke endpoint is issued as the target position for the first subsequent single-stroke motion in the second direction. The motor is then driven to execute a complete single-stroke motion according to this target position. Throughout the entire motion execution process, the target position remains the corrected stroke endpoint, without requiring any real-time correction or compensation addition during the motion. Therefore, the compensation action is time-separated from the currently ongoing cutting action and will not interfere with the current cutting action.
[0099] S204: Based on the corrected travel endpoint, perform the subsequent first single-pass motion along the second direction.
[0100] It should be noted that since the corrected stroke endpoint is obtained by adding the cumulative deviation to the expected stroke endpoint of the corresponding single-stroke motion in the second direction, the corrected stroke endpoint may exceed the actual executable stroke range of the rotary cutting motor.
[0101] Therefore, in one embodiment, the corrected stroke endpoint can be compared with the motor forming range in the corresponding direction. If it exceeds the forming range calculated in the initialization stage, the current single-stroke movement is stopped and reported.
[0102] In another embodiment, to avoid the corrected stroke endpoint exceeding the actual executable stroke range of the rotary cutting motor, and to prevent contact with mechanical boundaries or encountering abnormal resistance before reaching the corrected stroke endpoint, the load current of the rotary cutting motor can be acquired in real time during the subsequent first single-stroke movement along the second direction. If the load current reaches a preset third limit current threshold, the current single-stroke movement is stopped, and the cumulative deviation in the first direction is retained for use when the compensation trigger condition is met again later.
[0103] In another embodiment, after the subsequent first single-stroke movement along the second direction, the actual stroke endpoint of the rotary cutting motor can be obtained and compared with the corrected stroke endpoint to determine the residual deviation. If the residual deviation is within a preset threshold range, it is added to the cumulative deviation in the first direction or the cumulative deviation in the second direction; if the residual deviation is greater than the upper limit of the second sub-interval but less than the lower limit of the first sub-interval, it is not added to the cumulative deviation in either direction; if the residual deviation is greater than the upper limit of the first sub-interval or less than the lower limit of the second sub-interval, the rotary cutting motor movement is stopped or an alarm signal is generated. This verification method confirms whether the compensation has achieved the expected effect, and if the compensation is insufficient, it is corrected through subsequent movements.
[0104] It is understandable that once the subsequent first single-pass motion along the second direction is completed, that is, the cumulative deviation in the first direction has been corrected, the cumulative deviation in the first direction can be set to zero.
[0105] Optionally, if the cumulative deviations in the first and second directions are in the same direction and are not zeroed within a preset number of movements, the cumulative deviation with the smaller absolute value is zeroed, and the cumulative deviation with the larger absolute value is used to offset the cumulative deviation with the smaller absolute value, so that the remaining cumulative deviation reflects the net effect of the deviations in the two directions.
[0106] Please refer to Figure 3 As shown, based on the same inventive concept as the aforementioned breast cutting motor control method, one embodiment of the present invention provides a breast cutting motor control system 300, including: a determination module 301, an accumulation module 302, a trigger module 303, and a compensation module 304.
[0107] Specifically, the determining module 301 is used to determine the deviation of the reciprocating motion based on the actual position of the rotary cutting motor when performing the reciprocating motion;
[0108] The accumulation module 302 is used to accumulate the deviation amount into the cumulative deviation amount corresponding to the outgoing direction of the current round trip motion when the deviation amount is within a preset threshold range;
[0109] The trigger module 303 is used to correct the travel endpoint of the first subsequent reciprocating motion along the second outgoing direction based on the cumulative deviation of the first outgoing direction when at least two consecutive reciprocating motions are along the first outgoing direction and the deviation of the at least two consecutive reciprocating motions is within the preset threshold range, wherein the second outgoing direction is the opposite direction of the first outgoing direction.
[0110] The compensation module 304 is used to perform the subsequent first round-trip motion along the second outgoing direction based on the corrected travel endpoint.
[0111] Please refer to Figure 4 As shown, embodiments of the present invention also provide an electronic device 400, which includes at least one processor 401, a memory 402 (e.g., non-volatile memory), a main memory 403, and a communication interface 404, wherein the at least one processor 401, the memory 402, the main memory 403, and the communication interface 404 are connected together via an internal bus 405. The at least one processor 401 is used to invoke at least one program instruction stored or encoded in the memory 402 to cause the at least one processor 401 to perform various operations and functions of the breast tissue excision motor control method described in the various embodiments of this specification.
[0112] In the embodiments of this specification, electronic device 400 may include, but is not limited to: personal computer, server computer, workstation, desktop computer, laptop computer, notebook computer, mobile electronic device, smartphone, tablet computer, cellular phone, personal digital assistant (PDA), handheld device, messaging device, wearable electronic device, consumer electronic device, etc.
[0113] This invention also provides a computer-readable medium carrying computer-executable instructions. When executed by a processor, these instructions can be used to implement various operations and functions of the breast cutting motor control method described in the various embodiments of this specification.
[0114] The computer-readable medium in this invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0115] In this invention, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. This propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wireline, optical fiber, RF, etc., or any suitable combination thereof.
[0116] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0117] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus, systems, and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, as well as combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0118] The foregoing description of specific exemplary embodiments of the invention is for illustrative and explanatory purposes. These descriptions are not intended to limit the invention to the precise forms disclosed, and it will be apparent that many changes and variations can be made in accordance with the foregoing teachings. The exemplary embodiments were chosen and described in order to explain the specific principles of the invention and its practical application, thereby enabling those skilled in the art to implement and utilize various different exemplary embodiments of the invention, as well as various different choices and variations. The scope of the invention is intended to be defined by the claims and their equivalents.
[0119] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.
[0120] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.
Claims
1. A method for controlling a motor in breast tissue excision, characterized in that, include: The deviation of the single-stroke motion is determined based on the actual position of the rotary cutting motor during the single-stroke motion. If the deviation is within a preset threshold range, the deviation is added to the cumulative deviation corresponding to the current single-journey movement direction. When at least two consecutive single-stroke movements are along the first direction, and the deviation of the at least two consecutive single-stroke movements is within the preset threshold range, the stroke endpoint of the subsequent first single-stroke movement along the second direction is corrected based on the cumulative deviation of the first direction, wherein the second direction is the opposite direction of the first direction. Based on the corrected travel endpoint, the subsequent first single-pass motion along the second direction is performed.
2. The method for controlling a breast tissue excision motor according to claim 1, characterized in that, The preset threshold range includes a first sub-range and a second sub-range, wherein the lower limit of the first sub-range is greater than the upper limit of the second sub-range. The method further includes: If the deviation is less than the lower limit of the first sub-interval and greater than the upper limit of the second sub-interval, then the deviation will not be added to the cumulative deviation corresponding to this single-journey direction of motion; and / or, If the deviation is greater than the upper limit of the first sub-interval or less than the lower limit of the second sub-interval, the rotary cutting motor is stopped and / or an alarm signal is generated.
3. The method for controlling a breast tissue excision motor according to claim 2, characterized in that, After performing the subsequent first single-pass motion along the second direction, the method further includes: The residual deviation is determined based on the actual stroke endpoint of the rotary cutting motor and the corrected stroke endpoint. If the residual deviation is within the preset threshold range, then the residual deviation is added to the cumulative deviation in the first direction or the cumulative deviation in the second direction; and / or, If the residual deviation is greater than the upper limit of the second sub-interval and less than the lower limit of the first sub-interval, then the residual deviation is not added to the cumulative deviation of the single-journey motion corresponding to the first and second directions; and / or, If the residual deviation is greater than the upper limit of the first sub-interval or less than the lower limit of the second sub-interval, the rotary cutting motor is stopped and / or an alarm signal is generated.
4. The method for controlling a breast tissue excision motor according to claim 2, characterized in that, When the cumulative deviation in the first direction is not zero, and there are no consecutive single-journey movements along the first direction with deviations within the preset threshold range, the method further includes: If the subsequent first single-trip motion is along the first direction and its deviation is greater than the upper limit of the second sub-interval and less than the lower limit of the first sub-interval, then the cumulative deviation in the first direction is corrected based on the deviation of the subsequent first single-trip motion. If the corrected cumulative deviation is greater than the upper limit of the second sub-interval and less than the lower limit of the first sub-interval, then the cumulative deviation in the first direction is set to zero; and / or, If the corrected cumulative deviation is within the preset threshold range, then the corrected cumulative deviation is taken as the cumulative deviation in the first direction.
5. The method for controlling a breast tissue excision motor according to claim 1, characterized in that, The method further includes: Based on the corrected travel endpoint, after performing the subsequent first single-trip movement along the second direction, the cumulative deviation in the first direction is set to zero; and / or, If the cumulative deviations of the first direction and the second direction are in the same direction and are not set to zero within a preset number of movements, then the cumulative deviation with the smaller absolute value is set to zero and the cumulative deviation with the larger absolute value is used to offset the cumulative deviation with the smaller absolute value.
6. The method for controlling a breast tissue excision motor according to claim 1, characterized in that, The method further includes: The load current of the rotary cutting motor is collected when it moves along the first direction, and when the load current reaches the first limit current threshold, the position of the rotary cutting motor is recorded and the travel range of the rotary cutting motor in the first direction is calibrated. The magnitude of the load current is collected when the rotary cutting motor moves along the second direction, and when the load current reaches the second limit current threshold, the position of the rotary cutting motor is recorded and the travel range of the rotary cutting motor in the second direction is calibrated.
7. The method for controlling a breast tissue excision motor according to claim 1, characterized in that, When performing the subsequent first single-pass motion along the second direction, the method further includes: The load current of the rotary cutting motor is collected; If the magnitude of the load current reaches the third limit current threshold, the current single-journey movement is stopped, and the cumulative deviation in the first direction is retained.
8. A breast tissue excision motor control system, characterized in that, include: The determination module is used to determine the deviation of the single-stroke motion based on the actual position of the rotary cutting motor during the single-stroke motion. An accumulation module is used to accumulate the deviation amount into the cumulative deviation amount corresponding to the current single-journey movement direction when the deviation amount is within a preset threshold range; The triggering module is used to correct the stroke endpoint of the first subsequent single-stroke movement along the second direction based on the cumulative deviation in the first direction when at least two consecutive single-stroke movements are along the first direction and the deviation of the at least two consecutive single-stroke movements is within the preset threshold range, wherein the second direction is the opposite direction of the first direction. The compensation module is used to perform the subsequent first single-stroke motion along the second direction based on the corrected stroke endpoint.
9. An electronic device, characterized in that, include: At least one processor; as well as A memory storing instructions that, when executed by the at least one processor, cause the at least one processor to perform the breast cutting motor control method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing a computer to perform the breast excision motor control method according to any one of claims 1-7.
