Using your noodle to think things through tends to make things go much more smoothly—even if you’re just a high-speed food packaging machine wrapping instant noodles. That’s an important lesson gained from machine learning technology used by systems integrator Tianjin FengYu Ling Kong of Tianjin, China.
This form of artificial intelligence (AI) allowed the firm’s engineers to develop a multivariable inspection model for one of China’s largest producers of noodles. Relying on this model, the control system for the packaging lines can now deduce whether sachets containing spices and dried vegetables for flavoring were placed correctly on the precooked noodle blocks before each block is individually wrapped.
This ability is an example of how machine learning and other forms of AI are moving beyond applications like robotics and analytics and into control applications.
In Tianjin FengYu’s case, there was no other cost-effective way to check whether an occasional sachet of flavorings might have slipped between two blocks of noodles and been cut open by a cross-cutting tool. Although cutting a sachet generates measurable signals within the machine, other events such as vibration and changes in packaging material, conveyor speed, and cutting tension also affect those signals, making conventional forms of process monitoring unreliable.
For this reason, Tianjin FengYu decided to develop, train, and deploy a mathematical model using TwinCAT Machine Learning from Beckhoff Automation. The integrator’s engineers collected sensor data via EtherCAT terminals and TwinCAT Scope View charting software. Then, the data were correlated into a model using TwinCAT Condition Monitoring, and the model was trained using an open-source framework called Scikit-learn.
After being saved as a description file in a binary format suited for serialization in TwinCAT, the trained model was loaded into a CX5100 series embedded PC, which runs the model in real time. This embedded PC is integrated with the main controller on the packaging line.
The control system can run the model in real time as each packaging line wraps about 500 packages of noodles per minute. “A trained model actually runs fairly quickly,” notes Beckhoff’s Daymon Thompson. “And that’s what’s usually running in the controllers.”
Training the model is a different story, however. Thompson says that training needs a lot of processing power, as much as 30 minutes to a full day, depending on the model and the computer training it. So, the initial training and any subsequent retraining are often done on a server or an offline controller.
Besides in-process inspection, another application for machine learning in controls is the optimization of motion profiles. Consider a conveyor system that carries payloads around corners and coordinates motion with loading and other activities in a demonstration created by Beckhoff using its eXtended Transport System (XTS). “Instead of just running everything around as fast as we can to get in line for the next synchronized event, we want the motion to be optimized to minimize energy consumption and wear and tear on the mechanics,” explains Thompson.
The machine learning algorithm figures out exactly what the motion profile should look like. “Because the motors driving the system need to be coordinated in real time, the motion profile really needs to be built into the machine control,” notes Thompson. “It can’t be done on a server or even an edge device.”
AI benefits closed-loop control
“Traditionally, PLC programmers would write ladder logic to tune systems with either creative rungs of arithmetic or PID control blocks,” says Kevin McClusky, co-director of sales engineering at Inductive Automation. “Today, closed-loop control with AI allows users to feed data into predictive models that can optimize output based on past performance or cost reduction, allowing far more complex algorithms to be applied to achieve efficiency or productivity goals.”
He reports that the catalogs of several PLC manufacturers now offer AI modules for closed-loop control. Although not every application needs the technology, these modules are another set of tools in the toolbox. McClusky compares them to a simple PID block in ladder logic. “It’s not needed in a lot of applications, but it sure is handy in applications that can benefit from it,” he says.
“Model outputs can be integrated into the control scheme to extend the capabilities of classical control methods,” adds Jennifer Mansfield, marketing manager—analytics at Rockwell Automation. “Challenging problems, like enabling predictive maintenance or dynamic control, are better addressed with machine learning than classical control.”
Illustrating her point is the model predictive control (MPC) that EnWin Utilities Ltd. implemented to mitigate pressure spikes in the water distribution system in Windsor, Ontario. These spikes had been contributing to an increasing number of watermain breaks in the aging system.
The old control scheme had depended upon PID logic that maintained a flow setpoint based upon outlet header pressure. Pressure would vary whenever operators would start and stop pumps at the two pumping stations and an auxiliary booster station to adjust flows to compensate for fluctuating demand.
To even out pressure, EnWin chose an MPC-based system that could handle more variables than just flow and outlet header pressure. Working with engineers from Rockwell Automation, EnWin began by creating 17 remote pressure stations throughout the water distribution system. The team also installed server-based MPC on its existing supervisory control and data acquisition (SCADA) system. The system now maintains the lowest possible pressure for producing adequate flow as demand changes.
To optimize pressure and flow control further, the main campus uses a new ControlLogix controller with onboard MPC. “We knew we could optimize the system by incorporating pump start-stop functionality and flow control valves,” explains Quin Dennis, an application engineer at Rockwell Automation. “But given the existing interval speed, [server-based] MPC would not be able to make system adjustments quickly enough to mitigate the rapid pressure spikes from pump starts or stops.” Onboard MPC, however, reduced the 15 to 16 second interval speed down to 0.5 to 1 second.
The system is now responsive enough to regulate the speed of the pumps and adjust control valves to offset any pressure spikes. By replacing PID logic with MPC at the controller level, as well as at the server level, EnWin was able to reduce watermain breaks by 21%. It also reduced average pressure by 2.8 psi and standard deviation by 29%, saving the company $125,000 in annual energy and leakage costs.
Predictive applications
Another benefit of AI is that it can help users peer deeper into their processes than controllers would otherwise permit. This is especially true in applications that require processing large amounts of data.
“AI is now being implemented on the edge in situations where large volumes of data must be analyzed quickly before being sent to the cloud,” observes Joe Berti, vice president of AI applications at IBM Corp. “As a result, smart technology is broadening engineers and technicians’ understanding of their assets’ health by capturing and interpreting more information faster than any human could.”
Consequently, Berti thinks that the biggest contribution AI and machine learning are making to controls technology is the ability to streamline detection and resolution of developing problems before they have a chance to escalate. “In the past, an asset might have been inspected on an annual basis,” he says. “Now, IoT sensors and enterprise asset management systems can detect patterns in asset data and then translate those findings into potential problems.”
An example of this kind of application can be seen in the use of AI to discover oil degradation on a food packaging line installed by Novate Solutions Inc., an engineering and technology services firm based in West Sacramento, Calif. The clues to the problem came from IBM’s cloud-based AI technology and Maximo Monitor software, which Novate uses to provide a process monitoring service. The AI noticed that the average torque of a servomotor had been increasing over time, so the Novate solution flagged the equipment for inspection.
Upon being alerted by Novate engineers, the production crew at the food producer checked the packaging equipment and found that the oil had not been changed as the maintenance log had suggested. The oil had completely degraded, causing the motor to work increasingly harder over time.
Trained for decision-making
Another application for AI in basic control is the automation of decision-making in continuous processes. “Here, an AI system controls a part of a facility or operation, sending signals to do basic control of different pieces of equipment,” says Inductive Automation’s McClusky.
He points to the way a type of machine learning known as reinforcement learning is being deployed by Andritz Automation, a worldwide systems integrator headquartered in Graz, Austria. In reinforcement learning, models are trained to make a sequence of decisions by means of a trial-and-error method that strives to maximize a cumulative score of rewards and penalties.
In what may have been the first implementation of this AI technology in continuous industrial processes, Andritz engineers in Canada and Germany collaborated on developing prototype software. They then implemented the prototype in a pilot program at Newmont GoldCorp., a Vancouver-based goldmining company.
This prototype uses the integrator’s process simulation software as the training ground for machine-learning algorithms. The AI engine learns by interacting with several simulations as they run. A user can set up batches of training scenarios, such as particular plant malfunctions that the AI engine needs to know. After the training exercises are performed, the algorithms are stored and used for automatic plant control.
A key technology for developing and implementing this AI engine was Inductive Automation’s Ignition development environment for SCADA. Ignition provided a bridge between the AI engine and either the integrator’s process simulation software or the real plant, using scripted HTTP calls on one side and OPC on the other.
Ignition’s sequential function charts control the dispatch of training scenarios. All scenario configuration and training results are stored in a SQL database. During the training process, the two teams in Canada and Germany were able to work on the project at the same time because the training environment was deployed on a small virtual network on a Microsoft Azure cloud server in Europe. Each team could run Vision clients simultaneously and access the database gateway and simulation machines.
Source: automationworld.com