The authors provide a method for compensation of the reactive power inside a well. In the environment Matlab/ Simylink a model was developed of the site of the electrical centrifugal pump unit power supply from the transformer substation. A comparison is made of the proposed method of downhole reactive power compensation with the existing method.