###### Abstract
DP is an offline algorithm frequently utilized as the global optimal benchmark. [PERSON] et al. [25] proposed a two-level adaptive dynamic programming energy management strategy to adjust the power allocation between batteries and supercapacitors. In contrast, MPC is a more practical energy management approach that can be implemented online [26]. The MPC-based energy management strategy has outstanding advantages in dynamic performance, multi-objective optimization, and integration constraints [27]. In [28], [PERSON] et al. applied MPC for the energy management of unmanned aerial vehicles (UAVs) and proposed a hierarchical MPC to track the reference trajectory generated from the trajectory optimization layer. In [29], [PERSON] et al. proposed an effective MPC-based energy management strategy for plug-in hybrid electric vehicles, where the Markov chain predicts the future load power demand. The above studies show that MPC-based energy management strategies can obtain satisfactory online power allocation results. However, traditional MPC-based methods can suffer from deteriorating optimization capability due to complex operation conditions, stimulating studies by combining MPC with other algorithms for improvement. [PERSON] et al. [30] proposed an MPC-based energy management strategy with double Q-learning, where the double Q-learning is used to solve the receding horizon optimization. In [31], [PERSON] et al. proposed a novel approach by combining MPC and an equivalent consumption minimization strategy, considering the motor temperature as an essential optimization term in the objective function and using the gray wolf optimization algorithm to minimize the objective function. In [32], [PERSON] et al. proposed a hierarchical energy management strategy where the upper layer plans a global battery state-of-charge (SoC) reference trajectory based on the deep deterministic policy gradient, and the lower layer traces the optimal SOC trajectory by MPC. For the MPC-based energy management strategies, multiple optimization objectives are typically optimized simultaneously, e.g., the lifetime/operation cost of the whole energy storage system and the SoC of the auxiliary energy storage. In particular, the fuel economy is usually considered the primary objective [33] in hybrid electric vehicles, and this optimization objective considers total cost rather than sporting performance. MPC-based energy management strategies can balance the optimization of operating costs against the battery SoC [34]. In addition, there are also optimization objectives that consider reducing battery current fluctuations [35] and improving driving safety [36]. Thus, designing the optimization objectives for a particular system is also a critical issue for MPC-based energy management strategies. The above literature analysis reveals that HESSs have been widely applied to electric vehicles/UAVs. However, there are very limited explorations for legged robot applications. Legged robots pose complex power demands due to sophisticated working conditions, while various terrains and environmental perturbations significantly influence kinematic performance. Therefore, implementing a HESS into legged robots presents more intricate challenges, which means a single optimization objective is insufficient for the complex power situation of legged robots. Moreover, legged robots also have high requirements for kinematic performance, and the energy storage system needs to ensure a high power output, which poses a challenge for the energy management strategy. Consequently, the energy management strategy of the legged robot with a HESS should ensure the kinematic performance and optimize the battery capacity loss under diverse operation conditions. To overcome the challenges above, a learning-based MPC energy management strategy is proposed for a legged robot with a battery-supercapacitor hybrid energy storage system. Firstly, the mathematical model of the legged robot is established in detail.