For calculating the machine constant you can use a LCR meter and find L/R ratio, it can be considered as machine constant for time being your frequency should be less than this frequency otherrwise your machine will undergo into saturation and with increase in frequency you will observe decrease in speed. Also, you shouldn't operate the a machine beyond its rated voltage and frequency.
How many phases your motor has?
Also, I would like to look into your code for pwm because many a time the pwm code is wrong because its quite a tricky one.
For time being you can set your frequency at 50Hz(if your mains are 220V, 50Hz) or 60Hz(if your mains are 110V, 60Hz) then vary the duty cycle and reply your observation.