필터 지우기
필터 지우기

programming error jamming in simulink

조회 수: 1 (최근 30일)
mado
mado 2012년 12월 6일
I have two constants K1 and K2 I need them to be different because i have breaking point
function [e,Pm,Ip] = new(In,Vn)
persistent Ipold K1 ; if isempty(Ipold) Ipold=2; %initialized only once in the beginning end if isempty(K1) K1=2; %initialized only once in the beginning end
K1=5; K2=.19; Pn= Vn*In Pm=100*In e= Pn-Pm if e<0 Ip = Ipold+K2 *e else Ip = Ipold+K1 *e end
gave error message Trouble solving algebraic loop containing 'che/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)
I can't understand what is the objection ?
  댓글 수: 4
mado
mado 2012년 12월 6일
편집: mado 2012년 12월 6일
how is my code working and you don't have simulink file that code should be applied on? the error message results of algebraic constraint in simulink
TAB
TAB 2012년 12월 6일
편집: TAB 2012년 12월 6일
I pasted your code in matlab function block in simulink (which is the only place where we can run a m-code you like posted here) and it was working.
Please....explain your case in detail. See HOW TO ASK QUESTIONS AND GET A FAST ANSWER.

댓글을 달려면 로그인하십시오.

답변 (1개)

mado
mado 2012년 12월 6일
I have function made by simulink that gave me curve Pn is a point on that curve , I used In as current that draw a straight line with slope 100 Pm is a point on that line , so this line and the curve converges at a point which give e = pn- pm i need to know why this error message appear when i have different k , K1 and K2

카테고리

Help CenterFile Exchange에서 Sources에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by