MATLAB: Does the PID Controller in c2808pmsmsim demo use -1/+1 for minimum/maximum output in Target Support Package TC2 3.0 (R2008a)

Target Support Package TC2

I am using the c2808pmsmsim demo model. I notice that "speed controller –> PID Controller" uses -1 for Minimum output and +1 for Maximum output.
I also notice the same with "Generating Space Vectors --> Generating Raw Space Vectors --> control -->".
I would like to know why these values are used (rather than, may be, -5 and +5).

Best Answer

The whole model uses normalized units. This means that all the engineering units are converted to values in between -1 and 1. Therefore the various commands that the PID react on are normalized commands.
For example, the speed request (in subsystem "speed controller") is a variable moving from -1 to 1; these limits match the maximum speed we allow on the system. Therefore the output of the PID has no reason to go beyond -1 and 1.
The same applies to the "id" and "iq" current controllers ("Generating Space Vectors --> Generating Raw Space Vectors --> control -->"). Using normalized units on a fixed point machine is very convenient because it guarantees that in most cases user will not overflow the Q format that you use for your fixed-point operations. The result of a multiplication between 2 inputs ranging from -1 to 1 is also a range from -1 to 1; so there is no need to adjust the Q format. Using normalized units allows us to use the Q17 fixed-point format throughout the model for almost all signals, without worrying about overflows.