AWS Partner Network (APN) Blog

Automated Cloud-to-Edge Deployment of Industrial AI Models with Siemens Industrial Edge

By Johann Bruckner, Sr. IT Systems Engineer – Siemens AG
By Johannes Kupser, Chief Product Owner – Siemens AG
By Yvonne Quacken, Bruno Quintas, and Helge Aufderheide, Solutions Architects – AWS

Siemens-AWS-Partners-2023
Siemens
Siemens-APN-Blog-Connect-1

Data is transforming the manufacturing industry with use cases that reach from real-time performance monitoring of machines and equipment to optimized planning of workforces, tasks, and production configurations.

Many of these use cases use artificial intelligence (AI) technologies to turn the increasing volume of data into insights that drive value for factories. The main challenges to scale industrial AI use cases within factories are standardization on the used tooling and services, proper operational concepts, and answers to IT security requirements.

Much of the development of data processing and machine learning (ML) takes place on cloud; using services like Amazon SageMaker, for example. This provides developers with flexible access to tools, large datasets, and training hardware that allows for rapid development cycles.

In contrast to AI development, ML inference often needs to take place on the edge—the operational technology (OT) system of the shopfloor where the data is generated.

This need arises, for instance, when transferring increasing data volumes produced on the shopfloor is not economically viable, or when low latency between producing data, processing it, and taking action is required. Hence, one OT staff needs to deploy models produced in the cloud to these edge systems.

Due to the sensitive nature of OT systems, a cloud-to-edge deployment can become a challenge:

  • Specialized hardware devices are required, strict network protection is applied, and security policies are in place.
  • Data can only be pulled by an intermediate factory IT system from where it can be deployed to the OT systems through highly controlled processes.

Consequently, using ML on the edge with frequent model retraining to account for changing shopfloor parameters requires structured, secure, and automated deployment mechanisms from cloud to edge.

Siemens Digital Industries, an AWS Partner and AWS Marketplace Seller, is a leading provider of product lifecycle management (PLM) and manufacturing operations management software.

As a global leader in industrial automation, Siemens offers Industrial Edge hardware devices and a comprehensive portfolio of software and services in an open ecosystem approach, including AI capabilities. Customers can browse, select, purchase, and deploy the portfolio elements they need via the Siemens Industrial Edge Marketplace. This helps customers to find the best-fitting solution for their individual shopfloor digitalization use cases.

In this post, we demonstrate how using a combination of AWS services and Siemens Industrial Edge enables customers to easily and securely deploy models developed on Amazon Web Services (AWS) to the edge. We will also demonstrate how services like AWS IoT Core and AWS Step Functions can be used to orchestrate the packaging and provisioning and deployment using Siemens Industrial Edge capabilities.

Solution Architecture

The approach described here allows data scientists and ML engineers flexibility in their model development on the cloud, while OT managers can keep control of the deployment process.

The following solution describes the “pull” deployment mechanism by using AWS services and Siemens Industrial AI software portfolio.

Siemens-Industrial-Edge-ML-1.1

Figure 1 – Architecture overview.

As illustrated in Figure 1, the deployment process is enabled by three main components, the first of which is the Siemens AI Software Development Kit (AI SDK). After a model is created by a data scientist on Amazon SageMaker and stored in the SageMaker model registry, this SDK allows users to package a model in a format suitable for edge deployment using Siemens Industrial Edge.

The second component, and the central connection between cloud and edge, is the Siemens AI Model Manager (AI MM) running on factory level (see “Factory IT Network” in Figure 1). This system is part of the intermediate IT system and acts as the deployment tool for models to one or multiple virtual or physical Siemens Industrial Edge Devices (IED), and provides a secure communication interface to external services. In addition, the AI Model Monitor acts as a collector for inference feedback and logs.

The third component is the Siemens AI Inference Server (AIIS), a specialized and hardened AI runtime environment running as a container on Siemens IEDs deployed on the shopfloor (see “Factory OT Network” in Figure 1). The AIIS receives the packaged model from AI MM and is responsible to load and execute pipelines close to the production lines.

The deployment from cloud to edge requires coordination between the cloud and the AI Model Manager. To achieve this, functions on AWS and AI MM are subscribed securely to a message broker running on AWS IoT Core and publish MQTT messages to dedicated topics.

Cloud-to-Edge Deployment Process

Figure 2 details the solution architecture, processes, and steps that a model undergoes from creation in the cloud until a deployment is completed on the edge. The processes use AWS Step Functions to orchestrate the packaging and deployment performed using the Siemens Industrial Edge Model Manager.

Siemens-Industrial-Edge-ML-2

Figure 2 – Detailed edge model creation.

The deployment follows the main steps as outlined in Figure 2:

  1. Developer creates a model using Amazon SageMaker, and using SageMaker Pipelines this model is stored to the SageMaker Model Registry. Specifically, the registry is a catalog helping to organize existing models for use in different inference environments.
  2. Developer starts an AWS Step Function or SageMaker Pipeline to perform packaging of the model. For this, AWS Lambda functions use the AI SDK to package the code and environment dependencies (such as Python libraries) into a compressed format compatible with the Industrial Edge AIIS runtime. After testing the package, it’s persisted on Amazon Simple Storage Service (Amazon S3).
  3. After the AI model package has been created and stored in S3, the deployment to the edge is orchestrated on the cloud side by another Step Function. As part of the Step Function workflow, a Lambda function sends an MQTT message to AWS IoT Core to inform the AI Model Manager that a new AI model package is available (“Trigger New Delivery”).  As a response, the AI MM publishes when it’s ready to onboard the model.
  4. In response to the AI MM readiness message, another Lambda function generates a pre-signed URL providing temporary read access to the model package on S3 generated in Step 2. Afterwards, the Lambda function publishes the URL, S3 key, and metadata to the AWS IoT Core topic subscribed by the AI MM. By using the pre-signed S3 URL, AI MM is able to “pull” the AI model package from S3. During this downloading process, AI MM continuously sends status updates via AWS IoT Core whether the pull is successful or not. Based on this feedback, the Step Function can ensure the AI model package is now available in AI MM.
  5. Finally, the deployment of the AI model package follows the Siemens Industrial standard practices using the Model Manager user interface (UI).

The process above meets the needs for a standardized cloud-to-edge deployment. The structured process and communication enables observability and setting up strict security measures. In addition, the interaction of AI MM and AIIS deployed on Industrial Edge Devices ensures a pull deployment, initiated from operational technology.

Conclusion

In this post, we walked through how data scientists or machine learning engineers can train and deploy their AI models from AWS to Siemens Industrial Edge in an automated and secure way by using the Siemens Industrial AI software portfolio.

With this end-to-end architecture in place, automation engineering can take over the AI solution. The Siemens Industrial AI applications are designed to be user friendly, allowing automation engineers with no prior data science experience to easily deploy, run, and monitor your AI solutions.

To get started deploying your AI models from AWS to Siemens Industrial Edge, visit the Siemens Industrial AI getting started portal, or check out the open-source code available for building on Siemens Industrial Edge on GitHub.

Learn more about Siemens Industrial Edge from the official documentation, get support from the community forums, or obtain additional Siemens Digital Industries products in AWS Marketplace.

.
Siemens-APN-Blog-Connect-2023
.


Siemens Digital Industries – AWS Partner Spotlight

Siemens Digital Industries is an AWS Partner and innovation leader in automation and digitalization. Closely collaborating with partners and customers, DI drives digital transformation in the process and discrete industries

Contact Siemens | Partner Overview | AWS Marketplace | Case Studies