In this study, we present an inverse optimal control approach based on extended Kalman filter (EKE) algorithm to solve the optimal control problem of discrete-time affine nonlinear systems. The main aim of inverse optimal control is to circumvent the tedious task of solving the Hamilton-Jacobi-Bellman equation that results from the classical solution of a nonlinear optimal control problem. Here, the inverse optimal controller is based on defining an appropriate quadratic control Lyapunov function (CLF) where the parameters of this candidate CLF were estimated by adopting the EKF equations. The root mean square error of the system states is used as the observed error in the case of classical EKF algorithm application, whereas, here, the EKF tries to eliminate the same root mean square error defined over the parameters by generating a CLF matrix with appropriate elements. The performance and the applicability of the proposed scheme is illustrated through both simulations performed on a nonlinear system model and a real-time laboratory experiment. Simulation study demonstrate the effectiveness of the proposed method in comparison with 2 other inverse control approaches. Finally, the proposed controller is implemented on a professional control board to stabilize a DC-DC boost converter and minimize a meaningful cost function. The experimental results show the applicability and effectiveness of the proposed EKE-based inverse optimal control even in real-time control systems with a very short time constant.