You are doing the right thing by changing the Speed_per_unit_scaler variable to desired rpm.
Apart from this, there are few more changes that are required. These affect the operation of motor at higher speeds. These are mentioned below:
1) Change Speed_per_unit_scaler
- (You may skip this step, if already completed)
- Type "edit c28035pmsmfoc_data" at your matlab command prompt.
- Update Speed_per_unit_scaler = 3000; (Or desired speed, supported by the motor being used)
- Run the script before generating code.
2) Change position sensing to Hall sensors
- The SMO has limited accuracy at higher speeds to estimate position of the rotor.
- The position sensors, e.g. Halls, QEP, perform better at higher speeds.
- This does not mean that you can't use the SMO, it's just that you may not be able to spin the motor at maximum possible speeds, if you're using the SMO.
3) Update saturation values of Current_PI controllers (both Id & Iq):
- These values limit the maximum voltage fed to motor via inverter.
- Here, sqrt(Vd^2 + Vq^2) = Vdc/sqrt(3) = 1pu.
- Since, the controller cannot provide voltages > 1pu, I'd suggest to limit this to +0.707.
- This is because (0.707^2 + 0.707^2) = 1.
4) Update saturation values of Speed_PI controller
- This limits the maximum allowable current into the motor.
- Here, 1pu = 8.9A. And depending upon the motor's rated current, you may limit this value.
- If you have 1pu as the limits, the hardware may trip at starting transients.
- If you do not know the motor's rated current I'd suggest to limit this to +0.5pu.
5) Take safety precautions
- As soon as the generated code downloads, the motor is going to spin at desired speeds.
- Be careful about sudden speed changes as the fast spinning shafts has hazards.
Hope this helps!