  Establishing an execution time certificate in deploying model predictive
control (MPC) is a pressing and challenging requirement. As nonlinear MPC
(NMPC) results in nonlinear programs, differing from quadratic programs
encountered in linear MPC, deriving an execution time certificate for NMPC
seems an impossible task. Our prior work \cite{wu2023direct} introduced an
input-constrained MPC algorithm with the exact and only
\textit{dimension-dependent} (\textit{data-independent}) number of
floating-point operations ([flops]). This paper extends it to input-constrained
NMPC problems via the real-time iteration (RTI) scheme, which results in
\textit{data-varying} (but \textit{dimension-invariant}) input-constrained MPC
problems. Therefore, applying our previous algorithm can certify the execution
time based on the assumption that processors perform fixed [flops] in constant
time. As the RTI-based scheme generally results in MPC with a long prediction
horizon, this paper employs the efficient factorized Riccati recursion, whose
computational cost scales linearly with the prediction horizon, to solve the
Newton system at each iteration. The execution-time certified capability of the
algorithm is theoretically and numerically validated through a case study
involving nonlinear control of the chaotic Lorenz system.
