Skip to content

Commit

Permalink
Fix indexing
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhar-abbas committed Feb 5, 2021
1 parent f516eb1 commit 4a76068
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ROSCO_toolbox/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,12 +242,12 @@ def tune_controller(self, turbine):

# separate and define below and above rated parameters
A_vs = A[0:len(v_below_rated)] # below rated
A_pc = A[len(v_below_rated):len(v)] # above rated
A_pc = A[-len(v_above_rated)+1:] # above rated
B_tau = B_tau * np.ones(len(v))

# -- Find gain schedule --
self.pc_gain_schedule = ControllerTypes()
self.pc_gain_schedule.second_order_PI(self.zeta_pc, self.omega_pc,A_pc,B_beta[len(v_below_rated):len(v)],linearize=True,v=v_above_rated)
self.pc_gain_schedule.second_order_PI(self.zeta_pc, self.omega_pc,A_pc,B_beta[-len(v_above_rated)+1:],linearize=True,v=v_above_rated[1:])
self.vs_gain_schedule = ControllerTypes()
self.vs_gain_schedule.second_order_PI(self.zeta_vs, self.omega_vs,A_vs,B_tau[0:len(v_below_rated)],linearize=False,v=v_below_rated)

Expand Down

0 comments on commit 4a76068

Please sign in to comment.