FAST v8 Test18 - New Simulink model

This forum if for discussing controls. Questions about how to implement controls in FAST are more appropriate to the CAE Tools forum.

Moderator: Bonnie.Jonkman

Jonathan.Silva
Posts: 10
Joined: Tue Sep 11, 2018 7:25 am
Organization: Federal University of Technology - Paraná
Location: Brasil

FAST v8 Test18 - New Simulink model

Postby Jonathan.Silva » Mon Oct 22, 2018 6:12 pm

Dear all,

I've tried a new approach to run FAST Simulink models.

Instead of running Run_OpenLoop.m (OpenLoop.mdl) I tried to run Energies.mdl, which I'm sending a picture below:

https://drive.google.com/file/d/1jchpIiEzmUG2-qsOmGkuu-xr91SBnbTq/view

Although I run this model for Test18.fst and it was working fine for Run_OpenLoop.m (OpenLoop.mdl) , when I tried to run on Energies.mdl it resulted some errors. Please, can you help to identify and fix these erros?

Code: Select all

>> RunEnergies
***********************************************
FAST_SFunc certification test for Test18
***********************************************
Error using RunEnergies (line 19)
Error due to multiple causes.

Caused by:
    Error using RunEnergies (line 19)
    Invalid setting in 'Energies/FAST Nonlinear Wind Turbine/Demux' for
    parameter 'Outputs'.
        Error using RunEnergies (line 19)
        Error evaluating parameter 'Outputs' in 'Energies/FAST Nonlinear
        Wind Turbine/Demux'
            Error using RunEnergies (line 19)
            Undefined function or variable 'NDOF'.
    Error using RunEnergies (line 19)
    Error in S-function 'Energies/Soft Real Time': S-Function 'sfun_time'
    does not exist


Best wishes,
Jonathan

Jason.Jonkman
Posts: 4843
Joined: Thu Nov 03, 2005 4:38 pm
Location: Boulder, CO
Contact:

Re: FAST v8 Test18 - New Simulink model

Postby Jason.Jonkman » Tue Oct 23, 2018 7:46 am

Dear Jonathan,

I'm not familiar with RunEnergies.mdl; this doesn't appear to be a model provided by NREL. Regardless, from the error message, it appears that you must set the NDOF variable before running the RunEnergies.mdl.

Best regards,
Jason Jonkman, Ph.D.
Senior Engineer | National Wind Technology Center (NWTC)

National Renewable Energy Laboratory (NREL)
15013 Denver West Parkway | Golden, CO 80401
+1 (303) 384 – 7026 | Fax: +1 (303) 384 – 6901
nwtc.nrel.gov

Jonathan.Silva
Posts: 10
Joined: Tue Sep 11, 2018 7:25 am
Organization: Federal University of Technology - Paraná
Location: Brasil

Re: FAST v8 Test18 - New Simulink model

Postby Jonathan.Silva » Wed Oct 24, 2018 5:15 pm

Thank you for the fast reply Professor Jonkman,

RunEnergies,mdl it's not a model provided by NREL. It was created to simulate some turbine controls, as these ones:

Code: Select all

if px==1
                    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                    % Optimal control
                   
                    Num = 2*r{i}*(u - 2.14*omega_g^2)*(-2*2.14*omega_g) ...
                        +2*q{i}*(Pref - u*omega_g)*(-u);
                    DerivCp=geraDerivadaCp(Cp,wind,Pitch,omega_g);
                   
                    Parte1=r{i}*(u - 2.14*omega_g^2)^2;
                    Parte2=q{i}*(Pref - u*omega_g)^2;
                   
                    Au2=b2*q{i}*omega_g/DerivCp;
                    Bu2= -2*b2*r{i}*2.14*omega_g/DerivCp - b2*q{i}*Pref/DerivCp + r{i} + q{i}*omega_g^2;
                    Cu2= -( -2*b2*r{i}*2.14^2*omega_g^3/DerivCp + r{i}*2.14*omega_g^2 + q{i}*Pref*omega_g );
                    raizes = roots([Au2 Bu2 Cu2]);
                    raizMin = min(raizes);
                    raizMax = max(raizes);
                    if raizMin>0
                        ut3=raizMin;
                    else
                        ut3=raizMax;
                    end
                    u=ut3;
                    flag=['markov'];
                    if u<0
                        disp('socorro. u negativo')
                    end
                    flag = ['markov'];
                end
               
               
               
                if px==2
                    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                    % Jockerman interpretado Yolanda
                    if (leer<1129)
                        u = 2.14*omega_g^2;
                    elseif (leer>1165)
                        u = Pref/omega_g;
                    else
                        alpha = -leer/36 + 1165/36;
                        u = alpha*2.14*omega_g^2 + (1-alpha)*Pref/omega_g;
                    end
                    flag=['jocker'];
                end
               
               
                if px==3
                    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                    % Regra chaveado Chino
                    if (wind<11.4)
                        u = 2.14*omega_g^2;
                    else
                        u = Pref/omega_g;
                    end
                    flag=['chino'];
                end


Despite I have set NDOF variable, another variables needed to be set, and when I set all of them the script run out in another error. I think that's not a way I can test these controls. Is there any model provided by NREL that I could test these controls?

With gratitude,
Jonathan

Jason.Jonkman
Posts: 4843
Joined: Thu Nov 03, 2005 4:38 pm
Location: Boulder, CO
Contact:

Re: FAST v8 Test18 - New Simulink model

Postby Jason.Jonkman » Wed Oct 24, 2018 5:25 pm

Dear Jonathan,

I'm not sure what you mean when you say, "is there any model provided by NREL that I could test these controls?" What controls do you want to test?

Best regards,
Jason Jonkman, Ph.D.
Senior Engineer | National Wind Technology Center (NWTC)

National Renewable Energy Laboratory (NREL)
15013 Denver West Parkway | Golden, CO 80401
+1 (303) 384 – 7026 | Fax: +1 (303) 384 – 6901
nwtc.nrel.gov


Return to “Controls”

Who is online

Users browsing this forum: No registered users and 1 guest