Simscape Model Error - Residual norm too large

5 views (last 30 days)
Patrick
Patrick on 28 May 2013
Hello,
I'm trying to create a model of a solar power system in Simscape. Therefore I wrote an Simscape Component modelling a solar panel. But always when I try to execute my model, I get the following error message:
Initial conditions solve failed to converge. ...Nonlinear solver: failed to converge, residual norm too large. ......Here is the set of components with unconverged equations:
'Simscape_Solar_Module/Solar Panel' Equation location is: 'C:/Users/paschmal/Matlab/Example1/+Electrical/solar_panel.ssc' (line 51)
I hope somebody could help me with this problem?
Thanks a lot!
if true
% code
component solar_panel
nodes
p = foundation.electrical.electrical; % +:top
n = foundation.electrical.electrical; % -:bottom
end
variables
I = {0, 'A'};
V = {0, 'V'};
end
inputs
E = {1000, 'W/m^2'}; % E:top
end
outputs
V_o ={0, 'V'}; % V_o:bottom
I_o ={0, 'A'}; % I_o:bottom
end
parameters
I_sc = {6.46, 'A'}; % Kurzschlussstrom
V_oc = {65.3, 'V'}; % Leerlaufspannung
R_s = {1e-2, 'Ohm'}; % Reihenwiderstand
R_p = {100, 'Ohm'}; % Parallelwiderstand
N = 1.5; % Qualitätsfaktor (1 <= m <= 2)
end
parameters(Access=private)
E_0 = {1000, 'W/m^2'}; % Bestrahlungsstärke STC
V_t = {25.7, 'mV'}; % Temperaturspannung
i_0 = {0, 'A'};
end
function setup
through(I, p.i, n.i);
across(V, p.v, n.v);
end
equations
if abs(V) < V_oc
let
I_ph = I_sc*E/E_0;
V_d = abs(V) + abs(I)*R_s;
I_s = (I_sc-V_oc/R_p)/(exp(V_oc/(N*V_t))-1);
I_d = I_s*(exp(V_d/(N*V_t))-1);
I_p = V_d/R_p;
in
I == I_ph - I_d - I_p;
end
else
I == i_0;
end
V_o == V;
I_o == I;
end
end
end

Answers (0)

Community Treasure Hunt

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

Start Hunting!