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 “MPPT Solar Panel Fuzzy-Neural Class #4: Fuzzy Logic for MPPT: Fuzzification, Rules, Defuzzification”.
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.
Here is the final result, a Fuzzy Logic MPPT with 25 rules that we wrote from scratch. The step size is large when far from the peak and decreases as it approaches, so oscillation at the peak practically disappears. But can Fuzzy escape from local peaks? Let's see. Hello, welcome to episode four of the Fuzzy Solar Panel MPPT series by Nurel. PNO uses a fixed step, so it's forced to choose between fast but oscillating, or smooth but slow. Fuzzy Logic handles this with rules like humans. If the slope is large, take a big step. If almost flat, take a small step. Today we are building it from scratch without a Fuzzy library.
Create a Fazi.py file. There are 5 labels: negative big, negative small, zero, positive small, and positive big, with centers ranging from -1 to 1. The output is a voltage change from -3 to 3 volts. The rule table is 5x5 in size, with rows representing E, the slope of power against voltage, and columns representing C, the change in E. For example, if E is positive big, we are far to the left of the peak, so the voltage is increased significantly. Membership functions calculate the degree of membership on 5 triangles, with the left and right ends saturated at one. This is the fuzzification stage.
The inference function calculates the strength of the 25 rules with the N operator as minimum, then defuzzification with weighted averaging. Each rule output is multiplied by its strength, summed up, then divided by the total strength. The Fuzzy function calculates E from the change in power divided by the change in voltage, and C from the difference in E. Both are normalized with a gain of one twentieth. If the voltage doesn't change, we add a little disturbance so the slope can be recalculated.
Create a test underscore Fazi.py file. First, visualization. Run. The left graph shows 5 overlapping triangular membership functions. The right graph shows the control surface from 25 rules. Flat in the middle when the slope is almost 0, and steeply inclined at the edges when far from the peak.
Now compare with PNO in the same scenario. Their efficiencies are the same, around 89 percent. But look at their oscillations, PNO swings around 0.35 volts, while Fuzzy only swings around 0.01 volts, almost stationary at the peak. Unfortunately, during shadowing, Fuzzy remains stuck at the same local peak, because Fuzzy also only sees the local slope. To find the global peak, the algorithm must know the entire curve's shape. Done.
We have built a Fuzzy logic MPPT from scratch, with fuzzification using 5 triangular functions, 25 rules, defuzzification using weighted average, and observed its control surface. In the next episode, we will train Hanvis, the neuro-fuzzy network, to estimate the global peak's location. Currently working on a thesis, dissertation, or research in the field of solar energy and renewable energy? Cerdas Inovasi Digital helps with the implementation and simulation of solar panels, from the 1 diode model, partial shedding, MPPT, perturb and observe, and incremental conductance, fuzzy logic, up to Anvis, and also opens Python programming courses for electrical engineering. Want to master the entire series, from solar panel models to comparisons of all MPPT methods? All 6 episodes, complete with PDF step-by-step 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 the single class with lifetime access. Subscribe now at the premium page cerdas inovasi digital.com Contact us via WhatsApp, or visit cerdas inovasi digital.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 →