Skip to content

Commit

Permalink
Add signals to avrSWAP
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhar-abbas committed Nov 21, 2019
1 parent 78e7f81 commit 0ceaace
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ROSCO_toolbox/control_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ def __init__(self, lib_name):
# Define some avrSWAP parameters
self.avrSWAP[2] = self.DT
self.avrSWAP[60] = self.num_blade
self.avrSWAP[20] = 1 # HARD CODE initial rot speed = 1 rad/s
self.avrSWAP[26] = 10 # HARD CODE initial wind speed = 10 m/s


# Code this as first casll
self.avrSWAP[0] = 0
Expand Down Expand Up @@ -121,7 +124,10 @@ def call_controller(self,t,dt,pitch,torque,genspeed,rotspeed,ws):
# Add states to avr
self.avrSWAP[1] = t
self.avrSWAP[2] = dt
self.avrSWAP[3] = self.pitch
self.avrSWAP[3] = pitch
self.avrSWAP[32] = pitch
self.avrSWAP[33] = pitch
self.avrSWAP[14] = genspeed*torque
self.avrSWAP[22] = torque
self.avrSWAP[19] = genspeed
self.avrSWAP[20] = rotspeed
Expand Down

0 comments on commit 0ceaace

Please sign in to comment.