This example shows a more detailed circuit- and logic-level implementation of the PID Control Loop shown in the companion example, “PID Speed Control Loop – Continuous”. The ideal motor drive block of the “Continuous” version is expanded here, to include both a H-bridge motor drive, and also the digital logic necessary for converting the continuous PID controller output into the desired PWM signals that are distributed to drive the gates of the power MOSFET switches. The MOSFET model was calibrated to represent an IRF3710, using only information published on the manufacturer’s datasheet.
The rest of the system, including the PID block-diagram controller, the mechanical fan load and the DC Motor characterized to represent an FRC (First Robotics Competition) CIM Motor, are the same as in the Continuous version. While the simulation time for this switching version is significantly longer, more detailed information about practical circuit performance and component sizing is available. For example, the fan speed step response is somewhat different from the conceptual design, because of the losses in the MOSFETs under high current conditions, as well as voltage drop in the battery. Also, information regarding component stress levels within the “datasheet specified” MOSFETs and Diodes is provided.