Borrar filtros
Borrar filtros

How do I create an PV system in Simulink?

9 visualizaciones (últimos 30 días)
Johanna Rigby
Johanna Rigby el 8 de Mzo. de 2019
Respondida: Joel Van Sickel el 24 de Ag. de 2020
I'm quite new to simulink and I've been trying to get a PV system in simulink running for a few days now and I keep running into a multitude of errors. The most recent error that I have been unable to fix is:
An error occurred while running the simulation and the simulation was terminated
Caused by:
  • Solver encountered an error while simulating model 'untitled1' at time 0 and cannot continue. Please check the model for errors.
  • Solver could not solve the system of algebraic equations because a singular iteration matrix was encountered. Consider providing more accurate initial conditions. If the problem persists, check the model structure and values of parameters.
Here is the code inside the PandO block:
function D = PandO(Vpv,Ipv)
%#codegen
% ************************************************************
% MATLAB implementation of a Perturb and Observe algorithm
% for Maximum Power Point Tracking. This algorithm is designed
% to operate with a buck converter
%
% Created by: Carlos Osorio
% ************************************************************
% Define internal values for the voltage and power as persistent
% variables
persistent Dprev Pprev Vprev
% Initialize the internal values for the voltage and power on the
% first pass
if isempty(Dprev)
Dprev = 0.7;
Vprev = 190;
Pprev = 1000;
end
% Initialize algorithm parameters
deltaD = 0.025;
% Calculate measured array power
Ppv = Vpv*Ipv;
% Increase or decrease duty cycle based on conditions
if (Ppv-Pprev) ~= 0
if (Ppv-Pprev) > 0
if (Vpv-Vprev) > 0
D = Dprev - deltaD;
else
D = Dprev + deltaD;
end
else
if (Vpv-Vprev) > 0
D = Dprev + deltaD;
else
D = Dprev - deltaD;
end
end
else
D = Dprev;
end
% Update internal values
Dprev = D;
Vprev = Vpv;
Pprev = Ppv;
I've also attached a picture of the full simulink model. Just hoping to get some help with this as I've been struggling for a while now. Are there any glaring problems?
  1 comentario
Arvind Sathyanarayanan
Arvind Sathyanarayanan el 8 de Mzo. de 2019
Editada: Arvind Sathyanarayanan el 8 de Mzo. de 2019
Try adding a ground block to your system and also try moving the the sovler configuration to power system domain maybe negative terminal of the the PV array.
It would be helpful if you could attach the model (in 2017b as I dont have 2018b).

Iniciar sesión para comentar.

Respuestas (1)

Joel Van Sickel
Joel Van Sickel el 24 de Ag. de 2020
Hello Johanna,
as mentioned by Arvind, please at an electrical reference block. Also, you are putting a duty cycle into your converter. Make sure that the converter is set to average. Your location of solver configuration will work as is.
Regards,
Joel

Productos


Versión

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by