4 sys
.path
.insert(0, os
.getcwd())
6 sys
.stdout
= open(sys
.argv
[1], "w")
8 import liba
# type: ignore
18 num
= [6.59492796e-05, 6.54019884e-05]
19 den
= [1.0, -1.97530991, 0.97530991]
21 tf
= liba
.tf(num
, den
[1:])
22 pid
= liba
.pid().kpid(kp
, ki
, kd
)
35 for i
in range(len(x
)):
36 y1
[i
] = tf(pid
.pos(r
, tf
.output
[0]))
42 for i
in range(len(x
)):
43 y2
[i
] = tf(pid
.inc(r
, tf
.output
[0]))
45 for i
in range(len(x
)):
46 print("%g,%g,%g,%g" % (x
[i
], r
, y1
[i
], y2
[i
]))
51 pid
.summax
= pid
.summax
52 pid
.summin
= pid
.summin
54 pid
.outmax
= pid
.outmax
55 pid
.outmin
= pid
.outmin