Field fix / guidePLC / HMI Code & LogicVendor-agnostic (IEC 61131-3)Power Plantindustrial-automation

Three Element Drum Level — PLC Control Template

Shared by TSIMEREZIVO Team · 4 Oct 2026 · 45 views

# Three Element Drum Level Control — Usage Guide ## Overview This template implements the industry-standard three-element drum level control strategy for steam boiler applications. It is the most widely used drum level control method in power generation, typically employed for boilers operating above 30% of Maximum Continuous Rating (MCR). ## When to Use This Template | Scenario | Recommended | |----------|-------------| | Utility boiler > 30% MCR | ✅ Yes | | Package boiler with variable load | ✅ Yes | | HRSG (Heat Recovery Steam Generator) | ✅ Yes | | Small fire-tube boiler with stable load | ❌ Use single-element instead | | Startup / very low load (< 30% MCR) | ❌ Use single-element; template auto-switches | ## Quick Start 1. **Import the tag list** (`tags/tag-list.csv`) into your PLC programming environment 2. **Map physical I/O** — update the Address column to match your hardware configuration 3. **Configure the PID blocks** — use the tuning values as starting points 4. **Implement the pseudocode** (`logic/pseudocode.md`) in your target PLC language 5. **Import the HMI layout** (`hmi/layout.svg`) into your SCADA system 6. **Configure alarms** per the alarm matrix (`alarms/alarm-matrix.csv`) 7. **Commission** using the tuning procedure below ## I/O Requirements | Signal | Type | Card | Range | |--------|------|------|-------| | Drum Level (LT-001) | 4-20mA AI | AI:1:0.0 | 0-100% | | Steam Flow (FT-001) | 4-20mA AI | AI:1:0.1 | 0-500 t/h | | Feedwater Flow (FT-002) | 4-20mA AI | AI:1:0.2 | 0-600 t/h | | Valve Position FB (FCV-001) | 4-20mA AI | AI:1:0.3 | 0-100% | | Valve Command (FCV-001) | 4-20mA AO | AO:2:0.0 | 0-100% | ## Commissioning Procedure ### Pre-Commissioning Checks - [ ] All transmitters calibrated and loop-checked - [ ] FCV-001 stroked 0-100% and back; confirm linear response - [ ] FCV-001 fail position verified (typically fail-closed) - [ ] All alarm setpoints reviewed with operations - [ ] Interlock bypass switches available for commissioning ### Step-by-Step Tuning **Step 1: Secondary Loop (FIC-001)** 1. Place LIC-001 in MANUAL 2. Place FIC-001 in AUTO 3. Make 5% step changes to FIC-001 setpoint 4. Target response: quarter-decay, < 15s settling time 5. Starting values: P=0.8, I=10s, D=0 **Step 2: Primary Loop (LIC-001)** 1. Keep FIC-001 in AUTO/CASCADE 2. Place LIC-001 in AUTO (3-Element mode) 3. Wait for stable drum level 4. Introduce 5% steam load disturbances 5. Target response: < 2% overshoot, < 2 min settling 6. Starting values: P=2.0, I=120s, D=0 **Step 3: Feedforward Ratio** 1. Adjust FW_STEAM_RATIO so that feedwater flow matches steam flow at steady state 2. Typical range: 1.03–1.10 (accounts for blowdown and losses) 3. Test with 10% load ramps — level deviation should be < 5% ### Verification Tests - [ ] 10% load increase step: max level deviation < 5%, recovery < 3 min - [ ] 10% load decrease step: max level deviation < 5%, recovery < 3 min - [ ] Single element fallback: disconnect FT-001 signal → system transfers to 1E mode automatically - [ ] HH level trip test: simulate 85% level → FW pump trips, FCV closes - [ ] LL level trip test: simulate 15% level → MFT signal asserts ## Applicable Standards - **ISA-77.42** — Fossil Fuel Power Plant Feedwater Control System - **NFPA 85** — Boiler and Combustion Systems Hazard Code - **IEC 61511** — Functional Safety (for SIL-rated interlocks) - **ASME Section I** — Rules for Construction of Power Boilers ## Troubleshooting | Symptom | Likely Cause | Action | |---------|-------------|--------| | Level oscillates ±5% | LIC-001 gain too high | Reduce P by 20%, increase I by 30% | | Sluggish level response | LIC-001 gain too low | Increase P by 20%, reduce I by 20% | | FCV-001 hunting | FIC-001 gain too high | Reduce FIC P by 20% | | Level drops on load increase | Swell compensation insufficient | Increase FW_STEAM_RATIO | | System won't switch to 3E | Transmitter fault flag set | Check FT-001 and FT-002 signals | ## Version History | Version | Date | Author | Changes | |---------|------|--------|---------| | 1.0 | 2024-01-01 | TSIMEREZIVO | Initial release | --- ## Control Logic — Vendor-Agnostic Pseudocode # Three Element Drum Level Control — Pseudocode ## Main Control Routine ``` ROUTINE: ThreeElementDrumLevel SCAN RATE: 100ms // ═══════════════════════════════════════════ // SECTION 1: Input Scaling & Validation // ═══════════════════════════════════════════ // Read and validate drum level transmitter LT001_RAW := AI_CARD[1:0.0] // 4-20mA → 0-100% LT001_PV := SCALE(LT001_RAW, 0, 100, "%") LT001_VALID := (LT001_RAW > 3.8mA) AND (LT001_RAW < 20.5mA) // Read and validate steam flow transmitter FT001_RAW := AI_CARD[1:0.1] // 4-20mA → 0-500 t/h FT001_PV := SCALE(FT001_RAW, 0, 500, "t/h") FT001_VALID := (FT001_RAW > 3.8mA) AND (FT001_RAW < 20.5mA) // Read and validate feedwater flow transmitter FT002_RAW := AI_CARD[1:0.2] // 4-20mA → 0-600 t/h FT002_PV := SCALE(FT002_RAW, 0, 600, "t/h") FT002_VALID := (FT002_RAW > 3.8mA) AND (FT002_RAW < 20.5mA) // Read feedwater valve position feedback FCV001_POS := AI_CARD[1:0.3] // 4-20mA → 0-100% // ═══════════════════════════════════════════ // SECTION 2: Mode Selection // ═══════════════════════════════════════════ // Determine operating mode IF NOT FT001_VALID OR NOT FT002_VALID THEN // Transmitter failure → fall back to single element CONTROL_MODE := MODE_1E SET_ALARM(ALM_XMTR_FAIL, PRIORITY_HIGH) ELSIF STEAM_FLOW_PV < (MCR * 0.30) THEN // Low load → single element (swell/shrink dominant) CONTROL_MODE := MODE_1E ELSIF OPERATOR_MODE = MANUAL THEN CONTROL_MODE := MODE_MANUAL ELSE CONTROL_MODE := MODE_3E END_IF // ═══════════════════════════════════════════ // SECTION 3: Feedforward Calculation // ═══════════════════════════════════════════ // Steam flow feedforward (demand signal) // Ratio: feedwater flow should match steam flow (mass balance) FF_DEMAND := FT001_PV * FW_STEAM_RATIO // Ratio typically 1.05-1.10 FF_DEMAND := CLAMP(FF_DEMAND, 0, 600) // Limit to FT002 range // ═══════════════════════════════════════════ // SECTION 4: Primary Controller (Level → Flow SP) // ═══════════════════════════════════════════ LIC001.PV := LT001_PV LIC001.SP := LEVEL_SETPOINT // Typically 50% LIC001.P := 2.0 LIC001.I := 120 // seconds LIC001.D := 0 LIC001.ACTION := REVERSE LIC001.OUT_MIN := -100 LIC001.OUT_MAX := 100 IF CONTROL_MODE = MODE_3E OR CONTROL_MODE = MODE_1E THEN LIC001.MODE := AUTO EXECUTE PID(LIC001) ELSE LIC001.MODE := MANUAL LIC001.OUT := TRACK_VALUE // Track current FCV position END_IF // ═══════════════════════════════════════════ // SECTION 5: Combine Level Correction + Feedforward // ═══════════════════════════════════════════ IF CONTROL_MODE = MODE_3E THEN // Three element: level correction + steam flow feedforward FW_DEMAND := FF_DEMAND + LIC001.OUT ELSIF CONTROL_MODE = MODE_1E THEN // Single element: level controller output only, scaled to flow range FW_DEMAND := (LIC001.OUT / 100) * FT002_RANGE ELSE FW_DEMAND := MANUAL_FCV_POSITION END_IF FW_DEMAND := CLAMP(FW_DEMAND, 0, 600) // ═══════════════════════════════════════════ // SECTION 6: Secondary Controller (Flow → Valve) // ═══════════════════════════════════════════ FIC001.PV := FT002_PV // Actual feedwater flow FIC001.SP := FW_DEMAND // Demanded feedwater flow FIC001.P := 0.8 FIC001.I := 10 // seconds FIC001.D := 0 FIC001.ACTION := REVERSE FIC001.OUT_MIN := 0 FIC001.OUT_MAX := 100 IF CONTROL_MODE <> MODE_MANUAL THEN FIC001.MODE := AUTO EXECUTE PID(FIC001) ELSE FIC001.MODE := MANUAL END_IF // Output to feedwater control valve FCV001_CMD := FIC001.OUT // 0-100% valve position AO_CARD[2:0.0] := FCV001_CMD // ═══════════════════════════════════════════ // SECTION 7: Safety Interlocks // ═══════════════════════════════════════════ // High-High Level Trip IF LT001_PV >= 85.0 THEN SET_ALARM(ALM_LEVEL_HH, PRIORITY_CRITICAL) FCV001_CMD := 0 // Close feedwater valve TRIP_FW_PUMP := TRUE END_IF // Low-Low Level Trip → Master Fuel Trip IF LT001_PV <= 15.0 THEN SET_ALARM(ALM_LEVEL_LL, PRIORITY_CRITICAL) MFT_REQUEST := TRUE // Master Fuel Trip END_IF // High Level Alarm IF LT001_PV >= 75.0 THEN SET_ALARM(ALM_LEVEL_H, PRIORITY_HIGH) END_IF // Low Level Alarm IF LT001_PV <= 25.0 THEN SET_ALARM(ALM_LEVEL_L, PRIORITY_HIGH) END_IF // ═══════════════════════════════════════════ // SECTION 8: Diagnostics & HMI Updates // ═══════════════════════════════════════════ HMI_DRUM_LEVEL := LT001_PV HMI_STEAM_FLOW := FT001_PV HMI_FW_FLOW := FT002_PV HMI_FCV_POSITION := FCV001_POS HMI_FW_DEMAND := FW_DEMAND HMI_CONTROL_MODE := CONTROL_MODE HMI_LIC_OUTPUT := LIC001.OUT HMI_FIC_OUTPUT := FIC001.OUT END_ROUTINE ``` --- ## Tag List ```csv Tag Name,Description,Data Type,Direction,Engineering Unit,Range Min,Range Max,Default Value,Address LT001_RAW,Drum Level Transmitter Raw Input,REAL,input,%,0,100,,AI:1:0.0 LT001_PV,Drum Level Process Value,REAL,calculated,%,0,100,, LT001_VALID,Drum Level Transmitter Healthy,BOOL,calculated,,,,TRUE, LT001_SP,Drum Level Setpoint,REAL,internal,%,20,80,50, FT001_RAW,Steam Flow Transmitter Raw Input,REAL,input,t/h,0,500,,AI:1:0.1 FT001_PV,Steam Flow Process Value,REAL,calculated,t/h,0,500,, FT001_VALID,Steam Flow Transmitter Healthy,BOOL,calculated,,,,TRUE, FT002_RAW,Feedwater Flow Transmitter Raw Input,REAL,input,t/h,0,600,,AI:1:0.2 FT002_PV,Feedwater Flow Process Value,REAL,calculated,t/h,0,600,, FT002_VALID,Feedwater Flow Transmitter Healthy,BOOL,calculated,,,,TRUE, FCV001_CMD,Feedwater Control Valve Command,REAL,output,%,0,100,0,AO:2:0.0 FCV001_POS,Feedwater Control Valve Position Feedback,REAL,input,%,0,100,,AI:1:0.3 LIC001_SP,Level Controller Setpoint,REAL,internal,%,0,100,50, LIC001_PV,Level Controller Process Value,REAL,internal,%,0,100,, LIC001_OUT,Level Controller Output,REAL,internal,%,-100,100,, LIC001_P,Level Controller Proportional Gain,REAL,internal,,0.1,10,2.0, LIC001_I,Level Controller Integral Time,REAL,internal,sec,1,600,120, LIC001_MODE,Level Controller Mode,INT,internal,,0,3,1, FIC001_SP,Flow Controller Setpoint,REAL,internal,t/h,0,600,, FIC001_PV,Flow Controller Process Value,REAL,internal,t/h,0,600,, FIC001_OUT,Flow Controller Output,REAL,internal,%,0,100,, FIC001_P,Flow Controller Proportional Gain,REAL,internal,,0.1,10,0.8, FIC001_I,Flow Controller Integral Time,REAL,internal,sec,1,120,10, FIC001_MODE,Flow Controller Mode,INT,internal,,0,3,1, FF_DEMAND,Feedforward Demand (Steam Flow Based),REAL,calculated,t/h,0,600,, FW_DEMAND,Total Feedwater Demand,REAL,calculated,t/h,0,600,, FW_STEAM_RATIO,Feedwater to Steam Flow Ratio,REAL,internal,,0.9,1.2,1.05, CONTROL_MODE,Active Control Mode (0=MAN 1=1E 2=3E 3=CAS),INT,internal,,0,3,2, MFT_REQUEST,Master Fuel Trip Request,BOOL,output,,,,FALSE, TRIP_FW_PUMP,Trip Feedwater Pump Command,BOOL,output,,,,FALSE, ALM_LEVEL_HH,Drum Level High-High Alarm Active,BOOL,calculated,,,,FALSE, ALM_LEVEL_H,Drum Level High Alarm Active,BOOL,calculated,,,,FALSE, ALM_LEVEL_L,Drum Level Low Alarm Active,BOOL,calculated,,,,FALSE, ALM_LEVEL_LL,Drum Level Low-Low Alarm Active,BOOL,calculated,,,,FALSE, ALM_XMTR_FAIL,Transmitter Failure Alarm Active,BOOL,calculated,,,,FALSE, ``` --- ## Alarm Matrix ```csv Alarm Tag,Condition,Setpoint,Priority,Type,Response,Delay,Auto Acknowledge ALM_LEVEL_HH,LT001_PV >= 85%,85%,critical,safety,Trip feedwater pump; close FCV-001; notify shift supervisor,0s,No ALM_LEVEL_H,LT001_PV >= 75%,75%,high,process,Check feedwater valve position; verify steam load; prepare manual intervention,3s,No ALM_LEVEL_L,LT001_PV <= 25%,25%,high,process,Check feedwater pump running; verify FCV-001 opening; check for tube leak,3s,No ALM_LEVEL_LL,LT001_PV <= 15%,15%,critical,safety,Initiate Master Fuel Trip (MFT); emergency boiler shutdown,0s,No ALM_XMTR_FAIL,LT001_VALID=FALSE OR FT001_VALID=FALSE OR FT002_VALID=FALSE,N/A,high,equipment,System falls back to 1-Element mode; check transmitter wiring and calibration,5s,No ALM_FCV_DEVIATION,ABS(FCV001_CMD - FCV001_POS) > 5% for >30s,5% deviation,medium,equipment,Check valve actuator; check air supply; check positioner,30s,Yes ALM_LEVEL_RATE,Rate of change > 5%/min,5%/min,medium,process,Investigate rapid level change; check for tube rupture or sudden load change,10s,No ALM_MODE_CHANGE,Control mode changed,N/A,low,diagnostic,Log mode change; verify correct operation in new mode,0s,Yes ALM_FW_PUMP_FAIL,Feedwater pump trip detected,N/A,critical,equipment,Transfer to MANUAL; start standby pump; reduce boiler load,0s,No ALM_STEAM_FW_MISMATCH,ABS(FT001_PV - FT002_PV) > 20% of FT001_PV for >60s,20% mismatch,high,process,Check for tube leak; verify transmitter calibration; check blowdown valves,60s,No ```

More like this

Rate, comment, and get full access

Members can download files, rate contributions, and discuss fixes with the engineers who posted them — free.

Join the library