# Indoor Positioning Technology and Control of Mobile Home Service Robot

Authors: Gang Wang; Hongyuan Wen; Jun Zhou
Journal: Scientific Programming
 (2022)

---

## Abstract

With the rapid development of the market economy, location information services have shifted from outdoor to indoor, requiring higher system accuracy. Indoor positioning and control is an indispensable technical support for mobile home service robots to perform system tasks, and this technology is also an important parameter that marks the level of intelligence of a home service robot. However, in indoor places, how to obtain the target node location information timely and accurately and how to control and path planning should be the first issues to be considered in the design of home robots at this stage. This article gave a brief overview of the current indoor positioning technology and control, analyzed the more widely and frequently used indoor positioning methods, and deeply studied the ultrasonic positioning technology. On this basis, a mobile home service robot system was designed, and simulation experiments were carried out, respectively, to test the receiving time and arrival time of the node signal, the node positioning accuracy, the optimal degree of route planning, and the absolute and relative errors of navigation and path estimation. The experimental results showed that the accuracy of the robot system positioning proposed in this article reached more than 80%, and the relative error was only 4.21%, which verified its feasibility and effectiveness in practical applications. Popularizing it in the market can effectively improve the system performance and intelligence of home service robots.


---

## Body

## 1. Introduction

With the progress of society and the improvement of science and technology, the development of positioning technology and control in the market has gradually moved to a new height. Obtaining the location information of devices or people has always been a very necessary requirement for production and life. Since the 1990s, wireless positioning technology has been used in professional technical fields. Until now, it has been integrated with wireless communication technology, and a smaller range and more accurate identification of cellular mobile positioning technology has been developed from the traditional GPS technology. Compared with GPS positioning technology, cellular mobile positioning technology has the advantages of small size, high precision, and high degree of commercial application. And it has been widely used in value industries such as processing and manufacturing, medical services, logistics and transportation, and equipment monitoring. However, with the improvement of people's material living standards, the requirements for indoor positioning technology and control service quality are getting higher and higher. Traditional GPS positioning technology cannot achieve indoor identification with extremely small coverage, while cellular mobile positioning technology can be applied indoors. However, due to the limitation of signal bandwidth, its accuracy is still in the order of hundreds of meters, which cannot meet the high demands of people's daily life.Under the background of the era of intelligence, the functional design of mobile robots is becoming more and more diversified, and in some industrial production fields, mobile robots can already replace manual labor and production to a certain extent. It is also the most common and hottest smart product in the market based on smart technology. Indoor positioning and control are also conditions to measure whether a mobile robot is sufficiently intelligent. According to the degree of indoor environmental cognition, the mobile robot can accurately locate the target position inside the venue and plan an optimal path to avoid obstacles, and complete the specified task without being affected by the bandwidth limitation of the signal. It can effectively improve people's quality of life and standard.Based on indoor positioning technology and control theory, this article designed a mobile home service robot for indoor places, which can provide location information services and complete path control and planning tasks. The innovation of this article is that it avoids the limitation of large errors of traditional positioning methods, is more intelligent in path planning and control, and is more suitable for the family environment with small moving line space. It has practical guiding significance and practical significance in promoting the development of indoor technology, improving positioning accuracy and control level, and providing new ideas for the design and research of mobile intelligent robots.


## 2. Related Work

In recent years, many scholars have carried out in-depth research on indoor positioning technology and control. Tiantian believed that value-added services could be realized through indoor positioning technology in mobile payment systems, thereby helping merchants find customers through the location of the mall and analyzing customer behavior combined with the settlement amount of the customer's purchase of goods [1]. Chen introduced the basic description of channel state information and divided localization methods into three categories, namely, fingerprint-based, angle-of-arrival-based, and ranging-based. The current state of these technologies is then reviewed in detail, and advantages and disadvantages are identified and compared [2]. In order to achieve accurate positioning of multistorey buildings, Li HT proposed an indoor positioning scheme based on the map information. The final experimental results showed that the scheme could effectively improve the positioning estimation accuracy and reduce the computational complexity of multistorey buildings [3]. Cao J proposed a positioning method based on microinertial navigation and VLC system. This method uses the acquired VLC signal to calibrate the position estimation information of the microinertial navigation system to compensate for the positioning and accumulated errors of the microinertial navigation system [4]. Indoor positioning technology has been deeply researched by countless scholars, and it has matured in the market at this stage. However, with the continuous improvement of the economic level of the masses, the demand for improving the positioning technology of mobile intelligent robots with home services as the core has significantly increased.In order to gain an in-depth understanding of mobile home service robots, research related to mobile robot service applications is reviewed in this article. Axel regarded robots as an aid in soft-tissue medical procedures, which could undergo unpredictable changes during traditional procedures. And intelligent robots could effectively predict these changes [5]. Umam F incorporated intelligent robotics technology into today’s waste sorting tasks, this smart waste bin robot was able to automatically select the type of waste and navigate, and it could also detect the waste around the robot and collect it by itself [6]. Tahan discussed the effectiveness of an intelligent robot psychological intervention program on good sexual care for primary school students. Finally, through experiments and questionnaires, it was found that using robots for psychological intervention was an effective method of improving children’s sexual health [7]. Luo proposed a robotic service application method that combined robotics with image processing and artificial intelligence to generate material models and proposed a digital version of the process that automates extensive material experiments that could use images to observe [8]. These studies have carried out good research on robot services. But due to the rapid development of the times, robot technology services have expanded from a relatively professional technical field to people's daily life. There are very few existing studies focusing on family services. Therefore, the research on indoor positioning technology and control of mobile home service robots is urgent.


## 3. Indoor Positioning Technology and Control of Mobile Home Service Robots

### 3.1. Overview of Indoor Positioning Technology and Control

Indoor positioning technology refers to a technical service that uses multiple control technologies such as wireless communication to obtain the location information of personnel or equipment in indoor and other limited coverage and relatively closed places.


#### 3.1.1. Classification of Indoor Positioning Technology

In the existing development field, the widely used indoor positioning technologies include radio frequency identification, infrared, ultra-wideband, and ultrasonic technology. This article will briefly introduce indoor positioning technology in this category.(1) RFID Positioning. Radio frequency identification positioning technology is a technology that uses radio frequency to input and output data in the indoor environment to obtain location information. It is one of the more common positioning technologies in recent years [9]. The radio frequency signal can carry its own identification information, and the radio frequency receiving end detects the strength of the received signal, and the processor calculates the distance between the transmitting end and the receiving end according to the attenuation of the strength of the radio frequency signal. The position of the transmitter is calculated by the distance between a radio transmitter and multiple reference points. In the field of indoor positioning, radio frequency identification technology has the function of measuring multiple objects to be measured at the same time. However, the mapping between wireless signal strength and distance is a nonlinear relationship, and it is easily affected by various environmental factors, such as temperature, humidity, and distribution of metal objects, thus limited in many applications.(2) Infrared Positioning. The working principle of infrared positioning technology is to install infrared receivers in different areas, and the moving object to be tested carries an infrared transmitter to emit infrared signals in real time. When an infrared receiving device receives the modulated infrared signal, it can be determined that the moving object under test is in the area where the receiving device is located. However, this technology has a big limitation. Since infrared rays can only transmit at a line of sight, the penetration is extremely poor. When the logo is blocked, it cannot work normally, and it is also easily affected by environmental factors such as light and smoke. In addition to technical limitations (the transmission distance of infrared rays is not long), in terms of layout, no matter which method, it is necessary to install the receiving end behind each block or even at the corner. The layout is complicated, which increases the cost, and the positioning effect is limited.(3) Ultra-Wideband Positioning. UWB positioning technology is a brand-new new technology that is very different from traditional communication positioning technology. It uses the prearranged anchor nodes and bridge nodes with known positions to communicate with the newly added blind nodes and uses a unique positioning method to determine the position, such as triangulation or fingerprint positioning. The technology has good real-time performance and high positioning accuracy. However, because it needs a large bandwidth, it is easy to cause interference to communication equipment, and there is a large instantaneous power when continuously transmitting short pulses. At present, the existing facilities are more difficult to meet the needs of practical applications.(4) Ultrasonic Positioning. Ultrasonic technology mainly uses the time-flight method to measure distance. We use ultrasonic signals to measure the distance between the starting position and the target position. The ultrasonic signal has a certain beam angle when it is transmitted, so the transmitting end equipped with the moving object under test needs to consider the coverage of the ultrasonic wave. In order to expand the coverage of ultrasonic signals, in practical applications, ultrasonic transmitting probes with larger beam angles are usually selected, or multiple ultrasonic transmitting probes are used to transmit ultrasonic signals in different directions at the same time. The advantage of ultrasonic technology is that the time interval between the ultrasonic signal going back and forth between the transmitting end and the receiving end is linearly related to the distance between the two ends. The disadvantage of ultrasonic technology is that the propagation speed of ultrasonic waves is affected by the air temperature, which requires temperature compensation. This technology has the advantages of low cost, no lighting restrictions, etc., and its application in indoor positioning is becoming more and more extensive.


#### 3.1.2. Indoor Positioning Method

With the development of a variety of ranging and communication technologies, many indoor positioning methods based on them have appeared. The classic methods include the arrival angle method based on the propagation signal, the indoor positioning algorithm based on the hyperbolic model, the receiving-based method, and the strength method [10].(1) Received Signal Strength Method. The commonality between the received signal strength method and the TOA algorithm is the positioning method based on the absolute ranging method, but the difference is that the RSSI algorithm transmits a constant power electromagnetic wave signal and measures the attenuation of the signal received by the receiver. It calculates the distance between two points according to the attenuation model of the signal in the air. When this algorithm is applied in practice, each parameter contained in the signal attenuation model should be tested in advance. Its limitation is that the tested parameters will cause certain errors due to environmental differences.At present, the theoretical model commonly used in wireless signal transmission is the Shadowing model, as shown in the following equation [11]:(1)p=p0+10nlgdd0+δ.Among them, the interpretation of each parameter is shown in Table1.Table 1
The definition of each parameter of the equation.
SequenceParameter_Meaning _1d0Reference distance2p0The received signal strength at distanced03dTrue distance4δOcclusion factorIn practical applications, a simplified Shadowing model is often used, as shown in the following equation [12]:(2)p=p0+10nlgdd0.For the convenience of calculation, the value ofd0 is usually taken as 1m; at this time, p0 is the signal strength received at the distance 1m from the wireless signal transmitting source, and n is the signal transmission constant. The signal transmission constant has nothing to do with the signal propagation environment. In the equation, p0and n need to be measured several times through experiments and obtained by fitting according to the experimental data.(2) Arrival Incidence Angle Method Based on the Propagation Signal. The arrival angle method based on the propagation signal is abbreviated as the AOA algorithm. The algorithm needs to set up at least two signal angle measurement devices on the same axis to form the receiving end. As shown in Figure 1, the receiving end is placed at a known position as a reference position, the transmitting end transmits wireless signals to the surrounding, and the receiving end will measure the wireless signal. The incident angle of the signal θ1, θ2 are summed so as to determine the equations of two straight lines in the plane passing through the reference end. The intersection of the two straight lines is the position of the measured end. Since the accuracy of this method is greatly affected by the angle measurement accuracy and the distance between the measured point and the axis, the AOA algorithm is rarely used in practical applications.Figure 1
Arrival incidence angle method based on the propagated signal.(3) Indoor Positioning Algorithm Based on the Hyperbolic Model. The characteristic of a hyperbola is that the distance from any point on the curve to the two foci is equal, and the difference is 2a. As shown in Figure 2, F1 and F2 are the two foci of the hyperbola, and the distance between the two foci is the focal length c. The general form of the hyperbolic equation with the focus on the X axis is (3), where a, b, and c satisfy the relationship of equation (4). In the indoor positioning algorithm based on the hyperbolic model, the focus is the reference position, and the position of the measured end is located on the hyperbola. In order to determine the specific position coordinates of the measured end, at least two sets of hyperbolic models are required [13].(3)x2a2−y2b2=1,(4)a2+b2=c2.Figure 2
Hyperbolic model.The three ultrasonic receiving ends are placed on the same straight line at equal intervals; the distance is D, as the positioning reference end. The straight line where the three positioning reference ends are located is the coordinateX axis, the reference position in the middle is the coordinate origin, and the X axis direction rotated 90° counterclockwise is the positive direction of the Y axis, as shown in Figure 3. The reference position at the origin is set as reference point 1; the reference position at the positive half-axis of the X axis is set as reference point 2; the reference position at the negative half-axis of the X axis is set as reference point 3; each coordinate information of the reference point is shown in Table 2.Figure 3
Schematic diagram of ultrasonic positioning.(5)ΔL1=L2−L1,(6)ΔL2=L3−L2.Table 2
Coordinate information of the reference point.
ScopeReference pointCoordinate informationIndoor localization algorithm based on hyperbolic modelN number 10,0N number 2D,0N number 3−D,0The ultrasonic transmitting end is installed on the measured object, and the distances from the three reference points are, respectively, set toL1,L2, and L3. The distance difference between the measured end and the reference point No. 1 and No. 2 is ΔL1, and the distance difference between the reference point No. 1 and No. 3 is ΔL2, and the calculation is shown in (5) and (6). In practical applications, ΔL1 and ΔL2 can be directly obtained by using a single-chip microcomputer [14].With reference points No.1 and No.2 as the focal points, the relationship between (7) and (8) is established [15]:(7)c=D2,(8)a=ΔL12.Substituting this into (4) will get the following [16]:(9)b=D22−ΔL122.Putting (8) and (9) into (3) will obtain hyperbolic equation (17):(10)x−D/22ΔL1/22−y2D2/4−ΔL12/4=1.Similarly, a hyperbolic model can be established with reference points No. 1 and No. 3 as the focus [18]:(11)x+D/22ΔL2/22−y2D2/4−ΔL22/4=1.Since the position of the measured end satisfies both (10) and (11), the possible position of the ultrasonic transmitting end can be obtained by solving the equation system. Arranging the two equations and subtracting the variable y will get the following:(12)D2ΔL12−D2ΔL22x2−DD2ΔL12+D2ΔL22x+D24D2ΔL12−D2ΔL22+ΔL12−ΔL224+2D=0.Except for the variablex in (12), they are all constants or can be obtained directly by the microcontroller. This equation is the general form of a quadratic equation in one variable, which can be expressed as follows [19]:(13)αx2+βx+ε=0,where [2](14)α=D2ΔL12−D2ΔL22,(15)β=−DD2ΔL12+D2ΔL22,(16)ε=D24D2ΔL12−D2ΔL22+ΔL12−ΔL224+2D.From this, the abscissa of the measured end can be calculated [20]:(17)x=−β±β2−4αε2α.If the measured end is closest to reference point No. 1, as shown in the shaded area in Figure4, that is, when it is satisfied L1>L2|L1>L3, the smaller absolute value of the two possible values should be taken by x. On the contrary, when L1<L2＆L1<L3, the larger absolute value of the two possible values should be taken. It can be known from (15) that β is always negative, so the value of x is shown in thefollowing equation [21]:Figure 4
The end under test is close to the intermediate reference point.(18)x=−β+β2−4αε2αL1>L2|L1>L3,−β−β2−4αε2αL1<L2＆L1<L3.AlthoughL1,L2, and L3 have not been acquired, an interrupt signal will be sent to the microcontroller when the reference position receives the ultrasonic signal, and the reference position closer to the measured end will be the first to send an interrupt signal, so the relationship between L1,L2, and L3 can be triggered by the interrupt sequence of the microcontroller to make a judgment.Since the indoor positioning system described in this article will be placed at the edge of the indoor simulation experiment site, the mobile robot with the ultrasonic transmitter is always located in the positive direction of theY axis, so the ordinate of the ultrasonic transmitter is shown in thefollowing equation [22]:(19)y=x−D/22D2/4−ΔL12/4ΔL12/4−D24+ΔL124.When two of theL1,L2, and L3 are equal, the above hyperbola will have a set that does not exist [23]. At this time, it can be determined that the abscissa of the ultrasonic transmitting end is ±D/2, and the positive and negative can be determined by which two of L1,L2, and L3 are the same, and the single-chip microcomputer only needs to judge whether there is an interrupt signal triggered at the same time and determine the position of the abscissa. After directly bringing the obtained abscissa into equation (19), the ordinate converted to the horizontal plane is obtained through the Pythagorean theorem and is calculated as follows [24]:(20)y=x−D/22D2/4−ΔL12/4ΔL12/4−D24+ΔL124−h2.


### 3.2. System Design of Mobile Home Service Robot

This article uses ultrasonic positioning technology to design a mobile home service robot system, analyzes the automatic guidance tasks that the mobile robot system needs to complete, selects appropriate hardware modules to build a mobile robot platform, and introduces the working principles and performance indicators of each hardware module and their main functions in the system one by one. According to the performance parameters, such as energy consumption and main frequency, the required processor module is selected.


#### 3.2.1. Hardware System

The mobile home service robot system is mainly composed of a wireless transceiver module, a processor module, an electronic compass, a motor drive module, an ultrasonic ranging module, an ultrasonic transceiver circuit, and a variety of communication interfaces, as shown in Figure5.Figure 5
Mobile home service robot system.


#### 3.2.2. Communication System

The communication system in this article is based on the wireless transceiver module, which has its own frequency generator, crystal oscillator, modem, and power amplifier. The wireless signal it sends is in2.3∼2.7GHz, the world's common frequency band, and there is no need to apply for a dedicated frequency band. Its power supply voltage is 3.2V, the maximum working current in the transmit mode is 12.1mA, and the maximum working current in the receiving mode is 13.4mA; the operating temperature range is −35℃∼80℃; the maximum data transmission rate is 1800kbps; the sensitivity under the data transmission rate 900kbps is −80dbm. And the data can be sent and received in 130 selectable working channels; its size is 3.4cm×1.2cm. The characteristics of small size, low power consumption, and wide operating temperature range make it suitable for many fields, such as intelligent sports equipment, remote control devices, and industrial sensors.


#### 3.2.3. Workflow of the Positioning System

A mobile home service robot is mainly composed of a processor module with an RC0402 microcontroller as the core and an ultrasonic receiving circuit. After the indoor positioning system starts to work, it waits for the positioning or stops request sent by the robot body wirelessly. If the stop request is made, the mobile home service machine positioning system will end the current work process. If it is a positioning request, the indoor positioning processor module of the system opens the GPIO interrupt and receives the ultrasonic recognition interrupt signal sent by the ultrasonic receiving circuit. The processor module uses the on-chip timer/counter module to realize the timer function and calculates the time difference between the ultrasonic recognition interrupts. After calculating the distance difference between the mobile robot and the reference position based on the time difference and the propagation speed of the ultrasonic wave in the air, the position coordinates of the robot based on the distance difference are calculated. And its position coordinates are transmitted to the robot system through the wireless transceiver module, thus completing a positioning task. After the indoor positioning system wirelessly sends the position coordinates of the robot, it waits for the positioning request again and prepares to position the robot again.In a single indoor positioning system, three ultrasonic receiving probes are placed horizontally collinear at equal intervals as the reference position during the positioning process of the mobile robot. Each ultrasonic receiving probe is connected to an ultrasonic receiving circuit separately, and the ultrasonic receiving circuit converts the electrical signal sent by the receiving probe into a level signal, so the processor module of the indoor positioning system will receive three ultrasonic interruption signals. The interruption time difference that needs to be calculated in the above workflow is the time difference between the three ultrasonic interruption signals, which is also the time difference between the ultrasonic signals sent by the mobile robot body and the three reference positions.


#### 3.2.4. Robot Body

The mobile home service robot body communicates with the indoor positioning system wirelessly to obtain its own position coordinates. It realizes the perception of the surrounding environment and obtains obstacle distance information. The mobile robot body is based on the target position, its own position coordinates, and obstacle distance information. The distance and heading of the next step are determined, the steering and travel of the mobile robot body are controlled, and the local path planning task is completed. The mobile robot body is mainly composed of a processor module with an RC0402 microcontroller as the core, an ultrasonic ranging module, an electronic compass, and a motor drive module. The size of the mobile home service robot is 26 cm × 13 cm × 17 cm.


#### 3.2.5. Ultrasonic Transceiver Circuit

The ultrasonic transmitting circuit used in this article is based on the 555 oscillator circuit. As shown in Figure6, an inverter chip is used to drive the ultrasonic transmitting probe. The No. 4 pin of the oscillator circuit is a reset pin, which is connected to the GPIO port of the microcontroller. When the microcontroller outputs a high level to the No. 4 pin of the 555 oscillator circuit, the No. 3 pin of the oscillator circuit outputs a square wave signal with a frequency of 40 kHz. If the single-chip microcomputer outputs a low level to the 555 oscillator circuit, the oscillator circuit does not output a square wave signal.Figure 6
Schematic diagram of ultrasonic transmitter circuit.


## 3.1. Overview of Indoor Positioning Technology and Control

Indoor positioning technology refers to a technical service that uses multiple control technologies such as wireless communication to obtain the location information of personnel or equipment in indoor and other limited coverage and relatively closed places.


### 3.1.1. Classification of Indoor Positioning Technology

In the existing development field, the widely used indoor positioning technologies include radio frequency identification, infrared, ultra-wideband, and ultrasonic technology. This article will briefly introduce indoor positioning technology in this category.(1) RFID Positioning. Radio frequency identification positioning technology is a technology that uses radio frequency to input and output data in the indoor environment to obtain location information. It is one of the more common positioning technologies in recent years [9]. The radio frequency signal can carry its own identification information, and the radio frequency receiving end detects the strength of the received signal, and the processor calculates the distance between the transmitting end and the receiving end according to the attenuation of the strength of the radio frequency signal. The position of the transmitter is calculated by the distance between a radio transmitter and multiple reference points. In the field of indoor positioning, radio frequency identification technology has the function of measuring multiple objects to be measured at the same time. However, the mapping between wireless signal strength and distance is a nonlinear relationship, and it is easily affected by various environmental factors, such as temperature, humidity, and distribution of metal objects, thus limited in many applications.(2) Infrared Positioning. The working principle of infrared positioning technology is to install infrared receivers in different areas, and the moving object to be tested carries an infrared transmitter to emit infrared signals in real time. When an infrared receiving device receives the modulated infrared signal, it can be determined that the moving object under test is in the area where the receiving device is located. However, this technology has a big limitation. Since infrared rays can only transmit at a line of sight, the penetration is extremely poor. When the logo is blocked, it cannot work normally, and it is also easily affected by environmental factors such as light and smoke. In addition to technical limitations (the transmission distance of infrared rays is not long), in terms of layout, no matter which method, it is necessary to install the receiving end behind each block or even at the corner. The layout is complicated, which increases the cost, and the positioning effect is limited.(3) Ultra-Wideband Positioning. UWB positioning technology is a brand-new new technology that is very different from traditional communication positioning technology. It uses the prearranged anchor nodes and bridge nodes with known positions to communicate with the newly added blind nodes and uses a unique positioning method to determine the position, such as triangulation or fingerprint positioning. The technology has good real-time performance and high positioning accuracy. However, because it needs a large bandwidth, it is easy to cause interference to communication equipment, and there is a large instantaneous power when continuously transmitting short pulses. At present, the existing facilities are more difficult to meet the needs of practical applications.(4) Ultrasonic Positioning. Ultrasonic technology mainly uses the time-flight method to measure distance. We use ultrasonic signals to measure the distance between the starting position and the target position. The ultrasonic signal has a certain beam angle when it is transmitted, so the transmitting end equipped with the moving object under test needs to consider the coverage of the ultrasonic wave. In order to expand the coverage of ultrasonic signals, in practical applications, ultrasonic transmitting probes with larger beam angles are usually selected, or multiple ultrasonic transmitting probes are used to transmit ultrasonic signals in different directions at the same time. The advantage of ultrasonic technology is that the time interval between the ultrasonic signal going back and forth between the transmitting end and the receiving end is linearly related to the distance between the two ends. The disadvantage of ultrasonic technology is that the propagation speed of ultrasonic waves is affected by the air temperature, which requires temperature compensation. This technology has the advantages of low cost, no lighting restrictions, etc., and its application in indoor positioning is becoming more and more extensive.


### 3.1.2. Indoor Positioning Method

With the development of a variety of ranging and communication technologies, many indoor positioning methods based on them have appeared. The classic methods include the arrival angle method based on the propagation signal, the indoor positioning algorithm based on the hyperbolic model, the receiving-based method, and the strength method [10].(1) Received Signal Strength Method. The commonality between the received signal strength method and the TOA algorithm is the positioning method based on the absolute ranging method, but the difference is that the RSSI algorithm transmits a constant power electromagnetic wave signal and measures the attenuation of the signal received by the receiver. It calculates the distance between two points according to the attenuation model of the signal in the air. When this algorithm is applied in practice, each parameter contained in the signal attenuation model should be tested in advance. Its limitation is that the tested parameters will cause certain errors due to environmental differences.At present, the theoretical model commonly used in wireless signal transmission is the Shadowing model, as shown in the following equation [11]:(1)p=p0+10nlgdd0+δ.Among them, the interpretation of each parameter is shown in Table1.Table 1
The definition of each parameter of the equation.
SequenceParameter_Meaning _1d0Reference distance2p0The received signal strength at distanced03dTrue distance4δOcclusion factorIn practical applications, a simplified Shadowing model is often used, as shown in the following equation [12]:(2)p=p0+10nlgdd0.For the convenience of calculation, the value ofd0 is usually taken as 1m; at this time, p0 is the signal strength received at the distance 1m from the wireless signal transmitting source, and n is the signal transmission constant. The signal transmission constant has nothing to do with the signal propagation environment. In the equation, p0and n need to be measured several times through experiments and obtained by fitting according to the experimental data.(2) Arrival Incidence Angle Method Based on the Propagation Signal. The arrival angle method based on the propagation signal is abbreviated as the AOA algorithm. The algorithm needs to set up at least two signal angle measurement devices on the same axis to form the receiving end. As shown in Figure 1, the receiving end is placed at a known position as a reference position, the transmitting end transmits wireless signals to the surrounding, and the receiving end will measure the wireless signal. The incident angle of the signal θ1, θ2 are summed so as to determine the equations of two straight lines in the plane passing through the reference end. The intersection of the two straight lines is the position of the measured end. Since the accuracy of this method is greatly affected by the angle measurement accuracy and the distance between the measured point and the axis, the AOA algorithm is rarely used in practical applications.Figure 1
Arrival incidence angle method based on the propagated signal.(3) Indoor Positioning Algorithm Based on the Hyperbolic Model. The characteristic of a hyperbola is that the distance from any point on the curve to the two foci is equal, and the difference is 2a. As shown in Figure 2, F1 and F2 are the two foci of the hyperbola, and the distance between the two foci is the focal length c. The general form of the hyperbolic equation with the focus on the X axis is (3), where a, b, and c satisfy the relationship of equation (4). In the indoor positioning algorithm based on the hyperbolic model, the focus is the reference position, and the position of the measured end is located on the hyperbola. In order to determine the specific position coordinates of the measured end, at least two sets of hyperbolic models are required [13].(3)x2a2−y2b2=1,(4)a2+b2=c2.Figure 2
Hyperbolic model.The three ultrasonic receiving ends are placed on the same straight line at equal intervals; the distance is D, as the positioning reference end. The straight line where the three positioning reference ends are located is the coordinateX axis, the reference position in the middle is the coordinate origin, and the X axis direction rotated 90° counterclockwise is the positive direction of the Y axis, as shown in Figure 3. The reference position at the origin is set as reference point 1; the reference position at the positive half-axis of the X axis is set as reference point 2; the reference position at the negative half-axis of the X axis is set as reference point 3; each coordinate information of the reference point is shown in Table 2.Figure 3
Schematic diagram of ultrasonic positioning.(5)ΔL1=L2−L1,(6)ΔL2=L3−L2.Table 2
Coordinate information of the reference point.
ScopeReference pointCoordinate informationIndoor localization algorithm based on hyperbolic modelN number 10,0N number 2D,0N number 3−D,0The ultrasonic transmitting end is installed on the measured object, and the distances from the three reference points are, respectively, set toL1,L2, and L3. The distance difference between the measured end and the reference point No. 1 and No. 2 is ΔL1, and the distance difference between the reference point No. 1 and No. 3 is ΔL2, and the calculation is shown in (5) and (6). In practical applications, ΔL1 and ΔL2 can be directly obtained by using a single-chip microcomputer [14].With reference points No.1 and No.2 as the focal points, the relationship between (7) and (8) is established [15]:(7)c=D2,(8)a=ΔL12.Substituting this into (4) will get the following [16]:(9)b=D22−ΔL122.Putting (8) and (9) into (3) will obtain hyperbolic equation (17):(10)x−D/22ΔL1/22−y2D2/4−ΔL12/4=1.Similarly, a hyperbolic model can be established with reference points No. 1 and No. 3 as the focus [18]:(11)x+D/22ΔL2/22−y2D2/4−ΔL22/4=1.Since the position of the measured end satisfies both (10) and (11), the possible position of the ultrasonic transmitting end can be obtained by solving the equation system. Arranging the two equations and subtracting the variable y will get the following:(12)D2ΔL12−D2ΔL22x2−DD2ΔL12+D2ΔL22x+D24D2ΔL12−D2ΔL22+ΔL12−ΔL224+2D=0.Except for the variablex in (12), they are all constants or can be obtained directly by the microcontroller. This equation is the general form of a quadratic equation in one variable, which can be expressed as follows [19]:(13)αx2+βx+ε=0,where [2](14)α=D2ΔL12−D2ΔL22,(15)β=−DD2ΔL12+D2ΔL22,(16)ε=D24D2ΔL12−D2ΔL22+ΔL12−ΔL224+2D.From this, the abscissa of the measured end can be calculated [20]:(17)x=−β±β2−4αε2α.If the measured end is closest to reference point No. 1, as shown in the shaded area in Figure4, that is, when it is satisfied L1>L2|L1>L3, the smaller absolute value of the two possible values should be taken by x. On the contrary, when L1<L2＆L1<L3, the larger absolute value of the two possible values should be taken. It can be known from (15) that β is always negative, so the value of x is shown in thefollowing equation [21]:Figure 4
The end under test is close to the intermediate reference point.(18)x=−β+β2−4αε2αL1>L2|L1>L3,−β−β2−4αε2αL1<L2＆L1<L3.AlthoughL1,L2, and L3 have not been acquired, an interrupt signal will be sent to the microcontroller when the reference position receives the ultrasonic signal, and the reference position closer to the measured end will be the first to send an interrupt signal, so the relationship between L1,L2, and L3 can be triggered by the interrupt sequence of the microcontroller to make a judgment.Since the indoor positioning system described in this article will be placed at the edge of the indoor simulation experiment site, the mobile robot with the ultrasonic transmitter is always located in the positive direction of theY axis, so the ordinate of the ultrasonic transmitter is shown in thefollowing equation [22]:(19)y=x−D/22D2/4−ΔL12/4ΔL12/4−D24+ΔL124.When two of theL1,L2, and L3 are equal, the above hyperbola will have a set that does not exist [23]. At this time, it can be determined that the abscissa of the ultrasonic transmitting end is ±D/2, and the positive and negative can be determined by which two of L1,L2, and L3 are the same, and the single-chip microcomputer only needs to judge whether there is an interrupt signal triggered at the same time and determine the position of the abscissa. After directly bringing the obtained abscissa into equation (19), the ordinate converted to the horizontal plane is obtained through the Pythagorean theorem and is calculated as follows [24]:(20)y=x−D/22D2/4−ΔL12/4ΔL12/4−D24+ΔL124−h2.


## 3.1.1. Classification of Indoor Positioning Technology

In the existing development field, the widely used indoor positioning technologies include radio frequency identification, infrared, ultra-wideband, and ultrasonic technology. This article will briefly introduce indoor positioning technology in this category.(1) RFID Positioning. Radio frequency identification positioning technology is a technology that uses radio frequency to input and output data in the indoor environment to obtain location information. It is one of the more common positioning technologies in recent years [9]. The radio frequency signal can carry its own identification information, and the radio frequency receiving end detects the strength of the received signal, and the processor calculates the distance between the transmitting end and the receiving end according to the attenuation of the strength of the radio frequency signal. The position of the transmitter is calculated by the distance between a radio transmitter and multiple reference points. In the field of indoor positioning, radio frequency identification technology has the function of measuring multiple objects to be measured at the same time. However, the mapping between wireless signal strength and distance is a nonlinear relationship, and it is easily affected by various environmental factors, such as temperature, humidity, and distribution of metal objects, thus limited in many applications.(2) Infrared Positioning. The working principle of infrared positioning technology is to install infrared receivers in different areas, and the moving object to be tested carries an infrared transmitter to emit infrared signals in real time. When an infrared receiving device receives the modulated infrared signal, it can be determined that the moving object under test is in the area where the receiving device is located. However, this technology has a big limitation. Since infrared rays can only transmit at a line of sight, the penetration is extremely poor. When the logo is blocked, it cannot work normally, and it is also easily affected by environmental factors such as light and smoke. In addition to technical limitations (the transmission distance of infrared rays is not long), in terms of layout, no matter which method, it is necessary to install the receiving end behind each block or even at the corner. The layout is complicated, which increases the cost, and the positioning effect is limited.(3) Ultra-Wideband Positioning. UWB positioning technology is a brand-new new technology that is very different from traditional communication positioning technology. It uses the prearranged anchor nodes and bridge nodes with known positions to communicate with the newly added blind nodes and uses a unique positioning method to determine the position, such as triangulation or fingerprint positioning. The technology has good real-time performance and high positioning accuracy. However, because it needs a large bandwidth, it is easy to cause interference to communication equipment, and there is a large instantaneous power when continuously transmitting short pulses. At present, the existing facilities are more difficult to meet the needs of practical applications.(4) Ultrasonic Positioning. Ultrasonic technology mainly uses the time-flight method to measure distance. We use ultrasonic signals to measure the distance between the starting position and the target position. The ultrasonic signal has a certain beam angle when it is transmitted, so the transmitting end equipped with the moving object under test needs to consider the coverage of the ultrasonic wave. In order to expand the coverage of ultrasonic signals, in practical applications, ultrasonic transmitting probes with larger beam angles are usually selected, or multiple ultrasonic transmitting probes are used to transmit ultrasonic signals in different directions at the same time. The advantage of ultrasonic technology is that the time interval between the ultrasonic signal going back and forth between the transmitting end and the receiving end is linearly related to the distance between the two ends. The disadvantage of ultrasonic technology is that the propagation speed of ultrasonic waves is affected by the air temperature, which requires temperature compensation. This technology has the advantages of low cost, no lighting restrictions, etc., and its application in indoor positioning is becoming more and more extensive.


## 3.1.2. Indoor Positioning Method

With the development of a variety of ranging and communication technologies, many indoor positioning methods based on them have appeared. The classic methods include the arrival angle method based on the propagation signal, the indoor positioning algorithm based on the hyperbolic model, the receiving-based method, and the strength method [10].(1) Received Signal Strength Method. The commonality between the received signal strength method and the TOA algorithm is the positioning method based on the absolute ranging method, but the difference is that the RSSI algorithm transmits a constant power electromagnetic wave signal and measures the attenuation of the signal received by the receiver. It calculates the distance between two points according to the attenuation model of the signal in the air. When this algorithm is applied in practice, each parameter contained in the signal attenuation model should be tested in advance. Its limitation is that the tested parameters will cause certain errors due to environmental differences.At present, the theoretical model commonly used in wireless signal transmission is the Shadowing model, as shown in the following equation [11]:(1)p=p0+10nlgdd0+δ.Among them, the interpretation of each parameter is shown in Table1.Table 1
The definition of each parameter of the equation.
SequenceParameter_Meaning _1d0Reference distance2p0The received signal strength at distanced03dTrue distance4δOcclusion factorIn practical applications, a simplified Shadowing model is often used, as shown in the following equation [12]:(2)p=p0+10nlgdd0.For the convenience of calculation, the value ofd0 is usually taken as 1m; at this time, p0 is the signal strength received at the distance 1m from the wireless signal transmitting source, and n is the signal transmission constant. The signal transmission constant has nothing to do with the signal propagation environment. In the equation, p0and n need to be measured several times through experiments and obtained by fitting according to the experimental data.(2) Arrival Incidence Angle Method Based on the Propagation Signal. The arrival angle method based on the propagation signal is abbreviated as the AOA algorithm. The algorithm needs to set up at least two signal angle measurement devices on the same axis to form the receiving end. As shown in Figure 1, the receiving end is placed at a known position as a reference position, the transmitting end transmits wireless signals to the surrounding, and the receiving end will measure the wireless signal. The incident angle of the signal θ1, θ2 are summed so as to determine the equations of two straight lines in the plane passing through the reference end. The intersection of the two straight lines is the position of the measured end. Since the accuracy of this method is greatly affected by the angle measurement accuracy and the distance between the measured point and the axis, the AOA algorithm is rarely used in practical applications.Figure 1
Arrival incidence angle method based on the propagated signal.(3) Indoor Positioning Algorithm Based on the Hyperbolic Model. The characteristic of a hyperbola is that the distance from any point on the curve to the two foci is equal, and the difference is 2a. As shown in Figure 2, F1 and F2 are the two foci of the hyperbola, and the distance between the two foci is the focal length c. The general form of the hyperbolic equation with the focus on the X axis is (3), where a, b, and c satisfy the relationship of equation (4). In the indoor positioning algorithm based on the hyperbolic model, the focus is the reference position, and the position of the measured end is located on the hyperbola. In order to determine the specific position coordinates of the measured end, at least two sets of hyperbolic models are required [13].(3)x2a2−y2b2=1,(4)a2+b2=c2.Figure 2
Hyperbolic model.The three ultrasonic receiving ends are placed on the same straight line at equal intervals; the distance is D, as the positioning reference end. The straight line where the three positioning reference ends are located is the coordinateX axis, the reference position in the middle is the coordinate origin, and the X axis direction rotated 90° counterclockwise is the positive direction of the Y axis, as shown in Figure 3. The reference position at the origin is set as reference point 1; the reference position at the positive half-axis of the X axis is set as reference point 2; the reference position at the negative half-axis of the X axis is set as reference point 3; each coordinate information of the reference point is shown in Table 2.Figure 3
Schematic diagram of ultrasonic positioning.(5)ΔL1=L2−L1,(6)ΔL2=L3−L2.Table 2
Coordinate information of the reference point.
ScopeReference pointCoordinate informationIndoor localization algorithm based on hyperbolic modelN number 10,0N number 2D,0N number 3−D,0The ultrasonic transmitting end is installed on the measured object, and the distances from the three reference points are, respectively, set toL1,L2, and L3. The distance difference between the measured end and the reference point No. 1 and No. 2 is ΔL1, and the distance difference between the reference point No. 1 and No. 3 is ΔL2, and the calculation is shown in (5) and (6). In practical applications, ΔL1 and ΔL2 can be directly obtained by using a single-chip microcomputer [14].With reference points No.1 and No.2 as the focal points, the relationship between (7) and (8) is established [15]:(7)c=D2,(8)a=ΔL12.Substituting this into (4) will get the following [16]:(9)b=D22−ΔL122.Putting (8) and (9) into (3) will obtain hyperbolic equation (17):(10)x−D/22ΔL1/22−y2D2/4−ΔL12/4=1.Similarly, a hyperbolic model can be established with reference points No. 1 and No. 3 as the focus [18]:(11)x+D/22ΔL2/22−y2D2/4−ΔL22/4=1.Since the position of the measured end satisfies both (10) and (11), the possible position of the ultrasonic transmitting end can be obtained by solving the equation system. Arranging the two equations and subtracting the variable y will get the following:(12)D2ΔL12−D2ΔL22x2−DD2ΔL12+D2ΔL22x+D24D2ΔL12−D2ΔL22+ΔL12−ΔL224+2D=0.Except for the variablex in (12), they are all constants or can be obtained directly by the microcontroller. This equation is the general form of a quadratic equation in one variable, which can be expressed as follows [19]:(13)αx2+βx+ε=0,where [2](14)α=D2ΔL12−D2ΔL22,(15)β=−DD2ΔL12+D2ΔL22,(16)ε=D24D2ΔL12−D2ΔL22+ΔL12−ΔL224+2D.From this, the abscissa of the measured end can be calculated [20]:(17)x=−β±β2−4αε2α.If the measured end is closest to reference point No. 1, as shown in the shaded area in Figure4, that is, when it is satisfied L1>L2|L1>L3, the smaller absolute value of the two possible values should be taken by x. On the contrary, when L1<L2＆L1<L3, the larger absolute value of the two possible values should be taken. It can be known from (15) that β is always negative, so the value of x is shown in thefollowing equation [21]:Figure 4
The end under test is close to the intermediate reference point.(18)x=−β+β2−4αε2αL1>L2|L1>L3,−β−β2−4αε2αL1<L2＆L1<L3.AlthoughL1,L2, and L3 have not been acquired, an interrupt signal will be sent to the microcontroller when the reference position receives the ultrasonic signal, and the reference position closer to the measured end will be the first to send an interrupt signal, so the relationship between L1,L2, and L3 can be triggered by the interrupt sequence of the microcontroller to make a judgment.Since the indoor positioning system described in this article will be placed at the edge of the indoor simulation experiment site, the mobile robot with the ultrasonic transmitter is always located in the positive direction of theY axis, so the ordinate of the ultrasonic transmitter is shown in thefollowing equation [22]:(19)y=x−D/22D2/4−ΔL12/4ΔL12/4−D24+ΔL124.When two of theL1,L2, and L3 are equal, the above hyperbola will have a set that does not exist [23]. At this time, it can be determined that the abscissa of the ultrasonic transmitting end is ±D/2, and the positive and negative can be determined by which two of L1,L2, and L3 are the same, and the single-chip microcomputer only needs to judge whether there is an interrupt signal triggered at the same time and determine the position of the abscissa. After directly bringing the obtained abscissa into equation (19), the ordinate converted to the horizontal plane is obtained through the Pythagorean theorem and is calculated as follows [24]:(20)y=x−D/22D2/4−ΔL12/4ΔL12/4−D24+ΔL124−h2.


## 3.2. System Design of Mobile Home Service Robot

This article uses ultrasonic positioning technology to design a mobile home service robot system, analyzes the automatic guidance tasks that the mobile robot system needs to complete, selects appropriate hardware modules to build a mobile robot platform, and introduces the working principles and performance indicators of each hardware module and their main functions in the system one by one. According to the performance parameters, such as energy consumption and main frequency, the required processor module is selected.


### 3.2.1. Hardware System

The mobile home service robot system is mainly composed of a wireless transceiver module, a processor module, an electronic compass, a motor drive module, an ultrasonic ranging module, an ultrasonic transceiver circuit, and a variety of communication interfaces, as shown in Figure5.Figure 5
Mobile home service robot system.


### 3.2.2. Communication System

The communication system in this article is based on the wireless transceiver module, which has its own frequency generator, crystal oscillator, modem, and power amplifier. The wireless signal it sends is in2.3∼2.7GHz, the world's common frequency band, and there is no need to apply for a dedicated frequency band. Its power supply voltage is 3.2V, the maximum working current in the transmit mode is 12.1mA, and the maximum working current in the receiving mode is 13.4mA; the operating temperature range is −35℃∼80℃; the maximum data transmission rate is 1800kbps; the sensitivity under the data transmission rate 900kbps is −80dbm. And the data can be sent and received in 130 selectable working channels; its size is 3.4cm×1.2cm. The characteristics of small size, low power consumption, and wide operating temperature range make it suitable for many fields, such as intelligent sports equipment, remote control devices, and industrial sensors.


### 3.2.3. Workflow of the Positioning System

A mobile home service robot is mainly composed of a processor module with an RC0402 microcontroller as the core and an ultrasonic receiving circuit. After the indoor positioning system starts to work, it waits for the positioning or stops request sent by the robot body wirelessly. If the stop request is made, the mobile home service machine positioning system will end the current work process. If it is a positioning request, the indoor positioning processor module of the system opens the GPIO interrupt and receives the ultrasonic recognition interrupt signal sent by the ultrasonic receiving circuit. The processor module uses the on-chip timer/counter module to realize the timer function and calculates the time difference between the ultrasonic recognition interrupts. After calculating the distance difference between the mobile robot and the reference position based on the time difference and the propagation speed of the ultrasonic wave in the air, the position coordinates of the robot based on the distance difference are calculated. And its position coordinates are transmitted to the robot system through the wireless transceiver module, thus completing a positioning task. After the indoor positioning system wirelessly sends the position coordinates of the robot, it waits for the positioning request again and prepares to position the robot again.In a single indoor positioning system, three ultrasonic receiving probes are placed horizontally collinear at equal intervals as the reference position during the positioning process of the mobile robot. Each ultrasonic receiving probe is connected to an ultrasonic receiving circuit separately, and the ultrasonic receiving circuit converts the electrical signal sent by the receiving probe into a level signal, so the processor module of the indoor positioning system will receive three ultrasonic interruption signals. The interruption time difference that needs to be calculated in the above workflow is the time difference between the three ultrasonic interruption signals, which is also the time difference between the ultrasonic signals sent by the mobile robot body and the three reference positions.


### 3.2.4. Robot Body

The mobile home service robot body communicates with the indoor positioning system wirelessly to obtain its own position coordinates. It realizes the perception of the surrounding environment and obtains obstacle distance information. The mobile robot body is based on the target position, its own position coordinates, and obstacle distance information. The distance and heading of the next step are determined, the steering and travel of the mobile robot body are controlled, and the local path planning task is completed. The mobile robot body is mainly composed of a processor module with an RC0402 microcontroller as the core, an ultrasonic ranging module, an electronic compass, and a motor drive module. The size of the mobile home service robot is 26 cm × 13 cm × 17 cm.


### 3.2.5. Ultrasonic Transceiver Circuit

The ultrasonic transmitting circuit used in this article is based on the 555 oscillator circuit. As shown in Figure6, an inverter chip is used to drive the ultrasonic transmitting probe. The No. 4 pin of the oscillator circuit is a reset pin, which is connected to the GPIO port of the microcontroller. When the microcontroller outputs a high level to the No. 4 pin of the 555 oscillator circuit, the No. 3 pin of the oscillator circuit outputs a square wave signal with a frequency of 40 kHz. If the single-chip microcomputer outputs a low level to the 555 oscillator circuit, the oscillator circuit does not output a square wave signal.Figure 6
Schematic diagram of ultrasonic transmitter circuit.


## 3.2.1. Hardware System

The mobile home service robot system is mainly composed of a wireless transceiver module, a processor module, an electronic compass, a motor drive module, an ultrasonic ranging module, an ultrasonic transceiver circuit, and a variety of communication interfaces, as shown in Figure5.Figure 5
Mobile home service robot system.


## 3.2.2. Communication System

The communication system in this article is based on the wireless transceiver module, which has its own frequency generator, crystal oscillator, modem, and power amplifier. The wireless signal it sends is in2.3∼2.7GHz, the world's common frequency band, and there is no need to apply for a dedicated frequency band. Its power supply voltage is 3.2V, the maximum working current in the transmit mode is 12.1mA, and the maximum working current in the receiving mode is 13.4mA; the operating temperature range is −35℃∼80℃; the maximum data transmission rate is 1800kbps; the sensitivity under the data transmission rate 900kbps is −80dbm. And the data can be sent and received in 130 selectable working channels; its size is 3.4cm×1.2cm. The characteristics of small size, low power consumption, and wide operating temperature range make it suitable for many fields, such as intelligent sports equipment, remote control devices, and industrial sensors.


## 3.2.3. Workflow of the Positioning System

A mobile home service robot is mainly composed of a processor module with an RC0402 microcontroller as the core and an ultrasonic receiving circuit. After the indoor positioning system starts to work, it waits for the positioning or stops request sent by the robot body wirelessly. If the stop request is made, the mobile home service machine positioning system will end the current work process. If it is a positioning request, the indoor positioning processor module of the system opens the GPIO interrupt and receives the ultrasonic recognition interrupt signal sent by the ultrasonic receiving circuit. The processor module uses the on-chip timer/counter module to realize the timer function and calculates the time difference between the ultrasonic recognition interrupts. After calculating the distance difference between the mobile robot and the reference position based on the time difference and the propagation speed of the ultrasonic wave in the air, the position coordinates of the robot based on the distance difference are calculated. And its position coordinates are transmitted to the robot system through the wireless transceiver module, thus completing a positioning task. After the indoor positioning system wirelessly sends the position coordinates of the robot, it waits for the positioning request again and prepares to position the robot again.In a single indoor positioning system, three ultrasonic receiving probes are placed horizontally collinear at equal intervals as the reference position during the positioning process of the mobile robot. Each ultrasonic receiving probe is connected to an ultrasonic receiving circuit separately, and the ultrasonic receiving circuit converts the electrical signal sent by the receiving probe into a level signal, so the processor module of the indoor positioning system will receive three ultrasonic interruption signals. The interruption time difference that needs to be calculated in the above workflow is the time difference between the three ultrasonic interruption signals, which is also the time difference between the ultrasonic signals sent by the mobile robot body and the three reference positions.


## 3.2.4. Robot Body

The mobile home service robot body communicates with the indoor positioning system wirelessly to obtain its own position coordinates. It realizes the perception of the surrounding environment and obtains obstacle distance information. The mobile robot body is based on the target position, its own position coordinates, and obstacle distance information. The distance and heading of the next step are determined, the steering and travel of the mobile robot body are controlled, and the local path planning task is completed. The mobile robot body is mainly composed of a processor module with an RC0402 microcontroller as the core, an ultrasonic ranging module, an electronic compass, and a motor drive module. The size of the mobile home service robot is 26 cm × 13 cm × 17 cm.


## 3.2.5. Ultrasonic Transceiver Circuit

The ultrasonic transmitting circuit used in this article is based on the 555 oscillator circuit. As shown in Figure6, an inverter chip is used to drive the ultrasonic transmitting probe. The No. 4 pin of the oscillator circuit is a reset pin, which is connected to the GPIO port of the microcontroller. When the microcontroller outputs a high level to the No. 4 pin of the 555 oscillator circuit, the No. 3 pin of the oscillator circuit outputs a square wave signal with a frequency of 40 kHz. If the single-chip microcomputer outputs a low level to the 555 oscillator circuit, the oscillator circuit does not output a square wave signal.Figure 6
Schematic diagram of ultrasonic transmitter circuit.


## 4. Indoor Positioning and Control Simulation Test of Mobile Home Service Robots

In this paper, MATLAB simulation software is used to simulate the designed mobile home service robot. In order to simplify the calculation, the robot is regarded as a mass point, and the obstacles are extended in the simulation experiments, and the extension distance is half of the maximum size of the robot. The robot is placed in two three-dimensional spaces, each of which has 5 compartments, and test nodes are set up in the 5 compartments to detect the robot's signal reception time and arrival time for each node in the two spaces. The node positioning accuracy, the optimal degree of route planning, and the absolute and relative errors of navigation and path estimation are based on the spatial center as the origin, and the coordinate information of each node is shown in Table3 and Table 4.Table 3
Coordinate information of test nodes in space 1.
ScopeNode typeLocation information/mThree-dimensional space 1Node 1(5, 3)Node 2(2, 5)Node 3(1, 4)Node 4(8, 2)Node 5(4, 1)Table 4
Coordinate information of test nodes in space 2.
ScopeNode typeLocation information/mThree-dimensional space 2Node 1(7, 7)Node 2(4, 3)Node 3(5, 1)Node 4(3, 6)Node 5(8, 5)The first test was carried out in three-dimensional space 1, and obstacles were set in each division of space 1, and the difficulty was set as intermediate; the second test was carried out in three-dimensional space 2, and obstacles were also set in each division, the difficulty was set as advanced. The size information of each obstacle is shown in Table5 and Table 6.Table 5
Obstacle size in each division of 3D space 1.
ScopeSpace divisionSizeThree-dimensional space 1Division 135 cm∗26 cmDivision 227 cm∗18 cmDivision 342 cm∗34 cmDivision 435 cm∗26 cmDivision 527 cm∗18 cmTable 6
Obstacle size in each division of 3D space 2.
ScopeSpace divisionSizeThree-dimensional space 2Division 152 cm∗36 cmDivision 260 cm∗45 cmDivision 360 cm∗45 cmDivision 458 cm∗31 cmDivision 552 cm∗36 cmThe indoor positioning and control test results of the mobile home service robot are shown in Figure7 to Figure 8.Figure 7
Signal reception and final arrival time test results.
(a)(b)Figure 8
Node positioning accuracy and optimal degree of route planning test results.
(a)(b)Figure7(a), shows the test results of signal reception and arrival time in space 1. Figure 7(b), shows the test results of signal reception and arrival time in space 2.It can be seen from Figure7 that the mobile home service robot is ideal for receiving signals from each node in the three-dimensional space with moderate difficulty in setting obstacles, with the shortest 1.89 seconds and the longest 2.67 seconds, which is caused by the distance variable. The time from receiving the signal to reaching the node is maintained within 6 seconds to 10 seconds. In the three-dimensional space where the difficulty of setting up obstacles is high, the time it takes for the mobile home service robot to receive signals and reach the node increases to a certain extent, which also shows that the recognition accuracy inside the robot system has a positive correlation in the actual movement process of the robot.Figure8(a) The test results of the positioning accuracy and the optimal degree of route planning in space 1. Figure 8(b) The test results of the positioning accuracy and the optimal degree of route planning in space 2.It can be seen from Figure9 that the node positioning accuracy of the mobile home service robot in the first three-dimensional space has reached more than 80%. When the optimal path planning is performed, the test result of the robot is the highest at 82.61% and the lowest at 76.44%. When the distance between the nodes and the origin of the coordinates is larger, there are more paths available for the robot to move. The calculation inside the system needs to consider the influence of time, distance, and other environmental factors to plan the optimal path. This is also reflected in space 2. The size of the obstacles in space 2 is larger than that in space 1, and the impact on the robot's positioning accuracy and system path planning is also more prominent. Still, overall, the average positioning accuracy of each node in space 2 is 80.44%, and the average path planning optimal degree is 78.54%, indicating that the ultrasonic positioning technology is less affected by obstacles in a short distance.Figure 9
Absolute error test results for navigation and dead reckoning.
(a)(b)Figure9(a) The absolute error test results of navigation and dead reckoning in space 1. Figure 9(b) The absolute error test results of navigation and dead reckoning in space 2.The absolute error in the figure is the Euclidean distance between the actual position coordinates of the robot’s movement and the position coordinates calculated by the navigation algorithm at the same time, while the relative error is the ratio of the absolute error of the robot at each position to the distance of the robot’s actual movement. It can be seen from Figure10 that the maximum absolute error of the navigation of the mobile home service robot in the three-dimensional space 1 is 8.77 cm, the minimum value is 4.36 cm, the maximum absolute error of the dead reckoning is 13.22 cm, and the minimum value is 5.18 cm. In space 2, the maximum absolute error of navigation is 11.67 cm, the minimum value is 8.86 cm, the maximum absolute error of dead reckoning is 16.31 cm, and the minimum value is 10.29 cm.Figure 10
Relative error test results for navigation and dead reckoning.
(a)(b)Figure10(a) The relative error test results of navigation and dead reckoning in space 1. Figure 10(b) The relative error test results of navigation and dead reckoning in space 2.It can be seen from Figure10 that the maximum relative error of the mobile home service robot in the three-dimensional space 1 is 6.28%, the minimum is 3.31%; the maximum relative error of the dead reckoning is 6.74%, and the minimum is 4.21%; In space 2, the maximum value of the relative error of navigation is 7.99%, the minimum value is 5.41%; the maximum value of the relative error of dead reckoning is 6.11%, and the minimum value is 4.32%. From the above data, the actual position of the node is not far from the estimated value inside the robot system, indicating that the indoor practical application of the mobile home service robot proposed in this paper is feasible, and the accuracy of the system in the navigation calculation is relatively large.


## 5. Conclusion

In this paper, the indoor positioning technology and indoor positioning method are studied and based on this, a mobile home service robot is designed to improve the positioning accuracy of the system. The performance experimental data are analyzed in depth. The numerical simulation results show that the system has better tracking accuracy in the indoor environment, and the algorithm has strong adaptability.Although this article has carried out in-depth research on the indoor positioning technology and control of mobile home service robots, there are still many deficiencies. The depth and breadth of the research in this article are not enough. In the process of this research, the selection and acquisition of experimental data were carried out under absolutely ideal conditions, and the integrity and validity were not enough, and some interference factors involved in the test process were not considered. In the preliminary stage, in future work, appropriate positioning methods and means will be studied from more perspectives based on the existing technology and level and continuously improve the quality of research work.



---

*Source: 1268393-2022-09-05.xml*