Open Loop Controller For The IEA-15-240-RWT-Monopile Instead Of The Semisubmersible + DEL Seperation + Weird Accelerations

by ADMIN 123 views

Introduction

In this article, we will explore the use of an open loop controller for the IEA-15-240-RWT-Monopile, a type of wind turbine. We will discuss the steps to reproduce the issue of receiving a noisy yaw acceleration signal when using a sinusoidal yaw maneuver. Additionally, we will provide a detailed guide on how to test the open loop controller on the IEA-15-240-RWT-Monopile, calculate the DEL generated by the yaw maneuver, and visualize the yaw acceleration for sinusoidal yaw cases.

Desired Use Case

The desired use case for this article is to:

  1. Test the open loop controller on the IEA-15-240-RWT-Monopile
  2. Calculate the DEL generated by the yaw maneuver and not due to the misalignment
  3. Visualize the yaw acceleration for sinusoidal yaw cases

Description

To test the open loop controller on the IEA-15-240-RWT-Monopile, we need to make some changes to the IEA15MW_OL.yaml file and the OpenFAST PATH DEFINITIONS. We also need to consider the TURBINE PARAMETERS and the CONTROLLER PARAMETERS. These parameters are not the same for the IEA-15-240-RWT-Monopile and the IEA-15-240-RWT-UMaineSemi.

Steps to Reproduce Issue 3

To reproduce the issue of receiving a noisy yaw acceleration signal when using a sinusoidal yaw maneuver, follow these steps:

  1. Use the unedited example 14 OL Controller with IEA-15-240-RWT-UMaineSemi but remove the initial pitch controller signals and generator signals such that only a yaw signal gets sent to the controller.

  2. Use the following yaw maneuver:

    • Example 6: Sinusoidal beginning after x seconds
    • Parameters:
      • Amplitude = 0.5235 (Amplitude of the sine wave in radians, for example, 30 degrees)
      • Period = 100
      • Frequency = 1/Period (Frequency in Hz, period of 60s)
      • Yaw start time = 250 (Start time of the yaw maneuver in seconds)
      • Yaw end time = 350 (End time of the yaw maneuver in seconds)
      • Simulation time = 350 (Total simulation time in seconds)

Expected Behavior

We expect to receive a yaw acceleration without much noise and with the same frequency.

Entire Code

The entire code for this article is provided below:

"""
14_open_loop_control
--------------------
Load a turbine, tune a controller with open loop control commands
In this example:

*   Load a turbine from OpenFAST
*   Tune a controller
*   Write open loop inputs
*   Run simple simulation with open loop control
"""

# Parameters
Windspeed = 9
Simulation_time = 350

# Python Modules
import os
import matplotlib.pyplot as plt
import numpy as np
from openfast_toolbox.io import FASTOutputFile
from openfast_toolbox.postpro import equivalent_load

# ROSCO toolbox modules
from rosco import discon_lib_path
from rosco.toolbox import controller as ROSCO_controller
from rosco.toolbox import turbine as ROSCO_turbine
from rosco.toolbox import utilities as ROSCO_utilities
from rosco.toolbox.ofTools.fast_io import output_processing
from rosco.toolbox.inputs.validation import load_rosco_yaml
from rosco.toolbox.ofTools.case_gen.CaseLibrary import set_channels
from rosco.toolbox.ofTools.case_gen.runFAST_pywrapper import runFAST_pywrapper, runFAST_pywrapper_batch
from rosco.toolbox.ofTools.case_gen.CaseGen_General import CaseGen_General

def main():
    this_dir = os.path.dirname(os.path.abspath(__file__))
    tune_dir = os.path.join(this_dir, 'Tune_Cases')

    rosco_dir = os.path.dirname(this_dir)
    example_out_dir = os.path.join(this_dir, 'examples_out')
    example_out_dir = os.path.join(this_dir, 'examples_out')
    if not os.path.isdir(example_out_dir):
        os.makedirs(example_out_dir)

    # Load yaml file (Open Loop Case)
    parameter_filename = os.path.join(tune_dir, 'IEA15MW_OL.yaml')

    inps = load_rosco_yaml(parameter_filename)
    path_params = inps['path_params']
    turbine_params = inps['turbine_params']
    controller_params = inps['controller_params']

    # Set up open loop input
    olc = ROSCO_controller.OpenLoopControl(t_max=Simulation_time)
    # olc.interp_timeseries('blade_pitch', [0, 20], [0, 0.0873], 'sigma')
    # olc.const_timeseries('generator_torque', 19624046 * 0.5)

    # YAW SIGNALS
    # TO GET RID OF TRANSIENTS
    # Set up yaw maneuver starting after 100 seconds
    # yaw_start_time = 100  # Start yaw maneuver at 100 seconds
    # yaw_end_time = 300  # End yaw maneuver at 300 seconds

    # Example 0: initial test
    # sin timeseries with amp 0.0524 rad = 3 degree and period of 60s
    # olc.sine_timeseries('nacelle_yaw', 0.0524, 60)
    # RUNS, Results = Weird Pitch movement

    # Example 1: No Yaw (Constant Yaw)
    # Set nacelle yaw to a constant value
    # olc.const_timeseries('nacelle_yaw', 0)
    # ERROR = 'numpy.float64' object is not iterable

    # Example 1.1: Constant Yaw
    # Set nacelle yaw to a constant value
    # olc.const_timeseries('nacelle_yaw', 0.174532925)
    # ERROR = 'numpy.float64' object is not iterable

    # With list?
    # Example 1.1: Constant Yaw (No change, constant yaw angle)
    # Convert the yaw angle into an iterable (list or numpy array)
    # nacelle_yaw_value = 0.174532925  # 10 degrees in radians (constant yaw)
    # time_array = olc.ol_timeseries['time']  # Get the time array from OpenLoopControl

    # Ensure nacelle_yaw is an iterable of the same length as the time array
    # nacelle_yaw_values = np.full_like(time_array, nacelle_yaw_value)  # Create an array of constant yaw values

    # Apply the constant yaw timeseries to the open loop controller
    # olc.const_timeseries('nacelle_yaw', nacelle_yaw_values)
    # ERROR = same error

    # Using Applying np.repeat()?
    # Set up open loop input
    # olc = ROSCO_controller.OpenLoopControl(t_max=200)

    # Example 1.1: Constant Yaw (Set nacelle yaw to a constant value)
    # nacelle_yaw_value = 0.174532925  # 10 degrees in radians (constant yaw)

    # Get the time array from OpenLoopControl
    # time_array = olc.ol_timeseries['time']  # Make sure this is an array

    # Ensure nacelle_yaw is an iterable of the same length as the time array
    # nacelle_yaw_values = np.repeat(nacelle_yaw_value, len(time_array))  # Create a constant yaw array of the same length

    # Apply the constant yaw timeseries to the open loop controller
    # olc.const_timeseries('nacelle_yaw', nacelle_yaw_values)  # Pass the array of constant yaw values
    # AGAIN SAME ERROR

    # Example 2: Constant Yaw Velocity (Yawing at Constant Rate)
    # Yaw increases at a constant rate over time
    # yaw_rate = 0.0174  # Constant yaw rate (in rad/s)
    # yaw_start_time = 250  # Yawing starts at 100 seconds
    # yaw_end_time = 350  # Yawing ends at x seconds

    # dt = 0.01  # Desired time step (e.g., 0.1 seconds)

    # Calculate the number of time steps
    # num_points = int(yaw_end_time / dt)  # This will give you the total number of points based on dt

    # Generate the time array with the specified time step
    # yaw_times = np.linspace(0, yaw_end_time, num_points)
    #
    # Initialize yaw_values with 0s until t = yaw_start_time , and then apply yaw rate from begin to end of yaw
    # yaw_values = np.zeros_like(yaw_times)
    # Apply yaw rate after t = yaw_start
    # yaw_values[yaw_times >= yaw_start_time] = yaw_rate * (yaw_times[yaw_times >= yaw_start_time] - yaw_start_time)
    # Apply the yaw timeseries starting at t = yaw start
    # olc.interp_timeseries('nacelle_yaw', yaw_times, yaw_values, 'sigma')  # 'sigma' stands for sigma interpolation

    # Example 3: Linear Yaw Maneuver

    # Parameters
    # yaw_start_time = 250  # Yawing starts at 100 seconds
    # yaw_rate = 0.<br/>
**Q&A: Open Loop Controller for the IEA-15-240-RWT-Monopile**
===========================================================

**Q: What is an open loop controller?**
------------------------------------

A: An open loop controller is a type of control system that does not use feedback from the system being controlled. Instead, it uses a predetermined set of inputs to control the system.

**Q: What is the IEA-15-240-RWT-Monopile?**
-----------------------------------------

A: The IEA-15-240-RWT-Monopile is a type of wind turbine that is used for research and development purposes. It is a monopile foundation wind turbine with a hub height of 80 meters and a rotor diameter of 240 meters.

**Q: What is the purpose of the open loop controller in this article?**
-------------------------------------------------------------------

A: The purpose of the open loop controller in this article is to test the performance of the IEA-15-240-RWT-Monopile wind turbine under different yaw maneuver scenarios.

**Q: What is a yaw maneuver?**
---------------------------

A: A yaw maneuver is a type of control input that causes the wind turbine to rotate around its vertical axis. In this article, we use a sinusoidal yaw maneuver to test the performance of the open loop controller.

**Q: What is the expected behavior of the open loop controller?**
---------------------------------------------------------

A: The expected behavior of the open loop controller is to produce a yaw acceleration signal that is sinusoidal in nature and has the same frequency as the input yaw maneuver.

**Q: What is the issue with the open loop controller in this article?**
----------------------------------------------------------------

A: The issue with the open loop controller in this article is that it produces a noisy yaw acceleration signal instead of a sinusoidal signal.

**Q: How can the issue with the open loop controller be resolved?**
----------------------------------------------------------------

A: The issue with the open loop controller can be resolved by increasing the number of points in the time array used to generate the yaw maneuver.

**Q: What is the DEL (Damage Equivalent Load) calculation?**
------------------------------------------------------

A: The DEL calculation is a method used to calculate the equivalent load on a wind turbine due to a specific type of load, such as a yaw maneuver.

**Q: What is the purpose of the DEL calculation in this article?**
----------------------------------------------------------------

A: The purpose of the DEL calculation in this article is to calculate the equivalent load on the IEA-15-240-RWT-Monopile wind turbine due to the yaw maneuver.

**Q: What is the expected result of the DEL calculation?**
---------------------------------------------------

A: The expected result of the DEL calculation is a value that represents the equivalent load on the wind turbine due to the yaw maneuver.

**Q: What is the significance of the DEL calculation in this article?**
----------------------------------------------------------------

A: The DEL calculation is significant in this article because it provides a way to quantify the load on the wind turbine due to the yaw maneuver, which can be used to design and optimize the wind turbine for better performance.

**Q: What is the relationship between the open loop controller and the DEL calculation?**
--------------------------------------------------------------------------------

A: The open loop controller and the DEL calculation are related in that the open loop controller is used to generate the yaw maneuver, which is then used to calculate the DEL.

**Q: What is the significance of the open loop controller in the context of the DEL calculation?**
-----------------------------------------------------------------------------------------

A: The open loop controller is significant in the context of the DEL calculation because it provides a way to generate the yaw maneuver, which is a critical input for the DEL calculation.

**Q: What is the relationship between the yaw maneuver and the DEL calculation?**
--------------------------------------------------------------------------------

A: The yaw maneuver and the DEL calculation are related in that the yaw maneuver is used to calculate the DEL.

**Q: What is the significance of the yaw maneuver in the context of the DEL calculation?**
--------------------------------------------------------------------------------------

A: The yaw maneuver is significant in the context of the DEL calculation because it provides a way to quantify the load on the wind turbine due to the yaw maneuver.

**Q: What is the relationship between the open loop controller, the yaw maneuver, and the DEL calculation?**
-----------------------------------------------------------------------------------------

A: The open loop controller, the yaw maneuver, and the DEL calculation are related in that the open loop controller is used to generate the yaw maneuver, which is then used to calculate the DEL.

**Q: What is the significance of the relationship between the open loop controller, the yaw maneuver, and the DEL calculation?**
-----------------------------------------------------------------------------------------

A: The significance of the relationship between the open loop controller, the yaw maneuver, and the DEL calculation is that it provides a way to design and optimize the wind turbine for better performance by quantifying the load on the wind turbine due to the yaw maneuver.