IoT Testing with Device Twins
Functionally correct digital twins could help automate end to end IoT Testing

IoT Testing with Device Twins

What is a Digital Twin?

In simple terms, a digital twin is like a virtual copy of a real-world object, design, or process that can be used for testing, monitoring, and analyzing its performance in a safe and controlled environment. The term Digital Twin might be new, but the concept of Digital Twin dates back to as old as Apollo 11 Program. The difference is that at that time, NASA had an actual physical twin of the spacecraft, i.e., the actual physical copy of the spaceship on earth reflecting the remote spaceship’s state.

What is a Device Twin?

Unlike a digital Twin, a Device Twin is a simulated representation of a physical object. The most significant difference between a device twin vs. a digital twin is that the device twin does not need any physical object to exist. It could be built by an entirely mathematical representation of the device. However, to be useful, a device twin must be connected to the software backend and should reflect the attributes of the simulated device.

Above is an example of a fully interactive washing machine model which could be loaded in your browser. The model interacts with user and connects with IoTIFY backend engine to publish it's status to the AWS IoT. It also received live updates from IoT Core and reflect the status in 3D.

Building test automation with Device Twins

While building test automation frameworks for end-to-end IoT systems, QA teams face a unique challenge. Dependency on the hardware means they will either need to test it manually or implement complex robotics to automate physical actuation. Reading values back from the actual devices is also quite challenging, as you will need a Computer Vision implementation to capture images and extract the readings. Even after implementation, this approach needs to be revised frequently with constant upgrades and maintenance.

An alternative approach is to augment firmware testing with a Device simulator. The simulator could act as an actual device by combining a 3D physics engine and interactive visualization with a functionally accurate device model. The most significant advantage of this approach is that end-to-end test automation can be achieved, as every component of the test chain is in the software.

The device twin simulation could then be used to automate testing for the digital twin solutions as well, as seen in the diagram below

No alt text provided for this image

The benefits of using a Device twin simulator for testing IoT applications are manifold

  1. Functional Validation:?Testing an IoT application with device twin implementation helps to identify and address any functional defects in the IoT implementation. E.g., in the case of a washing machine, if the door is opened while a wash program is running, it would identify a defect in the door latch mechanism, which needs to be serviced immediately.
  2. Digital Twin Performance:?A simulation could help identify any latency or resource limitation issue at the backend. This can help to improve the overall performance of the existing system or product.
  3. Reliability: How reliable is your fault detection logic out of 10,000 incidents? What is the mean time between failure for an IoT service component? Automated regression test suits could only determine answers to the questions above.
  4. Scalability:?A software architecture that works for 100s of devices may not scale to 1 Million. Since the device twins are purely software models, they could be easily scaled, answering some critical questions about scalability.
  5. Integration:?Access to a physical device is only possible due to cost or logistics reasons. In such cases, Device twins could be of great help.
  6. Compliance:?Testing with a device twin implementation can help to evaluate if the virtual model meets the standards and regulations for the industry and identify any potential issues or limitations.
  7. Continuous Improvement:?Testing a digital twin implementation can help to identify areas of improvement and continuously improve the overall performance, reliability, scalability, integration, and compliance of the existing system or product.

Conclusion: A device twin could augment the manual testing required for firmware and embedded systems. By scaling device twins in the cloud, organizations could quickly identify the performance, scalability, and functional bottlenecks in their cloud solutions. Building device twins could be challenging, as it needs a new framework for combing Physics with 3D models, Human Interaction, and network Connectivity such as MQTT, HTTP, Websocket, etc.

At IoTIFY, we would love to help you build a custom device simulator for your project needs. Please get in touch for a demo of our platform below.

要查看或添加评论,请登录

社区洞察

其他会员也浏览了