LogoLogo
  • CTRL ALT FTC
  • Why Control Theory is A Must Have
  • Introduction to Open Loop Control
  • Introduction to Closed Loop Control
  • The PID Controller
    • The Proportional Term
    • The Integral Term
    • The Derivative Term
    • Tuning Methods of A PID Controller
    • Improvements to the PID Controller
  • Feedforward Control
  • Advanced
    • Full State Feedback
    • The Kalman Filter
    • Gain Scheduling
    • Motion Profiling
    • SMARTDAMP Algorithm
  • Continued Learning
    • Extra Resources
    • Video Tutorials
    • Glossary
  • Practical Examples
    • FTC Motor Control
    • Drivetrain Control
    • Dealing with Angles
    • Roadrunner Control Explained
  • Homeostasis Library
    • What is Homeostasis?
    • Installation
    • Included Controllers
    • State Estimation and Filters
    • Systems in Homeostasis
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
Export as PDF
  1. Advanced

SMARTDAMP Algorithm

Our custom approach to PID tuning

More content soon. TLDR: if you have the kV and kA feedforward values. we can use that as a model for our system.

Then, we solve for the poles of the system. After some math, we arrive at the following:

KD=2KaKP−KvK_D=2\sqrt{K_aK_P}-K_vKD​=2Ka​KP​​−Kv​

This will guarantee a critically damped PID response for a PD controller, given an arbitrary choice of Kp

It is recommended that the following inequality is true:

Kp≥Kv24KaK_p \geq \frac{K_v^2}{4K_a}Kp​≥4Ka​Kv2​​

Otherwise, Kd will be negative and you get a scary non-minimum phase system.

Specifying percent overshoot

A Critically damped system is not necessarily the fastest possible response, sometimes you are okay with a bit of overshoot. This modified version of the SMARTDAMP algorithm allows you to specify a percent overshoot in addition to your proportional gain to give you your optimal choice for Kd

Kd=2ζKaKp−KvK_d = 2 \zeta \sqrt{K_a K_p} - K_vKd​=2ζKa​Kp​​−Kv​

We can find zeta using the following equation given PO (Percent overshoot)

ζ=−ln⁡PO100π2+ln⁡2PO100\zeta =\frac{-\ln{\frac{PO}{100}}}{\sqrt{\pi^2 + \ln^2{\frac{PO}{100}}}}ζ=π2+ln2100PO​​−ln100PO​​

Last updated 1 year ago

Was this helpful?

where Zeta is our .

dampening ratio