# Basic IPC

**URL:** <https://forums.nlr.gov/t/basic-ipc/1912>\
**Category:** Controls\
**Created:** [October 18, 2018, 1:53pm UTC](https://forums.nlr.gov/t/basic-ipc/1912 "2018-10-18T13:53:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joel.Purtschert](https://avatars.discourse-cdn.com/v4/letter/j/48db29/32.png) [@Joel.Purtschert](https://forums.nlr.gov/u/Joel.Purtschert)\
**Post date:** [October 18, 2018, 1:53pm UTC](https://forums.nlr.gov/t/basic-ipc/1912/1 "2018-10-18T13:53:52Z")

</div>

Hello

I am working on simulating a wind turbine model in a water tank. I want to change the blade pitch angles based on the azimuth of the blade:

BlPitch(i) = C_sin(Azimuth(i)) or  
BlPitch(i) = D_cos(Azimuth(i))

What I see is that I can write PitchCntrl(Azimuth, Amplitude, mode, NumBl, DT, ZTime) in UserSubs.f90 and recompile FAST.

Is there a way to change the blade pitch angles such that I do not have to recompile FAST?

If not, is it possible to input user defined variables (Amplitude, mode) into PitchCntrl() or do I have to set amplitude and mode, recompile, run FAST, set new amplitude, set new mode, recompile, run FAST etc.?

Kind regards  
Joel

---

<div class="post-metadata">

**Author:** ![Jason.Jonkman](https://dub1.discourse-cdn.com/nrel/user_avatar/forums.nlr.gov/jason.jonkman/32/3086_2.png) [@Jason.Jonkman](https://forums.nlr.gov/u/Jason.Jonkman)\
**Post date:** [October 18, 2018, 3:40pm UTC](https://forums.nlr.gov/t/basic-ipc/1912/2 "2018-10-18T15:40:35Z")

</div>

Dear Joel,

FAST does not have any simple built-in active pitch-control options, so, should use one of the available pitch-control interfaces to implement your own control logic. These include, user-defined from SUBROUTINE PitchCntrl() in UserSubs.f90 (PCMode = 3), user-defined from Simulink (PCMode = 4), or user-defined from a Bladed-style dynamic-link library (DLL) (PCMode = 5). The use of SUBROUTINE PitchCntrl() requires a recompile of FAST with each change to PitchCntrl(). The use of the Simulink interface or the Bladed-style DLL do not require a recompile of FAST; although the latter requires a recompile of the DLL with each change to the DLL source code. Normally one would avoid recompiling all of the time by developing an input file for control-related inputs that can be read in by the PitchCntrl() SUBROUTINE or the DLL.

Best regards,

---

<div class="post-metadata">

**Author:** ![Joel.Purtschert](https://avatars.discourse-cdn.com/v4/letter/j/48db29/32.png) [@Joel.Purtschert](https://forums.nlr.gov/u/Joel.Purtschert)\
**Post date:** [October 22, 2018, 6:36am UTC](https://forums.nlr.gov/t/basic-ipc/1912/3 "2018-10-22T06:36:50Z")

</div>

Dear Jason,

Thank you for your answer. I decided to use Simulink, which seemed to be the easiest way to solve my problem.

Kind regards,  
Joel
