Week 7

In this week, I have started to program the fuzzy logic system into Raspberry Pi Pico using Thonny IDE. To begin with, I started to program on fuzzification process for the LDR input based on the parameters that have been set last week. Here are some of the coding on fuzzification process. The fuzzification process is needed to convert the ADC value of LDR sensor data into crisp output.



After fuzzification process, rules evaluation process will occur. Before that, I have to set some rules for the fuzzy logic process to determine whether the output bulb will be dim or bright based on the LDR crisp output. Here are the rules that I have set. AND and OR function was used. AND function indicates maximum crisp output value will be selected while OR function indicates minimum value will be selected in the rules evaluation process.




No comments:

Post a Comment