Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: algebraic loop error
Replies: 6   Last Post: Dec 3, 2012 2:45 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
mado

Posts: 116
Registered: 5/24/12
algebraic loop error
Posted: Nov 30, 2012 12:46 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

when using Ipold= Ip in this embedded function code

function [e,Pm,Ip] = new(In,Vn)
persistent Ipold ;
if isempty(Ipold)
Ipold=2; %initialized only once in the beginning
end
K1=2;
K2=-.195;
Pn= Vn*In
Pm=100*In
e= Pn-Pm
if Pn>Pm
Ip = Ipold+K1 *e
end
Ip = Ipold+K2 *e
Ipold=Ip



error message appeared
"Trouble solving algebraic loop containing 'chee_pv/pv6/Algebraic Constraint/Initial Guess' at time 0. Stopping simulation. There may be a singularity in the solution. If the model is correct, try reducing the step size (either by reducing the fixed step size or by tightening the error tolerances)"



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.