Python and machine learning are incredible tools for IA
By Steve Mackay PhD, Dean, Engineering Institute of Technology*
Wednesday, 05 February, 2020
You will probably be wondering what on earth some arcane programming language — with its name originating from Monty Python of all places — has to do with instrumentation, process control and automation in 2020.
I have observed with astonishment the incredible growth of Python — from the commercial world into industry and manufacturing processes. It is extraordinarily good at being an all-purpose programming language — a veritable Swiss Army Knife language able to handle a vast range of tasks from general-purpose programming to detailed control of hardware. What makes Python really stand out is its incredible popularity and zero cost — there is a huge community of support. As compared to other languages, Python has simplicity and flexibility. And believe it or not but Python is over 30 years old.
First let’s examine the reasons for Python’s success and why it will benefit you in 2020.
Why is Python such a powerful language? It requires less supporting code, it speeds up the development cycle and makes any debugging a breeze. Being an interpreted language it is considerably easier to work, and fix on the fly than with a buggy C program which simply crashes. Python can do in a single line what many programming languages require multiple lines of code.
Much to everyone’s surprise, it is now increasingly being used in the industrial automation and embedded systems world (eg, Raspberry Pi and IoT systems with MicroPython). In 2018, for the second year, the largest engineering society in the world, the IEEE, listed Python as the number one programming language (even ahead of such venerables as C and C++). Surprisingly, it was also the number one embedded language in 2018.
Specific tasks for Python range from testing to data collection and automation. Automation of tasks is a critical part of every engineer’s task today. Design probably only takes 10% of an engineer’s time — most of the day-to-day work is in research and testing of prototypes, debugging, production testing and — worst of all — documentation.
There is a growing need for Python programming skills in the industrial area. Typical tasks for automation engineering professionals where Python can assist are file processing (conversion from one format to another), automation of test equipment and data (such as waveforms for power quality problems) and database management (such as SQL). Python easily handles standard industrial automation tasks such as analysis of vast amounts of data from processes, logging data over a Modbus communication link and preventive maintenance. Translating a PLC database and converting this into a bunch of HTML files is done in a flash.
Areas such as numerical analysis (with awkward boundary conditions) in manufacturing, automotive, energy and thermodynamics (ranging from fluid dynamics to chemical kinetics) are fertile areas of work for Python.
Python is also a key enabler for machine learning (ML) — surely one of the most exciting technologies in recent times, particularly in the industrial automation business. For example, if you are working with a large amount of industrial sensor data and you want to predict an output value for given inputs or you want to find clusters of similarity in your sensor data, you can use ML algorithms in conjunction with Python.
Thus, when considering analysis and processing of a vast stream of industrial sensor data, why not get a Pythonista (or Python programmer) in to help you — there are plenty of them around.
Many industrial enterprises are deploying digital twins and reporting significant benefits today.
In recent years there has been a great deal of buzz around the concept of digital twins, gaining...
The recent societal shutdown has shown that we need to be prepared for potential business...