Speed-to-market can make or break a deal. As a result, machine builders are constantly reviewing their development cycle in an effort to outpace their competitors. To deliver a high performing machine quickly, design engineers need to bring more factors under their control. This whitepaper outlines how MapleSim, from Maplesoft, can be used in combination with Rockwell Automation's Studio 5000 to speed up the development and commissioning of a new machine. More specifically, the virtual models built in MapleSim allow controller testing and physical build/design to happen in parallel — streamlining the development cycle and allowing earlier detection of design weaknesses. Once the machine is built, these models can be used to provide compelling enhancements to the functionality of the delivered machine.
The traditional commissioning approach can take around 25% of a machine design project, and 60% of the commissioning phase is spent testing code [1]. In this approach, physical prototypes must be designed and built before an engineer can test the controller. This leaves the control engineers at the end of an already tight (often overtime) development schedule. Should any issues be found with the controllability of the machine (resulting from physical design weaknesses / motor sizing deficiencies / etc.), the time they have to build and tune the control code is even further reduced. The use of virtual models works to solve this dilemma in two major ways.
First, having a virtual model of the system allows the control code to be tested before any physical prototype needs to be built. This essentially allows the development of the control code to be done in parallel with the design and/or prototyping of the machine. Yes, the control engineer will still be the last touch in the commissioning of the machine, but using a virtual model allows them to start much earlier. This process is often referred to as Virtual Commissioning — testing the controller against a virtual (rather than physical) machine.
The second major advantage of this approach is that it allows weaknesses in the design to be detected much earlier in the development cycle — when they are much less costly to fix. Are the transient torques much higher than expected? Is the machine too sensitive to an axis movement? These kinds of questions can be investigated and resolved prior to any metal being cut for the initial prototype. You can fill your own costing numbers in for the graph in Figure 1, but the general pattern holds — the later a design change comes, the more expensive it is. Designing and building your model virtually is often referred to as Virtual Prototyping.
Figure 1 shows the typical machine design process including prototyping. As you progress along this typical process, it gets more and more expensive to make changes to a design. Once a product is sent to market, correcting a mistake or making a change might require a costly shutdown or even a recall (with the ensuing damage to reputation or even legal repercussions).
Virtual Commissioning makes use of a digital system model to take the place of physical commissioning during the machine design process. Instead of involving a machine in production, simulated commissioning using a digital twin is performed. A digital twin is just a virtual representation of a corresponding physical product created with MapleSim, a virtual environment for modeling multi-domain systems. A MapleSim digital twin is built from physics-based models (to distinguish from data-driven digital twins that make use of game engines, machine learning and AI). Using a MapleSim digital twin, the design engineers don't need a working prototype to start automation testing.
In a typical process, the majority of design problems and code errors are discovered during the commissioning phase when the product elements are assembled for the first time — such as attaching the controller code to the physical system and installing the prototype into the production environment. At that stage a misstep in a critical component — such as an under-sized motor or a surprise response from a controller to a specific input — interrupts the deployment process and demands additional design work followed by further testing and analysis. In extreme cases the machine responses may be outside the machine tolerances and could cause harm to a machine or worker. In order to avoid these kinds of costly problems down the line, a machine is frequently over-engineered, which has the potential to significantly impact profits.
With a virtual commissioning process, the majority of these problems are still discovered during the commissioning phase, but the bulk of this commissioning phase is completed virtually. Over engineering, as a result, is minimized and the cost to repair, retrofit or rebuild is less [see Figure 2].
These techniques have been going on in aerospace and automotive for a long time, where prototypes can involve multimillion-dollar developments and research in these industries validates the benefits of virtual commissioning. An investment of 5-10% of a project budget upfront at the design and development stage could correlate to a savings of as much as 50-100% on overall project overrun costs by dealing with issues before physical commissioning has taken place [2].
As early as the conceptual development phase, engineers can use digital twins to test what-if scenarios with ease and explore trade-offs by simply changing design parameters and seeing results in minutes. Before the first build, engineers could, for example, use system models to predict the steady-state and transient loads that the actuators will face during their duty cycles. Further, these loads can be exported from MapleSim and sent directly to Rockwell Automation's Motion Analyzer, ensuring that the selected motors are a good fit for the task at hand.
The same model can also be used to diagnose how the machine and PLC code will behave during changes in the environment parameters. These could be physical requirement (e.g. when a platen is replaced with a different size or surface finish, or there is a rise in operating temperature) or economic (e.g. an increase in machine throughput). Techniques including parameter sweeps, dynamic load analysis, or vibration analysis could then be used to aid control engineers in refining and optimizing the controller code, and/or aid design engineers in making optimizations to the overall machine design.
The types of virtual models used in the analysis and commissioning phase can provide benefits beyond the build of a new machine. Machine designers are looking for competitive features that can be added to their machines, such as having a virtual model run in parallel with the actual machine to provide virtual sensors, or warn of performance degradation.
For machines that are already in the field, these models can provide critical diagnostic tools, allowing engineers to experiment with controller updates before stopping a line and working on the actual machine. This reduces the line downtime, and increases the confidence the engineer has that their proposed changes will yield the desired effect.
MapleSim is equipped to create the digital twin in a straightforward manner. The software allows the design engineer to start with a previous 3D CAD drawing, or to simply pull from MapleSim's built-in library of multidomain components (multibody, pneumatic, hydraulic, electrical, etc.). These components are connected together to construct the overall system. Figure 2 shows a simplified mechanical system driven by a hydraulic circuit in MapleSim.
Once the digital model is defined, it can be exported into the Rockwell Automation Simulation Interface through the FMI connections supported by MapleSim. At this point the virtual model is ready to be linked to the virtual PLC.
The linking itself takes place via tags defined in the PLC code. Figure 3 gives you a sense of the mapping between the inputs/outputs of the subsystem exported by MapleSim and Figure 4 shows the tags defined in Logix Designer. Simulation Interface provides a means of directly connecting these tags, so that at each clock tic, the tags in Logix Emulate are read/updated with the values from the virtual model (and vice-versa). Once the linking is mapped, the PLC code can now be run against the virtual model.
If MapleSim Insight is also available on the target machine, a visualization of the model will appear while the simulation is in progress. This allows the control engineer to "see" what the machine is doing in response to the control code — visually "debugging" the response in real-time. In this way MapleSim supports the automation testing in Studio 5000 on a production-ready virtual system, before you ever hook it up to a physical prototype or download that PLC code to a physical PLC.
Whether starting a new design or looking to improve something already in the field, there are many compelling reasons to take advantage of virtual models. MapleSim provides a flexible environment for creating models that accurately reflect the dynamics of a machine. These models can be used to refine the design, size the motors, and understand the critical sensitivities that may arise in production. When combined with tools from Rockwell Automation, these models can be used to test controller code prior to building a physical prototype — allowing users to test how the machine reacts to the current control algorithms in a safe environment. Whether using the models for Virtual Prototyping, Virtual Commissioning, or for including new value-added features in the final machine, using virtual models in your design process can save you time and help you build a better product.
References
[1] G. Reinhart and G. Wünsch, "Economic application of virtual commissioning to mechatronics," Production Engineering, vol. 1, no. 4, pp. 371-379, 2007 https://doi.org/10.1007/s11740-007-0066-0.
[2] Adapted from: Forsberg, Kevin, Hal Mooz and Howard Cotterman. Visualizing Project Management. John Wiley & Sons, Hoboken, NJ 2005.
[3] A. Svantesson, M. Hochwallner, P Brolin, “Investigation of Virtual Commissioning for a Small Enterpriseâ€, (Unpublished Masters Thesis), Linkoping University, Sweden, 2020