Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Implementing fuzzy logic in PIC18f4431 microcontroller using C language

Status
Not open for further replies.

raju jaina

Newbie level 4
Joined
Feb 6, 2012
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,317
Hi..

I would like to know how to write a fuzzy logic based C program for PIC18F4431 microcontroller ?
I am using MPLAB IDE for programming the PIC18F4431 microcontroller and i am using mplab-C18 compiler with it. My project is to control speed of BLDC motor using fuzzy logic.
So, Any sample examples will be helpful for my project ..

Thank you..
 
Last edited:

for example a linguistic variable positive big can be calculated as-


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
char Error_ Positive Big (int  CRISP) 
                         { 
                            if (CRISP < 0.4) 
                                 return(0); 
                           else 
                                { 
                                   if (CRISP >= 0.4)  
                                      return(CRISP * 2.5); 
                                  else 
                                       { 
                                         return(1);  
                          }}          }

 
Last edited by a moderator:

May i know , how to define membership functions in C language ? because this is the first step for fuzzy logic implementation ...


for example a linguistic variable positive big can be calculated as-

char Error_ Positive Big (int CRISP)
{
if (CRISP < 0.4)
return(0);
else
{
if (CRISP >= 0.4)
return(CRISP * 2.5);
else
{
return(1);
}} }
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top