• 검색 결과가 없습니다.

Implementation of HILS and its result

문서에서 저작자표시 (페이지 50-60)

Chapter 3. DEVELOPMENT OF HILS BASED ON PIXHAWK, GAZEBO AND

3.3 Implementation of HILS and its result

33 Fig. 3.10 Layout of the overall HILS

In the configuration of HILS in Fig. 3.10, the CAS, Gazebo and GCS software (QGroundControl) are performed on a computer based on the Linux operating system.

Meanwhile, the hardware includes the Pixhawk board, transmitter and receiver. For the communication protocol, the CAS creates a serial to Pixhawk and two UDP connections to the Gazebo and QGroundControl software. This means that three threads are made on the CAS to maintain data flow in the HILS system. All packets in HILS are transferred through the serial and UDP connections using the MAVLink message, which is popular in UAV applications.

34 of the quad-rotor UAV is set on the ground. The simulation environment looks like the natural world operated in real-time.

Table 3.3 Setting frequency for the signal in HILS

Component name Frequency Description

IMU sensor 500 Hz HIL_SENSORS - Generation from Gazebo

GPS sensor 5 Hz HIL_GPS - Generation from Gazebo

Actuator control 400 Hz HIL_CONTROLS - Generation from Pixhawk

Fig. 3.11 HILS configuration

For comparison, the proposed CAS(denoted TCAS) is investigated using software-in-the- loop simulation(SITL) [57] and traditional HILS with single thread (denoted TS). Herein SITL is simulated by PX4 source, Gazebo and QGC. For communication in SITL, we use the same packet of HILS: HIL_SENSORS, HIL_GPS and HIL_CONTROLS.

35 Fig. 3.12 Workspace of the quad-rotor UAV in Gazebo

Based on the above configuration, the SITL, TS and TCAS are performed to evaluate communication performance. For each simulation, QGC software is used to measure the signal frequencies in the system, which is popular for the ground control station. As displayed in Fig.

3.13, the sampling frequencies of the sensor signals (HIL_SENSORS, HIL_GPS) and actuator control signals (HIL_CONTROLS) do not reach the frequency source in Table 3.3.

(a) SITL

36 (b) TS

(c) TCAS

Fig. 3.13 Frequency in QGroundControl

37

0 1 2

0 150 300 450

Frequency (Hz)

SITL TS TCAS

IMU Frequency

0 1 2

0 150 300 450

Frequency (Hz)

Actuator Control Frequency

0 1 2

0 2 4

SITL TS TCAS SITL TS TCAS

Time (min) Time (min)

Frequency (Hz)

Time (min)

GPS Frequency

Fig. 3.14 Analysis frequency in QGroundControl

The different receive frequencies are shown clearly in Fig. 3.14 and Table 3.4. The results indicate that the TS has the worst performance signal due to the lack of management signals between the components of HILS. Subsequently, conflict communication, signal losses and time responses are influenced by the superior performance signal in SITL and TCAS compared to TS.

This is because SITL is built based on all of the softwares. The communication between the parts have the best performance due to the support of the operating system(OS). The TCAS with the management signal in the CAS can resolve the limitations in TS using multithread architecture.

The sampling frequency of the signal is improved in HILS. Due to significant degradation in the

38 sampling frequency, the performance of the quad-rotor UAV deteriorates. As shown in Fig. 3.15 and Table 3.5, the quad-rotor UAV in the TS simulation did not reach the desired goal. The SITL and TCAS provide superior performance to TS. All results convincingly indicate that the proposed CAS approach could establish a better HILS in terms of communication speed and performance in the quad-rotor UAV.

Table 3.4 Frequency and ratio errors in simulations

Name IMU GPS Control

Frequency source 500Hz 5Hz 400Hz

Average Hz

Ratio Error %

Average Hz

Ratio Error %

Average Hz

Ratio Error %

SITL 462.7284 7.4543 4.4901 10.1972 382.9965 4.2509

TS 352.8847 29.4231 3.6218 27.5650 279.4541 30.1365

TCAS 431.8999 13.6200 4.1525 16.9509 342.6261 14.3435

Table 3.5 RMS error for the performance of quad-rotor UAV

RMS error X Y Z Yaw angle

SITL 0.0068 0.0050 0.0449 0.0342

TS 0.0581 0.0790 0.2131 0.0866

TCAS 0.0196 0.0179 0.0996 0.0429

39

0 1 2

-1.0 -0.5 0.0 0.5 1.0

SITL TS TCAS

X-Ground position(X Desired=0)

0 1 2

0 1 2 3 4

Desired Altitude SITL TS TCAS

Position (m)

Altitude

0 1 2

-1.0 -0.5 0.0 0.5 1.0

Position (m)

Time (min) Time (min)

SITL TS TCAS

Position (m)

Time (min)

Y-Ground position(Y Desired=0)

0 1 2

-1.0 -0.5 0.0 0.5 1.0

Angle (Degree)Angle (Degree)Angle (Degree) SITL

TS TCAS

Roll Angle

0 1 2

-1.0 -0.5 0.0 0.5 1.0

SITL TS TCAS

Yaw Angle(Yaw Desired=0)

0 1 2

-1.0 -0.5 0.0 0.5 1.0

SITL TS TCAS

Time (min) Time (min)

Time (min)

Pitch Angle

(a) Position (b) Attitude

Fig. 3.15 Response of quad-rotor UAV

The HILS includes CAS is performed in different flight modes such as the manual flight mode and mission flight mode.

Manual flight mode

The manual flight mode is applied to control the operations of the quad-rotor UAV, in which the transmitter device is used to generate the desired input for the controllers. In this case, the position controller in Fig. 3.6 is not used to drive the quad-rotor UAV. The schema of the controller for the quad-rotor UAV is redrawn as shown in Fig. 3.16.

, ,

r r r

  

  , ,

Zr

Z eZ

Fig. 3.16 Schema of a tracking controller for the quad-rotor UAV in the manual flight mode

40 The roll, pitch, yaw and altitude references for the altitude and attitude controllers are defined as:

_

r scale roll stick

(4.1)

_

r scale pitch stick

(4.2)

_

r scale yaw stick

(4.3)

_

ZrZ scale throttle stick(4.4)

The quad-rotor UAV is controlled with different values of the altitude, roll, pitch and yaw by changing the stick on the transmitter. For example, the altitude is applied to perform the take- off, hovering and landing tasks of the quad-rotor UAV. For the first time, the take-off flight started at 0.5 to 0.7[min], and then the quad-rotor UAV is maintained at an altitude of approximately 7.0[m]. The rise in altitude is also performed from 7.0 to 16.0[m] in the time from 1.6 to 2.0[min]. The landing flight is applied in the time from 3.5 to 4.2[min]. Similarly, the roll, pitch and yaw references are set with varying values. As shown in the results in Fig. 3.17, the quad-rotor UAV could accurately track the desired references by using the altitude and attitude controller. These results indicate that HILS works well under the real-time conditions of the manual flight mode, in which Pixhawk is established with the proposed tracking flight controller.

The Gazebo software is presented with the 6DOF model of the quad-rotor UAV and 3D visualization generating feedback data for the controllers. Additionally, the CAS can ensure communication between Pixhawk and Gazebo in HILS. This test also showed that the HILS setup can be used for a training flight with the quad-rotor UAV or any other UAV.

41

0 1 2 3 4

0 5 10 15 20

Desired Altitude Altitude

Distance (m)

Time (min) 0 1 2 3 4

-30 -15 0 15 30

Desired Roll Roll

Angle (o)

Time (min)

(a) Altitude (b) Roll angle

0 1 2 3 4

-20 -10 0 10

20 Desired Pitch

Pitch

Angle (o)

Time (min) 0 1 2 3 4

-20 -10 0 10 20 30

Desired Yaw Yaw

Angle (o)

Time (min)

(c) Pitch angle (d) Yaw angle

Fig. 3.17 Attitude and altitude of the quad-rotor UAV in the manual mode

Mission flight mode

HILS is used to illustrate the strength of the CAS in combination with other software/applications. In this test, the QGroundControl software is used to setup the mission flight of the quad-rotor UAV. By using the map of the QGroundControl software, the waypoints are marked for navigation of the quad-rotor UAV. As shown in Fig. 3.18(a), four waypoints given from the GPS data are defined to be the destinations of the flight movement. Based on the GPS information of each waypoint, the desired input

X Yr, r,r

can be generated for the altitude-position controller and the attitude controller in the sampling time by the trajectory algorithm [30]. The desired altitude is set with a constant value of Zr=25[m].

From the result shown in Fig. 3.18(a), the quad-rotor UAV moves to the waypoints to complete the given mission. First, the quad-rotor UAV carries out the take-off flight and maintains altitude at 2.5[m]. In order to start this mission, the altitude of the quad-rotor UAV

42 rises up to 25[m] in the time from 4.0 to 4.5[min] as shown in Fig. 3.18(b). Second, the trajectories tracking between two points (1-2, 2-3 and 3-4) are performed. The pitch angle is changed to ensure that the quad-rotor UAV goes forward while the roll is maintained at zero.

The results in Figs. 3.18(c)(d) show that the roll and pitch angles are changed in a short time at waypoint 2, waypoint 3 and waypoint 4 at 6.3[min], 7.7[min] and 10.1[min], respectively. The yaw angle is also changed at 4.5[min], 6.3[min] and 7.7[min] because, at these times, the quad- rotor UAV needs to change the direction to move to the next waypoint on the map. Finally, the mission is completed and the landing operation is applied to the quad-rotor UAV in the time from 10.3 to 12.8[min] by decreasing the altitude value. These results prove convincingly that the proposed hardwares and softwares can provide effectiveness to test a HILS system for the quad-rotor UAV. In particular, the strength of the CAS was presented in HILS development.

0 2 4 6 8 10 12 14

0 5 10 15 20 25

30 Altitude

Altitude (m)

Time (min)

(a) UAV performing waypoint navigation (b) Altitude

0 2 4 6 8 10 12 14

-40 -20 0 20

40 Roll

Pitch

Angle (o)

Time (min) 0 2 4 6 8 10 12 14

-200 -100 0 100

Yaw

Angle (o)

Time (min)

(c) Roll and pitch angles (d) Yaw angle

Fig. 3.18 Attitude, altitude and tracking waypoint of quad-rotor UAV in the mission flight mode

43

문서에서 저작자표시 (페이지 50-60)

관련 문서