The nonlinear OpenHPL plant is naturally continuous-time, while practical supervisory control may be sampled or event driven. These ideas should not be confused with acausal modeling. This note also explains an important numerical observation: isochronous and droop governors may integrate successfully as continuous models, while adding AGC, guide-vane bounds and rate limits can make the same continuous formulation much harder to solve.
Between controller events, $u$ may be held constant or generated by continuous controller states. In an acausal formulation, the physical plant is still assembled from conservation laws and constitutive equations; the controller does not determine whether the plant is causal or acausal.
A simplified pilot-servo plus main-servo governor can be written as
$$T_p\dot v+v=e,$$ $$\dot y_g=\frac{1}{T_g}v,$$where $e$ is the governor error and $y_g$ is guide-vane opening. A droop term may enter through
$$e=\frac{f_{ref}-f}{f_{ref}}-R\,(y_g-y_{g,ref})-x_r,$$with transient-droop dynamics represented, for example, by
$$T_r\dot x_r+x_r=\delta y_g.$$This already gives a multi-state continuous controller. In OpenHPL the actual governor also contains lookup-table mapping, permanent droop, transient droop, a pilot servo, a main servo, a guide-vane rate limiter and a guide-vane position limiter.
A simple continuous secondary controller can be written as
$$ACE=\Delta P_{tie}+B\Delta f,$$ $$\dot\xi_A=-K_I ACE,$$ $$P_{ref}=P_0+\xi_A.$$The AGC state is slow compared with the local governor, so the complete closed loop contains several time scales:
$$\text{hydraulic waves} \;\ll\; \text{servo/governor} \;\ll\; \text{AGC}.$$This time-scale separation can make the system numerically stiff even before hard limits are introduced.
A physical guide vane cannot move arbitrarily fast or beyond its mechanical range. Position saturation can be written as
$$0\le y_g\le1.$$A rate limiter imposes
$$-r_c\le\dot y_g\le r_o,$$where $r_o$ and $r_c$ are opening and closing rates. One continuous implementation is the piecewise vector field
$$\dot y_g=\operatorname{sat}_{[-r_c,r_o]}\!\left(\frac{v}{T_g}\right).$$With position constraints included, a physically consistent law is more accurately written as
$$\dot y_g=\begin{cases}0,&y_g=1\ \text{and}\ v>0,\\0,&y_g=0\ \text{and}\ v<0,\\\operatorname{sat}_{[-r_c,r_o]}(v/T_g),&\text{otherwise}.\end{cases}$$This is no longer a globally smooth ODE. It is a hybrid, piecewise-smooth dynamical system.
The difficulty is usually not caused by AGC alone and not simply by choosing the "wrong" solver time step. Several numerical mechanisms can appear simultaneously.
Nonsmooth switching. At the surfaces
$$y_g=0,\qquad y_g=1,\qquad v/T_g=r_o,\qquad v/T_g=-r_c,$$the governing equation changes branch. The Jacobian used by an implicit solver changes discontinuously. Newton iterations close to a switching surface can therefore become poorly conditioned or alternate between active sets.
Adaptive-step collapse. An adaptive integrator may repeatedly reduce its step size while trying to localize closely spaced limiter events. If the controller repeatedly enters and leaves a rate or position limit, event chattering can force
$$\Delta t\rightarrow0$$numerically even though the physical trajectory remains bounded.
Integrator windup. If AGC continues integrating while the gate is saturated,
$$\dot\xi_A\neq0\qquad\text{while}\qquad y_g=y_{max},$$the controller state can move far away from the value compatible with the actuator. When the limiter releases, the stored integral state can cause a large transient or repeated switching. Anti-windup logic is therefore important.
Inconsistent initialization. A steady operating point should satisfy not only the plant equations but also the controller and limiter states. For example,
$$F(0,x^\star,z^\star,u^\star)=0,$$ $$\dot\xi_A^\star=0,$$ $$\dot y_g^\star=0,$$together with the correct active limiter branch. If $P_{ref}$, $y_g$, the transient-droop state, the AGC integrator and the plant power are initialized inconsistently, an implicit DAE solver must resolve a large discontinuity at $t=0$ and may fail.
Algebraic-loop sensitivity. When saturation, lookup tables, frequency feedback and power feedback appear in the same nonlinear loop, the local algebraic problem may become difficult, especially if the active constraint changes during a Newton iteration.
A smaller fixed step can sometimes help, but it does not remove the underlying hybrid structure. The mathematical problem is better described as
$$\dot x=f_i(x,z),\qquad 0=g_i(x,z),\qquad (x,z)\in\mathcal R_i,$$where the region $\mathcal R_i$ depends on which constraints are active. Crossing a limiter boundary changes the active vector field from $f_i$ to $f_j$.
Thus the solver must do three things correctly: integrate the continuous dynamics, detect the switching surface, and re-establish a consistent algebraic state after the switch.
A sampled controller separates the controller update from the continuous plant integration. Let
$$t_k=kT_s.$$At each tick, compute the controller state
$$q_{k+1}=\Phi(q_k,y(t_k)).$$The guide-vane position can be updated with explicit rate and position bounds:
$$\Delta y_k=\operatorname{sat}_{[-r_cT_s,r_oT_s]}(y_{cmd,k}-y_{g,k}),$$ $$y_{g,k+1}=\operatorname{clip}(y_{g,k}+\Delta y_k,0,1).$$Then use zero-order hold between ticks:
$$y_g(t)=y_{g,k},\qquad t_k\le tover each sampling interval. The limiter logic no longer sits inside every Newton iteration of the continuous solver. This can substantially improve robustness.
The successful synchronous implementation should not be interpreted as proof that AGC mathematically requires synchronous programming. What changed was the numerical structure:
$$\boxed{\text{one nonsmooth continuous closed loop}}$$was replaced by
$$\boxed{\text{smooth(er) continuous plant between explicit discrete updates}}.$$The controller became a sampled-data hybrid system whose constraints are enforced explicitly at known clock instants. This is often closer to how a real digital governor or AGC is implemented.
A fast local governor and slower AGC can have different clocks:
$$t_k^{(g)}=kT_g,\qquad t_j^{(AGC)}=jT_A,$$with
$$T_g\ll T_A.$$At a common event time, update ordering must be defined. In general,
$$\Phi_g(\Phi_A(q))\neq\Phi_A(\Phi_g(q)).$$This is an execution-order issue, not an acausal-versus-causal issue.
At a discrete controller update, physical differential states normally remain continuous,
$$x^+=x^-,$$but the algebraic variables may need to be recomputed:
$$g(x^-,z^+,u^+)=0.$$If the new controller command activates a gate bound, the consistent post-event state must also satisfy the corresponding active constraint.
A simple conditional-integration strategy is
$$\xi_{A,k+1}=\begin{cases}\xi_{A,k}-K_IT_AACE_k,&\text{if the actuator is not driving further into saturation},\\\xi_{A,k},&\text{otherwise}.\end{cases}$$A back-calculation alternative is
$$\dot\xi_A=-K_IACE+K_{aw}(u_{sat}-u_{raw}).$$Either approach reduces the mismatch between the controller internal state and the constrained actuator state.
When a nonlinear algebraic problem is difficult, a continuation problem can be introduced:
$$H(z,\lambda)=(1-\lambda)g_0(z)+\lambda g(z)=0,$$with
$$\lambda:0\to1.$$Differentiating the continuation path gives
$$\frac{dz}{d\lambda}=-H_z^{-1}H_\lambda.$$Homotopy can help initialization or post-event consistency, but it addresses a different numerical problem from controller sampling.
The three independent coordinates are
$$\boxed{t\neq k\neq\lambda}.$$$t$ is physical time, $k$ is the discrete controller-event index, and $\lambda$ is a numerical continuation coordinate. A synchronous implementation introduces a well-defined sequence $k$; it does not change the physical meaning of $t$ or turn the homotopy coordinate into physical time.
The observation that continuous isochronous and droop models solved reliably, while continuous AGC combined with guide-vane position and rate limits repeatedly failed, is consistent with the additional stiffness, nonsmooth switching, possible integrator windup and initialization sensitivity introduced by the constrained secondary-control loop. Recasting the governor/AGC as a synchronous sampled-data controller can improve numerical robustness because the constraint logic is evaluated at explicit clock events rather than inside the continuous implicit solve.
This is a plausible mathematical explanation of the observed behavior. To determine which mechanism caused a particular failed simulation, one would inspect the solver log, event count, minimum time step, nonlinear-iteration failures, active limiter state and initialization residuals.