Virtual Commissioning Using the B&R MapleSim Connector - Maplesoft

Virtual Commissioning Using the B&R MapleSim Connector


The manufacturing and automation industry has seen rapid technological growth in recent years. In what is typically referred to as Industry 4.0, products are expected to be more precise and functional than ever - all while being connected to industrial information networks that allow for remote monitoring and control. For manufacturers, bringing these technologies to market poses new challenges, and requires rethinking of traditional design practices. For those involved in machine prototyping and machine software development, the new technique of virtual commissioning promises to reduce the significant delays and costs associated with the difficult task of system integration and commissioning. While previously only possible by a few niche experts, powerful modeling tools and compatible information standards have now made this technique accessible to all machine developers.

Virtual Commissioning

The automation industry has long acknowledged the potential benefits of using virtual models to simulate the performance of physical systems, where integration issues could be spotted before entering into the expensive process of physical integration. Virtual commissioning has been developed as a process to help solve a variety of problems that can arise when manufacturing systems are brought together for integration and operation with a programmable logic controller (PLC). To be successful, the virtual plant model must be an accurate representation of the system, and these models were historically very difficult to create for a typical automation company.

Virtual commissioning, as a concept, was envisioned almost 20 years ago as a promising technique to assist machine development (Auinger et al. 1999). At the time, the hardware capabilities were insufficient to perform meaningful PLC testing at an acceptable cost, especially with the real-time simulation requirements when using hardware PLCs. But technology does not sit still and as far back as 2006, it was demonstrated that virtual commissioning techniques stood to save up to 75% of the time required for traditional commissioning (Zäh et al. 2006).

Today, new technologies and software integrations are further reducing the historical barriers associated with virtual commissioning. There are tools that can help with everything from sequencing the workflow of an entire assembly line, to testing the control algorithm managing a specific machine's motion and fault handling. These latter cases typically require a higher fidelity digital model - one that includes a machine's actual dynamics and can simulate how it moves in response to motor forces and torques.

It's precisely these higher fidelity use cases that the new B&R MapleSim Connector, released by B&R Industrial Automation, benefits. By linking the system-level modeling environment (MapleSim) and the automation design environment (B&R Automation Studio), designers can create their digital models and test their PLC code within the same workflow. This provides valuable feedback during the design phase, where changes are easier and less expensive to implement.

Video: The B&R MapleSim Connector. | Learn more about MapleSim

Virtual Commissioning Requirements

Virtual commissioning of a machine's dynamics generally combines three important pieces: a digital model (sometimes referred to as a digital twin), the controller code that governs the motion and response to sensor feedback, and development environment that allows the two to be run together.

MapleSim and B&R Automation Studio
Figure 1: With tools like MapleSim and B&R Automation Studio, virtual models can connect with virtual control code, PLC hardware, and even the physical product itself.

1. Digital Twins: Physics-Based System Models

The digital model is a virtual representation of a corresponding physical product. It can be used to simulate, predict and analyze machine performance. These models can range widely in their purpose and fidelity, but they serve as a powerful connection to the product for diagnostics, design changes, and virtual commissioning. Companies are using digital twins across industries, allowing them to optimize their products in ways that were previously impossible.

The Digital Twin, physics-based model in MapleSim.
Figure 2: The Digital Twin, physics-based model in MapleSim.

For clarification, digital twins can also refer to predictive models that are created after a physical product is in operation. In these cases, data logged from sensors on the product are combined with machine learning algorithms to create a representative model of the machine. Although beneficial, these models cannot be used in the virtual commissioning workflow as they require the machine to already be constructed and commissioned (to obtain the data) before they can be used.

In contrast, by using a system-level modeling tool like MapleSim, the creation of a model-driven digital twin can begin alongside the design process. Meaningful digital twins can be created before a physical product is finalized, allowing for a powerful test platform to validate product performance earlier than ever, for important tasks such as sizing servo drives, motors, and gearboxes, as well as validating the mechanism design.

2. PLC Design

The second key piece of the virtual commissioning workflow is the machine software. The performance of an automated machine is critically dependent on the nature of its control strategy. In operation, the physical machine is controlled by a PLC, which contains all of the necessary information to guide motion, respond to environmental feedback, and ensure that the machine functions properly in all situations.

 The design of a control strategy for an industrial machine
Figure 3: The design of a control strategy for an industrial machine often poses significant challenges when testing against the physical machine during the commissioning phase.

The design of machine code is often implemented in automation software, where users create control code on a virtual PLC. The control code is then deployed onto a physical PLC, and is connected to physical prototypes to test overall performance in the standard machine commissioning phase. This phase of design poses a large amount of uncertainty and risk, and issues found here can trigger rework, development delays, or machine damage. For these reasons, virtual commissioning can serve as an intermediate process to help identify issues before they're found during physical machine testing. Furthermore, software implementation and tuning of control parameters can be performed in the office, avoiding expensive on-site commissioning. This thereby allows for improvements in software quality and reduces the time for implementation.

The B&R MapleSim Connector
Figure 4: The B&R MapleSim Connector provides integration between digital twins created in MapleSim and the control software created in B&R Automation Studio.

3. The B&R MapleSim Connector

The final piece required for virtual commissioning is an environment, or workflow, that allows the machine software to be run against the digital twin. Historically, integrating system-level modeling and PLC design was challenging, if not impossible. The complex physics of a given digital model were typically simulated using a platform that operated differently than the logic-based systems of PLC design. In 2010, the Functional Mock-up Interface (FMI) was developed as a standard interface for a variety of model-based processes. The FMI standard is a collection of all the necessary information of a given model, organized in a way that allows for import and export with a variety of software tools.

The B&R MapleSim Connector is a tool that has taken the integration one step further, by providing a simplified workflow that connects digital twins with PLC design. Digital twins created in MapleSim can be exported as a Function Mock-up Unit (FMU) and used within B&R Automation Studio as a simulation-based test platform. All simulation information, including CAD data, is available within B&R Automation Studio, allowing control parameters to be analyzed and modified in real-time. This tool gives machine designers a new way to simulate, visualize, and validate their control strategy using a highly accurate model of their physical machine. With the included visualization, one can see directly how the machine behaves without first having to analyze complex traces or charts. This visualization allows for a better understanding of the system behavior and helps make the control development faster and easier.

Using the B&R Connector for MapleSim

To provide details on the virtual commissioning process, a demonstration workflow is presented below. In this example, the B&R MapleSim Connector is used to integrate a digital twin crane model with control testing in B&R Automation Studio. The crane model is created in MapleSim using CAD information and physics-based building blocks to describe the model dynamics. The model is then exported from MapleSim, and imported into B&R Automation Studio for control testing.

Creating the Crane Model

First, CAD data of the crane is imported. MapleSim supports a large variety of CAD formats from most major CAD platforms.

A subassembly of the imported CAD data.
Figure 5: A subassembly of the imported CAD data.

During the import process you can add coordinate systems to the different CAD parts. After import, you can use the new CAD parts as MapleSim components and add other components to model the system dynamics. For example, two parts can be connected with a revolute or prismatic joint, and the two connection points at which the joint is fixed are defined by these coordinate systems.

By adding the various physical components to the original CAD parts, a complete physical system with moving parts can be created.

A part of the MapleSim model showing the combination of different physical parts.
Figure 6: A part of the MapleSim model showing the combination of different physical parts

Animation of the Crane

Next, the created model can be visualized in the 3-D Playback window and be tested to show its physical behavior.

The visualized results of the crane model.
Figure 7: The visualized results of the crane model.

In addition to the visualization, the complete forces/torque required to generate a given motion can be investigated - and with the SERVOSoft Data Generation App (which comes with the B&R Connector), this information can be directly exported.

B&R SERVOSoft Data Generation App.
Figure 8: B&R SERVOSoft Data Generation App.

FMU Export to B&R Automation Studio

At this point, when the model is verified for correct behavior, it can easily be exported with the B&R Automation Studio FMU Generation App. Only a few parameters are needed to provide necessary information for a correct implementation into B&R Automation Studio.

The B&R Automation Studio FMU Generation App.
Figure 9: The B&R Automation Studio FMU Generation App.

Using the Crane Model in B&R Automation Studio

The created FMU library can be imported into B&R Automation Studio and subsequently be connected and simulated with a B&R PLC.

The FMU object from MapleSim included in B&R Automation Studio.
Figure 10: The FMU object from MapleSim included in B&R Automation Studio.

Thus, in B&R Automation Studio the complete system can be verified, starting from the physical behavior of the machine down to the program controlling its working sequence.

Finally, the visualization of the system is done in the B&R Scene Viewer.

The B&R Scene Viewer showing the FMU of the physical system.
Figure 11: The B&R Scene Viewer showing the FMU of the physical system.

Beyond Virtual Commissioning

Virtual commissioning is a major technological development in the automation industry, and the use of a model-driven digital twin is central to the accuracy and success of this technique. However, in addition, there are a variety of other ways that a digital twin can improve the design and operation of a product.

Early in the design, the development of the digital twin itself can shed light on high level functional verification. In a tool like MapleSim, simulations can be run throughout the development of the digital twin, providing early insight into system behavior, and giving engineers early opportunities to perform fast, iterative design changes. For machine designers, these digital twins help with the sizing of servo drives, motors, and gearboxes, to name a few examples. Furthermore, you can easily test two different approaches against each other, such as a cam solution against a servo drive.

Once the digital twin is created, it can serve as a high fidelity representation of the physical system, captured with a full set of equations to simulate behavior. When considering functional requirements, the digital twin can be simulated to perform optimizations, minimizing potential over-engineering costs, and reducing the risks of component failures due to heat, torques, and so on.

Lastly, the digital twin can be used once the physical system is in operation. As part of a growing trend known as Industry 4.0, model-based techniques can be implemented throughout the operation of a product, providing levels of diagnostics, predictions, and information that previously were unattainable. With a sufficiently detailed digital twin, engineers can simulate them in line with the physical machine to detect deviations in performance, provide diagnostic information (allowing for predictive maintenance), and even make automatic control adjustments to compensate for real-time performance issues. The capability offered by a digital twin is a growing field of research and implementation, and is currently capable of offering most automation companies an invaluable diagnostics tool for product operation.

As requirements for machine automation have evolved, so too has the development platforms. With the B&R MapleSim Connector, digital twin technology can be properly integrated with control software development, making virtual commissioning a realistic technique for automation companies to adopt today. Virtual commissioning can help engineers find and fix issues before they become expensive, helping companies bring new automation products to market on time and on budget.

Video: Introducing the B&R MapleSim Connector. | Learn more about MapleSim


Auinger, F., Vorderwinkler, M. and Buchtela, G. 1999. "Interface driven domain-independent modeling architecture for 'soft-commissioning' and 'reality in the loop'", Proceedings of the 1999 Winter Simulation Conference, Phoenix, AZ, USA, 1, pp. 798-805.

Zäh, M. F., Wü nsch, G., Hensel, T. and Lindworsky, A., 2006. Nutzen der virtuellen Inbetriebnahme: Ein experiment - Use of virtual commissioning: An experiment, ZWF Zeitschrift fuer Wirtschaftlichen Fabrikbetrieb, 101, 10, pp. 595-599