Method and device for detecting bubble position of level bubble based on temperature compensation
By establishing a temperature compensation relationship, the bubble position of the electronic level bubble is compensated, which solves the problem of inaccurate detection caused by temperature drift, improves the reliability and accuracy of detection, and avoids missed or false alarms.
Patent Information
- Application Number
- CN202310779943.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-28
- Publication Date
- 2024-12-31
AI Technical Summary
The analog signal of electronic level bubbles when temperature changes are easily affected by temperature drift, resulting in inaccurate bubble position detection results and missed or false alarms.
By obtaining the current temperature and initial bubble position of the level bubble, a temperature compensation relationship is established, and the current position is compensated by using this relationship to obtain the compensated bubble position to avoid the influence of temperature drift.
It improves the accuracy of bubble position detection, avoids missed or false alarms caused by temperature changes, enhances the reliability of electronic level bubbles, and does not need to change the original calculation model, which makes the modification cost low.
Smart Images

Figure CN119223250A_ABST
Abstract
Description
Technical Field
[0001] The present invention mainly relates to the field of horizontal state detection of precision instruments, and in particular to a method for detecting the position of a level bubble based on temperature compensation, a detection device and a computer-readable medium. Background Art
[0002] Many instruments and equipment, especially precision measuring instruments and equipment, must be in a horizontal state to work properly. For example, an electronic balance (weighing instrument) based on the gravity method will have an error when the balance is tilted. The more the balance is tilted, the greater the error. Usually, a level bubble is used to detect the horizontal state of precision instruments, and the adjustable feet are used to adjust the level of precision instruments.
[0003] The electronic level is composed of a physical level, several photoelectric devices (light-emitting devices and receiving devices), a signal processing unit, a computing unit, a control unit, etc. The light-emitting devices and receiving devices are installed around the physical level. The light emitted by the light-emitting device shines on the bubble, which will produce reflection and refraction, and then be received by the receiving device. When the position of the bubble changes, the optical path from the light-emitting device to the receiving device also changes, so that the received photoelectric signal changes. The computing unit can calculate the position of the bubble in the level from the photoelectric signal according to a certain calculation model. According to the position, it can be judged whether the bubble is located in the center position and the degree of deviation from the center position, so as to know the inclination degree of the device equipped with the electronic level. In order to make the electronic level work stably and reliably, the R&D personnel have improved the reliability of the electronic level from various angles. However, since the electronic level first obtains an analog signal and then converts the analog signal into a digital signal for calculation, the analog signal is more susceptible to temperature changes and produces temperature drift. Therefore, how to overcome the influence of temperature drift on the detection of the level bubble is a problem that needs to be solved. Summary of the invention
[0004] The technical problem to be solved by the present invention is to provide a method, a detection device and a computer-readable medium for detecting the position of a level bubble based on temperature compensation and capable of avoiding temperature drift.
[0005] To solve the above technical problems, the present invention provides a method for detecting the position of a level bubble based on temperature compensation, comprising: obtaining the current temperature of the level bubble and the initial position of the bubble, wherein the initial position is the original detection result of the level bubble; obtaining the temperature compensation relationship between the temperature of the level bubble and the position compensation amount of the bubble when the bubble is at the initial position, wherein the temperature compensation relationship includes a one-to-one correspondence between multiple temperatures and multiple position compensation amounts; obtaining the current position compensation amount of the bubble corresponding to the initial position and the current temperature according to the temperature compensation relationship; and compensating the current position using the current position compensation amount to obtain a compensated bubble position.
[0006] In one embodiment of the present application, the temperature compensation relationship is obtained according to the following steps: at standard temperature, the actual position of the bubble is obtained; at multiple different temperatures, multiple initial positions of the bubble are obtained; and the position compensation amount at different temperatures is obtained according to the difference between the actual position and the initial position, thereby obtaining the temperature compensation relationship between the temperature of the level bubble and the position compensation amount of the bubble when the bubble is at the initial position.
[0007] In one embodiment of the present application, in the temperature compensation relationship, the position compensation amount is proportional to the polar diameter of the bubble in the polar coordinate system.
[0008] In one embodiment of the present application, in a polar coordinate system, the position of the bubble is represented by a polar diameter, and the temperature compensation relationship is represented by the following formula:
[0009] R comp =R1*(D*(T-T0) 2 +E*(T-T0));
[0010] R=R1+R comp ;
[0011] Wherein, R represents the polar diameter of the compensated bubble position, R1 represents the polar diameter of the bubble at the initial position, and R comp represents the position compensation amount, D and E are preset parameters, T represents the temperature of the vial, and T0 represents the standard temperature.
[0012] In one embodiment of the present application, in a polar coordinate system, the position of the bubble is represented by a polar diameter, and the temperature compensation relationship is represented by the following formula:
[0013] R comp =R1*(D*(T-T0) 2 +E*(T-T0))+(F*(T-T0) 2 +G*(T-T0));
[0014] R=R1+R comp ;
[0015] Wherein, R represents the polar diameter of the compensated bubble position, R1 represents the polar diameter of the bubble at the initial position, and R comp represents the position compensation amount, D, E, F, G are all preset parameters, T represents the temperature of the vial, and T0 represents the standard temperature.
[0016] In one embodiment of the present application, in the temperature compensation relationship, the position compensation amount is proportional to the abscissa and ordinate of the bubble in a Cartesian coordinate system.
[0017] In one embodiment of the present application, in a Cartesian coordinate system, the temperature compensation relationship is expressed by the following formula:
[0018] X comp =X1*(Dx*(T-T0) 2 +Ex*(T-T0));
[0019] Y comp =Y1*(Dy*(T-T0) 2 +Ey*(T-T0));
[0020] X=X1+X comp ;
[0021] Y=Y1+Y comp ;
[0022] Wherein, X1 represents the horizontal coordinate of the bubble at the initial position, X comp represents the position compensation of the horizontal axis, Y1 represents the vertical axis of the bubble at the initial position, and Y comp represents the position compensation amount of the ordinate, Dx, Ex, Dy and Ey are all preset parameters, T represents the temperature of the vial, T0 represents the standard temperature, X represents the abscissa of the compensated bubble position, and Y represents the ordinate of the compensated bubble position.
[0023] In one embodiment of the present application, when the structures of the vials are completely symmetrical, Dx=Dy, Ex=Ey.
[0024] In one embodiment of the present application, in a Cartesian coordinate system, taking into account the zero point drift of the vial, the temperature compensation relationship is expressed by the following formula:
[0025] X comp =X1*(Dx*(T-T0) 2 +Ex*(T-T0))+(Fx*(T-T0)2 +Gx*(T-T0));
[0026] Y comp =Y1*(Dy*(T-T0) 2 +Ey*(T-T0))+(Fy*(T-T0) 2 +Gy*(T-T0));
[0027] X=X1+X comp ;
[0028] Y=Y1+Y comp ;
[0029] Wherein, X1 represents the horizontal coordinate of the bubble at the initial position, X comp represents the position compensation of the horizontal axis, Y1 represents the vertical axis of the bubble at the initial position, and Y comp represents the position compensation amount of the ordinate, Dx, Ex, Dy and Ey are all preset parameters, T represents the temperature of the vial, T0 represents the standard temperature, X represents the abscissa of the compensated bubble position, and Y represents the ordinate of the compensated bubble position.
[0030] In one embodiment of the present application, when the structures of the vials are all symmetrical, Dx=Dy, Ex=Ey, Fx=Fy, and Gx=Gy.
[0031] In an embodiment of the present application, the method further includes: comparing the compensated bubble position with a warning range to determine whether the bubble exceeds the warning range.
[0032] In one embodiment of the present application, the method further includes: outputting and displaying the compensated bubble position.
[0033] To solve the above technical problems, the present application also proposes a level bubble position detection device based on temperature compensation, comprising: a memory for storing instructions executable by a processor; a processor for executing the instructions to implement the level bubble position detection method as described above.
[0034] In order to solve the above technical problems, the present application also proposes a computer-readable medium storing a computer program code, and the computer program code implements the above-mentioned level bubble position detection method when executed by a processor.
[0035] The temperature-compensated level bubble position detection method of the present application constructs a temperature compensation relationship of the bubble at different initial positions, and compensates the initial position of the bubble obtained according to the original calculation model of the level bubble according to the current actual temperature, thereby obtaining the compensated bubble position. Compared with the initial position, the bubble position compensates for the temperature drift of the bubble position detection result caused by the change in bubble size caused by temperature changes, the slight deformation of the detection device, and the change in the characteristics of the photoelectric device, thereby obtaining a more accurate bubble position and avoiding missed alarms or false alarms. At the same time, the level bubble position detection method of the present application does not need to change the original calculation model of the level bubble, is easy to implement, and has low modification costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The accompanying drawings are included to provide a further understanding of the present application. They are included and constitute a part of the present application. The accompanying drawings illustrate embodiments of the present application and together with the present specification serve to explain the principles of the present invention. In the accompanying drawings:
[0037] Figure 1A It is a schematic diagram of the three-dimensional structure of an electronic level bubble;
[0038] Figure 1B yes Figure 1A A schematic side view of an electronic level bubble is shown;
[0039] Figure 2 is an exemplary flow chart of a method for detecting a level bubble position according to an embodiment of the present application;
[0040] Figure 3 It is a schematic diagram of a method for defining the bubble position in a level bubble position detection method according to an embodiment of the present application;
[0041] Figure 4 is a schematic diagram of a temperature compensation relationship obtained by a method for detecting a bubble position of a level bubble according to an embodiment of the present application;
[0042] Figure 5 is a schematic diagram of the temperature compensation relationship of the bubble horizontal coordinate obtained by the level bubble position detection method according to an embodiment of the present application;
[0043] Figure 6 is a schematic diagram of the temperature compensation relationship of the bubble ordinate obtained by the level bubble position detection method according to an embodiment of the present application;
[0044] Figure 7 is a schematic diagram of the temperature compensation relationship of the bubble horizontal coordinate obtained by the level bubble position detection method according to an embodiment of the present application;
[0045] Figure 8is a schematic diagram of the temperature compensation relationship of the bubble ordinate obtained by the level bubble position detection method according to an embodiment of the present application;
[0046] Fig. 9 It is a system block diagram of a device for detecting a bubble position of a level bubble based on temperature compensation according to an embodiment of the present invention. DETAILED DESCRIPTION
[0047] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for the description of the embodiments. Obviously, the drawings described below are only some examples or embodiments of the present application. For ordinary technicians in this field, the present application can also be applied to other similar scenarios based on these drawings without creative work. Unless it is obvious from the language environment or otherwise explained, the same reference numerals in the figures represent the same structure or operation.
[0048] As shown in this application and claims, unless the context clearly indicates an exception, the words "a", "an", "an" and / or "the" do not refer to the singular and may also include the plural. Generally speaking, the terms "include" and "comprise" only indicate the inclusion of the steps and elements that have been clearly identified, and these steps and elements do not constitute an exclusive list. The method or device may also include other steps or elements.
[0049] Unless otherwise specifically stated, the relative arrangement, numerical expressions and numerical values of the parts and steps set forth in these embodiments do not limit the scope of the present application. At the same time, it should be understood that, for ease of description, the sizes of the various parts shown in the accompanying drawings are not drawn according to the actual proportional relationship. The technology, method and equipment known to those of ordinary skill in the relevant field may not be discussed in detail, but in appropriate cases, the technology, method and equipment should be considered as a part of the authorization specification. In all examples shown and discussed here, any specific value should be interpreted as being merely exemplary, rather than as a limitation. Therefore, other examples of exemplary embodiments may have different values. It should be noted that similar reference numerals and letters represent similar items in the following drawings, so that once a certain item is defined in an accompanying drawing, it does not need to be further discussed in subsequent drawings.
[0050] Flowcharts are used in the present application to illustrate the operations performed by the system according to the embodiments of the present application. It should be understood that the preceding or following operations are not necessarily performed accurately in order. On the contrary, various steps may be processed in reverse order or simultaneously. At the same time, other operations may be added to these processes, or one or more operations may be removed from these processes.
[0051] The temperature-compensated vial bubble position detection method, detection device, and computer-readable medium of the present application are suitable for application to any vial device affected by temperature drift, regardless of the specific instrument on which the vial device is arranged.
[0052] Figure 1A It is a schematic diagram of the three-dimensional structure of an electronic level bubble. Figure 1B yes Figure 1A The side view of the electronic level bubble shown in FIG. Figure 1A and Figure 1B Only part of the structure of the electronic level bubble 100 is shown, not all of it. Figure 1A and Figure 1B As shown, the electronic level bubble 100 is cylindrical in shape as a whole and has a certain height h. Figure 1B From the perspective shown, the height h is smaller than its diameter. The electronic level bubble 100 has a sealed shell 110, and the sealed shell 110 has a top 111, a bottom 112 and a shell wall 113. Some liquid is filled in the inner space 120 of the sealed shell 110 to form a bubble 130. In other words, the inner space 120 is filled with liquid and bubble 130. The sealed shell 110 and the liquid and bubble 130 inside it constitute a physical level bubble.
[0053] like Figure 1A As shown, two light emitting devices D1, D2 and two receiving devices Q1, Q2 are equally spaced on the circumference above the top 111 to detect the position of the bubble. When in use, the light emitted by the light emitting devices D1, D2 is reflected and / or refracted by the bubble 130 and reflected by the bottom 112, and the reflected and refracted light is received by the receiving devices Q1, Q2 and converted into electrical signals, which are processed and used to calculate the position of the bubble 130.
[0054] like Figure 1A As shown, a marking circle 140 is also provided on the top 111 to assist in determining whether the bubble 130 deviates from the center and the degree of deviation. In some cases, when the bubble 130 contacts the marking circle 140, the control unit of the electronic level 100 will issue an alarm to remind the user that the degree of deviation of the bubble 130 has reached a level that requires attention.
[0055] Figure 1A and Figure 1B It is merely an example of an electronic level bubble that can be applied to the level bubble position detection method of the present application, and is not intended to limit the specific structure, number of photoelectric devices, etc. of the electronic level bubble.
[0056] After long-term observation, experiment, research and analysis, the inventor of this application found that temperature changes have a certain impact on the size of bubbles. People usually think that due to thermal expansion and contraction, bubbles will become larger when the temperature rises. However, the inventor of this application found that when the temperature rises, the bubbles in the vial will become smaller. After analysis, the reasons for this phenomenon are as follows: the outer shell of the physical vial, such as Figure 1A The sealed shell 110 in the figure is solid, and the thermal expansion coefficient of solid is relatively small. The volume of the shell does not change much after the temperature rises. The thermal expansion coefficient of liquid is relatively large, so after the temperature rises, the volume of the liquid inside the sealed shell 110 will increase. The thermal expansion coefficient of gas is even larger. In theory, the volume of the bubble 130 inside the sealed shell 110 should also increase, but the size of the internal space 120 is almost unchanged, while the liquid can hardly be compressed, and the gas is very easy to be compressed, so the thermal expansion of the liquid dominates the distribution of the internal volume, resulting in the expansion of the liquid after the temperature rises, and the bubble becomes smaller instead. This leads to the fact that when the temperature changes, the position of the bubble calculated by the original calculation model may be inaccurate. For example, at a normal temperature of 25°C, the size of the bubble is a standard size. At this time, a standard photoelectric signal change is obtained through the photoelectric device. The photoelectric signal change refers to the change in the photoelectric signal at this time compared with the signal when the bubble is at the center position. Assuming that the electronic level uses the photoelectric signal to calculate the bubble position as X=1mm, Y=0mm, XY is the horizontal axis and vertical axis in the Cartesian coordinate system, the bubble position indicates that the bubble is offset 1mm to the right from the center of the level, and just touches the mark circle, then an alarm should be issued. When the temperature rises to 35°C, the bubble becomes smaller, and the effect of the bubble on the optical path becomes smaller. If the bubble position is also offset 1mm to the right from the center of the level, the change in the photoelectric signal is smaller than that at 25°C. The electronic level uses the photoelectric signal to calculate the bubble position as X=0.9mm, Y=0mm. Since X does not reach 1mm, it is considered that there is no contact with the mark circle, and no alarm is issued, that is, a missed alarm. This is because the temperature drift causes the offset of the bubble position detection, thus affecting the reliability of the electronic level.
[0057] Figure 2 It is an exemplary flow chart of a method for detecting the position of a level bubble according to an embodiment of the present application.
[0058] refer to Figure 2 As shown, the level bubble position detection method comprises the following steps:
[0059] Step S210: obtaining the current temperature of the vial and the initial position of the bubble, where the initial position is the original detection result of the vial;
[0060] Step S220: obtaining a temperature compensation relationship between the temperature of the level bubble and the position compensation amount of the bubble when the bubble is at the initial position, wherein the temperature compensation relationship includes a one-to-one correspondence between multiple temperatures and multiple position compensation amounts;
[0061] Step S230: obtaining a current position compensation amount of the bubble corresponding to the initial position and the current temperature according to the temperature compensation relationship; and
[0062] Step S240: using the current position compensation amount to compensate the current position to obtain a compensated bubble position.
[0063] The above steps S210 to S240 are described below with reference to the accompanying drawings.
[0064] In step S210, the current temperature refers to the current temperature of the working environment where the vial is located. The present application does not limit how to obtain the current temperature of the vial. In some embodiments, a temperature sensor can be set near the vial to obtain the working environment temperature of the vial. The present application does not limit the location and method of setting the temperature sensor. The temperature sensor can be set on the vial, for example, connected to the outer shell of the vial, or it can be set on the instrument where the vial is located, or it can be independently set in the working environment where the instrument is located.
[0065] The initial position of the bubble in step S210 is the position detection result obtained by the calculation model of the level bubble according to the photoelectric signal before compensation.
[0066] It should be noted that the position of the bubble is represented by the center position of the bubble. Figure 3 FIG. 1 is a schematic diagram of a method for defining the bubble position in a level bubble detection method according to an embodiment of the present application. Figure 3 As shown, the shell outline 310, the marking circle 320 and the bubble outline 330 of the vial are represented by three circles respectively. Figure 3 A Cartesian coordinate system OXY is also shown in FIG. 3 . Assuming that the bubble is an ideal circle, when the center of the bubble outline 330 is located at the origin O of the vial system, it indicates that the vial is in a horizontal state. When the vial is tilted, the position of the bubble also shifts, and the center position of the bubble outline 330 deviates from the origin O, as shown in FIG. Figure 3 As shown in FIG. 3 , the center position of the deviated bubble contour 331 is O′.
[0067] In other embodiments, at a certain actual bubble position, when the temperature changes, the change in the initial position is mainly caused by the change in the size of the bubble, and the initial position and the size of the bubble change simultaneously. In step S220, the temperature compensation relationship corresponds to the initial position of the bubble.
[0068] In some embodiments, the temperature compensation relationship at the initial position of the bubble is obtained by the following steps:
[0069] Step S221: At standard temperature, obtain the actual position of the bubble.
[0070] The present application does not limit the specific value of the standard temperature. Assuming that the standard temperature is 25° C., the actual position of the bubble at this time is assumed to be O′ obtained in step S210 .
[0071] Step S222: Under multiple different temperatures, multiple initial positions of the bubble are obtained. The initial positions are original detection results of the level bubble. The original detection results are affected by factors such as temperature drift and may be inaccurate.
[0072] Special tests can be designed to obtain the temperature compensation relationship. For example, the vial is placed in a temperature-adjustable container. The temperature of the space in the container is controlled by heating and cooling, so that the vial is placed in different temperature environments, and multiple initial positions of the bubble obtained by the electronic vial at a certain actual bubble position at different temperatures are obtained.
[0073] In some embodiments, the multiple different temperatures include at least 3 different temperatures, and correspondingly at least 3 corresponding actual positions are also recorded.
[0074] Step S223: obtaining position compensation at different temperatures according to the difference between the actual position and the initial position, thereby obtaining the temperature compensation relationship between the temperature of the vial and the position compensation of the bubble when the bubble is at the initial position.
[0075] The present application does not limit the specific form of the temperature compensation relationship. In some embodiments, the temperature compensation relationship is represented by a temperature compensation curve. In other embodiments, the temperature compensation relationship is represented by a table, which records the mapping relationship between different temperatures and the actual position of the bubble.
[0076] Preferably, the present application uses a temperature compensation curve to represent the temperature compensation relationship. By obtaining the initial positions of the bubbles at multiple different temperatures, the curve fitting method is used for fitting, and the data points at the same initial position at different temperatures are respectively fitted into continuous curves, so as to obtain multiple temperature compensation curves corresponding to different initial positions, which is conducive to obtaining the corresponding current position compensation amount according to the initial position and current temperature of the level bubble, even if the current temperature is not any of the multiple different temperatures. It should be noted that the range of the multiple temperatures should preferably cover all possible working environment temperatures of the level bubble, that is, all working environment temperatures of the instrument and equipment installed with the level bubble.
[0077] Figure 4FIG. 1 is a schematic diagram of the temperature compensation relationship obtained by the method for detecting the position of a level bubble according to an embodiment of the present application. Figure 4 As shown, the temperature compensation relationship is represented by a temperature compensation curve, with the horizontal axis being the temperature T and the vertical axis being the temperature compensation value R comp . Figure 4 R1 shown in is the polar diameter of the bubble's initial position in polar coordinates. Assuming that the polar diameter R1 of the initial position is 1 mm, the corresponding temperature compensation relationship is the temperature compensation curve 420 . Figure 4 Also shown are temperature compensation curves for two other initial positions, including a temperature compensation curve 410 when the initial position is R1 = 2 mm, and a temperature compensation curve 430 when the initial position is R1 = 0.5 mm.
[0078] like Figure 4 As shown, for a certain initial position, there is a one-to-one correspondence between the temperature and the position compensation amount. For a certain temperature, the corresponding position compensation amount is different according to the different initial positions, and there is also a one-to-one correspondence between the initial position and the position compensation amount. One-to-one correspondence does not mean that the corresponding values are different, they can also be the same. When the temperature is T0, regardless of the initial position, the position compensation amount is 0.
[0079] Without considering the zero drift caused by other factors of the bubble, the temperature compensation R corresponding to the three curves at the standard temperature T0 comp are all zero, indicating that the position of the bubble does not need to be compensated at the standard temperature T0.
[0080] In some embodiments, in all temperature compensation relationships, the position compensation amount is proportional to the polar diameter of the bubble in the polar coordinate system. Figure 4 As shown, the increase of R1 indicates the increase of the polar diameter of the bubble in the polar coordinate system. At the same temperature T, the larger the R1, the larger the position compensation amount, which is manifested as a larger slope of the quadratic curve.
[0081] In some embodiments, in a polar coordinate system, the position of the bubble is represented by a polar diameter, and the temperature compensation relationship obtained in step S220 is represented by the following formula (1):
[0082] R comp =R1*(D*(T-T0) 2 +E*(T-T0)) (1)
[0083] Among them, R1 represents the polar diameter of the bubble at the initial position, R comp It indicates the position compensation amount, D and E are preset parameters, T indicates the temperature of the vial, and T0 indicates the standard temperature.
[0084] Figure 4The three curves shown in can all be obtained by curve fitting using the above formula (1). In other embodiments, other formulas can also be used for curve fitting, and this application does not limit this.
[0085] refer to Figure 2 As shown, in step S230, the current position compensation amount corresponding to the initial position and current temperature of the bubble can be obtained according to the corresponding temperature compensation curve. Assuming that the initial position R1=1mm obtained in step S210 and the current temperature is T1, then reference Figure 4 The temperature compensation curve 420 in the figure is used to obtain the current position compensation value R when the temperature is T1. comp1 .
[0086] In step S240, the current position compensation value R is used. comp1 The current position is compensated to obtain a compensated bubble position R. For example, the following formula (2) is used to calculate the polar diameter R under the compensated bubble position:
[0087] R=R1+R comp (2)
[0088] R represents the polar diameter of the compensated bubble position, R comp This is the position compensation in formula (1).
[0089] refer to Figure 4 , when the temperature is less than T0, the position compensation amount R comp A negative value indicates that when the temperature is lower than the standard temperature T0, the diameter of the bubble becomes larger due to the cold contraction of the liquid, the change in the photoelectric signal becomes larger, and the initial position moves further away from the origin of the coordinate system. If this calculation result is followed, a false alarm may occur. Therefore, by using the detection method of the present application, the polar diameter of the detected bubble position can be reduced on the basis of R1 through temperature compensation to avoid false alarms.
[0090] Therefore, through the above steps S210 to S240, the bubble position detected by the level bubble at the current temperature can be temperature compensated to obtain a bubble position R closer to or equal to the actual position, thereby eliminating the influence of temperature drift on the bubble detection result.
[0091] In some embodiments, the order of the above steps S210 and S220 can be swapped. The temperature compensation relationship under multiple initial positions can be obtained in advance and stored in the processor. When the level bubble is working, the relevant temperature compensation curve can be called according to the initial position to perform compensation calculation. Therefore, the level bubble position detection method of the present application does not need to change the original calculation model of the level bubble, which is easy to implement and has low modification cost. Of course, if the technicians are not afraid of trouble during implementation, the original calculation model of the level bubble is integrated with the temperature compensation relationship mentioned above, which also belongs to the spirit of the present invention. Or the temperature compensation is pre-set to the temperature compensation of the photoelectric signal, and then the exact position of the level bubble is calculated by the temperature-compensated photoelectric signal, which also belongs to the spirit of the present invention.
[0092] In other embodiments, in the temperature compensation relationship, the position compensation amount is proportional to the abscissa and ordinate of the bubble in the Cartesian coordinate system.
[0093] Figure 5 It is a schematic diagram of the temperature compensation relationship of the bubble horizontal coordinate obtained by the level bubble position detection method according to an embodiment of the present application. Figure 6 FIG. 1 is a schematic diagram of the temperature compensation relationship of the bubble ordinate obtained by the level bubble position detection method according to an embodiment of the present application. Figure 5 As shown, the horizontal axis is temperature T and the vertical axis is temperature compensation X comp . Combined Figure 3 As shown, Figure 5 X1 in represents the horizontal coordinate of the initial position in the Cartesian coordinate system. Figure 6 As shown, the horizontal axis is temperature T and the vertical axis is temperature compensation Y comp . Combined Figure 3 As shown, Figure 6 Y1 in the figure represents the ordinate of the initial position in the Cartesian coordinate system.
[0094] Compared with the polar coordinate system, the Cartesian coordinate system needs to consider the displacement of the bubble in both the horizontal and vertical directions. Although it seems more complicated, in non-ideal situations where the optoelectronic devices are not arranged strictly symmetrically, the calculation results of the two dimensions obtained by the Cartesian coordinate system may be more accurate than the calculation results of one dimension in the polar coordinate system.
[0095] In the embodiment of using Cartesian coordinate system for position calculation, the center position coordinates of the bubble are used to represent the position of the bubble, and the temperature compensation relationship is represented by the following formula (3) and formula (4):
[0096] X comp =X1*(Dx*(T-T0) 2+Ex*(T-T0)) (3)
[0097] Y comp =Y1*(Dy*(T-T0) 2 +Ey*(T-T0)) (4)
[0098] Among them, X1 represents the horizontal coordinate of the center position of the bubble at the initial position, X comp represents the position compensation of the horizontal axis, Y1 represents the vertical coordinate of the center position of the bubble at the initial position, and Y comp It indicates the position compensation of the ordinate. Dx, Ex, Dy and Ey are all preset parameters. T indicates the temperature of the vial and T0 indicates the standard temperature.
[0099] according to Figure 5 and Figure 6 As shown in the figure, the larger the horizontal coordinate X1 of the bubble at the initial position, the larger the corresponding position compensation X at the same temperature. comp The larger the bubble is, the larger the vertical coordinate Y1 of the bubble at the initial position is. At the same temperature, the corresponding position compensation amount Y comp The larger the value, the greater the temperature compensation curve. The above embodiment adopts formula (3) and formula (4) to fit the temperature compensation curve. In other embodiments, other formulas can also be used for curve fitting, and this application does not limit this.
[0100] According to the above embodiment, in step S240, the following formula (5) and formula (6) may be used to calculate the abscissa X and ordinate Y of the compensated bubble position:
[0101] X=X1+X comp (5)
[0102] Y=Y1+Y comp (6)
[0103] In some embodiments, when the structure of the vial is completely symmetrical, Dx=Dy, Ex=Ey in formula (3) and formula (4).
[0104] In some cases, in the Cartesian coordinate system, taking into account the zero drift of other components of the vial, the temperature compensation relationship can also be expressed by the following formula:
[0105] X comp =X1*(Dx*(T-T0) 2 +Ex*(T-T0))+(Fx*(T-T0) 2 +Gx*(T-T0)) (7)
[0107] Y comp =Y1*(Dy*(T-T0)2 +Ey*(T-T0))+(Fy*(T-T0) 2 +Gy*(T-T0))(8)
[0108] Among them, X1 represents the horizontal coordinate of the bubble at the initial position, X comp represents the position compensation of the horizontal axis, Y1 represents the vertical coordinate of the bubble at the initial position, and Y comp It represents the position compensation of the ordinate. Dx, Ex, Dy, Ey, Fx, Fy, Gx and Gy are all preset parameters. T represents the temperature of the vial, and T0 represents the standard temperature.
[0109] The causes of zero-point drift of other components include, but are not limited to, slight deformation of the detection device caused by temperature influence, characteristic changes of the photoelectric device, etc.
[0110] According to the above embodiment, in step S240, the above formula (5) and formula (6) may be used to calculate the abscissa X and ordinate Y of the compensated bubble position.
[0111] Figure 7 It is a schematic diagram of the temperature compensation relationship of the bubble horizontal coordinate obtained by the level bubble position detection method according to an embodiment of the present application. Figure 8 FIG. 1 is a schematic diagram of the temperature compensation relationship of the bubble ordinate obtained by the level bubble position detection method according to an embodiment of the present application. Figure 7 As shown, the horizontal axis is temperature T and the vertical axis is temperature compensation X comp . Combined Figure 3 As shown, Figure 7 X1 in the equation represents the horizontal coordinate of the bubble position O' in the Cartesian coordinate system. Figure 8 As shown, the horizontal axis is temperature T and the vertical axis is temperature compensation Y comp . Combined Figure 3 As shown, Figure 8 Y1 in represents the ordinate of the bubble position O' in the Cartesian coordinate system.
[0112] and Figure 5 , Figure 6 The difference of the embodiment shown is that when generating the temperature compensation curve, Figure 7 , Figure 8 The embodiment shown takes into account the zero point drift of other components of the vial, and adds (Fx*(T-T0)) to the fitting formula (7) and formula (8) respectively. 2 +Gx*(T-T0)) and (Fy*(T-T0) 2 +Gy*(T-T0)). Figure 7 As shown, in this embodiment, the curve when X1=0 mm is also included, such as Figure 8As shown, in this embodiment, it also includes the curve when Y1 = 0 mm. These two curves indicate that when the position of the bubble is at the center position of the spirit level, its position will also drift with different temperatures. Therefore, using the above formulas (7) and (8) can compensate for temperature drift more accurately. Similarly, formulas (7) and (8) are only examples and are not used to limit the actual curve fitting formula.
[0113] In the embodiment using formulas (7) and (8), when the structure of the spirit level is completely symmetrical, Dx = Dy, Ex = Ey, Fx = Fy, Gx = Gy.
[0114] It can be understood that when considering the zero drift of other components, a similar transformation can also be performed on the temperature compensation relationship in the polar coordinate system shown in formula (1) to obtain the following formula (9):
[0115] R comp = R1 * (D * (T - T0) 2 + E * (T - T0)) + (F * (T - T0) 2 + G * (T - T0)) (9)
[0116] Where D, E, F, and G are all preset parameters, and the meanings of the other letters are the same as those in formula (1).
[0117] In some embodiments, the method for detecting the position of the bubble in the spirit level of the present application further includes: comparing the compensated bubble position with a warning range to determine whether the bubble exceeds the warning range. Here, the warning range can be characterized by the Figure 3 shown marking circle 320, or it can also be a warning range stored in the processor.
[0118] Comparing the bubble position with the warning range can be done by comparing magnitudes. For example, assume that the bubble position after temperature compensation is R = 0.9 mm, and the warning range is Rwarning = 1 mm. Since R < Rwarning, it is determined that the bubble does not exceed the warning range.
[0119] Comparing the bubble position with the warning range can also be done by subtracting the two and comparing the difference with a preset threshold. If the difference is greater than the preset threshold, it is determined to exceed the warning range. For example, assume that the bubble position is R = 0.9 mm, the warning range is Rwarning = 1 mm, and the preset threshold is 0.1 mm. Since Rwarning - R = 0.1 mm, it is determined that the bubble exceeds the warning range.
[0120] There can be other setting methods for determining whether the bubble exceeds the warning range, and the present application does not limit this.
[0121] In some embodiments, the level bubble is connected to a visual display device for displaying some relevant information including the bubble position. In these embodiments, the level bubble bubble position detection method of the present application also includes: outputting and displaying the compensated bubble position. The present application does not limit how to display the bubble position. In some embodiments, a top view schematic diagram of the level bubble and the position of the bubble therein are simultaneously displayed on the display device, and the specific position is displayed digitally. When the bubble position exceeds the warning range, the display device also gives an alarm in various forms such as flashing lights, making sounds, and pop-up windows.
[0122] The present application also includes a temperature-compensated level bubble position detection device, comprising a memory and a processor, wherein the memory is used to store instructions executable by the processor; the processor is used to execute the instructions to implement the temperature-compensated level bubble position detection method described above.
[0123] In some embodiments, the memory is also used to store data involved in the detection method, temperature compensation relationship, temperature compensation relationship curve parameters, etc.
[0124] In some embodiments, the processor is a microprocessor MCU, and a temperature sensor for obtaining temperature is set in the MCU. The MCU is set near a physical level bubble. The two may be in contact with each other or not. If the temperatures of the two are almost the same, the temperature measurement result of the temperature sensor can be used as the temperature of the level bubble, without the need to set an additional temperature sensor externally.
[0125] Fig. 9 1 is a system block diagram of a device for detecting the position of a level bubble based on temperature compensation according to an embodiment of the present invention. Fig. 9As shown, the level bubble position detection device 900 may include an internal communication bus 901, a processor 902, a read-only memory (ROM) 903, a random access memory (RAM) 904, and a communication port 905. When applied on a personal computer, the level bubble position detection device 900 may also include a hard disk 906. The internal communication bus 901 can realize data communication between the components of the level bubble position detection device 900. The processor 902 can make judgments and issue prompts. In some embodiments, the processor 902 can be composed of one or more processors. The communication port 905 can realize data communication between the level bubble position detection device 900 and the outside. In some embodiments, the level bubble position detection device 900 can send and receive information and data from the network through the communication port 905. The level bubble position detection device 900 may also include different forms of program storage units and data storage units, such as a hard disk 906, a read-only memory (ROM) 903 and a random access memory (RAM) 904, which can store various data files used for computer processing and / or communication, and possible program instructions executed by the processor 902. The processor executes these instructions to implement the main part of the method. The results processed by the processor are transmitted to the user device through the communication port and displayed on the user interface.
[0126] The above-mentioned level bubble position detection method can be implemented as a computer program, stored in the hard disk 906, and loaded into the processor 902 for execution to implement the level bubble position detection method of the present application.
[0127] The present invention also includes a computer-readable medium storing a computer program code, which, when executed by a processor, implements the level bubble position detection method described above.
[0128] When the level bubble position detection method based on temperature compensation is implemented as a computer program, it can also be stored in a computer-readable storage medium as a product. For example, a computer-readable storage medium may include, but is not limited to, a magnetic storage device (e.g., a hard disk, a floppy disk, a magnetic strip), an optical disk (e.g., a compact disk (CD), a digital versatile disk (DVD)), a smart card, and a flash memory device (e.g., an electrically erasable programmable read-only memory (EPROM), a card, a stick, a key drive). In addition, the various storage media described herein can represent one or more devices and / or other machine-readable media for storing information. The term "machine-readable medium" may include, but is not limited to, wireless channels and various other media (and / or storage media) that can store, contain and / or carry code and / or instructions and / or data.
[0129] It should be understood that the embodiments described above are only illustrative. The embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or any combination thereof. For hardware implementation, the processor may be implemented in one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), processors, controllers, microcontrollers, microprocessors, and / or other electronic units designed to perform the functions described herein, or a combination thereof.
[0130] Some aspects of the present application may be performed entirely by hardware, entirely by software (including firmware, resident software, microcode, etc.), or by a combination of hardware and software. The above hardware or software may be referred to as "data blocks", "modules", "engines", "units", "components" or "systems". The processor may be one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DAPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), processors, controllers, microcontrollers, microprocessors, or combinations thereof. In addition, various aspects of the present application may be expressed as computer products located in one or more computer-readable media, which include computer-readable program codes. For example, computer-readable media may include, but are not limited to, magnetic storage devices (e.g., hard disks, floppy disks, tapes ...), optical disks (e.g., compact disks CDs, digital versatile disks DVDs ...), smart cards, and flash memory devices (e.g., cards, sticks, key drives ...).
[0131] A computer-readable medium may include a propagated data signal containing computer program code, such as in baseband or as part of a carrier wave. The propagated signal may have a variety of manifestations, including electromagnetic, optical, etc., or a suitable combination. A computer-readable medium may be any computer-readable medium other than a computer-readable storage medium, which may be connected to an instruction execution system, device or apparatus to communicate, propagate or transmit a program for use. The program code on the computer-readable medium may be propagated via any suitable medium, including radio, cable, fiber optic cable, radio frequency signal, or similar medium, or any combination of the above mediums.
[0132] The basic concepts have been described above. Obviously, for those skilled in the art, the above invention disclosure is only used as an example and does not constitute a limitation of the present application. Although not explicitly stated herein, those skilled in the art may make various modifications, improvements and amendments to the present application. Such modifications, improvements and amendments are suggested in the present application, so such modifications, improvements and amendments still belong to the spirit and scope of the exemplary embodiments of the present application.
[0133] At the same time, the present application uses specific words to describe the embodiments of the present application. For example, "one embodiment", "an embodiment", and / or "some embodiments" refer to a certain feature, structure or characteristic related to at least one embodiment of the present application. Therefore, it should be emphasized and noted that "one embodiment" or "an embodiment" or "an alternative embodiment" mentioned twice or more in different positions in this specification does not necessarily refer to the same embodiment. In addition, some features, structures or characteristics in one or more embodiments of the present application can be appropriately combined.
[0134] In some embodiments, numbers describing the number of components and attributes are used. It should be understood that such numbers used in the description of the embodiments are modified by the modifiers "about", "approximately" or "substantially" in some examples. Unless otherwise specified, "about", "approximately" or "substantially" indicate that the numbers are allowed to vary by ±20%. Accordingly, in some embodiments, the numerical parameters used in the specification and claims are approximate values, which may change according to the required features of individual embodiments. In some embodiments, the numerical parameters should take into account the specified significant digits and adopt the general method of retaining digits. Although the numerical domains and parameters used to confirm the breadth of their range in some embodiments of the present application are approximate values, in specific embodiments, the setting of such numerical values is as accurate as possible within the feasible range.
Claims
1. A method for detecting the position of a level bubble based on temperature compensation, characterized in that: include: Obtaining the current temperature of the vial and the initial position of the bubble, wherein the initial position is the original detection result of the vial; Obtaining a temperature compensation relationship between the temperature of the vial and the position compensation amount of the bubble when the bubble is at the initial position, wherein the temperature compensation relationship includes a one-to-one correspondence between a plurality of temperatures and a plurality of position compensation amounts; Obtaining a current position compensation amount of the bubble corresponding to the initial position and the current temperature according to the temperature compensation relationship; and The current position is compensated using the current position compensation amount to obtain a compensated bubble position.
2. The method for detecting the position of a level bubble as claimed in claim 1, characterized in that: The temperature compensation relationship is obtained according to the following steps: At standard temperature, obtaining the actual position of the bubble; At a plurality of different temperatures, obtaining a plurality of initial positions of the bubble; The position compensation amount at different temperatures is obtained according to the difference between the actual position and the initial position, thereby obtaining the temperature compensation relationship between the temperature of the vial and the position compensation amount of the bubble when the bubble is at the initial position.
3. The method for detecting the position of a level bubble as claimed in claim 1, characterized in that: In the temperature compensation relationship, the position compensation amount is proportional to the polar diameter of the bubble in the polar coordinate system.
4. The method for detecting the position of a level bubble as claimed in claim 2, characterized in that: In the polar coordinate system, the position of the bubble is represented by the polar diameter, and the temperature compensation relationship is represented by the following formula: R comp =R1*(D*(T-T0) 2 +E*(T-T0)); R=R1+R comp ; Wherein, R represents the polar diameter of the compensated bubble position, R1 represents the polar diameter of the bubble at the initial position, and R comp represents the position compensation amount, D and E are preset parameters, T represents the temperature of the vial, and T0 represents the standard temperature.
5. The method for detecting the position of a level bubble as claimed in claim 2, characterized in that: In the polar coordinate system, the position of the bubble is represented by the polar diameter, and the temperature compensation relationship is represented by the following formula: R comp =R1*(D*(T-T0) 2 +E*(T-T0))+(F*(T-T0) 2 +G*(T-T0)); R=R1+R comp ; Wherein, R represents the polar diameter of the compensated bubble position, R1 represents the polar diameter of the bubble at the initial position, and R comp represents the position compensation amount, D, E, F, G are all preset parameters, T represents the temperature of the vial, and T0 represents the standard temperature.
6. The method for detecting the position of a level bubble as claimed in claim 1, characterized in that: In the temperature compensation relationship, the position compensation amount is proportional to the abscissa and ordinate of the bubble in the Cartesian coordinate system.
7. The method for detecting the position of a level bubble as claimed in claim 2, characterized in that: In the Cartesian coordinate system, the temperature compensation relationship is expressed by the following formula: X comp =X1*(Dx*(T-T0) 2 +Ex*(T-T0)); Y comp =Y1*(Dy*(T-T0) 2 +Ey*(T-T0)); X=X1+X comp ; Y=Y1+Y comp ; Wherein, X1 represents the horizontal coordinate of the bubble at the initial position, X comp represents the position compensation of the horizontal axis, Y1 represents the vertical axis of the bubble at the initial position, and Y comp represents the position compensation amount of the ordinate, Dx, Ex, Dy and Ey are all preset parameters, T represents the temperature of the vial, T0 represents the standard temperature, X represents the abscissa of the compensated bubble position, and Y represents the ordinate of the compensated bubble position.
8. The method for detecting the position of a level bubble as claimed in claim 7, characterized in that: When the structure of the vial is completely symmetrical, Dx=Dy, Ex=Ey.
9. The method for detecting the position of a level bubble as claimed in claim 2, characterized in that: In a Cartesian coordinate system, taking into account the zero point drift of the vial, the temperature compensation relationship is expressed by the following formula: X comp =X1*(Dx*(T-T0) 2 +Ex*(T-T0))+(Fx*(T-T0) 2 +Gx*(T-T0)); Y comp =Y1*(Dy*(T-T0) 2 +Ey*(T-T0))+(Fy*(T-T0) 2 +Gy*(T-T0)); X=X1+X comp ; Y=Y1+Y comp ; Wherein, X1 represents the horizontal coordinate of the bubble at the initial position, X comp represents the position compensation of the horizontal axis, Y1 represents the vertical axis of the bubble at the initial position, and Y comp represents the position compensation amount of the vertical coordinate, Dx, Ex, Dy, Ey, Fx, Fy, Gx and Gy are all preset parameters, T represents the temperature of the level bubble, T0 represents the standard temperature, X represents the horizontal coordinate of the compensated bubble position, and Y represents the vertical coordinate of the compensated bubble position.
10. The method for detecting the position of a level bubble according to claim 9, wherein: When the structure of the vial is completely symmetrical, Dx=Dy, Ex=Ey, Fx=Fy, Gx=Gy.
11. The method for detecting the position of a level bubble according to claim 1, wherein: Also includes: The compensated bubble position is compared with the warning range to determine whether the bubble exceeds the warning range.
12. The method for detecting the position of a level bubble according to claim 1, wherein: Also includes: The compensated bubble position is output and displayed.
13. A level bubble position detection device based on temperature compensation, comprising: a memory for storing instructions executable by a processor; A processor, used to execute the instructions to implement the level bubble position detection method as described in any one of claims 1-12.
14. A computer-readable medium storing computer program codes, wherein the computer program codes, when executed by a processor, implement the level bubble position detection method according to any one of claims 1 to 12.
