In this article, I will present a comprehensive approach to further expanding upon my previous work by incorporating simulation capabilities into the development of a dynamic model for a self-balance robot, specifically a Segway. The model will be described using second-order motion equations based on Lagrangian mechanics. While our focus…