Indoor air pressure altitude estimation method based on temperature compensation and support vector regression
By using the temperature compensation and support vector regression methods in indoor three-dimensional positioning technology, the air pressure data is corrected, which solves the problem of insufficient air pressure data accuracy in complex indoor environments, and achieves higher air pressure and height estimation accuracy.
Patent Information
- Application Number
- CN202411910252.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2044-12-24
AI Technical Summary
The existing indoor three-dimensional positioning technology has shortcomings in the accuracy and cost of measuring height, especially in complex and dynamic environments, the air pressure data is greatly affected by factors such as temperature, resulting in low altitude estimation accuracy.
The indoor air pressure altitude estimation method based on temperature compensation and support vector regression is adopted. By combining temperature compensation and machine learning technology, the air pressure data is corrected, and the temperature compensation and support vector regression air pressure model is constructed to improve the air pressure and height estimation accuracy.
Effectively respond to the impact of complex, dynamic and variable indoor environment on air pressure, improve the accuracy of air pressure and height estimation, and fill the research gap in the correlation between indoor temperature and air pressure changes.
Smart Images

Figure CN119354143B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of indoor altitude estimation, and in particular to an indoor air pressure altitude estimation method based on temperature compensation and support vector regression. Background Art
[0002] With the rapid development of society and the rapid innovation of science and technology, people are paying more attention to the acquisition of information and the demand for location services is more urgent. Simple two-dimensional plane positioning is no longer sufficient to support the needs of human work and life, so indoor three-dimensional positioning technology has become an urgent problem to be solved.
[0003] At present, the mainstream indoor three-dimensional positioning technologies include radio frequency identification, WiFi, and visible light. The biggest difference between three-dimensional positioning and two-dimensional positioning is the determination of elevation. However, the height measurement accuracy of the above three-dimensional positioning technologies varies greatly, and the deployment costs vary. They are not effectively applied to accurate indoor height positioning. At present, some scholars have conducted research on using barometers to estimate elevation differences to assist floor positioning. The relationship between elevation difference and air pressure difference is used, that is, atmospheric pressure decreases with increasing elevation. A barometric height measurement model is established, and the difference in air pressure between two horizontal planes is used to calculate the elevation difference, and then the relative elevation or absolute elevation of the point to be measured is calculated.
[0004] Among them, the height estimation method based on the built-in barometer of a smartphone has sufficient research significance. Using the built-in barometer of a mobile phone to measure the air pressure at the test point and the reference point can make it easier to obtain the air pressure data at the test point and the reference point, greatly enhancing the accuracy and convenience of indoor height measurement. However, air pressure is greatly affected by the complex and dynamic indoor environment such as temperature, humidity, and airflow, with temperature being the most significant. Currently, there are few studies on the correlation between indoor temperature changes and air pressure changes.
[0005] Therefore, the present invention will fill the current deficiencies in this regard, use a combination of multiple data correction methods including temperature compensation and machine learning to correct the air pressure data, and perform gravity and temperature corrections on the air pressure altimetry model, thereby improving the overall accuracy. Summary of the invention
[0006] The purpose of the present invention is to provide an indoor air pressure altitude estimation method based on temperature compensation and support vector regression, which uses a combination of temperature compensation and machine learning data correction methods to correct the air pressure data, and constructs a temperature compensation and support vector regression air pressure model. It can well cope with the impact of the complex, dynamic and changeable indoor environment on the air pressure, improve the accuracy of air pressure and altitude estimation, and fill the research gap associated with indoor temperature and air pressure changes.
[0007] To achieve the above object, the present invention provides a method for estimating indoor air pressure height based on temperature compensation and support vector regression, comprising the following steps:
[0008] Step S1, using a mobile terminal device with a built-in barometer and temperature sensor to measure the air pressure and temperature at the test point and the reference point, and obtaining the air pressure and temperature data at the test point and the reference point;
[0009] Step S2, smoothing the collected air pressure and temperature data using moving average filtering;
[0010] Step S3, constructing a temperature compensated air pressure model based on the measured temperature compensated air pressure values of the reference point and the point to be measured;
[0011] Step S4, constructing a support vector regression air pressure model using the air pressure value after temperature compensation;
[0012] Step S5: Based on the local gravitational acceleration and average temperature, the pressure-altitude formula is corrected to construct a barometric altimetry correction model.
[0013] Preferably, in step S1, the mobile terminal device synchronously collects temperature and air pressure values, and at the same time, the device at the reference point broadcasts the real-time temperature and air pressure values at the reference point in the form of a broadcast; wherein, the device at the reference point is a device that integrates Bluetooth, a temperature sensor, and an air pressure sensor, and broadcasts the temperature and air pressure at a certain frequency.
[0014] Preferably, in step S3, a temperature-compensated air pressure model is constructed based on the measured temperature-compensated air pressure values of the reference point and the point to be measured, as shown below:
[0015] (1);
[0016] Where P is the corrected air pressure value, is the air pressure value after smoothing. is the temperature value of the point to be measured, is the standard atmospheric temperature at sea level, denoted as 288.15 K. a and b are model correction parameters, representing the slope and slope range of the model respectively.
[0017] Preferably, in step S4, a support vector regression pressure model is constructed using the temperature-compensated pressure value, and the specific process is as follows:
[0018] Step S41: Perform nonlinear modeling on the input and output air pressure value data, construct a hyperplane in the high-dimensional feature space, and establish the relationship between the input and output variables, as shown below:
[0019] (2);
[0020] in, is a regression model; is the regression parameter vector, for The transpose of It is the nonlinear mapping of samples in high-dimensional space in nonlinear regression; is bias;
[0021] Step S42: construct a support vector regression model When the training sample is within the interval, it means that the prediction result is accurate, regardless of the loss, ensuring the robustness of the model. According to the principle of minimum loss, the support vector machine problem is transformed into the following form:
[0022] (3);
[0023] in, is the regularization constant; is the number of samples; is the model value; is the actual value; It is an insensitive loss function. When the training sample falls within the interval band, the value is 0, otherwise it is counted as a loss. The loss calculation formula is as follows:
[0024] (4);
[0025] Step S43: Introducing non-negative multipliers , , the Lagrange multiplier method is used to solve the dual problem of the original problem. To ensure the equivalence of the original problem and the dual problem, the KKT condition must be satisfied, and the dual problem is:
[0026] (5);
[0027] in, is the kernel function; the constraints are as follows:
[0028] (6);
[0029] Step S44, solve the above problem and obtain the solution of the support vector regression problem in the form of:
[0030] (7).
[0031] Preferably, in step S5, the pressure-altitude formula is corrected based on the local gravity acceleration and average temperature to construct a barometric altimetry correction model. The specific process is as follows:
[0032] Step S51, using the Helmert formula to calculate the local gravity acceleration, so as to improve the accuracy of the result, that is, the gravity acceleration correction formula is as follows:
[0033] (8);
[0034] Where g is the acceleration due to gravity; is the local latitude, in degrees. From formula (8), we can see that the local gravitational acceleration g is determined by the local latitude and has a nonlinear relationship with the latitude.
[0035] Step S52: Using the average temperature between the point to be measured and the reference point combined with the corrected gravity acceleration, the pressure-altitude formula is corrected to construct a pressure-altitude correction model, as shown below:
[0036] (9);
[0037] Among them, h is the elevation of the point to be measured, is the horizontal height of the reference point, is the gas constant of air in a dry environment, which is 287 J / (kg·K). is the average temperature between the test point and the reference point, is the horizontal air pressure at the reference point, and P is the horizontal air pressure at the point to be measured.
[0038] Therefore, the present invention adopts the above-mentioned indoor air pressure altitude estimation method based on temperature compensation and support vector regression, and uses a combination of various data correction methods including temperature compensation and machine learning to correct the air pressure data, and constructs a temperature compensation and support vector regression air pressure model. It can well cope with the impact of complex, dynamic and changeable indoor environment on air pressure, improve the accuracy of air pressure and altitude estimation, and fill the research gap associated with indoor temperature and air pressure changes.
[0039] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 Flow chart of the indoor air pressure height estimation method based on temperature compensation and support vector regression of the present invention;
[0041] Figure 2 This is a moving average filtering smoothing process diagram of the present invention;
[0042] Figure 3 The air pressure data processing result of the present invention;
[0043] Figure 4 The difference between the theoretical value and the actual value of the air pressure at each measuring point;
[0044] Figure 5 Average error after correction with different air pressure correction values; (a) is the average error after correction with the first 50 groups of different air pressure correction values; (b) is the average error after correction with the last 50 groups of different air pressure correction values;
[0045] Figure 6 Comparison of the height estimation error before and after the correction of the pressure height formula of the present invention;
[0046] Figure 7 The figure is a comparison of the overall error means of different air pressure correction methods of the present invention. DETAILED DESCRIPTION
[0047] The technical solution of the present invention is further described below through the accompanying drawings and embodiments.
[0048] like Figure 1 As shown, the indoor air pressure height estimation method based on temperature compensation and support vector regression of the present invention includes the following steps:
[0049] Step S1: Use a mobile device (smartphone) with a built-in barometer and temperature sensor to measure the air pressure and temperature at the test point and the reference point to obtain the air pressure and temperature data at the test point and the reference point. The device at the reference point is called a Bluetooth beacon, which is a device that integrates Bluetooth, temperature sensor and air pressure sensor, and broadcasts temperature and air pressure at a certain frequency.
[0050] The main hardware equipment for collecting air pressure and temperature data is a mobile device (smartphone) with a built-in barometer and temperature sensor and a bracket. The mobile device collects temperature and air pressure values synchronously, and the device at the reference point broadcasts the temperature and air pressure values at the base station in the form of a broadcast.
[0051] Collecting air pressure and temperature data mainly involves three measurements, including the height of each step, the horizontal air pressure of the mobile device, and the temperature of each stairwell. The specific process is as follows:
[0052] Step S11, first, use a steel ruler to measure the height of each step, measure each step three times and take the average value, the measurement error is 0.001 m.
[0053] Step S12, then, fix the mobile terminal device on the tripod, keep the tripod stable and unchanged at a height of 1.105 m, move the tripod step by step in the middle of the steps, measure the air pressure after it stabilizes, set the air pressure collection interval to 0.25 s, and record and export the data after the air pressure stabilizes.
[0054] Step S13. Finally, Bluetooth beacons are pasted on the inner side of the walls of the middle corridors of the stairwells on the second, fourth and sixth floors respectively. The height difference between each Bluetooth beacon and the ground of the floor where it is located is 1 m. The temperature data is recorded at an interval of about 60 s. After collecting several groups, the relevant data is exported by the mobile device.
[0055] Step S2: Smoothing the collected air pressure and temperature data using moving average filtering.
[0056] Step S21, based on moving average filtering, by selecting a fixed window size, starting from the first group of data, select the amount of data of the window size in sequence, calculate the mean, and cover the mean with the current sample value, and so on, shift the window backward in sequence, take the average value of the samples in the window and cover the current sample value.
[0057] Step S22: filter the collected air pressure and temperature data. The filtering effect is as follows: Figure 2 shown.
[0058] The moving average filter can effectively reduce noise while maintaining the main characteristics of the sample, has overall continuity, and is simple and easy to operate. It can effectively smooth the air pressure and temperature data and reduce the measurement error caused by noise.
[0059] Step S3: constructing a temperature-compensated air pressure model based on the measured temperature-compensated air pressure values of the reference point and the point to be measured.
[0060] Since the change in air pressure is approximately linearly correlated with temperature, the air pressure data is corrected using temperature to make it closer to the true value of air pressure, as shown below:
[0061] (1);
[0062] Where P is the corrected air pressure value, is the air pressure value after smoothing. is the temperature value of the point to be measured, is the standard atmospheric temperature at sea level, recorded as 288.15 K, a and b are model correction parameters, representing the slope and slope range of the model respectively. By selecting appropriate correction parameters, the best fitting effect can be obtained, so that the air pressure data is more in line with the standard value, thereby improving the calculation accuracy.
[0063] Step S4: construct a support vector regression air pressure model using the air pressure value after temperature compensation.
[0064] Step S41: Based on the support vector machine, nonlinear modeling is performed on the input and output air pressure value data, a hyperplane is constructed in the high-dimensional feature space, and the relationship between the input and output variables is established, as shown below:
[0065] (2);
[0066] in, is a regression model; is the regression parameter vector, for The transpose of It is the nonlinear mapping of samples in high-dimensional space in nonlinear regression; For bias.
[0067] Step S42: construct a support vector regression model When the training sample is within the interval, it means that the prediction result is accurate, regardless of the loss, ensuring the robustness of the model. According to the principle of minimum loss, the support vector machine problem is transformed into the following form:
[0068] (3);
[0069] in, is the regularization constant; is the number of samples; is the model value; is the actual value; It is an insensitive loss function. When the training sample falls within the interval band, the value is 0, otherwise it is counted as a loss. The loss calculation formula is as follows:
[0070] (4);
[0071] Step S43: Introducing non-negative multipliers , , the Lagrange multiplier method is used to solve the dual problem of the original problem. To ensure the equivalence of the original problem and the dual problem, the KKT condition must be satisfied, and the dual problem is:
[0072] (5);
[0073] in, is the kernel function; the constraints are as follows:
[0074] (6);
[0075] The kernel function is used to simplify the mapping operation from low-dimensional sample points to high-dimensional space and realize nonlinear regression.
[0076] Step S44, solve the above problem and obtain the solution of the support vector regression problem in the form of:
[0077] (7).
[0078] Support vector regression performs very well in dealing with high-dimensional and nonlinear relationships, and is particularly suitable for data with complex structures and a lot of noise.
[0079] Step S5: Based on the local gravitational acceleration and average temperature, the pressure-altitude formula is corrected to construct a barometric altimetry correction model.
[0080] In the process of measuring altitude using air pressure, since there is a regional parameter in the pressure-altitude formula, namely the gravitational acceleration g, the original formula is corrected with parameters to make the measurement and calculation results more in line with reality, thereby improving the measurement accuracy.
[0081] Step S51, using the Helmert formula to calculate the local gravity acceleration, so as to improve the accuracy of the result, that is, the gravity acceleration correction formula is as follows:
[0082] (8);
[0083] Among them, atmospheric pressure is measured using normal gravity acceleration g, and its unit is cm / s 2 ; is the local latitude in degrees. It can be seen that the local gravitational acceleration g is determined by the local latitude and has a nonlinear relationship with the latitude.
[0084] Step S52: Using the average temperature between the point to be measured and the reference point combined with the corrected gravity acceleration, the pressure-altitude formula is corrected to construct a pressure-altitude correction model, as shown below:
[0085] (9);
[0086] Among them, h is the elevation of the point to be measured, is the horizontal height of the reference point, is the gas constant of air in a dry environment, which is 287 J / (kg·K). is the average temperature between the test point and the reference point, is the horizontal air pressure at the reference point, and P is the horizontal air pressure at the point to be measured. The conversion between air pressure and altitude can be performed according to formula (9).
[0087] Example 1
[0088] Example 1 The method proposed in the present invention is experimentally verified. The experimental location is selected in the stairwells of the second to sixth floors of a certain building. The data collection time is selected from 23:00 at night to 2:00 in the morning of the next day. The flow of people in the corridor is small, and the indoor environment has a stable air pressure state, which reduces the air flow and local air pressure changes caused by the movement of people, and reduces the measurement error. This embodiment is tested on 100 steps, and the height of each step is measured three times and the average value is taken. Bluetooth beacons are pasted on the inner side of the wall of the middle corridor of the second, fourth and sixth floors of the stairwells, respectively. The height difference between each Bluetooth beacon and the ground of the floor where it is located is 1 m, and the temperature data recording interval is about 60 s.
[0089] In this embodiment, the horizontal air pressure of each step is measured, and a total of 100 sets of air pressure data are measured, each set is measured 200 times; the 100 sets of air pressure data are converted into a matrix form as an independent variable, and the moving average filtering method is used for smoothing. After each set of air pressure data is smoothed, the air pressure values collected 200 times at each point are averaged, and the average air pressure of each point to be measured after processing is as follows: Figure 3 shown.
[0090] In this embodiment, temperature data is collected at each point to be measured, and the temperature data of three points are collected, namely, the bottom point h0, the middle point h1, and the bottom point h2. n / 2 、Top point h n , 120 groups of data are collected at each point; each group uses a 60 s interval, and the duration of temperature collection basically coincides with the air pressure collection time. The temperature data is processed by moving average filtering, and the smoothed temperature data is averaged to finally obtain the theoretical temperature of the three points.
[0091] The air pressure is corrected using temperature data. For the first n / 2 sets of data, h0 and h n / 2 The average temperature between the two, since a total of 100 sets of data were collected this time, that is, n=100, as shown below:
[0092] (10);
[0093] in, is the temperature at the bottom point h0; The middle point h n / 2 The temperature at For h0 and h n / 2 The average temperature between the two groups; the temperature data of the last n / 2 groups is h n / 2 With h n The average temperature between the two is calculated using the same formula as above. After a simple calculation, we can get T1=18.75, T2=19.26. Substituting them into formula (1), we can get ΔT1=3.75, ΔT2=4.26. Figure 4It is the difference between the theoretical value and the measured value. In general, most of the air pressure measurements are higher than the theoretical values. Before the first 33 groups, almost all the real air pressure data were lower than the theoretical values. After 77 groups, except for the last two groups, the real air pressure values were all higher than the theoretical values.
[0094] The first n / 2 groups and the last n / 2 groups are corrected using equations (1) and (10). For the first n / 2 groups of pressure data, a correction method of adding 0.03 hPa can be used, such as Figure 5 Similarly, the same method was used for the last n / 2 groups, and the last n / 2 groups achieved the best accuracy when the correction value was -0.114 hPa, as shown in (a) in the figure. Figure 5 As shown in (b) in the figure, a correction method of subtracting 0.114 hPa is adopted for the last n / 2 groups.
[0095] Therefore, for the two groups before and after, the correction values can be used to improve the original pressure data as 0.03 hPa and -0.114 hPa respectively. At the same time, by combining the two groups of temperature and pressure correction values, a=-0.655 and b=2.413 can be obtained from formula (1), that is, formula (1) can be written as formula (11):
[0096] (11);
[0097] After all the pressure data are corrected according to the temperature compensation formula, the height of each point and the average height estimation error are obtained by combining the pressure-height formula. As shown in Table 1, the average height estimation error after correction is 0.406 m. It can be seen that after temperature correction, the data accuracy optimization effect of the last n / 2 groups is better, while that of the first n / 2 groups is slightly worse. However, overall, the optimization effect of height estimation accuracy is good, reducing the height estimation error by 0.378 m on average, and the optimization effect reaches 51%.
[0098] Table 1 Comparison of height estimation errors before and after temperature correction
[0099]
[0100] The latitude and longitude of the experimental location are (117.17°, 36.68°), so we know =36.68°, substituting it into equation (8), we can get the gravitational acceleration g at the experimental location as 981.7759361 cm / s 2 , which is converted to 9.817759361m / s 2 .
[0101] Substitute the local gravitational acceleration g = 9.817759361 m / s from formula (9): 2 , and obtain the barometric altimetry correction model as follows:
[0102] (12);
[0103] The specific effect of the pressure height formula parameter correction is as follows: Figure 6 As shown, for the intuitiveness and aesthetics of the chart, the error before correction is expressed as twice the original error.
[0104] The comparison of height estimation errors before and after the correction of the pressure height formula is shown in Table 2. It can be seen that the maximum error, minimum error and average error after the correction of the pressure height formula are all smaller than before the correction. Among them, the maximum error after correction is reduced by 0.004 m, the minimum error is reduced by 0.001 m, and the average error is reduced by 0.003 m. It can be seen that the parameter correction of the pressure height formula has a certain effect on improving the overall height estimation accuracy.
[0105] Table 2 Comparison of height estimation error before and after correction of pressure height formula
[0106]
[0107] Example 2
[0108] Example 2 analyzes the indoor height estimation method of temperature-compensated air pressure combined with support vector machine regression model, and the analysis mainly includes the following points:
[0109] 1. Analysis of the effect of the original air pressure height measurement model;
[0110] As can be seen from Table 3, the average error of the height estimation without any model correction is 0.784m, and the height measurement accuracy is low. In actual height estimation applications, it has poor feasibility compared with other height estimation models. The reason for this is that the influence of temperature on air pressure and the error of the built-in barometer of the mobile phone are not considered.
[0111] Table 3 Comparison of mean values of altitude estimation error of different pressure correction methods
[0112]
[0113] 2. Analysis of the effect of support vector machine regression model;
[0114] according to Figure 7 As shown in Table 4, the use of the support vector machine regression model to fit the air pressure has a good effect. The average error of the altitude estimation is reduced by 0.315m compared with the original value before correction, with an optimization rate of 40%; it is reduced by 0.431m compared with the convolutional neural network regression model, with an optimization rate of 47%; it is reduced by 0.272m compared with the Gaussian regression model, with an optimization rate of 36%; it is reduced by 0.047m compared with the polynomial regression model, with an optimization rate of 9%. It can be seen that the data predicted by the support vector machine regression model for the atmospheric pressure regression is closer to the ideal data and can effectively reduce the altitude estimation error.
[0115] Table 4 Differences in mean height estimation errors between the support vector regression model and other methods
[0116]
[0117] The amount of data collected in this embodiment is small, and the support vector machine regression model has excellent performance when processing small sample data. At the same time, the support vector machine regression model has a good ability to control fitting, so that the model can avoid overfitting to a certain extent even when the data is limited. The convolutional neural network model has a relatively complex model and high requirements for data preprocessing. Due to the limitation of the amount of data, it often cannot effectively learn the inherent laws of the data. Therefore, it is not suitable for fitting of small data sets. This is also the reason why the model performs well on the training set but has obvious overfitting in the test set, resulting in a large height estimation error. Although the polynomial regression model achieves a good data fitting effect, it is still insufficient compared to the support vector machine regression model. This is because the relationship between air pressure and height is not a simple linear relationship. The model has limited model fitting ability for complex data relationships and is also prone to overfitting. The Gaussian process regression model also has insufficient prediction ability for air pressure data, and poor ability to extract and express features of air pressure and height data, so it has not successfully established a good model.
[0118] 3. Analysis of the effect of temperature compensation model;
[0119] It can be seen from Table 3 that the mean value of the height estimation error has been significantly improved after being processed by the temperature compensation model. Specifically, the temperature compensation model reduces the mean value of the height estimation error by 0.378m, and the height estimation accuracy optimization rate reaches 48%, which means that the height estimation accuracy has been greatly optimized. This means that the temperature compensation model played a significant role in this experiment and effectively improved the accuracy and stability of the height estimation data.
[0120] 4. Analysis of the effect of temperature compensation model combined with support vector machine model;
[0121] The temperature-compensated pressure data also has a good optimization effect on each regression model, as shown in Table 5. The mean error of height estimation after processing by the support vector machine regression model is reduced by 0.230m, and the optimization rate reaches 49%; the mean error of height estimation after processing by the convolutional neural network regression model is reduced by 0.502m, and the optimization rate reaches 55%; the mean error of height estimation after processing by the Gaussian process regression model is reduced by 0.421m, and the optimization rate reaches 56%; the mean error of height estimation after processing by the polynomial regression model is reduced by 0.275m, and the optimization rate reaches 53%. It can be seen that compensating and correcting the pressure data according to temperature has a great improvement on the accuracy of height estimation. The optimization rate of the mean error of height estimation can reach about 50%, especially the combination of temperature compensation and support vector regression, as a height estimation model, can well capture the influence of temperature on height estimation and significantly improve the accuracy of height estimation results.
[0122] Table 5 Differences in the mean values of height estimation errors of each model before and after temperature compensation
[0123]
[0124] The combination of the support vector machine regression model and the temperature compensation pressure model has better performance than other models, as shown in Table 6. The mean error of the height estimation of the temperature compensation + convolutional neural network model is 0.159m lower, and the optimization rate is 39%; the mean error of the height estimation of the temperature compensation + Gaussian process regression model is 0.083m lower, and the optimization rate is 25%; the mean error of the height estimation of the temperature compensation + polynomial regression model is 0.002m lower, and the optimization rate is 0.8%.
[0125] Table 6 Differences in the mean height estimation errors between the support vector machine regression model after temperature compensation and other methods
[0126]
[0127] In summary, after comparison, it can be seen that the combination of temperature compensation and support vector regression model has the best mean error of height estimation, and has the best performance as an indoor height estimation model. The overall height estimation error is reduced by nearly 70%. In a specific indoor environment, it can be used as an indoor height estimation model to obtain a more accurate elevation of the measured point.
[0128] Therefore, the present invention adopts the above-mentioned indoor air pressure altitude estimation method based on temperature compensation and support vector regression, and uses a combination of various data correction methods including temperature compensation and machine learning to correct the air pressure data, and constructs a temperature compensation and support vector regression air pressure model. It can well cope with the impact of complex, dynamic and changeable indoor environment on air pressure, improve the accuracy of air pressure and altitude estimation, and fill the research gap associated with indoor temperature and air pressure changes.
[0129] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that they can still modify or replace the technical solution of the present invention with equivalents, and these modifications or equivalent replacements cannot cause the modified technical solution to deviate from the spirit and scope of the technical solution of the present invention.
Claims
1. A method for estimating indoor air pressure height based on temperature compensation and support vector regression, characterized in that: The following steps are involved: Step S1, using a mobile terminal device with a built-in barometer and temperature sensor to measure the air pressure and temperature at the test point and the reference point, and obtaining the air pressure and temperature data at the test point and the reference point; The device at the reference point broadcasts the real-time temperature and air pressure values at the reference point in the form of broadcast, and the mobile terminal synchronizes the collected temperature and air pressure values at the location, and receives the temperature and air pressure values broadcast at the reference point; the device at the reference point is a device that integrates Bluetooth, temperature sensor and air pressure sensor, and broadcasts temperature and air pressure at a frequency; Step S2: Smoothing the collected air pressure and temperature data using moving average filtering. The specific process is as follows: Step S21, based on moving average filtering, by selecting a fixed window size, starting from the first set of data, sequentially select the amount of data of the window size, calculate the mean, and cover the mean with the current sample value, and so on, shift the window backward in sequence, take the average of the samples in the window and cover the current sample value; Step S22, filtering the collected air pressure and temperature data, effectively smoothing the air pressure and temperature data, reducing the measurement error caused by noise, maintaining the main features of the sample, and making the whole continuous; Step S3: construct a temperature-compensated air pressure model based on the measured temperature-compensated air pressure values of the reference point and the point to be measured, as shown below: (1); Where P is the corrected air pressure value, is the air pressure value after smoothing. is the temperature value of the point to be measured, is the standard atmospheric temperature at sea level, recorded as 288.15 K, a and b are model correction parameters, representing the slope and slope range of the model respectively; Step S4: Use the temperature-compensated air pressure value to construct a support vector regression air pressure model. The specific process is as follows: Step S41: Perform nonlinear modeling on the input and output air pressure value data, construct a hyperplane in the high-dimensional feature space, and establish the relationship between the input and output variables, as shown below: (2); in, is a regression model; is the regression parameter vector, for The transpose of It is the nonlinear mapping of samples in high-dimensional space in nonlinear regression; is bias; Step S42: construct a support vector regression model When the training sample is within the interval, it means that the prediction result is accurate, regardless of the loss, ensuring the robustness of the model. According to the principle of minimum loss, the support vector machine problem is transformed into the following form: (3); in, is the regularization constant; is the number of samples; is the model value; is the actual value; It is an insensitive loss function. When the training sample falls within the interval band, the value is 0, otherwise it is counted as a loss. The loss calculation formula is as follows: (4); Step S43: Introducing non-negative multipliers , , the Lagrange multiplier method is used to solve the dual problem of the original problem. To ensure the equivalence of the original problem and the dual problem, the KKT condition must be satisfied, and the dual problem is: (5); in, is the kernel function; the constraints are as follows: (6); Step S44, solve the above problem and obtain the solution of the support vector regression problem in the form of: (7); Step S5: Based on the local gravity acceleration and average temperature, the pressure-altitude formula is corrected to construct a pressure-altitude correction model. The specific process is as follows: Step S51, using the Helmert formula to calculate the local gravity acceleration, so as to improve the accuracy of the result, that is, the gravity acceleration correction formula is as follows: (8); Where g is the acceleration due to gravity; is the local latitude, in degrees. From formula (8), we can see that the local gravitational acceleration g is determined by the local latitude and has a nonlinear relationship with the latitude. Step S52: Using the average temperature between the point to be measured and the reference point combined with the corrected gravity acceleration, the pressure-altitude formula is corrected to construct a pressure-altitude correction model, as shown below: (9); Among them, h is the elevation of the point to be measured, is the horizontal height of the reference point, is the gas constant of air in a dry environment, which is 287 J / (kg·K). is the average temperature between the test point and the reference point, is the horizontal air pressure at the reference point, and P is the horizontal air pressure at the point to be measured.
Citation Information
Patent Citations
Pressure intensity value determination method and system
CN106644193A
Method and device for determining floor in which a moving target is located based on differential barometric leveling
CN106851577A
Method for compensating silicon resonant pressure sensor
CN106932125A
High-precision and high-stability barometric altimetry system
CN114608523A