Memuat
Memuat
Watch every step above performed live, with English narration.
0 plays
Class book
Page 1 / 6
Cover: PID & FOPID Metaheuristic Class #4: ITAE/ISE Objective Functions and New Metaheuristic Algorithms (Whale, Harris Hawks)
Click a page or use ◀ ▶ to turn · swipe on mobile · to enlarge
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 #4: Objective Functions ITAE/ISE and New Metaheuristic Algorithms (Whale, Harris Hawks)”.
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, two new generations of metaheuristic algorithms, Whale Optimization and Harris-Hawks, which we wrote from scratch and tested on benchmark functions. Harris-Hawks even found the global minimum of the highly deceptive Rastrigin function. Let's get started. Hello, welcome to episode four of the PID and Fractional Order PID optimization series. To automatically tune PID, we need two things. Numbers that evaluate the good or bad of the response, which are the objective function and the algorithm that searches for the best parameters. Today we are making both of them, with two metaheuristics inspired by animal hunting behavior.
Create metaheuristik.py file The objective function calculates the step response of the closed-loop system for 3 seconds then evaluates the error. ITAE, integral of time multiplied by absolute error, gives a heavy penalty for long-lasting errors, thereby producing a fast and quiet response. ISE, integral of squared error, punishes large errors at the beginning. If the system is unstable, we give a value of one million so that this parameter is avoided.
The WOA function is the Whale Optimization Algorithm. Whales hunt by encircling prey and spitting bubble nets in spiral shapes. Parameter A decreases from 2 to 0. When A is small, whales approach the best whale. When large, it explores following a random whale. Half the time, whales move in spiral around the best position with an exponential multiplied by cosine formula.
The HO function is Harris-Hawks Optimization. A swarm of Harris hawks surrounds a rabbit whose energy E is continuously decreasing. When the rabbit's energy is still high, the hawks explore. When the energy decreases, the hawks encircle softly or aggressively. And if the rabbit still tries to run, the hawks pounce with a Levy jump, a random step that can sometimes be very far, to escape from local minima.
Create the test underscore metaheuristik.py file and run it. The sfir function has one valley, whereas rastrigin has hundreds of trap valleys. On sfir 10 dimensions, WIOA reaches 10 to the power of minus 22 and HHO 10 to the power of minus 49. On rastrigin, WIOA gets trapped at 13.99, whereas HHO finds the global minimum 0. As a reference, PI in Ziegler-Nichols on AVR has ITAI 0.4331 and ISI 0.2776.
Let's look at the graphs. The convergence curve of HHO on sfir decreases gradually with several sharp jumps, a result of the encircling and Levy jump strategies. On rastrigin, WIOA remains flat because it is trapped, whereas HHO continues to decrease until 0. But benchmark results do not always apply to real-world problems. So we will test both on PID and FOPID in the next episode. Done.
We have formulated the ITAI and ISI objective functions, written Well Optimization Algorithm and Harris-Hox Optimization from scratch, and tested them on benchmark functions. In the next episode, we will optimize PID and FOPID for AVR and DC motor. 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, to tuning PI using Ziegler-Nichols, fractional order PID, up to meta-heuristic optimization such as Whale Optimization and Harris Hawks, as well as opening a Python programming course for electrical engineering. Want to master the entire series, from function design to statistical analysis and robustness testing? All 6 episodes, complete with step-by-step PDF guides and source code, are available for 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 the single class with lifetime access. Subscribe now at 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 →