What is the reason for inability to track maximum power point for various solar irradiation .

I have been working on this circuit simulation for a while now, the work is based on the Maximum power point tracking Incremenrtal Conductance Algorithm with a buck-boost converter.
I want to test for various solar irradiation such as 1000w/m2,800w/m2,600w/m2,400w/m2 and 200w/m2. Whenever I run my simulation for 1000w/m2 I realized it will track with the prev_D value that I used, meanwhile, when I run the simulation for other various solar irradiation values it will never track. Then I realized I keep changing my prev_D value manually to be able to track different solar irradiation. I have been on this work for a month and I am not getting the results for this work. Please this has already given me a sleepless night. I don’t know what the problem could be with the whole model.
Attached to this is the circuit files , the PV panel PV and IV curve for the PV panel that I used and the flow chart algorithm that should be declared into the c-scrpt block of the MPPT.
Please kindly check and correct me.

Sorry you have having trouble with this project, but the question as to why your incremental inductance algorithm is not working would be best directed towards your colleagues, professor, or classmates.

In the interest of being helpful, a few issues jump out:

Your model relies on D = PrevD +/- deltaD but deltaD = 0.0 in your code.There is a an if((Ipv-PREV_I/Vpv-PREV_V)>!(-Ipv/Vpv)) statement. The “>!” operator is probably a typo.I would add additional debugging outputs so you can understand what each of your intermediate variables are doing for each execution.Your C-Script implementation should use {} braces to enclose your nested if conditions - otherwise your script is very likely to behave in an unexpected way. C requires the use of the {} braces to enclose multi-line if-else statements. C does have single-line if statements, but it is generally recommended to use braces as it is clearer and less prone to bugs. C does not rely on indentation/white space to determine how if-else code blocks are grouped, but doing so will make your code more readable and debuggable. See the MPPT example in the “Single-Phase PV Inverter with Partial Shading” demo model for an example of good formatting.

 

I am having trouble with the project that is the reason I posted , more so I am new to C language.