Griffing-Technology-LLC/engineering-pe-skills / skills/control-systems-engineering
control-systems-engineering
VerifiedControl systems engineering aligned to the NCEES PE Control Systems exam — PID tuning, loop dynamics, transfer functions, stability and frequency response, process instrumentation and P&IDs, final control elements, safety instrumented systems and SIL, and industrial control security. Use when tuning or diagnosing a control loop, building a transfer function or block diagram, checking stability or phase and gain margin, sizing a control valve or selecting a sensor, reading or drafting a P&ID, doing a SIL or LOPA assessment, or designing a feedback controller for a physical plant.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 8.3 KB |
| references/instrumentation-and-safety.md | markdown | 4.7 KB |
| references/loop-dynamics.md | markdown | 3.3 KB |
| references/pid-and-tuning.md | markdown | 4.4 KB |
references/pid-and-tuning.md
View on GitHub# PID Forms, Tuning, and Loop Structures
Reference file for the `control-systems-engineering` skill.
## 1. Declare the PID form first
Vendors implement different algebra under the same name. **Gains are not
portable
between forms**, and moving a tuning set from one controller to another without
converting is a common and avoidable failure.
**Ideal / non-interacting:**
$$u(t) = K_c\left[e + \frac{1}{T_i}\int e\,\mathrm{d}t + T_d\frac{\mathrm{d}e}{\mathrm{d}t}\right]$$
**Parallel / independent:**
$$u(t) = K_p e + K_i\int e\,\mathrm{d}t + K_d\frac{\mathrm{d}e}{\mathrm{d}t}$$
**Series / interacting** — common in older analogue-derived DCS.
Also state whether integral is $T_i$ (minutes/repeat) or $K_i$ (repeats/minute)
—
they are reciprocals, and confusing them inverts the tuning.
## 2. What each term does
* **Proportional** — acts on present error. Alone, it leaves steady-state offset
on any self-regulating process.
* **Integral** — eliminates offset by acting on accumulated error. It adds phase
lag, so it always costs stability margin.
* **Derivative** — acts on rate of change, adding phase lead and damping. It
amplifies measurement noise, and must be filtered.
**Derivative on measurement, not on error.** Otherwise a setpoint step produces
a
derivative kick — a large transient spike at the actuator. Most modern
controllers default to this; verify rather than assume.
**Do not use derivative on noisy or fast loops.** Flow and pressure loops are
normally PI. Temperature loops, being slow and smooth, are where derivative
earns
its place.
## 3. Tuning methods
**Ziegler-Nichols** — historically important, and aggressive. It targets roughly
quarter-amplitude decay, giving about 20–25% overshoot and thin margins. Treat
it
as a starting point, not a delivery.
**Lambda / IMC tuning** — specify a desired closed-loop time constant $\lambda$
and compute gains from the FOPDT model. Preferred for most process loops because
it makes the robustness/performance trade explicit: larger $\lambda$ is slower
and more robust. A common conservative choice is $\lambda \ge \theta$, or
$\lambda \approx \tau$ for a well-damped response.
**Cohen-Coon** — better than Z-N for dead-time-dominant processes, still fairly
aggressive.
Whatever the method, **verify the resulting margins** (see `loop-dynamics.md`)
rather than trusting the rule.
## 4. Structure beats tuning
Reach for structure before aggressive gains:
**Cascade** — an inner loop around a fast disturbance, outer loop on the primary
variable. The inner loop must be substantially faster than the outer, typically
by a factor of 3 to 5, or the two will interact. Cascade rejects inner-loop
disturbances far better than any single-loop tuning can.
**Feedforward** — measure the disturbance and act before the error appears.
Essential where dead time makes feedback inherently slow. Always **combine with
feedback**; feedforward alone has no error correction and drifts with model
mismatch.
**Ratio** — hold one flow proportional to another.
**Override / selector** — a constraint controller takes over when a limit is
approached. Requires anti-windup on the loop not currently selected, or it will
bump on transfer.
## 5. The non-linear reality
Textbook tuning assumes a linear plant and unlimited actuator. Neither holds.
**Integral windup.** When the actuator saturates, error persists and the
integral
term keeps accumulating, so the controller overshoots badly on recovery. Every
practical PID needs anti-windup — conditional integration or back-calculation.
This is not optional on any loop that can saturate, which is nearly all of them.
**Bumpless transfer** between manual and auto, and on setpoint changes.
**Valve reality** — deadband, stiction, hysteresis, and an inherent
characteristic that is rarely linear. Stiction produces a limit cycle that looks
like poor tuning but is not, and **retuning will not fix it.** A loop cycling
with a square-ish output and a sawtooth PV is stiction; the fix is mechanical.
**Sensor failure behaviour** — define what the loop does on loss of measurement.
Holding the last value, failing to manual, and driving to a safe output are
different choices with different consequences; make it deliberate.
## 6. Reporting a tuning result
State the controller form, the gains in that form's units, the plant model used,
the resulting gain and phase margins with frequencies, and the loop's behaviour
on saturation and sensor loss. A step response plot alone is not a deliverable.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |