Fail-Safe Digital Twin

By Ralf Hoffmann, Senior Consulting Engineer, Phoenix Contact Electronics GmbH, Berlin, Germany

Configurable safety relays help prevent injuries and damage in factory automation systems by cutting off electrical power in response to data received from sensors. When a safety relay fails, the production line must be halted until the relay can be repaired or replaced, resulting in expensive downtime. Phoenix Contact Electronics engineers use ANSYS software to develop a digital twin of its safety relays that will integrate real-time sensor data with simulation results to predict failures in advance. The relay can then be replaced or repaired while the line is not operating.

Save PDF
safety relay

"Phoenix Contact Electronics engineers use ANSYS Twin Builder to create a digital twin to accurately predict the remaining life of each relay."

ANSYS Maxwell simulation
magnetic field simulation
ANSYS Maxwell simulation shows magnetic field at different armature positions.

The remaining lifetime of a safety relay can be predicted empirically based on physical measurements in a laboratory on a specially instrumented relay. But when operating in real applications, relays cannot be instrumented to that level, in part because they must be sealed to protect them from often harsh factory environments. Phoenix Contact Electronics engineers used a precursor version of ANSYS Twin Builder systems design software to integrate the limited measurements that can be performed on operating relays with reduced-order models (ROMs) of ANSYS multiphysics simulations to provide the data required for remaining lifetime predictions. Two different types of ROMs are integrated into the digital twin — ROMs that represent electromagnetic and mechanical behaviors of the relay and ROMs that are surrogate models for how input variability will affect result variability. The latter ROM, also known as a data-based ROM, was generated with ANSYS optiSLang’s metamodel of optimal prognosis (MOP) workflow to predict contact erosion and armature rotation angle before shutdown. Phoenix Contact Electronics has validated the digital twin on a special demonstrator relay and is now working to integrate the digital twin into relays used in real-world applications.


In service, each safety relay encounters a unique history of load and environmental conditions that have a major impact on its longevity. Estimates of relay lifetime are based on worst-case scenarios to minimize downtime, so most relays are replaced long before the end of their lifetime. Despite this, the relays that are subject to the most challenging loads and environmental conditions often fail for a number of reasons, the most common being contact abrasion.

predicting armature position

Metamodel of optimal prognosis predicts the armature position.


Redundant arrangements and other internal safety functions usually shut down or bypass the relay in the event of a failure. Nevertheless, a failure often makes it necessary to shut down the equipment controlled by the relay until the relay is fixed or replaced. Production lines controlled by relays often produce tens of thousands of dollars’ worth of product every hour, so even a short shutdown can be expensive. Until now there has been no practical way to predict an impeding failure in a safety relay so that it can be replaced before failure during a period when the equipment it protects is not scheduled to operate.

The mechanical characteristics of relays are typically measured in laboratories on open relays. However, in actual usage, relays are normally encapsulated to survive harsh operating conditions. This encapsulation prevents determination of important mechanical characteristics such as the armature rotation angle. This angle has a major impact on the magnetic flux density, which is an important element in the life calculation. Another parameter that cannot be measured on a sealed operating relay is the contact bouncing time: the amount of time that the contacts vibrate against each other when the relay closes before they settle into a stationary position. Contact bouncing has a major effect on the wear experienced by the contacts on each closure.


digital twin schematic

Schematic of the digital twin


Phoenix Contact Electronics engineers use ANSYS Twin Builder software to create a digital twin, which integrates simulation results with physical measurements from the relay (and other components) to accurately predict the remaining life of each relay. This will enable factories to operate relays over nearly their full lifetime while minimizing failures and downtime.

The mechanical operation of the relay is simulated with static and transient ANSYS Mechanical finite element models. These simulations determine the motion, operating forces and stress conditions of the springs, transmission elements and other mechanical components. Full system simulation models for the relevant physics require a considerable amount of time to solve, so these models are converted to ROMs that preserve nearly all the accuracy of the original simulation model while providing results in a fraction of the time. ANSYS Twin Builder transforms the transient model into a ROM by dividing the model into individual linear parts, connecting them with coupling elements and transforming the natural modes into space-state matrices.


Phoenix Contact engineers employ ANSYS Maxwell software to simulate the electromagnetic performance of the relay. Using co-simulation to couple the mechanical and electromagnetic models would have been computationally intensive, so engineers leveraged ANSYS Twin Builder to incorporate the torques and loads calculated by ANSYS Maxwell into a characteristic diagram to provide input to the mechanical simulation as a function of the rotation angle, stroke and electrical excitation, among other factors.

contact spring simulation

Static structural analysis of the contact spring


The effects of ambient temperature on internal temperatures in the relay are determined by analytical formulas in combination with empirical studies. These thermal correlations are incorporated into the digital twin using numerical blocks. Handbook formulas are employed to derive some electrical characteristics, such as the contact resistance, as a function of the mechanical state of the system. The firmware used in the relay is developed with ANSYS SCADE and incorporated into the digital twin as a functional mock-up unit (FMU).

Two important components of the relay lifetime forecast cannot currently be measured in the field directly or forecast by simulation: the status of contact erosion and the position of the armature rotation angle before shutdown. The contact erosion of the relays was measured under laboratory conditions for different load ranges, temperatures, operating voltages and installation types. Based on these measurements, an MOP was generated in ANSYS optiSLang to represent the contact lifetime as a function of relay operating parameters. From measurements of the magnetic field, the armature rotation angle can be identified. By scanning the whole range of possible orientations under laboratory conditions, an additional MOP was generated to predict the armature rotation angle in the digital twin based on sensor data of the magnetic field.


The contact bouncing time depends on the speed of the armature and spring, contact force, contact gap and excitation voltage. Physical measurements of the actual relay update the simulation model, which calculates the bouncing. The results of the simulation in turn update the MOP that predicts the remaining lifetime of the relay. The importance of bouncing is shown by a simulation for one set of operating parameters, where a bouncing time of 1.592 milliseconds yielded a remaining lifetime of 292 switches to failure. By reducing bouncing time to 0.826 milliseconds, the remaining lifetime was increased to 29,343 switches to failure.

At present, Phoenix Contact Electronics is operating the digital twin with a demonstrator relay via a quality data model (QDM) structured data interface. On demand, sensor readings such as temperature and voltage from the relay are transmitted to the digital twin and used to simulate the relay behavior. The simulation outputs along with measurement values are used as inputs to the MOP, which predicts the relay’s remaining life.

Phoenix Contact Electronics has developed a digital twin methodology with the ability to accurately predict the remaining life of the demonstrator relay. Engineers are now working on integrating digital twins into production relays that will eventually provide accurate estimates of their remaining lifetime. These digital twins will enable manufacturers to use relays for their full lifetime while preventing failures and resulting downtime.

This article was based on "Metamodels in a Cyber-Physical System," first published in RDO Journal, Issue 2, 2017.

click below to start a conversation with ANSYS

Contact Us
Contact Us