SlideShare a Scribd company logo
1 of 7
Bruno Diaz and George Rosenbaum
Intelligent Control - EE 4733
Final Project Report
INTRODUCTION:
A fuzzy controller must be designed for a fan actuated, imbalanced lever and fulcrum. A
lever has a fixed weight and a magnet on one side, and a battery operated fan on the other. A
Hall Effect sensor detects the distance of the magnet from the ground, and represents this as a
non-zero number. The fan voltage must be controlled to balance the distance of the weight from
the floor so as to keep the lever balanced. This system is mathematically complex, which makes
modeling a transfer function very difficult. So a fuzzy logic controller is favored in this scenario.
Two different fuzzy logic controllers’ rulesets will be investigated. One controller
contains three rules, and another contains five rules. Then a method of increasing performance
by making changes to how error is read will be explored.
PROCEDURE:
The method for making these controllers will require a combination of observation,
intuition, and trial-and-error. The best way to design a good controller requires the user to know
the advantage of fuzzy logic over traditional “crisp” logic. Crisp logic has very discrete states
that the controller must stay in. As a result, such controllers can easily end up on the border of
two different states, getting stuck and unable to move to the desired target. This can only be
defeated with many redundant rules that slowly “fade” into the desired operation by creating lots
of states. This process is tedious, time consuming, and very difficult to update and experiment
with.
With fuzzy logic, the user can actually fade into the desired operation by allowing
multiple states at the same time. This reduces the number of states needed, eliminating brute-
force redundancy and allowing for more intuitive design. The amount of each state used can be
controlled easily, allowing for infinite states generated in a gradient of effect.
Bruno Diaz and George Rosenbaum
Intelligent Control - EE 4733
Final Project Report
The fuzzy logic technique we used was the DOF which will serve as the controller in the
algorithm shown below.
The DOF method is essentially shown below.
The range of different sensor values must first be collected using “s.inputSingleScan()” to
find the universe for error. Use this command once when the sensor is far away, and again when
the sensor is close. These values will be different depending on the Hall sensor and the magnet
being sensed. A third target voltage must also be found with “s.inputSingleScan()” so the
controller will know what voltage to track.
The universe generated from these values will not actually be the lowest and highest
value the sensor records. Instead the difference between the two values is calculated, which was
found to be about. 5703, and the universe will range from the negative difference to the positive
difference. This should create an error universe of about [-5703, 5703].
With the universe found, the rules and gain change are experimentally created until the
controller becomes reliable and effective. The gain change that is the weights attached to du after
the defuzzified output is found to be most effective around 0.1.
The rules specify what state the controller is in, and the gain value alters how quickly the
fan voltage is allowed to change. The three rule controller has a “too high” state (called P), a “too
Bruno Diaz and George Rosenbaum
Intelligent Control - EE 4733
Final Project Report
low” state (called N), and a “just right” state (called Z). The 5 rule controller has a “very high”
state (called PB), a “slightly high” state (called PS), a “just right state” (also called Z), a “slightly
low” state (called NS), and a “very low” state (called NB).
For the three rule controller, most of the universe was taken up by the “P” and “N” states.
The “Z” state takes is a narrow triangle placed on the target. Depending on how large the
controller gain is, the controller will require more room to fade from an outer state to the “Z”
state. With a 5 rule controller, care must be taken in how large the “PS” and “NS” states are, as
the controller can easily be stuck in these states if they are made too large. But careful design of
these rules will provide faster response and steadier tracking.
The boundaries chosen for the 3 rule controller were
N=trapmf(Err_X, [(-.5703 -.5703 -.5 .2)]);
Z=trimf(Err_X, [(-1*.03) mid .03]);
P=trapmf(Err_X, [.2 .5 .5703 .5703 ]);
For the 3 rule controller, the boundaries for the “N” and “P” controller are left very large.
Without any finer way of specifying rules, the “Z” rule had to be left slightly large. The
controller eventually works, but has a lot of overshoot and takes a long time to settle.
The boundaries for the 5 rule controller were
PB=trapmf(Err_X, [-.5703 -.5703 -.4 -.2]);
PS=trimf(Err_X, [-.3 -.25 -.2]);
Z=trimf(Err_X, [-.02 0 .02]);
NS=trimf(Err_X, [.2 .25 .3]);
NB=trapmf(Err_X, [.2 .4 .5703 .5703]);
For this controller we found improvement in performance by narrowing the Z boundary
so that we could have the fan could be leveled out at the VR more easily and evenly since we
were noticing that the fan would level of at a height near the VR but wouldn’t reach it for some
time.
Bruno Diaz and George Rosenbaum
Intelligent Control - EE 4733
Final Project Report
We also introduced a new feature to improve both controllers, referred to in this paper as
“future tracking.” While making the original controllers, a delay was noticed between a change
in voltage and effecting the operation of the fan. If the fan is set to a certain voltage that levels
out at a certain height we can see that it takes some time before it reaches that height, which
appears to take about 30 to 40 steps. This presents a problem since within those 40 steps the error
will still show up and the controller will continue to increase the voltage unnecessarily, causing
extreme overshoot. To remedy this problem, the error that the fan will have in the future is also
calculated in the adjusted algorithm seen below.
This is accomplished by creating a buffer that stores the last several values of recorded
voltages, the size of which can be controlled with the variable PD. Then it uses the latest point
and the oldest point in the buffer to calculate the slope of the fan speed relative to those two
points. The right length of the buffer has to be found, a buffer too short may be subject to erratic
behavior from noise and a buffer too long may not respond fast enough to changes. For our
purposes we found a buffer size of 3 to be adequate. After the slope has been found multiply that
by PF which represents how far we want to assume this will continue into the future (we choose
Bruno Diaz and George Rosenbaum
Intelligent Control - EE 4733
Final Project Report
30 steps) and add that to the current voltage. That becomes our future voltage and we subtract
our target voltage “VR” from that to get our error.
MAIN RESULTS:
We performed experimentally found our value for the weight in front of du to be 0.15.
We then ran two for the 3 and 5 rules using the original algorithms and another two for the
adjusted 3 and 5 rule algorithms. The results of all four experiments are shown below, with a VR
of 2.1 V.
Bruno Diaz and George Rosenbaum
Intelligent Control - EE 4733
Final Project Report
The same controllers were used on a different my VTOL board with a VR of 2.15, which
changed the behavior of the circuit somewhat. While there was some performance improvement
with the original algorithm the adjusted remained consistent.
3 rules original 5 rules original
Bruno Diaz and George Rosenbaum
Intelligent Control - EE 4733
Final Project Report
3 rules adjusted 5 rules adjusted
CONCLUSION AND DISCUSSION:
Approximating even a 3-rule controller is difficult for crisp logic. For any mode of
operation where a fuzzy logic uses a combination of states, a crisp controller must use a
completely unique state. This results in a crisp controller that has many different states that are
very close to each other, more lines of code, more chances to make mistakes, and more difficulty
changing the behavior of the controller to add better performance. There are room for
performance an issue we had with the controller

More Related Content

Viewers also liked

Self employment motivation tuesday #2
Self employment motivation tuesday #2Self employment motivation tuesday #2
Self employment motivation tuesday #2Michael Kawula
 
NMBU i sosiale medier
NMBU i sosiale medierNMBU i sosiale medier
NMBU i sosiale medierKristine Lowe
 
2016.11.21 test innlevering elektroteknikk v01 Prøve elektroteknikk DC 1.klas...
2016.11.21 test innlevering elektroteknikk v01 Prøve elektroteknikk DC 1.klas...2016.11.21 test innlevering elektroteknikk v01 Prøve elektroteknikk DC 1.klas...
2016.11.21 test innlevering elektroteknikk v01 Prøve elektroteknikk DC 1.klas...Sven Åge Eriksen
 
El drenaje francés prefabricado, itinerario para la obtención del marcado CE
El drenaje francés prefabricado, itinerario para la obtención del marcado CEEl drenaje francés prefabricado, itinerario para la obtención del marcado CE
El drenaje francés prefabricado, itinerario para la obtención del marcado CEITeC Instituto Tecnología Construcción
 
Romuald Normand - Thinking Epistemic Governance in Education
Romuald Normand - Thinking Epistemic Governance in EducationRomuald Normand - Thinking Epistemic Governance in Education
Romuald Normand - Thinking Epistemic Governance in Educationsocedu28
 
Ulangan Harian 5 Kelas III semester 1 (KTSP)
Ulangan Harian 5 Kelas III semester 1 (KTSP)Ulangan Harian 5 Kelas III semester 1 (KTSP)
Ulangan Harian 5 Kelas III semester 1 (KTSP)m4ladewi
 
20 Boxing Greats Quotes & Lessons on your Journey to be Self Employed!
20 Boxing Greats Quotes & Lessons on your Journey to be Self Employed!20 Boxing Greats Quotes & Lessons on your Journey to be Self Employed!
20 Boxing Greats Quotes & Lessons on your Journey to be Self Employed!Michael Kawula
 
Espacios inteligentes y conectados
Espacios inteligentes y conectadosEspacios inteligentes y conectados
Espacios inteligentes y conectadosAMETIC
 
Data Economy: La Revolución de los datos
Data Economy: La Revolución de los datosData Economy: La Revolución de los datos
Data Economy: La Revolución de los datosAMETIC
 
Orange: Compromiso de crecimiento en España
Orange: Compromiso de crecimiento en EspañaOrange: Compromiso de crecimiento en España
Orange: Compromiso de crecimiento en EspañaAMETIC
 
Digitalización, Educación y Empleo. Una visión personal.
Digitalización, Educación y Empleo. Una visión personal.Digitalización, Educación y Empleo. Una visión personal.
Digitalización, Educación y Empleo. Una visión personal.AMETIC
 
Digitalización: La gran oportunidad para España
Digitalización: La gran oportunidad para EspañaDigitalización: La gran oportunidad para España
Digitalización: La gran oportunidad para EspañaAMETIC
 
Organizarse para liderar en el nuevo entorno digital
Organizarse para liderar en el nuevo entorno digitalOrganizarse para liderar en el nuevo entorno digital
Organizarse para liderar en el nuevo entorno digitalAMETIC
 

Viewers also liked (19)

Self employment motivation tuesday #2
Self employment motivation tuesday #2Self employment motivation tuesday #2
Self employment motivation tuesday #2
 
NMBU i sosiale medier
NMBU i sosiale medierNMBU i sosiale medier
NMBU i sosiale medier
 
Mehak Marwaha
Mehak MarwahaMehak Marwaha
Mehak Marwaha
 
Emad+Moustafa+Ragb
Emad+Moustafa+RagbEmad+Moustafa+Ragb
Emad+Moustafa+Ragb
 
Pont Louis Philippe
Pont Louis PhilippePont Louis Philippe
Pont Louis Philippe
 
2016.11.21 test innlevering elektroteknikk v01 Prøve elektroteknikk DC 1.klas...
2016.11.21 test innlevering elektroteknikk v01 Prøve elektroteknikk DC 1.klas...2016.11.21 test innlevering elektroteknikk v01 Prøve elektroteknikk DC 1.klas...
2016.11.21 test innlevering elektroteknikk v01 Prøve elektroteknikk DC 1.klas...
 
Pont d'austerlitz
Pont d'austerlitzPont d'austerlitz
Pont d'austerlitz
 
El drenaje francés prefabricado, itinerario para la obtención del marcado CE
El drenaje francés prefabricado, itinerario para la obtención del marcado CEEl drenaje francés prefabricado, itinerario para la obtención del marcado CE
El drenaje francés prefabricado, itinerario para la obtención del marcado CE
 
Pont royal
Pont royalPont royal
Pont royal
 
Romuald Normand - Thinking Epistemic Governance in Education
Romuald Normand - Thinking Epistemic Governance in EducationRomuald Normand - Thinking Epistemic Governance in Education
Romuald Normand - Thinking Epistemic Governance in Education
 
Ulangan Harian 5 Kelas III semester 1 (KTSP)
Ulangan Harian 5 Kelas III semester 1 (KTSP)Ulangan Harian 5 Kelas III semester 1 (KTSP)
Ulangan Harian 5 Kelas III semester 1 (KTSP)
 
New Catalog_schnorr-en
New Catalog_schnorr-enNew Catalog_schnorr-en
New Catalog_schnorr-en
 
20 Boxing Greats Quotes & Lessons on your Journey to be Self Employed!
20 Boxing Greats Quotes & Lessons on your Journey to be Self Employed!20 Boxing Greats Quotes & Lessons on your Journey to be Self Employed!
20 Boxing Greats Quotes & Lessons on your Journey to be Self Employed!
 
Espacios inteligentes y conectados
Espacios inteligentes y conectadosEspacios inteligentes y conectados
Espacios inteligentes y conectados
 
Data Economy: La Revolución de los datos
Data Economy: La Revolución de los datosData Economy: La Revolución de los datos
Data Economy: La Revolución de los datos
 
Orange: Compromiso de crecimiento en España
Orange: Compromiso de crecimiento en EspañaOrange: Compromiso de crecimiento en España
Orange: Compromiso de crecimiento en España
 
Digitalización, Educación y Empleo. Una visión personal.
Digitalización, Educación y Empleo. Una visión personal.Digitalización, Educación y Empleo. Una visión personal.
Digitalización, Educación y Empleo. Una visión personal.
 
Digitalización: La gran oportunidad para España
Digitalización: La gran oportunidad para EspañaDigitalización: La gran oportunidad para España
Digitalización: La gran oportunidad para España
 
Organizarse para liderar en el nuevo entorno digital
Organizarse para liderar en el nuevo entorno digitalOrganizarse para liderar en el nuevo entorno digital
Organizarse para liderar en el nuevo entorno digital
 

Similar to IC_FinalReport_WorkSoFarv4

PID controller using rapid control prototyping techniques
PID controller using rapid control prototyping techniquesPID controller using rapid control prototyping techniques
PID controller using rapid control prototyping techniquesIJECEIAES
 
Design and Analysis of a Control System Using Root Locus and Frequency Respon...
Design and Analysis of a Control System Using Root Locus and Frequency Respon...Design and Analysis of a Control System Using Root Locus and Frequency Respon...
Design and Analysis of a Control System Using Root Locus and Frequency Respon...Umair Shahzad
 
Iaetsd design of a robust fuzzy logic controller for a single-link flexible m...
Iaetsd design of a robust fuzzy logic controller for a single-link flexible m...Iaetsd design of a robust fuzzy logic controller for a single-link flexible m...
Iaetsd design of a robust fuzzy logic controller for a single-link flexible m...Iaetsd Iaetsd
 
V fuzzy logic implementation for induction motor control
V fuzzy logic implementation for induction motor controlV fuzzy logic implementation for induction motor control
V fuzzy logic implementation for induction motor controlkypameenendranathred
 
Model Order Reduction of an ISLANDED MICROGRID using Single Perturbation, Dir...
Model Order Reduction of an ISLANDED MICROGRID using Single Perturbation, Dir...Model Order Reduction of an ISLANDED MICROGRID using Single Perturbation, Dir...
Model Order Reduction of an ISLANDED MICROGRID using Single Perturbation, Dir...IRJET Journal
 
Optimization of automatic voltage regulator by proportional integral derivati...
Optimization of automatic voltage regulator by proportional integral derivati...Optimization of automatic voltage regulator by proportional integral derivati...
Optimization of automatic voltage regulator by proportional integral derivati...eSAT Journals
 
Fuzzy Logic Controller
Fuzzy Logic ControllerFuzzy Logic Controller
Fuzzy Logic Controllervinayvickky
 
Optimization of Fuzzy Logic controller for Luo Converter using Genetic Algor...
Optimization of Fuzzy Logic controller for Luo Converter using  Genetic Algor...Optimization of Fuzzy Logic controller for Luo Converter using  Genetic Algor...
Optimization of Fuzzy Logic controller for Luo Converter using Genetic Algor...IRJET Journal
 
Optimal design & analysis of load frequency control for two interconnecte...
Optimal design & analysis of load frequency control for two interconnecte...Optimal design & analysis of load frequency control for two interconnecte...
Optimal design & analysis of load frequency control for two interconnecte...ijctet
 
IEE572 Final Report
IEE572 Final ReportIEE572 Final Report
IEE572 Final Reportjgoldpac
 
Speed control of dc motor by fuzzy controller
Speed control of dc motor by fuzzy controllerSpeed control of dc motor by fuzzy controller
Speed control of dc motor by fuzzy controllerMurugappa Group
 
New microsoft word document (3)
New microsoft word document (3)New microsoft word document (3)
New microsoft word document (3)Bankesh
 
G0362046052
G0362046052G0362046052
G0362046052theijes
 
1 s2.0-s167452641100161 x-main
1 s2.0-s167452641100161 x-main1 s2.0-s167452641100161 x-main
1 s2.0-s167452641100161 x-mainCristián Opazo
 
Simulation of Wireless Sensor Networks
Simulation of Wireless Sensor NetworksSimulation of Wireless Sensor Networks
Simulation of Wireless Sensor NetworksDaniel Zuniga
 

Similar to IC_FinalReport_WorkSoFarv4 (20)

PID controller using rapid control prototyping techniques
PID controller using rapid control prototyping techniquesPID controller using rapid control prototyping techniques
PID controller using rapid control prototyping techniques
 
Design and Analysis of a Control System Using Root Locus and Frequency Respon...
Design and Analysis of a Control System Using Root Locus and Frequency Respon...Design and Analysis of a Control System Using Root Locus and Frequency Respon...
Design and Analysis of a Control System Using Root Locus and Frequency Respon...
 
Iaetsd design of a robust fuzzy logic controller for a single-link flexible m...
Iaetsd design of a robust fuzzy logic controller for a single-link flexible m...Iaetsd design of a robust fuzzy logic controller for a single-link flexible m...
Iaetsd design of a robust fuzzy logic controller for a single-link flexible m...
 
Db36619623
Db36619623Db36619623
Db36619623
 
Fz3310671070
Fz3310671070Fz3310671070
Fz3310671070
 
Fz3310671070
Fz3310671070Fz3310671070
Fz3310671070
 
V fuzzy logic implementation for induction motor control
V fuzzy logic implementation for induction motor controlV fuzzy logic implementation for induction motor control
V fuzzy logic implementation for induction motor control
 
Model Order Reduction of an ISLANDED MICROGRID using Single Perturbation, Dir...
Model Order Reduction of an ISLANDED MICROGRID using Single Perturbation, Dir...Model Order Reduction of an ISLANDED MICROGRID using Single Perturbation, Dir...
Model Order Reduction of an ISLANDED MICROGRID using Single Perturbation, Dir...
 
Optimization of automatic voltage regulator by proportional integral derivati...
Optimization of automatic voltage regulator by proportional integral derivati...Optimization of automatic voltage regulator by proportional integral derivati...
Optimization of automatic voltage regulator by proportional integral derivati...
 
Fuzzy Logic Controller
Fuzzy Logic ControllerFuzzy Logic Controller
Fuzzy Logic Controller
 
Optimization of Fuzzy Logic controller for Luo Converter using Genetic Algor...
Optimization of Fuzzy Logic controller for Luo Converter using  Genetic Algor...Optimization of Fuzzy Logic controller for Luo Converter using  Genetic Algor...
Optimization of Fuzzy Logic controller for Luo Converter using Genetic Algor...
 
Optimal design & analysis of load frequency control for two interconnecte...
Optimal design & analysis of load frequency control for two interconnecte...Optimal design & analysis of load frequency control for two interconnecte...
Optimal design & analysis of load frequency control for two interconnecte...
 
IEE572 Final Report
IEE572 Final ReportIEE572 Final Report
IEE572 Final Report
 
Speed control of dc motor by fuzzy controller
Speed control of dc motor by fuzzy controllerSpeed control of dc motor by fuzzy controller
Speed control of dc motor by fuzzy controller
 
New microsoft word document (3)
New microsoft word document (3)New microsoft word document (3)
New microsoft word document (3)
 
G0362046052
G0362046052G0362046052
G0362046052
 
Level tuning. by zakpdf
Level tuning. by zakpdfLevel tuning. by zakpdf
Level tuning. by zakpdf
 
1 s2.0-s167452641100161 x-main
1 s2.0-s167452641100161 x-main1 s2.0-s167452641100161 x-main
1 s2.0-s167452641100161 x-main
 
Simulation of Wireless Sensor Networks
Simulation of Wireless Sensor NetworksSimulation of Wireless Sensor Networks
Simulation of Wireless Sensor Networks
 
Flnn
FlnnFlnn
Flnn
 

More from Bruno Diaz

Bruno Diaz Resume2017V2
Bruno Diaz Resume2017V2Bruno Diaz Resume2017V2
Bruno Diaz Resume2017V2Bruno Diaz
 
micro proj4.V2odt
micro proj4.V2odtmicro proj4.V2odt
micro proj4.V2odtBruno Diaz
 
logic project report with coversheet
logic project report with coversheet logic project report with coversheet
logic project report with coversheet Bruno Diaz
 
compuorg final
compuorg finalcompuorg final
compuorg finalBruno Diaz
 

More from Bruno Diaz (6)

Bruno Diaz Resume2017V2
Bruno Diaz Resume2017V2Bruno Diaz Resume2017V2
Bruno Diaz Resume2017V2
 
Coil Gun
Coil GunCoil Gun
Coil Gun
 
micro proj4.V2odt
micro proj4.V2odtmicro proj4.V2odt
micro proj4.V2odt
 
logic project report with coversheet
logic project report with coversheet logic project report with coversheet
logic project report with coversheet
 
Coil Gun
Coil GunCoil Gun
Coil Gun
 
compuorg final
compuorg finalcompuorg final
compuorg final
 

IC_FinalReport_WorkSoFarv4

  • 1. Bruno Diaz and George Rosenbaum Intelligent Control - EE 4733 Final Project Report INTRODUCTION: A fuzzy controller must be designed for a fan actuated, imbalanced lever and fulcrum. A lever has a fixed weight and a magnet on one side, and a battery operated fan on the other. A Hall Effect sensor detects the distance of the magnet from the ground, and represents this as a non-zero number. The fan voltage must be controlled to balance the distance of the weight from the floor so as to keep the lever balanced. This system is mathematically complex, which makes modeling a transfer function very difficult. So a fuzzy logic controller is favored in this scenario. Two different fuzzy logic controllers’ rulesets will be investigated. One controller contains three rules, and another contains five rules. Then a method of increasing performance by making changes to how error is read will be explored. PROCEDURE: The method for making these controllers will require a combination of observation, intuition, and trial-and-error. The best way to design a good controller requires the user to know the advantage of fuzzy logic over traditional “crisp” logic. Crisp logic has very discrete states that the controller must stay in. As a result, such controllers can easily end up on the border of two different states, getting stuck and unable to move to the desired target. This can only be defeated with many redundant rules that slowly “fade” into the desired operation by creating lots of states. This process is tedious, time consuming, and very difficult to update and experiment with. With fuzzy logic, the user can actually fade into the desired operation by allowing multiple states at the same time. This reduces the number of states needed, eliminating brute- force redundancy and allowing for more intuitive design. The amount of each state used can be controlled easily, allowing for infinite states generated in a gradient of effect.
  • 2. Bruno Diaz and George Rosenbaum Intelligent Control - EE 4733 Final Project Report The fuzzy logic technique we used was the DOF which will serve as the controller in the algorithm shown below. The DOF method is essentially shown below. The range of different sensor values must first be collected using “s.inputSingleScan()” to find the universe for error. Use this command once when the sensor is far away, and again when the sensor is close. These values will be different depending on the Hall sensor and the magnet being sensed. A third target voltage must also be found with “s.inputSingleScan()” so the controller will know what voltage to track. The universe generated from these values will not actually be the lowest and highest value the sensor records. Instead the difference between the two values is calculated, which was found to be about. 5703, and the universe will range from the negative difference to the positive difference. This should create an error universe of about [-5703, 5703]. With the universe found, the rules and gain change are experimentally created until the controller becomes reliable and effective. The gain change that is the weights attached to du after the defuzzified output is found to be most effective around 0.1. The rules specify what state the controller is in, and the gain value alters how quickly the fan voltage is allowed to change. The three rule controller has a “too high” state (called P), a “too
  • 3. Bruno Diaz and George Rosenbaum Intelligent Control - EE 4733 Final Project Report low” state (called N), and a “just right” state (called Z). The 5 rule controller has a “very high” state (called PB), a “slightly high” state (called PS), a “just right state” (also called Z), a “slightly low” state (called NS), and a “very low” state (called NB). For the three rule controller, most of the universe was taken up by the “P” and “N” states. The “Z” state takes is a narrow triangle placed on the target. Depending on how large the controller gain is, the controller will require more room to fade from an outer state to the “Z” state. With a 5 rule controller, care must be taken in how large the “PS” and “NS” states are, as the controller can easily be stuck in these states if they are made too large. But careful design of these rules will provide faster response and steadier tracking. The boundaries chosen for the 3 rule controller were N=trapmf(Err_X, [(-.5703 -.5703 -.5 .2)]); Z=trimf(Err_X, [(-1*.03) mid .03]); P=trapmf(Err_X, [.2 .5 .5703 .5703 ]); For the 3 rule controller, the boundaries for the “N” and “P” controller are left very large. Without any finer way of specifying rules, the “Z” rule had to be left slightly large. The controller eventually works, but has a lot of overshoot and takes a long time to settle. The boundaries for the 5 rule controller were PB=trapmf(Err_X, [-.5703 -.5703 -.4 -.2]); PS=trimf(Err_X, [-.3 -.25 -.2]); Z=trimf(Err_X, [-.02 0 .02]); NS=trimf(Err_X, [.2 .25 .3]); NB=trapmf(Err_X, [.2 .4 .5703 .5703]); For this controller we found improvement in performance by narrowing the Z boundary so that we could have the fan could be leveled out at the VR more easily and evenly since we were noticing that the fan would level of at a height near the VR but wouldn’t reach it for some time.
  • 4. Bruno Diaz and George Rosenbaum Intelligent Control - EE 4733 Final Project Report We also introduced a new feature to improve both controllers, referred to in this paper as “future tracking.” While making the original controllers, a delay was noticed between a change in voltage and effecting the operation of the fan. If the fan is set to a certain voltage that levels out at a certain height we can see that it takes some time before it reaches that height, which appears to take about 30 to 40 steps. This presents a problem since within those 40 steps the error will still show up and the controller will continue to increase the voltage unnecessarily, causing extreme overshoot. To remedy this problem, the error that the fan will have in the future is also calculated in the adjusted algorithm seen below. This is accomplished by creating a buffer that stores the last several values of recorded voltages, the size of which can be controlled with the variable PD. Then it uses the latest point and the oldest point in the buffer to calculate the slope of the fan speed relative to those two points. The right length of the buffer has to be found, a buffer too short may be subject to erratic behavior from noise and a buffer too long may not respond fast enough to changes. For our purposes we found a buffer size of 3 to be adequate. After the slope has been found multiply that by PF which represents how far we want to assume this will continue into the future (we choose
  • 5. Bruno Diaz and George Rosenbaum Intelligent Control - EE 4733 Final Project Report 30 steps) and add that to the current voltage. That becomes our future voltage and we subtract our target voltage “VR” from that to get our error. MAIN RESULTS: We performed experimentally found our value for the weight in front of du to be 0.15. We then ran two for the 3 and 5 rules using the original algorithms and another two for the adjusted 3 and 5 rule algorithms. The results of all four experiments are shown below, with a VR of 2.1 V.
  • 6. Bruno Diaz and George Rosenbaum Intelligent Control - EE 4733 Final Project Report The same controllers were used on a different my VTOL board with a VR of 2.15, which changed the behavior of the circuit somewhat. While there was some performance improvement with the original algorithm the adjusted remained consistent. 3 rules original 5 rules original
  • 7. Bruno Diaz and George Rosenbaum Intelligent Control - EE 4733 Final Project Report 3 rules adjusted 5 rules adjusted CONCLUSION AND DISCUSSION: Approximating even a 3-rule controller is difficult for crisp logic. For any mode of operation where a fuzzy logic uses a combination of states, a crisp controller must use a completely unique state. This results in a crisp controller that has many different states that are very close to each other, more lines of code, more chances to make mistakes, and more difficulty changing the behavior of the controller to add better performance. There are room for performance an issue we had with the controller