Page 1 of 1

[M031] PID Control Operation in Fixed-point Format

Posted: 02 Jan 2024, 17:15
by chhsieh3
  • Application: This example code uses the M031 series microcontroller (MCU) to realize PID control operation in fixed-point format.
  • BSP Version: M031_Series_BSP_CMSIS_V3.06.000
  • Hardware: NuMaker-M032SE V1.3
This PID example code does not require additional external hardware modules and can be executed by other NuMicro M0/M23 microcontroller (MCU).

The PID control is a common arithmetic operation used in feedback control system. The fundamental PID controller is consisted of proportional, integral and derivative terms. The 32-bit Cortex-M0/M23 processor, with built-in 32-bit multiplier and register shift function, is proper to do discrete-time PID control algorithm.

This example code implements the fixe-point arithmetic calculation in Q15.0 format, that is, the value range is in (-32768, 32767). User may refer to it to modify the code to meet different value requirement.

You can download the sample code at https://www.nuvoton.com/resource-downlo ... 2908065094