Skip to content

Commit

Permalink
RAAW Controller (NREL#84)
Browse files Browse the repository at this point in the history
* Combine ROSCO and the ROSCO_toolbox (NREL#54) (NREL#78)

* Add peak shaving back to UMaine Semi example

* create lin_util

* move helper functions to lin _util

* Revert controller to develop: TSR_at_minspeed

* add survey

* add survey

* typo fix

* Update headers

* fix bullets

* make uppercase

* Update turbine.py (NREL#56)

* Update turbine.py

This add several lines for fixing the problem of repeated maximum values in the performance tables. This will cause the error (' the length of x and y is different.') of 'interpolate.interp1d.'

* Add comments and catch when there are multiple optimal pitch angles

Co-authored-by: dzalkind <dzalkind@nrel.gov>

* increment version

* Update for OpenFAST v3.0.0

* Update for OpenFAST v3.0.0

* Install OF3.0.0 for tests

* update for OF v3.0.0

* add publish to pypi on release

* Update to ROSCO v2.3.0

* Update Testing (NREL#58)

* Update scripts to run on eagle

* Update IEA-15MW semi example: use peak shaving w/ ps_percen=0.8

* Add comparison plots to testing scripts

* Update submit script for testing

* Update for latest eagle runs

* Add future to install dependencies

* add TMax to self, define tmin in print_results

* run tests in CI

* generic ROSCO path

* default to overwrite

* fix path

* import platform

* separate run_testing

* cleanup, specify lite test

* don't run testing in after examples, oops.

Co-authored-by: nikhar-abbas <40865984+nikhar-abbas@users.noreply.github.com>
Co-authored-by: Nikhar Abbas <nikhar.abbas@colorado.edu>

* increment version

* Update for OpenFAST v3.0.0

* Install OF3.0.0 for tests

* update for OF v3.0.0

* add publish to pypi on release

* Update to ROSCO v2.3.0

* Increment Version, OF3.0 (NREL#57)

* increment version

* Update for OpenFAST v3.0.0

* Install OF3.0.0 for tests

* update for OF v3.0.0

* add publish to pypi on release

* Update to ROSCO v2.3.0

* increment version

* Update for OpenFAST v3.0.0

* Install OF3.0.0 for tests

* update for OF v3.0.0

* add publish to pypi on release

* Update to ROSCO v2.3.0

* add ROSCO without submodule

* move ROSCO source to ROSCO folder

* Move cmake-related files to ROSCO

* Add back pesky ErrVar

* Remove parameters_files

* Merge ROSCO and _toolbox gitignore

* Fix .gitignore

* Remove Examples/DISCON.IN from git

* Fix and point example_01 to Tune_Cases/

* Update verbiage around using ofTools vs. weis

* Fix and point example_04 to Tune_Cases/

* Clean up example_06

* Clean up example_07

* Only check FlpCornerFreq if using Flp control, fixes example 05

* Make example_04 consistent with others

* Let example_05 run independently from 04

* Clean up example_05, wind files

* Add schema and update empty tuning yaml inputs, not connected yet

* Integrate schema into turbine, controller, and examples

* Only check Fl filter parameters if Fl_Mode > 0, fix example_05

* bump version to 2.3

* Compile ROSCO from ROSCO dir

* Rename to CI_rosco

* Add omega vs. windspeed functionality

* Fix tests: 5MW U_pc and 06 example dir

* Make _Toolbox vs_minspeed in rotor frame to match ROSCO

* Revert ServoDyn change

* change rotor speed constraint to be epsilon

* rename for clarity

* docs major refresh

* fix FA_AccF units in debug file

* docs that build locally

* Deallocate arrays in ROSCO, check in example_05

* Clean up comments

* remove gitmodules

* furo theme

* furo in requirements

* move readthedocs config file, remove furo import in conf.py

* add docs requirements file

* typo

* move index out of source folder

* trying to get furo to work

* import date

* fix versions and titles, cleanup readthedocs requirements

* typo fix, remove extras

* more cleanup

* bump version

* no furo extension, "hack" to load RT version

* proper toctree paths

* specify method

* add mock modules

* fix typos

* update python install requirements

* running locally

* move index to main docs dir again

* update to build locally

* error during warnings

* automated version

* cleanup

* remove old docs

* re-add docs

* simplify

* fix figure path

* try alabaster

* remove archived docs

* Add omega vs. windspeed functionality

* Fix tests: 5MW U_pc and 06 example dir

* more detailed sp.optimize settings

* run MBC3 in parallel

* restructure driver, run initialization doe for tuning

* Try new dlclose function

* Update example_05 to run simple simulation twice and check result

* Revert deallocation stuff

* Close discon library after every sim run

* Test examples on macOS and windows

* Run examples instead of testing on other platforms

* Skip examples in windows for now

* update paths and yaml load funciton

* Skip mac testing of examples

* provide default U_pc for single omega/zeta case

* allow for float or list-like pc tuning inputs

* Change name in setup.py

* WE_Vw unit fix

* cleeanup for improved stability

* check for doe_logs as string in load_DOE

* major restructure for rsched_driver class

* cleanup verbosity

* run serial by default

* load_parallel as linturb_option

* specific IEA15MW yaml for multi omega

* remove unused module imports

* fix error message types

* lin_file as input

* add comments on inputs to LinearTurbineModel init method

* remove relative file paths

* provide OpenFAST linearizations for IEA15MW UMaineSemi

* put plotting in specific function

* fix WE_lambda units

* add self in on a few necessary variables

* creaete example 12 for robust scheduling

* try a few mbc3 locations for import

* allow list-like or numpy arrays for omega_pc and zeta_pc schedules

* create and use recorder setup function

* Pass Through Kp_float (NREL#57)

* Pass through kp_float, if desired

* Minor fixes: schema error and InputReader defaults

* fix setup_recorder to work for optimization driver too

* cleanup om problems, update om0 calc

* doe levels as input

* negative k_float to account for OF conventions

* cleanup print statements

* variable name cleanup, use calculated k_float

* Add defaults to omega_,zeta_ pc and vs, allow to be numbers

* use standard tuning k_float as IC

* formatting update

* update problem setup methods

* cleanup add_dv, enable adding design variables after problem is setup

* change optimization step size

* more setup restructure

* update verbosity

* use sphinx-rtd-theme

* master doc and sphinx rtd theme

* index back to root folder

* only ignore install folders

* remove hidden toctree

* furo theme

* update paths

* convert rt version to string

* update sphinx settings

* move conf

* furo theme

* Mostly a docs update (NREL#61)

* rename for clarity

* docs major refresh

* fix FA_AccF units in debug file

* docs that build locally

* remove gitmodules

* furo theme

* furo in requirements

* move readthedocs config file, remove furo import in conf.py

* add docs requirements file

* typo

* move index out of source folder

* trying to get furo to work

* import date

* fix versions and titles, cleanup readthedocs requirements

* typo fix, remove extras

* more cleanup

* bump version

* no furo extension, "hack" to load RT version

* proper toctree paths

* specify method

* add mock modules

* fix typos

* update python install requirements

* running locally

* move index to main docs dir again

* update to build locally

* error during warnings

* automated version

* cleanup

* remove old docs

* re-add docs

* simplify

* fix figure path

* try alabaster

* remove archived docs

* use sphinx-rtd-theme

* master doc and sphinx rtd theme

* index back to root folder

* only ignore install folders

* remove hidden toctree

* furo theme

* update paths

* convert rt version to string

* update sphinx settings

* move conf

* furo theme

* Pass through Kp_float = 0 (NREL#59)

* Pass through kp_float, if desired

* Minor fixes: schema error and InputReader defaults

* Allow pass through of Kp_float = 0

* Add flp parameters to schema

* Change Fl_Mode default to 0

* Add defaults to omega_,zeta_ pc and vs, allow to be numbers

* Allow single pitch tuning values in code, default U_pc to 0

* use nac acceleration for floating feedback

* Fix TSR saturation for region 2.5operation

* Modify system for constant power operation

* Only modify pole for constant power above-rated

* Remove GenEff from K calc

* Update tuning, use constant power

* use load_rosco_yaml

* constant power

* Fix broken tests

* Include Fl_Mode=2 for nacelle pitching feedback

* Versioning (NREL#65)

* use sphinx-rtd-theme

* master doc and sphinx rtd theme

* index back to root folder

* only ignore install folders

* remove hidden toctree

* furo theme

* update paths

* convert rt version to string

* update sphinx settings

* move conf

* furo theme

* remove git versioning from cmake

* use hard coded rosco_version

* update intro write method

* set nowrap for intel compilers

* update install instructions

* Catch nans in ROSCO at end of WSE

* fix conda install typo

* cleanup docs

* Rename DEBUG2.dbg to RootName.dbg2

* Fix Fl_Mode == 2

* Fix Fl_Mode == 2 again

* Allow Fl_Mode = 2 in ROSCO

* Set notch and check frequencies when Fl_Mode = 1 (fixes bug)

* Update robust scheduling methods

* Fail fast when not using custom build_extension

* Add a Windows install step with FC var set

* Force using MinGW for Windows build

* Use FC environment variable for all systems

* Portable option for setting the CMake generator

* Remove unused input to setup function

* Fix notch types allowed

* Add VS_ControlMode of 3 to DISCON comment

* Allow PS_Mode of 2 and 3 to work in ROSCO as if PS_Mode = 1

* Format and clean up ROSCO

* cleanup checks for lengths of pitch controller tuning inputs

* restructure for WEIS, cleanup nearest nyquist calculation methods

* update example for restructure

* specify VS_ControlMode=3 option

* Update links, add issues and discussions, cleanup

* Fix plotting typo

* Update and cleanup docs for recent changes

* bump version numbers to 2.4.0

* updates for more consistent convergence to minimum nyquist

* list_check tuning inputs

* change initial condition to om0=0.1

* delete unuses modules

* list_check controller params without return_bool

* More oneROSCO2 updates, primarily housekeeping (NREL#76)

* cleanup checks for lengths of pitch controller tuning inputs

* restructure for WEIS, cleanup nearest nyquist calculation methods

* update example for restructure

* specify VS_ControlMode=3 option

* Update links, add issues and discussions, cleanup

* Fix plotting typo

* Update and cleanup docs for recent changes

* bump version numbers to 2.4.0

* updates for more consistent convergence to minimum nyquist

* list_check tuning inputs

* change initial condition to om0=0.1

* delete unuses modules

* list_check controller params without return_bool

* Align y labels

* indentation fixes

* minor restructure

* change to code-block commands

* add spaces

* remove space

* more spacing fixes

* use code-block command throughout

* add cmake to requirements

* make figure svg instead of png

* Update and cleanup, especially install instructions

* Update titles

* delete old instructions

* change header type

* minor hyperlink update

* include build directories in gitignore

Co-authored-by: Nikhar Abbas <nikhar.abbas@colorado.edu>
Co-authored-by: Xianping Du <38188001+Seager1989@users.noreply.github.com>
Co-authored-by: nikhar-abbas <40865984+nikhar-abbas@users.noreply.github.com>
Co-authored-by: Rafael M Mudafort <rafmudaf@gmail.com>

Co-authored-by: Nikhar Abbas <nikhar.abbas@colorado.edu>
Co-authored-by: Xianping Du <38188001+Seager1989@users.noreply.github.com>
Co-authored-by: nikhar-abbas <40865984+nikhar-abbas@users.noreply.github.com>
Co-authored-by: Rafael M Mudafort <rafmudaf@gmail.com>

* Fix docs link and gearbox issue for minimum rotor/generator speed

* fix problem for non-monothonic Cp in large cp-ct-cq surfaces

* enlarge default range pitch and tsr

* try fixing the environment with pyparsing 2.4.7

* add package data

* setup.py install instead of develop for examples

* cleanup tuning yaml files

Co-authored-by: nikhar-abbas <40865984+nikhar-abbas@users.noreply.github.com>
Co-authored-by: dzalkind <65573423+dzalkind@users.noreply.github.com>
Co-authored-by: Nikhar Abbas <nikhar.abbas@colorado.edu>
Co-authored-by: Xianping Du <38188001+Seager1989@users.noreply.github.com>
Co-authored-by: Rafael M Mudafort <rafmudaf@gmail.com>
Co-authored-by: dzalkind <dzalkind@nrel.gov>
  • Loading branch information
7 people authored Nov 10, 2021
1 parent 277b637 commit 2821f72
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ROSCO_toolbox/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ def tune_controller(self, turbine):
for i in range(len(TSR_op)):
# Find pitch angle as a function of expected operating CP for each TSR
Cp_TSR = np.ndarray.flatten(turbine.Cp.interp_surface(turbine.pitch_initial_rad, TSR_op[i])) # all Cp values for a given tsr
Cp_op[i] = np.clip(Cp_op[i], np.min(Cp_TSR), np.max(Cp_TSR)) # saturate Cp values to be on Cp surface
Cp_maxidx = Cp_TSR.argmax() # Find maximum Cp value for this TSR
Cp_maxidx = Cp_TSR.argmax()
Cp_op[i] = np.clip(Cp_op[i], np.min(Cp_TSR[Cp_maxidx:]), np.max(Cp_TSR[Cp_maxidx:])) # saturate Cp values to be on Cp surface # Find maximum Cp value for this TSR
f_cp_pitch = interpolate.interp1d(Cp_TSR[Cp_maxidx:],pitch_initial_rad[Cp_maxidx:]) # interpolate function for Cp(tsr) values
# expected operation blade pitch values
if v[i] <= turbine.v_rated and isinstance(self.min_pitch, float): # Below rated & defined min_pitch
Expand Down
4 changes: 2 additions & 2 deletions ROSCO_toolbox/turbine.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,8 @@ def load_from_ccblade(self):
self.load_blade_info()

# Generate the look-up tables, mesh the grid and flatten the arrays for cc_rotor aerodynamic analysis
TSR_initial = np.arange(3, 15,0.5)
pitch_initial = np.arange(-1,25,0.5)
TSR_initial = np.arange(2, 15,0.5)
pitch_initial = np.arange(-5,25,0.5)
pitch_initial_rad = pitch_initial * deg2rad
ws_array = np.ones_like(TSR_initial) * self.v_rated # evaluate at rated wind speed
omega_array = (TSR_initial * ws_array / self.rotor_radius) * RadSec2rpm
Expand Down
1 change: 1 addition & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ dependencies:
- pandas
- wisdem
- cmake
- pyparsing==2.4.7

0 comments on commit 2821f72

Please sign in to comment.