Skip to main content

Build a Gas Network Control System

The Gas Network Simulation Workbench simulates network conditions and equipment actions in the same run. The network model calculates pressure, flow, and temperature. The control model specifies when a device should change a setting, which information to use, and what to adjust. Together, the models show how an action changes network conditions and how a controller can respond to those changes.

How the workbench models control systems​

The physical network and the control network​

Connect pipes, valves, compressors, and boundaries by their fluid ports to show where gas flows. Connect signal sources, controllers, and monitoring components by their control signal ports to show where values are sent. In a measurement instrument or actuator, select the device and the measurement point or control target in its parameters. Then wire its signal port into the control network.

ComponentRole in the control system
Measurement InstrumentReads a device value such as pressure, flow, or temperature and sends it into the control network
Constant InputSupplies a fixed command or setpoint and can be used to check how a device responds to a command
PID Controller and Python Script ControllerCalculate commands from input signals using standard feedback control or custom logic
ActuatorPasses a command, such as an opening or outlet pressure request, to the selected device
OscilloscopeShows how a signal changes over time. A measurement or control output can branch to an oscilloscope

Choose a control method for your objective​

  • Change a setting on a schedule. If you know when the device should act and what value it should use, configure its operating schedule when supported. For example, schedule a valve opening change at a specific time.
  • Send a command signal. Wire a constant input or a script to an actuator, then set the device to use the corresponding signal as its control source. Use this to check whether the device receives the command and moves by the expected amount and at the expected rate.
  • Adjust from feedback. Send a measurement to the controller so it can calculate a command from the setpoint and measured value. The actuator passes the command to the device. The next measurement feeds the resulting network conditions back to the controller. For PID control, SP is the setpoint, PV is the measured process value, and CV is the controller output. SP can be fixed or supplied by another signal.

Measurement Direction and Engineering Units​

Choose the device, measurement point, and quantity first. SP and PV need the same unit and reference, such as gauge pressure. For flow, confirm the positive direction at the selected port and distinguish standard from actual volumetric flow. One output drives a signal node and can branch to several inputs. Set the gas and reference conditions

Actuation Targets and Device Response​

Select the device and signal in the actuator, then enable the corresponding signal control source in the device parameters. The control target determines the output unit and limits. For example, a shut-off valve opening command uses 0–100 percent. Check the requested, applied, and actual values in order to see what the controller sent, which target the device adopted, and which state it has reached.

Transient Control Timing​

Transient simulation uses the initial device settings to establish the physical state, then initializes the control network. Equipment begins responding to requests in the first positive time interval. A PID controller can calculate its next command at the end of each accepted physical step or update at a fixed sampling period. With fixed sampling it holds the previous output between samples. Set the result save interval separately and save frequently enough to see the order of events.

Example: Control buffer-tank pressure​

A sudden increase in downstream demand draws gas from the buffer tank, reducing tank pressure. In this example, the controller reads tank pressure and raises the upstream compressor's outlet pressure request so supply gradually catches up with demand. Open the Compression, Buffering, and Pressure Regulation model in the Simulation Gallery to inspect the saved model and task results. To build it yourself, see the example configuration for pipe dimensions, equipment settings, and gas composition.

1. Build the gas supply network​

Connect the gas source, pipes, general compressor, buffer tank, downstream regulator, and load in the Gas Network Simulation Workbench. Set the gas, boundary conditions, and initial device settings. The tank pressure and compressor outlet pressure setpoint both start at 6 MPag. The downstream regulator independently holds its outlet at 4.8 MPag. Select Transient Simulation in the global parameters. Build your first network model

2. Wire the feedback and actuation signals​

QuantityWorkbench configuration
SP, tank pressure targetAdd a PID Controller, choose a fixed setpoint, and enter 6 MPag
PV, tank pressure readingAdd a Measurement Instrument, bind it to the tank, and select Tank pressure under Signal Option. Wire its Signal output to the PID PV input
CV, compressor outlet pressure requestAdd an Actuator, bind it to the general compressor, and select Outlet pressure setpoint under Signal Option. Wire the PID CV output to the actuator Signal input

Set the general compressor to Outlet pressure mode, set Control Source to Signal Control, and set Signal Control Contents to Setpoint only. The PID adjusts the compressor outlet pressure setpoint and uses the pressure inside the buffer tank as feedback.

3. Configure the controller and the load change​

Raising the compressor outlet pressure generally raises tank pressure, so this example uses positive control action. When tank pressure is below SP, the controller increases the outlet pressure request. Set Kc = 0.8, Ti = 180 s, and Td = 0 for PI control. Limit CV to 5.2–7 MPag and set a fixed sampling period of 10 s.

Set the run duration to 20 min, the minimum time step to 10 s, and the maximum to 60 s. Set the load's initial standard volumetric flow to 80000 Nm³/h. Add a row to the boundary change schedule to raise it to 120000 Nm³/h at 600 s. Validate and run the model, then compare results from before and after the change. The accepted steps in the example are all 10 s. Check them in Other Results → Transient Time Step. Run calculations and view results

View Results​

  1. Confirm the disturbance. Locate the step change at 600 s in the load flow trend, then compare tank inlet flow, outlet flow, and pressure. When demand rises, outflow exceeds inflow and the tank supplies the difference from inventory. Tank pressure falls to about 5.966 MPag at 660 s.
  2. Check the feedback. Compare SP, PV, and the next absolute CV in the PID Control Values trend. After demand rises, PV falls below SP and the controller increases the compressor outlet pressure request. Tank pressure recovers to about 5.992 MPag by 1200 s.
  3. Check the equipment response. At the 1200 s result frame, compare Executed CV for This Step with the actual compressor outlet pressure. Both are about 6.096 MPag. Next Requested CV applies to the following interval. If the request changes and the device is slow to respond, check the actuator's applied value, the device control source, and its operating limits.
PID controller trends showing the tank pressure setpoint, the measured pressure, and the compressor outlet pressure command
PID controller trends showing the tank pressure setpoint, the measured pressure, and the compressor outlet pressure command

If tank pressure drops and the PID output moves in the opposite direction from the example, check the tank pressure measurement point and the positive control action. If the PID raises the outlet pressure request and tank pressure remains low, check the actual compressor outlet pressure, flow, and shaft power for signs of a power, flow, or pressure ratio limit.