Skip to content

Latest commit

 

History

History
36 lines (20 loc) · 2.95 KB

README.md

File metadata and controls

36 lines (20 loc) · 2.95 KB

Practical considerations of the digital PID controller

The documentation, as it is, is not complete because the second presentation has yet to take place.

Abstract

The goal of these presentations is to study PID algorithm and its practical implications. Theoretical discourse is followed by design and development of C++ PID library for embedded system and its implementation for angular rate control of DC brushed motor.

Part I: Theoretical analysis

We start with the PID control in its standard form

$$u(t)=k_{\text{p}}+k_{\text{i}}\int_{0}^{t}e(\tau)\text{d}\tau+k_{\text{d}}\frac{\text{d}}{\text{d}t}e(t)$$

and explore the necessary steps that need to be considered for a robust digital implementation of the algorithm. We begin with a discussion on discretization integration and derivative terms of the PID to ensure that the frequency response of the discretized system is closest to the corresponding time domain representation.

Discretization is followed by examination of the behavior of derivative action to noisy input and step response; formal leads to the necessity of LPF and latter to the notion of set-point weighting. Finally, anti-windup effect is considered with its remedies.

While going through possible problems with their respective solution, we design an elaborate architecture of the PID controller whose actual digital implementation in embedded hardware would be the subject of Part II.

Part II: Hardware implementation

This presentation focuses on details regarding the implementation of PID controller designed on Part I on embedded hardware; Arduino Mega. Angular velocity control of DC motor using PI controller is used as an example. We start with a theoretical argument to establish that PI controller can indeed stabilize the angular rate.

The angular rate feedback is derived by counting the pulses generated by the encoder fitted on back of the motor. We will observe the effect of resolution of encoder on the feedback and examine how the precision of the controller is limited by the resolution.

Precise timing generation and event scheduling is performed using timer interrupt. We also discuss some important features of C/C++ that can be used to write safe software. The presentation ends with complete software architecture which can regulate the angular rate to desired value.

Analysis of the windup effect, anti-windup method, setpoint weighting, ramp generation, and trajectory tracking will be the subject of the Part III.

Resources

  1. Slides: Practical considerations of the digital PID controller - I
  2. Slides: Practical considerations of the digital PID controller - II
  3. Report on the PID controller based on the presentation
  4. Source code to the demonstration project on PID control of DC brushed motor