A team of MIT researchers has trained a machine-learning model to monitor and adjust the 3D-printing process in real time.
Scientists and engineers are constantly developing new materials with unique properties that can be used for 3D printing, but figuring out how to print with these materials can be complex and costly. Often, an expert operator must use manual trial and error – potentially making thousands of prints – to determine the ideal parameters that consistently print a new material effectively. These parameters include printing speed and how much material the printer deposits.
The MIT researchers used artificial intelligence to streamline this procedure. They developed a machine-learning system that uses computer vision to watch the manufacturing process and then correct errors in how it handles the material in real time.
They used simulations to teach a neural network how to adjust printing parameters to minimise error and then applied that controller to a real 3D printer. Their system printed objects more accurately than all of the other 3D-printing controllers to which they compared it.
The work avoids the prohibitively expensive process of printing thousands or millions of real objects to train the neural network. And it could enable engineers to more easily incorporate novel materials into their prints, which could help them develop objects with special electrical or chemical properties. It could also help technicians make adjustments to the printing process on the fly if material or environmental conditions change unexpectedly.
‘This project is really the first demonstration of building a manufacturing system that uses machine learning to learn a complex control policy,’ said Wojciech Matusik, professor of electrical engineering and computer science at MIT. ‘If you have manufacturing machines that are more intelligent, they can adapt to the changing environment in the workplace in real time to improve the yields or the accuracy of the system. You can squeeze more out of the machine.’
Determining the ideal parameters of a digital manufacturing process can be one of the most expensive parts of the process because so much trial and error is required. And once a technician finds a combination that works well, those parameters are only ideal for one specific situation. She has little data on how the material will behave in other environments, on different hardware, or if a new batch exhibits different properties.
Using a machine-learning system comes with its own challenges. First, the researchers needed to measure what was happening on the printer in real time. To do this, they developed a machine-vision system using two cameras aimed at the nozzle of the 3D printer. The system shines light at material as it’s deposited and, based on how much light passes through, calculates the material’s thickness.
‘You can think of the vision system as a set of eyes watching the process in real time,’ said Mike Foshey, a mechanical engineer who worked on the project.
The controller would then process images it receives from the vision system and, based on any error it sees, adjust the feed rate and the direction of the printer. But training a neural-network-based controller to understand this manufacturing process is data-intensive, and would require making millions of prints. So, the researchers built a simulator instead.
To train their controller, they used a process known as reinforcement learning, in which the model learns through trial and error with a reward. The model was tasked with selecting printing parameters that would create a certain object in a simulated environment. After being shown the expected output, the model was rewarded when the parameters it chose minimised the error between its print and the expected outcome.
In this case, an ‘error’ means the model dispensed too much material, placed it in areas that should have been left open, or didn’t dispense enough, leaving open spots that should be filled in. As the model performed more simulated prints, it updated its control policy to maximise the reward, in the process becoming more and more accurate.
However, the real world is messier than a simulation. In practice, conditions typically change due to slight variations or noise in the printing process. So the researchers created a numerical model that approximates noise from the 3D printer. They then used this model to add noise to the simulation, which led to more realistic results.
‘The interesting thing we found was that, by implementing this noise model, we were able to transfer the control policy that was purely trained in simulation onto hardware without training with any physical experimentation,’ Foshey said. ‘We didn’t need to do any fine-tuning on the actual equipment afterwards.’
When they tested the controller, it performed especially well at infill printing – printing the interior of an object. Some other controllers deposited so much material that the printed object bulged up, but the researchers’ controller adjusted the printing path so that the object stayed level.
Their control policy can even learn how materials spread after being deposited and adjust parameters accordingly.
‘We were also able to design control policies that could control for different types of materials on-the-fly,’ Foshey said. ‘So if you had a manufacturing process out in the field and you wanted to change the material, you wouldn’t have to revalidate the manufacturing process. You could just load the new material and the controller would automatically adjust.’
Now that they’ve demonstrated the effectiveness of this technique for 3D printing, the researchers want to develop controllers for other manufacturing processes. They would also like to see how the approach can be modified for scenarios in which there are multiple layers of material, or multiple materials being printed at once. In addition, their approach assumed that each material has a fixed viscosity, but a future iteration could use AI to recognise and adjust for viscosity in real-time.