Skip to content
Snippets Groups Projects
Commit bff129aa authored by David Verelst's avatar David Verelst
Browse files

prepost.hawcstab2: add differential gains as control tune attribute

parent 1eb3ccff
No related branches found
No related tags found
No related merge requests found
...@@ -373,6 +373,10 @@ class ReadControlTuning(object): ...@@ -373,6 +373,10 @@ class ReadControlTuning(object):
# set some parameters to zero for the linear case, or when aerodynamic # set some parameters to zero for the linear case, or when aerodynamic
# gain scheduling is not used # gain scheduling is not used
if not hasattr(self.pi_gen_reg2, 'Kd'):
setattr(self.pi_gen_reg2, 'Kd', 0.0)
if not hasattr(self.pi_pitch_reg3, 'Kd'):
setattr(self.pi_pitch_reg3, 'Kd', 0.0)
if not hasattr(self.pi_pitch_reg3, 'K2'): if not hasattr(self.pi_pitch_reg3, 'K2'):
setattr(self.pi_pitch_reg3, 'K2', 0.0) setattr(self.pi_pitch_reg3, 'K2', 0.0)
if not hasattr(self.aero_damp, 'Kp2'): if not hasattr(self.aero_damp, 'Kp2'):
...@@ -394,10 +398,11 @@ class ReadControlTuning(object): ...@@ -394,10 +398,11 @@ class ReadControlTuning(object):
tune_tags['[pi_gen_reg2.I]'] = self.pi_gen_reg2.I tune_tags['[pi_gen_reg2.I]'] = self.pi_gen_reg2.I
tune_tags['[pi_gen_reg2.Kp]'] = self.pi_gen_reg2.Kp tune_tags['[pi_gen_reg2.Kp]'] = self.pi_gen_reg2.Kp
tune_tags['[pi_gen_reg2.Ki]'] = self.pi_gen_reg2.Ki tune_tags['[pi_gen_reg2.Ki]'] = self.pi_gen_reg2.Ki
tune_tags['[pi_gen_reg2.Kd]'] = 0.0 tune_tags['[pi_gen_reg2.Kd]'] = self.pi_gen_reg2.Kd
tune_tags['[pi_pitch_reg3.Kp]'] = self.pi_pitch_reg3.Kp tune_tags['[pi_pitch_reg3.Kp]'] = self.pi_pitch_reg3.Kp
tune_tags['[pi_pitch_reg3.Ki]'] = self.pi_pitch_reg3.Ki tune_tags['[pi_pitch_reg3.Ki]'] = self.pi_pitch_reg3.Ki
tune_tags['[pi_pitch_reg3.Kd]'] = self.pi_pitch_reg3.Kd
tune_tags['[pi_pitch_reg3.K1]'] = self.pi_pitch_reg3.K1 tune_tags['[pi_pitch_reg3.K1]'] = self.pi_pitch_reg3.K1
tune_tags['[pi_pitch_reg3.K2]'] = self.pi_pitch_reg3.K2 tune_tags['[pi_pitch_reg3.K2]'] = self.pi_pitch_reg3.K2
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment