Class SoftSensorExporter

java.lang.Object
neqsim.process.mpc.SoftSensorExporter
All Implemented Interfaces:
Serializable

public class SoftSensorExporter extends Object implements Serializable
Exports soft-sensor and estimator configurations for integration with external calculation engines.

This class provides export capabilities for soft-sensors (calculated values derived from thermodynamic models) that can be used by external control and optimization systems. Common soft-sensors include:

  • Composition estimators based on pressure, temperature, and flow measurements
  • Phase fraction calculators for multiphase systems
  • Energy balance estimators
  • Property calculations (density, viscosity, heat capacity)

The exports include input/output mappings, calculation parameters, and model coefficients that can be loaded into external calculation engines for real-time estimation.

Example usage:


// Create soft-sensor exporter
SoftSensorExporter exporter = new SoftSensorExporter(processSystem);

// Add soft-sensors
exporter.addDensitySensor("feed_density", "feed", "kg/m3");
exporter.addCompositionEstimator("methane_fraction", "separator", "methane");
exporter.addPhaseFractionSensor("gas_fraction", "separator");

// Export configuration
exporter.exportConfiguration("soft_sensors.json");

Since:
3.0
Version:
1.0
Author:
Even Solbraa
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • processSystem

      private final ProcessSystem processSystem
      The process system containing the equipment.
    • sensors

      List of soft-sensor definitions.
    • applicationName

      private String applicationName
      Application name for exports.
    • tagPrefix

      private String tagPrefix
      Tag prefix for OPC-style naming.
  • Constructor Details

    • SoftSensorExporter

      public SoftSensorExporter(ProcessSystem processSystem)
      Construct an exporter for a process system.
      Parameters:
      processSystem - the process system
  • Method Details

    • setTagPrefix

      public SoftSensorExporter setTagPrefix(String prefix)
      Set the tag prefix for variable naming.
      Parameters:
      prefix - the tag prefix
      Returns:
      this exporter for method chaining
    • setApplicationName

      public SoftSensorExporter setApplicationName(String name)
      Set the application name for exports.
      Parameters:
      name - the application name
      Returns:
      this exporter for method chaining
    • addDensitySensor

      public SoftSensorExporter addDensitySensor(String name, String equipmentName, String unit)
      Add a density soft-sensor.
      Parameters:
      name - sensor name
      equipmentName - equipment to monitor
      unit - output unit (kg/m3, lb/ft3, etc.)
      Returns:
      this exporter for method chaining
    • addViscositySensor

      public SoftSensorExporter addViscositySensor(String name, String equipmentName, String unit)
      Add a viscosity soft-sensor.
      Parameters:
      name - sensor name
      equipmentName - equipment to monitor
      unit - output unit (cP, Pa.s, etc.)
      Returns:
      this exporter for method chaining
    • addPhaseFractionSensor

      public SoftSensorExporter addPhaseFractionSensor(String name, String equipmentName)
      Add a phase fraction soft-sensor.
      Parameters:
      name - sensor name
      equipmentName - equipment to monitor
      Returns:
      this exporter for method chaining
    • addCompositionEstimator

      public SoftSensorExporter addCompositionEstimator(String name, String equipmentName, String componentName)
      Add a composition estimator soft-sensor.
      Parameters:
      name - sensor name
      equipmentName - equipment to monitor
      componentName - component to estimate
      Returns:
      this exporter for method chaining
    • addMolecularWeightSensor

      public SoftSensorExporter addMolecularWeightSensor(String name, String equipmentName)
      Add a molecular weight estimator soft-sensor.
      Parameters:
      name - sensor name
      equipmentName - equipment to monitor
      Returns:
      this exporter for method chaining
    • addCompressibilitySensor

      public SoftSensorExporter addCompressibilitySensor(String name, String equipmentName)
      Add a compressibility factor (Z) soft-sensor.
      Parameters:
      name - sensor name
      equipmentName - equipment to monitor
      Returns:
      this exporter for method chaining
    • addHeatCapacitySensor

      public SoftSensorExporter addHeatCapacitySensor(String name, String equipmentName, String unit)
      Add a heat capacity soft-sensor.
      Parameters:
      name - sensor name
      equipmentName - equipment to monitor
      unit - output unit (J/mol.K, kJ/kg.K, etc.)
      Returns:
      this exporter for method chaining
    • addCustomSensor

      public SoftSensorExporter.SoftSensorDefinition addCustomSensor(String name, String equipmentName, SoftSensorExporter.SensorType sensorType, String outputUnit)
      Add a custom soft-sensor with specified inputs and calculation type.
      Parameters:
      name - sensor name
      equipmentName - equipment to monitor
      sensorType - the type of sensor
      outputUnit - the output unit
      Returns:
      the created sensor definition for further configuration
    • exportConfiguration

      public void exportConfiguration(String filename) throws IOException
      Export all soft-sensor configurations to JSON.
      Parameters:
      filename - the output filename
      Throws:
      IOException - if writing fails
    • exportCVTFormat

      public void exportCVTFormat(String filename) throws IOException
      Export soft-sensor configurations as CVT (Calculated Value Table) format.

      CVT format is a tabular format commonly used by industrial control systems for defining calculated values and their update schedules.

      Parameters:
      filename - the output filename
      Throws:
      IOException - if writing fails
    • getSensors

      Get the list of defined soft-sensors.
      Returns:
      unmodifiable list of sensor definitions
    • clear

      public SoftSensorExporter clear()
      Clear all defined soft-sensors.
      Returns:
      this exporter for method chaining