**3. Software architecture**

As aforementioned, we choose Windows Embedded CE 6.0 as the near real-time OS for three of core modules; vision module, navigation module, and control module. For this, we design three different WinCE 6.0 BSPs (Board Support Package) for each of three core modules. Furthermore, these three core modules are connected to each other through Ethernet channel, and constructing a star topology of network structure.

24 Autonomous Underwater Vehicles

For underwater vision, there is one colour camera mounted at the vehicle nose. And three range sonar (forward, backward and downward) are mounted on the vehicle. There sonar are designed for obstacle detection and also for assisting vehicle's underwater localization. For P-SURO AUV, we design a relatively simple but low grade of inertial navigation system

SeaBotix BTD-156 thrusters are selected to steer the vehicle's underwater motion. This is a small size underwater thruster with 90W of average power consumption. For power system, the calculated total power consumption of vehicle system is about 450W. And correspondingly, we design the 1.2kW Lithium Ion battery system, which can support more than two hours of the vehicle's underwater continuous operation. The overall sensor &

Three of PC104 type PCM3353 SBCs (Single Board Computers) are chosen as core modules, each of vision, navigation, and control. PCM3353 SBC provides 4 RS232 channels plus 4 USB channels. And using these USB channels, we can easily extend the necessary serial channels (RS232/422/485) using proper USB to serial converters. PCM3718HG analogue and digital I/O board is used for various peripheral interface. In addition, two peripheral boards, including DC/DC converter system, magnetic switch circuit, leakage detection circuit, are

As aforementioned, we choose Windows Embedded CE 6.0 as the near real-time OS for three of core modules; vision module, navigation module, and control module. For this, we design three different WinCE 6.0 BSPs (Board Support Package) for each of three core modules. Furthermore, these three core modules are connected to each other through

Ethernet channel, and constructing a star topology of network structure.

which consists of AHRS, 1-axis Gyro, 1-axis accelerometer, one depth sensor.

also designed. Fig. 3 shows the inner view of electronic pressure hull.

**2.2 Sensor, thrust, and power system** 

thrust system for P-SURO AUV is listed in Table. 2.

Fig. 3. Electronics system of P-SURO AUV.

**3. Software architecture** 

**2.3 Embedded system** 

Software frame for each core module consists of thread-based multi tasking structure. For each module, there are various sensors connected through serial and analogue channels. And these serial sensors, according to their accessing mechanism, can be classified into two types: active sensor (frequently output measurement) and passive sensor (trigger mode). For these passive sensors as well as analogue sensors, we read the measurements through *Timer( )* routine. And for each of active sensors, we design a corresponding thread. In most of time, this thread is in *Blocking* mode until there is measurement output. And this kind of real-time sensor interface also can be used to trigger other algorithm threads. For example, in the navigation module, there is a thread designed for interfacing with AHRS sensor (100kHz of output rate). After accessing each of attitudes, gyro, and accelerometer output measurement, the thread will trigger *Navigation( )* thread. Moreover, some of these threads are cautiously set with different priority values.

As with the most of other AUVs so far, the P-SURO AUV has the similar overall software frame, which can be divided into two parts: surface remote control system and the vehicle software system. For surface system, the main functions of it are to monitor the vehicle and deliver the user command. According to the user command (mission command in this case), the vehicle will plan a series of tasks to accomplish the mission. For P-SURO AUV, its most experimental field is in a small cuboid. In this kind of environment, it is well known that underwater acoustic channel is vulnerable. For this reason, the vehicle is required to possess relatively high level of autonomy, such as autonomous navigation, obstacle avoidance, path planning and so on.

From the control architecture point of view, the software architecture of P-SURO AUV can be classified into hybrid architecture (Simon et al., 1993; Healey et al., 1996; Quek & Wahab, 2000), which is a certain combinaiton of hierarchical architecture (Wang et al., 1993; Peuch et al., 1994; Li et al., 2005) and behavioral architecture (Brooks, 1986; Zheng, 1992; Bennett, 2000). As aforementioned, because of the limitation of underwater acoustic communication in the engineering basin in PIRO, it is strongly recommended for the vehicle to selfaccomplish its mission without any of user interface in the water. For this consideration, the control architecture of P-SURO AUV is featured as a behavioral architecture based hybrid system (see Fig. 4).

Fig. 4. Hybrid control architecture for P-SURO AUV.

$$\mathcal{C}\text{cross}(\mathbf{x}\_1, \mathbf{x}\_2, \mathbf{x}\_3, \mathbf{x}\_4) = \frac{|\mathbf{x}\_1 \mathbf{x}\_2||\mathbf{x}\_3 \mathbf{x}\_4|}{|\mathbf{x}\_1 \mathbf{x}\_3||\mathbf{x}\_2 \mathbf{x}\_4|} \tag{1}$$

$$\left| \mathfrak{x}\_{l} \mathfrak{x}\_{f} \right| = \det \begin{bmatrix} \mathfrak{x}\_{l1} & \mathfrak{x}\_{l2} \\ \mathfrak{x}\_{f1} & \mathfrak{x}\_{f2} \end{bmatrix}.$$

$$\mathcal{C}\text{cross}(\mathbf{x}\_1, \mathbf{x}\_2, \mathbf{x}\_3, \mathbf{x}\_4) = \frac{|\mathbf{x}\_1 \mathbf{x}\_2||\mathbf{x}\_3 \mathbf{x}\_4|}{|\mathbf{x}\_1 \mathbf{x}\_3||\mathbf{x}\_2 \mathbf{x}\_4|} \tag{2}$$

$$\left|\boldsymbol{\mathfrak{x}}\_{l}\boldsymbol{\mathfrak{x}}\_{l}\right| = \det\begin{bmatrix} \boldsymbol{\mathfrak{x}}\_{l1} & \boldsymbol{\mathfrak{x}}\_{l2} \\ \boldsymbol{\mathfrak{x}}\_{f1} & \boldsymbol{\mathfrak{x}}\_{f2} \end{bmatrix}.$$

$$\mathbf{x}\mathbf{x}' = H\mathbf{x},\tag{3}$$

$$H = \{h\_1 \: h\_2 \: h\_3\}^T = \lambda A \lbrack r\_1 \: r\_2 \: t \rbrack,\tag{4}$$

Development of a Hovering-Type Intelligent Autonomous Underwater Vehicle, P-SURO 29

underwater path planning. Under this consideration, we carry out a series of test measuring the minimum and maximum recognition range both in the air and in the water. Test results are shown in Fig. 8 and 9, from which we can see that the maximum recognition range in the water is approximately half of the one in the air. For the safety consideration, we force the

In the past decades, SLAM (Simultaneous Localization and Mapping) has been one of most hot issues in the robotics community (Leonard & Burrant-Whyte, 1992; Castellanos & Tardos, 1999; Thrun et al., 2005). SLAM problems arise when the robot does not have access to a map of the environment; nor does it have access to its own poses (Thrun et al., 2005).

vehicle to keep from the basin wall at least 1.5m throughout the various basin tests.

Fig. 8. Test environments.

Fig. 9. Test results

**5. SLAM using range sonar array** 

Given the camera intrinsic matrix � and the homography � in the image, we can get the three-dimensional relationship between the pattern and the camera (robot) using following equations

$$\begin{aligned} r\_1 &= \lambda A^{-1} h\_1 \\ r\_2 &= \lambda A^{-1} h\_2, \\ r\_3 &= r\_1 \times r\_2, \\ t &= \lambda A^{-1} h\_3. \end{aligned} \tag{5}$$
