VirtualFCS.Chemical.AmmoniaCracker.ElectricHeatingDistr

1. Parameters and inputs

Parameters configure the heater PI controller, optional feed-forward and cascade control, and optional startup filtering with segment-wise heat distribution. Temperatures are absolute SI temperatures in kelvin, heat flow rates are in watts, and temperature differences are in kelvin.

Heater sizing and heat distribution

NameTypeUnitDefaultDescription
NInteger1size(heatWeights, 1)Number of reactor segments and heat ports
q_maxSI.HeatFlowRateW5e4Upper limit of the heater PI controller output; with the heat filter enabled this is the total distributed heat-flow command
useHeatFilterBoolean-falseEnable the first-order startup filter and normalized segment-wise heat distribution
T_heatFilterSI.Times1e-3Startup filter time constant; used only when useHeatFilter = true
heatWeights[:]Real-{1.8, 1.5, 1.2, 1.0, 0.9, 0.8, 0.7, 0.6, 0.3, 0.2}Relative segment heat weights from inlet to outlet, normalized by their sum when useHeatFilter = true. Its length must match N in that mode.
T_out_targetSI.TemperatureK550 + 273.15Temperature set-point; in cascade mode it is the outlet-temperature reference and the base of the bed-mean set-point

PI control and optional modes

NameTypeUnitDefaultDescription
k_PIRealW/K1e3Proportional gain of the heater PI controller
Ti_PISI.Times0.5Integral time of the heater PI controller
use_Q_ffBoolean-falseEnable the conditional feed-forward input Q_ff, added to the PI controller output before its output limits
use_cascadeBoolean-falseEnable an outer outlet-temperature PI controller that adjusts the inner controller's bed-mean temperature set-point
k_outReal11Outer controller proportional gain; used only when use_cascade = true
Ti_outSI.Times200Outer controller integral time; used only when use_cascade = true
dT_bed_maxSI.TemperatureDifferenceK100Symmetric limit on the outer controller's bed-mean set-point offset; used only when use_cascade = true
dT_bed_startSI.TemperatureDifferenceK0Initial output of the outer controller and initial bed-mean set-point offset; used only when use_cascade = true

Inputs and physical interfaces

NameDirectionInterfaceUnitDescription
T_measInputRealInputKMeasured temperature. It is compared directly with T_out_target when cascade control is disabled; when enabled it is the outer outlet-temperature feedback signal.
Q_ffConditional inputRealInputWOptional feed-forward heat-flow demand, available when use_Q_ff = true
heatPorts[N]Thermal interfaceHeatPort_a arrayW, KOne heat-flow port per reactor segment. Positive prescribed heat flow supplies heat to the connected segment.

2. Model description

The model regulates electric heat supplied to an ammonia-cracker bed. A bounded PI controller requests non-negative heater power up to q_max. Depending on the selected options, that request can include a feed-forward term, pass through a first-order startup filter, and be distributed across the segment heat ports according to heatWeights.

With use_cascade = false, T_meas closes the heater PI loop directly against T_out_target. With use_cascade = true, an outer PI loop compares T_meas with T_out_target and produces a bounded offset. This offset is added to T_out_target to form the bed-mean temperature set-point. The inner heater PI loop then compares that set-point with the arithmetic mean of heatPorts.T.

When useHeatFilter = true, the heater command is first filtered from an initial output of zero, then multiplied by heatWeights[i]/sum(heatWeights) for each segment. This preserves the total commanded heat flow for weights whose sum is nonzero. When useHeatFilter = false, the filter and distribution gains are absent and the full PI output is connected to every segment port; consequently, the sum of segment heat flows can be N times the controller output. In this mode heatWeights and T_heatFilter do not affect the model.

3. Governing equations and usage notes

0 <= PI_heater.y <= q_max

T_bedMean = sum(heatPorts[i].T for i in 1:N)/N

use_cascade = false: PI_heater set-point = T_out_target, measurement = T_meas

use_cascade = true:  T_bedSet = T_out_target + outerPI.y

                     outerPI: set-point = T_out_target, measurement = T_meas

                     PI_heater: set-point = T_bedSet, measurement = T_bedMean

useHeatFilter = true: Q_segment[i] = heatFilter.y*heatWeights[i]/sum(heatWeights)

useHeatFilter = false: Q_segment[i] = PI_heater.y

The feed-forward input is enabled independently of cascade mode and is combined by the LimPID block before the heater output limiter. The heat filter and heat distribution are enabled together by useHeatFilter. Ensure that N matches the heatWeights vector length when distribution is enabled, and that the weights have a nonzero sum.

4. Outputs

No signal output connectors are declared. Heat is delivered through heatPorts[N]. For monitoring, PI_heater.y is the limited heater command before optional filtering and distribution; when cascade control is enabled, outerPI.y is the bed-mean set-point offset and T_bedMean.y is the mean segment temperature.