MATLAB Answers


how to make my simulation of photovoltaic with constant power load work..

Asked by yasir
on 24 May 2012
Latest activity Commented on by Sofia Carvalho on 12 Apr 2017

i'm make a model of photovoltaic with constant power load but when i try to simulate it, it shows that one of the blocks in my simulation which is the divide block is in error.. the message states that "Algebraic state in algebraic loop containing 'RL/Divide' computed at time 0.0 is Inf or NaN. There may be a singularity in the solution" .i try to reduce the step size and change the solver but it still the same..


Log in to comment.



2 Answers

Answer by Siva Malla on 31 May 2012
 Accepted Answer

I think use limiter or saturation at dividing part and make lover limit as less value, like 0.0001, and upper limit as inf. then may be your problem will solve. other wise, I uploaded a PV model, you can download this.


thank u siva malla.. i think i want to try using your PV model, in case my current PV model doesnt work.

Siva Malla.. I couldnt get your uploaded file..can you please mail it to

Log in to comment.

Answer by K E
on 24 May 2012

It sounds like you are dividing by zero at the first time step, so make sure the initial condition of the signal that is being divided is set to a finite value. [I am sure someone more experienced than me can give you more insight.] There is information on workarounds for 'divide by zero' errors here and on detecting them here.


thnk u K E..i try to follow your instructions but the problem is still the same. the error message tells me to reduced the step size which the fixed step size or by tightening the error tolerance. i try to reduce the fixed step size as little as "e-12" and try to change the solver method but it didn't work at all. is there any solution to this because i didn't know what else to do

i ve the same error message in PV model but it is in the product block and i ve reduced the step size and change the error tolerance &change the solver but still have the message any suggestions ??

Log in to comment.

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today