# Researchers Create Fuzzy Like PI Controller to Control FFF 3D Printer Extruder and Bed Heaters

Not this kind of fuzzy…
[Image: Utrecht University]

I learn all kinds of interesting things writing about 3D printing every day. Much to my chagrin, today I learned that a fuzzy print controller is not actually fuzzy or furry. For those of you who are also in the dark, fuzzy control systems are based on what’s called fuzzy logic: a mathematical system, introduced in 1965, where the truth values of variables could be any real number between 0 and 1 inclusive. It handles the concept of partial truth, where the truth value could be anywhere between totally true and completely false. The opposite is Boolean logic, which sets the truth values of variables as only true and false, or respectively, 1 and 0.

A trio of researchers from the Arab Academy for Science, Technology and Maritime Transport and the Electronics Research Institute in Egypt used fuzzy logic for a new study, titled “Fuzzy Controller Algorithm for 3D Printer Heaters,” about creating an easily tunable, closed-loop controller to run the heaters in an FFF 3D printer, which require its heaters to operate within temperature ranges that are well-suited for the specific material being printed.

The abstract of the study reads, “PID controllers are the most widely used. To efficiently design this controller, parameter-tuning must be done which is a time-consuming process. To save time, tuning could be performed by simulation, but this requires the system’s model. Some system models are difficult to deduce, thus other controllers that are independent of the system model and do not require multiple tuning iterations are used. An example of such controllers is the fuzzy like PI controller. This paper presents the design and implementation of a fuzzy like PI controller. The results for testing the controller are presented.”

System block diagram of fuzzy like PI controller

Heated beds can prevent warping and increase print quality, so it’s important to be able to control them properly. The team designed and implemented a model-free fuzzy like PI controller for the study, as it can capably control a non-LTI system with an unknown model. An FFF 3D printer with a heated bed and an extruder that can feed 1.75 mm filament was used, so the researchers could try to control the temperatures of both the bed and the extruder heater with the controller.

“To conduct this study, a 40-watt cartridge heater was used for the extruder and a 90-watt heater for the heat bed,” the researchers wrote. “Both heaters’ parameters were unavailable which made building their models difficult. The heat bed’s heater takes about 10 minutes to reach 100°C. Thus, system identification techniques are time consuming. Without the system model and with the time taken for the heat bed’s heater to reach the set point temperature, tuning a PID controller can be time-consuming. The heaters’ parameters could also be time-variant or have a dependency on other variables.”

They implemented the fuzzy like PI controller on an Arduino Nano board with a microcontroller that runs at 16 MHZ clock speed and has 32 KB of flash memory. A 12V 40W cartridge heater inserted in the heating block of the extruder assembly serves as the extruder heater, and the MK3 aluminum heat bed operates at 19 V; both can be seen in the figures below and are controlled by, as the researchers wrote, “varying the duty cycle of a PWM control signal produced by the microcontroller.”

The team tested the controller with both the heat bed and extruder heater, then used an Arduino serial monitor to send the data from the microcontroller to the computer. They determined that their fuzzy like controller displayed “adequate performance” while controlling the two heaters. With only minimal tuning and no need to perform system identification, steady state errors in the heat bed were as low as 0.95%, and 12.15% (due to lack of sensor sensitivity) in the extruder heater.

“The controller was suitable to be used on small microcontrollers as it occupied 7.5 Kb of Flash memory and 0.3 Kb of RAM, which leaves room to use other complex applications on the microcontroller,” the team concluded. “Therefore, the use of fuzzy like PI controller is highly justified.”

To learn more about the mathematics and logic behind the team’s fuzzy like PI controller, because I can absolutely not explain them to you, check out the research paper. Co-authors are A. E. El-Fakharany, M. R. Atia, and Mohamed I. Abu El-Sebah.

Discuss this research and other 3D printing topics at 3DPrintBoard.com or share your thoughts in the Facebook comments below.