Encoding signal generation method, apparatus, device, and storage medium
By monitoring the original encoding signal of the gear encoder and the current tooth number of the gear disk, the machining error value is determined and error compensation is performed, thus solving the problem of decreased gear encoder accuracy and realizing high-precision, low-cost encoding signal generation.
Patent Information
- Application Number
- CN202511471049.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-15
- Publication Date
- 2025-12-09
- Estimated Expiration
- 2045-10-15
AI Technical Summary
Existing gear encoders suffer from decreased output accuracy due to machining errors, leading to increased transmission shock, positioning deviation, and operating noise in equipment. Traditional solutions are either costly or unable to adapt to dynamic error changes.
By monitoring the original encoding signal of the gear encoder and the current tooth number of the gear disk, the machining error value is determined, error compensation is performed, and an error-compensated encoding signal is generated.
It significantly improves the output accuracy of gear encoders, reduces costs, enhances the adaptability and real-time performance of equipment, and avoids signal distortion caused by processing errors.
Smart Images

Figure CN120927054B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of encoding control, and in particular to an encoding signal generation method and device, equipment and a storage medium. BACKGROUND
[0002] In the field of industrial transmission systems, precision numerical control machine tools, etc., as the core position and speed detection component, the output precision of the gear encoder directly determines the motion control precision and positioning accuracy of the equipment. The working principle of such an encoder is to generate an encoding signal by detecting the tooth movement (i.e., the periodic passage of the tooth tip and tooth root) of the matching gear disc. Therefore, the machining precision of the matching gear disc is a key factor affecting the precision of the gear encoder.
[0003] During the machining and use of the gear disc, various machining errors will inevitably occur in the shape of the gear disc due to factors such as the precision limitation of the machining equipment, normal tool wear, material deformation after heat treatment, and assembly deviation, etc. For example, irregular tooth shape (such as tooth tip being too sharp or too round), tooth spacing deviation (inconsistent spacing between adjacent teeth), and tooth inclination, etc. These errors will directly cause distortion of the detection signal of the gear encoder: for example, when the tooth tip size is too large, the peak value of the chord wave collected by the magnetic sensor will be higher than the standard value; tooth spacing deviation will cause the signal period to deviate from the theoretical period. The design logic of the traditional gear encoder is mostly based on the preset that "the gear disc is a standard part", which ultimately leads to the inconsistency between the position and speed data output by the gear encoder and the actual running state of the equipment, thereby causing equipment transmission impact, increased positioning deviation, increased running noise, and even affecting the completion of high-precision production tasks.
[0004] At present, the solutions to this problem in the industry all have obvious limitations: either the gear disc needs to be machined with high precision in advance, which will greatly increase the manufacturing cost of the gear disc; or the encoder parameters need to be calibrated manually on a regular basis, which cannot adapt to the dynamic error changes after the gear disc wears and has low calibration efficiency. SUMMARY
[0005] The main purpose of the present application is to provide an encoding signal generation method, device, equipment and storage medium, which aims to solve the technical problem of how to control the manufacturing cost of the gear disc while ensuring the long-term detection precision of the gear encoder.
[0006] To achieve the above-mentioned purpose, the present application provides an encoding signal generation method, which comprises:
[0007] monitoring the original encoding signal of the gear encoder and the current tooth number of the gear disc in the gear encoder;
[0008] determining the gear disc machining error value corresponding to the current tooth number;
[0009] error compensation is performed on the signal segment corresponding to the current tooth number in the original encoding signal according to the gear plate machining error value, to obtain the encoding signal of the gear encoder after error compensation.
[0010] In an embodiment, the step of error compensation on the signal segment corresponding to the current tooth number in the original encoding signal according to the gear plate machining error value comprises:
[0011] A compensation instruction is generated based on the gear plate machining error value, and time shift compensation is performed on the signal segment corresponding to the current tooth number in the original encoding signal according to the compensation instruction, wherein the time shift amount of time shift compensation is positively correlated with the absolute value of the gear plate machining error value.
[0012] In an embodiment, the gear plate machining error value comprises a tooth machining error value and a pitch machining error value, and the step of generating a compensation instruction based on the gear plate machining error value and performing time shift compensation on the signal segment corresponding to the current tooth number in the original encoding signal according to the compensation instruction comprises:
[0013] A first candidate compensation instruction is determined according to the tooth machining error value, wherein in the case that the actual size of the current tooth is greater than the standard size, the time shift compensation corresponding to the first candidate compensation instruction is delay compensation, and the delay amount of delay compensation is positively correlated with the tooth machining error value, and in the case that the actual size of the current tooth is less than the standard size, the time shift compensation corresponding to the first candidate compensation instruction is advance compensation, and the advance amount of advance compensation is negatively correlated with the tooth machining error value;
[0014] A second candidate compensation instruction is determined according to the pitch machining error value, wherein in the case that the actual pitch of the current tooth is less than the standard pitch, the time shift compensation corresponding to the second candidate compensation instruction is delay compensation, and the delay amount of delay compensation is negatively correlated with the pitch machining error value, and in the case that the actual pitch of the current tooth is greater than the standard pitch, the time shift compensation corresponding to the second candidate compensation instruction is advance compensation, and the advance amount of advance compensation is positively correlated with the pitch machining error value;
[0015] A fusion compensation instruction is generated based on the first candidate compensation instruction and the second candidate compensation instruction, and time shift compensation is performed on the signal segment corresponding to the current tooth number in the original encoding signal according to the fusion compensation instruction.
[0016] In an embodiment, the step of determining the gear plate machining error value corresponding to the current tooth number comprises:
[0017] According to the current tooth number, a machining error mapping table corresponding to the gear encoder is queried to obtain a reference gear disc machining error value in the machining error mapping table, so as to take the reference gear disc machining error value as a gear disc machining error value corresponding to the current tooth number.
[0018] In an embodiment, the current tooth number is monitored by a magnetic sensor in the gear encoder, the reference gear disc machining error value includes a reference tooth machining error value and a reference pitch machining error value, and the encoding signal generation method further includes:
[0019] A chord wave signal of the magnetic sensor in the gear encoder is obtained, and a peak value, a valley value and a frequency in each chord wave period in the chord wave signal are determined, wherein one chord wave period corresponds to a movement process of one tooth in the gear disc.
[0020] For any one chord wave period, a peak-valley difference value of the chord wave period is determined according to the peak value and the valley value of the chord wave period.
[0021] According to the peak-valley difference value, a reference tooth machining error value corresponding to the chord wave period is determined.
[0022] According to the frequency of the chord wave period, a reference pitch machining error value corresponding to the chord wave period is determined.
[0023] After traversing each chord wave period, tooth numbers of each chord wave period are numbered, and the tooth numbers, the reference tooth machining error and the reference pitch machining error of each chord wave period are associated and saved to obtain a machining error mapping table corresponding to the gear encoder.
[0024] In an embodiment, the chord wave signal is a chord wave signal after the gear disc rotates a preset number of turns, and the step of determining the peak value, the valley value and the frequency in each chord wave period in the chord wave signal includes:
[0025] The candidate peak value, the candidate valley value and the candidate frequency in each sub-chord wave period of each sub-chord wave signal in the chord wave signal are determined, wherein the sub-chord wave signal is a chord wave signal obtained after the gear disc rotates any one of the preset number of turns, and one sub-chord wave period corresponds to a movement process of one tooth in the gear disc.
[0026] For any one tooth, after traversing each sub-chord wave signal, an average peak value is determined based on each candidate peak value corresponding to the tooth, an average valley value is determined based on each candidate valley value corresponding to the tooth, and an average frequency is determined based on each candidate frequency corresponding to the tooth, as the peak value, the valley value and the frequency in each chord wave period in the chord wave signal.
[0027] In an embodiment, after the step of obtaining the chord wave signal of the magnetic sensor in the gear encoder, the method further includes:
[0028] filtering the chord wave signal to perform the determining the peak value, the valley value and the frequency in each chord wave period in the chord wave signal based on the filtered chord wave signal.
[0029] In addition, to achieve the above object, the present application also provides an encoding signal generation device, which comprises:
[0030] an encoding monitoring module, configured to monitor an original encoding signal of a gear encoder and a current tooth number of a gear disc in the gear encoder;
[0031] an error determining module, configured to determine a gear disc machining error value corresponding to the current tooth number;
[0032] an error compensation module, configured to perform error compensation on a signal segment corresponding to the current tooth number in the original encoding signal according to the gear disc machining error value, to obtain an encoding signal of the gear encoder after error compensation.
[0033] In addition, to achieve the above object, the present application also provides an electronic device, which comprises a memory, a processor and a computer program stored in the memory and executable on the processor, and the computer program is configured to implement the steps of the encoding signal generation method as described above.
[0034] In addition, to achieve the above object, the present application also provides a storage medium, which is a computer readable storage medium, and a computer program is stored on the storage medium, and the computer program is executed by a processor to implement the steps of the encoding signal generation method as described above.
[0035] The one or more technical solutions provided by the present application have at least the following technical effects:
[0036] The present application monitors the original encoding signal of the gear encoder and the current tooth number of the gear disc in the gear encoder, determines the gear disc machining error value corresponding to the current tooth number, and then performs error compensation on the corresponding signal segment in the original encoding signal according to the gear disc machining error value, thereby realizing the individual machining error compensation of each tooth in the gear encoder, significantly improving the output accuracy of the gear encoder, avoiding the distortion of the detection signal caused by the machining error of the gear disc, and without relying on high-precision gear disc machining or manual intervention, reducing the cost and improving the adaptability and real-time performance of the device. BRIEF DESCRIPTION OF DRAWINGS
[0037] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and serve to explain the principles of the present application together with the specification.
[0038] In order to more clearly illustrate the technical solutions of the embodiments of the present application or the prior art, the accompanying drawings needed to be used in the embodiments or prior art description will be briefly introduced as follows. Obviously, the drawings can also provide further understanding of the prior art for those of ordinary skill in the art without any creative effort.
[0039] Figure 1 The flowchart provided for the coding signal generation method of the first embodiment of the present application;
[0040] Figure 2 The flowchart provided for the coding signal generation method of the second embodiment of the present application;
[0041] Figure 3 The brief flowchart of the coding signal generation method provided for the second embodiment of the present application;
[0042] Figure 4 The module structure diagram of the coding signal generation device of the embodiment of the present application;
[0043] Figure 5 The device structure diagram of the hardware running environment involved in the coding signal generation method of the embodiment of the present application.
[0044] The purpose of the present application, the functional characteristics and the advantages will be further explained in combination with the embodiments and the accompanying drawings. DETAILED DESCRIPTION
[0045] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application, and are not used to limit the present application.
[0046] In order to better understand the technical solutions of the present application, the specific embodiments will be described in detail in combination with the drawings of the specification and the specific embodiments.
[0047] The main solution of the embodiment of the present application is: monitoring the original coding signal of the gear encoder and the current tooth number of the gear disc in the gear encoder; determining the gear disc machining error value corresponding to the current tooth number; according to the gear disc machining error value, the signal segment corresponding to the current tooth number in the original coding signal is compensated for error, and the coding signal of the gear encoder after error compensation is obtained.
[0048] Due to the influence of factors such as machining equipment precision limitation, tool normal wear, material deformation after heat treatment, and assembly deviation, etc. during the machining and use of the gear disc of the gear encoder, various machining errors will inevitably occur in the shape of the gear disc, which will directly cause the detection signal of the gear encoder to be distorted. The design logic of the traditional gear encoder is mostly based on the preset that the gear disc is a standard part, which finally leads to the inconsistency between the position and speed data output by the gear encoder and the actual running state of the equipment, thereby causing the transmission impact of the equipment, the increase of positioning deviation, the increase of running noise, and even affecting the completion of high-precision production tasks. At present, the solutions to this problem in the industry all have obvious limitations: either high-precision grinding of the gear disc is required in advance, which will greatly increase the manufacturing cost of the gear disc, or the encoder parameters need to be calibrated manually on a regular basis, but this cannot adapt to the dynamic error changes after the wear of the gear disc, and the calibration efficiency is low.
[0049] The present application provides a solution by monitoring the original encoding signal of the gear encoder and the current tooth number of the gear disc in the gear encoder, determining the gear disc machining error value corresponding to the current tooth number, and then compensating the corresponding signal segment in the original encoding signal according to the gear disc machining error value, thereby realizing the individual machining error compensation of each tooth in the gear encoder, significantly improving the output accuracy of the gear encoder, avoiding the distortion of the detection signal caused by the machining error of the gear disc, and without relying on high-precision gear disc machining or manual intervention, reducing the cost and improving the adaptability and real-time performance of the equipment.
[0050] It should be noted that the execution subject of the present embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions. The present embodiment and the following embodiments will be described below with the electronic device as an example.
[0051] Based on this, the present application provides an encoding signal generation method, which is described with reference to Figure 1 , Figure 1 The flowchart of the first embodiment of the encoding signal generation method of the present application is shown in the figure.
[0052] In the present embodiment, the encoding signal generation method comprises steps S10-S30:
[0053] Step S10, monitoring the original encoding signal of the gear encoder and the current tooth number of the gear disc in the gear encoder;
[0054] It should be noted that the original encoding signal of the gear encoder is the original electrical signal directly detected and output by the magnetic sensor in the gear encoder without any error compensation processing, which directly reflects the true physical characteristics of each tooth (including the tooth top and tooth root) passing through the sensor on the gear disc, but due to the machining error and installation error of the gear disc, the signal often deviates from the ideal standard signal in amplitude, period or phase; the current tooth number is a unique and sequentially arranged identification number assigned to each tooth on the gear disc, which is used to identify and track in real time which specific tooth is currently facing the magnetic sensor to generate a signal during the rotation of the gear disc through the counting or positioning function of the gear encoder, or through the reference tooth positioning of the gear disc, thereby realizing individual identification and positioning of each tooth.
[0055] It can be understood that since the encoding signal generated by the gear encoder in actual work is directly affected by the individual machining error of each specific tooth, and in order to carry out targeted compensation, the most basic and untreated signal must be obtained and the identity of the tooth corresponding to the signal must be determined, so step S10 is performed to obtain the original encoding signal and the current tooth number in real time and synchronously, thereby associating the abstract encoding signal with the specific and identifiable physical tooth on the gear disc, avoiding the problem that all teeth are regarded as an ideal unified body in the traditional method and the specific source of signal distortion cannot be traced, laying a data foundation for realizing accurate error compensation based on each individual tooth, and realizing accurate association of the signal source and the error source.
[0056] Step S20, determining the gear disc machining error value corresponding to the current tooth number;
[0057] It should be noted that the gear disc machining error value corresponding to the current tooth number refers to the quantitative error data directly associated with the specific tooth specified by the current tooth number, which is obtained and stored through a measurement or learning process in advance, and the value represents the degree of signal distortion caused by the individual machining defects (such as irregular tooth shape, tooth spacing deviation, etc.) of the specific tooth, and is the basis for subsequent targeted compensation.
[0058] It can be understood that since the machining errors of different teeth are independent and specific, a general compensation value cannot effectively correct the unique error of each tooth, so step S20 is performed to query or call the special gear disc machining error value determined and stored for the specific tooth based on the current tooth number as an index, thereby changing the compensation operation from a general compensation value to a specific compensation value for each tooth, avoiding the problem of residual error or overcompensation caused by using a single compensation parameter to roughly correct all teeth, and realizing accurate error quantification basis for subsequent compensation.
[0059] Exemplarily, the machining error mapping table can be pre-stored in the memory of the gear encoder. The mapping table is calibrated by a precision measuring instrument before the gear encoder is shipped or initially enabled, and the mapping relationship between the tooth number and the corresponding error value is established. In real-time operation, when the current tooth number is monitored, the processor can directly obtain the pre-stored machining error value of the gear plate corresponding to the number by querying the mapping table, so as to determine the machining error value of the gear plate corresponding to the current tooth number.
[0060] In a possible implementation, step S20 can include step S21:
[0061] In step S21, a reference gear plate machining error value in the machining error mapping table is obtained by querying the machining error mapping table corresponding to the gear encoder according to the current tooth number, so as to take the reference gear plate machining error value as the machining error value of the gear plate corresponding to the current tooth number.
[0062] It should be noted that the machining error mapping table refers to a data structure pre-created and stored in the gear encoder or the associated control system. The table takes the unique number of each tooth on the gear plate as an index key, and systematically associates each tooth number with one or more measured or calculated gear plate machining error values, thereby constituting a tooth error database for real-time query. By querying the mapping table, the system can quickly retrieve the historical measurement error data corresponding to any specified tooth number.
[0063] The reference gear plate machining error value is the numerical error information stored in the above machining error mapping table and bound to a specific tooth number as a compensation reference. The value represents the machining error quantization result obtained and recorded for the specific tooth by analyzing the magnetic sensor signal or other measurement means before the encoder is formally put into operation, for example, during the factory debugging or initial installation self-learning stage. In real-time compensation, the pre-stored value is called out as the compensation basis for the current tooth.
[0064] Exemplarily, a machining error mapping table established through an initial self-learning process is pre-stored in the non-volatile memory of the gear encoder control unit. The mapping table records the tooth number of each tooth on the gear plate and the corresponding reference gear plate machining error value. In real-time operation, when the current tooth number is monitored, the processor of the control unit performs a table lookup operation, takes the current tooth number as an index key, quickly retrieves and reads the corresponding reference gear plate machining error value from the machining error mapping table, and directly takes this value as the machining error value of the gear plate that needs to be compensated for, thereby providing an accurate data basis for the subsequent error compensation step.
[0065] In this embodiment, by querying the preset machining error mapping table according to the current tooth number to directly obtain the reference gear disc machining error value as the gear disc machining error value corresponding to the current tooth number, the processing delay, high calculation resource occupation, and unstable compensation reference caused by real-time measurement condition fluctuation due to the need for real-time calculation or measurement of the gear disc machining error in each working cycle of the gear encoder are avoided, and stable and reliable tooth individualization error data can be obtained at extremely fast speed and extremely low calculation cost, thereby ensuring the efficiency and consistency of the error compensation process.
[0066] In step S30, the signal segment corresponding to the current tooth number in the original encoding signal is compensated for error according to the gear disc machining error value, and an encoding signal of the gear encoder after error compensation is obtained.
[0067] It should be noted that the original encoding signal is composed of signal segments generated by each tooth in the gear disc; the encoding signal of the gear encoder after error compensation refers to the final output signal that is corrected for distortion caused by the machining error of the specific tooth after specific mathematical or logical operations (such as time shift, amplitude adjustment, etc.) on the original encoding signal according to the gear disc machining error value corresponding to the current tooth number, which is closer to the theoretical signal of the gear disc in the ideal error-free state, thereby significantly improving the accuracy of the output position and speed data of the gear encoder.
[0068] It can be understood that since the original encoding signal contains distortion components introduced by tooth machining errors, direct use will lead to a decrease in control accuracy, so step S30 is performed to perform real-time mathematical operations or logical adjustments such as time shift, amplitude correction, etc. on the original encoding signal using a specific gear disc machining error value as the compensation amount, thereby actively canceling the error components in the signal, avoiding the problems of device positioning deviation and transmission impact caused by directly outputting the original signal containing errors to the motion controller, and ultimately obtaining a high-precision encoding signal that is closer to the ideal state of the gear disc and can truly reflect the actual running position and speed of the device, thereby improving the overall control accuracy and stability of the system.
[0069] For example, the processor substitutes the obtained gear disc machining error value into a predefined compensation function to calculate a time shift amount that needs to be compensated for phase, which can be positive or negative, representing delay or advance, respectively; then, the waveform of the corresponding signal segment in the original encoding signal is shifted on the time axis, i.e., the phase of the signal is adjusted through digital signal processing technology, thereby generating an encoding signal of the gear encoder after error compensation that has been corrected in the time dimension.
[0070] In an implementable embodiment, step S30 can include step S31:
[0071] Step S31, generating a compensation instruction based on the gear plate machining error value, and performing time shift compensation on the signal segment corresponding to the current tooth number in the original encoding signal according to the compensation instruction, wherein the time shift amount of the time shift compensation is positively correlated with the absolute value of the gear plate machining error value.
[0072] It should be noted that the compensation instruction is a control signal or data command generated by the processor based on the gear plate machining error value. The instruction specifically includes the operation type (such as delay or advance) and the specific time shift amount value required for time shift compensation of the original encoding signal, and its function is to accurately guide the signal processing unit to adjust the phase of the original encoding signal on the time axis to offset the periodic deviation of the signal caused by the gear plate machining error.
[0073] As an example, the gear plate machining error value includes a tooth machining error value and a pitch machining error value, and step S31 can include steps S311-S313:
[0074] Step S311, determining a first candidate compensation instruction according to the tooth machining error value, wherein in the case that the actual size of the current tooth is greater than the standard size, the time shift compensation corresponding to the first candidate compensation instruction is delay compensation, and the delay amount of the delay compensation is positively correlated with the tooth machining error value; in the case that the actual size of the current tooth is less than the standard size, the time shift compensation corresponding to the first candidate compensation instruction is advance compensation, and the advance amount of the advance compensation is negatively correlated with the tooth machining error value;
[0075] It should be noted that the first candidate compensation instruction refers to a preliminary compensation instruction specially generated for the tooth size machining error (i.e., the tooth machining error value), which contains the time shift compensation type (delay compensation or advance compensation) determined based on the deviation (oversize or undersize) of the actual size of the current tooth from the standard size and the preliminary time shift amount. Among them, the standard size is an ideal reference value, which is used as a benchmark for measuring the actual tooth machining error; delay compensation is a specific operation mode of time shift compensation, which means that the waveform of the current tooth corresponding period in the original encoded signal is pushed back on the time axis by a certain amount of time, which is equivalent to increasing the phase delay of the signal, and is used to offset the influence of the early appearance of the signal peak value caused by the oversize of the tooth size or the undersize of the tooth pitch, and the delay amount refers to the specific time value or phase angle value of the original encoded signal pushed back on the time axis when performing delay compensation operation, which is in direct proportion to the absolute value of the gear plate machining error value (such as the positive tooth machining error value or the negative tooth pitch machining error value) that leads to the need for delay; advance compensation is a time shift compensation operation mode corresponding to delay compensation, which means that the waveform of the current tooth corresponding period in the original encoded signal is moved forward on the time axis by a certain amount of time, which is equivalent to reducing the phase delay of the signal (i.e., making its phase advance), and is used to offset the influence of the late appearance of the signal peak value caused by the undersize of the tooth size or the oversize of the tooth pitch.
[0076] In addition, it should be noted that if the calculation process of the tooth machining error value involves the subtraction of the standard tooth peak-to-valley value difference from the current tooth peak-to-valley value difference, when the tooth machining error value is positive, it indicates that the actual size of the current tooth is larger than the standard size; when the tooth machining error value is negative, it indicates that the actual size of the current tooth is smaller than the standard size; when the tooth machining error value is zero or within a preset fault tolerance size range, it indicates that the actual size of the current tooth is equal to the standard size, and the generation of the first candidate compensation instruction is cancelled.
[0077] It can be understood that since the size error of the tooth itself (such as the tip of the tooth being too sharp or too round) will directly change the rate of change of the magnetic flux sensed by the magnetic sensor, causing the signal peak value to shift relative to the ideal position (e.g., the tooth is oversize, the peak value is detected early, and the tooth is undersize, the peak value is detected late), and a single type of time shift compensation cannot cope with both of these opposite situations, therefore by selecting the compensation direction (i.e., delay compensation or advance compensation) according to the positive or negative sign of the tooth machining error value (indicating oversize or undersize), and making the time shift amount positively related to the error value, the signal peak time deviation caused by the tooth shape error is compensated in a directional and quantitative manner, avoiding the possibility of exacerbating the error of some tooth signals by using a fixed compensation direction, achieving precise correction of the individual shape error of the tooth, and improving the accuracy of the peak detection time.
[0078] Exemplarily, the tooth processing error value is calculated according to the formula: tooth processing error value = (current tooth peak-to-valley value difference - standard tooth peak-to-valley value difference) / standard tooth peak-to-valley value difference x 100%, wherein the peak value and the valley value are absolute values in the determination of the current tooth peak-to-valley value difference and the standard tooth peak-to-valley value difference. If the calculation result is a positive value, it indicates that the actual size of the current tooth is greater than the standard tooth size; if it is a negative value, it indicates that the actual size of the current tooth is less than the standard tooth size.
[0079] In step S312, a second candidate compensation instruction is determined according to the tooth pitch processing error value. If the actual tooth pitch of the current tooth is less than the standard tooth pitch, the time shift compensation corresponding to the second candidate compensation instruction is delay compensation, and the delay amount of the delay compensation is negatively correlated with the tooth pitch processing error value. If the actual tooth pitch of the current tooth is greater than the standard tooth pitch, the time shift compensation corresponding to the second candidate compensation instruction is advance compensation, and the advance amount of the advance compensation is positively correlated with the tooth pitch processing error value.
[0080] It should be noted that the second candidate compensation instruction refers to another preliminary compensation instruction specially generated for the tooth pitch interval processing error (i.e. the tooth pitch processing error value). The instruction includes the type of time shift compensation (delay compensation or advance compensation) determined based on the deviation (deviation or deviation) of the actual tooth pitch (i.e. the interval between the current tooth and the previous tooth) from the standard tooth pitch, and the preliminary time shift amount.
[0081] In addition, it should be noted that if the tooth pitch processing error value involves the current tooth pitch chord wave frequency minus the standard tooth pitch chord wave frequency in the calculation process, when the tooth pitch processing error value is negative, it indicates that the actual tooth pitch of the current tooth is less than the standard tooth pitch; when the tooth pitch processing error value is positive, it indicates that the actual tooth pitch of the current tooth is less than the standard tooth pitch; when the tooth pitch processing error value is zero or within a preset fault tolerance tooth pitch range, it indicates that the actual tooth pitch of the current tooth is equal to the standard tooth pitch, and the second candidate compensation instruction is cancelled.
[0082] It can be understood that since the tooth pitch error changes the time length of each tooth signal period, causing the actual interval of the signal zero-crossing point or feature point to deviate from the theoretical interval, thereby causing periodic timing cumulative error, therefore, the compensation direction is determined according to the tooth pitch processing error value (indicating the deviation of the current tooth pitch from the standard value), i.e. the actual tooth pitch is less than the standard tooth pitch, which needs to be delayed to wait for the end of the signal period, and the actual tooth pitch is greater than the standard tooth pitch, which needs to be advanced to approach the period, so that the compensation operation can dynamically adapt to the change of each tooth interval, avoiding the cumulative error of the encoder output signal period and the position integral error caused by the uneven tooth pitch, and significantly improving the measurement accuracy of the gear disc rotation angle speed, ensuring the consistency of the signal period.
[0083] Exemplarily, the tooth pitch processing error value is calculated according to a formula: tooth pitch processing error value = current tooth pitch chord wave frequency - standard tooth pitch chord wave frequency. If the calculation result is a positive value, it indicates that the current tooth pitch is smaller than the standard tooth pitch; if the calculation result is a negative value, it indicates that the current tooth pitch is larger than the standard tooth pitch.
[0084] In step S313, a fusion compensation instruction is generated based on the first candidate compensation instruction and the second candidate compensation instruction, and a time shift compensation is performed on the signal segment corresponding to the current tooth number in the original coded signal according to the fusion compensation instruction.
[0085] It should be noted that the fusion compensation quality refers to the comprehensive operation of the time shift compensation type and the time shift amount information contained in the first candidate compensation instruction for the tooth size error and the second candidate compensation instruction for the tooth pitch interval error, for example, the final and unified compensation instruction generated by algebraically adding the time shift amounts corresponding to the two instructions, which is used to guide the composite time shift compensation operation for simultaneously correcting the two errors once.
[0086] It can be understood that, since the tooth size error and the tooth pitch error often coexist in actual gear disc processing and the effects on the signal timing are coupled with each other, if only one of the errors is compensated, the other error will still cause signal distortion. Therefore, the first candidate compensation instruction for the tooth profile error and the second candidate compensation instruction for the tooth pitch error are fused, for example, the net time shift amount is generated by algebraically adding the time shift amounts corresponding to the two instructions, so as to generate a unified fusion compensation instruction, which simultaneously corrects the comprehensive effects of the two error sources on the signal through one composite time shift compensation operation, avoids the problems of incomplete compensation, mutual offset of compensation effects and even introduction of new errors caused by step-by-step compensation or selective compensation, realizes integrated and high-precision correction of the comprehensive processing error of the gear disc, and thus generates a coded signal closer to the output signal of the ideal gear disc.
[0087] In the embodiment, the specific compensation instruction is generated based on the gear disc processing error value, and the time shift compensation is performed on the original coded signal according to the instruction, and the time shift amount is positively related to the absolute value, which avoids the mismatching of the compensation effect and the error size caused by only performing non-quantitative signal adjustment, realizes the conversion of the abstract error value into accurate time sequence adjustment operation, and thus can accurately offset the signal phase deviation caused by the gear disc processing error, and significantly improves the accuracy of the final coded signal in time sequence.
[0088] The embodiment provides a kind of encoding signal generation method, by adopting the original encoding signal of monitoring gear encoder and the current tooth number of gear disc in gear encoder, and determine the gear disc machining error value corresponding to current tooth number, further according to gear disc machining error value to original encoding signal corresponding signal segment is compensated for error, thus realize the individual processing error of each tooth in gear encoder is compensated for specifically, to improve the output precision of gear encoder significantly, avoid the distortion of detection signal caused by gear disc machining error, simultaneously without relying on high-precision gear disc processing or manual intervention, reduce cost and improve the adaptability and real-time of equipment.
[0089] Based on the first embodiment of the present application, the same or similar content as the above embodiment one can be referred to the above introduction, and will not be described in detail hereinafter. Figure 2 , the current tooth number is monitored by the magnetic sensor in the gear encoder, the reference gear disc machining error value includes reference tooth machining error value and reference pitch machining error value, the encoding signal generation method further includes steps S01-S05:
[0090] Step S01, obtain the chord wave signal of the magnetic sensor in the gear encoder, and determine the peak value, valley value and frequency in each chord wave period in the chord wave signal, wherein one chord wave period corresponds to the movement process of one tooth in the gear disc.
[0091] It should be noted that the magnetic sensor is installed on the outside of the gear disc, and the detection surface keeps a fixed distance from the tooth top and tooth root movement track to ensure that the magnetic sensor can stably collect the magnetic field change signal generated when each gear tooth passes through and convert the signal into an electrical signal for transmission. The electrical signal needs to be amplified by a fixed multiple to ensure that the amplification ratio of the gear disc magnetic field signal is consistent during detection, avoiding signal distortion caused by fluctuation of amplification multiple, laying a foundation for accurate collection of gear disc chord wave signal.
[0092] In addition, it should be noted that one chord wave period corresponds to one signal segment in the above original encoding signal.
[0093] In addition, it should be noted that after the step of obtaining the chord wave signal of the magnetic sensor in the gear encoder in step S01, step S100 can also be included:
[0094] Step S100, filter processing is carried out on the chord wave signal, to execute the step of determining the peak value, valley value and frequency in each chord wave period in the chord wave signal based on the filtered chord wave signal.
[0095] It should be noted that the filtering process in the embodiment can adopt low-pass filtering or Kalman filtering to filter out environmental electromagnetic interference and magnetic sensor noise. In the low-pass filtering process, the cutoff frequency is 2-3 times the highest speed corresponding to the chord wave frequency of the gear plate.
[0096] It can be understood that due to the inevitable mixing of environmental electromagnetic interference and other noise in the original chord wave signal collected by the magnetic sensor, if the characteristic parameters such as peak value and valley value are directly calculated based on the signal containing noise, the accuracy of the reference gear plate machining error value determined subsequently will be significantly reduced. Therefore, by filtering the chord wave signal to suppress noise before calculating the signal characteristics, the detection deviation of peak and valley values caused by noise interference can be avoided, and the machining error mapping table established will also contain errors, thereby improving the accuracy and reliability of the basic data obtained in the self-learning process, and finally ensuring the error compensation effect.
[0097] In a feasible embodiment, the chord wave signal is a chord wave signal after the gear plate rotates a preset number of turns. The step of determining the peak value, valley value, and frequency in each chord wave period in the chord wave signal in step S01 can include steps S011-S012.
[0098] Step S011, determining candidate peak values, candidate valley values, and candidate frequencies in each sub-chord wave period of each sub-chord wave signal in the chord wave signal, wherein the sub-chord wave signal is a chord wave signal obtained after the gear plate rotates any one of the preset number of turns, and one sub-chord wave period corresponds to the movement process of one tooth in the gear plate.
[0099] It should be noted that the sub-chord wave signal refers to a piece of independent and complete periodic electrical signal collected by the magnetic sensor after the gear plate completes a single rotation in the preset number of rotations. The signal contains continuous waveforms generated when all the teeth on the gear plate in the rotation pass through the sensor one by one, and is the basic unit of multi-turn data collection.
[0100] A candidate peak value is a maximum voltage or current value on a waveform of a sub-chord wave cycle corresponding to a certain tooth movement process in a sub-chord wave signal, which is identified by real-time detection and is one of the raw data points for calculating the final characteristic value (i.e. average peak value) of the tooth. A candidate valley value is a minimum voltage or current value on a waveform of a sub-chord wave cycle corresponding to a certain tooth movement process in a sub-chord wave signal, which is identified by real-time detection and is one of the raw data points for calculating the final characteristic value (i.e. average valley value) of the tooth. A candidate frequency is the instantaneous frequency (or reciprocal period) of a certain tooth in a single rotation, which is calculated based on the duration of a sub-chord wave cycle corresponding to a certain tooth movement process in a sub-chord wave signal, and is one of the raw data points for calculating the final characteristic value (i.e. average frequency) of the tooth.
[0101] In step S012, for any tooth, after traversing all sub-chord wave signals, the average peak value is determined based on the candidate peak values corresponding to the tooth, the average valley value is determined based on the candidate valley values corresponding to the tooth, and the average frequency is determined based on the candidate frequencies corresponding to the tooth, as the peak value, valley value and frequency in each chord wave cycle in the chord wave signal.
[0102] It can be understood that, since the chord wave signal collected in a single rotation may be affected by instantaneous interference or random fluctuations, resulting in occasional errors in the candidate peak value, candidate valley value and candidate frequency determined based on a single measurement, by rotating the gear plate for multiple rotations to obtain multiple sub-chord wave signals, and averaging the candidate characteristic values corresponding to the same tooth in multiple rotations to obtain more representative average peak value, average valley value and average frequency, the problem of random error amplification when establishing an error mapping table based on noisy data in a single rotation can be avoided, thereby improving the stability and reliability of the obtained tooth characteristic parameters and the reference machining error values calculated subsequently, and further enhancing the robustness of the entire compensation system.
[0103] For example, during the rotation of the gear plate for a predetermined number of rotations (e.g. 3-5 rotations), the digital signal processor or microcontroller in the control unit records the corresponding sub-chord wave signal for each rotation, and performs real-time analysis on each sub-chord wave signal to extract the candidate peak value, candidate valley value and candidate frequency corresponding to each tooth number and temporarily store them. After the gear plate completes the rotation for the predetermined number of rotations, the processor calculates the average peak value of each unique tooth number by performing arithmetic average calculation on the multiple candidate peak values corresponding to the tooth in all rotations, and similarly calculates the average valley value and average frequency. Finally, these average values are used as the most representative characteristic parameters of the tooth for subsequent construction of a high-precision machining error mapping table.
[0104] In this embodiment, by rotating the gear plate for multiple turns to obtain multiple sub-chord wave signals, and averaging the multiple candidate peak values, candidate valley values and candidate frequencies corresponding to the same tooth in each turn to obtain more statistically representative characteristic values, the problem of accidental error of tooth characteristic parameters caused by instantaneous interference or random fluctuations based on single-turn measurement data is avoided, thereby improving the accuracy and reliability of the reference error data in the subsequently established machining error mapping table, and enhancing the anti-interference ability and long-term stability of the entire coding signal compensation system.
[0105] In step S02, for any chord wave period, the peak-valley difference of the chord wave period is determined according to the peak and valley of the chord wave period.
[0106] In step S03, the reference tooth machining error value corresponding to the chord wave period is determined according to the peak-valley difference.
[0107] It should be noted that the reference tooth machining error value is calculated by analyzing the difference between the peak and valley in a chord wave period of the chord wave signal output by the magnetic sensor, i.e., the peak-valley difference, and the deviation of the difference from the ideal standard signal, and is a quantitative value used to represent the tooth shape size machining deviation of a specific tooth corresponding to the chord wave period. This value reflects the abnormality of the magnetic flux variation amplitude caused by the irregular tooth shape, and is a direct basis for subsequent amplitude or timing compensation of the tooth signal.
[0108] For example, the reference tooth machining error value is calculated according to the formula: reference tooth machining error value=(peak-valley difference-standard tooth peak-valley difference) / standard tooth peak-valley difference*100%, wherein the peak and valley are absolute values in the determination of the peak-valley difference and the standard tooth peak-valley difference.
[0109] In step S04, the reference tooth spacing machining error value corresponding to the chord wave period is determined according to the frequency of the chord wave period.
[0110] It should be noted that the reference tooth spacing machining error value is calculated by analyzing the frequency of the chord wave signal output by the magnetic sensor, and the deviation of the frequency from the ideal standard frequency, and is a quantitative value used to represent the spacing machining deviation between the tooth corresponding to the chord wave period and the previous tooth. This value reflects the change in signal period length caused by uneven tooth spacing, and is a direct basis for subsequent period or phase compensation of the tooth signal.
[0111] For example, the tooth spacing machining error is calculated according to the formula: reference tooth spacing machining error value=frequency of chord wave period-standard tooth spacing chord wave frequency.
[0112] Step S05, after traversing each chord wave period, tooth numbering is performed on each chord wave period, and the tooth numbering, reference tooth machining error and reference tooth pitch machining error of each chord wave period are associated and saved to obtain a machining error mapping table corresponding to the gear encoder.
[0113] It should be noted that when tooth numbering is performed on each chord wave period, a reference tooth on the gear disc can be used as the starting number, wherein the reference tooth is the tooth of the AB signal gear disc corresponding to the Z signal gear disc, and the numbering is sequentially increased in the clockwise direction of the gear disc rotation. Specifically, a specific reference tooth (for example, a certain designated tooth on the AB signal gear disc synchronized with the Z signal used to provide zero reference) on the gear disc is taken as the physical starting point, the first chord wave period corresponding to the reference tooth is numbered as 1, and then the tooth numbering of each subsequent chord wave period is sequentially assigned an increasing number (2, 3, 4... up to the total number of teeth of the gear disc) according to the clockwise direction of the gear disc rotation, thereby establishing a unique and ordered identification for each tooth on the gear disc. The AB signal is a basic pulse signal with a phase difference of 90 degrees, which is used to determine the relative displacement of the shaft by pulse counting and the rotation direction by phase difference; and the Z signal is a zero reference signal generated by the gear disc every rotation, which is used to determine the absolute position reference point of the shaft, thereby zeroing or correcting the count to prevent error accumulation.
[0114] In this embodiment, by obtaining the chord wave signal of the magnetic sensor in the gear encoder, and analyzing the peak-valley value difference and frequency of each chord wave period to calculate and associate the reference tooth machining error value and the reference tooth pitch machining error value corresponding to each tooth number respectively, a machining error mapping table is autonomously established, thereby avoiding the problems of high cost, low efficiency and inability to dynamically adapt to individual errors of the gear disc caused by the dependence of the traditional scheme on high-precision gear disc processing or manual periodic calibration, and realizing that the encoder system can quickly self-learn and accurately master the individualized error distribution of a specific gear disc, providing a reliable data foundation for subsequent real-time and automatic high-precision error compensation, and significantly improving the adaptability of the equipment and reducing the use cost.
[0115] For the purpose of assisting understanding of the implementation process of the encoding signal generation method obtained after the above-mentioned embodiment one, an example is provided. Figure 3 , Figure 3 A brief flowchart of an encoding signal generation method is provided, specifically:
[0116] The encoding signal generation method of the embodiment includes two core stages. The first stage is a self-learning compensation stage. By rotating the gear plate for a preset number of turns, the chord wave signal of the magnetic sensor is collected, and the average value of the signal characteristics of each tooth is analyzed. The machining error value unique to each tooth is calculated, and a machining error mapping table is finally established. This stage provides accurate data basis for real-time compensation.
[0117] The second stage is a real-time error compensation cycle process. This stage continuously monitors the original encoding signal and the current tooth number. Then, according to the monitored tooth number, the machining error mapping table established in the first stage is queried to determine the machining error value of the gear plate corresponding to the current tooth number. Finally, error compensation is performed according to the error value to compensate and correct the original encoding signal. The final output encoding signal is the encoding signal of the error-compensated gear encoder. Through the self-learning and then compensation method, the individual error of each tooth is corrected, thereby achieving the effect of improving the output precision without the need for high-cost gear plates and manual calibration.
[0118] It should be noted that the above examples are only used to understand the present application and do not limit the encoding signal generation method of the present application. More forms of simple transformation based on this technical concept are within the protection scope of the present application.
[0119] The present application also provides an encoding signal generation device, which is described in detail with reference to Figure 4 The encoding signal generation device comprises:
[0120] An encoding monitoring module 10 is configured to monitor the original encoding signal of the gear encoder and the current tooth number of the gear plate in the gear encoder.
[0121] An error determination module 20 is configured to determine the machining error value of the gear plate corresponding to the current tooth number.
[0122] An error compensation module 30 is configured to perform error compensation on the signal segment corresponding to the current tooth number in the original encoding signal according to the machining error value of the gear plate, to obtain the encoding signal of the error-compensated gear encoder.
[0123] Optionally, the error compensation module 30 is further configured to:
[0124] generate a compensation instruction based on the machining error value of the gear plate, and perform time shift compensation on the signal segment corresponding to the current tooth number in the original encoding signal according to the compensation instruction, wherein the time shift amount of the time shift compensation is positively correlated with the absolute value of the machining error value of the gear plate.
[0125] Optionally, the machining error value of the gear plate includes a tooth machining error value and a pitch machining error value, and the error compensation module 30 is further configured to:
[0126] determine a first candidate compensation instruction according to the tooth processing error value, wherein in the case that the actual size of the current tooth is greater than the standard size, the time shift compensation corresponding to the first candidate compensation instruction is delay compensation, and the delay amount of the delay compensation is positively correlated with the tooth processing error value, and in the case that the actual size of the current tooth is less than the standard size, the time shift compensation corresponding to the first candidate compensation instruction is advance compensation, and the advance amount of the advance compensation is negatively correlated with the tooth processing error value;
[0127] determine a second candidate compensation instruction according to the tooth pitch processing error value, wherein in the case that the actual tooth pitch of the current tooth is less than the standard tooth pitch, the time shift compensation corresponding to the second candidate compensation instruction is delay compensation, and the delay amount of the delay compensation is negatively correlated with the tooth pitch processing error value, and in the case that the actual tooth pitch of the current tooth is greater than the standard tooth pitch, the time shift compensation corresponding to the second candidate compensation instruction is advance compensation, and the advance amount of the advance compensation is positively correlated with the tooth pitch processing error value;
[0128] generate a fusion compensation instruction based on the first candidate compensation instruction and the second candidate compensation instruction, and perform time shift compensation on the signal segment corresponding to the current tooth number in the original encoded signal according to the fusion compensation instruction.
[0129] Optionally, the error determination module 20 is further configured to:
[0130] query a processing error mapping table corresponding to the gear encoder according to the current tooth number to obtain a reference gear disc processing error value in the processing error mapping table, so as to take the reference gear disc processing error value as the gear disc processing error value corresponding to the current tooth number.
[0131] Optionally, the encoded signal generation device further comprises a self-learning compensation module 40, and the self-learning compensation module 40 is configured to:
[0132] obtain a chord wave signal of a magnetic sensor in the gear encoder, and determine a peak value, a valley value and a frequency in each chord wave period of the chord wave signal, wherein one chord wave period corresponds to a movement process of one tooth of the gear disc;
[0133] for any one chord wave period, determine a peak-valley difference value of the chord wave period according to the peak value and the valley value of the chord wave period;
[0134] determine a reference tooth processing error value corresponding to the chord wave period according to the peak-valley difference value;
[0135] determine a reference tooth pitch processing error value corresponding to the chord wave period according to the frequency of the chord wave period;
[0136] After traversing each string wave period, the teeth of each string wave period are numbered, and the tooth number, the reference tooth processing error and the reference tooth spacing processing error of each string wave period are associated and saved to obtain a processing error mapping table corresponding to the gear encoder.
[0137] Optionally, the string wave signal is a string wave signal after the gear disc rotates a preset number of turns, and the self-learning compensation module 40 is further configured to:
[0138] determine candidate peak values, candidate valley values and candidate frequencies in each sub-string wave period of each sub-string wave signal, wherein the sub-string wave signal is a string wave signal obtained after the gear disc rotates any one of the preset number of turns, and one sub-string wave period corresponds to the movement process of one tooth of the gear disc;
[0139] For any one tooth, after traversing each sub-string wave signal, the average peak value is determined based on each candidate peak value corresponding to the tooth, the average valley value is determined based on each candidate valley value corresponding to the tooth, and the average frequency is determined based on each candidate frequency corresponding to the tooth, as the peak value, the valley value and the frequency in each string wave period of the string wave signal.
[0140] Optionally, the self-learning compensation module 40 is further configured to:
[0141] filter processing the string wave signal to perform the step of determining the peak value, the valley value and the frequency in each string wave period of the string wave signal based on the filtered string wave signal.
[0142] The encoding signal generation device provided by the application adopts the encoding signal generation method in the above embodiments, which can solve the technical problem of how to control the cost of gear manufacturing while ensuring the long-term detection accuracy of the gear encoder. Compared with the prior art, the beneficial effects of the encoding signal generation device provided by the application are the same as those of the encoding signal generation method provided by the above embodiments, and the other technical features in the encoding signal generation device are the same as those disclosed in the above embodiments, which will not be repeated here.
[0143] The application provides an electronic device, which comprises at least one processor and a memory in communication connection with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the encoding signal generation method in the above embodiment one.
[0144] The following refers to Figure 5The diagram illustrates a structural schematic of an electronic device suitable for implementing embodiments of this application. The electronic devices in these embodiments may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 5 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0145] like Figure 5 As shown, the electronic device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory 1002 or a program loaded from a storage device 1003 into a random access memory 1004. The random access memory 1004 also stores various programs and data required for the operation of the electronic device. The processing unit 1001, the read-only memory 1002, and the random access memory 1004 are interconnected via a bus 1005. An input / output interface 1006 is also connected to the bus. Typically, the following systems can be connected to the input / output interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. The communication device 1009 allows the electronic device to communicate wirelessly or wiredly with other devices to exchange data. Although the diagrams show electronic devices with various systems, it should be understood that it is not required to implement or have all of the systems shown. More or fewer systems may be implemented alternatively.
[0146] In particular, according to embodiments of the present application, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, embodiments of the present application include a computer program product comprising a computer program carried on a computer readable medium, the computer program comprising program code for performing the methods illustrated by the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device 1003, or installed from a read-only memory 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the methods of the embodiments of the present application are performed.
[0147] The electronic device provided by the present application adopts the encoding signal generation method in the above-mentioned embodiments, and can solve the technical problem of how to control the manufacturing cost of the gear while ensuring the long-term detection accuracy of the gear encoder. Compared with the prior art, the electronic device provided by the present application has the same beneficial effects as the encoding signal generation method provided by the above-mentioned embodiments, and other technical features in the electronic device are the same as the features disclosed in the previous embodiment method, which will not be repeated here.
[0148] It should be understood that various parts of the present application can be realized by hardware, software, firmware or a combination thereof. In the description of the above-mentioned embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0149] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed by the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
[0150] The present application provides a computer readable storage medium having stored thereon computer readable program instructions (i.e. computer program) for performing the encoding signal generation method in the above-mentioned embodiments.
[0151] The computer readable storage medium provided in the present application may, for example, be a U disk, but is not limited to an electric, magnetic, optical, electromagnetic, infrared, or semiconductor system or device, or any combination of the above. More specific examples of the computer readable storage medium may include, but are not limited to, an electric connection with one or more conductive wires, a portable computer disk, a hard disk, a random access memory (RAM), a read only memory (ROM), an erasable programmable read only memory (EPROM or flash memory), an optical fiber, a portable compact disk read only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present embodiment, the computer readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system or device. The program code contained on the computer readable storage medium can be transmitted by any suitable medium, including but not limited to an electric wire, an optical cable, an RF (Radio Frequency), etc., or any suitable combination of the above.
[0152] The above computer readable storage medium may be contained in an electronic device, or may exist separately without being assembled into an electronic device.
[0153] The above computer readable storage medium carries one or more programs, which, when executed by an electronic device, cause the electronic device to: monitor a raw encoding signal of a gear encoder and a current tooth number of a gear disc in the gear encoder; determine a gear disc machining error value corresponding to the current tooth number; and perform error compensation on a signal segment corresponding to the current tooth number in the raw encoding signal according to the gear disc machining error value, to obtain an encoding signal of the gear encoder after error compensation.
[0154] Computer program code for carrying out operations of the present application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).
[0155] The computer program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks.
[0156] The modules involved in the embodiments of the present application can be implemented in software or hardware. In some cases, the names of the modules do not limit the modules themselves.
[0157] The readable storage medium provided by the present application is a computer readable storage medium, which stores computer readable program instructions (i.e. computer programs) for executing the above-mentioned encoding signal generation method, and can solve the technical problem of how to guarantee the long-term detection accuracy of the gear encoder while controlling the manufacturing cost of the gear. Compared with the prior art, the computer readable storage medium provided by the present application has the same beneficial effects as the encoding signal generation method provided by the above-mentioned embodiments, which will not be described here.
[0158] The above merely describes some embodiments of the present application, and does not limit the patent scope of the present application. Any equivalent structural transformation, direct / indirect application in other related technical fields, or the like, which is made based on the technical concept of the present application and the content of the specification and drawings, is included in the patent protection scope of the present application.
Claims
1. A method of encoding signal generation, characterized by, The encoding signal generation method comprises: monitoring the original encoding signal of the gear encoder and the current tooth number of the gear disc in the gear encoder; determining the tooth processing error value and the pitch processing error value corresponding to the current tooth number; determining the first candidate compensation instruction according to the tooth processing error value, wherein in the case that the actual size of the current tooth is greater than the standard size, the time shift compensation corresponding to the first candidate compensation instruction is delay compensation, and the delay amount of the delay compensation is positively related to the tooth processing error value; in the case that the actual size of the current tooth is less than the standard size, the time shift compensation corresponding to the first candidate compensation instruction is advance compensation, and the advance amount of the advance compensation is negatively related to the tooth processing error value; determining the second candidate compensation instruction according to the pitch processing error value, wherein in the case that the actual pitch of the current tooth is less than the standard pitch, the time shift compensation corresponding to the second candidate compensation instruction is delay compensation, and the delay amount of the delay compensation is negatively related to the pitch processing error value; in the case that the actual pitch of the current tooth is greater than the standard pitch, the time shift compensation corresponding to the second candidate compensation instruction is advance compensation, and the advance amount of the advance compensation is positively related to the pitch processing error value; generating a fusion compensation instruction based on the first candidate compensation instruction and the second candidate compensation instruction, and performing time shift compensation on the signal segment corresponding to the current tooth number in the original encoding signal according to the fusion compensation instruction.
2. The coded signal generating method of claim 1, wherein The step of determining the gear disc processing error value corresponding to the current tooth number comprises: querying the processing error mapping table corresponding to the gear encoder according to the current tooth number to obtain a reference gear disc processing error value in the processing error mapping table, so as to take the reference gear disc processing error value as the gear disc processing error value corresponding to the current tooth number.
3. The coded signal generating method of claim 2, wherein The current tooth number is monitored by a magnetic sensor in the gear encoder, the reference gear disc processing error value comprises a reference tooth processing error value and a reference pitch processing error value, and the encoding signal generation method further comprises: obtaining a string wave signal of the magnetic sensor in the gear encoder and determining the peak value, the valley value and the frequency in each string wave period of the string wave signal, wherein one string wave period corresponds to the movement process of one tooth of the gear disc; for any one string wave period, determining the peak-valley difference value of the string wave period according to the peak value and the valley value of the string wave period; determining the reference tooth processing error value corresponding to the string wave period according to the peak-valley difference value; determining the reference pitch processing error value corresponding to the string wave period according to the frequency of the string wave period; after traversing each string wave period, numbering the teeth of each string wave period, and associating and saving the tooth number, the reference tooth processing error and the reference pitch processing error of each string wave period to obtain the processing error mapping table corresponding to the gear encoder.
4. The coded signal generating method of claim 3, wherein The string wave signal is a string wave signal after the gear disc rotates a preset number of turns, and the step of determining the peak value, the valley value and the frequency in each string wave period of the string wave signal comprises: determining candidate peak values, candidate valley values and candidate frequencies in each partial chord wave period of each partial chord wave signal in the chord wave signal, wherein the partial chord wave signal is a chord wave signal obtained after the gear plate rotates any one of the preset number of turns, and one partial chord wave period corresponds to the movement process of one tooth in the gear plate; for any one tooth, after traversing each partial chord wave signal, determining an average peak value based on each candidate peak value corresponding to the tooth, determining an average valley value based on each candidate valley value corresponding to the tooth, and determining an average frequency based on each candidate frequency corresponding to the tooth, as the peak value, the valley value and the frequency in each chord wave period in the chord wave signal.
5. The coded signal generating method of claim 3, wherein After the step of obtaining the chord wave signal of the magnetic sensor in the gear encoder, the method further comprises: filtering the chord wave signal, so as to perform the step of determining the peak value, the valley value and the frequency in each chord wave period in the chord wave signal based on the filtered chord wave signal.
6. An encoded signal generating apparatus characterized by comprising: The encoding signal generation device comprises: an encoding monitoring module configured to monitor an original encoding signal of a gear encoder and a current tooth number of a gear plate in the gear encoder; an error determination module configured to determine a tooth machining error value and a pitch machining error value corresponding to the current tooth number; an error compensation module configured to determine a first candidate compensation instruction according to the tooth machining error value, wherein, in the case that the actual size of the current tooth is greater than the standard size, the time shift compensation corresponding to the first candidate compensation instruction is delay compensation, and the delay amount of the delay compensation is positively correlated with the tooth machining error value, in the case that the actual size of the current tooth is less than the standard size, the time shift compensation corresponding to the first candidate compensation instruction is advance compensation, and the advance amount of the advance compensation is negatively correlated with the tooth machining error value; determine a second candidate compensation instruction according to the pitch machining error value, wherein, in the case that the actual pitch of the current tooth is less than the standard pitch, the time shift compensation corresponding to the second candidate compensation instruction is delay compensation, and the delay amount of the delay compensation is negatively correlated with the pitch machining error value, in the case that the actual pitch of the current tooth is greater than the standard pitch, the time shift compensation corresponding to the second candidate compensation instruction is advance compensation, and the advance amount of the advance compensation is positively correlated with the pitch machining error value; generate a fusion compensation instruction based on the first candidate compensation instruction and the second candidate compensation instruction, and perform time shift compensation on a signal segment corresponding to the current tooth number in the original encoding signal according to the fusion compensation instruction.
7. An electronic device, comprising: The device comprises a memory, a processor and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the encoding signal generation method according to any one of claims 1 to 5.
8. A storage medium, characterized by The storage medium is a computer readable storage medium, and the storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the encoding signal generation method according to any one of claims 1 to 5.
Citation Information
Patent Citations
A harmonic decomposition-based on-machine pitch error compensation method for large gear hobbing
CN109277879A
Method and system for calibrating and compensating gear angle error by using incremental encoder
CN114562961A