Customizing Production(SPLM) Metric for Solar Sites


Metrics are important standards to measure asset performance, and key data that asset monitoring applications and BI analysis applications need to use. However, applications need to use and display a large number of metrics, which vary with user scenarios.


Using EnOS Common Data Service, you can customize expressions based on the existing source metrics to quickly register business metrics. When querying business metrics, Common Data Service directly returns the metric value calculated based on the expressions, so as to realize the flexible change and efficient application of metrics.

Scenario


In the energy industry, the Production metric is one of the most commonly used metrics for solar sites. Comparing the production of solar sites on a monthly basis can help you quickly understand the monthly changes in the performance of solar assets, and predict and optimize their future performance according to the monthly change trend.


This tutorial customizes the Production(SPLM) metric of solar sites based on the Production metric provided by EnOS Solar Monitoring & Control API.



Tutorial Objectives


In this tutorial, you will learn how to register a business metric by configuring an expression based on the source metric.



Prerequisites


  • EnOS Solar Monitoring & Control API that provides the Production metric needs to be deployed in the current environment and registered in Common Data Service as required. If not, contact the system administrator for service deployment and API registration details.
  • Common Data Service needs to be obtained, authorized, and enabled in the current OU.
  • You need to be assigned the required asset permission and operation permission, and a menu group containing the Source Metrics and Metrics menus. If not assigned, contact the application administrator.
  • You need to learn about the concepts related to metrics.



Tutorial Units

Step 1: Analyzing Metric Requirements


Follow the steps below to analyze and evaluate the requirement for the target metric Production(SPLM).


../_images/CDS-Tutorial-Analyze.png


  1. Check whether the target metric exists in the business metric library. This tutorial assumes the target metric does not exist.
  2. Decide whether the target metric can be obtained by configuring expression based on the existing source metric. This tutorial assumes the target metric can be obtained by expression and decides the following items:
    • This target metric is obtained after time domain conversion based on the source metric, that is, a comparative metric.
    • This target metric can be reused in many scenarios and thus should be registered as a public metric.
  3. Locate the source metric information corresponding to the target metric in the source metric library:
    • Filed Key: ActiveProduction.
    • Field Name: Production.
    • API Key: SolarAPI.

Step 2: Registering Business Metrics


  1. Log in to EnOS Application Portal and select Common Data Service from the application list.

  2. Select Business Object Elements > Biz Metrics from the left navigation pane.

  3. Select the Public Metrics tab and click Import.

  4. Click Download in the pop-up window and choose Excel.

  5. Fill in the template file with the following information. Fields not mentioned in the table can be left blank.


    Field Name Identifier Configuration
    Metric Key metricKey ActiveProductionSPLM
    Metric English Name metricNameEn ActiveProduction(SPLM)
    Metric Chinese Name metricNameZh 发电量(上月同期)
    Object Type Identifier mdmType EnOS_Solar_Site
    Object Type Name mdmTypeName Solar Site
    Interval interval D,W,M,Q,Y,T
    Is Calculated isCalculated Y
    Expression expression #{Metric[‘SolarAPI@@SPLM@@ActiveProduction’]}
    Data Type dataType Double


    In this tutorial, you can also download the filled template file virtual_metrics.xlsx.

  6. Click Upload in the pop-up window. Select the filled template file and click OK.


For more information, see Comparative Metric Configuration Rules.

Step 3: Querying Metric Data


Use the following Common Data Service APIs to query the registered metric data:

  • Historical Metric Data:

    https://{api-gateway}/cds-metric-service/v1.0/metric
    
  • Real-time Metric Data:

    https://{api-gateway}/cds-realtime-service/v1.0/metric/latest
    


For how to query data using Common Data Service API, see Query Historical Metric and Query Latest Metric.