mirror of
https://github.com/rene-dev/stmbl.git
synced 2026-02-06 10:23:58 +08:00
rl conf
This commit is contained in:
22
conf/template/rl.txt
Normal file
22
conf/template/rl.txt
Normal file
@@ -0,0 +1,22 @@
|
||||
link pid
|
||||
link pmsm
|
||||
conf0.max_ac_cur = 15
|
||||
load rl
|
||||
rl0.rt_prio = 6
|
||||
hv0.en = rl0.en_out
|
||||
hv0.d_cmd = rl0.ud_cmd
|
||||
hv0.q_cmd = rl0.uq_cmd
|
||||
rl0.id_fb = hv0.id_fb
|
||||
rl0.iq_fb = hv0.iq_fb
|
||||
rl0.ud_fb = hv0.ud_fb
|
||||
rl0.uq_fb = hv0.uq_fb
|
||||
hv0.cmd_mode = 0
|
||||
hv0.pos = 0
|
||||
term0.wave0 = rl0.ud_cmd
|
||||
term0.wave1 = hv0.id_fb
|
||||
term0.wave2 = rl0.r
|
||||
term0.wave3 = rl0.ld
|
||||
term0.gain0 = 5
|
||||
term0.gain1 = 5
|
||||
term0.gain2 = 30
|
||||
term0.gain3 = 3000
|
||||
@@ -49,7 +49,7 @@ static void nrt_init(void *ctx_ptr, hal_pin_inst_t *pin_ptr) {
|
||||
PIN(r_test_cur) = 5;
|
||||
PIN(r_test_time) = 0.5;
|
||||
PIN(l_test_volt) = 10;
|
||||
PIN(l_test_time) = 1;
|
||||
PIN(l_test_time) = 1.5;
|
||||
PIN(ki) = 10;
|
||||
}
|
||||
|
||||
@@ -127,6 +127,7 @@ static void rt_func(float period, void *ctx_ptr, hal_pin_inst_t *pin_ptr) {
|
||||
PIN(en_out) = 0.0;
|
||||
PIN(timer) = 0.0;
|
||||
PIN(et) = PIN(ld) / PIN(r);
|
||||
PIN(en) = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user