ASEE Zone 2 Conference 2017

Proceedings »

Fuzzy Logic Controller Realization Using Microcontrollers

Introduction
Fuzzy logic is the codification of common sense, it can model nonlinear functions of arbitrary complexity and is tolerant to imprecise data.
Fuzzy logic (FL) controlling systems are based on a set of rules established by an expert. These rules are translated into mathematical steps which allow the realization of a physical controller.

Problem & Hipotesis
Instead of using traditional control systems and Boolean logic, we can use fuzzy logic as a control system to analyze inputs from quadcopter orientation and outcast outputs to the four motors in terms that humans can understand, which can makes it easier to automate tasks that are already performed by humans.
Our Flight Stabilization Controller will apply Fuzzy Logic on MSP-430 and KL25Z microcontrollers from Texas Instruments and NXP respectively. The system will be done using two realizations:
a) Lookup table which contains pre- processed actions to compensate position changes given by sensor inputs.
b) Program the Fuzzy Logic Control System within the microcontrollers.

Objectives
Fuzzy Logic Controller will be used to make a Flight Controller which stabilizes a quadcopter at its current position, holding orientation and altitude against position changes.
Analyze and examine inputs from a 10 DoF Inertial Measuring Unit (IMU) which consists of accelerometer, gyroscope, compass and barometer.
Interpret collected data and process it using FL controllers and PID controllers to provide a reliable quadcopter stabilization.

Result
Quadcopter orientation and motor power simulations were made in MATLAB Fuzzy Logic Toolbox. The FL functions applied to orientation and motor power used three linguistic variables: low, medium, high for each axis. A preliminary Reference Lookup Table was stored from MATLAB Fuzzy Logic Toolbox into MCU ROM.
Motor Control Interface with microcontroller has been designed using MSP-430 using Pulse Width Modulation (PWM) at an operation frequency of 500Hz.
IMU chip interface has been done with the use of I2C Serial communication which we obtain yaw, roll pitch and height values with temperature compensation.

Future Work
Improve IMU orientation data with the use of Filters and error compensation.
Continue FL programming design for the target MCUs.
Design a testing area which restraints the quadcopter within an area for testing purposes.

Author(s):

Luis Santiago
Computer Engineering
University of Puerto Rico
Puerto Rico

Jonathan Fortis
Electrical Engineering
University of Puerto Rico
Puerto Rico