### Present Remotely

Send the link below via email or IM

• Invited audience members will follow you as you navigate and present
• People invited to a presentation do not need a Prezi account
• This link expires 10 minutes after you close the presentation

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.

# Copy of FuzzyControl Using FCL and Raspberry Pi

No description
by

## edgar munoz

on 21 May 2013

Report abuse

#### Transcript of Copy of FuzzyControl Using FCL and Raspberry Pi

The Results The Implementation The Trials The Idea Problem: Resources Fuzzy Climate Control With
Raspberry Pi Control 2013 Fuzzy Control Fuzzy Logic
+
Programmable
Controller Fuzzy Logic What is Fuzzy
Logic? How is Fuzzy
Logic Different from Conventional Control Methods? But how
does it
work? FUNCTION_BLOCK

VAR_INPUT
<variable name> REAL;
END_VAR

VAR_OUTPUT
<variable name> REAL;
END_VAR

FUZZIFY <variable name>
TERM <term (or set) name> := <points that make up the term> ;
END_FUZZIFY

DEFUZZIFY valve
METHOD: <defuzzification method>;
END_DEFUZZIFY

RULEBLOCK <ruleblock name>
<operator>:<algorithm>;
ACCUM:<accumulation method>;
RULE <rule number>: IF <condition> THEN <conclusion>;
END_RULEBLOCK

END_FUNCTION_BLOCK - Office Temperature is too cold.
- Do not want to heat the whole basement.
- Takes forever to warm up.
- Heater gets left on over night. Solution: - Use python and pyFuzzy module to develop a fuzzy logic controller capable of managing the office temperature. Components required: One Wire Digital Temperature Sensor

8 Channel Relay Module

RaspberryPi Class Diagram VAR_INPUT
temp : REAL;
time : REAL;
outside: REAL;
END_VAR

FUZZIFY temp
TERM cold := (12, 1) (16, 0);
TERM cool := (16, 0) (18, 1) (20, 0);
TERM hot := (20, 0) (24, 1);
END_FUZZIFY

FUZZIFY time
TERM home := (0, 1) (9, 0) (14, 0) (20, 1) (24, 1);
TERM asleep := (0, 1) (6, 0) (20, 0) (24, 1);
END_FUZZIFY

FUZZIFY outside
TERM summer := (10, 0)(20, 1);
TERM winter := (0, 1)(10, 0);
END_FUZZIFY Fuzzy Control Language - therm.fcl DEFUZZIFY heater
TERM on := 1;
TERM off := 0;
ACCU : MAX;
METHOD : COGS;
DEFAULT := 0;
END_DEFUZZIFY COGS - Center Of Gravity for Singletons Fuzzy Control Language VS References - IEC 1131 -PROGRAMMABLE CONTROLLERS Part 7 Fuzzy Control Programming

- jFuzzyLogic: A Robust and Flexible Fuzzy-Logic Inference System Language
Implementation.

- Artificial Intelligence A Modern Approach : Russel, Norvig.

- http://docs.python.org/2/

- https://github.com/dearingdbk/piHome.git

- http://pyfuzzy.sourceforge.net/ RULEBLOCK No1
AND : MIN;
RULE 1 : IF temp IS cold AND outside IS winter THEN heater IS on;
RULE 2 : IF temp IS cool AND outside IS summer THEN heater IS off;
RULE 3 : IF temp IS cool AND time IS asleep THEN heater IS off;
RULE 4 : IF temp IS cool AND time IS NOT asleep AND time IS home THEN heater IS on;
RULE 5 : IF temp IS hot THEN heater IS off;
END_RULEBLOCK
Full transcript