Keywords

1 Introduction

AUVs have become a hot research topic in the last decade worldwide. They have become a main tool for surveying below the sea in scientific, military and commercial applications because of the significant improvement in their performance. To successfully implement new technologies in the field, a number of sub-functions have to be tested and verified in advance. They could be formation control, path planning and communication functions as well as robust control for AUVs, including an emergency architecture for survival. Since it would be very expensive and time consuming to conduct all these tests at sea, researchers and engineers engaged in the operation and development of underwater vehicles need easier test schemes and faster means.

To study the algorithms of formation control and path planning, the virtual-environment-based testbed are usually useful to save development cost and time. The virtual reality is developed following the physics laws and the simulation codes are developed through software like OpenGL and Matlab/Simulink_VRML. Examples of virtual environment involving autonomous underwater vehicles can be found in Brutzman [1] and Denis Gracanin [2]. In Bouxsein and An [3], Harris and Recce [4], Raezkowsky [5], the robot sensor simulation were developed based on computer simulation. However, navigation controller software of AUVs must run only to special hardware because it is the real-time embedded software and thus scheduling and operating testing of control algorithms is usually not available in VR system.

This paper has present a simulatior for an AUV based on hardware in the loop simulation and virtual reality. The platform includes AUV mathematical models, a VR system and a navigation and control processor from a real AUV. The simulator is a testbed that satisfies the various needs of the experimental tests required for the development of control and navigational architectures or software algorithms for underwater flying vehicles. Moreover, this simulator has real hardware modules from an AUV, which significantly improves the accuracy of simulation. Besides, such an in-lab validation saves time and development cost and thus is preferable during navigation controller development course. To carry out a number of tests while avoiding many difficulties in field trials, the first version of this simulator was designed to develop an obstacle avoidance system (OAS). The results of application show that the simulator presented in this paper has better practicability and prospect in project. And it is a useful tool for developing AUV behaviors.

2 Hardware of the Test Platform

2.1 Introduction of a New Long-Range AUV

A new long-range AUV is a kind of test platform which could carry out the module combination abided by the mission requirements to achieve a variety of complex functions. It could not only cruise like the traditional underwater vehicle in use of rudder and contrary-turning propeller, but also could hover, climb or swing in the front and back vertical thruster and lateral thruster. The AUV consists of 10 sections of the basic functions, including: collision avoidance sonar segment, carrying section, former vertical thruster segment, front lateral thruster segment, instruments and battery cabin, navigation controller section, power battery cabin, the back lateral thruster segment, back vertical thruster and the rear section, its shape and structural layout is shown in Fig. 32.1.

Fig. 32.1
figure 1

Sketch map of AUV structure

2.2 Configuration

Intelligent control system of the underwater vehicle is made of real objects, and that the perception system and enforcement body are in use of the virtual reality technology. The configuration of the HILS system is shown in Fig. 32.2, which includes actual AUV navigation and control embedded processor, AUV hydrodynamic model computer, graphics workstation, network service and COM port. Each computer node is connected to the network server by means of optical fiber, which can meet the demand of real-time test. AUV navigation and control embedded processors connect with graphics workstation via the serial port.

Fig. 32.2
figure 2

Configurations of the platform

In the Fig. 32.2, the AUV’s mathematical model of computer (A) is a personal computer installed WINDOWS XP (Service pack 2). Its function is to calculate dynamics and kinematic differential equations to obtain the position and attitude information of the AUV, and then transmits it to the workstation node via the network.

Graphics workstation (IBM 9228 IntelliStation Z pro) installed Windows XP professional X64 Edition, build ocean environment, display dynamically formation cooperation, establish three dimensional solid model (such as: propeller), and receive solution data of (A) to drive AUV solid model. Then, extract the position and attitude information in the visual simulation system as a substitute for various sensors data in the AUV, and transfer the simulation data to the processor (C) through the serial port (E) and data acquisition card (F).

Based on the μc/os-II embedded operating system and PC104 board, the navigation and control system (C) is constructed.

The function of a real-time network server (D) is to deliver data between A and B. All computer systems are connected to a star via network service (SCRAMNet GT), which characters 100Mbps Ethernet exchange and UDP/IP network protocol.

2.3 Flow Diagram

In Fig. 32.3, ① is the calculated results of AUV mathematical model, which include longitude, latitude, course angle, pitching angle, roll angle linear velocity and angular velocity in the local coordinate system. To take into account the influence of earth curvature on underwater vehicles, the coordinate systems are converted among geodetic coordinate system, geocentric coordinate system and north-east-down (NED) coordinate system in the ②. In order to drive the AUV model, the NED coordinates is converted to the coordinates of virtual environment in ③. ④ is the emulational data of sensor models, such as the velocity from the Doppler sonar, the depth from bathometer and the pose from the strap down inertial navigation system. The above data is transmitted through serial interface according to the actual transmission format and frequency in order to simulate the transmission characteristic of the real sensors, and emerge the course of sensor data sent to the embedded navigation controller. The AUV provided with multi-sensor, gather the different sensor data according to the disparate of speed. Thus, the platform adopts the PCI data acquisition card to handle the sensor data efficiently. ⑤ is the control instruction of embedded navigation controller sent to steering gear, propeller and power supply controller. ⑥ is the rotate speed, rudder angle and shut down sent to embedded navigation controller. The xPC sampling analog signals, such as the voltage of propeller revolutions, horizontal rudder and vertical rudder, from embedded navigation controller through A/D interface. And change into corresponding physical quantity according to the scale. ⑦ is the TXD or RXD which the AUV send the depot ship.

Fig. 32.3
figure 3

Information flow chart

3 Simulation Experiment

In this section, the performance of the testbed platform is testified with its availability based on the fuzzy control algorithm.

The obstacle-avoidance algorithm divides the detection region of the AUV Forward Looking Sonar into three parts: front, left front and right front. And take the shortest distance between the craft in each region and the obstacle as the input, then get three inputs \( \left[ {dl,dc,dr} \right] \), which include the distance and the direction information between AUV and the obstacle. Besides, take the azimuth angle \( tr \) between the craft and the target as another input, these four inputs could determine the forward direction of AUV. As the direction of travel is decided by the yaw angle, so we prescribe the yaw angle \( Sa \) as the input which is shown in Fig. 32.4.

Fig. 32.4
figure 4

Fuzzy reasoning of the obstacle avoidance

The values of \( dl \), \( dc \), \( dr \) could be got from the data generated from the Forward Looking Sonar simulator. The algorithm stipulate that there is no obstacle detected when values of \( dl \), \( dc \), \( dr \) are all greater than 200 m. Provided that the sonar simulator detects the obstacles, the distance between AUV and obstacle is calculated and the shortest distance in each domain act as the input values of \( dl \), \( dc \), \( dr \).

The fuzzy linguistic variables of \( dl \), \( dc \), \( dr \) are Near, Far, And its domain \( X = \left[ {0,200} \right] \). The membership function is shown in Fig. 32.5.

Fig. 32.5
figure 5

Membership function of the distance between AUV and obstacle

The fuzzy linguistic variables of direction angle \( tr \) are LB(left big), LS(left small), ZE(zero), RS(right small), RB(right big), and its domain \( Y = \left[ { - 180,180} \right] \). Its membership function is shown in Fig. 32.6.

Fig. 32.6
figure 6

Membership function of the azimuth between AUV and targets

The fuzzy linguistic variables of the output \( Sa \) are TLB (turning left to big), TLS (turning left to small), TZE (turning to zero), TRS (turning right to small), TRB (turning right to big), and its domain \( Z = \left[ { - 30,30} \right] \). The membership function is shown in Fig 32.7.

Fig. 32.7
figure 7

Membership function of the yaw angle

When the target is located on the right side of the AUV, \( tr \) is positive, otherwise negative. When the AUV turns right, \( Sa \) is positive; and AUV turns left, \( Sa \) is negative. The basic principles of obstacle avoidance are as follows: when the obstacles are detected in the underwater vehicle’s left (right) and dead ahead, the AUV turns right (left) immediately.

The obstacle avoidance trajectories are shown in Fig. 32.8. In Fig. 32.8, the line segments on the bow of AUV are the simulative sound wave engendered by sonar simulator. The red line segments mean no obstacle in front of AUV, and the green line segments indicate the obstacle perceived. Yellow triangle marking stands for the AUV trajectory and its position and direction angle are from the experimental data. The results of application show that obstacle avoidance behavior is correct and credible with high image fidelity and good real-time. The methods of simulation were feasible. And this testbed can work for the development of AUV hardware and software.

Fig. 32.8
figure 8

The path diagram of the virtual robot to avoid cylindrical obstacle

AUV velocity vectors (v x, v y, v z), rudder angles (horizontal rudder, vertical rudder), positional information (latitude, longitude and depths) and attitude information (pitch angle, heading angle, roll angle) is shown in Fig. 32.9.

Fig. 32.9
figure 9

Parameter records of AUV cylindrical-obstacle avoidance. a Depth. b Course angle. c Roll angle. d Vertical rudder

4 Conclusion

The main contribution in this paper is to develop an innovative hardware-in-the-loop simulator to simulate the long distance AUV for the purpose of validation of formation control or path planning algorithms. The simulator includes the actual embedded navigation controller from the AUV, and the sensor simulation model. A graphic workstation is applied to draw the virtual environment, including the ocean surroundings and the three-dimensional solid models. The fuzzy control algorithm is presented showing the feasibility of simulator.

It is of note that we have only given the designs of the test-bed platform of the AUVs here. By using the same idea, however, we are optimistic that the HILS presented here can be extended to Unmanned Underwater Vehicles (UUVs) systems. In addition, the models designs of the UUVs can be easily discussed via similar way.