The paper deals with the problem of control of an inverted pendulum mounted on a
movable cart. The cart can be moved along a guide rail. There is a dry friction force
between the cart and the rail, and this force can be regulated by springs which are
included in the construction of the cart. The control goal is stabilization of the pendulum in
the upper position with the prescribed position of the cart on the guide rail. There is a
problem of compensation the substantial nonlinear disturbance (dry friction force). The
article is devoted to a new relay control law synthesis, which helps to attenuate the
perturbation and solve the mentioned problem with the given accuracy.