Servo motor control method and system, electronic device and storage medium
By dynamically adjusting the motion accuracy interval and window time of the servo motor, the problem of slow response and inconsistent accuracy during high-speed operation is solved, precise control and stability judgment are achieved, parameter settings are simplified and communication load is reduced.
Patent Information
- Application Number
- CN202411020012.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-26
- Publication Date
- 2024-11-15
AI Technical Summary
The existing servo motor control methods respond slowly when running at high speed. The fixed speed window parameters lead to inconsistent accuracy requirements, which affects the judgment of speed stability and system response time.
By obtaining the speed errors of the current running speed of the servo motor and the target speed, we can determine whether the error is in the motion accuracy interval and whether the duration meets the window time, dynamically adjust the motion accuracy interval to generate a motion signal, avoid manually rewriting the speed window parameters, and simplifying parameter settings and reduce communication load.
Accurate control at different speeds is achieved, the judgment of speed stability and system response time is improved, the possibility of errors and unnecessary data interaction is reduced, and the accuracy of flag position is improved.
Smart Images

Figure CN118971725A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of servo motor control, and in particular to a servo motor control method, system, electronic device and storage medium. Background Art
[0002] The servo system is mainly composed of a servo drive and a servo motor. The servo motor (referred to as the motor) rotates under the control of the servo drive (referred to as the drive), thereby driving the load to move. In the actual use of the motor, it is necessary to set the speed window (the error between the current operating speed and the target speed) and the window time parameter for the drive to ensure that the drive sets the flag at a reasonable speed. When a certain device or working condition needs to traverse different levels of movement speed and has requirements for speed accuracy, a speed window cannot cover all levels of movement speed.
[0003] For example, when the target speed is 100m / s, the speed window is set to 5. The drive will stay within the range of 100m / s±5m / s for a certain period of time, set the corresponding flag bit to represent the target speed reaching signal, and generate a motion signal.
[0004] When the target speed is 500m / s, if the previous speed window is used, the drive needs to be within the range of 500m / s±5m / s and maintain it for a certain period of time before the corresponding flag is set.
[0005] Among them, when the speed reaches 100m / s, the error of ±5m / s requires an accuracy of less than 5% for 100m / s. However, for 500m / s, the accuracy requirement is less than 1%. When the speed is accelerated to 1000m / s or even 2000m / s, the accuracy requirement is more stringent. Fixed speed window parameters may cause the system to respond slowly at high speeds. In this way, the fixed window parameters will cause the actual requirements for the motor running speed to reach the target speed to be different, affecting the judgment of speed stability and the system response time.
[0006] With regard to the problem of unreasonable servo motor control methods in related technologies, no effective solution has been proposed so far. Summary of the invention
[0007] In this embodiment, a servo motor control method, system, electronic device and storage medium are provided to solve the problem of unreasonable servo motor control method in related art.
[0008] In a first aspect, a servo motor control method is provided in this embodiment, which runs on a servo driver connected to a servo motor; the method comprises:
[0009] Obtaining the current operating speed of the servo motor;
[0010] Determine a speed error between the current operating speed and the target speed;
[0011] Determine whether the speed error is in a motion accuracy interval, and whether a duration of the speed error in the motion accuracy interval is not less than a window time;
[0012] When the speed error is within the motion accuracy range and the duration is not less than the window time, a motion signal is generated.
[0013] In some of the embodiments, before obtaining the current running speed of the servo motor, the method further includes:
[0014] Configuration parameters are written into the servo driver, wherein the configuration parameters include at least one of the following: the target speed, the preset accuracy parameter, and the window time.
[0015] In some of the embodiments, before obtaining the current running speed of the servo motor, the method further includes:
[0016] The value of the speed window is written in the servo drive.
[0017] In some of the embodiments, after obtaining the current running speed of the servo motor, the method further includes:
[0018] Determine whether the speed error is within the speed window, and whether the duration of the speed error within the speed window is not less than the window time;
[0019] When it is determined that the speed error is within the speed window and the duration of the speed error being within the speed window is not less than the window time, the motion signal is generated.
[0020] In some of the embodiments, generating the motion signal comprises:
[0021] A preset flag position in the servo driver is set.
[0022] In some of the embodiments, after generating the motion signal, the method further comprises:
[0023] Changing the operating speed of the servo motor.
[0024] In a second aspect, a servo system is provided in this embodiment, comprising: a servo drive and a servo motor connected to each other, the servo motor being used to be connected to a load; wherein the servo drive is used to execute the servo motor control method described in the first aspect above, and the servo motor is used to rotate under the control of the servo drive, thereby driving the load to move.
[0025] In a third aspect, a medical system is provided in this embodiment, comprising: the servo system and a medical load device described in the second aspect above, wherein the servo system is connected to the medical load device, and the medical load device moves under the control of the servo system.
[0026] In a fourth aspect, an electronic device is provided in this embodiment, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the servo motor control method described in the first aspect above.
[0027] In a fifth aspect, in this embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the servo motor control method described in the first aspect are implemented.
[0028] The above-mentioned servo motor control method, system, electronic device and storage medium, the motion accuracy range changes with the change of the target speed, but the accuracy remains unchanged, and will not affect the judgment of speed stability and the system response time. The target speed and preset accuracy parameters can be written into the servo driver before the servo motor runs, without the need to manually rewrite during the servo motor operation phase. Compared with the traditional solution that relies on manually rewriting the speed window, the present application can simplify the parameter setting, and writing fewer parameters can reduce the communication load. At the same time, it also reduces the possibility of error, reduces unnecessary data interaction, and also improves the accuracy of setting the corresponding flag position. Therefore, the problem of unreasonable servo motor control method is solved.
[0029] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0031] Figure 1 is a hardware structure block diagram of an electronic device of a servo motor control method in an embodiment;
[0032] Figure 2 is a schematic diagram of the structure of a servo system in an embodiment;
[0033] Figure 3 is a flow chart of a servo motor control method in one embodiment;
[0034] Figure 4 is a flow chart of a servo motor control method in another embodiment;
[0035] Figure 5 It is a schematic diagram of the structure of a medical system in an embodiment. DETAILED DESCRIPTION
[0036] In order to more clearly understand the purpose, technical solutions and advantages of the present application, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments.
[0037] Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the general meaning understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a", "the", "these" and the like in this application do not represent quantitative restrictions, and they can be singular or plural. The terms "include", "comprise", "have" and any variants thereof involved in this application are intended to cover non-exclusive inclusions; for example, a process, method and system, product or device comprising a series of steps or modules (units) is not limited to the listed steps or modules (units), but may include unlisted steps or modules (units), or may include other steps or modules (units) inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether directly or indirectly. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships. For example, "A and / or B" can mean: A exists alone, A and B exist at the same time, and B exists alone. Usually, the character " / " indicates that the objects associated with each other are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.
[0038] In one embodiment, an electronic device is provided for executing the method embodiment provided in this embodiment. The electronic device may be a terminal, a computer or a similar computing device. Figure 1 FIG. 1 is a hardware structure block diagram of an electronic device of a servo motor control method according to an embodiment of the present application. Figure 1 As shown, the electronic device may include one or more ( Figure 1Only one is shown in the figure) processor 101 and memory 102 for storing data, wherein processor 101 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA. The above electronic device may also include a transmission device 103 and an input / output device 104 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.
[0039] The memory 102 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the servo motor control method in this embodiment. The processor 101 executes various functional applications and data processing by running the computer program stored in the memory 102, that is, to implement the above method. The memory 102 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 102 may further include a memory remotely arranged relative to the processor 101, and these remote memories can be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0040] The transmission device 103 is used to receive or send data via a network. The above network includes a wireless network provided by a communication provider of the electronic device. In one example, the transmission device 103 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 103 can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.
[0041] The servo system is mainly composed of a servo drive and a servo motor. The servo motor (referred to as the motor) rotates under the control of the servo drive (referred to as the drive), thereby driving the load to move. In the actual use of the motor, it is necessary to set the speed window (the error between the current operating speed and the target speed) and the window time parameter (a value between 50ms and 1000ms can be selected) for the drive to ensure that the drive sets the flag at a reasonable speed. When a certain device or working condition needs to traverse different levels of movement speed and has requirements for speed accuracy, a speed window cannot cover all levels of movement speed.
[0042] The unreasonable problems of traditional servo motor control methods are mainly reflected in the following aspects:
[0043] (1) Speed window adaptability problem: The same fixed-size speed window (e.g. ±5 m / s) cannot meet the precise control requirements at all different levels of motion speed. As the target speed increases, the same relative error window may lead to an increase in the absolute error, thus affecting the accuracy of speed control.
[0044] (2) Inconsistent precision control: When the motor speed changes greatly, the same speed window error percentage will cause the actual error value to increase significantly. For example, at a target speed of 100m / s, the error of ±5m / s is 5%, while at a target speed of 500m / s it becomes 1%. For higher speeds, such as 1000m / s or 2000m / s, such a window setting is obviously unreasonable.
[0045] (3) System response and speed stability judgment: Because the speed window setting directly affects the driver's judgment of when the motor has reached the target speed and triggered the corresponding flag, fixed window parameters may cause the system to respond slowly during high-speed operation because it needs to wait for the actual speed to enter the speed window and last for a period of time before making a correct judgment. This may prolong the time it takes for the system to adjust to the target speed and affect the overall dynamic performance and stability.
[0046] The traditional servo system is set with a speed window value, so the speed window can be used to determine whether the current operating speed of the servo motor meets the requirements. The following is an experimental improvement plan for controlling the servo system at different speed levels.
[0047] Solution 1: For different movement speeds, manually rewrite different speed window values and window times to cover all scenarios. The disadvantage of this solution is that it is necessary to determine the speed range and write the speed window parameters at the same time before each motor movement; it will increase frequent writing, which may block the network and also have the risk of writing failure. In response to these risks, exception handling is also required.
[0048] Solution 2: Use the speed window of the maximum operating speed to cover all speed intervals, or choose a compromise speed window parameter. The disadvantage of this solution is that it only meets the requirements under specific conditions and cannot be applied to all scenarios; its limitations will cause the flag signal to be sent in advance at low speeds. For example, when the maximum speed is 1000m / s, 10m / s is used as the value of the speed window. At 1000m / s, the accuracy requirement of 1% is met, but 10m / s is only 10% for 100m / s for a period of time. If the window time is increased, although the probability of sending the flag signal in advance can be reduced in the case of low-speed movement, it will cause the time to reach the target speed to be extended in the case of high-speed movement, that is, the system response will be slow. If 10m / s is reduced to 5m / s, the accuracy is only 5‰ at 1000m / s, which unreasonably reduces the fault tolerance space and is actually prone to problems.
[0049] It can be found that the traditional method of judging whether the servo motor speed meets the standard according to the fixed speed window has many disadvantages. Since the motor moves at different speeds, the conditions it exhibits are also different. In the actual measurement results, the speed fluctuation of the motor at low speed is greater than its speed fluctuation at high speed, that is, the faster the speed, the more stable it is. The servo system itself has a high accuracy, but after adding a load, the accuracy will decrease, and it will aggravate the judgment of speed stability and system response time.
[0050] In view of the above problem, this embodiment provides a servo system. Figure 2 Schematic diagram of the structure of the servo system of this embodiment. Figure 2 As shown, the servo system includes: a servo drive and a servo motor, and the servo motor can be connected to the load. The connection relationship between the servo drive and the servo motor includes but is not limited to: physical interface connection, electrical connection, and logical connection. Among them, the servo drive is used to execute the servo motor control method, and the servo motor is used to rotate under the control of the servo drive, thereby driving the load to move. Optionally, the servo system may also include an encoder and other components, and the encoder is installed on the servo motor to detect the actual position, speed and direction of the servo motor, and feed this information back to the servo drive in real time. Optionally, the load can be a medical device, such as Computed Tomography (CT), Magnetic Resonance (MR) and a combination thereof.
[0051] Figure 3 is a flow chart of the servo motor control method of this embodiment, as shown in Figure 3 As shown, taking the method running on the above servo system as an example, it includes the following steps:
[0052] Step S101, obtaining the current running speed of the servo motor.
[0053] An encoder can be used to detect the current running speed of the servo motor and send the current running speed to the servo driver.
[0054] Step S102, determining the speed error between the current running speed and the target speed.
[0055] The servo drive calculates the error between the current operating speed and the target speed.
[0056] Step S103, determining whether the speed error is in the motion accuracy interval, and whether the duration of the speed error in the motion accuracy interval is not less than the window time.
[0057] The servo drive compares the error with the preset motion accuracy range. The motion accuracy range can be calculated by the target speed and the preset accuracy parameter. Specifically, the motion accuracy range is obtained by multiplying the target speed by the preset accuracy parameter. For example, if the target speed is set to 100m / s and the preset accuracy parameter is set to 5%, the motion accuracy range is ±100m / s*5%=±5m / s, that is, the allowable error range is 100m / s±5m / s. If the target speed is changed to 1000m / s and the preset accuracy parameter is still 5%, the motion accuracy range is ±1000m / s*5%=±50m / s, that is, the allowable error range is 1000m / s±50m / s. It should be noted that the error is within the motion accuracy range, including the case where the error is equal to the endpoint value of the motion accuracy range.
[0058] When it is determined that the speed error is in the motion accuracy interval, it is necessary to further determine whether the duration of the speed error in the motion accuracy interval is not less than the window time. In this embodiment, considering that speed stability is not transient but needs to be maintained normally, the speed error being in the motion accuracy interval does not mean that the current running speed is stable. Only when the speed error is in the motion accuracy interval and lasts for a certain period of time can the current running speed be considered stable, and it can basically be considered that it has reached the target speed.
[0059] Optionally, before obtaining the current running speed of the servo motor, configuration parameters may be written into the servo driver, wherein the configuration parameters include at least one of the following: target speed, preset accuracy parameter, window time.
[0060] Step S104: When the speed error is within the motion accuracy range and the duration is not less than the window time, a motion signal is generated.
[0061] When it is determined that the speed error is within the motion accuracy range and the duration is not less than the window time, it can be considered that the current operating speed has been stably at the target speed level. Among them, the motion signal indicates that the operating speed of the servo motor has reached the target speed. Specifically, generating a motion signal that the operating speed of the servo motor has reached the target speed can be achieved by setting a preset flag in the servo driver. For example, the preset flag is target reach, and target reach can be set to trigger the motion signal.
[0062] The motion accuracy interval of this embodiment changes with the change of the target speed, but the accuracy remains unchanged, which will not affect the judgment of speed stability and the system response time. The target speed and preset accuracy parameters can be written into the servo driver before the servo motor runs, without the need to manually rewrite during the servo motor operation phase. Compared with the traditional solution that relies on manually rewriting the speed window, the method of this embodiment can simplify the parameter setting, and writing fewer parameters can reduce the communication load, while also reducing the possibility of errors, because the actual test is in a network where the bus frequently interacts with data, and data transmission screening is required. This embodiment can reduce unnecessary data interaction, and this judgment method also improves the accuracy of setting the corresponding flag bit. Therefore, this embodiment solves the problem of unreasonable servo motor control method.
[0063] In one embodiment, before obtaining the current running speed of the servo motor, the value of the speed window is written in the servo driver. After obtaining the current running speed of the servo motor, the method further includes: determining whether the speed error is in the speed window, and whether the duration of the speed error in the speed window is not less than the window time; if it is determined that the speed error is in the speed window, and the duration of the speed error in the speed window is not less than the window time, generating a motion signal. The motion signal can be generated by setting a preset flag in the servo driver.
[0064] It should be noted that the above steps S102 to S104 measure the speed error based on the motion accuracy interval and the duration that the speed error is in the motion accuracy interval. On this basis, this embodiment measures the speed error based on the speed window and the duration that the speed error is in the speed window. These two methods belong to two parallel non-branches, that is, in this implementation or steps S102 to S104, if either of these two schemes is met, it can be determined that the current running speed has reached the target speed.
[0065] In one embodiment, after generating a motion signal indicating that the running speed of the servo motor has reached the target speed, the running speed of the servo motor can be changed to the next target speed by changing the running speed of the servo motor, so that the servo motor moves at different speeds to meet the requirements of load use.
[0066] In one embodiment, a flow chart of another servo motor control method is provided, such as Figure 4 As shown, the process includes the following steps:
[0067] Step S201, setting a first register, a second register and a third register in the servo driver, writing a preset precision parameter in the first register, writing a window time in the second register, and writing a speed window value in the third register.
[0068] Step S202, writing the target speed into the servo driver and enabling the servo driver.
[0069] Step S203, calculating the motion accuracy interval according to the target speed and the preset accuracy parameter.
[0070] Step S204: the servo driver drives the servo motor to move.
[0071] Step S205, determine whether the motion signal has arrived; go to step S206 or step S207.
[0072] Step S206, determine whether the speed error between the current running speed and the target speed is in the motion accuracy range, and whether the duration of the speed error in the motion accuracy range is not less than the window time; if so, go to step S208; if not, return to step S205.
[0073] Step S207, determine whether the speed error is in the speed window, and whether the duration of the speed error in the speed window is not less than the window time; if so, go to step S208; if not, return to step S205.
[0074] Step S208, setting target reach.
[0075] Step S209, end the exercise.
[0076] In this embodiment, when executing step S205 and determining whether the motion signal has arrived, only step S206 can be used, or, if there is no response in step S206, step S207 can be used. Taking only step S206 as an example, in the speed range of 100m / s-2000m / s, the motion accuracy is set to 1%. When the running speed reaches 100m / s, as long as the speed reaches within 100m / s±1m / s, the target reach signal will be set. When the running speed reaches 2000m / s, the speed reaches within 2000m / s±20m / s, the target reach signal will be set. The software will adjust the limiting conditions according to the different movement speeds, breaking away from the limitation of using a single speed window value. This setting can avoid multiple data writing, and the parameters only need to be written in the initialization process. It can also be solidified into the servo drive, and no modification is required later. Writing fewer parameters can reduce the communication load; it also reduces the possibility of errors; in actual testing, in a network where the bus frequently interacts with data, data transmission screening is required to reduce unnecessary data interaction. And this judgment method also improves the accuracy of the setting.
[0077] In one embodiment, Figure 5 A structural diagram of a medical system is provided, such as Figure 5 As shown, the system includes: a servo system and a medical load device, the servo system includes a servo drive and a servo motor connected to each other, and the servo motor is connected to the medical load device; wherein the servo drive is used to execute the servo motor control method of any of the above embodiments, and the servo motor is used to rotate under the control of the servo drive, thereby driving the medical load device to move. Optionally, the medical load device includes a CT rack.
[0078] Taking the rotation of a CT rack as an example, the servo system will set a target movement speed and monitor the actual movement speed in real time to obtain the current running speed of the servo motor. By calculating the difference between the current running speed and the target speed, the error rate of the current running speed can be obtained. For example, the servo system requires that the error value should not exceed 2% of the target speed.
[0079] A first register and a second register can be set in the servo driver, and a preset precision parameter is written in the first register, for example, 10%, and a window time is written in the second register, for example, 5s. By multiplying the target speed and the preset precision parameter, the motion precision interval can be obtained. Only when the current operating speed of the servo motor enters the motion precision interval and remains within this range for a long enough time (i.e., meeting the window time), the servo driver will send a "targetreach" signal, indicating that the target speed has been accurately reached. Such a setting can ensure that in the entire motion interval, no matter what speed, the speed window can be dynamically adjusted, so as to achieve accurate control at different speeds and meet the accuracy standard of system design. In this embodiment, when the system needs to move at different speeds, it is determined whether the preset accuracy is reached according to the fluctuation of the current operating speed, and it is ensured that the target speed is reached after being maintained in the set accuracy interval for a long enough time. This is because the stability of the speed is not a short-term state, but needs to be maintained within a set accuracy range for a long time to ensure the continuous accuracy of motion control.
[0080] This embodiment not only improves the overall control performance of the system, but also indirectly enhances the reliability of the system by real-time monitoring the control accuracy of the system from the source of motion. In the operation of CT equipment, there are special requirements for speed accuracy, and the instability caused by speed fluctuation will lead to abnormal image acquisition.
[0081] In addition, in combination with the servo motor control method provided in the above embodiments, a storage medium may be provided in this embodiment to implement the servo motor control method. The storage medium stores a computer program, and when the computer program is executed by a processor, any one of the servo motor control methods in the above embodiments is implemented.
[0082] It should be understood that the specific embodiments described above are only used to explain the relevant applications, rather than to limit them. According to the embodiments provided in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the protection scope of this application.
[0083] Obviously, the drawings are only some examples or embodiments of the present application. For ordinary technicians in the field, the present application can also be applied to other similar situations based on these drawings without creative work. In addition, it is understandable that although the work done in this development process may be complicated and lengthy, for ordinary technicians in the field, certain changes in design, manufacturing or production based on the technical content disclosed in this application are only conventional technical means and should not be regarded as insufficient content disclosed in this application.
[0084] The term "embodiment" in this application refers to a specific feature, structure or characteristic described in conjunction with the embodiment that can be included in at least one embodiment of the present application. The appearance of this phrase in various locations in the specification does not necessarily mean the same embodiment, nor does it mean that it is mutually exclusive with other embodiments and is independent or optional. It is clearly or implicitly understood by those of ordinary skill in the art that the embodiments described in this application can be combined with other embodiments without conflict.
[0085] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0086] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of patent protection. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the scope of protection of the present application. Therefore, the scope of protection of the present application shall be subject to the attached claims.
Claims
1. A servo motor control method, characterized in that: The method is operated on a servo drive, wherein the servo drive is connected to a servo motor; the method comprises: Obtaining the current operating speed of the servo motor; Determine a speed error between the current operating speed and the target speed; Determine whether the speed error is in a motion accuracy interval, and whether a duration of the speed error in the motion accuracy interval is not less than a window time; When the speed error is within the motion accuracy range and the duration is not less than the window time, a motion signal is generated.
2. The servo motor control method according to claim 1, characterized in that: Before obtaining the current running speed of the servo motor, the method further includes: Configuration parameters are written into the servo driver, wherein the configuration parameters include at least one of the following: the target speed, a preset accuracy parameter, and the window time.
3. The servo motor control method according to claim 2, characterized in that: Before obtaining the current running speed of the servo motor, the method further includes: The value of the speed window is written in the servo drive.
4. The servo motor control method according to claim 3, characterized in that: After obtaining the current running speed of the servo motor, the method further includes: Determine whether the speed error is within the speed window, and whether the duration of the speed error within the speed window is not less than the window time; When it is determined that the speed error is within the speed window and the duration of the speed error being within the speed window is not less than the window time, the motion signal is generated.
5. The servo motor control method according to claim 1, characterized in that: Generate motion signals, including: A preset flag position in the servo driver is set.
6. The servo motor control method according to claim 1, characterized in that: After generating the motion signal, the method further comprises: Changing the operating speed of the servo motor.
7. A servo system, characterized in that: include: A servo drive and a servo motor connected to each other, wherein the servo motor is used to be connected to a load; wherein the servo drive is used to execute the servo motor control method described in any one of claims 1 to 6, and the servo motor is used to rotate under the control of the servo drive, thereby driving the load to move.
8. A medical system, characterized in that: include: The servo system and medical load device described in claim 7, wherein the servo system is connected to the medical load device, and the medical load device moves under the control of the servo system.
9. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to execute the servo motor control method according to any one of claims 1 to 6.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the servo motor control method according to any one of claims 1 to 6 are implemented.
Citation Information
Cited By
Servo control lens return difference measuring and eliminating method and device and readable storage medium thereof
CN120111361A
