Question: Error, (in DynamicSystems:-DiffEquation) unrecognized diff-equation type and how to set feasibility tolerance

got error when draw root locus

and would like to know how to set feasibility tolerance, less than 0.1 is also ok

 

with(DynamicSystems):

x11 := [1.05657970467127, .369307407127487, .400969917393968, .368036162749865, .280389875142339, .280523489139136, .283220960827744, .373941285224253, .378034013792196, .384412762008662, .358678988563716, .350625923673556, .852039817522304, .362240519978640, 1.03197080591829, .343650441408896, .982510654490390, .404544012440991, .422063867224247, 1.20938803285209, .455708586000668, 1.22503869712995, .388259397947667, .472188904769827, 1.31108028794286, 1.19746589728366, .572669348193002];

y11 := [.813920951682113, 10.3546712426210, 2.54581301217449, 10.2617298458172, 3.82022939508992, 3.81119683373741, 3.90918914917183, 10.5831132713329, 10.8700088489538, 11.0218056177585, 10.5857571473115, 9.89034057997145, .271497107157453, 9.77706473740146, 2.23955104698355, 4.16872072216206, .806710906391666, 11.9148193656260, 12.0521411908477, 2.52812993540440, 12.6348841508094, 2.72197067934160, 5.10891266728297, 13.3609183272238, 3.03572692234234, 1.07326033849793, 15.4268962507711];

z11 := [8.93290500985527, 8.96632856524217, 15.8861149154785, 9.16576669760908, 3.20341865536950, 3.11740291181539, 3.22328961317946, 8.71094047480794, 8.60596466961827, 9.15440788281943, 10.2935566768586, 10.5765776143026, 16.3469510439066, 9.36885507010739, 2.20434678689869, 3.88816077008078, 17.9816287534802, 10.1414228793737, 10.7356141216242, 4.00703203725441, 12.0105837616461, 3.77028605914906, 5.01411979976607, 12.7529165152417, 3.66800269682059, 21.2178824031985, 13.9148746721034];

u11 := [5.59, 5.74, 5.49, 5.19, 5.37, 5.56, 5.46, 5.21, 5.55, 5.56, 5.61, 5.91, 5.93, 5.98, 6.28, 6.24, 6.44, 6.58, 6.75, 6.78, 6.81, 7.59, 7.73, 7.75, 7.69, 7.73, 7.79];

a1 := Diff(x1(t),t) = k1*x1(t)+ k2*y1(t)+ k3*z1(t)+k4*u1(t);

b1 := Diff(y1(t),t) = k5*x1(t)+ k6*y1(t)+ k7*z1(t)+k8*u1(t);

c1 := Diff(z1(t),t) = k8*x1(t)+ k9*y1(t)+ k10*z1(t)+k12*u1(t);

d1 := Diff(u1(t),t) = 0;

ICS:=x1(1)=x11[1],y1(1)=y11[1],z1(1)=z11[1],u1(1)=u11[27];

sol:=dsolve({a1,b1,c1,d1,ICS}, numeric, method=rkf45, parameters=[k1,k2,k3,k4,k5,k6,k7,k8,k9,k10,k11,k12],output=listprocedure);

X,Y,Z,U:=op(subs(sol,[x1(t),y1(t),z1(t),u1(t)]));

tim := [seq(n, n=1..27)];

N:=nops(tim):

ans:=proc(k1,k2,k3,k4,k5,k6,k7,k8,k9,k10,k11,k12) sol(parameters=[k1,k2,k3,k4,k5,k6,k7,k8,k9,k10,k11,k12]);

 add((X(tim[i])-x11[i])^2,i=1..N)+add((Y(tim[i])-y11[i])^2,i=1..N)+add((Z(tim[i])-z11[i])^2,i=1..N)+add((U(tim[i])-u11[i])^2,i=1..N)

 end proc;

ans(.001,.002,.003,.001,.002,.003,.001,.002,.003,.001,.002,.003);

result1 := Optimization:-Minimize(ans,initialpoint=[.001,.002,.003,.001,.002,.003,.001,.002,.003,.001,.002,.003]);

x11 := [1.05657970467127, .369307407127487, .400969917393968, .368036162749865, .280389875142339, .280523489139136, .283220960827744, .373941285224253, .378034013792196, .384412762008662, .358678988563716, .350625923673556, .852039817522304, .362240519978640, 1.03197080591829, .343650441408896, .982510654490390, .404544012440991, .422063867224247, 1.20938803285209, .455708586000668, 1.22503869712995, .388259397947667, .472188904769827, 1.31108028794286, 1.19746589728366, .572669348193002];

y11 := [.813920951682113, 10.3546712426210, 2.54581301217449, 10.2617298458172, 3.82022939508992, 3.81119683373741, 3.90918914917183, 10.5831132713329, 10.8700088489538, 11.0218056177585, 10.5857571473115, 9.89034057997145, .271497107157453, 9.77706473740146, 2.23955104698355, 4.16872072216206, .806710906391666, 11.9148193656260, 12.0521411908477, 2.52812993540440, 12.6348841508094, 2.72197067934160, 5.10891266728297, 13.3609183272238, 3.03572692234234, 1.07326033849793, 15.4268962507711];

z11 := [8.93290500985527, 8.96632856524217, 15.8861149154785, 9.16576669760908, 3.20341865536950, 3.11740291181539, 3.22328961317946, 8.71094047480794, 8.60596466961827, 9.15440788281943, 10.2935566768586, 10.5765776143026, 16.3469510439066, 9.36885507010739, 2.20434678689869, 3.88816077008078, 17.9816287534802, 10.1414228793737, 10.7356141216242, 4.00703203725441, 12.0105837616461, 3.77028605914906, 5.01411979976607, 12.7529165152417, 3.66800269682059, 21.2178824031985, 13.9148746721034];

u11 := [5.59, 5.74, 5.49, 5.19, 5.37, 5.56, 5.46, 5.21, 5.55, 5.56, 5.61, 5.91, 5.93, 5.98, 6.28, 6.24, 6.44, 6.58, 6.75, 6.78, 6.81, 7.59, 7.73, 7.75, 7.69, 7.73, 7.79];

k1 := result1[2][1];

k2 := result1[2][2];

k3 := result1[2][3];

k4 := result1[2][4];

k5 := result1[2][5];

k6 := result1[2][6];

k7 := result1[2][7];

k8 := result1[2][8];

k9 := result1[2][9];

k10 := result1[2][10];

k11 := result1[2][11];

k12 := result1[2][12];

a1 := Diff(x1(t),t) = k1*x1(t)+ k2*y1(t)+ k3*z1(t)+k4*u1(t);

b1 := Diff(y1(t),t) = k5*x1(t)+ k6*y1(t)+ k7*z1(t)+k8*u1(t);

c1 := Diff(z1(t),t) = k8*x1(t)+ k9*y1(t)+ k10*z1(t)+k12*u1(t);

d1 := Diff(u1(t),t) = 0;

diff_eq := [a1, b1, c1, d1];

sys6 := DiffEquation(diff_eq, [x1(t), y1(t), z1(t), u1(t)], [x1(t), y1(t), z1(t), u1(t)]);

sys6 := DiffEquation(diff_eq, [x1(t), y1(t), z1(t)], [x1(t), y1(t), z1(t), u1(t)]);

ResponsePlot(sys6, Step(), parameters = params);

RootLocusPlot(sys6);

 

> sys6 := DiffEquation(diff_eq, [], [x1(t), y1(t), z1(t), u1(t)]);

Error, (in DynamicSystems:-DiffEquation) unrecognized diff-equation type: 9

> sys6 := DiffEquation(diff_eq, [x1(t), y1(t), z1(t), u1(t)], [x1(t), y1(t), z1(t), u1(t)]); sys6 := DiffEquation(diff_eq, [x1(t), y1(t), z1(t)], [x1(t), y1(t), z1(t), u1(t)]);

Error, (in DynamicSystems:-DiffEquation) unrecognized diff-equation type: 9

Error, (in DynamicSystems:-DiffEquation) unrecognized diff-equation type: 9

> ResponsePlot(sys6, Step(), parameters = params); RootLocusPlot(sys6);

Error, invalid input: DynamicSystems:-ResponsePlot expects value for keyword parameter parameters to be of type ({set, list})(name = complexcons), but received params

Error, (in Verify:-CommonExports) system object is not a module

 

Please Wait...