フィルターのクリア

How do I create an PV system in Simulink?

9 ビュー (過去 30 日間)
Johanna Rigby
Johanna Rigby 2019 年 3 月 8 日
回答済み: Joel Van Sickel 2020 年 8 月 24 日
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 件のコメント
Arvind Sathyanarayanan
Arvind Sathyanarayanan 2019 年 3 月 8 日
編集済み: Arvind Sathyanarayanan 2019 年 3 月 8 日
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).

サインインしてコメントする。

回答 (1 件)

Joel Van Sickel
Joel Van Sickel 2020 年 8 月 24 日
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

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by