Steering engine control method and device, computer equipment, storage medium and program product

By optimizing the servo control method, high-precision sensors and unipolar driving circuits are adopted, combined with linear interpolation and PID control, the high-precision and low heating problems of the servo system are solved, and the stability and reliability of the system are improved.

CN120335291AInactive Publication Date: 2025-07-18SICHUAN STAR GLORY DEFENSE TECHNOLOGY CO LTD +2
View PDF 18 Cites 0 Cited by

Patent Information

Application Number
CN202510830126.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-20
Publication Date
2025-07-18
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing servo system has shortcomings in high precision and low heat generation, which leads to problems such as large power consumption, high heat generation, and large accuracy deviation during use, affecting the normal operation and safety of the equipment.

Method used

By optimizing the servo control method, using high-precision sensors to obtain real-time position, combining linear interpolation and fixed or segmented PID control, the circuit is driven using a unipolar method to reduce motor heating and vibration, and an angle protection algorithm is added to avoid blockage.

Benefits of technology

It realizes high-precision control and low heating of the servo, improves the stability and reliability of the system, reduces the energy consumption and mechanical vibration of the equipment, and avoids faults caused by heat generation and accuracy deviation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120335291A_ABST
    Figure CN120335291A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of steering engine control, and discloses a steering engine control method and device, computer equipment, a storage medium and a program product, and the method comprises the steps: obtaining the real-time position of a steering engine, and carrying out the preprocessing; based on the real-time position of the steering engine, how to process a received instruction by utilizing a fixed PID control or segmented PID control mode and utilizing a linear interpolation method to obtain a control instruction of a driving circuit of the steering engine; on the basis of the control instruction, a switching signal of the driving circuit is obtained by adopting a special unipolar mode. And based on the angle feedback, filtering processing is adopted. By optimizing the control modes of steering engine instructions, angle feedback filtering processing and a steering engine driving circuit and combining precise segmented PID parameter adaptation, low heating is achieved while high-precision control over the steering engine is achieved. An angle protection algorithm is added, and faults such as heating caused by stalling of the steering engine are avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of servo control, and particularly to a servo control method, device, computer device, storage medium and program product. Background Art

[0002] A servo system consists of three parts: a servo, servo control, and servo drive. The servo system is widely used in transmission mechanisms such as elevators, lift gates, conveyor belts, and motion mechanisms such as robotic arms, vehicle axles, etc. Although widely used, the servo system is prone to problems such as insufficient accuracy and large heat generation, and these two performance indicators have always been the most concerned in various applications. The servo control method, servo drive circuit, and sampling sensor can determine the performance of the servo system, and the component selection, algorithm implementation, and circuit drive of these three parts are very important. Summary of the Invention

[0003] In view of this, the present invention provides a servo control method, device, computer device, storage medium and program product to solve the technical problem of how to achieve high-precision and low-heat generation during the servo control process.

[0004] In a first aspect, the present invention provides a servo control method, including: acquiring the real-time position of the servo and performing preprocessing; processing the preset control instruction of the drive circuit of the servo using a linear interpolation method; based on the processed control instruction and the real-time position of the servo, performing parameter processing using a fixed or segmented PID to obtain the real-time duty ratio of the switching signal; driving the hardware circuit to output a servo control signal to control the servo in a unipolar manner according to the duty ratio.

[0005] The present invention realizes high-precision control of the servo and low heat generation by optimizing the servo control method, instruction preprocessing method, feedback preprocessing method, abnormal angle protection method, and control method of the servo drive circuit, and combining with the high-precision real-time position of the servo.

[0006] In an optional implementation manner, the process of preprocessing the real-time position of the servo includes: filtering the real-time position of the servo using a first-order inertia link.

[0007] In an optional implementation manner, the preset control instruction includes the preset control angle of the servo. The process of processing the preset control instruction of the drive circuit of the servo includes: equally dividing the preset control angle into multiple preset control sub-angles; the preset control instruction for each control cycle is to increase one of the preset control sub-angles based on the previous preset control instruction.

[0008] In an alternative embodiment, the process of parameter processing using fixed or segmented PID includes: when the movement of the servo meets the index requirements, obtaining the real-time duty cycle of the switch signal using fixed PID control; when the movement of the servo does not meet the index requirements, obtaining the real-time duty cycle of the switch signal using segmented PID control.

[0009] In an alternative embodiment, the drive circuit of the servo is a single-phase H-bridge circuit. The single-phase H-bridge circuit is composed of four switching tubes. The first switching tube and the second switching tube are connected in series to form one arm of the bridge, and the third switching tube and the fourth switching tube are connected in series to form another arm of the bridge. Then, the process of obtaining the switch signal of the drive circuit in a unipolar manner includes: the switch signals of the two switching tubes in the same arm are complementary; the high level of the third switching tube is in the middle of the high level of the first switching tube.

[0010] In an alternative embodiment, when the servo is a non-360-degree rotatable servo, the method further includes: monitoring whether the angle of the servo exceeds a preset angle; if it exceeds the preset angle, after pulling back the angle of the servo within the preset angle, controlling the servo to stop.

[0011] In a second aspect, the present invention provides a servo control device. Based on the servo control method in the first aspect and any of its alternative embodiments, the device includes: a position sampling circuit, a drive circuit, and a control device. Among them, the position sampling circuit is used to obtain the real-time position of the servo; the control device is used to process the preset control instruction of the drive circuit of the servo using a linear interpolation method; based on the processed control instruction and the real-time position of the servo, fixed or segmented PID is used for parameter processing to obtain the real-time duty cycle of the switch signal; according to the duty cycle, the hardware circuit is driven in a unipolar manner to output a steering control signal to control the servo.

[0012] In a third aspect, the present invention provides a computer device, including: a memory and a processor. The memory and the processor are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to execute the servo control method in the first aspect or any of its corresponding embodiments.

[0013] In a fourth aspect, the present invention provides a computer-readable storage medium, on which computer instructions are stored. The computer instructions are used to cause a computer to execute the servo control method in the first aspect or any of its corresponding embodiments.

[0014] In a fifth aspect, the present invention provides a computer program product, including computer instructions, which are used to cause a computer to execute the servo control method in the first aspect or any of its corresponding embodiments. Description of the Drawings

[0015] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required for the description of the specific embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0016] Figure 1 is the specific circuit structure diagram of the servo drive circuit according to an embodiment of the present invention; Figure 2 is the schematic flowchart of the servo control method according to an embodiment of the present invention; Figure 3 is the switch signal diagram when the bipolar control servo rotates forward according to an embodiment of the present invention; Figure 4 is the switch signal diagram when the bipolar control servo is stationary according to an embodiment of the present invention; Figure 5 is the switch signal diagram when the unipolar control servo rotates forward according to an embodiment of the present invention; Figure 6 is the switch signal diagram when the unipolar control servo is stationary according to an embodiment of the present invention; Figure 7 is the schematic hardware structure diagram of the computer device according to an embodiment of the present invention. Specific Embodiments

[0017] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.

[0018] According to an embodiment of the present invention, an embodiment of a servo control method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. And although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.

[0019] The following problems often exist in the related art in the process of servo control: 1. In the application of servos, high-torque servos often consume a large amount of power. If used outdoors, large-capacity batteries are expensive and not easy to carry, and small-capacity batteries are not sufficient to support the long-term operation of the servo, which brings inconvenience to the devices using the servo and may very likely cause the entire device to break down due to the servo not working.

[0020] 2. The high-torque servo motor generates a large amount of heat during operation. Sometimes during use, it has to be paused due to excessive temperature, and can only be powered on after returning to normal temperature. When a servo motor with a large heat generation is used in the device, the heat of the servo motor after long-term operation may affect the circuits and devices near the servo motor, and even heat-sensitive devices are prone to damage.

[0021] 3. In many fields where servo motors are applied, such as medical equipment, robotic arms, robotic hands, missiles, etc., high precision of the servo motor is required. The requirement for the position accuracy of the servo motor rotation is very strict. If the precision deviation is too large, serious accidents are likely to occur. A good servo control system can achieve high precision, while the precision of a general servo system is poor.

[0022] Based on the above problems, in this embodiment, by optimizing the servo motor drive circuit, servo control method, and selecting high-precision sensors, the performance of the built servo system is relatively high. Among them, the selected motor is a brushed motor, and the brushed motor plus an accelerator constitute the servo actuator. The rated voltage for the servo motor to work is 28V, that is, VCC_BAR is 28V, and the drive power and control power are isolated. As Figure 1 shown, the drive part uses four NMOS to form a full-bridge circuit. The drive power of 28V supplies power to the H-bridge to control the H-bridge to achieve the purpose of driving the motor.

[0023] Figure 1 It is a full-bridge circuit. The M point is the motor connection point. The motor is driven to rotate forward or backward by controlling the pins VG1B, VG1A, VG2B, and VG2A. When Q1, Q4 or Q2, Q3 conduct, the motor rotates. The motor is controlled by programming the input of the MOS tube PWM. Q1 and Q2 are complementary signals, and Q3 and Q4 are complementary signals.

[0024] In this embodiment, a servo control method is provided. As Figure 2 shown, it includes: Step S1: Obtain the real-time position of the servo motor and perform preprocessing.

[0025] Specifically, a position sampling loop is set in the servo control system. The position sampling loop provides feedback information for the servo control. A high-precision angle sensor is used to collect the servo angle information in real time and feedback it to the control loop. The angle sensor used is a 12-bit potentiometer, and the potentiometer is integrated inside the servo motor. In this way, it is closer to the servo motor, can more accurately reflect the real rotation angle of the motor, increase the reliability of the angle information, and reduce unnecessary interference and noise.

[0026] Optionally, the process of preprocessing the real-time position of the servo motor includes: filtering the real-time position of the servo motor using a first-order inertia link.

[0027] Specifically, servo angle feedback filtering is a common operation for debugging servos, aiming to filter out useless noise and avoid noise interference in control. Before adding first-order inertial filtering, when adjusting parameters to control the servo, it is found that the phenomenon does not match the theory. For example, when the parameters are adjusted to make the square wave run without overshoot and the speed and final steady state meet the indicators, and then running the sine wave, it is found that the sine wave has a large overshoot. In theory, the parameters should be decreased for overshoot. In fact, after decreasing the parameters, when the amplitude and phase of the sine wave reach the required indicators and then running the square wave, the amplitude of the square wave fails to reach the required value. This phenomenon cannot be adjusted by continuing to adjust the parameters. Therefore, first-order inertial filtering is adopted. After adopting the filtering, the parameter adjustment returns to normal, and the sine wave and square wave phenomena are consistent. It is also much easier to adjust other indicators. Finally, the performance of the servo meets all indicators.

[0028] Step S2: Process the preset control instruction of the driving circuit of the servo by using the linear interpolation method.

[0029] Optionally, the preset control instruction includes the process of processing the preset control instruction of the driving circuit of the servo for the preset control angle of the servo, including: equally dividing the preset control angle into multiple preset control sub-angles; the preset control instruction for each control period is to increase one preset control sub-angle on the basis of the previous preset control instruction.

[0030] Specifically, in the on-board software system, the control instruction period is 5 ms, and the control period is 1 ms. The servo test software independently debugs the servo control instruction period of 1 ms, and the control period is 1 ms. The servo debugged by the servo test software is normal. After being transplanted into the on-board software, abnormal noises occur and the current increases. Therefore, the linear interpolation method is used.

[0031] Specifically, when the control instruction period is 5 ms, there are many points after a sine curve is discretized into instructions. When the control instruction period is 5 ms, the amplitude of the instruction sent is larger than that when the instruction is sent at 1 ms. The servo quickly responds to the large-amplitude instruction, so the current increases. The control instruction is sent once every 5 ms, and the servo responds well. It will reach the instruction position before 5 ms arrives, then stop and maintain the current state. Therefore, within the entire sine period, the servo continuously starts and stops at a frequency of 5 ms. This vibration of starting and stopping at this frequency and amplitude may cause resonance of the mechanical and structural parts, so there are abnormal noises. Under the 1 ms control, the time for the servo to reach the target position is 1.2 - 1.4 ms. That is to say, before it completely reaches the new instruction, the new instruction will arrive, and the servo will continue to execute until the entire sine wave is completed. That is to say, under the 1 ms control instruction period, the servo does not start and stop repeatedly, and the instruction continuity is good, so there is no vibration and no abnormal noise.

[0032] Specifically, the interpolation processing method is to use linear interpolation to calculate the control instructions of the previous control cycle and the current control instructions in a linear interpolation manner, and insert the control instructions received every 5ms, divide them into 5 equal parts, and simulate a 1ms instruction cycle. The control cycle is still 1ms, and the abnormal noise phenomenon disappears after interpolation processing.

[0033] Step S3: Based on the processed control instruction and the real-time position of the servo, a fixed or segmented PID is used to perform parameter processing to obtain a real-time duty cycle of the switch signal.

[0034] Optionally, the process of using a fixed or segmented PID for parameter processing includes: when the servo movement meets the index requirements, using a fixed PID control to obtain the real-time duty cycle of the switch signal; when the servo movement does not meet the index requirements, using a segmented PID control to obtain the real-time duty cycle of the switch signal.

[0035] Specifically, the original control method is the segmented PID control method, which has the advantage of high control accuracy at each angle, but the disadvantage is that this segmented control makes the overall control change in real time, which is very unstable. During the debugging and sweeping process, it is easy to have the center point shift up and down, the amplitude is uneven, etc., which is not conducive to system stability. Therefore, the segmented combined with fixed PID control method is used to obtain the control command.

[0036] Specifically, the segmented control method is: use the error value for segmentation, and the error value can be the difference between the real-time angle value of the servo and the reference value. The error value is less than 0.2, the error value is between 0.2 and 1, and the error value is greater than 1. Each segment is set with a set of PID parameters, and the parameters of each segment are adjusted to make the servo movement meet the requirements.

[0037] Specifically, the fixed PID control method is: a set of fixed PID parameters, by adjusting the proportional coefficients of the three items of proportion, integration and differentiation to control the servo so that the servo movement meets the index requirements.

[0038] Step S4: driving the hardware circuit to output a steering control signal to control the steering gear in a unipolar manner according to the duty cycle.

[0039] Optionally, the driving circuit of the servo is Figure 1 As shown, a single-phase H-bridge circuit is composed of four switching tubes, Q1 and Q2 are connected in series to form a bridge arm, and Q3 and Q4 are connected in series to form a bridge arm. The process of obtaining the switching signal of the driving circuit in a unipolar manner includes: (1) the switching signals of the two switching tubes in the same bridge arm are complementary; (2) the high level of the third switching tube is located in the middle of the high level of the first switching tube.

[0040] Figure 1In the circuit, an H-bridge circuit built by NMOS transistors, where M in the middle represents the motor. When the diagonal MOS transistors (Q1, Q4 or Q2, Q3) are turned on, the motor rotates. The upper and lower bridge arm MOS transistors on the same side cannot be turned on simultaneously to avoid short circuit between the power supply and the ground. That is, Q1 and Q2 are complementary signals, and Q3 and Q4 are complementary signals. By controlling the duty cycle of the output PWM, the rotation direction and speed of the motor are controlled, and then the angle position of the servo is controlled.

[0041] Specifically, the bipolar control method is as follows: the upper and lower bridge arms are complementary signals, and the diagonals are the same signals. As Figure 3 shown, T is the period of a PWM wave. Q2 and Q3 are turned on during the Y time, and Q3 and Q4 are turned on during the X time, where X > Y, and the motor rotates forward. The difference between X and Y represents the positive voltage applied across the motor during one period of the PWM wave. In the steady state, that is, driving the motor with a PWM wave of this fixed duty cycle, the difference between X and Y represents the positive resultant driving force, and this part of the power consumption is converted into the kinetic energy for driving the motor to rotate; while the part where X and Y are equal represents the forces that cancel each other out in two directions, and this part of the power consumption will be converted into heat loss. As Figure 4 shown, when X = Y, that is, when the conduction times of the main and secondary diagonals are the same, the motor is in a stationary state, and the power output from the power supply is completely converted into heat energy.

[0042] Specifically, the H-bridge drive of the motor is changed from the bipolar mode to the unipolar mode. Since in the unipolar drive mode, when the servo feedback position reaches the command position and the speed is close to zero, the voltage across the motor is basically zero and the power is also basically zero. Therefore, the problem of motor heating can be solved, and at the same time, the power consumption is reduced and the sound generated by the mechanism during the static operation of the servo is reduced.

[0043] Specifically, for the unipolar control method, as Figure 5 shown, the upper and lower bridge arms are complementary signals. The high level of Q3 is located in the middle of the high level of Q1, and the two Ns on both sides are equal. At the same time, the sum of the high level time of Q1 and the high level time of Q3 is equal to one period. At N, the diagonal MOS transistors Q1 and Q4 are turned on, and there is a positive voltage across the motor. In the steady state, that is, driving the motor with a PWM wave of this fixed duty cycle, the N * 2 time period represents the positive resultant driving force, and this part of the power consumption is converted into the kinetic energy for driving the motor to rotate; in the remaining time periods, the voltage across the motor is zero and no power consumption occurs. When N = 0, X = Y, and at this time, the voltage across the motor is zero and no power consumption occurs, as Figure 6 shown.

[0044] In some alternative embodiments, when the servo is a non-360-degree rotatable servo, the method further includes: (1) Monitoring whether the angle of the servo exceeds a preset angle; (2) If it exceeds the preset angle, then after pulling the angle of the servo back within the preset angle, controlling the servo to stop.

[0045] Specifically, for a servo that cannot rotate 360 degrees, if the execution angle of the servo exceeds the mechanical limit, it may damage the mechanical structure or cause the motor to stall and burn out. After adding angle protection, the motor will stop before reaching the mechanical limit, playing a protective role.

[0046] Specifically, add 20-degree protection to the PS side. The program on the PS side judges the received instructions and only responds to instructions within ±20 degrees. Instructions outside the range execute ±20-degree instructions.

[0047] Specifically, add 22-degree protection to the P1 side. The P1 side monitors the servo angle in real time and judges. When the angle exceeds ±22 degrees, the P1 side takes control of the servo, and the PS side loses control. After the P1 side pulls the servo angle back within + / - 21 degrees, the servo stops. At this time, the P1 side no longer controls, and the PS side still has no control. After power-on again, the PS side can control normally, and the system can operate normally. The P1 side still monitors the servo angle in real time.

[0048] Among them, the PS side is the application program layer of the ZYNQ chip. Programming is performed on the PS side of the ZYNQ to implement the control function. The P1 side is the driver program layer of the ZYNQ chip. Programming is performed on the PL side of the ZYNQ to implement the underlying basic driver. This driver meets the operating requirements of the PS layer program and provides a running environment for the execution of the PS layer program.

[0049] In this embodiment, a servo control device is also provided. This device is used to implement the above-mentioned embodiments and preferred implementation manners, and those that have been described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.

[0050] This embodiment provides a servo control device. Based on the servo control method of the above embodiment and any of its optional implementation manners, the device includes: a position sampling circuit, a drive circuit, and a control device, where The position sampling circuit is used to obtain the real-time position of the servo; The control device is used to process the preset control instructions of the drive circuit of the servo by using the linear interpolation method; based on the processed control instructions and the real-time position of the servo, perform parameter processing using fixed or segmented PID to obtain the real-time duty cycle of the switching signal; and drive the hardware circuit to output a steering control signal to control the servo in a single-polarity manner according to the duty cycle.

[0051] The further function descriptions of the above-mentioned various modules and units are the same as those in the corresponding above embodiments and will not be repeated here.

[0052] The servo control device in this embodiment is presented in the form of functional units. Here, the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and a memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.

[0053] An embodiment of the present invention further provides a computer device having the above servo control device.

[0054] Please refer to Figure 7 , Figure 7 which is a schematic structural diagram of a computer device provided by an alternative embodiment of the present invention. As shown in Figure 7 , the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Each component communicates with each other using different buses and can be installed on a common motherboard or installed in other ways as needed. The processor can process instructions executed within the computer device, including instructions stored in the memory or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some alternative embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a set of blade servers, or a multi-processor system). Figure 7 In

[0055] a single processor 10 is taken as an example.

[0056] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.

[0057] The memory 20 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system and application programs required for at least one function; the data storage area can store data created according to the use of the computer device, etc. In addition, the memory 20 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid-state storage devices. In some alternative embodiments, the memory 20 may optionally include a memory remotely provided with respect to the processor 10, and these remote memories can be connected to the computer device through a network. Examples of the above-mentioned network include, but are not limited to, the Internet, intranet, local area network, mobile communication network, and combinations thereof.

[0058] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk, or solid-state drive; the memory 20 may further include a combination of the above types of memory.

[0059] The computer device further includes a communication interface 30 for the computer device to communicate with other devices or communication networks.

[0060] Embodiments of the present invention also provide a computer-readable storage medium. The methods according to the embodiments of the present invention can be implemented in hardware, firmware, or be implemented as computer code that can be recorded on a storage medium, or be implemented as computer code originally stored in a remote storage medium or non-transitory machine-readable storage medium and to be stored in a local storage medium and downloaded through a network, so that the methods described herein can be stored in such software processes on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include a combination of the above types of memory. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code, and when the software or computer code is accessed and executed by the computer, the processor, or the hardware, the methods shown in the above embodiments are implemented.

[0061] A part of the present invention can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to the present invention through the operations of the computer. Those skilled in the art should understand that the forms of existence of computer program instructions in a computer-readable medium include but are not limited to source files, executable files, installation package files, etc. Correspondingly, the ways for computer program instructions to be executed by a computer include but are not limited to: the computer directly executes the instructions, or the computer compiles the instructions and then executes the corresponding compiled program, or the computer reads and executes the instructions, or the computer reads and installs the instructions and then executes the corresponding installed program. Herein, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible by the computer.

[0062] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations all fall within the scope defined by the appended claims.

Claims

1. A servo control method, characterized in that, Including: Obtain the real-time position of the servo and perform preprocessing; Process the preset control instructions of the driving circuit of the servo by using the linear interpolation method; Based on the processed control instructions and the real-time position of the servo, use fixed or segmented PID for parameter processing to obtain the real-time duty cycle of the switching signal; According to the duty cycle, drive the hardware circuit in a single-polarity manner to output a steering control signal to control the servo.

2. The servo control method according to claim 1, wherein The process of preprocessing the real-time position of the servo includes: Filter the real-time position of the servo by using a first-order inertia link.

3. The servo control method according to claim 1, wherein The preset control instructions include the process of processing the preset control instructions of the driving circuit of the servo with the preset control angle of the servo, including: Divide the preset control angle into multiple preset control sub-angles; The preset control instruction for each control cycle is to increase one of the preset control sub-angles on the basis of the previous preset control instruction.

4. The servo control method according to claim 3, wherein The process of using fixed or segmented PID for parameter processing includes: When the movement of the servo meets the index requirements, use fixed PID control to obtain the real-time duty cycle of the switching signal; When the movement of the servo does not meet the index requirements, use segmented PID control to obtain the real-time duty cycle of the switching signal.

5. The servo control method according to claim 3, wherein The driving circuit of the servo is a single-phase H-bridge circuit, and the single-phase H-bridge circuit is composed of four switching tubes. The first switching tube and the second switching tube are connected in series to form a bridge arm, and the third switching tube and the fourth switching tube are connected in series to form a bridge arm. Then, the process of obtaining the switching signal of the driving circuit in a single-polarity manner includes: The switching signals of the two switching tubes in the same bridge arm are complementary; The high level of the third switching tube is in the middle of the high level of the first switching tube.

6. The servo control method according to claim 1, wherein When the servo is a non-360-degree rotating servo, the method further includes: Monitor whether the angle of the servo exceeds the preset angle; If it exceeds the preset angle, pull back the angle of the servo within the preset angle and then control the servo to stop.

7. A servo control device, characterized in that, Based on the servo control method according to any one of claims 1-6, the device includes: a position sampling circuit, a driving circuit, and a control device, wherein, The position sampling circuit is used to obtain the real-time position of the servo; The control device is used to process the preset control instructions of the driving circuit of the servo by using the linear interpolation method; based on the processed control instructions and the real-time position of the servo, use fixed or segmented PID for parameter processing to obtain the real-time duty cycle of the switching signal; according to the duty cycle, drive the hardware circuit in a single-polarity manner to output a steering control signal to control the servo.

8. A computer device, characterized in that, Including: A memory and a processor, the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to execute the servo control method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, Computer instructions are stored on the computer-readable storage medium, and the computer instructions are used to cause a computer to execute the servo control method according to any one of claims 1 to 6.

10. A computer program product, characterized in that, Including computer instructions, and the computer instructions are used to cause a computer to execute the servo control method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • PWM control circuit of radar antenna

    CN104333204A

  • High-precision steering engine position control method

    CN106681134A

  • Test system

    CN108613819A

  • Method and device for driving steering engine

    CN109842345A

  • Smooth processing method for steering gear movement, device, terminal equipment and storage medium

    CN109960157A