My project is 'optimum solar cell implementation using dc-dc boost converter controlled by fuzzy logic controller'. I'm using MPLAB IDE for programming the PIC18F4431. I really don't have any idea about the c programming for fuzzy logic controller. I had done the inference rules in Matlab fuzzy logic toolbox. The input is error, E and change in error, CE. The output is the duty ratio, D of the boost converter. Below is the rules.

For example, If E is NB and CE is ZE then D is NB.

So any examples of fuzzy logic controller c programming which are related to this project will be helpful to me. Thank you.