Skip to content

AlphaRoboticsTeam/Arduino-Control-Systems

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 

Repository files navigation

🧭 Control systems overview

this documents explains the fundamental classical control algorithms used in robotics and automation-focusing on how they process error signals to stabiliz or control system.

  • P (Proportional)
  • PI (Proportional-Integral)
  • PD (Proportional-Derivative)
  • PID (Proportional-Integral-Derivative)

⚙️1. P Controller (Proportional Control)

🧠Description

the proportional controller produces an output that is directly proportional to the current error between the desired setpoint and sensor value process variable.

Formula:

P = Error * Kp

  • error : sensor value - setpoint
  • Kp : proportional gain

Characteristics.

  • Fast respons
  • Simple implementation.
    Function code

⚙️2. PI Controller (Proportional+Integral Control)

🧠Description

the Pi controls adds an integral term to remove the steady state error by accumulating past errors.

Formula:

PI = (KpError)+(Kisum(error)*dt

  • Ki : integral gain (eliminates persistent offset)

Characteristics.

  • Zero steady-state error
  • Smoother oytput than p
  • Slow reaction due to the integral term.
    Function code

⚙️3. PD Controller (Proportional+Derivative Control)

🧠Description

the PD controllers prediccts future error by considering the rate of charg of the error.

Formula:

PD = (KpError)+(Kd(de(t)/dt)

  • Ki : integral gain (eliminates persistent offset)

Characteristics.

  • Zero steady-state error
  • Smoother oytput than p
  • Slow reaction due to the integral term.
    Function code

⚙️4. PID Controller (Proportional+Derivative Control)

🧠Description

the PID controllers combines the proportional,integral and derivative terms.
it is most widely used control algorithm in industry and robotics.

Formula:

PID = (KpError)+(Kisum(errordt))+(Kd(de(t)/dt)

  • Kp : proportional gain
  • Ki : integral gain (eliminates persistent offset)
  • Kd : derivative gain (anticipates future behaviors)

Characteristics.

  • Precise and stable
  • Handles disturbances effectively
  • Requires careful tuning of Kp,Ki and Kd
    Function code

⚖️ Comparison of Controller Advantages and Disadvantages

Controller Advantages Disadvantages
P (Proportional) ⚡ Simple and easy to implement
⚙️ Fast response to changes
🧩 Requires minimal tuning
❌ Cannot eliminate steady-state error
📉 May cause oscillation or overshoot
🔊 Sensitive to system gain variations
PI (Proportional + Integral) ✅ Eliminates steady-state error
🔄 Smooth and stable output
📈 Improves accuracy for constant disturbances
🐢 Slower response than P
⚠️ May introduce overshoot
🧮 Integral term can cause “windup” if not limited
PD (Proportional + Derivative) 🚀 Faster and more stable than P
🧠 Predicts future error trends
📉 Reduces overshoot effectively
❌ Does not eliminate steady-state error
🔊 Very sensitive to measurement noise
⚙️ Requires careful tuning of Kd
PID (Proportional + Integral + Derivative) 🌟 Combines all benefits: fast, accurate, stable
🎯 Eliminates steady-state error
⚙️ Excellent for most control systems
⚠️ Harder to tune (3 parameters)
💻 Computationally more demanding
🧩 Over-tuning can cause instability

About

Modular Arduino implementation of P,PI,PD and PID controllers with examples and diagrams

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages