Memuat
Memuat
Want to go deeper?
Join one of our courses or ask us directly on WhatsApp.
Picked from the software, topic, and level of “Class PID & FOPID Metaheuristics #2: PID and Classical Ziegler-Nichols Tuning Method”.
Other ways we can help with Python.
Learn with a mentor
Scheduled Simulation & Engineering courses with live guidance and a certificate.

Course/Training Ansys ~ Heat Transfer and Heat Flux Analysis
★ 5.0 (10)

Course/Training MATLAB — MATLAB App Design: The Ultimate Guide to MATLAB Apps
★ 5.0 (10)

Course/Training Ansys — Airflow Simulation of a Car Radiator with ANSYS
★ 5.0 (9)
Have it built for you
No time to learn Python? Our team can do the project for you.

Matlab Development Service — Complete Neural Signal Processing and Analysis Zero to Hero
★ 5.0 (59)

Ansys Maxwell Development Service
★ 5.0 (50)

Petrel Development Service
★ 5.0 (14)
Get notified about new Python classes
At most one email a week. Unfollow anytime with one click.
The full narration of this video. The current sentence is highlighted while the video plays; click any sentence to jump there.
This is the final result, we are looking for the stability limit of the AVR, the point where the voltage oscillates continuously, then using the Ziegler-Nichols rule to obtain the PID parameters. The error disappears, but the overshoot is still 53%. Let's start. Hello, welcome to episode two of the PID and Fractional Order PID optimization series. A PID controller has three parameters: proportional, integral, and derivative. Since 1942, engineers have used the Ziegler-Nichols method to tune them. Today we are applying it and seeing why this classical method is not sufficient.
Create a PID.py file Our PID controller is written as a transfer function KAP plus KAI over S plus the derivative term. Pure derivative cannot be implemented and is very sensitive to noise, so we add a first-order filter with N100. The critical gain function searches for KAU, the largest proportional gain that is still stable,
using the bisection method, try the midpoint value, if stable, raise the lower bound, if not, lower the upper bound, 60 times. At KAU, the closed-loop pole is exactly on the imaginary axis, and the imaginary part gives the oscillation frequency, so the PU period is equal to 2 pi over omega. The Ziegler-Nichols rule always gives a proportional gain of 0.6 KAU, integral time of PU over 2, and derivative time of PU over 8. Create a tuning_underscore_zn.py file and run it.
Critical gain of AVR is 1.702 with oscillation period of 1.089 seconds. Ziegler-Nichols gives a proportional gain of 1.021, integral gain of 1.874, and derivative gain of 0.139. With P only at half KAU, overshoot 61,4% and error is still 0,121. PI in Ziegler-Nichols eliminates error until 0 and reduces settling time to 2,99 seconds, but overshoot is still 53%. Let's look at the graph.
Near the KAU, voltage oscillates continuously with almost constant amplitude, this is the oscillation sought by Ziegler-Nichols. With half KAU, the oscillation is damped but does not reach one. PI in Ziegler-Nichols reaches one without error, but the initial spike is still high. The Ziegler-Nichols rule is indeed designed for an aggressive response, so we need a better tuning method.
Done. We have written PI with a derivative filter, searching for critical gain using stability bisection, and applied the Ziegler-Nichols rule to AVR. In the next episode, we will learn about fractional order PID, PID with fractional order integral and derivative. Currently working on a thesis, dissertation, or research in the field of control systems and optimization? Cerdas Inovasi Digital helps implement control systems, from modeling DC motors and AVR generators, tuning PI in Ziegler-Nichols, fractional order PID, up to meta-heuristic optimizations such as whale optimization and Harris-Hawkes as well as opening a Python programming course for electrical engineering. Want to master the entire series, from alias functions up to statistical analysis and robustness testing? All six episodes, complete with step-by-step PDF guides and source code, are available to premium tutorial subscribers. Subscribe starting at Rp69.000 per month, save 28% with the 12-month package, or pay once Rp999.000 for lifetime access. Want just one class? Buy individual classes with lifetime access. Subscribe now on the premium page cerdasinovasidigital.com. Contact our WhatsApp, or visit cerdasinovasidigital.com. Thank you for watching, see you in the next episode.
Type a question or keyword; we find the part of this episode that explains it and jump the video there.
Notes are saved with the current video time and are only visible to you.
Stuck on a step? Ask here; the instructor and other learners can answer.
No questions yet.

Cerdas Inovasi Digital Team
Software developers, BIM & 3D engineers, and AI practitioners
We build software, BIM models, games and AI automations for clients every day, and turn that hands-on work into step-by-step classes: every step is shown on screen and comes with a PDF guide you can keep.
See our clients →