The Virtual Sensor API is used to detect faults in a variable of importance. This could be for instance to detect overheating in electrical assets or to detect thermal anomalies in HVAC process.
It leverages supervised machine learning techniques to learn the relationship between the target variable, a set of heterogeneous available variables, and to identify drift between the predicted value of the target and its actual variable.
This API should be used when the target variable is supposed to have an underlying pattern and when measurements of the target variable are always available.
This document provides a general tutorial for users who want to consume the Virtual Sensor Fault Detection API.
The Virtual Sensor Fault Detection API includes 4 features:
Learn the model (the relationship between the input data and the target on which to detect faults). It requires data with measurement of the target. (createModel endpoint).
Detect fault by comparing the target variable value and its estimated value by the model. It requires the model ID of the corresponding model and the measured value of the target (applyModelAndDetectFaults endpoint).
Update an existing model by feeding it with new data (updateModel endpoint).
Get information on an existing model (getModelInformation endpoint).
Take the tour and experiment on your own data prior to any development through our hands-on application !
createModel endpoint creates a virtual sensor model. The created virtual sensor model uses information available from driver measurements and process parameters to model the relationship between the drivers and the target.
The principle of this service is the following:
- Historical training data depicting how a system works is available.
- A target variable, i.e., data of special importance for which we want to build a virtual sensor model, is known.
- Some pattern in the data is suspected, i.e. some relationship between some of the available data and the target can be observed.
- This pattern can be used to create a virtual sensor model to generate predictions.
The model can be later on applied to predict the target. Comparing the real measurements to the predicted target, we can identify drift from normal behavior.
applyModelAndDetectFaults endpoint applies the model over test data containing the target variable, and uses the result as a reference to detect anomalies in the input signal.
updateModel endpoint updates the model created with the createModel service. The input data should be the same variables as the ones used to create the initial model.
This service returns information on an existing prediction model that is securely stored on the Schneider-Electric platform.
Amount of calls to the API in the SANDBOX are limited.
To get a full experience and extend the thresholds, please subscribe to the API and use the production environment.
Run in Postman collection
First, you need to download the free Postman application for your operating system. Postman currently supports Mac, Windows, and Linux. Once you have Postman installed, you can import the Forecasting API Postman collection by clicking the orange “Run in Postman” button. At this point, you should see the Forecasting API folder in the left-hand column under the Collections tab.
Step 1: Setup environment
Step 2: Prepare Data Step 3: Create a new energy model Step 4: Train model Step 5: Apply an existing forecasting model to new data Step 6: Get model information on an existing prediction model
This API uses API keys to authenticate and allow access to the API.
Your API keys carry many privileges, so be sure to keep them secure!
The API key should be included in all API requests in the Authorization header that looks like the following:
| Authorization: your_subscription_key
For steps on how to generate your_subscription_key please refer to the Features tab.
We follow the error response format proposed in RFC 7807also known as Problem Details for HTTP APIs. As with our normal API responses, your client must be prepared to gracefully handle additional members of the response.
|HTTP Status Code||Error Reason|
|This is the generic error type for not being able to process the request, and will generally contain an explanation in the message.
Other reasons could be:
Invalid Resource: The submitted POST body failed our input validation. This error may include an additional “errors” property, with a list of the validation issues.
Invalid Action: Returned when you try to access an action on a resource that doesn’t support that action.
JSON Parse Exception: The JSON sent in the request body is not valid JSON.
|Your request did not include an API key.This error suggests that your API key was missing from your request, or that something was formatted or named improperly in your header.
Other reason could be:
APIKeyInvalid: Your API key may be invalid, or you've attempted to access the wrong data center. Check that your API key was input correctly, and verify which data center to access.
|You are not permitted to access this resource. This is a generic error.
Other reasons could be:
UserDisabled: This account has been disabled.
WrongDatacenter: The API key provided is linked to a different data center. This error suggests that you tried to contact the wrong data center. It's often associated with misconfigured libraries.
|The requested resource could not be found. This error tells you a specific resource doesn't exist. It's possible that the resource has been moved or deleted, or that there's a typo in your request.|
|The requested method and resource are not compatible. See the Allow header for this resource's available methods. This error means that the requested resource does not support the HTTP method you used. Find out which methods are allowed for each resource in the API Reference.|
|The sub-resource requested is nested too deeply. This uncommon error appears if you've tried to generate a URL with too many resources.|
|This error lets you know you've tried to override an incompatible method. You can only use the X-HTTP-Method-Override header with the POST method.
Other reasons could be:
RequestedFieldsInvalid: The fields requested from this resource are invalid.This error suggests there is a typo in your field request or some other type of syntax error or problem that invalidates your request.
|You have exceeded the limit of 10 simultaneous connections. When you reach the connection limit, we'll throttle the server response. If any of your requests time out after you've reached the limit, those requests could still be considered open and continue to slow your connection.|
|An unexpected internal error has occurred. This error lets you know RP-C has experienced a problem.|
|This method has been disabled.|
Contact the SE Exchange support team at firstname.lastname@example.org and include:
- Endpoint URL
- Any additional information like Screenshots , Postman collections.