SlideShare a Scribd company logo
Fuzzy	Logic	Controller	Realization	
Using	Microcontrollers
Luis	Santiago,	Abdiel	Vega,	William	Morales
Advisor:	Rogelio	Palomera-Garcia
Introduction
• Fuzzy	Logic	(FL)	controlling	system	is	based	on	a	set	of	rules	
established	by	an	expert.	
• These	rules	are	translated	into	mathematical	steps	used	to	realize		
a	physical	controller.
• FL	controllers	can	be	physically	realized	in	different	forms.
• We	adopt	look	up	tables	and	function	realizations
• Microcontrollers	to	use	are	one	from	the	MSP430	family	(Texas	
Instruments)	and	one	from	the	Kinetis	series	(NXP)
FL	Architecture:
Fuzzification	Stage:
Involves	a	function	
transformation	where	
crisp	input	are	
transformed	into	fuzzy	
inputs.
Fuzzy	Rule	Steps
Is	defined	as	a	
conventional	statement	
in	the	form:	IF	x	is	A	
THEN	y	is	B,	where	A	and	
B	are	linguistic	values	
determined	by	fuzzy	
sets.
Defuzzification	Stage
Converts	fuzzy	items	to	
crisp	value.
FL	Memberships	and	Membership	Value
Objectives
• To	develop	a	method	to	introduce	fuzzy	controllers	schemes	derived	from	
applications	for	use	in	microcontrollers
• Present	focus:	Texas	Instruments	MSP430	and	NXP	Kinetis	series	
microcontrollers
• To	develop	two	microcontroller	based	fuzzy	controller	methods	using
• Look	up	tables,	and
• Function	development	inside	the	micro
• To	prove	the	controller	with	a	specific	application
• A	stabilizer	for	a	quadcopter
Problem	&	Hypothesis
• Methods	proposed	to	implement	the	FL	function:
• A)	Compute	the	outputs	using	Matlab	and	build	a	look-up	table	within	the	
microcontroller.
• Advantage:	useful	for	small	controllers
• Disadvantage:	memory	consumption
• B)	To	implement	the	membership	functions,	rules	and	defuzzification	rule	in	
the	microcontroller.
Methodology
• Study,	analyze,	and	comprehend	the	design	process	of	a	Fuzzy	Logic	
Controller	
• Understand	and	master	the	use	of	microcontroller	to	establish	the	
system	to	be	designed
• Implement,	program,	and	experiment	with	the	system	designed	in	it’s	
both	forms	using	two	different	microcontrollers
Results
Flowchart	of	
Rules
Rules	in	Matlab
Rules	and	Membership	Function	via	Matlab
Some	Subroutines	Functions
Triangular	Subroutines	Functions
Triangular:	mov			R6,R14;
cmp			R7,R14;
jhe MPos2;
add #0,R12;
jmp			Continue2;
MPos2: cmp			R8,R14;
jhe				MNeg2;
sub				R7,R14;
sub				R7,R8;
mov			#0,R11;
Div3: sub				R8,R14;
inc					R11;
cmp			R8,R14;
jhe				Div1;
add R11,R12;
jmp Continue2;
MNeg2: cmp				R10,R14;
jhe Zero2;
mov				R10,R15;
sub					R14,R15;
sub					R9,R10;
mov				#0,R11;
Div4: sub					R10,R15;
inc						R11;
cmp				R10,R15;
jhe					Div2;
add					R11,R12;
jmp					Continue2;
Zero2: add					#0,R12;
Continue2:		ret;
Trapezoid	Subroutines	Functions
Trapezoide:	mov				R6,R14;
cmp				R7,R14;
jhe MPos;
add #0,R12;
jmp				Continue;
MPos: cmp			R8,R14;
jhe				MZero;
sub				R7,R14;
sub				R7,R8;
mov			#0,R11;
Div1: sub				R8,R14;
inc					R11;
cmp			R8,R14;
jhe					Div1;
add R11,R12;
jmp Continue;
MZero: cmp				R9,R14;
jhe						MNeg;
add					#1,R12;
MNeg: cmp				R10,R14;
jhe					Zero;
mov				R10,R15;
sub					R14,R15;
sub					R9,R10;
mov				#0,R11;
Div2: sub					R10,R15;
inc						R11;
cmp				R10,R15;
jhe					Div2;
add					R11,R12;
jmp				Continue;
Zero: add				#0,R12;
Continue:	ret
Look-Up	Table
Input Angle Output Portion of
Voltage
0.46875 0.25
1.40625 0.25
2.34375 0.25
3.28125 0.25
4.6875 0.25
… …
10.3125 0.2534965
14.0625 0.2996183
20.15625 0.3957399
24.84375 0.496114
… …
Input Angle Output Portion of
Voltage
25.3125 0.5031513
28.59375 0.5397465
30.46875 0.5640244
35.625 0.6482558
39.84375 0.7456897
… …
40.78125 0.75
45.9375 0.75
50.625 0.75
54.375 0.75
59.53125 0.75
Function	Developed
For	the	Defuzzification process	we	use	the	Weighted	Average	
Function	to	calculate	the	output	number according	with	the	
simulation	on	Matlab.
𝑂𝑢𝑡𝑝𝑢𝑡 =	
Σ	𝜇 𝑥 ∗	 𝑥+,
Σ	𝜇 𝑥
𝜇 𝑥 	𝑔𝑟𝑎𝑑𝑒	𝑜𝑓	𝑤𝑒𝑖𝑔ℎ𝑡	𝑜𝑛	𝑡ℎ𝑒	𝑚𝑒𝑚𝑏𝑒𝑟𝑠ℎ𝑖𝑝
			𝑥+, weighted	average	input
Future	Work
• Set	up	the	one	input	system	as	a	proof	of	concept.	We	are	in	the	
process	of	building	the	hardware	set	up.
• Based	on	the	first	system,	make	a	selection	of	the	microcontroller	
models	appropriate	for	a	two	and	three	input	system
• Build	the	controller	with	two	axes,	hence,	two	inputs	or	three	inputs,	
depending	on	the	rules.
References
1.John	Yen,	Reza	Langari,	Fuzzy	Logic	Intelligence,	control	and	Information,	
Prentice-Hall	Inc,	1999
2.Jimenez,	M.,	Palomera,	R.,	and	Couvertier,	I.,	Introduction	to	Embedded	
Systems	Using	Microcontrollers	and	the	MSP430,	Springer,	2014
3.Texas	Instrument.	(APRIL	2011–REVISED	JANUARY	2012).	MSP430Gx53-
MSP430G2x13,	Data	Sheet.	Retrieved	from	
www.ti.com/lit/ds/symlink/msp430g2553.pdf
4.Freescale.	(2012-09-24).	FRDM-KL25Z,	User’s	Manual.	Retreived	from	
http://www.farnell.com/datasheets/1651277.pdf
Questions?

More Related Content

Viewers also liked

Fuzzy logic and fuzzy control systems
Fuzzy logic and fuzzy control systemsFuzzy logic and fuzzy control systems
Fuzzy logic and fuzzy control systems
ILa B Alwi Shahab
 
Fuzzy logic control system
Fuzzy logic control systemFuzzy logic control system
Fuzzy logic control system
Rajanikanta Pradhan
 
Inference And Observation Activity
Inference And Observation ActivityInference And Observation Activity
Inference And Observation Activity
Dwayne Squires
 
FUZZY LOGIC CONTROLLER ON DC/DC BOOST CONVERTER
FUZZY LOGIC CONTROLLER ON DC/DC BOOST CONVERTERFUZZY LOGIC CONTROLLER ON DC/DC BOOST CONVERTER
FUZZY LOGIC CONTROLLER ON DC/DC BOOST CONVERTER
RAGHVENDRA KUMAR PANDIT
 
Fuzzy Logic Control of Hybrid Energy System
Fuzzy Logic Control of Hybrid Energy SystemFuzzy Logic Control of Hybrid Energy System
Fuzzy Logic Control of Hybrid Energy System
Suraj Shandilya
 
BLDC control using PID & FUZZY logic controller-CSD PPT
BLDC control using PID & FUZZY logic controller-CSD PPTBLDC control using PID & FUZZY logic controller-CSD PPT
BLDC control using PID & FUZZY logic controller-CSD PPT
Amiya Ranjan Behera
 

Viewers also liked (6)

Fuzzy logic and fuzzy control systems
Fuzzy logic and fuzzy control systemsFuzzy logic and fuzzy control systems
Fuzzy logic and fuzzy control systems
 
Fuzzy logic control system
Fuzzy logic control systemFuzzy logic control system
Fuzzy logic control system
 
Inference And Observation Activity
Inference And Observation ActivityInference And Observation Activity
Inference And Observation Activity
 
FUZZY LOGIC CONTROLLER ON DC/DC BOOST CONVERTER
FUZZY LOGIC CONTROLLER ON DC/DC BOOST CONVERTERFUZZY LOGIC CONTROLLER ON DC/DC BOOST CONVERTER
FUZZY LOGIC CONTROLLER ON DC/DC BOOST CONVERTER
 
Fuzzy Logic Control of Hybrid Energy System
Fuzzy Logic Control of Hybrid Energy SystemFuzzy Logic Control of Hybrid Energy System
Fuzzy Logic Control of Hybrid Energy System
 
BLDC control using PID & FUZZY logic controller-CSD PPT
BLDC control using PID & FUZZY logic controller-CSD PPTBLDC control using PID & FUZZY logic controller-CSD PPT
BLDC control using PID & FUZZY logic controller-CSD PPT
 

Similar to Fuzzy Logic Controller Realization Using Microcontrollers_Presentation

Design of fuzzzy pid controller for bldc motor
Design of fuzzzy pid controller for bldc motorDesign of fuzzzy pid controller for bldc motor
Design of fuzzzy pid controller for bldc motor
Mishal Hussain
 
Week 8.pptx
Week 8.pptxWeek 8.pptx
Week 8.pptx
1230200206
 
Fuzzy Controller Design Procedure System
Fuzzy Controller Design Procedure SystemFuzzy Controller Design Procedure System
Fuzzy Controller Design Procedure System
NJUSTAiMo
 
L10 fkbc
L10 fkbcL10 fkbc
Unit 2 ca- control unit
Unit 2 ca- control unitUnit 2 ca- control unit
Unit 2 ca- control unit
BBDITM LUCKNOW
 
17 micro programmed control
17 micro programmed control17 micro programmed control
17 micro programmed control
dilip kumar
 
Fuzzy expert system
Fuzzy expert systemFuzzy expert system
Fuzzy expert system
Hsuvas Borkakoty
 
Virtualization infrastructure governance policies Gargee S Hiray
Virtualization infrastructure governance policies  Gargee S HirayVirtualization infrastructure governance policies  Gargee S Hiray
Virtualization infrastructure governance policies Gargee S Hiray
Gargee Hiray
 
Micro programmed control
Micro programmed controlMicro programmed control
Micro programmed control
Syed Zaid Irshad
 
Predictable reactive state management - ngrx
Predictable reactive state management - ngrxPredictable reactive state management - ngrx
Predictable reactive state management - ngrx
Ilia Idakiev
 
Flink Forward Berlin 2017: Hao Wu - Large Scale User Behavior Analytics by Flink
Flink Forward Berlin 2017: Hao Wu - Large Scale User Behavior Analytics by FlinkFlink Forward Berlin 2017: Hao Wu - Large Scale User Behavior Analytics by Flink
Flink Forward Berlin 2017: Hao Wu - Large Scale User Behavior Analytics by Flink
Flink Forward
 
Slotine and Li applied nonlinear control- bad quality.pdf
Slotine and Li applied nonlinear control- bad quality.pdfSlotine and Li applied nonlinear control- bad quality.pdf
Slotine and Li applied nonlinear control- bad quality.pdf
ssuser5a68bb
 
10 implementing subprograms
10 implementing subprograms10 implementing subprograms
10 implementing subprograms
Munawar Ahmed
 
SharePoint Configuration Management – Effective Techniques for Regulated Shar...
SharePoint Configuration Management – Effective Techniques for Regulated Shar...SharePoint Configuration Management – Effective Techniques for Regulated Shar...
SharePoint Configuration Management – Effective Techniques for Regulated Shar...
Montrium
 
Performance tools developments
Performance tools developmentsPerformance tools developments
Performance tools developments
Roberto Agostino Vitillo
 
NFV management and orchestration framework architecture
NFV management and orchestration framework architectureNFV management and orchestration framework architecture
NFV management and orchestration framework architecture
sidneel
 
Remics experiences(berlin) brian
Remics experiences(berlin) brianRemics experiences(berlin) brian
Remics experiences(berlin) brian
Korea Advanced Institute of Science and Technology
 
LIvRE: A Video Extension to the LIRE Content-Based Image Retrieval System
LIvRE: A Video Extension to the LIRE Content-Based Image Retrieval SystemLIvRE: A Video Extension to the LIRE Content-Based Image Retrieval System
LIvRE: A Video Extension to the LIRE Content-Based Image Retrieval System
Universitat Politècnica de Catalunya
 
Microarchitecture
MicroarchitectureMicroarchitecture
Microarchitecture
meashi
 
Uncovering Bugs in P4 Programs with Assertion-based Verification
Uncovering Bugs in P4 Programs with Assertion-based VerificationUncovering Bugs in P4 Programs with Assertion-based Verification
Uncovering Bugs in P4 Programs with Assertion-based Verification
AJAY KHARAT
 

Similar to Fuzzy Logic Controller Realization Using Microcontrollers_Presentation (20)

Design of fuzzzy pid controller for bldc motor
Design of fuzzzy pid controller for bldc motorDesign of fuzzzy pid controller for bldc motor
Design of fuzzzy pid controller for bldc motor
 
Week 8.pptx
Week 8.pptxWeek 8.pptx
Week 8.pptx
 
Fuzzy Controller Design Procedure System
Fuzzy Controller Design Procedure SystemFuzzy Controller Design Procedure System
Fuzzy Controller Design Procedure System
 
L10 fkbc
L10 fkbcL10 fkbc
L10 fkbc
 
Unit 2 ca- control unit
Unit 2 ca- control unitUnit 2 ca- control unit
Unit 2 ca- control unit
 
17 micro programmed control
17 micro programmed control17 micro programmed control
17 micro programmed control
 
Fuzzy expert system
Fuzzy expert systemFuzzy expert system
Fuzzy expert system
 
Virtualization infrastructure governance policies Gargee S Hiray
Virtualization infrastructure governance policies  Gargee S HirayVirtualization infrastructure governance policies  Gargee S Hiray
Virtualization infrastructure governance policies Gargee S Hiray
 
Micro programmed control
Micro programmed controlMicro programmed control
Micro programmed control
 
Predictable reactive state management - ngrx
Predictable reactive state management - ngrxPredictable reactive state management - ngrx
Predictable reactive state management - ngrx
 
Flink Forward Berlin 2017: Hao Wu - Large Scale User Behavior Analytics by Flink
Flink Forward Berlin 2017: Hao Wu - Large Scale User Behavior Analytics by FlinkFlink Forward Berlin 2017: Hao Wu - Large Scale User Behavior Analytics by Flink
Flink Forward Berlin 2017: Hao Wu - Large Scale User Behavior Analytics by Flink
 
Slotine and Li applied nonlinear control- bad quality.pdf
Slotine and Li applied nonlinear control- bad quality.pdfSlotine and Li applied nonlinear control- bad quality.pdf
Slotine and Li applied nonlinear control- bad quality.pdf
 
10 implementing subprograms
10 implementing subprograms10 implementing subprograms
10 implementing subprograms
 
SharePoint Configuration Management – Effective Techniques for Regulated Shar...
SharePoint Configuration Management – Effective Techniques for Regulated Shar...SharePoint Configuration Management – Effective Techniques for Regulated Shar...
SharePoint Configuration Management – Effective Techniques for Regulated Shar...
 
Performance tools developments
Performance tools developmentsPerformance tools developments
Performance tools developments
 
NFV management and orchestration framework architecture
NFV management and orchestration framework architectureNFV management and orchestration framework architecture
NFV management and orchestration framework architecture
 
Remics experiences(berlin) brian
Remics experiences(berlin) brianRemics experiences(berlin) brian
Remics experiences(berlin) brian
 
LIvRE: A Video Extension to the LIRE Content-Based Image Retrieval System
LIvRE: A Video Extension to the LIRE Content-Based Image Retrieval SystemLIvRE: A Video Extension to the LIRE Content-Based Image Retrieval System
LIvRE: A Video Extension to the LIRE Content-Based Image Retrieval System
 
Microarchitecture
MicroarchitectureMicroarchitecture
Microarchitecture
 
Uncovering Bugs in P4 Programs with Assertion-based Verification
Uncovering Bugs in P4 Programs with Assertion-based VerificationUncovering Bugs in P4 Programs with Assertion-based Verification
Uncovering Bugs in P4 Programs with Assertion-based Verification
 

Fuzzy Logic Controller Realization Using Microcontrollers_Presentation