I am not a great specialist in motor drivers.
See Wikipedia VFD
Maybe another guy could answer
My idea is that when the rpm are steady .. torque produced by the motor
is equal to the loading torque.
When there is some acceleration or deceleration, the problem is more complicated.
When starting from stop if you have position sensors or not (sensorless) the algorithms are different.