0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

ScilabのsyslinはデフォルトでD=-1

Last updated at Posted at 2020-12-08

ScilabのsyslinはデフォルトでD=-1

Scilabのsyslinでシステムを定義した際,D項を指定しない場合,デフォルトで$D=-1$で$D=0$になっていないので注意してください.
この罠にかかり,1時間無駄にしました.

\frac{dx}{dt} = -x + u\\
y=x\\
\\
u=1(step)\\
x(0)=-1\\

というシステムで,ステップ応答を計算します.
理論的には

x(t)=-2*exp(-t)+1

です.
d項の指定なしの場合のステップ応答を計算するプログラムは次のようになります.

for i=1:3
    close();
end

A=[-1]
B=[1]
c=eye(1,1);
x0=[-1]

sys=syslin('c',A,B,c,x0)
t=0:0.01:10;
y=csim('step',t,sys)
clf();
plot(t,y)

figure();
y1=-2*exp(-1*t)+1
plot(t,y1)

結果は
image.png
こうなります.
理論的には
image.png
こうです.
最終的に1か0に収束するかの違いがあります.

というわけで,皆さん,d=-1の罠にかからないよう,d項もちゃんと指定しましょう.
というか,scilabよりpythonを使いましょう.
scilabはうんちです.気を付けてください

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?