?? model.c
字號:
/* Number of Generators:2, They are bus #1 to bus #2*/
/* Number of PV loads:0 */
/* Number of PQ loads:1, It is bus #3 */
/*The classic steady state model: */
f1[1]=(((e[1]*(e[1]*g[1][1]))+(((b[1][3]*e[1])*(e[3]*sin((th[1]-th[3]))))+((cos((th[1]-th[3]))*e[3])*
(e[1]*g[1][3]))))-p[1]);
/*The derivative with respect to th[1] */
j[1][1]=(((b[1][3]*e[1])*(e[3]*cos((th[1]-th[3]))))+((((-1)*sin((th[1]-th[3])))*e[3])*
(e[1]*g[1][3])));
/*The derivative with respect to th[2] */
j[1][2]=0;
/*The derivative with respect to e[3] */
j[1][3]=(((b[1][3]*e[1])*sin((th[1]-th[3])))+(cos((th[1]-th[3]))*(e[1]*g[1][3])));
/*The derivative with respect to th[3] */
j[1][4]=(((b[1][3]*e[1])*(e[3]*(cos((th[1]-th[3]))*(-1))))+((((-1)*(sin((th[1]-th[3]))*(-1)))*e[3])*
(e[1]*g[1][3])));
f1[2]=(((e[2]*(e[2]*g[2][2]))+(((b[2][3]*e[2])*(e[3]*sin((th[2]-th[3]))))+((cos((th[2]-th[3]))*e[3])*
(e[2]*g[2][3]))))-p[2]);
/*The derivative with respect to th[1] */
j[2][1]=0;
/*The derivative with respect to th[2] */
j[2][2]=(((b[2][3]*e[2])*(e[3]*cos((th[2]-th[3]))))+((((-1)*sin((th[2]-th[3])))*e[3])*(e[2]*g[2][3])));
/*The derivative with respect to e[3] */
j[2][3]=(((b[2][3]*e[2])*sin((th[2]-th[3])))+(cos((th[2]-th[3]))*(e[2]*g[2][3])));
/*The derivative with respect to th[3] */
j[2][4]=(((b[2][3]*e[2])*(e[3]*(cos((th[2]-th[3]))*(-1))))+((((-1)*(sin((th[2]-th[3]))*(-1)))*e[3])*
(e[2]*g[2][3])));
f1[3]=((((((b[3][1]*e[3])*(e[1]*sin((th[3]-th[1]))))+((cos((th[3]-th[1]))*e[1])*(e[3]*g[3][1])))+(((b[3][2]*
e[3])*(e[2]*sin((th[3]-th[2]))))+((cos((th[3]-th[2]))*e[2])*(e[3]*g[3][2]))))+(e[3]*(e[3]*
g[3][3])))-p[3]);
/*The derivative with respect to th[1] */
j[3][1]=(((b[3][1]*e[3])*(e[1]*(cos((th[3]-th[1]))*(-1))))+((((-1)*(sin((th[3]-th[1]))*(-1)))*
e[1])*(e[3]*g[3][1])));
/*The derivative with respect to th[2] */
j[3][2]=(((b[3][2]*e[3])*(e[2]*(cos((th[3]-th[2]))*(-1))))+((((-1)*(sin((th[3]-th[2]))*(-1)))*e[2])*
(e[3]*g[3][2])));
/*The derivative with respect to e[3] */
j[3][3]=((((b[3][1]*(e[1]*sin((th[3]-th[1]))))+((cos((th[3]-th[1]))*e[1])*g[3][1]))+((b[3][2]*(e[2]*sin((th[3]-
th[2]))))+((cos((th[3]-th[2]))*e[2])*g[3][2])))+((e[3]*g[3][3])+(e[3]*g[3][3])));
/*The derivative with respect to th[3] */
j[3][4]=((((b[3][1]*e[3])*(e[1]*cos((th[3]-th[1]))))+((((-1)*sin((th[3]-th[1])))*e[1])*(e[3]*g[3][1])))+
(((b[3][2]*e[3])*(e[2]*cos((th[3]-th[2]))))+((((-1)*sin((th[3]-th[2])))*e[2])*(e[3]*g[3][2]))));
f2[1]=((((((g[3][1]*e[3])*(e[1]*sin((th[3]-th[1]))))-((cos((th[3]-th[1]))*e[1])*(e[3]*b[3][1])))+(((g[3][2]*
e[3])*(e[2]*sin((th[3]-th[2]))))-((cos((th[3]-th[2]))*e[2])*(e[3]*b[3][2]))))+(0-(e[3]*
(e[3]*b[3][3]))))-q[3]);
/*The derivative with respect to th[1] */
j[4][1]=(((((g[3][1]*e[3])*(e[1]*(cos((th[3]-th[1]))*(-1))))-((((-1)*(sin((th[3]-th[1]))*
(-1)))*e[1])*(e[3]*b[3][1])))+(0-(0*(e[3]*b[3][2]))))+(0-((0*(e[3]*
b[3][3]))+(e[3]*((0*b[3][3])+(e[3]*0))))));
/*The derivative with respect to th[2] */
j[4][2]=(((0-(0*(e[3]*b[3][1])))+(((g[3][2]*e[3])*(e[2]*(cos((th[3]-th[2]))*(-1))))-((((-1)*
(sin((th[3]-th[2]))*(-1)))*e[2])*(e[3]*b[3][2]))))+(0-((0*(e[3]*b[3][3]))+(e[3]*
((0*b[3][3])+(e[3]*0))))));
/*The derivative with respect to e[3] */
j[4][3]=((((g[3][1]*(e[1]*sin((th[3]-th[1]))))-((cos((th[3]-th[1]))*e[1])*b[3][1]))+((g[3][2]*(e[2]*sin((th[3]-
th[2]))))-((cos((th[3]-th[2]))*e[2])*b[3][2])))+(0-((1*(e[3]*b[3][3]))+(e[3]*((1*
b[3][3])+(e[3]*0))))));
/*The derivative with respect to th[3] */
j[4][4]=(((((g[3][1]*e[3])*(e[1]*cos((th[3]-th[1]))))-((((-1)*sin((th[3]-th[1])))*e[1])*(e[3]*b[3][1])))+
(((g[3][2]*e[3])*(e[2]*cos((th[3]-th[2]))))-((((-1)*sin((th[3]-th[2])))*e[2])*(e[3]*b[3][2]))))+
(0-((0*(e[3]*b[3][3]))+(e[3]*((0*b[3][3])+(e[3]*0))))));
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -