Debugging method of driver, driver and motion control platform
By performing open-loop and closed-loop tests on the driver, the optimal parameters are automatically determined, solving the problem of low driver debugging efficiency and realizing a highly efficient automated debugging process.
Patent Information
- Application Number
- CN202410457731.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-16
- Publication Date
- 2025-10-28
Smart Images

Figure CN120849243A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of control system technology, and more specifically, to a method for debugging a driver, a driver, and a motion control platform. Background Technology
[0002] With the increasing maturity of sequencer technology, scanning and imaging are crucial parts of sequencing, and the most important equipment in this stage is the slide stage and focusing module. Therefore, ensuring hardware stability is very important. The slide stage and focusing module are driven by a driver, which needs to be debugged before use to ensure the stability of the equipment. Currently, related technologies mainly rely on manual debugging based on past experience. The debugging process is cumbersome and requires a high level of expertise from the debuggers, resulting in low debugging efficiency.
[0003] There is currently no effective solution to the above problems. Summary of the Invention
[0004] This disclosure provides a driver debugging method, a driver, and a motion control platform to at least solve the problem of low debugging efficiency of drivers in related technologies.
[0005] According to one aspect of the present disclosure, a method for debugging a driver is provided, comprising: responding to a debugging command, performing an open-loop test on a control system corresponding to the driver to obtain open-loop data, and verifying the open-loop data; if the open-loop data passes verification, acquiring operating data of the driver within a preset time period, the operating data being used to characterize the operating state of the driver; determining optimal parameters of the driver based on the operating data of the driver, and debugging the driver based on the optimal parameters, wherein the optimal parameters are used to make the operating state of the driver optimal; after the driver has been debugged according to the optimal parameters, performing a closed-loop test on the control system corresponding to the driver to obtain closed-loop data, verifying the closed-loop data, and determining that the driver debugging is complete if the closed-loop data passes verification.
[0006] Optionally, acquiring the driver's operating data within a preset time period includes: receiving a motion command and controlling the driver to perform reciprocating motion; during the reciprocating motion of the driver, collecting operating data within the preset time period, the operating data including at least: a composite waveform diagram, the composite waveform diagram including at least: a first waveform reflecting the driver's motion position, a second waveform reflecting a first error value of the driver's position, a third waveform reflecting a second error value of the driver's position, and a fourth waveform reflecting the driver's acceleration; and determining the optimal parameters of the driver based on the composite waveform.
[0007] Optionally, determining the optimal parameters of the driver based on the composite waveform includes: obtaining a preset offset value; adjusting the parameters of the driver based on the preset offset value until the driver's operating data meets multiple preset conditions, at which point the driver's parameters become target parameters; and determining the optimal parameters based on the target parameters.
[0008] Optionally, the parameters of the driver are adjusted sequentially according to the preset offset value until the driver's operating data meets multiple preset conditions, including: marking multiple points sequentially from the start point to the end point of the composite waveform, wherein the interval between each point is the same; determining the rising and falling edges of the second and third waveforms according to the waveform change trends corresponding to adjacent points; adjusting the parameters of the driver until the rising edge of the second waveform is after the falling edge of the third waveform, and determining that the driver's operating data meets the first preset condition among multiple preset conditions.
[0009] Optionally, the parameters of the driver are adjusted sequentially according to the preset offset value until the operating data of the driver meets multiple preset conditions, including: obtaining the first point corresponding to all low frequency bands in the fourth waveform; obtaining the target frequency band corresponding to the first point in the third waveform; adjusting the parameters of the driver until all target frequency bands are low frequency bands, and determining that the operating data of the driver meets the second preset condition among multiple preset conditions.
[0010] Optionally, the parameters of the driver are adjusted sequentially according to the preset offset value until the operating data of the driver meets multiple preset conditions, including: determining all high-frequency segments in the first waveform based on the rising and falling edges of the first waveform, and removing the first and last high-frequency segments in the first waveform to obtain a valid waveform; searching for oscillation segments in the valid waveform, and determining that the operating data of the driver meets the third preset condition among multiple preset conditions if the last oscillation segment in the valid waveform conforms to a preset rule.
[0011] Optionally, determining the optimal parameter based on the target parameter includes: if there is only one target parameter, determining the target parameter as the optimal parameter; if there are multiple target parameters, obtaining preset values for the parameters of the driver; and determining the target parameter closest to the preset value among the multiple target parameters as the optimal parameter.
[0012] Optionally, verifying the open-loop data includes: obtaining the gain margin and phase margin of the phase angle at the current frequency from the open-loop data; dividing the open-loop data into multiple parts based on the gain margin and the phase margin, and verifying each of the multiple parts to obtain a verification result.
[0013] According to another aspect of the embodiments of this disclosure, a driver is also provided, comprising: a debugging module, the debugging module being configured to, in response to a debugging command, perform an open-loop test on a control system corresponding to the driver to obtain open-loop data, and verify the open-loop data; if the open-loop data passes verification, acquire operating data of the driver within a preset time period, the operating data being used to characterize the operating state of the driver; determine optimal parameters of the driver based on the operating data of the driver, and debug the driver based on the optimal parameters, wherein the optimal parameters are used to make the operating state of the driver optimal; after the driver is debugged according to the optimal parameters, perform a closed-loop test on the control system corresponding to the driver to obtain closed-loop data, verify the closed-loop data, and if the closed-loop data passes verification, determine that the driver debugging is complete.
[0014] According to another aspect of the present disclosure, a motion control platform is also provided, comprising: a host computer and a driver, the driver being used to drive the motion control platform, the host computer being used to respond to a debugging command to perform an open-loop test on the control system corresponding to the driver, obtain open-loop data, and verify the open-loop data; if the open-loop data passes verification, acquire the driver's operating data within a preset time period, the operating data being used to characterize the driver's operating state; determine the optimal parameters of the driver based on the driver's operating data, and debug the driver based on the optimal parameters, wherein the optimal parameters are used to make the driver's operating state optimal; after the driver is debugged according to the optimal parameters, perform a closed-loop test on the control system corresponding to the driver, obtain closed-loop data, verify the closed-loop data, and if the closed-loop data passes verification, determine that the driver debugging is complete.
[0015] According to another aspect of the present disclosure, a computer device is also provided, comprising: a memory for storing program instructions; and a processor connected to the memory, configured to execute the program instructions for performing the following functions: in response to a debugging instruction, performing an open-loop test on a control system corresponding to a driver to obtain open-loop data, and verifying the open-loop data; if the open-loop data passes verification, acquiring operating data of the driver within a preset time period, the operating data being used to characterize the operating state of the driver; determining optimal parameters of the driver based on the operating data of the driver, and debugging the driver based on the optimal parameters, wherein the optimal parameters are used to make the operating state of the driver optimal; after the driver has been debugged according to the optimal parameters, performing a closed-loop test on the control system corresponding to the driver to obtain closed-loop data, verifying the closed-loop data, and if the closed-loop data passes verification, determining that the driver debugging is complete.
[0016] According to another aspect of the present disclosure, a computer program product is also provided, including a computer program that, when executed by a processor, implements the steps of the debugging method for the driver.
[0017] In this embodiment, in response to a debugging command, an open-loop test is performed on the control system corresponding to the driver to obtain open-loop data, and the open-loop data is verified. If the open-loop data passes verification, the driver's operating data within a preset time period is acquired, and the operating data is used to characterize the driver's operating state. The optimal parameters of the driver are determined based on the driver's operating data, and the driver is debugged based on the optimal parameters, wherein the optimal parameters are used to make the driver's operating state the best. After the driver is debugged according to the optimal parameters, a closed-loop test is performed on the control system corresponding to the driver to obtain closed-loop data, and the closed-loop data is verified. If the closed-loop data passes verification, the method for completing the driver debugging is determined. The driver's automated debugging is completed through a preset process, achieving the goal of avoiding manual debugging, thereby achieving the technical effect of improving debugging efficiency and solving the problem of low debugging efficiency of drivers in related technologies. Attached Figure Description
[0018] The accompanying drawings, which are included to provide a further understanding of this disclosure and form part of this disclosure, illustrate exemplary embodiments of the present disclosure and are used to explain the disclosure, but do not constitute an undue limitation of the disclosure. In the drawings:
[0019] Figure 1 This is a hardware structure block diagram of a computer terminal for implementing a driver debugging method according to an embodiment of the present disclosure;
[0020] Figure 2 This is a flowchart of a driver debugging method according to an embodiment of the present disclosure;
[0021] Figure 3 This is a schematic diagram of a composite waveform according to an embodiment of the present disclosure;
[0022] Figure 4 This is a schematic diagram of an oscillation segment according to an embodiment of the present disclosure;
[0023] Figure 5 This is a flowchart of another driver debugging method according to an embodiment of the present disclosure;
[0024] Figure 6 This is a flowchart of a driver parameter adjustment method according to an embodiment of the present disclosure;
[0025] Figure 7 This is a flowchart of another driver parameter adjustment method according to an embodiment of the present disclosure;
[0026] Figure 8 This is a schematic diagram of the structure of a driver according to an embodiment of the present disclosure;
[0027] Figure 9 This is a structural diagram of a driver debugging apparatus according to an embodiment of the present disclosure. Detailed Implementation
[0028] To enable those skilled in the art to better understand the present disclosure, the technical solutions of the present disclosure will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of the present disclosure, and not all embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present disclosure.
[0029] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0030] The driver debugging method embodiments provided in this disclosure can be executed in a mobile terminal, computer terminal, or similar computing device. Figure 1 A hardware block diagram of a computer terminal for implementing a driver debugging method is shown. Figure 1 As shown, the computer terminal 10 may include one or more processors (shown as 102a, 102b, ..., 102n in the figure) (the processor may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 104 for storing data, and a transmission module 106 for communication functions. In addition, it may also include: a display, a keyboard, a cursor control device, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be one of the ports in the I / O interface), a network interface, and a BUS bus. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, computer terminal 10 may also include... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0031] It should be noted that the aforementioned one or more processors and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be embodied, in whole or in part, in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be integrated, in whole or in part, into any other element within the computer terminal 10. As per the embodiments of this disclosure, the data processing circuits serve as a processor control mechanism (e.g., selection of a variable resistor termination path connected to an interface).
[0032] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the driver debugging method in this embodiment of the present disclosure. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory 104, thereby implementing the aforementioned driver debugging method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor, and these remote memories can be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0033] The transmission module 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the computer terminal 10. In one example, the transmission module 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission module 106 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.
[0034] The display may be, for example, a touchscreen liquid crystal display (LCD) that allows the user to interact with the user interface of the computer terminal 10.
[0035] It should be noted here that, in some optional embodiments, the above... Figure 1 The computer device shown may include hardware elements (including circuitry), software elements (including computer code stored on a computer-readable medium), or a combination of both hardware and software elements. It should be noted that... Figure 1 This is only one instance of a specific particular instance, and is intended to illustrate the types of components that may exist in the aforementioned computer devices.
[0036] In the above operating environment, this disclosure provides an embodiment of a driver debugging method. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0037] Figure 2 This is a flowchart of a driver debugging method according to an embodiment of the present disclosure, such as... Figure 2 As shown, the method includes the following steps:
[0038] Step S202: In response to the debugging command, perform an open-loop test on the control system corresponding to the driver, obtain open-loop data, and verify the open-loop data;
[0039] In step S202 above, the debugging command can be received through a preset software interface. For example, when the target control in the preset software interface is triggered, the debugging command is generated.
[0040] It should be noted that target controls include, but are not limited to, icons and buttons.
[0041] In some implementations, open-loop testing may involve sending a series of speed and displacement commands to the slide controller and then recording the actual movement of the slide. The collected data, i.e., open-loop data, will be used to verify whether the slide moves at the predetermined speed and path, and whether there are any deviations or delays. Open-loop testing can also be used for an autofocus system, which may involve sending a series of focus commands and observing the lens's focusing action and the final focus position, i.e., another type of open-loop data. The verification process will include checking whether the focusing action is smooth and accurate, and whether the focus achieves the expected sharpness and precision. If problems are found, it may be necessary to adjust the focusing algorithm or hardware settings and then test again.
[0042] Step S204: If the open-loop data passes verification, obtain the driver's operating data within a preset time period. The operating data is used to characterize the driver's operating status.
[0043] In step S204 above, the operating state of the driver includes, but is not limited to, the driver's acceleration and the duration of the driver's movement.
[0044] Step S206: Determine the optimal parameters of the driver based on the driver's operating data, and debug the driver based on the optimal parameters, wherein the optimal parameters are used to make the driver's operating state the best.
[0045] In step S206, the optimal operating state of the driver can be achieved by the driver's movement time meeting preset requirements, or by the following optimal characteristics: Stability: The driver maintains stable output under various operating conditions without significant fluctuations or deviations. This includes speed stability, current stability, and voltage stability. Response speed: The driver can quickly respond to changes in control signals, which is typically related to the dynamic performance of the system, such as rapid start-up, stopping, and direction switching. Accuracy: The driver can precisely control the position, speed, and acceleration of the motor to achieve predetermined performance requirements. This typically involves parameters such as position tracking error, speed regulation rate, and torque ripple. Efficiency: The driver is highly efficient in energy conversion, meaning less energy loss and lower heat loss, thereby improving overall energy utilization. Temperature control: The driver's temperature is maintained within a safe and recommended range, with no signs of overheating. Overheating may lead to performance degradation or even damage to the driver. Failure rate: The driver has an extremely low failure rate, with no frequent fault alarms or maintenance requirements. This indicates high driver reliability. Vibration and noise levels: The driver generates low levels of vibration and noise during operation, which not only helps reduce the impact on the surrounding environment but is also an indicator of good driver operating condition. Load adaptability: The drive can adapt to different load changes, maintaining stable performance whether under no-load or full-load conditions. Diagnostic and monitoring functions: The drive has self-diagnostic and monitoring functions, capable of detecting and reporting its operating status in real time, facilitating timely problem identification and resolution. Lifespan and durability: The drive's design and manufacturing quality ensure its long service life and durability, maintaining performance even under continuous operation or high-intensity working conditions.
[0046] Step S208: After the driver is debugged according to the optimal parameters, a closed-loop test is performed on the control system corresponding to the driver to obtain closed-loop data. The closed-loop data is then verified. If the closed-loop data passes the verification, the driver debugging is confirmed to be complete.
[0047] In some implementations, closed-loop testing is used to ensure the performance and reliability of the control system. Closed-loop testing involves feeding back the system's output (i.e., the actual position of the slide or focus module) to the input for comparison with the desired input signal. This process ensures that the system's output matches the expected target, thus achieving precise control. In scenarios involving driving slides and focus modules, closed-loop testing is a critical process for ensuring the accuracy and reliability of the control system. This test forms a complete feedback loop by feeding back the actual position of the slide or focus module to the input of the control system, enabling the system to automatically adjust and correct to achieve predetermined position and speed targets. During this process, the control system continuously compares the actual output with the desired input to ensure that the slide or focus module can move precisely to the designated position and remain stable.
[0048] In some implementations, closed-loop data refers to the actual measurements of parameters such as the position, speed, and acceleration of the slide or focusing module collected during closed-loop testing. This data is crucial for evaluating the performance of the control system because it provides information about how the system behaves in actual operation. By analyzing this closed-loop data, it is possible to understand whether key performance indicators such as system response speed, stability, and accuracy meet design requirements.
[0049] In some implementations, validating the closed-loop data is the final step in closed-loop testing. This involves comparing and analyzing the collected actual measurement data against preset target parameters. The purpose of this step is to confirm that the control system can effectively achieve precise control and ensure the correct operation of the slide or focusing module. If the closed-loop data shows that the system's performance does not meet expectations, it may be necessary to adjust the control system parameters, such as adjusting the gain of the PID controller, or recalibrating the sensors to optimize the overall system performance. This comprehensive validation process ensures that the drive and control system can provide high-precision and high-stability operation in practical applications, meeting stringent industrial and scientific research requirements.
[0050] It should be noted that the above debugging method can be executed through a preset script, for example, to run different test items, control the process actions and conditions in the test, and the script directly controls the movement of the driver, loads and runs the instruction set to collect data, and transmits data.
[0051] It should also be noted that the test process and test information, as well as the test data and test results transmitted by the processing script, can all be displayed through the software interface.
[0052] The driver debugging method in steps S202 to S208 involves responding to debugging commands by performing open-loop testing on the control system corresponding to the driver to obtain open-loop data, which is then verified. If the open-loop data passes verification, the driver's operating data within a preset time period is acquired; this operating data characterizes the driver's operating state. Optimal parameters for the driver are determined based on the operating data, and the driver is debugged based on these optimal parameters, which ensure the driver's optimal operating state. After the driver is debugged according to the optimal parameters, a closed-loop test is performed on the control system corresponding to the driver to obtain closed-loop data, which is then verified. If the closed-loop data passes verification, the method for completing the driver debugging is determined. This automated debugging process avoids manual debugging, thereby improving debugging efficiency and solving the problem of low driver debugging efficiency in related technologies. The following is a detailed explanation.
[0053] In some embodiments of this disclosure, different instruction sets can be invoked to make the driver move, thereby obtaining motion point information and commutation debugging, such as obtaining the coordinates of the index position and limit position, and waveform data during the motion process.
[0054] In one optional approach, the specific steps for acquiring the driver's operating data within a preset time period are as follows: receiving a motion command and controlling the driver to perform reciprocating motion; during the reciprocating motion of the driver, collecting operating data within the preset time period, the operating data including at least: a composite waveform diagram, the composite waveform diagram including at least: a first waveform reflecting the driver's motion position, a second waveform reflecting a first error value of the driver's position, a third waveform reflecting a second error value of the driver's position, and a fourth waveform reflecting the driver's acceleration; determining the optimal parameters of the driver based on the composite waveform.
[0055] It is understandable that after obtaining the composite waveform within the preset time period, the noise in the composite waveform is filtered out.
[0056] Figure 3 A waveform diagram of a composite waveform is shown, such as... Figure 3 As shown, Figure 3 The blue waveform in the image is the first waveform, and the red waveform in the image is the second waveform. Figure 3 The green waveform in the image is the third waveform. Figure 3 The purple waveform in the image is the fourth waveform. Figure 3 The digital points are located below the composite waveform.
[0057] There are multiple ways to determine the optimal parameters of the driver based on the composite waveform. In this embodiment, a method of gradually adjusting based on a preset offset value is proposed to obtain the optimal parameters. Specifically, a preset offset value is obtained; the parameters of the driver are adjusted according to the preset offset value until the operating data of the driver meets multiple preset conditions, at which point the parameters of the driver are the target parameters; and the optimal parameters are determined based on the target parameters.
[0058] Understandably, the default offset value is the single-step offset value. In another optional method, a limit on the number of offsets can also be added.
[0059] If the driver's operating data (composite waveform) meets multiple preset conditions, the current driver parameters can be determined as target parameters. The specific verification method is as follows: Multiple points are sequentially marked from the start point to the end point of the composite waveform. For example, such as... Figure 3As shown, it includes: 1 to 73. The interval between each point is the same; the rising and falling edges of the second and third waveforms are determined based on the waveform change trends corresponding to adjacent points; the parameters of the driver are adjusted until the rising edge of the second waveform is always after the falling edge of the third waveform, and the driver's operating data is determined to satisfy the first preset condition among multiple preset conditions.
[0060] It should be noted that if the waveform change trend between adjacent points is from 0 to 1, then the adjacent points are considered to be rising edges; if the waveform change trend between adjacent points is from 1 to 0, then the adjacent points are considered to be falling edges.
[0061] Simultaneously, the first point corresponding to all low-frequency bands in the fourth waveform is obtained; the target frequency band corresponding to the first point in the third waveform is obtained; the parameters of the driver are adjusted until all target frequency bands are low-frequency bands, and the driver's operating data is determined to meet the second preset condition among multiple preset conditions; all high-frequency bands in the first waveform are determined according to the rising and falling edges of the first waveform, and the first and last high-frequency bands in the first waveform are removed to obtain a valid waveform; an oscillation segment is searched from the valid waveform, and if the last oscillation segment in the valid waveform meets a preset rule, the driver's operating data is determined to meet the third preset condition among multiple preset conditions;
[0062] All low-frequency bands are extracted from the effective waveform. The low-frequency band with the longest duration among all low-frequency bands is determined as the target low-frequency band. If the duration of the target low-frequency band is greater than the preset duration, the driver's operating data is determined to satisfy the fourth preset condition among multiple preset conditions.
[0063] It should be noted that the high-frequency band can be determined by the difference between the rising and falling edges. When the waveform is in the high-frequency band, the driver is in a stationary state, and when the waveform is in the low-frequency band, the driver is in a moving state.
[0064] In one alternative approach, for the fourth waveform, if the duration of the high-frequency band is shorter than the duration of the first band, then that high-frequency band is determined to belong to the oscillation frequency band, such as... Figure 4 As shown, taking a standard duration of 200ms as an example, the duration of the high-frequency band is 200ms. Taking a first duration of 0.8 * standard duration as an example, the first duration is 160ms. If a low-frequency band appears in the waveform of the high-frequency band, it will cause the high-frequency band to be divided into two high-frequency segments. Therefore, the waveform of the high-frequency band is considered abnormal. In one optional method, if the duration of the high-frequency band waveform is less than 160ms, it can be determined that the waveform has oscillation, and the oscillation segment in the waveform is detected.
[0065] It is understandable that the low-frequency band refers to the waveform after the falling edge, and the high-frequency band refers to the waveform after the rising edge.
[0066] Find all low-frequency segments by going from the falling edge to the rising edge. Check if the last oscillation data is reasonable by adding the low-frequency length to the preset rules. If it is not reasonable, remove it. Then check the duration of all low-frequency segments and calculate the low-frequency segment with the longest duration. The duration of this segment is the data for this test.
[0067] If the duration of the low-frequency band with the longest duration exceeds the preset duration, the driver's operating data is determined to meet the fourth preset condition among multiple preset conditions.
[0068] The specific process for determining the optimal parameter based on the target parameter is as follows: when there is only one target parameter, the target parameter is determined as the optimal parameter; when there are multiple target parameters, preset values of the parameters of the driver are obtained; and the target parameter closest to the preset value among the multiple target parameters is determined as the optimal parameter.
[0069] The specific process for verifying the open-loop data is as follows: obtain the gain margin and phase margin of the current frequency phase angle from the open-loop data; divide the open-loop data into multiple parts according to the gain margin and the phase margin, and verify each of the multiple parts to obtain the verification result.
[0070] The specific method for dividing the open-loop data into multiple parts based on the gain margin and the phase margin is as follows:
[0071] The sweep curve in the open-loop data is divided into the part before the gain margin is 0, the part from the gain margin being greater than 0 to the phase margin being equal to 0, and the part after the phase margin is equal to 0.
[0072] The method for validating closed-loop data is similar to that for open-loop data, and will not be elaborated here.
[0073] Figure 5 Another method for debugging the driver is shown, such as... Figure 5 As shown, it includes: importing config (configuration information); recording the drive motion points, performing commutation, open-loop debugging, result analysis, reciprocating motion, automatic debugging of shaft performance parameters, automatic debugging of focusing parameters, closed-loop debugging, result analysis, and exporting parameters to local files.
[0074] Figure 6 A parameter adjustment method is shown, such as Figure 6As shown, the process includes: setting parameters, calling motion commands, collecting waveform data, analyzing results, adjusting parameter offsets until the waveform meets expectations, recording parameters, and setting optimal parameters.
[0075] Figure 7 Another method for adjusting parameters is shown, such as Figure 7 As shown, the process includes: the rising edge of the second waveform (CNT2) must be after the falling edge of the third waveform (CNT3); when the fourth waveform (ACC) is equal to 0, the third waveform (CNT3) must also be 0; the motion duration and oscillation of the first waveform (MST) are judged; if the test is qualified, the data is saved.
[0076] Figure 8 This is a schematic diagram of the structure of a driver according to an embodiment of the present disclosure, such as... Figure 8 As shown, it includes:
[0077] The debugging module 80 is configured to, in response to a debugging command, perform an open-loop test on the control system corresponding to the driver to obtain open-loop data and verify the open-loop data; if the open-loop data passes verification, acquire the driver's operating data within a preset time period, the operating data being used to characterize the driver's operating state; determine the optimal parameters of the driver based on the driver's operating data, and debug the driver based on the optimal parameters, wherein the optimal parameters are used to make the driver's operating state optimal; after the driver has been debugged according to the optimal parameters, perform a closed-loop test on the control system corresponding to the driver to obtain closed-loop data, verify the closed-loop data, and if the closed-loop data passes verification, determine that the driver debugging is complete.
[0078] It should be noted that, Figure 8 The driver shown is used to execute Figure 2 The debugging method for the driver shown above is also applicable to this type of driver, and will not be repeated here.
[0079] This disclosure also provides a driver debugging device, such as... Figure 9 As shown, it includes:
[0080] The response module 90 is used to respond to the debugging command, perform open-loop testing on the control system corresponding to the driver, obtain open-loop data, and verify the open-loop data;
[0081] The acquisition module 92 is used to acquire the driver's operating data within a preset time period when the open-loop data passes verification, and the operating data is used to characterize the driver's operating status.
[0082] The adjustment module 94 is used to determine the optimal parameters of the driver based on the driver's operating data, and to debug the driver based on the optimal parameters, wherein the optimal parameters are used to make the driver's operating state the best.
[0083] The verification module 98 is used to perform closed-loop testing on the control system corresponding to the driver after the driver has been debugged according to the optimal parameters, obtain closed-loop data, verify the closed-loop data, and determine that the driver has been debugged if the closed-loop data passes the verification.
[0084] The acquisition module 90 includes: an acquisition submodule, configured to receive motion commands and control the driver to perform reciprocating motion; during the reciprocating motion of the driver, to collect operating data within a preset time period, the operating data including at least: a composite waveform diagram, the composite waveform diagram including at least: a first waveform reflecting the position of the driver, a second waveform reflecting a first error value of the driver position, a third waveform reflecting a second error value of the driver position, and a fourth waveform reflecting the acceleration of the driver; and to determine the optimal parameters of the driver based on the composite waveform.
[0085] The acquisition submodule includes: a first determining unit, configured to acquire a preset offset value; adjust the parameters of the driver according to the preset offset value until the driver's operating data meets multiple preset conditions, at which point the driver's parameters are target parameters; and determine the optimal parameters according to the target parameters.
[0086] The adjustment module 94 includes: a first determining submodule, a second determining submodule, and a third determining submodule. The first determining submodule is used to mark multiple points sequentially from the starting point to the ending point of the composite waveform, wherein the interval between each point is the same; determine the rising edge and falling edge of the second waveform and the third waveform according to the waveform change trend corresponding to adjacent points; adjust the parameters of the driver until the rising edge of the second waveform is after the falling edge of the third waveform; and determine that the operating data of the driver meets the first preset condition among multiple preset conditions.
[0087] The second determining submodule is used to obtain the first point corresponding to all low-frequency bands in the fourth waveform; obtain the target frequency band corresponding to the first point in the third waveform; adjust the parameters of the driver until all target frequency bands are low-frequency bands; and determine that the operating data of the driver meets the second preset condition among multiple preset conditions.
[0088] The third determining submodule is used to determine all high-frequency segments in the first waveform based on the rising and falling edges of the first waveform, and remove the first and last high-frequency segments in the first waveform to obtain a valid waveform; search for oscillation segments in the valid waveform, and if the last oscillation segment in the valid waveform conforms to a preset rule, determine that the operating data of the driver meets the third preset condition among multiple preset conditions.
[0089] The third determining submodule includes: a second determining unit, configured to determine the target parameter as the optimal parameter when there is only one target parameter; to obtain preset values of the parameters of the driver when there are multiple target parameters; and to determine the target parameter closest to the preset value among the multiple target parameters as the optimal parameter.
[0090] The response module 90 includes: a verification submodule, configured to obtain the gain margin and phase margin of the phase angle at the current frequency from the open-loop data; divide the open-loop data into multiple parts according to the gain margin and the phase margin, and verify the multiple parts of the data respectively to obtain a verification result.
[0091] It should be noted that, Figure 9 The debugging device of the driver shown is used to perform Figure 2 The debugging method of the driver shown above is also applicable to the debugging device of this type of driver, and will not be repeated here.
[0092] This disclosure also provides a motion control platform, including: a host computer and a driver. The driver is used to drive the motion control platform. The host computer is used to respond to debugging commands, perform open-loop testing on the control system corresponding to the driver, obtain open-loop data, and verify the open-loop data. If the open-loop data passes verification, the host computer acquires the driver's operating data within a preset time period, the operating data being used to characterize the driver's operating state. The host computer determines the optimal parameters of the driver based on the driver's operating data and debugs the driver based on the optimal parameters, wherein the optimal parameters are used to make the driver's operating state optimal. After the driver is debugged according to the optimal parameters, the host computer performs closed-loop testing on the control system corresponding to the driver, obtains closed-loop data, verifies the closed-loop data, and determines that the driver debugging is complete if the closed-loop data passes verification.
[0093] This disclosure also provides a computer device, including: a memory for storing program instructions; and a processor connected to the memory, configured to execute the program instructions for the following functions: responding to a debugging instruction, performing an open-loop test on a control system corresponding to a driver to obtain open-loop data, and verifying the open-loop data; if the open-loop data passes verification, acquiring operating data of the driver within a preset time period, the operating data being used to characterize the operating state of the driver; determining optimal parameters of the driver based on the operating data of the driver, and debugging the driver based on the optimal parameters, wherein the optimal parameters are used to make the operating state of the driver optimal; after the driver has been debugged according to the optimal parameters, performing a closed-loop test on the control system corresponding to the driver to obtain closed-loop data, verifying the closed-loop data, and if the closed-loop data passes verification, determining that the driver debugging is complete.
[0094] It should be noted that the aforementioned computer equipment is used to perform... Figure 2 The debugging method for the driver shown is also applicable to this computer device, as explained in the above application access method description. Therefore, it will not be repeated here.
[0095] This disclosure also provides a non-volatile storage medium including a stored computer program. The device containing the non-volatile storage medium executes the following driver debugging method by running the computer program: responding to a debugging instruction, performing an open-loop test on the control system corresponding to the driver to obtain open-loop data, and verifying the open-loop data; if the open-loop data passes verification, acquiring the driver's operating data within a preset time period, the operating data being used to characterize the driver's operating state; determining the optimal parameters of the driver based on the driver's operating data, and debugging the driver based on the optimal parameters, wherein the optimal parameters are used to achieve the best operating state of the driver; after the driver has been debugged according to the optimal parameters, performing a closed-loop test on the control system corresponding to the driver to obtain closed-loop data, verifying the closed-loop data, and determining that the driver debugging is complete if the closed-loop data passes verification.
[0096] It should be noted that the aforementioned non-volatile storage media is used for execution. Figure 2 The debugging method for the drive shown above is also applicable to this non-volatile storage medium, and will not be repeated here.
[0097] This disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements steps of a driver debugging method.
[0098] It should be noted that the above-mentioned computer program product is used to execute Figure 2 The debugging method for the driver shown above is also applicable to this computer program product, and will not be repeated here.
[0099] The sequence numbers of the embodiments disclosed above are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0100] In the above embodiments of this disclosure, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0101] In the several embodiments provided in this disclosure, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some interfaces; indirect couplings or communication connections between units or modules may be electrical or other forms.
[0102] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0103] Furthermore, the functional units in the various embodiments of this disclosure can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0104] If the integrated unit is implemented as a software functional unit 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 disclosure, in essence, or the part that contributes to the prior art, or all or 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 disclosure. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.
[0105] The above are merely preferred embodiments of this disclosure. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of this disclosure, and these improvements and modifications should also be considered within the scope of protection of this disclosure.
Claims
1. A method for debugging a driver, characterized in that, include: In response to the debugging command, an open-loop test is performed on the control system corresponding to the driver to obtain open-loop data, and the open-loop data is verified. If the open-loop data passes verification, the driver's operating data within a preset time period is obtained, and the operating data is used to characterize the driver's operating status. The optimal parameters of the driver are determined based on the driver's operating data, and the driver is debugged based on the optimal parameters, wherein the optimal parameters are used to make the driver's operating state the best. After the driver is debugged according to the optimal parameters, a closed-loop test is performed on the control system corresponding to the driver to obtain closed-loop data. The closed-loop data is then verified. If the closed-loop data passes the verification, the driver is determined to be debugged successfully.
2. The method according to claim 1, characterized in that, Obtain the driver's operating data within a preset time period, including: Receive motion commands and control the driver to perform reciprocating motion; During the reciprocating motion of the drive, operating data within the preset time period is collected. The operating data includes at least a composite waveform diagram, which includes at least a first waveform reflecting the movement position of the drive, a second waveform reflecting a first error value of the drive position, a third waveform reflecting a second error value of the drive position, and a fourth waveform reflecting the acceleration of the drive. The optimal parameters of the driver are determined based on the composite waveform.
3. The method according to claim 2, characterized in that, Determining the optimal parameters of the driver based on the composite waveform includes: Get the preset offset value; The parameters of the driver are adjusted according to the preset offset value until the operating data of the driver meets multiple preset conditions, at which point the parameters of the driver become the target parameters. The optimal parameters are determined based on the target parameters.
4. The method according to claim 3, characterized in that The parameters of the driver are adjusted sequentially according to the preset offset value until the driver's operating data meets several preset conditions, including: Multiple points are marked sequentially from the starting point to the ending point of the composite waveform, wherein the interval between each point is the same. The rising and falling edges of the second and third waveforms are determined based on the waveform change trends corresponding to adjacent points. Adjust the parameters of the driver until the rising edge of the second waveform is after the falling edge of the third waveform, and determine that the operating data of the driver meets the first preset condition among multiple preset conditions.
5. The method according to claim 4, characterized in that, The parameters of the driver are adjusted sequentially according to the preset offset value until the driver's operating data meets several preset conditions, including: Obtain the first point corresponding to all low-frequency bands in the fourth waveform; Obtain the target frequency band corresponding to the first point in the third waveform; Adjust the parameters of the driver until all target frequency bands are low frequency bands, and determine that the driver's operating data meets the second preset condition among multiple preset conditions.
6. The method according to claim 4, characterized in that, The parameters of the driver are adjusted sequentially according to the preset offset value until the driver's operating data meets several preset conditions, including: All high-frequency bands in the first waveform are determined based on the rising and falling edges of the first waveform, and the first and last high-frequency bands in the first waveform are removed to obtain the effective waveform. The oscillation segment is found in the valid waveform. If the last oscillation segment in the valid waveform conforms to the preset rule, the operating data of the driver is determined to satisfy the third preset condition among multiple preset conditions. All low-frequency bands are extracted from the effective waveform. The low-frequency band with the longest duration among all low-frequency bands is determined as the target low-frequency band. If the duration of the target low-frequency band is greater than the preset duration, the driver's operating data is determined to satisfy the fourth preset condition among multiple preset conditions.
7. The method according to claim 3, characterized in that, Determining the optimal parameters based on the target parameters includes: If there is only one target parameter, then the target parameter is determined as the optimal parameter. When there are multiple target parameters, obtain the preset values of the parameters of the driver; The target parameter that is closest to the preset value among the multiple target parameters is determined as the optimal parameter.
8. The method according to claim 1, characterized in that Verification of the open-loop data includes: Obtain the gain margin and phase margin of the phase angle at the current frequency from the open-loop data; The open-loop data is divided into multiple parts based on the gain margin and the phase margin, and the multiple parts of the data are... The data from each of the multiple parts were verified separately to obtain the verification results.
9. A driver, characterized in that, include: The debugging module is used to respond to debugging commands, perform open-loop testing on the control system corresponding to the driver, obtain open-loop data, and verify the open-loop data. If the open-loop data passes verification, the driver's operating data within a preset time period is acquired. The operating data is used to characterize the driver's operating status. The optimal parameters of the driver are determined based on the driver's operating data, and the driver is debugged based on the optimal parameters, wherein the optimal parameters are used to make the driver's operating status the best. After the driver is debugged according to the optimal parameters, a closed-loop test is performed on the control system corresponding to the driver to obtain closed-loop data. The closed-loop data is then verified. If the closed-loop data passes the verification, the driver is determined to be debugged successfully.
10. A motion control platform, characterized in that, It includes: a host computer and a driver, wherein the driver is used to drive the motion control platform, and the host computer is used to respond to debugging instructions to perform open-loop testing on the control system corresponding to the driver, obtain open-loop data, and verify the open-loop data; If the open-loop data passes verification, the driver's operating data within a preset time period is acquired. The operating data is used to characterize the driver's operating status. The optimal parameters of the driver are determined based on the driver's operating data, and the driver is debugged based on the optimal parameters, wherein the optimal parameters are used to make the driver's operating status the best. After the driver is debugged according to the optimal parameters, a closed-loop test is performed on the control system corresponding to the driver to obtain closed-loop data. The closed-loop data is then verified. If the closed-loop data passes the verification, the driver is determined to be debugged successfully.