1. Is any PID control related function available in automotive library for S12Z? (only PI is their in 1.9 version)
2. In S12Z: any evaluation boards available for Position/Torque control testing for BLDC Motors & any FOC SW is available?
Ad 1.: yes, the GFLIB_ControllerPIDpAW is available in Automotive Math and Motor Control Library Set | NXP v1.1.18 or higher for S12ZVM. Just follow the example provided in the library documentation in order to use it.
Ad 2.: Evaluation boards with S12ZVM are equipped with resolver interface. Therefore, they can be used for position control testing. The FOC itself is not a "position control" - it is usually in the loop of torque control, cascade speed control or cascade position control (however, there may be other structures more simplified or more complicated). The FOC in the "speed control" version is available in a sensroless mode - to support NXP's development kits with low-cost motors provided. However, these motors are equipped with Hall-switch sensors only, which is not good enough for position control. The same is valid for model-based sensorless FOC, since it is not reliable at zero or low speeds.
To provide you with some guidance, I would recommend to:
- review the S12ZVM Evaluation Board | NXP
- check out the MTRCKTSPNZVM128|Development Kit S12 MagniV | NXP , especially the SW packages and application notes
- if you would like to know more about the resolver processing, here is some ppt: https://www.nxp.com/webapp/sps/download/preDownload.jsp?render=true and the SW implementation example is available for example here: MPC5744P Development Kit for 3-phase PMSM | NXP (SW package includes functions to process the sensor signals)
- if you would like to have a different sensor, please follow the info of the sensor manufacturer. For example - if it is an angle sensor (magneto-resistive or Hall), then the signals are probably sine and cosine waves, which can be processed with the ADC. In such cases - I'd recommend to check whether the signals are available at all speeds including zero speed and if it is an absolute sensor.