Adapt impedance control to new generator
This commit is contained in:
parent
55e6d5d9db
commit
31da2af078
|
@ -279,7 +279,7 @@ pub struct SwitchControl<const T0: i32>
|
||||||
mode_switch_delay_counter: u32,
|
mode_switch_delay_counter: u32,
|
||||||
cv_pid: PID<10000, T0>,
|
cv_pid: PID<10000, T0>,
|
||||||
mppt: MPPT<200, 0 /* percent loss of peak power */>,
|
mppt: MPPT<200, 0 /* percent loss of peak power */>,
|
||||||
imp_ctrl: ImpedanceControl<T0, 11000, 15000>,
|
imp_ctrl: ImpedanceControl<T0, 5400, 1000>,
|
||||||
pwm_max: i32,
|
pwm_max: i32,
|
||||||
pwm_cur: i32,
|
pwm_cur: i32,
|
||||||
cv_target: i32,
|
cv_target: i32,
|
||||||
|
@ -295,7 +295,7 @@ impl<const T0: i32> SwitchControl<T0>
|
||||||
mode_switch_delay_counter: 0,
|
mode_switch_delay_counter: 0,
|
||||||
cv_pid: PID::<10000, T0>::new(100, 50, 50, cv_target, 0, 0, pwm_max * 10000),
|
cv_pid: PID::<10000, T0>::new(100, 50, 50, cv_target, 0, 0, pwm_max * 10000),
|
||||||
mppt: MPPT::<200, 0>::new(3*pwm_max/4, 0, pwm_max),
|
mppt: MPPT::<200, 0>::new(3*pwm_max/4, 0, pwm_max),
|
||||||
imp_ctrl: ImpedanceControl::<T0, 11000, 15000>::new(1000, pwm_max),
|
imp_ctrl: ImpedanceControl::<T0, 5400, 1000>::new(1000, pwm_max),
|
||||||
pwm_max,
|
pwm_max,
|
||||||
pwm_cur: 0,
|
pwm_cur: 0,
|
||||||
cv_target,
|
cv_target,
|
||||||
|
|
Loading…
Reference in a new issue