“It’s always difficult to think, ‘OK, what am I going to give my students as an assignment this year?’” says Antony Higginson, a lecturer in the School of Chemical and Metallurgical Engineering at the University of the Witwatersrand (Wits), in Johannesburg, South Africa. “Previously, I have given them a data set from a flotation cell”—a tank that separates minerals from tailings; students mathematically modeled the flotation cell to match the real data—“from a mine in Australia. But that’s very abstract,” Higginson says. “You have all this data, but you don’t have any connection to it if you’ve never been there and never seen it in operation.” Furthermore, he says, “It’s not happening in real time. It’s just a big spreadsheet.”
Last year, he tried something different. Wits has a brewery plant on campus, the Wits Microbrewery. Higginson had been using a part of it for his Ph.D. research on creating bioethanol, a fuel additive. For one of the experiments, he allowed his students to observe it remotely. Wherever they were, they could see him set up equipment in the lab on a webcam and see data streaming to the website. When it came time to model the data, they felt more involved. “We got good feedback from the students,” Higginson says. “I think it was one of those things where they hadn’t seen something quite like it before.”
Remote Control Brewing
Bioethanol is a renewable fuel source created by fermenting crops. It can be blended with gasoline, or it can power vehicles on its own. South Africa grows a large amount of sugarcane, which could potentially be used to produce bioethanol, however costs have prevented large-scale production in the country. Higginson hoped to optimize its production in a 100-liter steel fermentation tank using artificial intelligence.
“This project is about giving the students an experience of [a system like SCADA] without having to greatly expand the amount of available lab equipment.”
Antony Higginson, University of the Witwatersrand
Key to the fermentation process is the amount of nutrition fed to the yeast at the start of a batch. If the sugar comes from a particular batch of cane or molasses, it might have more or less nitrogen than expected, making prediction and control difficult. Higginson trained neural networks to predict the final ethanol concentration based on the fermentation’s early progression and used that information to add more sugar or dilute the existing sugar throughout the process to increase the eventual ethanol concentration.
An experiment could run as long as a week, and Higginson couldn’t be in the lab 24/7 to monitor its progress and check for faults. So, he found a way to monitor the experiments remotely. Sensors measuring variables such as temperature and density were connected to a programmable logic controller (PLC) and to two Arduino® microcontrollers. Another small device, a Raspberry Pi®, operated as a server, aggregating the data from the Arduino boards and sending it to the PLC, which acted as the main controller for the system. Normally, he would monitor the process on a lab computer running supervisory control and data acquisition (SCADA) software, but that PC had no internet connection.
To monitor the experiment remotely, he sent data from the Raspberry Pi to ThingSpeak™, an IoT analytics platform that aggregates data and presents it graphically, which was available to all students at the university through their Campus-Wide License for MATLAB®. ThingSpeak users can view the data in real time on any device that has a web browser. Once the experiment ended, Higginson imported the data from ThingSpeak into MATLAB for further analysis. Previously, to get data from the experiment, he’d have to copy a spreadsheet from the SCADA PC to a flash drive.
ThingSpeak automatically formats different kinds of data to be compatible. “You don’t need to do any messing around with data types,” Higginson says. “You just import the data to MATLAB, and you have a nice big data table that has all the information that you might want to use.”
The ThingSpeak website displays the raw live data from each sensor, while MATLAB provides advanced analysis and visualization capabilities. Higginson could visualize the data from various batches and overlay the charts to compare them. And watching the data in real time, he could see if there were any issues such as a malfunctioning pump. ThingSpeak also let him control the experiment remotely.
Higginson realized he could use this setup for his class on process control, a fourth-year class in both the chemical and metallurgical engineering curricula. Process control is at the heart of many industrial activities at factories and power plants: It’s the monitoring and management of operations based on feedback. Before heading into the workforce, students need experience with real processes. “It’s all well and good to have simulated data,” Higginson says, “but you don’t really get the messiness of real data unless you have real data.”
Higginson would love to invite everyone to watch the fermentation in person. While that may be possible at some universities, Wits has limited space and resources compared to many of the universities in the United States and Europe. “We’ve got a class of over a hundred,” Higginson says, “so it’s not easy to squash them all into a lab.”
The setup solves another problem common in South Africa: unstable electricity supply. The country regularly implements rolling blackouts, locally known as load shedding, which means the university servers are sometimes inaccessible to students. But if they have a battery-powered device and a cellular connection, they can access the streaming data on the ThingSpeak servers.
While conducting one of the Ph.D. experiments, Higginson streamed the data to his students. Their assignment was to build a computational model that reproduced the data. Whereas Higginson had been using neural networks for his research, these models were meant to be simpler. The equations were grounded in physics principles, and students needed to fit only three or four parameters, mostly related to the transfer of heat between different elements of the system. One was the amount of energy added by the pump that circulates water. MATLAB has the required tools built in, including functions to fit lines to the heat transfer data. Students learned which MATLAB functions to use.
They also needed to select which data to use to try to model the system. At one point, a pipe flowing into the cooling tank iced over, which stopped the heat transfer out of the system. “The temperature just kept climbing and climbing,” Higginson says. “So, they’re able to see things in the process like that where problems had occurred. Then they’d have to avoid those sections of anomalous data.”
The Engineering Council of South Africa expects schools to assess a set of abilities called graduate attributes. “The one that we were assessing in this assignment was the use of engineering tools, including information technology,” Higginson says. “It is about them getting to grips with the data, getting to grips with the tools that are available, and being able to produce something using those tools.”
“In the real world, process control engineers often use SCADA systems, which are more robust. But they can cost tens or hundreds of thousands of dollars to build and maintain,” says Professor Kevin Brooks, who runs the Data Analytics, Numerics, and Control Engineering (DANCE) group at Wits.
“This project is about giving the students an experience of that type of system without having to greatly expand the amount of available lab equipment,” Higginson says. “It’s not quite being in a control room and seeing all the data coming in from a plant, but it’s a reasonable facsimile. The data comes in every minute, and you have to follow that trend the whole way through and then start playing with the data after that.”
“What [ThingSpeak] gives you is an ability to prototype very quickly and have something that’s going to collect all your data and share it with collaborators.”
Antony Higginson, University of the Witwatersrand
“I never expected that connecting something to the cloud would have been easier than putting in an Ethernet cable connecting the SCADA to the internet,” Higginson says. “But it is. And then sharing that data—you’d think maybe it’s difficult. No, it’s a couple of lines of code and anyone can get the data.”
Higginson notes that from an engineering perspective, setting up that data infrastructure without ThingSpeak would have been expensive and time-consuming. He might have had to hire someone to administer the network. But now the data is safe and accessible. “And I’m not going to have students calling me at 11 p.m. saying, ‘OK, I can’t access the data; the server’s down.’”
“A remote lab like this could easily scale beyond 100 students,” says Marco Rossi, an engineer at MathWorks who supports the University of the Witwatersrand and others in the region. “If he wanted, Higginson could share the data with anyone at any university with a MATLAB license.”
Higginson suggests that universities could pool their resources so that one runs a large-scale experiment, and students at the others see the data. Higginson and Brooks presented their teaching setup in a paper last year at the International Federation of Automatic Control (IFAC) Symposium on Advances in Control Education. Brooks notes another paper from the conference describing a test track that a group from Germany had developed for miniature autonomous vehicles. It’s connected to the cloud, and students at other universities can book time to do experiments using the vehicles. Brooks says a student could potentially develop a collision avoidance algorithm using MATLAB and watch its performance over video. “The idea of taking the information and putting it somewhere that is easy to see in real time for students is exciting.”
Meanwhile, other Wits students are exploring the potential of ThingSpeak. One group developed neural networks to model the bioreactor’s cooling system. “Without my needing to tell them how to do anything, they actually figured out how to get at the data and start playing around with it,” Higginson says. “And I was kind of surprised when they brought me some results and said, ‘OK, this is what we’ve done.’”
While ThingSpeak can benefit education, many researchers will find it useful for their own work, Higginson says. “What it gives you is an ability to prototype very quickly and have something that’s going to collect all your data and share it with collaborators.” It helped him work with Brooks, his Ph.D. supervisor. “I was easily able to show him all the stuff that I was doing, rather than having to create a Word document and say, ‘This is the graph that I made from the temperature. This is the graph that I made from whatever else.’ I was able to say instead, ‘Look at what’s happening on the ThingSpeak page. You can see how all the graphs are kind of trending toward the same position. What does that mean?’”
Higginson says the ease of the cloud-based system makes the lab SCADA system unnecessary. “I haven’t actually gone in to collect the data from that computer for a very long time,” Higginson says, “because I haven’t needed to.” Tools similar to ThingSpeak are available, but Higginson was already working with MATLAB, which made the transition very easy.
Some former students are using the skills they developed working with data and MATLAB in their industries. One is working on pulp and paper, another on minerals processing. A third has applied it at a craft distillery in Johannesburg, figuring out how to digitalize a small production facility. “It’s really a very tiny craft distillery, where they don’t have online digital measurements,” Higginson says. “And, of course, it’s very expensive to install those kinds of systems.”
“The platforms are now at a point where the tools are really easy to use,” Higginson says. “It’s just a question of finding ways to use them.”
Head to MathWorks.com for the full customer story
Topics covered: Artificial Intelligence, Internet of Things