Ascend
Coding
Ascend
  • 🚀Introduction
  • VEX Robotics
    • 🛠️Building
      • 📏CAD Design
      • 🔧Best Practices
      • 🏎️Drive Trains
        • 🔩Screw Joints
        • 🥊Boxing
        • 🔵Bearing flats
        • 🛤️Fixing Friction
        • 🔥450 RPM on 2.75"
      • 🏍️Motors
      • 🪨Metal
      • Plastic
      • 🎈Pneumatics
      • ➕Additional Mechanisms
        • 🖨️3D Printing
        • ↔️Ratchets
        • 🏹Catapults
        • 🎣Intakes
        • 🏋️Lifts
    • 💻Coding
      • ⚖️Choosing Your Coding Environment
      • 🔴VEXCode Pro
        • 🖥️Getting Started
        • 🚗Drive Code
        • 🚴Coding Motors
        • 🌬️Coding Pneumatics
        • 🎛️Advanced
          • 📡Coding Autonomous
          • 📈Coding PIDs
            • ⬆️Drive PID Tutorial
            • ↩️Turn PID Tutorial
            • 🎸Tuning PIDs
              • 🔢Ziegler-Nichols Method
              • 📊Graphing PIDs
          • 📋Tasks
          • 🚝Advanced Drive Code
      • 🟡PROS
    • 📗Engineering Notebook
      • 📔Formatting
      • ⭐Notebook Walkthrough
      • 💠Decision Matrices
        • 📌Decision Point
      • ➕Additional Resources
    • 🏆Tournaments
      • 🗣️Team Interviews
        • 🪙Interview Tips
        • ⛳Interview Scoring
        • 🤽‍♀️Interview Practice Questions
      • 🤹Skills
      • ℹ️Ranking and Stats
      • 📷Filming Matches
  • Other
    • 🧑‍💼Management
      • 🕑Time Management
      • 👨‍👩‍👧‍👦Team Management
        • 👮Delegation
        • ⚓Optimal Team Size
      • 🖇️Code Management (GitHub)
      • 🚋Resource Management
      • ⁉️Stuck?
    • 🍎Physics
      • ⚙️Torque
      • 😑Stress Forces
    • 👾Extra stuff
      • 📸96504 Gallery
      • ⛑️VEX Team Resources (High Stakes)
      • 🏎️Driving Simulator
Powered by GitBook
On this page

Was this helpful?

  1. VEX Robotics
  2. Coding
  3. VEXCode Pro
  4. Advanced
  5. Coding PIDs
  6. Tuning PIDs

Ziegler-Nichols Method

Advanced coding shenanigins...

PreviousTuning PIDsNextGraphing PIDs

Last updated 1 year ago

Was this helpful?

The Ziegler-Nichols method is a simple way to estimate decent values for kP, kI, and kD. These estimates are a good starting point for manual tuning.

We need two numbers before we can run this method:

  • Ku, the critical (or ultimate) gain

  • Tu, the period of the oscillations at the critical gain

That is, Ku is the minimum value of kP for which the robot will oscillate steadily around the target. To find it, slowly increase kP until the robot wobbles consistently across the target. Then, find Tu by taking a video of the robot oscillating, and find the period, in seconds, of the oscillation. The period is how long it takes the robot to go from one side of the target, to the other side, and then back again.

Once you've found Ku and kP, you can then calculate the estimated values of kP, kI, and kD using a few equations, as shown in this PID calculator:

A small technicality

We added this section for completeness, but if it doesn't make sense, drop it. If you use the PID calculator we've provided, you've already accounted for this.

We told you to find Tu in units of seconds, but since the PID loop runs every 20 milliseconds, Tu should really be in units of 20 milliseconds. Thus, we implicitly changed some of the outputs by a factor of 50.

Alternate Link:

💻
🔴
🎛️
📈
🎸
🔢
https://html-7159868.codehs.me/pid.html