In this paper, the problem of controlling an inverted pendulum mounted on a movable platform (trolley), which is capable of moving horizontally along the guide using a DC motor, is considered in detail. A unique feature of this design is the presence of rollers that ensure that the base is pressed against the guide, which, in turn, leads to a significant friction force between the trolley and the rail. In conditions where the trolley is moving, it is necessary to solve the problem of stabilizing the pendulum in an upright position, while simultaneously adjusting the position of the trolley itself. To achieve this goal, a new discontinuous control law is being developed in the article, which makes it possible to effectively compensate for the force of dry friction. This solution makes it possible to maintain the pendulum in a stable state with a given accuracy. An important aspect of the work is the analysis of the influence of system parameters on the quality of control, which allows optimizing the control algorithms. The work includes experimental data and application examples of the proposed approach, demonstrating its effectiveness in various scenarios. The results show that the proposed control method significantly improves the stability of the system and allows achieving the desired results with minimal time spent on regulation. Thus, this study contributes to the development of the theory of automatic control of objects with nonlinear dynamic characteristics, such as an inverted pendulum on a trolley. The presented solutions can be applied in various fields, including robotics, aerospace engineering and stabilization systems.