Repository navigation
From the surge-margin example to an uncertainty-aware anti-surge controller #192
Unanswered
DanBoringName
asked this question in
Research Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
The question
Given its flow meter's real state-dependent uncertainty
R(Q), does an active inference agent hold a centrifugal compressor's surge margin better than a fixed-margin anti-surge controller on the same plant? The example covers differential-pressure meters (orifice, venturi, nozzle) and Coriolis meters. "Better" is defined under the first result.The continuation is open as a paper. Lead authorship is yours of course. I'm happy to co-author the meter derivation and the cpomdp side if that helps and my contribution is sufficient. If not I only ask you cite cpomdp.
Why it matters
The surge-margin example is cpomdp's first applied one. Its
R(x)follows from how a flow meter works. Nobody chose it.The meter's element type sets the sign of
R′(Q). The sign decides the result. The agent's offset from its preferred margin has the sign of−d log R / dm, so it says which way the agent moves relative to surge.Q = k·√ΔP. A flat transmitter error then givesR(Q) ∝ 1/Q², and the epistemic term pulls the agent away from surge.R ∝ Q², and the pull runs toward surge.R′ = 0. The epistemic term is then the same for every action, and the example's agent reduces to a controller.Anyone putting an active inference controller on a compressor needs the answer. If the agent beats a fixed margin once a hard surge limit is in place, the meter's uncertainty model becomes a controller input worth measuring. If it loses, the project shows where the epistemic term costs margin. A hard limit then has to overrule it.
I built the example through the Coriolis case and won't be developing it further myself directly (yet). I'm more than happy to assist where I can.
What cpomdp already provides
Every link is pinned to
v0.5.0.examples/surge_margin.py. The DP and Coriolis meters asR(m)functions, a fixed-Rtwin, a closed-form law for where the agent stands, and a closed loop through the library's ownAgent.uv run --extra examples python examples/surge_margin.py --checkruns its eleven falsifiers. Each isCORROBORATED, read off a grid. Its numbers are showcases and none is citable.R(Q)and the law for where the agent stands. Its last section lists everything the demo leaves out.cpomdp.CallableSensor. Carries a state-dependentR(x)as a function of the state. A new meter model plugs in here.cpomdp.Agentwith anObservationGoal. The closed loop the example runs.cpomdp._lab.harness. Keeps the world and the agent apart, so the true meter can differ from the one the agent models. ItsWorldis linear-Gaussian, and actions come from outside with no selector.cpomdp._lab.constructors. Builds models from a declared spec under named perturbations to their matrices. ACallableSensorpasses through untouched, so a wrong meter model is built as a second sensor.cpomdp._lab.degraded. Filters that are worse than their model on purpose.WrongFixedRBackendfilters on a fixedR. The model it is scored under keeps itsR(x).cpomdp._labis private research apparatus. It carries no compatibility promise. A piece users need moves to a public module once it settles.What's missing
A realistic uncertainty model per meter type. The example's meters are power laws. The DP meter has
R(Q) = e_ref²·Q_ref⁴/Q², the Coriolis meter hasR = (e_ref·Q)², and both are 0.2% accurate at design flow. The derivation calls that shared constant an assumption to re-anchor against a real datasheet. Real meters add calibration error, installation effects, drift and, in a Coriolis meter, a zero-stability term.Rstops falling and the pull toward low flow weakens.A hard surge constraint. cpomdp v0.5.0 has no state constraint. Its grid selectors take
action_bounds, the box the action grid spans. The example widens its valve grid past the surge line on purpose, so the grid can't act as an interlock nobody declared. Surge protection lives only in a soft economic preference, and the example shows what that costs. The ambiguity term is not a safety factor. A worse DP meter moves the agent closer to surge (rows 3 and 9). The Coriolis meter settles it past the surge line (row 11). The study needs a hard limit or a chance constraint on the margin, in its own loop or as a selector feature.A baseline. The example compares the agent with a fixed-
Rtwin of itself and nothing else. The Applications page lists this among its limits. A conventional anti-surge controller holds the operating point a fixed margin from the surge line by opening a recycle valve. Nothing in cpomdp implements one. The study needs it on the same plant with the same meter.The standoff position. Where the agent stands is set by the economic weight
Λ, a policy choice. The law makes the epistemic part of the offset scale as1/Λ. SweepingΛover 10:1 moves the standoff further than the whole 8:1 meter ladder does. The prior's width scales the first step as much asΛdoes. Only the direction of the offset is a result (row 5). Its size is aΛartefact. Resolving that is part of the project. One route sweepsΛand reports the agent's whole trade-off curve. Another pricesΛfrom what recycle costs.Plant fidelity. The example has no compressor model. Its closed loop uses the agent's own model as the plant. The state is a single surge margin that persists from step to step and moves additively with the valve. The meter reads true and the run is noise-free. The surge line is a fixed number, and the operating point describes no machine. There are no Greitzer dynamics, no compressor characteristic, no speed line and no gas thermodynamics. Planning is one EFE step deep.
A credible study needs a plant the agent does not share. That means a compression-system model in the line of Greitzer (1976), or a dynamic process simulation, with recycle-valve dynamics and a surge line read off a performance map. The harness's
Worldis linear-Gaussian, so a nonlinear plant runs in its own loop. The derivation names a further step. It calls treating the surge point as an unknown latent the interesting version of this problem.What a first result looks like
One meter type, Coriolis. The example covers it, and it is the case where the epistemic term pulls toward surge.
Give it a measured or literature-sourced uncertainty model, zero-stability term included. The SEVA work below reports an uncertainty with every measurement and is one place to start. Put a hard surge constraint on the margin. Run the agent and a fixed-margin anti-surge controller on the same plant, with the same meter and the same disturbances. Sweep
Λfor the agent and the margin setting for the baseline, and report both margin-versus-efficiency curves. Efficiency here is recycle avoided."Better" means the agent's curve dominates. At the same rate of surge-limit violations it holds a smaller mean margin. Or at the same mean margin it violates less.
A negative result counts. An agent that needs the hard limit to stay out of surge, and does no better than a fixed margin once it has one, is worth writing up.
Kind of work
Application / industry example, Validation against a benchmark or oracle (RxInfer, published data)
Rough size
Paper-sized
Status
Open, looking for someone to take it
Prior art and references
R(x)makes the epistemic term non-constant. The example's meters are instances.Skills that would help
Flow metering or process instrumentation, compressor or anti-surge control, Bayesian filtering, JAX
Get in touch
Responding here is the best way!
Active Inference Institute Discord cpomdp channel
hello@inferogenesis.com
Checks
All reactions