Azure / opendigitaltwins-smartcities

DTDL based ontology for Smart Cities
MIT License
70 stars 28 forks source link

Digital Twins Definition Language (DTDL) ontology for Smart Cities

The concept of digital twins—a digital representation of real-world environment brought to life with real time data from sensors and other data sources—has entered the realm of smart cities and promises to enable city administrations and urban planners to make better decisions with the help of data integration and visualization from across the urban space. Last year, we announced general availability of [Azure Digital Twins](https://azure.microsoft.com/en-us/blog/azure-digital-twins-now-generally-available-create-iot-solutions-that-model-the-real-world/) platform which enables modeling and creating digital representations of connected environments like buildings, factories, farms, energy networks, railways, stadiums, and cities, then bring these entities to life with a live execution environment that integrates IoT and other data sources. Through our collaboration with [Open Agile Smart Cities (OASC)](https://oascities.org/) and [Sirus](https://sirus.be/) we are excited to make this open-source Smart Cities ontology for building Azure Digital Twins solutions available to the ecosystem. ### Why ontologies To drive openness and interoperability, Azure Digital Twins comes with an open modeling language, [Digital Twins Definition Language (DTDL)](https://github.com/Azure/opendigitaltwins-dtdl), which provides flexibility, ease of use, and integration into the rest of the Azure platform. Using DTDL, developers can describe twins in terms of the telemetry they emit, the properties they report or synchronize and the commands they respond to. Most importantly, DTDL also allows describing relationship between twins. Common representation of places, infrastructure, and assets will be paramount for interoperability and enabling data sharing between multiple domains. It’s our goal to partner with industry experts and provide [DTDL-based ontologies](https://docs.microsoft.com/en-us/azure/digital-twins/concepts-ontologies) which learn from, build on, and/or use industry standards, meet the needs of developers, and are adopted by the industry. The resulting open-source ontologies provide common ground for modeling connected environments, accelerate developers’ time to results, and enable interoperability between DTDL-based solutions from different solution providers.

Smart Cities ontology approach overview

We collaborated with Open Agile Smart Cities (OASC) and Sirus to provide DTDL-based onotlogy, starting with ETSI CIM NGSI-LD, and accelerate accelerate development of digital twins-based solutions for smart cities. In addition to ETSI NGSI-LD, we’ve also evaluated Saref4City, CityGML, ISO and others.

The ETSI CIM NGSI-LD specification defines an open framework for context information exchange named NGSI-LD which comes with an information model that defines the meaning of the most needed terms, and a domain-specific extension to model any information. The core meta-model provides a basis for representing property graphs using RDF/RDFS/OWL, and is formed of Entities, their Relationships, and their Properties with values, encoded in JSON-LD.

ETSI NGSI-LD to DTDL Information Model Mapping

The NGSI-LD core meta-model provides a formal basis for representing property graphs using RDF/RDFS/OWL. It represents Entities, their Relationships, and their Properties with values, encoded in JSON-LD.

The following table shows NGSI-LD core meta-model and mapping to DTDL.

NGSI-LD DTDL
Entity Interface
Relationship Relationship Component
Property Property Telemetry
N/A Command

ETSI NGSI-LD models for Smart Cities mapped in DTDL

In addition to the core meta-model, NGSI-LD compliant open models for aspects of smart cities have been defined by organizations and projects, including OASC, FIWARE, GSMA and the Synchronicity project. The NGSI-LD models for Smart Cites comprise models in the domains of Mobility, Environment, Waste, Parking, Building, Park, Port, etc.

The property graph nature of NGSI-LD made it quite straightforward to map it to DTDL, and with today’s release, we are making an initial set of DTDL models adapted from the NGSI-LD open models for Smart Cities available to the community.

DTDLontologyoverview

Some of the use cases that are increasingly relevant to cities given the availability of IoT devices and sensors are measuring their air quality in a neighborhood, understanding the noise level in a district, the crowd flow in a road segment, traffic flow in a road segment, monitoring on-street parking in parking spots, availability of EV-Charging, or monitoring streetlights and reducing energy consumption.

Extending for Spatial representation, City Administration and City Object

In addition to the ETSI NGSI-LD, we’ve also started adapting in DTDL the constructs of ETSI SAREF extension for Smart Cities (Saref4City) ontology for Topology to represent spatial objects, Administrative Area and City Object modeling. Using Saref4City ontology constructs represented in DTDL allowed us to model city objects like poles, their containment within an administrative area of a city, and linked to the smart models in the domain of mobility, environmental, parking adapted in DTDL from NGSI-LD models for Smart Cities described above.

Example on how to bring it all together

DTDLsmartcitiesontologyextended

How To Use

Using these models you can now build Azure Digital Twins based solution and bring it to life in a live execution environment.

You can use Azure Digital Twins Explorer to create a sample easily: upload models, instantiate entities in a twins graph, visualize the graph and run queries against the graph. See a sample instantiated from this Smart Cities ontology.

ADTExplorerexample

Contributing

This project welcomes contributions and suggestions. We've focused on an initial set of models and we welcome you to contribute to extend the initial set of use cases, as well as improve the exsisting models.

For improvements, please fork this repository, make your changes and send a pull request.

Pull requests will be evaluated based on the applicability for smart cities scenarios, quality of the proposed interface models, adherence to the modeling conventions used in the repo.

For issues or suggestions, file an issue.

Modeling guidelines

Before creating new entities, check if they exist already in the repo. You can look under each folder based on the use cases (e.g Environment, Mobility, etc.).

To learn how to adopt the ontology for your project, refer to How to use the ontology.

Syntax

Data Types

DTDL provides a full set of primitive data types, along with support for a variety of complex schemas.

Validation

Use the DTDL Validator tool to validate the model document to make sure the DTDL is valid.

Credits

The NGSI-LD data models in this repository have been adapted to DTDL from the open source Smart Data Models repository developed by FIWARE Foundation and TM Forum. For more information on the Smart Data Models please visit https://smartdatamodels.org.

Resources

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.