A method of performing scalar-based control of a motor (M) connected to a power converter via at least one passive electrical reactance component , wherein the at least one passive electrical reactance component includes a filter , a transformer , or a cable having a length of the order of kilometres, wherein the method comprises: estimating a motor current (i m ) at terminals of the motor (M) to thereby obtain an estimated motor current (im), controlling the power converter based on the estimated motor current (im), and measuring a power converter current (i c ), characterized in that the method comprises prior to controlling, generating a voltage perturbation based on the estimated motor current ( i m ∗ ), wherein the controlling is based on the voltage perturbation, wherein the estimating involves utilising a model of the at least one passive electrical reactance component , and wherein the method comprises: comparing a natural frequency (F R ) of a simplified model of the at least one passive electrical reactance component and the motor (M) with a nominal speed of the motor (M), wherein the controlling is based on the estimated motor current only if the natural frequency (F R ) is within a predetermined range from the nominal speed, and wherein in case the natural frequency (F R ) is outside the predetermined range the controlling is based on the measured power converter current (i c ). wherein the method comprises: estimating a motor current (i m ) at terminals of the motor (M) to thereby obtain an estimated motor current (im), controlling the power converter based on the estimated motor current (im), and measuring a power converter current (i c ), characterized in that the method comprises prior to controlling, generating a voltage perturbation based on the estimated motor current ( i m ∗ ), wherein the controlling is based on the voltage perturbation, estimating a motor current (i m ) at terminals of the motor (M) to thereby obtain an estimated motor current (im), controlling the power converter based on the estimated motor current (im), and measuring a power converter current (i c ), characterized in that the method comprises prior to controlling, generating a voltage perturbation based on the estimated motor current ( i m ∗ ), wherein the controlling is based on the voltage perturbation, wherein the estimating involves utilising a model of the at least one passive electrical reactance component , and wherein the method comprises: comparing a natural frequency (F R ) of a simplified model of the at least one passive electrical reactance component and the motor (M) with a nominal speed of the motor (M), wherein the controlling is based on the estimated motor current only if the natural frequency (F R ) is within a predetermined range from the nominal speed, and wherein in case the natural frequency (F R ) is outside the predetermined range the controlling is based on the measured power converter current (i c ). comparing a natural frequency (F R ) of a simplified model of the at least one passive electrical reactance component and the motor (M) with a nominal speed of the motor (M), wherein the controlling is based on the estimated motor current only if the natural frequency (F R ) is within a predetermined range from the nominal speed, and wherein in case the natural frequency (F R ) is outside the predetermined range the controlling is based on the measured power converter current (i c ). <EOS>