Questions about the source code of FAST 7

Dear All

I am trying to understand and do some little modification of the source code. While I am reading “fast.f90”, I found a variable “AugMat” in subroutine “RtHS”. I spent some time try to understand the meaning of “AugMat” but I failed. Hope some some could tell me what is stored in “AugMat” and what it is used for?

By the way, I plan to add an extra input for the linearization model. The 7 current optional inputs are Nacelle yaw angle command, Nacelle yaw rate command, Electrical generator torque, Rotor collective blade pitch, Individual pitch of blade 1, Individual pitch of blade 2 and Individual pitch of blade 3. I am wondering if it is possible or if it is manageable for a student who started to see the code from 3 days ago. I have figured out the function of each subroutine and know how the FAST runs in general. But I am still confused by the details of some subroutine such as RtHS. Hope someone could provide me with some hints about how to add an extra input during the linearization mode.

Thank you!

Best

XING WEI

Dear Xing Wei,

For equations of motion that are written in the form Ma = F (where “M” is the nn mass matrix, “a” and “F” are n1 vectors of acceleration and force, and “n” is the number of degrees of freedom), the AugMat array in the FAST source code is [ M, F ] combined into a single n(n+1) matrix.

I’m not sure what additional control input you plan to add to the linearization functionality of FAST v7, but the difficulty will likely depend on what kind of input that is. Can you clarify?

Best regards,

Dear Jason

Actually I am using the FAST-SC which was provided by Professor Lackner. I would like to add the “external force” as the input of the linearized system. The “external force” is the third force applied between the nacelle and TMD whose value could be defined by us. The other two forces are provided by spring and damper. I would like the “external force” to be included in the input options before we linearize the model. Do you have any clue about that or is that difficult? Thank you!

Best wishes

XING WEI

Dear Xing,

I’m not familiar enough with the FAST-SC source code to know how the external force is implemented and offer detailed guidance. What I suggest you do is review how inputs are included in the existing linearization source code of FAST v7 and use that knowledge to guide your implementation of the external force input.

Best regards,

Dear Jason

Thank you for your advice. I suppose that we need to trim it in the code if we want to add the “external force” into the input options and want to use this input to control the whole system. Am I right?

Best wishes

XING WEI

Dear Xing,

I’m not sure what you mean by “trim”? Are you referring to the operating-point determination algorithm? If so, you will only need to modify this section of code if you don’t know what external force is needed to reach the desired operating point; otherwise you can fix the external force during the trim solution.

Best regards,

Dear Jason

Yes, I mean the operating-point determination algorithm by mentioning “trim”. In the code, the following picture shows how does the generator torque and blade pitch angle was trimmed.


I am wondering if I need to do the same thing to external force if I want to generate a linearized system with external force as the only input.

By the way, in the subroutine “Linearize”, I noticed one part with the following description “Calculate the partition of inv([M])*[F] associated with generator torque for the input matrix, [B], by perturbing the generator torque using the central difference pertubation method: Also, calculate the generator torque portion of the direct transmission matrix, [D]: Only do this if necessary (i.e., if generator torque is selected as a control input):” and the code for input generator torque is shown in the following picture.

I know I need to do the same thing for external force but I am not sure if there is anything else that I need to add for external force in the subroutine “Linearize”

Best

XING WEI

Dear Xing,

The “trim” solution is optional and what control inputs are “trimmed” are independent from those available for including in the linearized state-space matrices. I think you need to answer your own question, but my guess is you would not need to change the trim solution; instead, my guess is that you can fix the external force during the trim solution.

My guess is that including a segment of code similar to that associated with IndxGenTq is the main change to SUBROUTINE Linearize, but I can’t say without spending more time if other changes would be needed. Again, you might need to change other parts of the code depending on how the external force has been implemented. I don’t have the resources to help you with that.

Best regards,

Dear Jason,

I am trying do some modification, too. I just wondered the theory basis of the calculation mass matrix [AugMat(1:ndof,1:ndof)]. May you advice any source to look into?

Dear Enes,

The theoretical development of the mass matrix used in FAST v7 and the ElastoDyn module of FAST v8 is documented in the “unofficial FAST theory manual” discussed in the following forum topic: http://forums.nrel.gov/t/fast-theory-manual/1322/72. Please send me an e-mail (or your e-mail address) and I’ll reply back with the “unofficial FAST theory manual”.

Best regards,

Dear Jason,

I am greatful you remind me. I received the documentation before. Thanks for all.

Best regards,