Surgical pedal control method, electronic device, storage medium and program product
By setting up multi-stage modes on the pedal, utilizing vibration and resistance feedback mechanisms, and combining motor control and sensor detection, the problems of continuity, stability, and safety of pedal operation in ophthalmic surgery have been solved, achieving more efficient surgical control.
Patent Information
- Application Number
- CN202411720789.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2044-11-28
AI Technical Summary
In ophthalmic surgery, when doctors control the output of equipment via a foot switch, existing technologies cannot effectively ensure the continuity, stability, and safety of multi-stage operations, which is compromised.
By setting multiple modes on the pedal, and utilizing vibration and resistance feedback mechanisms, combined with motor control and sensor detection, force feedback is provided to prompt the user to switch between operation stages.
It improves the continuity, stability, and safety of surgical procedures and reduces user interference during the procedure.
Smart Images

Figure CN119655953B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of medical device technology, and specifically relates to a surgical pedal control method, electronic device, storage medium, and program product. Background Technology
[0002] During ophthalmic surgery, doctors need to adjust certain parameters of medical devices through a human-computer interface. Since doctors need to operate surgical instruments with their hands to perform surgical operations, foot switches are generally used to control the output of the equipment, including but not limited to the output power of phacoemulsification instruments, the output power of laser or electrocoagulation equipment, the movement frequency of the vitrectomy head, the vacuum pressure for aspirating intraocular fluid, and the control of intraocular perfusion pressure.
[0003] In certain surgical procedures, multiple outputs are required. For example, in vitrectomy, the first stage of pedal depressing activates the intraocular irrigation function; the second stage linearly controls the cutting speed of the vitrectomy based on the pedal's travel; and the third stage linearly controls the negative pressure of the suction based on the pedal's travel. Currently, multi-stage control of medical pedals typically involves basic position control to achieve changes in pedal stages.
[0004] Users typically need to use visual or sensory pedals during surgery, which can easily lead to distractions and affect the continuity, stability, and safety of the procedure. Summary of the Invention
[0005] To address the issue of user distraction during surgery, which affects the continuity, stability, and safety of the procedure, this application provides a surgical pedal control method. The pedal has a multi-stage mode, and the method includes:
[0006] Acquire control parameter data; control parameter data includes vibration start / stop signals;
[0007] Determine whether to activate the vibration mode based on the vibration start / stop signal;
[0008] If vibration mode is enabled, the pedal vibration will be controlled to indicate the stage transition.
[0009] If resistance mode is enabled, the pedal will be subjected to different resistance levels at different stages.
[0010] In one embodiment, the pedal is connected to a motor, and the pedal has a built-in tilt detection sensor; the motor drives the pedal, and the tilt detection sensor detects whether the pedal is tilted; the control parameter data includes motor start / stop signals and tilt switch signals; before determining whether to activate the vibration mode based on the vibration start / stop signals, the method further includes:
[0011] Based on the motor start / stop signal and the tilt switch signal, determine whether to start the motor and whether to tilt the pedal.
[0012] In one embodiment, the control parameter data includes vibration-related parameters, which include pedal mode; if the vibration mode is enabled, transition prompts are provided by controlling pedal vibration, including:
[0013] The transition point position is determined based on the pedal mode; different pedal modes correspond to different transition point positions.
[0014] The vibration range is determined based on the location of the transition point, where the vibration range is a preset range before the transition point location;
[0015] When the current position of the pedal is within the preset range and the vibration time is less than the preset time, the motor vibration is controlled by alternately adding and subtracting a fixed value based on the default pulse width modulation signal value.
[0016] In one embodiment, if the vibration mode is activated, the transition phase indication is provided by controlling the pedal vibration, and the method further includes:
[0017] If the current position of the pedal is not within the preset range or the vibration time is not less than the preset time, determine whether the current position of the pedal is outside the second range.
[0018] If the vibration time is outside the second range, the vibration time is reset to zero, and the motor is controlled according to the default pulse width modulation signal value.
[0019] If the signal is not outside the second range, the motor is controlled according to the default pulse width modulation signal value. The second range is greater than the preset range.
[0020] In one embodiment, the control parameter data includes resistance-related parameters, which include pedal mode; if the resistance mode is enabled, the pedal is controlled to apply different resistances at different stages, including:
[0021] The transition point position is determined based on the pedal mode; different pedal modes correspond to different transition point positions.
[0022] The pedal phase is determined based on the current position of the pedal and the position of the transition point;
[0023] Depending on the pedal stage, the motor is controlled to provide resistance by a fixed pulse width modulation signal value corresponding to the pedal stage, wherein different fixed pulse width modulation signal values are used for different pedal stages.
[0024] In one embodiment, the control parameter data includes resistance-related parameters, which include pedal mode; if the resistance mode is enabled, the pedal is controlled to apply different resistances at different stages, including:
[0025] The transition point position is determined based on the pedal mode; different pedal modes correspond to different transition point positions.
[0026] The pedal phase is determined based on the current position of the pedal and the position of the transition point;
[0027] Based on the pedal stage, determine the target current corresponding to the pedal stage; where different pedal stages correspond to different target currents.
[0028] Based on the target current, determine the pulse width modulation signal value, and control the motor to provide resistance using the pulse width modulation signal value.
[0029] In one embodiment, the control parameter data includes return control related parameters, which include initial speed and pedal resistance; the method further includes:
[0030] Obtain the actual speed of the motor and determine whether the actual speed of the motor is less than 0;
[0031] If the actual speed of the motor is less than 0, calculate the target speed of the motor return trip based on the initial speed and pedal resistance.
[0032] The pulse width modulation signal value is calculated based on the target speed and the actual speed of the motor.
[0033] The pedal return speed is controlled based on the pulse width modulation signal value.
[0034] In one embodiment, controlling the pedal return speed based on the pulse width modulation signal value further includes:
[0035] Compare the pulse width modulation signal value with the minimum pulse width modulation signal value. The minimum pulse width modulation signal value is greater than the vibration pulse width modulation signal value when the pedal vibrates.
[0036] If the pulse width modulation signal value is greater than the minimum pulse width modulation signal value, the motor is controlled according to the pulse width modulation signal value;
[0037] If the pulse width modulation signal value is less than or equal to the minimum pulse width modulation signal value, the motor is controlled using the vibration pulse width modulation signal value or the resistance pulse width modulation signal value.
[0038] In one embodiment, the pedal has a built-in tilt detection sensor, the pedal is connected to an encoder, and the control parameter data includes an encoder reset signal and a tilt switch signal, including:
[0039] Based on the encoder reset signal and the tilt switch signal, determine whether the pedal has returned to the highest point and whether the pedal has tilted.
[0040] Read encoder data when the pedal is not at its highest point and the pedal is not tilted.
[0041] The current position of the pedal is determined based on the encoder data.
[0042] In one embodiment, an electronic device is also provided, comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to perform the above-described surgical pedal control method.
[0043] In one embodiment, a computer-readable storage medium is also provided, which stores a computer program that can be executed by a processor to perform the above-described surgical pedal control method.
[0044] In one embodiment, a computer program product is also provided, including a computer program / instructions that, when executed by a processor, implement the above-described surgical pedal control method.
[0045] The technical solution provided in the above embodiments of this application provides force feedback to the user's feet by controlling the pedal to vibrate or applying resistance to the pedal, thereby realizing segmented control of the pedal, making the user less susceptible to interference during surgery, and improving the continuity, stability and safety of the surgery. Attached Figure Description
[0046] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly described below.
[0047] Figure 1 This is a schematic diagram of a surgical pedal device provided in one embodiment of this application;
[0048] Figure 2 A schematic flowchart of a surgical pedal control method provided in an embodiment of this application;
[0049] Figure 3 A motor control flowchart provided in one embodiment of this application;
[0050] Figure 4 A detailed flowchart of step S230 provided in an embodiment of this application
[0051] Figure 5 This is a schematic diagram illustrating the effect of a vibration mode provided in an embodiment of this application;
[0052] Figure 6 A detailed flowchart of step S240 provided in an embodiment of this application.
[0053] Figure 7 This is a schematic diagram illustrating the effect of fixed PWM in a resistance mode according to an embodiment of this application;
[0054] Figure 8 This is a schematic diagram illustrating the effect of PID calculation of PWM in a resistance mode according to an embodiment of this application;
[0055] Figure 9 A return control flowchart provided in one embodiment of this application;
[0056] Figure 10 An encoder control flowchart provided in one embodiment of this application;
[0057] Figure 11 This is a schematic diagram of the pedal control system provided in one embodiment of this application;
[0058] Figure 12 This is a schematic diagram of the read control flow provided in one embodiment of this application;
[0059] Figure 13 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0060] The above-mentioned figures include the following reference numerals:
[0061] 1-Motor; 2-Base; 3-Pedal; 4-Conversion point; 1300-Electronic equipment; 1310-Processor; 1320-Memory. Detailed Implementation
[0062] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.
[0063] Similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this application, terms such as "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0064] In one embodiment, Figure 1 This is a schematic diagram of a surgical footrest 3 device provided in an embodiment of this application, as shown below. Figure 1 As shown, motor 1 connects pedal 3 and base 2. Motor 1 drives pedal 3 to vibrate and provides resistance to pedal 3. The acute angle between pedal 3 and base 2 is the total stroke of pedal 3. Depending on the pedal mode, there are 0 to multiple transition points in the total stroke of pedal 3 (e.g., ...). Figure 1 The dashed line represents two transition points. When zero transition points are set, it is in single-stage mode; when one transition point is set, it is in two-stage mode; and when two transition points are set, it is in three-stage mode.
[0065] During ophthalmic surgery, when users control the output of the device via a foot switch, precise control of the output requires accurate measurement of the foot pedal travel. Components used for this measurement include, but are not limited to, potentiometers, encoders, and Hall effect sensors. The foot pedal travel can be adjusted through programming to suit different users' habits. In scenarios requiring multiple output levels, the pedal travel and driving force can be adjusted at different stages, and vibration or resistance feedback can be provided between these stages.
[0066] Figure 2 This is a schematic flowchart of a surgical pedal control method provided in one embodiment of this application, as shown below. Figure 1 As shown in the embodiment of this application, the surgical pedal control method includes steps S210-S240.
[0067] Step S210: Acquire control parameter data; the control parameter data includes vibration start / stop signals;
[0068] The control parameter data includes motor start / stop signals, pedal segmentation mode, switching point position settings, pedal resistance settings, pedal vibration frequency settings, and vibration start / stop signals.
[0069] The motor start / stop signal is used to determine whether motor 1 has started. The following steps will only proceed after motor 1 has started. If motor 1 has not started, the check will be repeated, and so on. The pedal segmentation modes include single-stage, double-stage, and triple-stage modes. Different pedal modes correspond to different numbers of transition points; for example, single-stage mode has no transition points, double-stage mode has one transition point, and triple-stage mode has two transition points. The transition point position, pedal resistance, and pedal vibration frequency are all set by the user according to their usage habits. The transition point position setting can be a percentage of the total pedal travel, and the pedal force setting can be a percentage of the total force. The vibration start / stop signal is the user's command to select the vibration mode.
[0070] Step S220: Determine whether to activate the vibration mode based on the vibration start / stop signal;
[0071] Users can choose whether to enable vibration mode. If vibration mode is selected, it will be enabled; otherwise, resistance mode will be enabled.
[0072] Step S230: If vibration mode is enabled, the transition phase is indicated by controlling the vibration of pedal 3;
[0073] After the vibration mode is activated, at the transition point, motor 1 controls pedal 3 to vibrate to prompt the user to start the transition phase.
[0074] Step S240: If resistance mode is enabled, control pedal 3 to be at different resistance levels at different stages.
[0075] When the resistance mode is activated, at the transition point, motor 1 applies resistance to pedal 3 to prompt the user to start the transition. At different transition points, the amount of resistance applied by motor 1 to pedal 3 is different.
[0076] This application starts the motor 1 after acquiring control parameter data. The torque provided by the motor 1 connected to the rotating shaft of the pedal 3 provides force feedback to the user's foot. For example, the pedal 3 is controlled to vibrate or resistance is applied to the pedal 3 according to the vibration start and stop signal to provide force feedback to the user's foot. This provides a convenient and quick way to remind the surgical operator of the current stage during the operation, thereby improving the continuity, stability and safety of the operation.
[0077] In one embodiment, the pedal 3 has a built-in tilt detection sensor; the tilt detection sensor is used to detect whether the pedal 3 is tilted, and to protect the pedal 3 from tilting. The control parameter data in step S210 above also includes a motor start / stop signal and a tilt switch signal; the motor start / stop signal controls the start and stop of the motor 1, and the tilt switch signal is a signal generated by the tilt detection sensor when it detects whether the pedal 3 has tilted. In one embodiment, before step S220 above, the method further includes: determining whether to start the motor and whether the pedal is tilted based on the motor start / stop signal and the tilt switch signal. Figure 3 A motor control flowchart provided for one embodiment of this application, such as Figure 3 As shown, it includes:
[0078] Step S310: Determine whether to start motor 1 based on the motor start / stop signal;
[0079] If motor 1 does not start, the process will repeat step S210 and wait for the motor to start according to the start / stop signal.
[0080] Step S320: Motor 1 starts and determines whether pedal 3 tilts based on the tilt switch signal;
[0081] If pedal 3 is not tilted, then if the tilt switch signal transmits the pedal 3 not tilted signal to motor 1, then the vibration start / stop signal determines whether to start the vibration mode, that is, to select either vibration mode or resistance mode according to the user's choice.
[0082] If the tilt switch signal transmits the pedal 3 tilt signal to motor 1, motor 1 stops working; after motor 1 stops working, it re-enters step S210 and waits to start according to the start / stop signal.
[0083] In one embodiment, Figure 4A detailed flowchart of step S230 provided in an embodiment of this application is shown below. Figure 4 As shown, the vibration mode is activated, and the transition phase is indicated by controlling the vibration of pedal 3. The control parameter data in step S210 includes vibration-related parameters, including the pedal mode. Step S230 specifically includes steps S410-S450.
[0084] Step S410: Determine the switching point position according to the pedal mode; different pedal modes correspond to different switching point positions and different numbers of switching points; the switching point position is set by the user according to their own usage habits, and the switching point position and number of switching points are fixed under the same pedal mode.
[0085] For example: In the single-stage mode of pedal 3, there is no transition point, and there is no need to set the position of the transition point; the dual-stage mode has one transition point, and the user sets the position of this transition point according to their own usage habits; the triple-stage mode has two transition points, and the user sets the positions of these two transition points according to their own usage habits. After the transition point positions are set, the user only needs to select the pedal mode to determine the corresponding transition point position.
[0086] Step S420: Determine the vibration range based on the location of the switching point, where the vibration range is a preset range before the location of the switching point;
[0087] The preset range is the range set by the user for different transition point positions corresponding to each different pedal mode. When pedal 3 enters the preset range, it means that pedal 3 is about to reach the transition point and is ready to enter the next stage. At this time, motor 1 will apply vibration to pedal 3 to prompt the user that the transition point is about to be reached and ready to enter the next stage.
[0088] In the same mode, the vibration level at different transition points can be the same or different. For example, the user can set the three-stage mode so that the vibration level of pedal 3 is lighter when it is at the first transition point and heavier when it is at the second transition point. At this time, the user can perceive the stage of pedal 3 according to the different vibration levels.
[0089] Step S430: Determine whether the current position of the pedal is within the preset range. If it is within the preset range, proceed to step S440; otherwise, proceed to step S460.
[0090] Step S440: When the current position of pedal 3 is within the preset range, determine whether the vibration time of the pedal is less than the preset time. If the vibration time is less than the preset time, proceed to step S450; if the vibration time is greater than the preset time, proceed to step S460.
[0091] Step S450: When the current position of pedal 3 is within the preset range and the vibration time is less than the preset time, a fixed value is alternately added to and subtracted from the default pulse width modulation signal value (PMW) to achieve vibration of motor 1 while maintaining constant average damping.
[0092] The pulse width modulation signal value (PWM value) refers to the time the high level exists within one cycle of the duty cycle; the maximum value of the pulse width modulation signal (PWM maximum value) refers to one cycle of the duty cycle; the duty cycle refers to the proportion of the on-time (or high-level time) to the total time within one pulse cycle, and here the duty cycle is the ratio of the PWM value to the PWM maximum value.
[0093] Alternatingly adding and subtracting a fixed value based on the default pulse width modulation signal value means alternatingly adding and subtracting a fixed value on the default pulse width modulation signal value. The ratio of the changing PWM value (hereinafter referred to as the vibration PWM value) to the maximum PWM value is used to control the output of the motor voltage. The default pulse width modulation signal value is the pulse width modulation signal value (hereinafter referred to as the default PWM value) that has been preset before entering the vibration mode. The fixed value is a suitable PWM value. After alternatingly adding and subtracting a fixed value from the default PWM value, a changing PWM value is obtained. The ratio of the changing PWM value to the maximum PWM value is the duty cycle. The change in duty cycle will cause the voltage of motor 1 to change at this time. The continuous change in voltage magnitude will cause motor 1 to vibrate. The speed of alternatingly adding and subtracting the fixed value is the vibration frequency of motor 1. A timer is used to control the change of the addition and subtraction sign, and the vibration time of motor 1 is recorded. Then, the process returns to step 430 to repeat the cycle.
[0094] The preset time is the user-defined duration for the vibration of pedal 3. If the vibration time of pedal 3 is too long, it may affect user experience. For example, during surgery, if the user needs to keep pedal 3 within the vibration range, and the vibration time is not controlled, pedal 3 will remain vibrating within the range, affecting user experience. However, if the vibration time is controlled by setting a preset time, the user will know that pedal 3 is about to change phases and can continue to keep pedal 3 within the vibration range without being affected.
[0095] Part of the code for this step is:
[0096] {
[0097] / / Alternately increment or decrement a value based on the default PWM value to achieve vibration of motor 1 while maintaining constant average damping.
[0098] Computed_PWM=default_PWM+optimal_PWM*ch->Vibration_direction;
[0099] Vibration_time++;
[0100] }
[0101] Among them, computed_PWM is the final calculated PWM value; default_PWM is the default PWM value before vibration calculation; optimal_PWM is a suitable fixed value to add or subtract; ch->Vibration_direction is the positive or negative sign; and Vibration_time++ is the recording time for vibration.
[0102] Step S460: Determine whether the current position of pedal 3 is outside the second range; if it is outside the second range, the vibration time of pedal 3 is reset to zero, and motor 1 is controlled by the default PWM. When pedal 3 moves into the vibration range again during the next phase, vibration and timing are restarted; if it is within the second range, motor 1 is controlled by the default PWM.
[0103] The second range is the vibration time holding range, which can also be understood as the safety range, and is greater than the preset range. To prevent pedal 3 from vibrating even when it is outside the vibration range, if the vibration time of pedal 3 is greater than the preset time and outside the second range, the vibration time of pedal 3 is reset to zero, and the motor is controlled according to the default PWM value. Therefore, the vibration time holding range is greater than the preset range.
[0104] Figure 5 This is a schematic diagram illustrating the effect of a vibration mode provided in an embodiment of this application, as shown below. Figure 5 As shown, the horizontal axis represents the travel of pedal 3, and the vertical axis represents the duty cycle. The initial position of pedal 3 is set to 0°. The actual position of pedal 3 increases with the angle between its initial position and the position of pedal 3 as it moves. The duty cycle is the ratio of the high-level time to the entire cycle time within a pulse period. The duty cycle value is the ratio of the PWM value to the maximum PWM value; the larger the PWM value, the larger the output voltage. During the movement of pedal 3, two sudden and significant changes in the duty cycle indicate that pedal 3 is in a rotation phase. At this time, the duty cycle changes by alternately adding and subtracting a fixed value from the default PWM, causing a change in the voltage of motor 1. The continuous change in voltage causes motor 1 to vibrate, and motor 1 applies vibration to pedal 3 to send a rotation phase prompt to the user.
[0105] In one embodiment, Figure 6 A detailed flowchart of step S240 provided in an embodiment of this application is shown below. Figure 6As shown, the resistance mode is activated, and the pedal 3 is controlled to have different resistances at different stages. The acquired control parameter data includes resistance-related parameters, including the pedal mode and pedal resistance. The pedal resistance is the resistance applied by the motor 1 to the pedal 3. Step S240 includes:
[0106] Step 610: Determine the transition point position based on the pedal mode; different pedal modes correspond to different transition point positions.
[0107] Step 620: According to the user's selection, control motor 1 to provide resistance using a fixed PWM method, and determine the pedal stage based on the current position and transition point position of pedal 3; wherein, different pedal modes correspond to different transition point positions, and the stage of pedal 3 in the corresponding mode can be determined by the current position and transition point position of pedal 3.
[0108] For example: If pedal 3 is in dual-stage mode, the corresponding transition point position can be determined based on the dual-stage mode: if pedal 3 is on one side of the transition point position, it means that pedal 3 is in the first stage of the dual-stage mode; if pedal 3 is on the other side of the transition point position, it means that pedal 3 is in the second stage of the dual-stage mode; if pedal 3 is on the transition point position, it means that pedal 3 is in the current transition stage.
[0109] Step 630: According to pedal 3 stage, the motor 1 is controlled by a fixed PWM corresponding to pedal 3 stage to provide resistance, wherein different fixed PWM values are used for different pedal 3 stages.
[0110] Figure 7 This is a schematic diagram illustrating the effect of fixed PWM in a resistance mode according to an embodiment of this application, as shown below. Figure 7 As shown, the horizontal axis represents the travel of pedal 3, and the vertical axis represents the duty cycle. The initial position of pedal 3 is set to 0°, and the actual position of pedal 3 increases with the angle between the pedal 3 and its initial position as pedal 3 moves. The fixed PWM value is a pre-set PWM value, which varies depending on the stage the pedal is in. The duty cycle is the ratio of the high-level time to the entire cycle time within a pulse period. Here, the duty cycle value is the ratio of the fixed PWM value to the maximum PWM value. The larger the fixed PWM value, the larger the duty cycle, which means a larger output voltage. The larger the voltage, the greater the resistance applied by motor 1 to pedal 3. The significant change in resistance sends a stage prompt to the user.
[0111] like Figure 7As shown, during the movement of pedal 3, the first stage is characterized by the ratio of the first fixed PWM value to the maximum PWM value, which is the duty cycle of the first stage. After the first fixed PWM value changes to the second fixed PWM value, the pedal enters the second stage, where the ratio of the second fixed PWM value to the maximum PWM value is the duty cycle of the second stage. Since the fixed PWM value changes from the first fixed PWM value to the second fixed PWM value, the duty cycle suddenly changes significantly, indicating to the user that pedal 3 is entering the second stage. After the second fixed PWM value changes to the third fixed PWM value, the pedal enters the third stage, where the ratio of the third fixed PWM value to the maximum PWM value is the duty cycle of the third stage. Since the fixed PWM value changes from the second fixed PWM value to the third fixed PWM value, the duty cycle suddenly changes significantly, indicating to the user that pedal 3 is entering the third stage.
[0112] In one embodiment, such as Figure 6 The diagram shows the activation of the resistance mode, which controls the pedal 3 to apply different resistances at different stages, and also includes:
[0113] Step S610: Determine the transition point position according to the pedal mode; different pedal modes correspond to different transition point positions; determine the pedal stage according to the current position of pedal 3 and the transition point position;
[0114] Step S640: Based on the user's selection, use PID calculation to obtain the PWM value to control motor 1 to provide resistance;
[0115] Step S650: Determine the target current corresponding to the pedal stage based on the pedal stage; wherein, different pedal stages correspond to different target currents;
[0116] Step S660: Use the target current to perform PID calculation to obtain the PWM value, and control motor 1 to provide resistance through PWM.
[0117] The PID calculation uses incremental PID, and the PID calculation is as follows:
[0118] u(k)=KP[e(k)-e(k-1)]+KIe(k)+KD[e(k)-2e(k-1)+e(k-2)]
[0119] Where u(k) is the PWM value controlling motor 1.
[0120] The proportion P: e(k)-e(k-1) represents the current error minus the previous error;
[0121] Integral I: e(k) represents the error;
[0122] The differential D: e(k)-2e(k-1)+e(k-2) represents the current error - 2 * the previous error + the error before that.
[0123] Figure 8 This is a schematic diagram illustrating the effect of PID calculation of PWM in a resistance mode according to an embodiment of this application, as shown below. Figure 8 As shown, the horizontal axis represents the travel of pedal 3, and the vertical axis represents the duty cycle. The initial position of pedal 3 is set to 0°. The actual position of pedal 3 increases with the angle between the pedal 3 and its initial position as pedal 3 moves. The duty cycle is the ratio of the high-level time to the entire cycle time within a pulse period. Here, the duty cycle value is the ratio of the PWM value calculated by the PID to the maximum PWM value. The larger the PWM value calculated by the PID, the larger the duty cycle value, resulting in a larger output voltage. Depending on the pedal stage, the PWM value calculated by the PID for that stage will also be different.
[0124] like Figure 8 As shown, during the movement of pedal 3, the first stage is the duty cycle of the first stage, which is the ratio of the first PWM value calculated by PID to the maximum PWM value.
[0125] The second stage is the duty cycle of the second stage, which is the ratio of the second PWM value calculated by PID to the maximum PWM value. At this time, the duty cycle suddenly changes significantly, prompting the user that pedal 3 is entering the second stage.
[0126] The third stage is the duty cycle of the third stage, which is the ratio of the third PWM value calculated by PID to the maximum PWM value. At this time, the duty cycle suddenly changes significantly, prompting the user that pedal 3 is entering the third stage.
[0127] The two sudden and significant changes in duty cycle shown in the diagram indicate that pedal 3 is in the rotation phase. At this time, the PWM value calculated by PID causes the voltage of motor 1 to increase. The higher the voltage, the greater the resistance that motor 1 applies to pedal 3. The significant change in resistance sends a rotation phase prompt to the user.
[0128] In one embodiment, after entering vibration mode according to step S230 or resistance mode according to step S240, the user can choose whether to perform return control as needed; the release speed of pedal 3 cannot be too fast when working in certain fields, and return control can be activated to control the return speed. The control parameter data includes return control related parameters. Figure 9 A return control flowchart provided for one embodiment of this application, such as Figure 9 As shown, the return control method includes:
[0129] Step S910: Obtain the actual speed of the motor and determine whether the actual speed of the motor is less than 0; wherein, the actual speed of the motor can be obtained through an encoder, and the actual speed of the motor is a vector.
[0130] Step S920: If the actual speed of the motor is less than 0, calculate the target speed of the return stroke of motor 1 based on the initial speed and pedal resistance; if the actual speed of the motor is less than 0, it means that motor 1 is reversing and pedal 3 is returning; where pedal resistance acts as a damping force, the greater the damping force, the slower the return stroke speed.
[0131] Step S921: Based on the target speed and the actual speed of motor 1, calculate the return PWM value using PID. The specific calculation steps are as follows:
[0132] u(k)=KP[e(k)-e(k-1)]+KIe(k)+KD[e(k)-2e(k-1)+e(k-2)]
[0133] Where u(k) is the PWM value for controlling motor 1;
[0134] The proportion P: e(k)-e(k-1) represents the current error minus the previous error;
[0135] Integral I: e(k) represents the error;
[0136] Differential D: e(k)-2e(k-1)+e(k-2) represents the current error - 2 * the previous error + the error before that;
[0137] Step S922: Compare and calculate the return PWM value with the minimum PWM value; if the pulse width modulation signal value is greater than the minimum pulse width modulation signal value, control motor 1 according to the return PWM value;
[0138] Among them, the minimum value of the pulse width modulation signal is greater than the vibration pulse width modulation signal value when pedal 3 vibrates, so as to prevent the vibration of pedal 3 from being used as the return to calculate the PWM value and causing interference.
[0139] Step S930: If the actual speed of motor 1 is greater than 0, or the pulse width modulation signal value is less than or equal to the minimum value of the pulse width modulation signal, then continue to use the PWM value obtained in vibration mode or resistance mode.
[0140] The control parameter data in step S210 above also includes encoder reset signal, tilt switch signal, actual pedal position, actual speed, etc.; in one embodiment, the pedal 3 has a built-in tilt detection sensor and the pedal 3 is connected to the encoder; before step S220 above, it also includes: determining whether the pedal 3 tilts and whether the pedal 3 returns to the highest point based on the encoder reset signal and the tilt switch signal. Figure 10 An encoder control flowchart provided in one embodiment of this application is shown below. Figure 10 As shown:
[0141] Step S1010: Determine whether pedal 3 is tilted based on the tilt switch signal;
[0142] If pedal 3 tilts, the encoder stops working and checks again whether pedal 3 has tilted, repeating this process; if pedal 3 does not tilt, proceed to step S1020.
[0143] Step S1020: Determine whether pedal 3 has returned to the highest point based on the encoder reset signal;
[0144] If pedal 3 returns to the highest point, the encoder reset switch is triggered, and the encoder is reset.
[0145] If pedal 3 does not return to the highest point, the encoder reset switch cannot be triggered, and the encoder will not reset.
[0146] The zero point position can be determined by resetting the encoder. After determining the zero point, the position of pedal 3 relative to the zero point is read to obtain the actual position of pedal 3.
[0147] Step S1030: When pedal 3 has not returned to the highest point and pedal 3 has not tilted, i.e. the encoder has not been reset, read the encoder data; the data includes the current actual position and actual speed of pedal 3, etc.
[0148] Step S1040: Calculate and update encoder data; wherein, the encoder data is calculated and updated based on the encoder data read from the feedback signal of the unreset encoder; the current position and current speed of pedal 3 are determined based on the data, and the updated data is used to determine whether pedal 3 is tilted again, and the cycle is repeated continuously to continuously update and determine the actual position and actual speed of pedal 3.
[0149] In one embodiment, Figure 11 This is a schematic diagram of the pedal 3 control system provided in an embodiment of this application, as shown below. Figure 11 As shown, the pedal control system includes a pedal motor control section, an encoder control section, a switch reading control section, and a data storage and communication section. The data storage and communication section transmits start / stop signals, mode selection signals, etc., into the pedal motor control section, the encoder control section, and the switch reading control section. The pedal motor control section, the encoder control section, and the switch reading control section then output the encoder reading values and switch reading values read during system operation.
[0150] The control parameter data in step S210 above also includes switch reading related data and tilt switch signals; in one embodiment, the pedal 3 has a built-in tilt detection sensor, and at least one switch is arranged around the pedal 3, with the pedal 3 connected to the switch, allowing the user to customize the function of each switch as needed; before step S220 above, the method further includes: determining whether the pedal 3 is tilted based on the switch reading related data. In one embodiment, Figure 12 This is a schematic diagram of the read control flow provided in an embodiment of this application, as shown below. Figure 12 As shown:
[0151] Step S1220: Determine if pedal 3 is tilted;
[0152] Step S1221: If pedal 3 is not tilted, read the value of each switch quantity; save the value of each switch quantity in different bits of the set value to facilitate data transmission and communication; obtain the current state of the switch (i.e. whether it is on) by reading the value of each switch quantity, and judge whether pedal 3 is tilted again. Repeat this process to continuously obtain the real-time state of the switch (i.e. whether it is on).
[0153] If pedal 3 tilts, the switch stops working, and the system checks again whether pedal 3 has tilted. This process is repeated to continuously obtain the real-time status of the switch (i.e., whether it is on or off).
[0154] Figure 13 This is a schematic diagram of the structure of an electronic device 1300 provided in an embodiment of this application, as shown below. Figure 13 As shown, the electronic device 1300 includes: a processor 1310; a memory 1320 for storing executable instructions of the processor 1310; wherein the processor 1310 is configured to execute the surgical pedal 3 control method of the above embodiment.
[0155] In one embodiment, a computer-readable storage medium is also provided, which stores a computer program that can be executed by a processor 1310 to perform the surgical pedal 3 control method of the above embodiment.
[0156] In one embodiment, a computer program product is also provided, including a computer program / instructions that, when executed by processor 1310, implement the surgical pedal 3 control method provided in the embodiments of this application.
[0157] The apparatuses and methods disclosed in the several embodiments provided in this application can also be implemented in other ways. The apparatus embodiments described above are merely illustrative; each block in the flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the figures. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0158] In addition, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0159] If a function is implemented as a software module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0160] The above embodiments are merely illustrative of the technical solutions of this application and are not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A surgical foot pedal control method, characterized by, The pedal has a multi-stage mode, and the method comprises: obtaining control parameter data; the control parameter data comprises a vibration start-stop signal, and vibration-related parameters, the vibration-related parameters comprising a pedal mode; determining whether to start a vibration mode according to the vibration start-stop signal; if the vibration mode is started, prompting a stage transition by controlling the pedal vibration; if the vibration mode is not started, starting a resistance mode, and controlling the pedal to be in different resistances at different stages; wherein, if the vibration mode is started, prompting the stage transition by controlling the pedal vibration, comprises: determining a transition point position according to the pedal mode; different pedal modes correspond to different transition point positions; obtaining a vibration range according to the transition point position, wherein the vibration range is a preset range before the transition point position; when the current position of the pedal is within the preset range and the vibration time is less than a preset time, alternatingly adding and subtracting a fixed value from a default pulse width modulation signal value to control the motor vibration; wherein, if the vibration mode is started, prompting the stage transition by controlling the pedal vibration, further comprises: when the current position of the pedal is not within the preset range or the vibration time is not less than the preset time, determining whether the current position of the pedal is outside a second range; if the current position of the pedal is outside the second range, clearing the vibration time and controlling the motor according to the default pulse width modulation signal value; if the current position of the pedal is not outside the second range, controlling the motor according to the default pulse width modulation signal value, the second range being larger than the preset range.
2. The surgical pedal control method of claim 1, wherein, The pedal is connected to a motor, and the pedal is provided with a tip-over detection sensor; the motor is used to drive the pedal, and the tip-over detection sensor is used to detect whether the pedal is tipped over; the control parameter data comprises a motor start-stop signal and a tip-over switch signal; before determining whether to start the vibration mode according to the vibration start-stop signal, the method further comprises: determining whether to start the motor and whether the pedal is tipped over according to the motor start-stop signal and the tip-over switch signal.
3. The surgical pedal control method of claim 1, wherein, The control parameter data comprises resistance-related parameters, the resistance-related parameters comprising the pedal mode; if the resistance mode is started, controlling the pedal to be in different resistances at different stages, comprises: determining a transition point position according to the pedal mode; different pedal modes correspond to different transition point positions; determining a pedal stage according to the current position of the pedal and the transition point position; controlling the motor to provide resistance by using a fixed pulse width modulation signal value corresponding to the pedal stage, wherein different pedal stages use different fixed pulse width modulation signal values.
4. The surgical pedal control method of claim 1, wherein, The control parameter data comprises resistance-related parameters, the resistance-related parameters comprising the pedal mode; if the resistance mode is started, controlling the pedal to be in different resistances at different stages, comprises: determining a transition point position according to the pedal mode; different pedal modes correspond to different transition point positions; determining a pedal stage according to the current position of the pedal and the transition point position; According to the pedal stage, a target current corresponding to the pedal stage is determined; different pedal stages correspond to different target currents; According to the target current, a pulse width modulation signal value is determined, and the motor is controlled to provide resistance through the pulse width modulation signal value.
5. The surgical pedal control method of claim 1, wherein, The control parameter data includes return stroke control related parameters, and the return stroke control related parameters include an initial speed and a pedal resistance; the method further includes: An actual motor speed is obtained, and it is determined whether the actual motor speed is less than 0; If the actual motor speed is less than 0, a target speed of a motor return stroke is calculated according to the initial speed and the pedal resistance; According to the target speed and the actual motor speed, a pulse width modulation signal value is calculated; According to the pulse width modulation signal value, the pedal return stroke speed is controlled.
6. The surgical pedal control method of claim 5, wherein, According to the pulse width modulation signal value, the pedal return stroke speed is controlled, and the method further includes: The pulse width modulation signal value is compared with a pulse width modulation signal minimum value, and the pulse width modulation signal minimum value is greater than a vibration pulse width modulation signal value when the pedal vibrates; If the pulse width modulation signal value is greater than the pulse width modulation signal minimum value, the motor is controlled according to the pulse width modulation signal value; If the pulse width modulation signal value is less than or equal to the pulse width modulation signal minimum value, the motor is controlled using a vibration pulse width modulation signal or a resistance pulse width modulation signal.
7. The surgical pedal control method of claim 1, wherein, The pedal is provided with a built-in dump detection sensor, and the pedal is connected with an encoder; the control parameter data includes an encoder reset signal and a dump switch signal, and the method includes: According to the encoder reset signal and the dump switch signal, it is determined whether the pedal returns to the highest point and whether the pedal is dumped; When the pedal is not dumped and the pedal does not return to the highest point, data of the encoder is read; According to the data of the encoder, a current position of the pedal is determined.
8. An electronic device, comprising: The electronic device includes: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute the surgical pedal control method of any one of claims 1-7.
9. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, and the computer program is executable by the processor to complete the surgical pedal control method of any one of claims 1-7.
10. A computer program product, characterised in that, The computer program / instructions are executed by the processor to implement the surgical pedal control method of any one of claims 1-7.
Citation Information
Patent Citations
Control method and controller for clamping device of engineering machinery and clamping device
CN115450210A
Surgical robot pedal control system and method, readable medium and surgical robot
CN116423547A