Machine Learning at the Edge

Share on linkedin

The Internet of Things, or IoT, has been a household name for some time. Edge Computing and Machine Learning at the Edge are newer ideas that are spiking interest and applicability in deep embedded electronics markets. With the growing need for machine autonomy and intelligence at the Edge we start to see a bloom of Edge-based applications. These applications are starting to utilize Machine Learning, Artificial Intelligence, and Machine Vision.

Machine Vision, AI, and Machine Learning are, generally, software defined technologies. So you may ask, why does PHYTEC have interest in these new technologies?

PHYTEC sees great potential for integrating these new software technologies into existing and new industrial systems where embedded electronics are critical components. Industrial embedded electronics offer lower cost, high reliability and stability, can operate in extreme environments, and support application-focused designs when compared to their PC or server-based relatives. Bringing Machine Learning, Artificial Intelligence, and other software defined technologies to the edge will also help to advance the Industry 4.0 model.  Edge computing also addresses many shortcomings with the Industrial IoT model while reducing operating costs and risks.

Perhaps, it is useful to remind ourselves of some of the issues with IoT and why we need Machine Learning, Artificial Intelligence and Computing at the edge.

Traditional IoT Issues

There are several issues with existing IoT infrastructure when trying to utilize it in remote and industrial applications. Traditional IoT devices feature limited processing power and typically very small amounts of RAM. This means they run small and constrained operating systems. These devices primarily gather data from sensors and send that data to remote data centers for processing. Decisions are made after data is collected and processed. This means that reactions to critical events may be delayed or even missed. Traditional IoT devices are reliant on an active internet connection and critical actions suffer from latency. In addition, many industrial applications may require the use of bandwidth limited cellular or satellite connectivity.

What’s Different With Edge Computing

Now, Edge Computing addresses the issues that arise when scaling traditional IoT.  Edge computing also paves the way for more advanced processing and autonomy at the edge. At the edge we utilize more powerful application processors. These processors are capable of running Linux and feature hardware accelerators or DSPs programmed to accelerate specific algorithms. See products such as the phyCORE-AM57x and phyCORE-i.MX8 for good examples of this. Edge nodes are loaded with complex tasks that require image, voice, or video processing. Edge nodes run advanced models typically, in the past, run only on servers or power-hungry processing architectures. This increased amount of processing power at the edge results in many improvements and results in a much more autonomous and intelligent remote system.

Remote systems utilizing Edge Computing and technologies such as Amazon’s Greengrass can benefit from real-time decision-making ability. This is achievable because the Edge hardware is responsible for the processing and does not, necessarily, require a cloud server for processing data and acting. In resource constrained IoT devices there is not enough processing power to run image inference patterns, threat detection using video, classification, etc.

With Edge Computing there is no requirement for a 100% up-time link to server or data-center. The edge device can run their models and programs and duties without requiring external processing and oversight. This results in a much more reliable system. This system can be used in safety or mission critical applications where connection to the internet may be severed.

There are potential savings on bandwidth usage and billing costs. Cost savings could be realized in remote systems using cellular or satellite communications.

Cue PHYTEC’s phyKARL Machine Learning robot arm demo

A little backstory…

A PHYTEC developer had purchased a basic 6-axis robot arm off the internet. It was cheap and the intent of its purchase was to verify our new Raspberry Pi HAT expansion board for our phyBOARD-i.MX 7 development kit. We had some fun with it and named it phyKARL.

As inexpensive as the robotic arm was, we saw some practical applications of it when we applied Amazon’s Greengrass technology and Aphttp://47.98.207.101acheMXnet to the phyBOARD-i.MX 7.
The demo includes a PHYTEC phyBOARD-i.MX 7 Single Board Computer. This SBC features a phyCORE-i.MX 7 System on Module as the central processing module. A basic 6-axis robotic arm, a small MIPI CSI-2 camera, and a basic motor controller are also included.

The phyCORE-i.MX 7 System on Module is running Linux and an OpenEmbedded distribution that has been built with Yocto. Greengrass and other dependencies for ApacheMXnet are built into the image and PHYTEC has pre-loaded its Greengrass certificates onto the file system. Once the system has booted it connects to the internet via ethernet and the device can then be managed via the Amazon AWS IoT console.

PHYTEC created a custom classification Lambda Function that utilizes the camera, ApacheMXnet, ImageNet, and Python libraries for controlling the robot arm. The Lambda function monitors an area in front of the camera and will detect an object when placed in front of the camera. The function then determines if the item is a lime or lemon and then places the item into the appropriate container. This Lambda function can be updated, improved upon, and pushed out to any Greengrass Core device in the users AWS IoT console and Greengrass groupings.

Check out the code here

The intent of the demonstration is to show Amazon’s Greengrass and Machine Learning frameworks being utilized on low-power and low-cost edge devices. These edge devices perform autonomous tasks without relying on cloud-based computation to make decisions, which lowers latency. Decisions are made in real-time at the edge. In addition, these ‘programs’ at the edge can be updated with smarter models using the Amazon AWS IoT Console. Combining this update mechanism with new technologies such as Amazon SageMaker allows edge-based decision making while allowing for simple updating of improved algorithms; the devices on the edge are no longer isolated hardware systems. These edge systems can now be software defined and can be updated with ever evolving models and research.

This basic flowchart helps visualize the process

 

PHYTEC and Edge Computing

PHYTEC has been involved with designing and manufacturing IoT hardware since the beginning. It makes sense for PHYTEC to continue to design and develop hardware that, now, targets Edge Computing. Many of PHTYEC’s products are well suited for Edge Computing. PHYTEC hardware is designed with energy efficiency and performance in mind. Check out PHYTEC’s System on Modules, Single Board Computers, and Development Kits or contact us to talk about your project.

In addition to offering high-quality hardware, PHYTEC also develops and integrates software abstraction layers into our Board Support Packages that enable the support of various cloud-based Edge Computing technologies. PHTYEC feels that it is important to offer practical solutions that include integrated hardware, software, and cloud-based technologies. Learn more about our design services here.

Check out our Greengrass enabled development kits