A performance detection method, device, equipment and storage medium for motor encoder
By detecting the uniformity of the output pulses of the motor encoder, the problem of abnormal motor speed jitter is solved, the efficiency and accuracy of machine tool debugging are improved, and safety risks are reduced.
Patent Information
- Application Number
- CN202310215417.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-06
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2043-03-06
AI Technical Summary
In the existing technology, the performance differences of motor encoders lead to uneven output pulses, resulting in abnormal motor speed jitter. Conventional debugging solutions directly adjust the speed loop parameters and position loop parameters, resulting in efficiency and accuracy problems.
By obtaining the speed and displacement data of the machine tool at each target speed, it is determined whether the motor encoder has a performance problem of uneven output pulses. This includes detecting periodic jitter and displacement in the pulse statistical timing data, determining the motor encoder performance problem, and avoiding invalid parameter adjustments.
It improves the efficiency and accuracy of machine tool debugging, reduces safety risks, avoids invalid parameter adjustments, and ensures that motor encoder performance testing is carried out in a weak current environment.
Smart Images

Figure CN116242413B_ABST
Abstract
Description
Technical Field
[0001] One or more embodiments of the present invention relate to the field of fault testing technology, and in particular, to a performance detection method, apparatus, device, and storage medium for a motor encoder. Background Art
[0002] A photoelectric encoder is a sensor that can convert displacement into digital pulses. Taking an encoder equipped with a grating scale as an example, when the reading head moves relative to the grating scale, the encoder can output pulses corresponding to the magnitude of the relative displacement. Based on the encoder's output pulses, physical quantities such as motor speed can be further calculated. Therefore, the motor encoder can be regarded as a basic component in the control system of CNC machine tools.
[0003] At present, in conventional machine tool debugging solutions, the motor's photoelectric encoder is generally assumed to be in an ideal state. When problems such as abnormal motor speed jitter occur, most people directly adjust the motor's speed loop parameters and position loop parameters. However, in reality, due to performance differences, the photoelectric encoder may not output pulses uniformly based on the displacement. That is, the output pulse statistics and the relative displacement cannot show a strict linear relationship, which may also cause abnormal jitter in the subsequently calculated motor speed.
[0004] The above technical issues have been ignored for a long time, and the conventional solution is to directly debug the motor speed loop parameters and position loop parameters when there are encoder performance problems, which often causes efficiency and accuracy problems. Summary of the Invention
[0005] In view of this, one or more embodiments of the present invention provide a method, apparatus, device, and storage medium for detecting the performance of a motor encoder.
[0006] To achieve the above objectives, one or more embodiments of the present invention provide the following technical solutions:
[0007] According to a first aspect of one or more embodiments of the present invention, a method for detecting performance of a motor encoder is provided, wherein the motor encoder is configured with a grating ruler, the method comprising:
[0008] Control the machine tool to run a preset distance at several target speeds;
[0009] Acquiring speed data and displacement data generated by the machine tool running at each target speed;
[0010] Based on the speed data and the displacement data, it is determined whether the motor encoder has a performance problem of uneven output pulses.
[0011] In an optional implementation, the method further includes:
[0012] Before controlling the machine tool to run a preset distance at a certain target speed, determine whether there is abnormal jitter in the motor speed;
[0013] If so, execute the steps of the method in the first aspect of the present invention, and debug the speed loop parameters and position loop parameters of the motor if the motor encoder does not have the performance problem of uneven output pulses.
[0014] In an optional implementation, the speed data includes pulse statistical timing data; and determining whether the motor encoder has a performance problem caused by uneven output pulses based on the speed data and the displacement data includes:
[0015] In the case where periodic jitter exists in the pulse statistical time series data, determining the displacement corresponding to the peak to the trough in a single jitter period in each of the pulse statistical time series data;
[0016] Determine whether the maximum displacement occurs when the target speed is 0.5*L / T, where the duty cycle of the speed loop is T and the single grating pitch of the grating ruler is L;
[0017] If so, it is determined that the motor encoder has a performance problem of uneven output pulses.
[0018] In an optional implementation, the determining, based on the speed data and the displacement data, whether the motor encoder has a performance problem of uneven output pulses further includes:
[0019] When the maximum value of the displacement occurs when the target speed is 0.5*L / T, if the error between the jitter period of the pulse statistical timing data generated when the target speed is V and L / V does not exceed the period error threshold, it is determined that the motor encoder has a performance problem of uneven output pulses.
[0020] In an optional implementation, the determining, based on the speed data and the displacement data, whether the motor encoder has a performance problem of uneven output pulses further includes:
[0021] If there is no periodic jitter in each of the pulse statistical timing data, it is determined that there is no performance problem of uneven pulse output in the motor encoder.
[0022] In an optional implementation, the obtaining of speed data and displacement data generated by the machine tool operating at each target speed includes:
[0023] The feedback data of the motor encoder is connected to an oscilloscope, and the pulse statistical timing data of the motor encoder is obtained through the waveform displayed on the oscilloscope.
[0024] According to a second aspect of one or more embodiments of the present invention, a performance detection device for a motor encoder is provided. The motor encoder is configured with a grating ruler. The device includes a target pushing unit, a data acquisition unit, and a performance judgment unit.
[0025] The target pushing unit is used to control the machine tool to run a preset distance at a number of target speeds;
[0026] The data acquisition unit is used to acquire speed data and displacement data generated by the machine tool running at each target speed;
[0027] The performance judgment unit is used to judge whether the motor encoder has a performance problem of uneven output pulses based on the speed data and the displacement data.
[0028] According to a third aspect of one or more embodiments of the present invention, an electronic device is provided, including:
[0029] a processor, and a memory for storing instructions executable by the processor;
[0030] The processor implements the steps of the method described in the first aspect above by running the executable instructions.
[0031] According to a fourth aspect of one or more embodiments of the present invention, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.
[0032] From the above description, it can be seen that the present invention obtains the speed data and displacement data generated by the machine tool operation at each target speed, and judges whether the motor encoder has a performance problem of uneven output pulses based on the speed data and displacement data, and then determines whether it is necessary to adjust the speed loop and position loop parameters in response to abnormal motor speed jitter.
[0033] This solution takes the lead in testing the performance of the encoder, which is fundamental but generally overlooked during the debugging process. This can help avoid the ineffective operation of directly adjusting the speed loop parameters and position loop parameters in conventional debugging solutions, improve the efficiency and accuracy of machine tool debugging, and eliminate the need for strong electricity on the machine tool, reducing related safety risks. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 A flowchart of a method for detecting performance of a motor encoder is provided as an exemplary embodiment.
[0035] Figure 2 The figure is a flow chart of a method for obtaining velocity and displacement data, showing an exemplary embodiment.
[0036] Figure 3 The figure is a waveform diagram of pulse statistical time series data shown in an exemplary embodiment.
[0037] Figure 4 The flowchart of a method for judging encoder performance is shown as an exemplary embodiment.
[0038] Figure 5 This is a flow chart of a method for judging encoder performance according to another exemplary embodiment.
[0039] Figure 6 This is a flow chart of a method for judging encoder performance, shown as yet another exemplary embodiment.
[0040] Figure 7 The flowchart of the method for debugging a machine tool in combination with encoder performance is shown as an exemplary embodiment.
[0041] Figure 8 A schematic structural diagram of an electronic device in which a performance detection device for a motor encoder is provided according to an exemplary embodiment.
[0042] Figure 9 A block diagram of a performance detection device for a motor encoder is provided as an exemplary embodiment. DETAILED DESCRIPTION
[0043] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, like numbers in different figures represent like or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all possible implementations consistent with one or more embodiments of the present invention. Rather, they are merely examples of apparatuses and methods consistent with certain aspects of one or more embodiments of the present invention, as detailed in the appended claims.
[0044] It should be noted that in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in the present invention. In some other embodiments, the method may include more or fewer steps than those described in the present invention. In addition, a single step described in the present invention may be broken down into multiple steps for description in other embodiments, and multiple steps described in the present invention may be combined into a single step for description in other embodiments.
[0045] The photoelectric encoder in a motor can consist of multiple components, including a light source, a scale, and a photosensitive element, and can convert displacement into digital pulses. For example, assuming the encoder resolution is 10,000 cnt / mm and the scale pitch is 0.02 mm, the encoder's readhead outputs an average of 200 pulses for each scale pitch it moves. This translates to a pulse count of 200.
[0046] The encoder's output pulses can be used to further calculate physical quantities such as motor speed. Referring to the previous example, a pulse statistic of 200, cnt, can be converted into an equivalent displacement of 0.02 mm, which can then be combined with time and other data to calculate motor speed. Therefore, the feedback data from the motor encoder plays a fundamental but important role in the control loop of the CNC machine tool, directly affecting the operation of the motor's speed and position loops.
[0047] Currently, in machine tool debugging solutions, if abnormal motor speed jitter occurs, most directly adjust the motor's speed loop parameters or position loop parameters, assuming the motor encoder is in an ideal state. However, experiments have found that due to differences in encoder performance, their output pulses may not be uniform. When the readhead moves at a constant speed relative to the grating scale, the pulse statistics output during the previous speed loop working cycle may not be equal to the pulse statistics output during the next speed loop working cycle. The error between the actual output pulse statistics and the ideal output pulse statistics is affected by the motor speed.
[0048] The above problems have been ignored for a long time. Using conventional debugging solutions to directly adjust the motor speed loop and position loop parameters will often result in a decrease in debugging efficiency and accuracy.
[0049] In view of this, the present invention proposes a performance detection method for a motor encoder, which can first detect the encoder performance to avoid invalid parameter adjustments, thereby improving the efficiency and accuracy of machine tool debugging. It can also be executed in a weak current environment with low safety risks.
[0050] The performance detection method of the motor encoder is applied to a motor encoder equipped with a grating ruler.
[0051] The electronic devices that execute the motor encoder performance detection method include various computers that can exchange data with machine tools, motors, encoders, etc., which can be personal computers used by debuggers or industrial computers used in different application scenarios.
[0052] Please refer to Figure 1 , Figure 1 Shown is a flow chart of a method for detecting performance of a motor encoder provided by an exemplary embodiment of the present invention.
[0053] The performance detection method of the motor encoder may include the following specific steps:
[0054] Step 102: Control the machine tool to run a preset distance at a plurality of target speeds.
[0055] In this embodiment, during the debugging of the machine tool system, relevant personnel may first set several target speeds to control the machine tool to run a certain distance to detect the performance of the motor encoder.
[0056] Among them, assuming that the single grating pitch of the grating scale in the motor encoder is L and the working cycle of the motor speed loop is T, when setting the numerical value of the target speed, the target speed with a value of 0.5*L / T, the target speed with a value not exceeding 0.5*L / T, and the target speed with a value exceeding 0.5*L / T should be included, so as to provide comparative data for subsequent detection of encoder performance.
[0057] The preset distance for pushing the machine tool to move at the target speed can be preset by relevant personnel according to the specific scenario. For example, the preset distance can be 10 mm.
[0058] In another optional implementation method, the machine tool can also be moved by hand pushing. Since the movement of the hand pushing machine tool can include the movement of the machine tool at a variety of different speeds, relevant data can also be obtained to observe and determine the performance of the motor encoder. Although this implementation method has reduced accuracy, it is more efficient and convenient, and has low safety risks.
[0059] Step 104 : acquiring speed data and displacement data generated by the machine tool operating at each target speed.
[0060] In this embodiment, after controlling the movement of the machine tool at several different target speeds, for each target speed, the speed data and displacement data generated when the machine tool is controlled to move at the target speed can be obtained through interface import or instrument observation.
[0061] Among them, the speed data and the displacement data should be time series data, that is, the speed data can reflect the motor speed at each moment, and the displacement data can reflect the motor position at each moment. More preferably, the speed data and the displacement data can also be mapped based on the moment, and then the mapping relationship between the motor speed and the motor position at each moment is clarified.
[0062] It should be noted that although the machine tool has been controlled to run at the target speed in the previous step, the speed data may not necessarily be in an ideal state, that is, the speed data may not be a straight line, but may have value fluctuations at certain moments.
[0063] The speed data includes at least pulse statistical timing data from the motor encoder within the target motor. Referring to relevant principles, the photoelectric encoder in the motor outputs a corresponding number of pulses based on the displacement and performs statistical analysis. The pulse statistical timing data reflects the rate at which the motor encoder outputs the pulse statistic cnt at each moment. For example, assuming the motor encoder has a resolution of 10,000 cnt / mm, at a certain moment when the target motor is running at 400 mm / s, the motor encoder outputs the pulse statistic cnt at a rate of 4,000,000 cnt / s.
[0064] There are many optional implementation methods for obtaining the speed data and the displacement data. For example, the data can be exported to a computer for processing through the feedback interface of a machine tool, motor or encoder, or can be directly observed using an adaptive instrument such as an oscilloscope.
[0065] Please refer to Figure 2 , Figure 2 Shown is a flow chart of a method for acquiring velocity and displacement data according to an exemplary embodiment.
[0066] Please refer to Figure 3 , Figure 3 Shown is a waveform diagram of pulse statistical timing data according to an exemplary embodiment.
[0067] In an optional implementation, in step 104, obtaining the speed data and displacement data generated by the machine tool operating at each target speed may include the following specific steps:
[0068] Step 1042: Connect the feedback data of the motor encoder to an oscilloscope, and obtain the pulse statistical timing data of the motor encoder through the waveform displayed on the oscilloscope.
[0069] Specifically, if Figure 3 As shown, the waveform of the pulse statistical timing data can be displayed by an oscilloscope, which can reflect the rate at which the motor encoder outputs pulse statistics at each moment. The current target speed is 160 mm / s, and the output rate of the pulse statistic cnt fluctuates around 160 0000 cnt / s.
[0070] Step 106 : Based on the speed data and the displacement data, determine whether the motor encoder has a performance problem of uneven output pulses.
[0071] In this embodiment, after obtaining the speed data and displacement data corresponding to the target motor running at different speeds, the performance of the motor encoder can be determined based on the speed data and displacement data through the fluctuation of the speed data, the values of the speed data and displacement data, etc., to determine whether the motor encoder has a performance problem of uneven output pulses.
[0072] Please refer to Figure 4 , Figure 4 Shown is a flow chart of a method for determining encoder performance according to an exemplary embodiment.
[0073] In an optional implementation, in step 106, judging whether the motor encoder has a performance problem of uneven output pulses based on the speed data and the displacement data may include the following specific steps:
[0074] Step 402: if periodic jitter exists in the pulse statistical time series data, determine the displacement corresponding to the peak to the trough in a single jitter period in each of the pulse statistical time series data;
[0075] Step 404 , determining whether the maximum displacement occurs when the target speed is 0.5*L / T; wherein the duty cycle of the speed loop is T and the single grating pitch of the grating ruler is L;
[0076] Step 406: If yes, it is determined that the motor encoder has a performance problem of uneven output pulses.
[0077] Specifically, first, it is possible to determine whether there is periodic jitter in the pulse statistical timing data generated at each target speed; it should be noted here that the periodic jitter does not require periodic jitter in the strict sense, and slight differences in the jitter amplitudes of each jitter period in the same pulse statistical timing data can be allowed.
[0078] After determining that there is periodic jitter in the data, the displacement corresponding to the peak to the trough within a single jitter cycle in each of the pulse statistical timing data can be determined. The displacement corresponding to the peak to the trough is the maximum error of the reading head at the target speed.
[0079] Compare the several displacement amounts obtained to determine whether the maximum displacement amount is generated when the target speed is 0.5*L / T, that is, determine whether the pulse statistical timing data generated when the target speed is 0.5*L / T is most significantly jittered; if so, it can be determined that the motor encoder has a performance problem of uneven output pulses.
[0080] Assume that the duty cycle of the motor speed loop is 0.0625ms, the single grating pitch of the grating ruler in the motor encoder is 20mm, and the resolution of the motor encoder is 10000cnt / mm. Figure 3 Taking the pulse statistics timing data shown in the figure as an example, the current target speed is 0.5*L / T, which is 160mm / s. Under ideal conditions, the rate at which the motor encoder outputs the pulse statistics cnt is constantly 1600000cnt / s. However, the output rate of the pulse statistics shown in the figure is not a straight line, but rather exhibits periodic jitter. The rate difference of the output pulse statistics cnt between the peak and the trough is approximately 75000cnt / s. At the target speed of 160mm / s, the corresponding displacement can be converted to ((75000cnt / s) / (160000cnt / s)*(10mm)), which is 0.47mm.
[0081] If periodic jitter is also present in other pulse statistical timing data, and the displacement corresponding to the peak to the trough in a single jitter cycle in the pulse statistical timing data is the largest at the current target speed of 160 mm / s, it can be determined that the motor encoder has a performance problem of uneven output pulses.
[0082] Please refer to Figure 5 , Figure 5 Shown is a flow chart of a method for judging encoder performance according to another exemplary embodiment.
[0083] Correspondingly, in an optional implementation, in step 106, judging whether the motor encoder has a performance problem of uneven output pulses based on the speed data and the displacement data may further include the following specific steps:
[0084] Step 408: If the pulse statistical time series speed data generated at each target speed does not have periodic jitter, it is determined that the motor encoder does not have a performance problem of uneven pulse output.
[0085] In order to make this technical solution clearer, the following description is given.
[0086] Due to performance differences in motor encoders, when the readhead inside the encoder moves at a uniform speed relative to the grating scale, the pulse statistics output by the encoder with insufficient performance are not uniform within each speed loop working cycle, and periodic jitter will be generated in the pulse statistical timing data. The unevenness of the pulse statistics output by the encoder is affected by the moving speed of the readhead. Among them, the speed at which the readhead moves half a grating pitch relative to the grating scale within one working cycle is the extreme point where the pulse unevenness is affected by speed.
[0087] To simplify the explanation, assume that point A is the left endpoint of a grating of the grating ruler, point B is the right endpoint of the grating, and point C is the midpoint of points A and B. When the reading head moves relatively less than half a pitch in one working cycle, it falls on the left side of point C or on the right side of point C in the two previous and next working cycles, and the reading is biased to one end. The maximum error is theoretically less than half a pitch. When the reading head moves relatively more than half a pitch in one working cycle, it falls on both sides of point C in the two previous and next working cycles, and the reading is biased to both ends. The maximum error is also theoretically less than half a pitch. Only when the reading head moves relatively half a pitch in one working cycle can the maximum error theoretically reach half a pitch.
[0088] Therefore, when the pulse statistical timing data generated by the machine tool operation at each target speed has periodic jitter, and the jitter of the pulse statistical timing data is most significant at the target speed with a value of 0.5*L / T, it can be determined that the motor encoder has a performance problem of uneven output pulses.
[0089] Please refer to Figure 6 , Figure 6 FIG2 is a flow chart of a method for judging encoder performance according to another exemplary embodiment.
[0090] In an optional implementation, in step 406, before determining that the motor encoder has a performance problem of uneven output pulses, the following specific steps may be further included:
[0091] Step 4062: When the maximum value of the displacement is generated when the target speed is 0.5*L / T, if the error between the jitter period of the pulse statistical timing data generated when the target speed is V and L / V does not exceed the period error threshold, it is determined that the motor encoder has a performance problem of uneven output pulses.
[0092] Specifically, in order to ensure the accuracy of the above performance detection method, further verification can be performed using the values of the jitter period and the displacement.
[0093] Assume that the duty cycle of the motor speed loop is 0.0625ms, the single grating pitch of the grating ruler in the motor encoder is 20mm, and the resolution of the motor encoder is 10000cnt / mm. Figure 3Taking the pulse statistical timing data shown as an example, the current target speed is 160mm / s. The jitter period of the pulse statistical timing data, that is, the time it takes for the reading head in the motor encoder to move one grating pitch relative to the grating scale at the current target speed, the error between it and L / V should be within the preset period error threshold. Taking the period error threshold of 5ms as an example, the jitter period in the pulse statistical timing data should be ((20mm / (160mm / s))±5ms), that is, 120ms to 130ms. By verifying this condition, it can be further determined whether the motor encoder has a performance problem of uneven output pulses.
[0094] Please refer to Figure 7 , Figure 7 Shown is a flow chart of a method for debugging a machine tool in combination with encoder performance according to an exemplary embodiment.
[0095] In an optional implementation, the method for debugging a machine tool in combination with encoder performance may include the following specific steps:
[0096] Step 702 , determining whether the motor speed has abnormal jitter, and if so, controlling the machine tool to run a preset distance at a certain target speed;
[0097] Step 704: Acquire velocity data and displacement data generated by the machine tool operating at each target speed;
[0098] Step 706: Based on the speed data and the displacement data, determine whether the motor encoder has a performance problem of uneven output pulses;
[0099] Step 708 : When the motor encoder does not have a performance problem of uneven output pulses, debug the speed loop parameters and position loop parameters of the motor.
[0100] In this embodiment, during the machine tool debugging process, if phenomena such as abnormal machine noise occur, the motor speed can be observed. In the case of abnormal jitter in the motor speed, the method of directly adjusting the speed loop and position loop parameters of the motor in the conventional solution is not directly adopted. Instead, several target speeds are set to drive the machine tool to run a certain distance to detect the performance of the motor encoder.
[0101] Then, the speed data and displacement data generated by the machine tool operation at each target speed are obtained, and based on the speed data and the displacement data, it is determined whether the motor encoder has a performance problem of uneven output pulses. The relevant content can be referred to the previous article and will not be repeated here.
[0102] If the motor encoder does not have the performance problem of uneven output pulses, then in step 702, the problem of abnormal motor speed jitter is not caused by insufficient performance of the motor encoder, and the machine tool debugging can be completed subsequently by adjusting the speed loop parameters and position loop parameters of the motor.
[0103] Correspondingly, if the motor encoder has a performance problem of uneven output pulses, then in step 702, the problem of abnormal motor speed jitter may be caused by insufficient performance of the motor encoder, and the subsequent invalid operation of adjusting the speed loop parameters and position loop parameters may no longer be performed.
[0104] From the above description, it can be seen that the present invention obtains the speed data and displacement data generated by the machine tool operation at each target speed, and judges whether the motor encoder has a performance problem of uneven output pulses based on the speed data and displacement data, and then determines whether it is necessary to adjust the speed loop and position loop parameters in response to abnormal motor speed jitter.
[0105] This solution takes the lead in testing the performance of the encoder, which is fundamental but generally overlooked during the debugging process. This can help avoid the ineffective operation of directly adjusting the speed loop parameters and position loop parameters in conventional debugging solutions, improve the efficiency and accuracy of machine tool debugging, and eliminate the need for strong electricity on the machine tool, reducing related safety risks.
[0106] Please refer to Figure 8 , Figure 8 The figure shows a schematic diagram of the structure of an electronic device in which a performance detection device for a motor encoder provided by an exemplary embodiment of the present invention is located. At the hardware level, the electronic device includes a processor 802, an internal bus 804, a network interface 806, a memory 808 and a non-volatile memory 810, and may also include hardware required for other services. One or more embodiments of the present invention can be implemented based on software, such as the processor 802 reading the corresponding computer program from the non-volatile memory 810 into the memory 808 and then running it. Of course, in addition to software implementation, one or more embodiments of the present invention do not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0107] Please refer to Figure 9 , Figure 9 FIG. 1 is a diagram showing a performance detection device for a motor encoder provided by an exemplary embodiment of the present invention. The performance detection device can be applied to Figure 8 The electronic device shown in the figure is used to implement the technical solution of the present invention. The motor encoder is equipped with a grating ruler, and the device includes a target pushing unit 910, a data acquisition unit 920 and a performance judgment unit 930; wherein:
[0108] The target pushing unit 910 is used to control the machine tool to run a preset distance at a certain target speed;
[0109] The data acquisition unit 920 is used to acquire speed data and displacement data generated by the machine tool operating at each target speed;
[0110] The performance judgment unit 930 is used to judge whether the motor encoder has a performance problem of uneven output pulses based on the speed data and the displacement data.
[0111] Optionally, the device further comprises a machine tool debugging unit 940:
[0112] The machine tool debugging unit 940 is used to determine whether there is abnormal jitter in the motor speed before controlling the machine tool to run a preset distance at a certain target speed;
[0113] If so, execute Figure 1 The steps shown are used to debug the speed loop parameters and position loop parameters of the motor when there is no performance problem of uneven output pulses of the motor encoder.
[0114] Optionally, when determining whether the motor encoder has a performance problem of uneven output pulses based on the speed data and the displacement data, the performance determination unit 930 is specifically configured to:
[0115] In the case where periodic jitter exists in the pulse statistical time series data, determining the displacement corresponding to the peak to the trough in a single jitter period in each of the pulse statistical time series data;
[0116] Determine whether the maximum displacement occurs when the target speed is 0.5*L / T, where the duty cycle of the speed loop is T and the single grating pitch of the grating ruler is L;
[0117] If so, it is determined that the motor encoder has a performance problem of uneven output pulses.
[0118] Optionally, when determining whether the motor encoder has a performance problem of uneven output pulses based on the speed data and the displacement data, the performance determination unit 930 is further configured to:
[0119] When the maximum value of the displacement occurs when the target speed is 0.5*L / T, if the error between the jitter period of the pulse statistical timing data generated when the target speed is V and L / V does not exceed the period error threshold, it is determined that the motor encoder has a performance problem of uneven output pulses.
[0120] Optionally, when determining whether the motor encoder has a performance problem of uneven output pulses based on the speed data and the displacement data, the performance judgment unit 930 is further configured to:
[0121] If there is no periodic jitter in each of the pulse statistical timing data, it is determined that there is no performance problem of uneven pulse output in the motor encoder.
[0122] Optionally, the data acquisition unit 920, when acquiring the speed data and displacement data generated by the machine tool operating at each target speed, is specifically configured to:
[0123] The feedback data of the motor encoder is connected to an oscilloscope, and the pulse statistical timing data of the motor encoder is obtained through the waveform displayed on the oscilloscope.
[0124] The systems, devices, modules, or units described in the above embodiments may be implemented by computer chips or entities, or by products having certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email transceiver, game console, tablet computer, wearable device, or any combination of these devices.
[0125] In a typical configuration, a computer includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0126] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0127] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be used to store information using any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices, or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory media such as modulated data signals and carrier waves.
[0128] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0129] The foregoing description describes specific embodiments of the present invention. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0130] The terms used in one or more embodiments of the present invention are for the purpose of describing specific embodiments only and are not intended to limit one or more embodiments of the present invention. The singular forms "a", "an", "the" and "the" used in one or more embodiments of the present invention and the appended claims are also intended to include plural forms, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0131] It should be understood that although the terms first, second, third, etc. may be used to describe various information in one or more embodiments of the present invention, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of one or more embodiments of the present invention, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining."
[0132] The above description is merely a preferred embodiment of one or more embodiments of the present invention and is not intended to limit one or more embodiments of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of the present invention shall be included in the scope of protection of one or more embodiments of the present invention.
Claims
1. A performance detection method for a motor encoder, characterized in that: The motor encoder is configured with a grating ruler, and the method includes: Control the machine tool to run a preset distance at several target speeds; Acquiring speed data and displacement data generated by the machine tool running at each target speed; Based on the speed data and the displacement data, determining whether the motor encoder has a performance problem of uneven output pulses; The speed data includes pulse statistical timing data; and judging whether the motor encoder has a performance problem of uneven output pulses based on the speed data and the displacement data includes: If periodic jitter exists in each of the pulse statistical time series data, determining a displacement corresponding to a peak to a trough in a single jitter period in the pulse statistical time series data; Determine whether the maximum displacement occurs when the target speed is 0.5*L / T, where the duty cycle of the speed loop is T and the single grating pitch of the grating ruler is L; if so, determine that the motor encoder has a performance problem of uneven output pulses; If there is no periodic jitter in each of the pulse statistical timing data, it is determined that there is no performance problem of uneven pulse output in the motor encoder.
2. The method according to claim 1, characterized in that The method further comprises: Before controlling the machine tool to run a preset distance at a certain target speed, determine whether there is abnormal jitter in the motor speed; If so, execute the steps in the method of claim 1 and debug the speed loop parameters and position loop parameters of the motor if the motor encoder does not have the performance problem of uneven output pulses.
3. The method according to claim 2, characterized in that The determining, based on the speed data and the displacement data, whether the motor encoder has a performance problem of uneven output pulses further includes: When the maximum value of the displacement occurs when the target speed is 0.5*L / T, if the error between the jitter period of the pulse statistical timing data generated when the target speed is V and L / V does not exceed the period error threshold, it is determined that the motor encoder has a performance problem of uneven output pulses.
4. The method according to claim 1, wherein The obtaining of speed data and displacement data generated by the machine tool operating at each target speed includes: The feedback data of the motor encoder is connected to an oscilloscope, and the pulse statistical timing data of the motor encoder is obtained through the waveform displayed on the oscilloscope.
5. A performance detection device for a motor encoder, characterized in that: The motor encoder is equipped with a grating ruler, and the device includes a target pushing unit, a data acquisition unit, and a performance judgment unit; wherein: The target pushing unit is used to control the machine tool to run a preset distance at a number of target speeds; The data acquisition unit is used to acquire speed data and displacement data generated by the machine tool running at each target speed; The performance judgment unit is used to judge whether the motor encoder has a performance problem of uneven output pulses based on the speed data and the displacement data; The speed data includes pulse statistical time series data; the performance judgment unit, when judging whether the motor encoder has a performance problem of uneven output pulses based on the speed data and the displacement data, is specifically used to: In the case where periodic jitter exists in the pulse statistical time series data, determining the displacement corresponding to the peak to the trough in a single jitter period in each of the pulse statistical time series data; Determine whether the maximum displacement occurs when the target speed is 0.5*L / T, where the duty cycle of the speed loop is T and the single grating pitch of the grating ruler is L; If so, it is determined that the motor encoder has a performance problem of uneven output pulses; If there is no periodic jitter in each of the pulse statistical timing data, it is determined that there is no performance problem of uneven pulse output in the motor encoder.
6. An electronic device comprising: processor; a memory for storing processor-executable instructions; The processor implements the steps of the method according to any one of claims 1 to 4 by running the executable instructions.
7. A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.