a real-time implementation of an autonomous uav controller ... · a real-time implementation of an...

8
FARID ALIDOUST et al: A REAL-TIME IMPLEMENTATION OF AN AUTONOMOUS UAV CONTROLLER … DOI 10.5013/IJSSST.a.14.01.06 ISSN: 1473-804x online, 1473-8031 print 37 A Real-Time Implementation Of An Autonomous Uav Controller Using Fpga: Based On Fuzzy Logic Approach Farid Alidoust Aghdam 1 , Ali Rostami 1,2 and Siamak Haghipour 1 1- Mechatronics Engineering Department, Tabriz Branch, Islamic Azad University, Tabriz, Iran 2- School of Engineering-Emerging Technologies, University of Tabriz [email protected], [email protected], [email protected] Abstract — Controlling numerous actuators and sensors of a UAV simultaneously, is slightly challenging. Also, in nonlinear systems, which there are plenty of parameters to be identified and controlled, the fuzzy controllers, will permit more robust control than classic controllers and give stable outputs when exposed to high deviations in the input parameters. Therefore, we used FPGA to solve this issue. This work shows the design methodology of a UAV controller using FPGA which execute fuzzy logic. Appropriate UAV’s position, speed and altitude parameters control are essential parts of this study. The proposed fuzzy controller offers performance of 2GFLIPS with 125 MHz FPGA clock. However, with respect to the low usage of the resources on the FPGA, parallel pipelined design of the FLC and the fact that HDL code could be instantiated in parallel, upper calculation power up to about 8GFLIPS is reachable. Keywords - UAV, Decision Making, Fuzzy Logic, FPGA, Xilinx I. INTRODUCTION Unmanned aerial vehicles (UAVs) are gradually being used in real-world applications, as they offer appropriate maneuverability, cost savings, lower hazard and weight in comparison with manned aircraft. It is obvious that the research interests in control and navigation of UAVs increased enormously in current years. This tendency will carry on in the future, as UAVs are poised to replace the human-in-the-loop during hazardous tasks that manned aircrafts facing with. This may be owing to the fact that UAVs progressively open their way into civil, military and other applications (e.g., remote transport of equipment, patrolling, natural resource estimation, ecological monitoring, combat zone surveillance, etc.) In the civilian territories, UAVs are useful in carrying out a broad variety of aerial missions such as search and rescue, natural disaster monitoring and atmospheric studies [1]. On the other hand, the maneuver of the UAVs in the air space needs a high level of safety as equal to a manned aircraft and human pilot skills. Realizing higher levels of autonomy integrated in the UAVs result in this safety necessity. At the same time, it also reduces the vulnerability to communication failures, lowers the operating costs, and decreases the amount of work for the faraway control room pilot. There are many modules required to reproduce the skills of a human pilot integrated in a UAV. One significant part of this is making a replica of the decision making skills. A proper approach to realize this includes the use of fuzzy logic. There has been growing concentration on using fuzzy logic in applications that have enormous rule bases. These applications present a computational task as the fuzzy-processor should meet subtle performance necessities. Examples consist of such diverse areas as fuzzy image processing, data mining, decision support, trajectory generation and trajectory tracking [2, 3]. The inspiration for the task defined in this paper is the realization of decision making systems inside the UAVs. Such systems are compulsory to lead UAV responses to various situations comparable to those of a human pilot. Examples include path planning, collision avoidance and compulsory landings [4, 5]. Integration of the intelligence and decision making in a UAV can be modeled in three steps as: deliberation, sequencing, and primitive actions [6]. At the beginning, a deliberator puts forward tasks to a task sequencing layer. This layer establishes high level tasks into a sequence of separate simple tasks to action layer which executes real time actions in order to control UAV. [6] The routine proposed in this paper is fuzzy logic based. Three fuzzy modules are designed for autonomous control, first is used for adjusting the roll angle value to control UAV’s flight heading, and the other two are used for correcting elevator and throttle controls to achieve the preferred altitude and speed values. Execution of such intelligent actions essentially requires the estimation of numerous and perhaps varying goals. Issues such as unexpected weather conditions, faults in telecommunication links and UAV subsystem failures are problems that human pilots usually take care of, but such abilities are absent in most recent UAVs. Smart control, and especially fuzzy logic, is understood as a possible technique for assembling intelligent pilot activities inside an unmanned aircraft. As these systems are expected to accomplish in semi real-time because of the rapid dynamics of unmanned air vehicles, it is mandatory that the fuzzy system meets real-time processing constraints.

Upload: others

Post on 21-Apr-2020

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: A Real-Time Implementation Of An Autonomous Uav Controller ... · A Real-Time Implementation Of An Autonomous Uav Controller Using Fpga: Based On Fuzzy Logic Approach ... parallel

FARID ALIDOUST et al: A REAL-TIME IMPLEMENTATION OF AN AUTONOMOUS UAV CONTROLLER …

DOI 10.5013/IJSSST.a.14.01.06 ISSN: 1473-804x online, 1473-8031 print 37

A Real-Time Implementation Of An Autonomous Uav Controller Using Fpga: Based On Fuzzy Logic Approach

Farid Alidoust Aghdam1, Ali Rostami1,2 and Siamak Haghipour1

1- Mechatronics Engineering Department, Tabriz Branch, Islamic Azad University, Tabriz, Iran 2- School of Engineering-Emerging Technologies, University of Tabriz

[email protected], [email protected], [email protected]

Abstract — Controlling numerous actuators and sensors of a UAV simultaneously, is slightly challenging. Also, in nonlinear systems, which there are plenty of parameters to be identified and controlled, the fuzzy controllers, will permit more robust control than classic controllers and give stable outputs when exposed to high deviations in the input parameters. Therefore, we used FPGA to solve this issue. This work shows the design methodology of a UAV controller using FPGA which execute fuzzy logic. Appropriate UAV’s position, speed and altitude parameters control are essential parts of this study. The proposed fuzzy controller offers performance of 2GFLIPS with 125 MHz FPGA clock. However, with respect to the low usage of the resources on the FPGA, parallel pipelined design of the FLC and the fact that HDL code could be instantiated in parallel, upper calculation power up to about 8GFLIPS is reachable.

Keywords - UAV, Decision Making, Fuzzy Logic, FPGA, Xilinx

I. INTRODUCTION

Unmanned aerial vehicles (UAVs) are gradually being used in real-world applications, as they offer appropriate maneuverability, cost savings, lower hazard and weight in comparison with manned aircraft. It is obvious that the research interests in control and navigation of UAVs increased enormously in current years. This tendency will carry on in the future, as UAVs are poised to replace the human-in-the-loop during hazardous tasks that manned aircrafts facing with. This may be owing to the fact that UAVs progressively open their way into civil, military and other applications (e.g., remote transport of equipment, patrolling, natural resource estimation, ecological monitoring, combat zone surveillance, etc.) In the civilian territories, UAVs are useful in carrying out a broad variety of aerial missions such as search and rescue, natural disaster monitoring and atmospheric studies [1].

On the other hand, the maneuver of the UAVs in the air space needs a high level of safety as equal to a manned aircraft and human pilot skills. Realizing higher levels of autonomy integrated in the UAVs result in this safety necessity. At the same time, it also reduces the vulnerability to communication failures, lowers the operating costs, and decreases the amount of work for the faraway control room pilot.

There are many modules required to reproduce the skills of a human pilot integrated in a UAV. One significant part of this is making a replica of the decision making skills. A proper approach to realize this includes the use of fuzzy logic.

There has been growing concentration on using fuzzy logic in applications that have enormous rule bases. These applications present a computational task as the fuzzy-processor should meet subtle performance

necessities. Examples consist of such diverse areas as fuzzy image processing, data mining, decision support, trajectory generation and trajectory tracking [2, 3].

The inspiration for the task defined in this paper is the realization of decision making systems inside the UAVs. Such systems are compulsory to lead UAV responses to various situations comparable to those of a human pilot. Examples include path planning, collision avoidance and compulsory landings [4, 5]. Integration of the intelligence and decision making in a UAV can be modeled in three steps as: deliberation, sequencing, and primitive actions [6].

At the beginning, a deliberator puts forward tasks to a task sequencing layer. This layer establishes high level tasks into a sequence of separate simple tasks to action layer which executes real time actions in order to control UAV. [6]

The routine proposed in this paper is fuzzy logic based. Three fuzzy modules are designed for autonomous control, first is used for adjusting the roll angle value to control UAV’s flight heading, and the other two are used for correcting elevator and throttle controls to achieve the preferred altitude and speed values.

Execution of such intelligent actions essentially requires the estimation of numerous and perhaps varying goals. Issues such as unexpected weather conditions, faults in telecommunication links and UAV subsystem failures are problems that human pilots usually take care of, but such abilities are absent in most recent UAVs.

Smart control, and especially fuzzy logic, is understood as a possible technique for assembling intelligent pilot activities inside an unmanned aircraft. As these systems are expected to accomplish in semi real-time because of the rapid dynamics of unmanned air vehicles, it is mandatory that the fuzzy system meets real-time processing constraints.

Page 2: A Real-Time Implementation Of An Autonomous Uav Controller ... · A Real-Time Implementation Of An Autonomous Uav Controller Using Fpga: Based On Fuzzy Logic Approach ... parallel

FARID ALIDOUST et al: A REAL-TIME IMPLEMENTATION OF AN AUTONOMOUS UAV CONTROLLER …

DOI 10.5013/IJSSST.a.14.01.06 ISSN: 1473-804x online, 1473-8031 print 38

Platforms which perform calculations for fuzzy logic based systems should take essential considerations in terms of realizing autonomous UAV decision systems. As a platform, Field Programmable Gate Arrays (FPGAs) has appeared a proper computational platform for the UAV applications because of their high speed computational abilities as well as parallel computing.

The usage of fuzzy logic in UAV intelligence is not a novel technique. Lundell and Wu [7, 8] verified the applicability of fuzzy logic to UAV intelligence. Several features can be assessed when a controller is going to trigger actuators of a UAV. These include spatial, temporal and other restrictions which are related to the aircraft. A fuzzy multi-condition judgment system requires to process excessive amounts of information using a large array of fuzzy rules.

Previously, Boskovic shows a deviation of multi-layer structure for UAVs. [9] That outline creates prescriptions for the all type of intelligent UAV functionalities, from decision making and route scheduling to low level control for keeping the UAV health.

Fuzzy logic based methods have been applied to different modules inside smart control structures for UAVs. Shi [10] demonstrates a new method for navigation and path planning of a helicopter in unfamiliar locations through fuzzy logic.

I

N

P

U

T

S

O

U

T

P

U

T

S

Fuzzification Defuzzification

Knowledge Base

Fuzzy Rules

Fuzzy Inferencing

Figure 1: Three main stage for realizing a fuzzy controller

The trajectory creation layer generates an optimum

path through the waypoints in regard to a specific cost function. Nojima [11] uses a combination of fuzzy logic and genetic algorithms to produce trajectories for mobile robots.

As UAVs are fundamentally mobile robots that fly, it is possible that a fuzzy trajectory generation could be practical in UAV applications. Fuzzy control is a common application of fuzzy theory that has been widely applied to UAVs. For example, Dong [12] demonstrates a fuzzy controller that accomplishes trajectory tracking.

Fuzzy logic, first introduced in 1965 by Zadeh [13], fuzzy logic fundamentally offers a technique for relating input space to output space in a non-linear, rule based approach. Fuzzy sets form the base of fuzzy reasoning. Normally, a fuzzy controller (Figure 1) consists of three main stages:

1. Fuzzification process: where certain real data are converted to a fuzzy amounts of membership functions.

2. Inferencing – where the rules are applied to decide about the output fuzzy variables

3. Defuzzification – where the fuzzy output variables are decoded into certain values. [3, 14]

A fuzzy controller requires all mentioned three stages in order to make the input-output relating. There have been many fuzzy controller employments previously with digital and analogue fuzzy processing methods. In Figure 2, block diagram of a mixed mode analog-digital fuzzy co-processor is shown. [15] Usually, analog fuzzy processors dissipate less power than their digital equivalents but they are limited in terms of data accuracy.

MFC

MFC

MFC

Defuzzification

OUT

Analog Part

Digital Part

ReconfigurableFuzzy

Inference

X

Y

Z

Add. 8‐bit

Enable

Data. 8‐bit

5

5

5

7

Figure 2: Block diagram of a fuzzy analog/digital co-processor

Digital fuzzy processors propose further resolutions

and are common as a result of the user-friendliness and development of high-speed DSP and FPGAs [3, 14]. Some existing applications reach up to one hundred MFLIPS using the Centre of Gravity defuzzification method. [16-18] In the same way, Daijin [19] realized an 8-bit processor that has a delay of 5.14ms. However, Lee’s implementation offers a worthy performance with 1.2GFLIPS with max defuzzification and 25MFLIPS with CoG defuzzification and system pipeline delay of 28.7ns. [20] his work also exceeds the performance attained by the Motorola 68HC12 microcontroller which makes fuzzy calculations in the order of microseconds [21].

Besides the flexibility offered through reconfiguration ability, FPGA also presents an excessive amount of resources such as logic gates, latches and dedicated DSP units and well-organized software development tools (EDA).

Furthermore, FPGA also carry memory blocks inside the chip (e.g. Spartan III, Virtex-V and Cyclone II) for storing data. [22-24]

II. ANALYZING THE DYNAMICS OF UAV CONTROL

The unsteady nature of the helicopters all together makes it actually challenging to analyze the system behavior in flight, and consequently to validate the dynamic simulation model. In this section, a concise analysis of the kinematic model made by an unmanned mini helicopter in a stable flight will be defined and the controllable mechanisms which are required for an autonomous control will be recognized.

Page 3: A Real-Time Implementation Of An Autonomous Uav Controller ... · A Real-Time Implementation Of An Autonomous Uav Controller Using Fpga: Based On Fuzzy Logic Approach ... parallel

FARID ALIDOUST et al: A REAL-TIME IMPLEMENTATION OF AN AUTONOMOUS UAV CONTROLLER …

DOI 10.5013/IJSSST.a.14.01.06 ISSN: 1473-804x online, 1473-8031 print 39

The typical control parameters for a helicopter consist of lateral, longitudinal, collective and pedal control, denoted by ulong , ucol and u ped respectively. The actuator

dynamics used in a helicopter are considerably faster than that of the helicopter itself, so it is feasible to ignore them while modeling the system. By this way, the control signals modify the physical quantities straightly: swash-plate tilt in lateral ( A ) next to longitudinal ( B ) direction, main rotor blade pitch ( MR ) and tail rotor blade pitch

( TR ), correspondingly. Thrust magnitudes of main

( MRT ) and tail rotor are determined as a function of pitch

inputs, while MRT direction, defined by lateral ( 1s ) and

longitudinal ( 1c ) flapping angles, is a function of the

swash-plate tilting. [25, 26] The equations of motion in a firm body subjected to an

exterior wrench applied at the center of mass and identified with respect to the B are specified by Newton-Euler equation (1): [25, 26]

. ( . )

. ( . )

b b bF mV mV

db I Idt

(1)

Where bF and b are the vectors of forces and

external torques, bV and are the translatory and angular velocity, m is the mass and I is the inertia matrix.

The previous equation returns the matrix that describes relations between main motion parameters of the helicopter:

1.

( ).

1( ( . ))

b bF Vb

V m

Psb

bI I

(2)

Where is the time derivative of the Euler-angles

and Psb is the frame transformation matrix. The leading difficult is the designation of the inertia matrix, which is hard to calculate because of the complexity of the vehicle dynamics. The thrust produced by the main rotor can be defined by the subsequent equation:

2. . . . .

., 4

R a B cT

MR TR b i

(3)

Here is the density of the air, is the rotor angular rate, R is the rotor radius, a is the constant lift curve slope, B is the number of blades, c is the blade chord,

b is the velocity of the main rotor blade relative to the air,

and i

is the induced wind velocity through the plane

traversed by the rotor. The main rotor thrust equations are

recursively described, with MR

T depending on i

and vice

versa, hence the main rotor thrust MR

T is calculated by the

use of numerical methods. More details can be found in the previous works. [27, 28]

The implemented controllers presented here are based on fuzzy logic nested loop structure. In Figure 3, a diagram of controllers is shown; the diagram suggests that each controller cooperate with each other to form an autonomous control. The autonomous control uses feedbacks from attitude and pose Estimator module and attempts to keep the helicopter in the position, heading and altitude commanded by the guidance remote module.

Autonomous Control of Helicopter

Lateral ControlLongitudinal 

control

Collective Control Yaw Control

Figure 3: The autonomous control is organized by means of four

decoupled subsystems that compute control signal for every flight control input

With the light coupling of the system, the cohesion

between the state variables is not compulsory and the control system is separated into four independent loops: lateral, longitudinal, collective and yaw, one for each control input.

The lateral and longitudinal controllers offer the similar structure. A block diagram of the parallel loop configuration is presented in Figure 4. Because all the system is under actuation, with the aim of involving all the incoming data from the sensors in a parallel way, the control loops are combined in the following order:

1. The inner (green) loop performs modifications of positional parameters.

2. The intermediate (blue) loop implements the correction of velocity parameter.

3. The outer (orange) loop makes tuning of angle parameter.

The error value in a control loop is used to create the reference for the subsequent units.

The yaw and collective controllers present simpler configuration. In the yaw controller there are two level nested loops which the outer loop makes correction of the heading, whereas the inner loop accomplishes regulation of the yaw rate that in turn improves the stabilization of the system. As an alternative, The collective controller is designed by just a single loop that only consider about altitude data.

Page 4: A Real-Time Implementation Of An Autonomous Uav Controller ... · A Real-Time Implementation Of An Autonomous Uav Controller Using Fpga: Based On Fuzzy Logic Approach ... parallel

FARID ALIDOUST et al: A REAL-TIME IMPLEMENTATION OF AN AUTONOMOUS UAV CONTROLLER …

DOI 10.5013/IJSSST.a.14.01.06 ISSN: 1473-804x online, 1473-8031 print 40

HelicopterUnder controlFLC

‐+

+‐

+‐

Position ref.

Velocity ref.

Attitude ref.

FLC

FLC

Figure 4: FLC units perform parallel parameters control

III. DESIGN AND METHODOLOGY

In this paper a high performance fuzzy processor for autonomous control of an unmanned helicopter realized. Its structure includes a 16-bit data-width totally parallel and pipelined structure implemented using the Xilinx Spartan-III FPGA Device.

With respect to the kinematic model of a helicopter, in order to design a Fuzzy Logic Controller inside an autonomous unmanned helicopter (Figure 5), it is compulsory to have at least four individual sets of fuzzy rules. There are four sets of fuzzy rules for controlling the helicopter movements in roll, pitch and yaw parameters as well as another for controlling the throttle.

XHYH

ZH

Figure 5: Roll, pitch and yaw movements

A. Fuzzy Logic Controller Design

Fuzzy controllers are described by some main design parameters. These parameters include:

Method of fuzzification Total input variables Total output variables Amount of input membership functions Amount of output membership functions Total rules Method of inferencing Method of defuzzification

The configuration is extensible to systems with any number of rules, inputs and outputs. Moreover, because all design implemented using Verilog hardware description language, the scheme could easily be migrated to an ASIC. This design involves lookup table based Fuzzification and Mamdani inferencing with generalized modus ponens reasoning (4):

statement: If is Then is

Premise: is

Inference: is

X A Y B

X A

Y B

(4)

Where A , A and B , B are input and output Membership-functions correspondingly. In this case, ( X is A ) expression is the precedent and (Y is B) is the result; though, each fuzzy rule would take the form of equation (5):

If is and is and ... Then1 1 2 2

is and is and ...1 1 2 2

X A X A

Y B Y B

(5)

Min-max inferencing was applied where min (.) was the conjunctive and max (.) the disjunctive operator. When more than one rule implicates the same output MF, the maximum implication value is taken; this process called aggregation.

In defuzzification process, center-of-gravity defuzzification (eq. (6)) and max defuzzification (eq. (7)) were implemented. As the design is modular, other fuzzy domain operators such as Hamacher, Einstein, and Algebraic… could be realized.

( )'

( )'

x xB i iY

xB i

(6)

' ', ( ) ( ),

i B i B j jY x if x x x X (7)

In nonlinear systems, which there are plenty of

parameters to be identified and controlled, the fuzzy rules will permit the FLC to be stronger than for example a state space controller or Euler model and will allow for stable outputs when exposed to high variations in input parameters.

An outline of the pipelined fuzzy processor design is presented in Figure 6. Crisp input data fuzzification was implemented using Look-up tables as LUT is the fastest element on FPGA devices [22, 24]. Each 16-bit crisp input data is taken as the address of the LUT to get the degree of membership to that membership-function as follows, the degree of membership to every membership-function for every input variable is acquired in parallel. It can be seen that reducing processing time in this way needs usage of memory; but this is not a problem as a result of relatively sufficient memory blocks exist in our FPGA device.

inputs

outputs

Look‐upTable

t‐norm(.)operator

Aggregate(.)

Look‐upTable

s‐norm(.)operator

∑ .∑

mapping to fuzzy domain

Fuzzy thinking (inferencing)

mapping fuzzy values to crisp data

Figure 6: Input to output Path (most delayed path) in the Pipelined Fuzzy Processor

Page 5: A Real-Time Implementation Of An Autonomous Uav Controller ... · A Real-Time Implementation Of An Autonomous Uav Controller Using Fpga: Based On Fuzzy Logic Approach ... parallel

FARID ALIDOUST et al: A REAL-TIME IMPLEMENTATION OF AN AUTONOMOUS UAV CONTROLLER …

DOI 10.5013/IJSSST.a.14.01.06 ISSN: 1473-804x online, 1473-8031 print 41

...

...

Fuzzy Value from Lookup Table

To Defuzzification Unit

Implication Aggregation

+

+

Figure 7: Inferencing Architecture

An entirely pipelined parallel inferencing configuration

Based on equation (7) presented in Figure 7. For every single input in the implication unit, a tree configuration was employed using the appropriate t-norm (.) or s-norm (.) operator as displayed in Figure 8. Every min or max blocks was pipelined into two sub-stages to an extra reduction in the overall pipeline latency. This was feasible because of developments in FPGA inner structures which result in a reduced clock-skew, memory register propagation and setup-delays. Furthermore, an additional effective design of the FPGA inner logic for min and max blocks also facilitated decreasing the pipeline latency [29, 30].

always @(posedge clk, sel)If (sel==n’h 0)y=a;else If  (sel==n’ 1)y=b;…else If  (sel==n’h n‐1)y=n;

a

b

n

n‐1

y...

Selection Logicsel

Figure 8: Implicate-Aggregate tree structure and its Verilog pseudo code

In this design, both center-of-gravity and max defuzzification were realized. Max defuzzification can be implemented with a tree of disjunctive elements like to that shown in Figure 7. Instead, center-of-gravity defuzzification was implemented using the pre-calculated LUT based method. This technique is considered that there are only 2 degrees of overlap among output Membership functions. By this way, Membership functions are separated into non-overlapping segments (Figure 9). [8, 20]

ABC

Figure 9: Two overlapping Membership functions create three

non-overlapping zones (A, B and C)

The moment of function and area of function (numerator and denominator in the eq. (6)) are pre-calculated and kept in LUTs for every section for all alpha cut levels. Thus, the accumulated truncation level of the inferencing phase can be used to find the moment of function and area of function in just one clock cycle of the FPGA. The sums for the moment of function and area of function for all sections are computed and by performing a division the final value of the center-of-gravity will be obtained. (Figure 6) [8, 20]

Fuzzy logic controller of four main parameters designed in a way to act flexible with respect to the error parameters. FLC surfaces of mentioned controllers demonstrated in Figure 10.

Figure 10: Fuzzy rules surfaces

Finally, it is wise to make specific interpretations about

the commonly used measure of performance in the fuzzy systems. There is an absence of agreement on a standard way of performance measurement and this gives an increase in uncertainty when comparing the performance of different fuzzy processors [3]. On the other hand, a study of the former works shown that a lot of authors use the FLIPS as measurement unit. The amount of FLIPS is computed via multiplying the number of inference rules by the number of complete end-to-end fuzzy estimations in a second. As a result, the FLIPS standard just offers an indication of the throughput of the processor and is greatly affected by the extent of the rule base. An additional technique for performance calculation is to measure the system delay but this method is similarly reliant on the target fuzzy system. Some may possibly study the latencies of modules in the system to acquire a new valid assessment of the scalability of the structure. An additional method for calculating performance is to determine the pipeline delay; by means of this a standard indication of the throughput of the structure that is not dependent on the target system will be defined.

B. FPGA Design

A Field Programmable Gate Array (FPGA) is a programmable chip where the logic gates can be

Page 6: A Real-Time Implementation Of An Autonomous Uav Controller ... · A Real-Time Implementation Of An Autonomous Uav Controller Using Fpga: Based On Fuzzy Logic Approach ... parallel

FARID ALIDOUST et al: A REAL-TIME IMPLEMENTATION OF AN AUTONOMOUS UAV CONTROLLER …

DOI 10.5013/IJSSST.a.14.01.06 ISSN: 1473-804x online, 1473-8031 print 42

rescheduled as required by its user’s needs. This technology offers the required flexibility to develop a processor dedicated to a particular operation instead of using a general purpose DSP or microprocessor as used in most of the current unmanned robots and vehicles. The FPGA area can then be enhanced by incorporating parallel processing. The maximum speed one can reach in an FPGA depends on the design outline besides the FPGA chip family and technology. An entirely pipelined design will run considerably faster than a typical combinational one.

A processing unit with inadequate computational ability could lead to improper control of the UAV. This can be eluded with the use of a fuzzy processor with low latency cycles. FPGAs can be configured to have better flexibility and parallel processing ability which surely cannot be achieved using a DSP or microprocessor. We used FPGA (Xilinx Spartan3-XC3S400) as the processor of the Fuzzy Logic Controller (Figure 11). Its on-board clock frequency is 50 MHz which using an inner DLL (delay locked loop) unit, be altered to a 125 MHz system clock, therefore information processing is more rapidly than alternative DSP or microprocessors. A controller to work efficiently should be simple and fast. Besides, enough I/O pins are required to sense and control the sensors and actuators respectively. Hence, we can control all the motors by just one controller (FPGA).

Our design contains a number of different modules. Figure 12 and Figure 13 represent RTL view of the synthesized fuzzy logic core and technology-view of the massive parallel pipelined design in the FPGA, respectively. Completed implementation of the routed design view of the FPGA area shown in Figure 14. All modules are programmed using Verilog hardware description language as coding tool, Xilinx ISE as HDL compiler and Active-HDL next to Matlab as a simulation tool.

Designing Fuzzy Controller using Matlab and Xilinx‐ISE

Environments

Xilinx JTAG Cable

Xilinx FPGA Board

Figure 11: Fuzzy Controller design and implementation tools

In this work four rule with dual-input single-output

fuzzy system was realized. It had 8 membership functions per input variable and 8 membership functions per output variable. The system employed Mamdani inferencing and

offers an option of selecting the max or CoG defuzzification.

After analyzing timings in the implemented design in Xilinx-ISE Environment pipeline delay of 6.021 ns achieved. The fuzzy processor core used just 18% of the existing logic slices on the Spartan-III FPGA (XC3S400-PQ208-5). A brief report on utilization of the FPGA resources is shown in TABLE 1.

TABLE 1: FPGA DEVICE UTILIZATION SUMMARY

Resources Value Selected Device XC3S400-4 PQ208 Number of Slices 652 out of 3584 [18%] Number of Slice Flip Flops 607 out of 7168 [8%] Number of 4 input LUTs 687out of 7168 [9%] Number of GCLKs 1 out of 8 [12%] Number of bonded IOBs 53 out of 141 [37%] Number of MULT18X18s 5 out of 16 [31%]

MUX1

inst_mux1

Inpu t(63:0)

Sel(2:0)

Output(7:0)

MUX2

inst_mux2

A(63:0)

B(63:0)

Sel

Output(63:0)

and3b2

I0

I1

I2

O

and3b3

memory_0_cmp_eq0000_imp_memory_0_cmp_eq00001

I0

I1

I2

O

and3b1

I0

I1

I2

O

and3

memory_7_cmp_eq0000_imp_memory_7_cmp_eq00001I0

I1

I2

O

and2

I0

I1O

and2

memory_0_and0000_imp_memory_0_and00001

I0

I1O

and2

I0

I1O

and2

memory_7_and0000_imp_memory_7_and00001

I0

I1O

fdce_1

C

CE

CLR

D Q

fdce_1

C

CE

CLR

D Q

fdce_1

C

CE

CLR

D Q

fdce_1

C

CE

CLR

D Q

fdce_1

C

CE

CLR

D Q

fdce_1

C

CE

CLR

D Q

fdce_1

C

CE

CLR

D Q

fdce_1

C

CE

CLR

D Q

MUX:1

Mmux_Output1port_select

port_resultData(511:0)

rule:1

inst_rule

Add(2:0)

Inpu t(63:0)

CLK

En

RST

Output(63:0)

min1to8

inst_min

A(7:0)

B(63:0)

C(63:0)

MUX3

inst_mux3

A(63:0)

B(63:0)

Count(2:0)

Sel

C(63:0)

or2

start_count_imp_start_count1

I0

I1O

max8to8

inst_max

A(63:0)

B(63:0)

C(63:0)

counter

inst_counter

CLK

RST

START

q(2:0)

DONE

Zreg

inst_zreg

Input(63:0)

CLK

En

RST

Output(63:0)

fuzzycore:1

fuzzycore

X(63:0)

Y(63:0)

CLK

Inference

Model

RST

Z(63:0)

DONE

Figure 12: RTL view of fuzzy inferencing implementation in the FPGA

Figure 13: Technology-view of the parallel pipelined FLC in FPGA

Figure 14: Routed-design view in the FPGA

The proposed fuzzy controller offers performance of

1.6GFLIPS with 100 MHz and 2GFLIPS with 125 MHz

Page 7: A Real-Time Implementation Of An Autonomous Uav Controller ... · A Real-Time Implementation Of An Autonomous Uav Controller Using Fpga: Based On Fuzzy Logic Approach ... parallel

FARID ALIDOUST et al: A REAL-TIME IMPLEMENTATION OF AN AUTONOMOUS UAV CONTROLLER …

DOI 10.5013/IJSSST.a.14.01.06 ISSN: 1473-804x online, 1473-8031 print 43

system clock. However, with respect to the low usage of the resources on the FPGA (TABLE 1) and the fact that the written Verilog code could be instantiated in parallel to implement extra fuzzy controllers, higher calculation-power up to 8GFLIPS is possible on a Xilinx Spartan3-400 FPGA. The attained performance, to some extent is equal or better than all of the previously mentioned fuzzy processors. Hence, this structure is mainly appropriate for the tasks that require excessive fuzzy processing rates.

Xilinx FPGA Board

Autonomous Fuzzy‐Logic 

controlled  mini Helicopter

Motor & gearbox

FSKModule

Ultrasonic Sensor

GPS, Gyro and BatteryMounted under Board

Figure 15: FPGA board which contains fuzzy controller mounted on a

mini helicopter

IV. CONCLUSION

In this paper, we offered a real-time implementation of an unmanned helicopter using an FPGA device. With respect to the nonlinear dynamics of the helicopter control parameters Fuzzy Logic controller chosen to implement. The controller is prepared using FPGA to get data from all sensors, compare that information with reference commands and finally drive all the actuators. Next, by adding the required rules to the FLC controllers, they act flexibly so actuators triggered in a way that keep the stable movement of the helicopter. The fuzzy controller explained in this paper is shown to make a good rank of throughput 2GFLIPS with just using 18 percent of a typical FPGA device, and because of the parallel pipelined structure and with respect to the fact that HDL modules could instantiate easily, attaining a calculation power of 8GFLIPS is imaginable using designed modules. Similarly, the proposed design is extensible and compliant to other fuzzy systems structures with diverse quantities of inputs, outputs, rules, methods of inferencing as well as defuzzification. Therefore, this universal design is suitable for fuzzy applications which require high speed calculations. Specifically, the combination of near to the ground latency and its parallel structure makes it mainly suited to unmanned vehicles intelligent judgment system.

In this work we used just typical sensors such as GPS, GYRO, ultrasonic and so on but In future work, we will make use of the image processing behind other sensors of

the unmanned helicopter in order to reach really autonomous unmanned air vehicle.

REFERENCES [1] S. S. Wegener, S. M. Schoenung, J. Totah, D. Sullivan, J. Frank, F.

Enomoto, et al., "UAV autonomous operations for airborne science missions," in Proceedings of the American Institute for Aeronautics and Astronautics 3rd “Unmanned… Unlimited” Technical Conference, 2004.

[2] J. C. Bezdek, J. Keller, R. Krisnapuram, and N. R. Pal, Fuzzy models and algorithms for pattern recognition and image processing vol. 4: Springer, 2005.

[3] E. H. Ruspini, P. P. Bonissone, and W. Pedrycz, Handbook of fuzzy computation: Institute of Physics Pub., 1998.

[4] I. A. McManus, "A multidisciplinary approach to highly autonomous UAV mission planning and piloting for civilian airspace," Queensland University of Technology, 2005.

[5] D. Fitzgerald, R. Walker, and D. Campbell, "A vision based forced landing site selection system for an autonomous UAV," in Intelligent Sensors, Sensor Networks and Information Processing Conference, 2005. Proceedings of the 2005 International Conference on, 2005, pp. 397-402.

[6] R. Peter Bonasso, R. James Firby, E. Gat, D. Kortenkamp, D. P. Miller, and M. G. Slack, "Experiences with an architecture for intelligent, reactive agents," Journal of Experimental & Theoretical Artificial Intelligence, vol. 9, pp. 237-256, 1997.

[7] M. Lundell, J. Tang, and K. Nygard, "Fuzzy petri net for uav decision making," in Collaborative Technologies and Systems, 2005. Proceedings of the 2005 International Symposium on, 2005, pp. 347-352.

[8] P. P. Wu, P. P. Narayan, D. A. Campbell, M. Lees, and R. A. Walker, "A high performance fuzzy logic architecture for UAV decision making," 2006.

[9] J. D. Boskovic, R. Prasanth, and R. K. Mehra, "A multilayer control architecture for unmanned aerial vehicles," in American Control Conference, 2002. Proceedings of the 2002, 2002, pp. 1825-1830.

[10] D. Shi, M. F. Selekwa, E. G. Collins Jr, and C. A. Moore, "Fuzzy behavior navigation for an unmanned helicopter in unknown environments," in Systems, Man and Cybernetics, 2005 IEEE International Conference on, 2005, pp. 3897-3902.

[11] Y. Nojima, F. Kojima, and N. Kubota, "Trajectory generation for human-friendly behavior of partner robot using fuzzy evaluating interactive genetic algorithm," in Computational Intelligence in Robotics and Automation, 2003. Proceedings. 2003 IEEE International Symposium on, 2003, pp. 306-311.

[12] T. Dong, X. Liao, R. Zhang, Z. Sun, and Y. Song, "Path tracking and obstacles avoidance of uavs-fuzzy logic approach," in Fuzzy Systems, 2005. FUZZ'05. The 14th IEEE International Conference on, 2005, pp. 43-48.

[13] L. A. Zadeh, "Information and control," Fuzzy sets, vol. 8, pp. 338-353, 1965.

[14] E. Cox, M. O'Hagan, R. Taber, and M. O'Hagen, The Fuzzy Systems Handkbook with Cdrom: Academic Press, Inc., 1998.

[15] S. Guo and L. Peters, "A high-speed fuzzy co-processor implemented in analogue/digital technique," Computers & electrical engineering, vol. 24, pp. 89-98, 1998.

[16] Z. Salcic, "High-speed customizable fuzzy-logic processor: architecture and implementation," Systems, Man and Cybernetics, Part A: Systems and Humans, IEEE Transactions on, vol. 31, pp. 731-737, 2001.

[17] F. A. Samman and E. Y. Syamsuddin, "Programmable fuzzy logic controller circuit on CPLD chip," in Circuits and Systems, 2002. APCCAS'02. 2002 Asia-Pacific Conference on, 2002, pp. 561-564.

[18] G. Aranguren, M. Barron, J. L. Arroyabe, and G. Garcia-Carreira, "A pipe-line fuzzy controller in FPGA," in Fuzzy Systems, 1997., Proceedings of the Sixth IEEE International Conference on, 1997, pp. 635-640.

Page 8: A Real-Time Implementation Of An Autonomous Uav Controller ... · A Real-Time Implementation Of An Autonomous Uav Controller Using Fpga: Based On Fuzzy Logic Approach ... parallel

FARID ALIDOUST et al: A REAL-TIME IMPLEMENTATION OF AN AUTONOMOUS UAV CONTROLLER …

DOI 10.5013/IJSSST.a.14.01.06 ISSN: 1473-804x online, 1473-8031 print 44

[19] D. Kim, "An implementation of fuzzy logic controller on the reconfigurable FPGA system," Industrial Electronics, IEEE Transactions on, vol. 47, pp. 703-715, 2000.

[20] M. Lees and D. Campbell, "A 1.2 GFLIPS fuzzy logic inference processor: breaking the billion rules per second barrier," in Proc. International Conference on Neural Information Processing and Intelligent Information Systems, 1997, pp. 696-699.

[21] M. Semiconductor, "CPU12 Reference Manual," Motorola, Inc, 1997.

[22] Xilinx, "Spartan-3 FPGA family: Complete data sheet," Product Docummentation,(November 2005), 2008.

[23] Xilinx, "Virtex-5 Family: Complete data sheet," Product Docummentation,(February 2009), 2009.

[24] I. Altera Cyclone, "Device Handbook," CII5V1-3.3, Altera Corporation, 2007.

[25] A. Mancini, A. Cesetti, A. Iuale, E. Frontoni, P. Zingaretti, and S. Longhi, "A framework for simulation and testing of UAVs in cooperative scenarios," in Unmanned Aircraft Systems, ed: Springer, 2009, pp. 307-329.

[26] P. Castillo, R. Lozano, and A. E. Dzul, Modelling and control of mini-flying machines: Springer, 2005.

[27] R. K. Heffley and M. A. Mnich, Minimum-complexity helicopter simulation math model: National Aeronautics and Space Administration, Ames Research Center, 1988.

[28] A. R. Bramwell, D. Balmford, and G. Done, Bramwell's helicopter dynamics: Butterworth-Heinemann, 2001.

[29] S. Sánchez-Solano, A. J. Cabrera, I. Baturone, F. J. Moreno-Velo, and M. Brox, "FPGA implementation of embedded fuzzy controllers for robotic applications," Industrial Electronics, IEEE Transactions on, vol. 54, pp. 1937-1945, 2007.

[30] K. Deliparaschos, F. Nenedakis, and S. G. Tzafestas, "Design and implementation of a fast digital fuzzy logic controller using FPGA technology," Journal of Intelligent and Robotic Systems, vol. 45, pp. 77-96, 2006.