Control method and system of magnetic scale control console, electronic device and storage medium
Through the cooperation of the laser interferometer and the magnetic scale, a calibration database is established and the fitting function is used, which solves the problem of low displacement accuracy of the magnetic scale console and improves the accuracy and efficiency of sensor calibration and quality inspection.
Patent Information
- Application Number
- CN202410088442.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-22
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2044-01-22
AI Technical Summary
The displacement accuracy of the magnetic scale console is poor, which affects the accuracy of sensor calibration and quality inspection.
By installing a laser interferometer in conjunction with a magnetic scale, displacement data is automatically collected to establish a calibration database, and the actual required displacement value is calculated using a fitting function (such as linear or parabolic fitting) to overcome displacement deviations and improve displacement accuracy.
Significantly improve the displacement accuracy and data collection efficiency of the magnetic scale console, ensuring the accuracy of sensor calibration and quality inspection.
Smart Images

Figure CN118068866B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of magnetic scale console calibration, and in particular to a control method for a magnetic scale console, a control system for a magnetic scale console, an electronic device and a storage medium. Background Art
[0002] In the sensor production process, the accuracy of sensor calibration and quality inspection is the basis for measuring whether the sensor can accurately detect the target position. The sensor needs to rely on the magnetic scale console for sensor calibration and quality inspection. The higher the accuracy of the moving position of the magnetic scale console, the higher the accuracy of calibration and quality inspection, and vice versa. However, in the related technology, the displacement accuracy of the magnetic scale console is poor. Summary of the invention
[0003] The present invention aims to solve or improve at least one of the above-mentioned technical problems.
[0004] To this end, a first object of the present invention is to provide a control method for a magnetic scale control console.
[0005] A second object of the present invention is to provide a control system for a magnetic scale control console.
[0006] A third object of the present invention is to provide an electronic device.
[0007] A fourth object of the present invention is to provide a storage medium.
[0008] To achieve the first objective of the present invention, the technical solution of the present invention provides a control method for a magnetic scale console, including: determining a target displacement value of the magnetic scale console; determining multiple first displacement values in a calibration database according to the target displacement value; determining multiple second displacement values corresponding to the multiple first displacement values in the calibration database according to the multiple first displacement values; determining a fitting function according to the multiple first displacement values and the multiple second displacement values; determining a third displacement value according to the target displacement value and the fitting function; and controlling the magnetic scale console to move according to the third displacement value.
[0009] The control method of the magnetic scale console provided by the present invention specifically includes: first determining the target displacement value of the magnetic scale console, wherein the target displacement value refers to the distance value between the current position of the magnetic scale console and the position to which the user wants the magnetic scale to move, and the distance value is the distance value displayed on the magnetic scale. The method for determining the magnetic scale console can be input by the user, or obtained through a device. Further, a plurality of first displacement values are determined in a calibration database according to the determined target displacement value, and a plurality of second displacement values corresponding to the plurality of first displacement values are determined in the calibration database according to the plurality of first displacement values. The calibration database includes a plurality of first displacement values and a plurality of second displacement values, and each first displacement value corresponds to a second displacement value, respectively. Further, the first displacement value is obtained by the magnetic scale in the magnetic scale console, and the second displacement value is obtained by a laser interferometer installed on the magnetic scale console. Specifically, firstly, a laser interferometer is installed on the magnetic scale console, and then the magnetic scale console is controlled to move, and the first displacement value on the magnetic scale and the second displacement value on the laser interferometer are collected during the movement. Since the first displacement value and the second displacement value are both displacement values of the magnetic scale console, but the positioning accuracy error of the magnetic scale is large, and the positioning accuracy of the laser interferometer is high, the second displacement value is essentially the displacement value after the first displacement value is calibrated, and finally a calibration database is established based on multiple first displacement values and multiple second displacement values. Since the first displacement value is the displacement value obtained by the magnetic scale, and the target displacement value is also the displacement value on the magnetic scale, multiple first displacement values corresponding to the target displacement value can be obtained in the calibration database through the target displacement value. Furthermore, since the first displacement value corresponds to the second displacement value one by one in the calibration database, multiple second displacement values corresponding to multiple first displacement values can be determined based on multiple first displacement values. Further, a fitting function is determined according to a plurality of first displacement values and a plurality of second displacement values. Specifically, the first displacement value can be used as the horizontal coordinate and the second displacement value can be used as the vertical coordinate. The corresponding plurality of first displacement values and a plurality of second displacement values can be represented in the plane coordinate system as the image of coordinate points, and then the functional relationship between the plurality of coordinate points, i.e., the fitting function, is determined according to the plurality of coordinate points. After obtaining the fitting function between the plurality of coordinate points, the third displacement value is determined according to the target displacement value and the fitting function. That is, the target displacement value is input into the fitting function as a variable, thereby obtaining the third displacement value, which is the displacement value after calibration of the target displacement value. Finally, the magnetic scale console is controlled to move according to the third displacement value, so that the magnetic scale console can accurately reach the position that the user wants the magnetic scale console to reach. The present invention first automatically obtains the second displacement value of the laser interferometer and the first displacement value of the magnetic scale, and then establishes a calibration database according to the first displacement value and the second displacement value, thereby greatly improving the efficiency and accuracy of data acquisition.Furthermore, a fitting function is determined according to the first displacement value and the second displacement value, and then the actual distance to be moved is calculated according to the fitting function and the target displacement value, thereby overcoming the problem of large displacement deviation of the magnetic scale console and improving the accuracy of displacement of the magnetic scale console.
[0010] In addition, the technical solution provided by the present invention may also have the following additional technical features:
[0011] In some technical solutions, optionally, the step of determining multiple first displacement values in a calibration database according to a target displacement value includes: determining a position of the target displacement value in the calibration database according to the target displacement value; and determining multiple first displacement values in the calibration database according to the position.
[0012] In the technical solution, the step of determining a plurality of first displacement values in a calibration database according to a target displacement value comprises: first, determining the position of the target displacement value in the calibration database according to the target displacement value, wherein the calibration database includes a first displacement value set, and the position of the target displacement value in the calibration database refers to the position of the target displacement value in the first displacement value set. The first displacement value set refers to a first displacement value set obtained by sorting a plurality of first displacement values, wherein the plurality of first displacement values in the first displacement value set are sorted from small to large, and then the position of the target displacement value in the first displacement value set is determined according to the size of the target displacement value. Further, after determining the position of the target displacement value, the plurality of first displacement values are determined according to the front-back relationship. That is to say, the plurality of first displacement values may be the first first displacement values of the target displacement value in the first displacement value set, the plurality of first displacement values may also be the last first displacement values of the target displacement value in the first displacement value set, and the plurality of first displacement values may also be the first first displacement values and the last first displacement values of the target displacement value in the first displacement value set. Specifically, when the target displacement value is 12, and the first displacement value set in the calibration database is: 0, 5, 10, 15, 20, 25 and 30, the position of the target displacement value is first determined to be the 4th in the first displacement value set, then the multiple first displacement values can be 10, 15, or 5, 10, 15, or 5, 10, 15, 20. By determining multiple first displacement values according to the position of the target displacement value in the calibration database, the functional relationship between the target displacement value and the third displacement value can be similar to the fitting function between the first displacement value and the second displacement value, and the third displacement value can be obtained according to the target displacement value and the fitting function, thereby further improving the accuracy of the displacement of the magnetic scale console.
[0013] In some technical schemes, optionally, before the step of determining the target displacement value of the magnetic scale console, the step includes: setting an interval distance value and a measuring range; controlling the magnetic scale console to move according to the measuring range, and obtaining a first displacement value collected by the magnetic scale and a second displacement value collected by the laser interferometer at each interval distance value; and establishing a calibration database based on multiple first displacement values and multiple second displacement values.
[0014] In the technical scheme, the step of determining the target displacement value of the magnetic scale console includes: a calibration database should be established before controlling the magnetic scale console to move, and the method of establishing the calibration database is: first, a laser interferometer is installed on the magnetic scale console, and the laser interferometer signal is debugged to be in an available state, and then the interval distance value and the range of the magnetic scale console are set, wherein, since the displacement value cannot be obtained continuously, the interval distance value is set, and the first displacement value on the magnetic scale and the second displacement value on the laser interferometer are obtained at each interval distance value. Furthermore, since the displacement of the magnetic scale console is limited, it is also necessary to set the range, that is, the displacement range of the magnetic scale console. Then the magnetic scale console is controlled to move according to the range, and the first displacement value collected by the magnetic scale and the second displacement value collected by the laser interferometer are obtained at each interval distance value. Specifically, first, the magnetic scale console is returned to zero, and the zero point data is saved after returning to zero. Then move the magnetic scale console backwards by the spacing distance value, save the second displacement value of the laser interferometer and the first displacement value of the magnetic scale when in place, repeat the above steps until the magnetic scale console moves to the full range and stops. Finally, establish a calibration database based on multiple one-to-one corresponding first displacement values and second displacement values. The present invention automatically collects the data of each calibration point within the range of the magnetic scale using a laser interferometer in conjunction with the magnetic scale, i.e., the first displacement value and the second displacement value, and then establishes a calibration database based on the multiple first displacement values and the multiple second displacement values, thereby shortening the time of the calibration process and improving the calibration efficiency.
[0015] In some technical schemes, optionally, the fitting function includes a linear fitting function or a parabola fitting function; when the fitting function is a linear fitting function, the formula of the fitting function is: Y1=K×X1+B, wherein, when the fitting function is determined according to multiple first displacement values and multiple second displacement values, Y1 is the second displacement value, X1 is the first displacement value, and K and B are determined by fitting calculation based on the first displacement value and the second displacement value; when the third displacement value is determined according to the target displacement value and the fitting function, Y1 is the third displacement value, and X1 is the target displacement value; when the fitting function is a parabola fitting function, the formula of the fitting function is: Y2=A×X22+D×X2+C, wherein, when the fitting function is determined according to multiple first displacement values and multiple second displacement values, Y2 is the second displacement value, X2 is the first displacement value, and A, C and D are determined by fitting calculation based on the first displacement value and the second displacement value; when the third displacement value is determined according to the target displacement value and the fitting function, Y2 is the third displacement value, and X2 is the target displacement value.
[0016] In this technical solution, the fitting function can be a linear fitting function or a parabola fitting function, etc. Among them, when the fitting function is a linear fitting function, that is, there is a linear relationship between the first displacement value and the second displacement value, then the equation form of the fitting function can be Y1=K×X1+B, wherein Y1 is the second displacement value, X1 is the first displacement value, K and B are determined by fitting calculation based on the first displacement value and the second displacement value. Specifically, since the first displacement value and the second displacement value can be obtained through the target displacement value, multiple first displacement values and multiple second displacement values can be brought into the formula of the fitting function, and then a set of equations about K and B will be obtained, and then the set of equations is solved to obtain the values of constants K and B. Then the values of constants K and B obtained are brought into the fitting function, thereby determining the equation of the fitting function. Further, the target displacement value is brought into the equation of the fitting function as X1. Since constants K and B already have specific values, Y1 can be directly obtained, and Y1 is the third displacement value.
[0017] When the fitting function is a parabola fitting function, the equation of the fitting function can be Y2=A×X22+D×X2+C, where Y2 is the second displacement value, X2 is the first displacement value, and A, C and D are determined by fitting calculation based on the first displacement value and the second displacement value. Specifically, since the first displacement value and the second displacement value can be obtained through the target displacement value, multiple first displacement values and multiple second displacement values can be substituted into the formula of the fitting function, and then a set of equations about A, C and D will be obtained, and then the set of equations is solved to obtain the values of constants A, C and D. Then the values of constants A, C and D are substituted into the fitting function, thereby determining the equation of the fitting function. Further, the target displacement value is substituted into the equation of the fitting function as X2. Since constants A, C and D already have specific values, Y2 can be directly obtained, and Y2 is the third displacement value. The present invention calculates the actual distance required to be moved by using linear fitting or parabola fitting according to the actual use scenario, thereby further improving the accuracy of the displacement of the magnetic scale control console.
[0018] To achieve the second purpose of the present invention, the technical solution of the present invention provides a control system for a magnetic scale console, wherein the control system of the magnetic scale console includes: a first determination module, the first determination module is used to determine the target displacement value of the magnetic scale console; a second determination module, the second determination module is used to determine multiple first displacement values in a calibration database according to the target displacement value; a third determination module, the third determination module is used to determine multiple second displacement values corresponding to the multiple first displacement values in the calibration database according to the multiple first displacement values; a first calculation module, the first calculation module is used to determine a fitting function according to the multiple first displacement values and the multiple second displacement values; a second calculation module, the second calculation module is used to determine the third displacement value according to the target displacement value and the fitting function; a first control module, the first control module is used to control the magnetic scale console to move according to the third displacement value.
[0019] The present invention provides a control system for a magnetic scale console, wherein the control system of the magnetic scale console specifically includes: a first determination module, a second determination module, a third determination module, a first calculation module, a second calculation module and a first control module. The first determination module determines the target displacement value of the magnetic scale console, wherein the target displacement value refers to the distance value between the current position of the magnetic scale console and the position to which the user wants the magnetic scale to move, and the distance value is the distance value displayed on the magnetic scale. The method for determining the magnetic scale console can be input by the user or obtained by the device. Further, the second determination module determines a plurality of first displacement values in a calibration database according to the determined target displacement value, and the third determination module determines a plurality of second displacement values corresponding to the plurality of first displacement values in the calibration database according to the plurality of first displacement values. The calibration database includes a plurality of first displacement values and a plurality of second displacement values, and each first displacement value corresponds to a second displacement value respectively. Further, the first displacement value is obtained by the magnetic scale in the magnetic scale console, and the second displacement value is obtained by the laser interferometer installed on the magnetic scale console. Specifically, firstly, a laser interferometer is installed on the magnetic scale console, and then the magnetic scale console is controlled to move, and the first displacement value on the magnetic scale and the second displacement value on the laser interferometer are collected during the movement. Since the first displacement value and the second displacement value are both displacement values of the magnetic scale console, but the positioning accuracy error of the magnetic scale is large, and the positioning accuracy of the laser interferometer is high, the second displacement value is essentially the displacement value after the first displacement value is calibrated, and finally a calibration database is established based on multiple first displacement values and multiple second displacement values. Since the first displacement value is the displacement value obtained by the magnetic scale, and the target displacement value is also the displacement value on the magnetic scale, multiple first displacement values corresponding to the target displacement value can be obtained in the calibration database through the target displacement value. Furthermore, since the first displacement value corresponds to the second displacement value one by one in the calibration database, multiple second displacement values corresponding to multiple first displacement values can be determined based on multiple first displacement values. Furthermore, the first calculation module determines the fitting function according to the multiple first displacement values and the multiple second displacement values. Specifically, the first displacement value can be used as the horizontal coordinate and the second displacement value can be used as the vertical coordinate. The corresponding multiple first displacement values and multiple second displacement values can be represented in the plane coordinate system as coordinate points, and then the functional relationship between the multiple coordinate points, i.e., the fitting function, is determined according to the multiple coordinate points. After obtaining the fitting function between the multiple coordinate points, the second calculation module determines the third displacement value according to the target displacement value and the fitting function, that is, the target displacement value is input as a variable into the fitting function, thereby obtaining the third displacement value, which is the displacement value after the target displacement value is calibrated. Finally, the first control module controls the magnetic scale console to move according to the third displacement value, so that the magnetic scale console can accurately reach the position that the user wants the magnetic scale console to reach.The present invention first automatically obtains the second displacement value of the laser interferometer and the first displacement value of the magnetic scale, and then establishes a calibration database according to the first displacement value and the second displacement value, thereby greatly improving the data acquisition efficiency and accuracy. Further, a fitting function is determined according to the first displacement value and the second displacement value, and then the actual distance to be moved is calculated according to the fitting function and the target displacement value, thereby overcoming the problem of large displacement deviation of the magnetic scale console and improving the accuracy of displacement of the magnetic scale console.
[0020] In some technical solutions, optionally, the second determination module includes: a fourth determination module, the fourth determination module is used to determine the position of the target displacement value in the calibration database according to the target displacement value; and a fifth determination module, the fifth determination module is used to determine multiple first displacement values according to the position in the calibration database.
[0021] In the technical solution, the second determination module includes: a fourth determination module and a fifth determination module. Among them, first, the fourth determination module determines the position of the target displacement value in the calibration database according to the target displacement value in the calibration database, wherein the calibration database includes a first displacement value set, and the position of the target displacement value in the calibration database refers to the position of the target displacement value in the first displacement value set. The first displacement value set refers to a first displacement value set obtained by sorting a plurality of first displacement values, in which a plurality of first displacement values are sorted from small to large in the first displacement value set, and then the position of the target displacement value in the first displacement value set is determined according to the size of the target displacement value. Further, after determining the position of the target displacement value, the fifth determination module determines a plurality of first displacement values according to the front-back relationship thereof. That is to say, the plurality of first displacement values may be the first first displacement values of the target displacement value in the first displacement value set, the plurality of first displacement values may also be the last first displacement values of the target displacement value in the first displacement value set, and the plurality of first displacement values may also be the first first displacement values and the last first displacement values of the target displacement value in the first displacement value set. Specifically, when the target displacement value is 12, and the first displacement value set in the calibration database is: 0, 5, 10, 15, 20, 25 and 30, the position of the target displacement value is first determined to be the 4th in the first displacement value set, then the multiple first displacement values can be 10, 15, or 5, 10, 15, or 5, 10, 15, 20. By determining multiple first displacement values according to the position of the target displacement value in the calibration database, the functional relationship between the target displacement value and the third displacement value can be similar to the fitting function between the first displacement value and the second displacement value, and the third displacement value can be obtained according to the target displacement value and the fitting function, thereby further improving the accuracy of the displacement of the magnetic scale console.
[0022] In some technical schemes, optionally, the control system of the magnetic scale console also includes: a first setting module, the first setting module is used to set the interval distance value and the measuring range; a second control module, the second control module is used to control the magnetic scale console to move according to the measuring range, and obtain the first displacement value collected by the magnetic scale and the second displacement value collected by the laser interferometer at each interval distance value; an establishment module, the establishment module is used to establish a calibration database based on multiple first displacement values and multiple second displacement values.
[0023] In the technical scheme, the control system of the magnetic scale console also includes: a first setting module, a second control module and an establishment module. Among them, a calibration database should be established before controlling the magnetic scale console to move. The method of establishing the calibration database is: first, a laser interferometer is installed on the magnetic scale console, and the laser interferometer signal is debugged to be in an available state, and then the first setting module sets the interval distance value and the range of the magnetic scale console, wherein, since the displacement value cannot be obtained continuously, the interval distance value is set, and the first displacement value on the magnetic scale and the second displacement value on the laser interferometer are obtained by every interval distance value. Further, since the displacement of the magnetic scale console is limited, it is also necessary to set the range, that is, the displacement range of the magnetic scale console. Then the second control module controls the magnetic scale console to move according to the range, and obtains the first displacement value collected by the magnetic scale and the second displacement value collected by the laser interferometer every interval distance value. Specifically, first, the magnetic scale console is returned to zero, and the zero point data is saved after returning to zero. Then move the magnetic scale console backward by the spacing distance value, save the second displacement value of the laser interferometer and the first displacement value of the magnetic scale when in place, repeat the above steps until the magnetic scale console moves to the full range and stops. Finally, the establishment module establishes a calibration database based on multiple one-to-one corresponding first displacement values and second displacement values. The present invention automatically collects the data of each calibration point within the range of the magnetic scale using a laser interferometer in conjunction with the magnetic scale, i.e., the first displacement value and the second displacement value, and then establishes a calibration database based on the multiple first displacement values and the multiple second displacement values, thereby shortening the time of the calibration process and improving the calibration efficiency.
[0024] In some technical schemes, optionally, the fitting function includes a linear fitting function or a parabola fitting function; when the fitting function is a linear fitting function, the formula of the fitting function is: Y1=K×X1+B, wherein, when the fitting function is determined according to multiple first displacement values and multiple second displacement values, Y1 is the second displacement value, X1 is the first displacement value, and K and B are determined by fitting calculation based on the first displacement value and the second displacement value; when the third displacement value is determined according to the target displacement value and the fitting function, Y1 is the third displacement value, and X1 is the target displacement value; when the fitting function is a parabola fitting function, the formula of the fitting function is: Y2=A×X22+D×X2+C, wherein, when the fitting function is determined according to multiple first displacement values and multiple second displacement values, Y2 is the second displacement value, X2 is the first displacement value, and A, C and D are determined by fitting calculation based on the first displacement value and the second displacement value; when the third displacement value is determined according to the target displacement value and the fitting function, Y2 is the third displacement value, and X2 is the target displacement value.
[0025] In this technical solution, the fitting function can be a linear fitting function or a parabola fitting function, etc. Among them, when the fitting function is a linear fitting function, that is, there is a linear relationship between the first displacement value and the second displacement value, then the equation form of the fitting function can be Y1=K×X1+B, wherein Y1 is the second displacement value, X1 is the first displacement value, K and B are determined by fitting calculation based on the first displacement value and the second displacement value. Specifically, since the first displacement value and the second displacement value can be obtained through the target displacement value, multiple first displacement values and multiple second displacement values can be brought into the formula of the fitting function, and then a set of equations about K and B will be obtained, and then the set of equations is solved to obtain the values of constants K and B. Then the values of constants K and B obtained are brought into the fitting function, thereby determining the equation of the fitting function. Further, the target displacement value is brought into the equation of the fitting function as X1. Since constants K and B already have specific values, Y1 can be directly obtained, and Y1 is the third displacement value.
[0026] When the fitting function is a parabola fitting function, the equation of the fitting function can be Y2=A×X22+D×X2+C, where Y2 is the second displacement value, X2 is the first displacement value, and A, C and D are determined by fitting calculation based on the first displacement value and the second displacement value. Specifically, since the first displacement value and the second displacement value can be obtained through the target displacement value, multiple first displacement values and multiple second displacement values can be substituted into the formula of the fitting function, and then a set of equations about A, C and D will be obtained, and then the set of equations is solved to obtain the values of constants A, C and D. Then the values of constants A, C and D are substituted into the fitting function, thereby determining the equation of the fitting function. Further, the target displacement value is substituted into the equation of the fitting function as X2. Since constants A, C and D already have specific values, Y2 can be directly obtained, and Y2 is the third displacement value. The present invention calculates the actual distance required to be moved by using linear fitting or parabola fitting according to the actual use scenario, thereby further improving the accuracy of the displacement of the magnetic scale control console.
[0027] To achieve the third purpose of the present invention, the technical solution of the present invention provides an electronic device, including: a memory and a processor, the memory stores a program or instruction, and the processor executes the program or instruction; wherein, when the processor executes the program or instruction, it implements the steps of the control method of the magnetic scale console as any technical solution of the present invention.
[0028] The electronic device provided by this technical solution implements the steps of the control method of the magnetic scale console of any technical solution of the present invention, and thus it has all the beneficial effects of the control method of the magnetic scale console of any technical solution of the present invention, which will not be repeated here.
[0029] To achieve the fourth purpose of the present invention, the technical solution of the present invention provides a storage medium, which stores a program or instruction. When the program or instruction is executed, the steps of the control method of the magnetic scale console of any of the above technical solutions are implemented.
[0030] The storage medium provided by this technical solution implements the steps of the control method of the magnetic scale console of any technical solution of the present invention, and thus it has all the beneficial effects of the control method of the magnetic scale console of any technical solution of the present invention, which will not be repeated here.
[0031] Additional aspects and advantages of the present invention will become apparent in the following description or may be learned by practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0033] Figure 1 One of the flow charts of the control method of the magnetic scale control console according to one embodiment of the present invention is shown;
[0034] Figure 2 A second flow chart of a control method of a magnetic scale control console according to an embodiment of the present invention is shown;
[0035] Figure 3 A third flow chart of a control method of a magnetic scale control console according to an embodiment of the present invention is shown;
[0036] Figure 4 A fourth flow chart of a control method of a magnetic scale control console according to an embodiment of the present invention is shown;
[0037] Figure 5 A fifth flow chart of a control method of a magnetic scale control console according to an embodiment of the present invention is shown;
[0038] Figure 6 One of the schematic block diagrams of the control system of the magnetic scale control console according to one embodiment of the present invention is shown;
[0039] Figure 7 A schematic block diagram of a second determination module according to an embodiment of the present invention is shown;
[0040] Figure 8 A second schematic block diagram showing a control system of a magnetic scale control console according to an embodiment of the present invention;
[0041] Fig. 9 A schematic block diagram of an electronic device according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0042] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.
[0043] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited to the specific embodiments disclosed below.
[0044] Figure 1 One of the flow charts of a control method of a magnetic scale control console according to an embodiment of the present invention is shown. The method comprises:
[0045] Step 102: Determine the target displacement value of the magnetic scale control console;
[0046] Step 104: determining a plurality of first displacement values in a calibration database according to the target displacement value;
[0047] Step 106: determining a plurality of second displacement values corresponding to the plurality of first displacement values in a calibration database according to the plurality of first displacement values;
[0048] Step 108: determining a fitting function according to the plurality of first displacement values and the plurality of second displacement values;
[0049] Step 110: determining a third displacement value according to the target displacement value and the fitting function;
[0050] Step 112: Control the magnetic scale control console to move according to the third displacement value.
[0051] The control method of the magnetic scale console provided by the present invention specifically includes: first determining the target displacement value of the magnetic scale console, wherein the target displacement value refers to the distance value between the current position of the magnetic scale console and the position to which the user wants the magnetic scale to move, and the distance value is the distance value displayed on the magnetic scale. The method for determining the magnetic scale console can be input by the user, or obtained through a device. Further, a plurality of first displacement values are determined in a calibration database according to the determined target displacement value, and a plurality of second displacement values corresponding to the plurality of first displacement values are determined in the calibration database according to the plurality of first displacement values. The calibration database includes a plurality of first displacement values and a plurality of second displacement values, and each first displacement value corresponds to a second displacement value, respectively. Further, the first displacement value is obtained by the magnetic scale in the magnetic scale console, and the second displacement value is obtained by a laser interferometer installed on the magnetic scale console. Specifically, firstly, a laser interferometer is installed on the magnetic scale console, and then the magnetic scale console is controlled to move, and the first displacement value on the magnetic scale and the second displacement value on the laser interferometer are collected during the movement. Since the first displacement value and the second displacement value are both displacement values of the magnetic scale console, but the positioning accuracy error of the magnetic scale is large, and the positioning accuracy of the laser interferometer is high, the second displacement value is essentially the displacement value after the first displacement value is calibrated, and finally a calibration database is established based on multiple first displacement values and multiple second displacement values. Since the first displacement value is the displacement value obtained by the magnetic scale, and the target displacement value is also the displacement value on the magnetic scale, multiple first displacement values corresponding to the target displacement value can be obtained in the calibration database through the target displacement value. Furthermore, since the first displacement value corresponds to the second displacement value one by one in the calibration database, multiple second displacement values corresponding to multiple first displacement values can be determined based on multiple first displacement values. Further, a fitting function is determined according to a plurality of first displacement values and a plurality of second displacement values. Specifically, the first displacement value can be used as the horizontal coordinate and the second displacement value can be used as the vertical coordinate. The corresponding plurality of first displacement values and a plurality of second displacement values can be represented in the plane coordinate system as the image of coordinate points, and then the functional relationship between the plurality of coordinate points, i.e., the fitting function, is determined according to the plurality of coordinate points. After obtaining the fitting function between the plurality of coordinate points, the third displacement value is determined according to the target displacement value and the fitting function. That is, the target displacement value is input into the fitting function as a variable, thereby obtaining the third displacement value, which is the displacement value after calibration of the target displacement value. Finally, the magnetic scale console is controlled to move according to the third displacement value, so that the magnetic scale console can accurately reach the position that the user wants the magnetic scale console to reach. The present invention first automatically obtains the second displacement value of the laser interferometer and the first displacement value of the magnetic scale, and then establishes a calibration database according to the first displacement value and the second displacement value, thereby greatly improving the efficiency and accuracy of data acquisition.Furthermore, a fitting function is determined according to the first displacement value and the second displacement value, and then the actual distance to be moved is calculated according to the fitting function and the target displacement value, thereby overcoming the problem of large displacement deviation of the magnetic scale console and improving the accuracy of displacement of the magnetic scale console.
[0052] Figure 2 The second flow chart of the control method of the magnetic scale control console of an embodiment of the present invention is shown. The step of determining a plurality of first displacement values in the calibration database according to the target displacement value comprises:
[0053] Step 202: determining the position of the target displacement value in the calibration database according to the target displacement value;
[0054] Step 204: Determine a plurality of first displacement values according to the position in the calibration database.
[0055] In this embodiment, the step of determining a plurality of first displacement values in the calibration database according to the target displacement value comprises: first, determining the position of the target displacement value in the calibration database according to the target displacement value, wherein the calibration database includes a first displacement value set, and the position of the target displacement value in the calibration database refers to the position of the target displacement value in the first displacement value set. The first displacement value set refers to a first displacement value set obtained by sorting a plurality of first displacement values, wherein the plurality of first displacement values in the first displacement value set are sorted from small to large, and then the position of the target displacement value in the first displacement value set is determined according to the size of the target displacement value. Further, after determining the position of the target displacement value, the plurality of first displacement values are determined according to the front-back relationship. That is, the plurality of first displacement values may be the first first displacement values of the target displacement value in the first displacement value set, the plurality of first displacement values may also be the last first displacement values of the target displacement value in the first displacement value set, and the plurality of first displacement values may also be the first first displacement values and the last first displacement values of the target displacement value in the first displacement value set. Specifically, when the target displacement value is 12, and the first displacement value set in the calibration database is: 0, 5, 10, 15, 20, 25 and 30, the position of the target displacement value is first determined to be the 4th in the first displacement value set, then the multiple first displacement values can be 10, 15, or 5, 10, 15, or 5, 10, 15, 20. By determining multiple first displacement values according to the position of the target displacement value in the calibration database, the functional relationship between the target displacement value and the third displacement value can be similar to the fitting function between the first displacement value and the second displacement value, and the third displacement value can be obtained according to the target displacement value and the fitting function, thereby further improving the accuracy of the displacement of the magnetic scale console.
[0056] Figure 3The third flow chart of the control method of the magnetic scale console of an embodiment of the present invention is shown. In which, before the step of determining the target displacement value of the magnetic scale console, the following steps are included:
[0057] Step 302: Setting the interval distance value and the measuring range;
[0058] Step 304: Control the magnetic scale control console to move according to the measuring range, and obtain the first displacement value collected by the magnetic scale and the second displacement value collected by the laser interferometer at each interval distance value;
[0059] Step 306: Establish a calibration database according to the plurality of first displacement values and the plurality of second displacement values.
[0060] In this embodiment, the step of determining the target displacement value of the magnetic scale console includes: a calibration database should be established before controlling the magnetic scale console to move, and the method of establishing the calibration database is: first, a laser interferometer is installed on the magnetic scale console, and the laser interferometer signal is debugged to be in an available state, and then the interval distance value and the range of the magnetic scale console are set, wherein, since the displacement value cannot be obtained continuously, the interval distance value is set, and the first displacement value on the magnetic scale and the second displacement value on the laser interferometer are obtained at each interval distance value. Further, since the displacement of the magnetic scale console is limited, it is also necessary to set the range, that is, the displacement range of the magnetic scale console. Then the magnetic scale console is controlled to move according to the range, and the first displacement value collected by the magnetic scale and the second displacement value collected by the laser interferometer are obtained at each interval distance value. Specifically, first, the magnetic scale console is returned to zero, and the zero point data is saved after returning to zero. Then move the magnetic scale console backwards by the spacing distance value, save the second displacement value of the laser interferometer and the first displacement value of the magnetic scale when in place, repeat the above steps until the magnetic scale console moves to the full range and stops. Finally, establish a calibration database based on multiple one-to-one corresponding first displacement values and second displacement values. The present invention automatically collects the data of each calibration point within the range of the magnetic scale using a laser interferometer in conjunction with the magnetic scale, i.e., the first displacement value and the second displacement value, and then establishes a calibration database based on the multiple first displacement values and the multiple second displacement values, thereby shortening the time of the calibration process and improving the calibration efficiency.
[0061] In some embodiments, optionally, the fitting function includes a linear fitting function or a parabola fitting function; when the fitting function is a linear fitting function, the formula of the fitting function is: Y1=K×X1+B, wherein, when the fitting function is determined according to multiple first displacement values and multiple second displacement values, Y1 is the second displacement value, X1 is the first displacement value, and K and B are determined by fitting calculation based on the first displacement value and the second displacement value; when the third displacement value is determined according to the target displacement value and the fitting function, Y1 is the third displacement value, and X1 is the target displacement value; when the fitting function is a parabola fitting function, the formula of the fitting function is: Y2=A×X22+D×X2+C, wherein, when the fitting function is determined according to multiple first displacement values and multiple second displacement values, Y2 is the second displacement value, X2 is the first displacement value, and A, C and D are determined by fitting calculation based on the first displacement value and the second displacement value; when the third displacement value is determined according to the target displacement value and the fitting function, Y2 is the third displacement value, and X2 is the target displacement value.
[0062] In this embodiment, the fitting function may be a linear fitting function or a parabola fitting function, etc. Wherein, when the fitting function is a linear fitting function, that is, there is a linear relationship between the first displacement value and the second displacement value, then the equation form of the fitting function may be Y1=K×X1+B, wherein Y1 is the second displacement value, X1 is the first displacement value, K and B are determined by fitting calculation based on the first displacement value and the second displacement value. Specifically, since the first displacement value and the second displacement value can be obtained through the target displacement value, multiple first displacement values and multiple second displacement values can be brought into the formula of the fitting function, and then a set of equations about K and B will be obtained, and then the set of equations is solved to obtain the values of constants K and B. Then the values of constants K and B obtained are brought into the fitting function, thereby determining the equation of the fitting function. Further, the target displacement value is brought into the equation of the fitting function as X1. Since constants K and B already have specific values, Y1 can be directly obtained, and Y1 is the third displacement value.
[0063] When the fitting function is a parabola fitting function, the equation of the fitting function can be Y2=A×X22+D×X2+C, where Y2 is the second displacement value, X2 is the first displacement value, and A, C and D are determined by fitting calculation based on the first displacement value and the second displacement value. Specifically, since the first displacement value and the second displacement value can be obtained through the target displacement value, multiple first displacement values and multiple second displacement values can be substituted into the formula of the fitting function, and then a set of equations about A, C and D will be obtained, and then the set of equations is solved to obtain the values of constants A, C and D. Then the values of constants A, C and D are substituted into the fitting function, thereby determining the equation of the fitting function. Further, the target displacement value is substituted into the equation of the fitting function as X2. Since constants A, C and D already have specific values, Y2 can be directly obtained, and Y2 is the third displacement value. The present invention calculates the actual distance required to be moved by using linear fitting or parabola fitting according to the actual use scenario, thereby further improving the accuracy of the displacement of the magnetic scale control console.
[0064] Figure 4 The fourth flow chart of the control method of the magnetic scale control console of an embodiment of the present invention is shown. The calibration process includes:
[0065] Step 402: Setting the console calibration interval and range;
[0066] Step 404: the control console returns to zero position;
[0067] Step 406: Save laser and magnetic scale data;
[0068] Step 408: Determine whether the current position of the console is less than or equal to the range; if the result is N, then end; if the result is Y, then execute step 410;
[0069] Step 410: Move the console according to the calibration interval.
[0070] In this embodiment, the calibration process is as follows: first, install the laser interferometer on the magnetic scale console, then debug the laser interferometer signal to be in an available state, then set the calibration interval distance and range parameters of the magnetic scale console and return the magnetic scale console to zero, and save the zero point data (including laser interferometer data and console magnetic scale data) after returning to zero, that is, when the magnetic scale console is at zero position, the first displacement value on the magnetic scale and the second displacement value on the laser interferometer. Then move the magnetic scale console backward to calibrate the interval distance, and save the currently collected laser interferometer data, that is, the second displacement value, and the console magnetic scale data, that is, the first displacement value, after it is in place, and repeat the above steps until the magnetic scale console moves to the full range and stops.
[0071] Figure 5A fifth flow chart of a control method of a magnetic scale control console according to an embodiment of the present invention is shown; wherein the operation process includes:
[0072] Step 502: Setting the target displacement value;
[0073] Step 504: Acquire calibration database related data according to the target displacement value;
[0074] Step 506: Fit the acquired calibration data and calculate the fitting formula;
[0075] Step 508: Substitute the target displacement value into the formula to calculate the calibrated displacement data;
[0076] Step 510: Move the control console to the calibrated position.
[0077] In this embodiment, the operation process of the magnetic scale console includes: first setting the target displacement value of the magnetic scale console, wherein the target displacement value is the distance value on the magnetic scale, and then using a computer to search for data close to the target displacement value in the calibration database, specifically, first determining the position of the target displacement value in the calibration database, and then obtaining multiple first displacement values located near the position, and determining multiple second displacement values based on the multiple first displacement values, and then using the segmented fitting method to perform corresponding fitting (linear fitting or parabola fitting) on the obtained calibration data points, calculating the fitting formula, that is, determining the fitting relationship between the first displacement value and the second displacement value based on the multiple first displacement values and the multiple second displacement values, and determining the fitting relationship formula based on the obtained multiple first displacement values and the multiple second displacement values. Then, the target displacement value is substituted into the formula to calculate the calibrated displacement value, and finally the magnetic scale console is controlled to move to the calibrated position.
[0078] Figure 6 A schematic block diagram of a control system of a magnetic scale console according to an embodiment of the present invention is shown; wherein the control system 60 of the magnetic scale console includes:
[0079] The first determination module 602 is used to determine the target displacement value of the magnetic scale control console;
[0080] A second determination module 604 is used to determine a plurality of first displacement values in a calibration database according to the target displacement value;
[0081] A third determining module 606, configured to determine, in a calibration database according to the plurality of first displacement values, a plurality of second displacement values corresponding to the plurality of first displacement values;
[0082] A first calculation module 608, configured to determine a fitting function according to the plurality of first displacement values and the plurality of second displacement values;
[0083] A second calculation module 610, configured to determine a third displacement value according to the target displacement value and the fitting function;
[0084] The first control module 612 is used to control the magnetic scale control console to move according to the third displacement value.
[0085] The present invention provides a control system 60 for a magnetic scale console, wherein the control system 60 for the magnetic scale console specifically includes: a first determination module 602, a second determination module 604, a third determination module 606, a first calculation module 608, a second calculation module 610 and a first control module 612. The first determination module 602 determines the target displacement value of the magnetic scale console, wherein the target displacement value refers to the distance value between the current position of the magnetic scale console and the position to which the user wants the magnetic scale to move, and the distance value is the distance value displayed on the magnetic scale. The method for determining the magnetic scale console can be input by the user or obtained through the device. Furthermore, the second determination module 604 determines a plurality of first displacement values in a calibration database according to the determined target displacement value, and the third determination module 606 determines a plurality of second displacement values corresponding to the plurality of first displacement values in the calibration database according to the plurality of first displacement values. Among them, the calibration database includes multiple first displacement values and multiple second displacement values, and each first displacement value corresponds to a second displacement value. Furthermore, the first displacement value is obtained by the magnetic scale in the magnetic scale console, and the second displacement value is obtained by the laser interferometer installed on the magnetic scale console. Specifically, the laser interferometer is first installed on the magnetic scale console, and then the magnetic scale console is controlled to move, and the first displacement value on the magnetic scale and the second displacement value on the laser interferometer are collected during the movement. Since the first displacement value and the second displacement value are both displacement values of the magnetic scale console, but the positioning accuracy error of the magnetic scale is large, and the positioning accuracy of the laser interferometer is high, the second displacement value is essentially the displacement value after the first displacement value is calibrated, and finally a calibration database is established based on multiple first displacement values and multiple second displacement values. Since the first displacement value is the displacement value obtained by the magnetic scale, and the target displacement value is also the displacement value on the magnetic scale, multiple first displacement values corresponding to the target displacement value can be obtained in the calibration database through the target displacement value. Furthermore, since the first displacement value corresponds to the second displacement value in the calibration database, multiple second displacement values corresponding to the multiple first displacement values can be determined based on the multiple first displacement values. Further, the first calculation module 608 determines the fitting function based on the multiple first displacement values and the multiple second displacement values. Specifically, the first displacement value can be used as the horizontal coordinate and the second displacement value can be used as the vertical coordinate to represent the corresponding multiple first displacement values and the multiple second displacement values in the plane coordinate system as coordinate points, and then the functional relationship between the multiple coordinate points, i.e., the fitting function, is determined based on the multiple coordinate points. After obtaining the fitting function between the multiple coordinate points, the second calculation module 610 determines the third displacement value based on the target displacement value and the fitting function, that is, the target displacement value is input as a variable into the fitting function, thereby obtaining the third displacement value, which is the displacement value of the target displacement value after calibration.Finally, the first control module 612 controls the magnetic scale console to move according to the third displacement value, so that the magnetic scale console can accurately reach the position that the user wants the magnetic scale console to reach. The present invention first automatically obtains the second displacement value of the laser interferometer and the first displacement value of the magnetic scale, and then establishes a calibration database based on the first displacement value and the second displacement value, thereby greatly improving the efficiency and accuracy of data acquisition. Furthermore, a fitting function is determined based on the first displacement value and the second displacement value, and then the actual distance to be moved is calculated based on the fitting function and the target displacement value, thereby overcoming the problem of large displacement deviation of the magnetic scale console and improving the accuracy of the displacement of the magnetic scale console.
[0086] Figure 7 A schematic block diagram of a second determination module according to an embodiment of the present invention is shown; wherein the second determination module 604 includes:
[0087] A fourth determination module 6042 is used to determine the position of the target displacement value in the calibration database according to the target displacement value;
[0088] The fifth determination module 6044 is used to determine a plurality of first displacement values according to the position in the calibration database.
[0089] In this embodiment, the second determination module 604 includes: a fourth determination module 6042 and a fifth determination module 6044. First, the fourth determination module 6042 determines the position of the target displacement value in the calibration database according to the target displacement value in the calibration database, wherein the calibration database includes a first displacement value set, and the position of the target displacement value in the calibration database refers to the position of the target displacement value in the first displacement value set. The first displacement value set refers to a first displacement value set obtained by sorting a plurality of first displacement values, in which the plurality of first displacement values are sorted from small to large in the first displacement value set, and then the position of the target displacement value in the first displacement value set is determined according to the size of the target displacement value. Further, after determining the position of the target displacement value, the fifth determination module 6044 determines a plurality of first displacement values according to the front-back relationship thereof. That is, the plurality of first displacement values may be the first first displacement values of the target displacement value in the first displacement value set, the plurality of first displacement values may also be the last first displacement values of the target displacement value in the first displacement value set, and the plurality of first displacement values may also be the first first displacement values and the last first displacement values of the target displacement value in the first displacement value set. Specifically, when the target displacement value is 12, and the first displacement value set in the calibration database is: 0, 5, 10, 15, 20, 25 and 30, the position of the target displacement value is first determined to be the 4th in the first displacement value set, then the multiple first displacement values can be 10, 15, or 5, 10, 15, or 5, 10, 15, 20. By determining multiple first displacement values according to the position of the target displacement value in the calibration database, the functional relationship between the target displacement value and the third displacement value can be similar to the fitting function between the first displacement value and the second displacement value, and the third displacement value can be obtained according to the target displacement value and the fitting function, thereby further improving the accuracy of the displacement of the magnetic scale console.
[0090] Figure 8 The second schematic block diagram of the control system of the magnetic scale console of an embodiment of the present invention is shown; wherein the control system 60 of the magnetic scale console also includes:
[0091] A first setting module 614, used to set the interval distance value and the range;
[0092] The second control module 616 is used to control the magnetic scale console to move according to the measuring range, and obtain the first displacement value collected by the magnetic scale and the second displacement value collected by the laser interferometer at each interval distance value;
[0093] The establishing module 618 is used to establish a calibration database according to the plurality of first displacement values and the plurality of second displacement values.
[0094] In this embodiment, the control system 60 of the magnetic scale console also includes: a first setting module 614, a second control module 616 and an establishment module 618. Among them, a calibration database should be established before controlling the magnetic scale console to move. The method of establishing the calibration database is: first, a laser interferometer is installed on the magnetic scale console, and the laser interferometer signal is debugged to be in an available state, and then the first setting module 614 sets the interval distance value and the range of the magnetic scale console, wherein, since the displacement value cannot be obtained continuously, the interval distance value is set, and the first displacement value on the magnetic scale and the second displacement value on the laser interferometer are obtained by every interval distance value. Further, since the displacement of the magnetic scale console is limited, it is also necessary to set the range, that is, the displacement range of the magnetic scale console. Then the second control module 616 controls the magnetic scale console to move according to the range, and obtains the first displacement value collected by the magnetic scale and the second displacement value collected by the laser interferometer every interval distance value. Specifically, first, the magnetic scale console is returned to zero, and the zero point data is saved after returning to zero. Then move the magnetic scale console backward by the spacing distance value, save the second displacement value of the laser interferometer and the first displacement value of the magnetic scale when in place, repeat the above steps until the magnetic scale console moves to the full range and stops. Finally, the establishment module 618 establishes a calibration database according to a plurality of one-to-one corresponding first displacement values and second displacement values. The present invention automatically collects the data of each calibration point within the range of the magnetic scale by using a laser interferometer to cooperate with the magnetic scale, i.e., the first displacement value and the second displacement value, and then establishes a calibration database according to the plurality of first displacement values and the plurality of second displacement values, thereby shortening the time of the calibration process and improving the calibration efficiency.
[0095] In some embodiments, optionally, the fitting function includes a linear fitting function or a parabola fitting function; when the fitting function is a linear fitting function, the formula of the fitting function is: Y1=K×X1+B, wherein, when the fitting function is determined according to multiple first displacement values and multiple second displacement values, Y1 is the second displacement value, X1 is the first displacement value, and K and B are determined by fitting calculation based on the first displacement value and the second displacement value; when the third displacement value is determined according to the target displacement value and the fitting function, Y1 is the third displacement value, and X1 is the target displacement value; when the fitting function is a parabola fitting function, the formula of the fitting function is: Y2=A×X22+D×X2+C, wherein, when the fitting function is determined according to multiple first displacement values and multiple second displacement values, Y2 is the second displacement value, X2 is the first displacement value, and A, C and D are determined by fitting calculation based on the first displacement value and the second displacement value; when the third displacement value is determined according to the target displacement value and the fitting function, Y2 is the third displacement value, and X2 is the target displacement value.
[0096] In this embodiment, the fitting function may be a linear fitting function or a parabola fitting function, etc. Wherein, when the fitting function is a linear fitting function, that is, there is a linear relationship between the first displacement value and the second displacement value, then the equation form of the fitting function may be Y1=K×X1+B, wherein Y1 is the second displacement value, X1 is the first displacement value, K and B are determined by fitting calculation based on the first displacement value and the second displacement value. Specifically, since the first displacement value and the second displacement value can be obtained through the target displacement value, multiple first displacement values and multiple second displacement values can be brought into the formula of the fitting function, and then a set of equations about K and B will be obtained, and then the set of equations is solved to obtain the values of constants K and B. Then the values of constants K and B obtained are brought into the fitting function, thereby determining the equation of the fitting function. Further, the target displacement value is brought into the equation of the fitting function as X1. Since constants K and B already have specific values, Y1 can be directly obtained, and Y1 is the third displacement value.
[0097] When the fitting function is a parabola fitting function, the equation of the fitting function can be Y2=A×X22+D×X2+C, where Y2 is the second displacement value, X2 is the first displacement value, and A, C and D are determined by fitting calculation based on the first displacement value and the second displacement value. Specifically, since the first displacement value and the second displacement value can be obtained through the target displacement value, multiple first displacement values and multiple second displacement values can be substituted into the formula of the fitting function, and then a set of equations about A, C and D will be obtained, and then the set of equations is solved to obtain the values of constants A, C and D. Then the values of constants A, C and D are substituted into the fitting function, thereby determining the equation of the fitting function. Further, the target displacement value is substituted into the equation of the fitting function as X2. Since constants A, C and D already have specific values, Y2 can be directly obtained, and Y2 is the third displacement value. The present invention calculates the actual distance required to be moved by using linear fitting or parabola fitting according to the actual use scenario, thereby further improving the accuracy of the displacement of the magnetic scale control console.
[0098] Fig. 9 A schematic block diagram of an electronic device of an embodiment of the present invention is shown; wherein the electronic device 90 includes a memory 902, a processor 904, and a computer program stored in the memory 902 and executable on the processor 904, and when the processor 904 executes the computer program, the steps of the control method of the magnetic scale console as described in any of the above items are implemented.
[0099] The electronic device 90 provided by the present invention implements the steps of the control method of the magnetic scale console when the processor 904 executes the computer program, which can achieve the technical effect of any of the above embodiments and will not be repeated.
[0100] According to an embodiment of the present invention, a storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the control method of the magnetic scale console as described above are implemented.
[0101] The storage medium provided by the present invention implements the steps of the control method of the magnetic scale console when the computer program is executed by the processor, which can achieve the technical effect of any of the above embodiments and will not be repeated here.
[0102] In the present invention, the terms "first", "second", and "third" are used for descriptive purposes only and should not be understood as indicating or implying relative importance; the term "plurality" refers to two or more, unless otherwise clearly defined. The terms "installed", "connected", "connected", "fixed", etc. should be understood in a broad sense. For example, "connected" can be a fixed connection, a detachable connection, or an integral connection; "connected" can be a direct connection or an indirect connection through an intermediate medium. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0103] In the description of the present invention, it is necessary to understand that the directions or positional relationships indicated by terms such as “upper”, “lower”, “left”, “right”, “front” and “back” are based on the directions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or unit referred to must have a specific direction, be constructed and operated in a specific orientation, and therefore, cannot be understood as a limitation on the present invention.
[0104] In the description of this specification, the description of the terms "one embodiment", "some embodiments", "specific embodiments", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0105] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A control method for a magnetic scale control console, characterized in that: include: Determine the target displacement value of the magnetic scale console; The target displacement value refers to the distance between the current position of the magnetic scale console and the position to which the user wants the magnetic scale to move; determining a plurality of first displacement values in a calibration database according to the target displacement value; determining, in the calibration database, a plurality of second displacement values corresponding to the plurality of first displacement values according to the plurality of first displacement values; determining a fitting function according to a plurality of the first displacement values and a plurality of the second displacement values; determining a third displacement value according to the target displacement value and the fitting function; Controlling the magnetic scale console to move according to the third displacement value; The step of determining a plurality of first displacement values in a calibration database according to the target displacement value comprises: Determining a position of the target displacement value in the calibration database according to the target displacement value; determining a plurality of first displacement values in the calibration database based on the position; The calibration database includes a first displacement value set, and the position of the target displacement value in the calibration database refers to the position of the target displacement value in the first displacement value set; the first displacement value set refers to the first displacement value set obtained by sorting a plurality of the first displacement values, in which the plurality of the first displacement values are sorted from small to large, and then the position of the target displacement value in the first displacement value set is determined according to the size of the target displacement value; The second displacement value is a displacement value after the first displacement value is calibrated; Before the step of determining the target displacement value of the magnetic scale console, the control method of the magnetic scale console includes: Set the interval distance value and measuring range; Controlling the magnetic scale console to move within the measuring range, and acquiring the first displacement value collected by the magnetic scale and the second displacement value collected by the laser interferometer at every interval distance value; The calibration database is established according to a plurality of the first displacement values and a plurality of the second displacement values.
2. The control method of the magnetic scale console according to claim 1, characterized in that: The fitting function includes a linear fitting function or a parabola fitting function; When the fitting function is the linear fitting function, the formula of the fitting function is: Y1=K×X1+B, wherein when the fitting function is determined according to a plurality of the first displacement values and a plurality of the second displacement values, Y1 is the second displacement value, X1 is the first displacement value, and K and B are determined by fitting calculation according to the first displacement value and the second displacement value; when the third displacement value is determined according to the target displacement value and the fitting function, Y1 is the third displacement value, and X1 is the target displacement value; When the fitting function is the parabolic fitting function, the formula of the fitting function is: Y2=A×X2²+D×X2+C, wherein, when the fitting function is determined based on multiple first displacement values and multiple second displacement values, Y2 is the second displacement value, X2 is the first displacement value, A, C and D are determined by fitting calculation based on the first displacement value and the second displacement value; when the third displacement value is determined based on the target displacement value and the fitting function, Y2 is the third displacement value, and X2 is the target displacement value.
3. A control system for a magnetic scale control console, characterized in that: include: A first determination module, the first determination module is used to determine the target displacement value of the magnetic scale console; The target displacement value refers to the distance between the current position of the magnetic scale console and the position to which the user wants the magnetic scale to move; a second determination module, the second determination module being configured to determine a plurality of first displacement values in a calibration database according to the target displacement value; a third determining module, configured to determine, in the calibration database, a plurality of second displacement values corresponding to the plurality of first displacement values according to the plurality of first displacement values; a first calculation module, the first calculation module being used to determine a fitting function according to a plurality of the first displacement values and a plurality of the second displacement values; a second calculation module, the second calculation module being used to determine a third displacement value according to the target displacement value and the fitting function; A first control module, the first control module is used to control the magnetic scale console to move according to the third displacement value; The second determining module comprises: a fourth determining module, configured to determine a position of the target displacement value in the calibration database according to the target displacement value; a fifth determining module, configured to determine a plurality of first displacement values according to the position in the calibration database; The calibration database includes a first displacement value set, and the position of the target displacement value in the calibration database refers to the position of the target displacement value in the first displacement value set; the first displacement value set refers to the first displacement value set obtained by sorting a plurality of the first displacement values, in which the plurality of the first displacement values are sorted from small to large, and then the position of the target displacement value in the first displacement value set is determined according to the size of the target displacement value; The second displacement value is a displacement value after the first displacement value is calibrated; A first setting module, the first setting module is used to set the interval distance value and the range; A second control module, the second control module is used to control the magnetic scale console to move according to the measuring range, and obtain the first displacement value collected by the magnetic scale and the second displacement value collected by the laser interferometer at each interval distance value; An establishing module, wherein the establishing module is used to establish the calibration database according to a plurality of the first displacement values and a plurality of the second displacement values.
4. The control system of the magnetic scale console according to claim 3 is characterized in that: The fitting function includes a linear fitting function or a parabola fitting function; When the fitting function is the linear fitting function, the formula of the fitting function is: Y1=K×X1+B, wherein when the fitting function is determined according to a plurality of the first displacement values and a plurality of the second displacement values, Y1 is the second displacement value, X1 is the first displacement value, and K and B are determined by fitting calculation according to the first displacement value and the second displacement value; when the third displacement value is determined according to the target displacement value and the fitting function, Y1 is the third displacement value, and X1 is the target displacement value; When the fitting function is the parabolic fitting function, the formula of the fitting function is: Y2=A×X2²+D×X2+C, wherein when the fitting function is determined based on multiple first displacement values and multiple second displacement values, Y2 is the second displacement value, X2 is the first displacement value, and A, C, and D are determined by fitting calculation based on the first displacement value and the second displacement value; when the third displacement value is determined based on the target displacement value and the fitting function, Y2 is the third displacement value, and X2 is the target displacement value.
5. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the control method of the magnetic scale console as claimed in claim 1 or 2 are implemented.
6. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, the steps of the control method of the magnetic scale console as claimed in claim 1 or 2 are implemented.
Citation Information
Patent Citations
Accurate positioning control method for motion system, control system and storage medium
CN109656193A
Linear motor physical precision compensation control system and method
CN109787530A
Detection and calibration control method of travel distance and location of running mechanism
CN109883445A
Moving-coil linear motor position calibration device and method
CN112066863A
Position correction method and device, storage medium, servo driver and servo system
CN114089694A
