{"id":13076,"date":"2023-02-02T10:02:05","date_gmt":"2023-02-02T08:02:05","guid":{"rendered":"https:\/\/atostek.com\/?p=13076"},"modified":"2023-03-29T10:02:53","modified_gmt":"2023-03-29T07:02:53","slug":"13076","status":"publish","type":"post","link":"https:\/\/atostek.com\/en\/13076\/","title":{"rendered":""},"content":{"rendered":"

Positioning is about finding the best way to utilize sensor measurements which are often quite erroneous. How does mathematics help with this?<\/strong><\/p>\n

I recently finished my master\u2019s thesis on vehicle positioning. In this blog post, I\u2019m going to describe in simple terms what is mathematics used for in positioning algorithms. The purpose is not to focus on the mathematics itself, but on why it is used. After all, math can be quite complicated, so there should be a good reason for making use of it. In this text, I\u2019m concentrating on university-level mathematics: probability theory, linear algebra & mathematical optimization.<\/p>\n

Factoring in uncertainty with probability theory<\/h2>\n

Positioning is based on measurements from different sensors, and these measurements are always erroneous to some extent. For instance, position measurements from GPS (or more generally, GNSS) are rarely very accurate, and often their uncertainty also varies from one moment to another. The more clearly the GPS receiver can detect the signals sent by the GPS satellites, the more accurate the position measurements on average are.<\/p>\n

By means of probability theory, the inherent uncertainty of measurements can be taken into account. In practice this means that the measurements are modelled as random variables, and quantities usually describing randomness, such as standard deviation or variance, are used for describing uncertainty. By doing this, the formulas of probability theory can be applied to weight measurements according to their uncertainty. For instance, a highly uncertain GPS position measurement can be given less weight in the computations than a more reliable position measurement.<\/p>\n

Moreover, when the quantity being estimated is also modelled as a random variable, probability theory makes it possible to estimate the uncertainty of the estimate itself. With position, such an uncertainty estimate could for example be that the position estimate produced by the algorithm is off by at most 1 meter with 95 % probability.<\/p>\n

\"\"
Figure 1: an illustration of how uncertainties are used in position estimation.<\/figcaption><\/figure>\n

Figure 1 illustrates uncertainties and their use in position estimation. In this figure, the vehicle has travelled from left to right, and before processing the new GPS measurement, the vehicle is estimated to be at position \"\" However, this estimate includes some uncertainty, which is depicted by the grey ellipse: the true position is estimated to be somewhere within the grey ellipse with 95 % probability.<\/p>\n

The uncertainty of the new GPS measurement \"\" is depicted by the yellow ellipse. This ellipse is larger than the grey one, since the GPS measurement is more uncertain than the existing position estimate. In processing the new GPS measurement, the updated position estimate \"\" is computed as a compromise between the old estimate and the GPS measurement, with both being weighted according to their uncertainties. Since the old estimate is less uncertain, the updated estimate is closer to it than to the GPS measurement. The green ellipse depicts the uncertainty of the updated estimate.<\/p>\n

Plenty of use for linear algebra<\/h2>\n

Quantities in positioning are often multidimensional, and since matrices are the standard tool for working with multidimensional data, they are used extensively in positioning. One use case for matrices that I personally find interesting is the transformation of multidimensional measurements between different coordinate frames. A typical example of this is the handling of angular velocity measurements from an inertial measurement unit, which we shall dive into next.<\/p>\n

The inertial measurement unit (IMU) is a sensor mounted on the vehicle which measures the vehicle\u2019s angular velocity. The angular velocity measurements are three-dimensional vectors. The components of these vectors are the scalar angular velocities of the vehicle with respect to the x-, y-, and z-axis of the IMU\u2019s coordinate frame. In positioning, however, we are primarily interested in angular velocity with respect to the axes of the vehicle\u2019s<\/em> coordinate frame. These two coordinate frames might not always be aligned: often their orientation differs by some known rotation. With specific types of matrices, called rotation matrices, the angular velocity measurements can be easily transformed from the IMU\u2019s coordinate frame to the vehicle\u2019s coordinate frame.<\/p>\n

Matrix computations are also useful since computers perform them relatively fast. This means that if a computational problem can be converted to a problem of numerical linear algebra, solving it may speed up significantly. In positioning this is relevant especially when estimates need to be produced in real-time.<\/p>\n

Selecting the best alternative with optimization<\/h2>\n

Sometimes it is necessary to select one out of a countless number of (numerical) alternatives. If the quality of the different alternatives can be expressed with a numerical formula, methods of mathematical optimization can be used to find the best alternative in terms of this formula (e.g., the alternative that maximizes the value of the formula). In the positioning algorithm we have developed, this kind of an approach is used in estimating the vehicle\u2019s heading.<\/p>\n

\"\"
Figure 2: the basic setup of estimating vehicle’s heading<\/figcaption><\/figure>\n

The basic setup of the heading estimation is illustrated in Figure 2. The figure shows a vehicle and a few recent GPS measurements from the middle point of the moving vehicle. The GPS measurements are somewhat noisy, but shape of the vehicle\u2019s route is still clearly visible: the vehicle has travelled from left to right while also turning up.<\/p>\n

How could a computer automatically determine the current heading of the vehicle by utilizing the recent GPS measurements? In the algorithm we have developed, mathematical optimization plays a key role in solving this problem.<\/p>\n


\n
\n
\"\"<\/div>\n
\n

Olli Huopio<\/strong>
\nSoftware Developer<\/em><\/p>\n

I work as a software designer at Atostek. I joined the company in the summer of 2021, and graduated from Aalto University in late 2022. My studies focused on applied mathematics and computer science, and I aim to continue with these compelling subjects in my career as well.<\/p>\n<\/div>\n

<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"

Positioning is about finding the best way to utilize sensor measurements which are often quite erroneous. How does mathematics help with this? I recently finished my master\u2019s thesis on vehicle positioning. In this blog post, I\u2019m going to describe in simple terms what is mathematics used for in positioning algorithms. The purpose is not to…<\/p>\n","protected":false},"author":24,"featured_media":12896,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"inline_featured_image":false,"footnotes":""},"categories":[114],"tags":[],"class_list":["post-13076","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","entry","has-media"],"_links":{"self":[{"href":"https:\/\/atostek.com\/en\/wp-json\/wp\/v2\/posts\/13076"}],"collection":[{"href":"https:\/\/atostek.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/atostek.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/atostek.com\/en\/wp-json\/wp\/v2\/users\/24"}],"replies":[{"embeddable":true,"href":"https:\/\/atostek.com\/en\/wp-json\/wp\/v2\/comments?post=13076"}],"version-history":[{"count":2,"href":"https:\/\/atostek.com\/en\/wp-json\/wp\/v2\/posts\/13076\/revisions"}],"predecessor-version":[{"id":13083,"href":"https:\/\/atostek.com\/en\/wp-json\/wp\/v2\/posts\/13076\/revisions\/13083"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/atostek.com\/en\/wp-json\/wp\/v2\/media\/12896"}],"wp:attachment":[{"href":"https:\/\/atostek.com\/en\/wp-json\/wp\/v2\/media?parent=13076"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/atostek.com\/en\/wp-json\/wp\/v2\/categories?post=13076"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/atostek.com\/en\/wp-json\/wp\/v2\/tags?post=13076"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}