Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

P&O Algorithm #17

Open
Shaopus opened this issue Dec 13, 2021 · 1 comment
Open

P&O Algorithm #17

Shaopus opened this issue Dec 13, 2021 · 1 comment

Comments

@Shaopus
Copy link

Shaopus commented Dec 13, 2021

Hi
I have a problem with mppt algorithm about your code, as follow:

if(powerInput>powerInputPrev && voltageInput>voltageInputPrev)     {PWM--;}  //  ↑P ↑V ; →MPP  //D--
else if(powerInput>powerInputPrev && voltageInput<voltageInputPrev){PWM++;}  //  ↑P ↓V ; MPP←  //D++
else if(powerInput<powerInputPrev && voltageInput>voltageInputPrev){PWM++;}  //  ↓P ↑V ; MPP→  //D++
else if(powerInput<powerInputPrev && voltageInput<voltageInputPrev){PWM--;}  //  ↓P ↓V ; ←MPP  //D--
else if(voltageOutput<voltageBatteryMax)                           {PWM++;}  //  MP MV ; MPP Reached - 

About P&O Algorithm, if(powerInput>powerInputPrev && voltageInput>voltageInputPrev) , should increase PWM.
However,your code is the opposite of it, Can you explain?
Thank you!

@Tomsan83
Copy link

Tomsan83 commented Dec 27, 2021

i think it is ok, when power goes up and voltage as well, you are climbing on the curve of power on the right drection so you need to decrease PWM. You increase PWM when moving left and decrease when moving right. It is because the fact when voltage is MAX, the current is MIN and opposite. For detail go to Angelo project page:
https://www.instructables.com/DIY-1kW-MPPT-Solar-Charge-Controller/
chart called PV iV graph op.regions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants