Motor Drive using Fuzzy controller

I was wondering if there is any way to implement .fis or any fuzzy logic controller in PSIM. I have built my speed controller of PMSM in matlab and would like to build the same in PSIM to try it using PIL. Any help is appreciated.

I thought of simcoupler but i don’t think it will be efficient or even works when implementing PIL simulation.

The best thing to do is use the c block and just define it with c code, if you want to use “PSIM blocks” you can probably piece something together with lookup tables, there are 1-D and 2-D lookup tables and you can implement conditional logic with comparator or multiplex elements. You can also implement “if then else” statements inside of the math blocks with the “iif” notation.