Skip to content

Commit

Permalink
Initial commit R2019b. Convert to MATLAB Project.
Browse files Browse the repository at this point in the history
  • Loading branch information
smiller01985 committed Nov 2, 2019
1 parent 647ee92 commit 22d5d19
Show file tree
Hide file tree
Showing 904 changed files with 3,045 additions and 57 deletions.
Binary file modified Libraries/Blades/Blades_Lib.slx
Binary file not shown.
Binary file modified Libraries/Blades/Blades_Testrig.slx
Binary file not shown.
Binary file not shown.
Binary file modified Libraries/Blades/Flex_Blades/Libraries/Flex_Cantilever_Lib.slx
Binary file not shown.
Binary file modified Libraries/Blades/Flex_Blades/Wind_Turbine_Flexible_Blades.slx
Binary file not shown.
Binary file modified Libraries/Brakes/Brakes_Lib.slx
Binary file not shown.
Binary file removed Libraries/Environment/AerodynamicLoads_lib.slx
Binary file not shown.
Binary file modified Libraries/Environment/Inputs_Set_Busses_Testrig.slx
Binary file not shown.
Binary file modified Libraries/Environment/Turbine_Input_Lib.slx
Binary file not shown.
Binary file modified Libraries/Environment/Wind_Lib.slx
Binary file not shown.
Binary file modified Libraries/Environment/Wind_Testrig.slx
Binary file not shown.
Binary file modified Libraries/Geartrain/Geartrain_Lib.slx
Binary file not shown.
Binary file modified Libraries/Geartrain/Geartrain_Testrig.slx
Binary file not shown.
Binary file modified Libraries/Generator/Generator_Lib.slx
Binary file not shown.
Binary file modified Libraries/Generator/Generator_Testrig.slx
Binary file not shown.
Binary file modified Libraries/Main_Controller/Main_Controller_Lib.slx
Binary file not shown.
Binary file modified Libraries/Main_Controller/SLDV/ControlLogic.slx
Binary file not shown.
Binary file modified Libraries/Main_Controller/SLDV/ControlLogic_Ports.slx
Binary file not shown.
Binary file modified Libraries/Main_Controller/SLDV/ControlLogic_Testrig.slx
Binary file not shown.
Binary file modified Libraries/Main_Controller/Turbine_State_Machine_Lib.slx
Binary file not shown.
Binary file modified Libraries/Main_Controller/Turbine_State_Machine_Testrig.slx
Binary file not shown.
Binary file modified Libraries/Nacelle/Hub_Axis_Lib.slx
Binary file not shown.
Binary file modified Libraries/Pitch_Actuation/Hydraulic_Actuator_Lib.slx
Binary file not shown.
Binary file modified Libraries/Pitch_Actuation/Pitch_Actuation_Hydraulic_Testrig.slx
Binary file not shown.
Binary file modified Libraries/Pitch_Actuation/Pitch_Actuation_Lib.slx
Binary file not shown.
Binary file modified Libraries/Pitch_Actuation/Pitch_Actuation_Linkage.slx
Binary file not shown.
Binary file modified Libraries/Pitch_Actuation/Pitch_Actuation_Linkage_Lib.slx
Binary file not shown.
Binary file modified Libraries/Pitch_Actuation/Pitch_System_Lib.slx
Binary file not shown.
Binary file not shown.
Binary file modified Libraries/Pitch_Controller/Pitch_Control_Ideal_Testrig.slx
Binary file not shown.
Binary file modified Libraries/Pitch_Controller/Pitch_Controller_Generated_SFunc.slx
Binary file not shown.
Binary file modified Libraries/Pitch_Controller/Pitch_Controller_Lib.slx
Binary file not shown.
31 changes: 31 additions & 0 deletions Libraries/Pitch_Controller/UpdateControlSystemDesigner_Session.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
% Copyright 2016-2019 The MathWorks, Inc.

% MAT file containing session
load('ControlSystemDesignerSession_start.mat');

% Updating the operating point
op = ControlSystemDesignerSession.DesignerData.Architecture.Data.OperatingPoints;
ControlSystemDesignerSession.DesignerData.Architecture.Data.OperatingPoints = update(op);
% If needed, here is how to obtain op_snapshot1
% op_snapshot1 = ControlSystemDesignerSession.DesignerData.Architecture.Data.OperatingPoints

save ControlSystemDesignerSession_start ControlSystemDesignerSession

clear ControlSystemDesignerSession

% MAT file containing session
load('ControlSystemDesignerSession_end.mat');

% Updating the operating point
op = ControlSystemDesignerSession.DesignerData.Architecture.Data.OperatingPoints;
ControlSystemDesignerSession.DesignerData.Architecture.Data.OperatingPoints = update(op);
% If needed, here is how to obtain op_snapshot1
% op_snapshot1 = ControlSystemDesignerSession.DesignerData.Architecture.Data.OperatingPoints

save ControlSystemDesignerSession_end ControlSystemDesignerSession

clear ControlSystemDesignerSession


% Call controlSystemDesigner with updated OP
%controlSystemDesigner(ControlSystemDesignerSession);
Binary file modified Libraries/Tower/Tower.slx
Binary file not shown.
Binary file modified Libraries/Yaw_Actuation/Yaw_Actuation_Lib.slx
Binary file not shown.
Binary file modified Libraries/Yaw_Actuation/Yaw_Actuation_Testrig.slx
Binary file not shown.
Binary file modified Libraries/Yaw_Actuation/Yaw_Gearbox_Lib.slx
Binary file not shown.
Binary file modified Libraries/Yaw_Actuation/Yaw_Gearbox_Testrig.slx
Binary file not shown.
Binary file modified Libraries/Yaw_Actuation/Yaw_Ideal_Actuator_Lib.slx
Binary file not shown.
Binary file modified Libraries/Yaw_Actuation/Yaw_Ideal_Motor_Lib.slx
Binary file not shown.
Binary file modified Libraries/Yaw_Actuation/Yaw_Motor_Lib.slx
Binary file not shown.
Binary file modified Libraries/Yaw_Actuation/Yaw_System_Lib.slx
Binary file not shown.
Binary file modified Libraries/Yaw_Controller/Yaw_Controller_Lib.slx
Binary file not shown.
4 changes: 2 additions & 2 deletions README.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Here are some key points about this demonstration model.

1. You must run "startup_Wind_Turbine.m" to set the path and load key values.
1. You must open project "Wind_Turbine.prj" to set the path and load key values.

2. You will need a supported compiler.
2. You may need a supported compiler.
http://www.mathworks.com/support/compilers/current_release/

3. Some configurations are invalid.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<!--
This HTML was auto-generated from MATLAB code.
To make changes, update the MATLAB code and republish this document.
--><title>Wind Turbine Demo Script</title><meta name="generator" content="MATLAB 9.6"><link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"><meta name="DC.date" content="2019-03-09"><meta name="DC.source" content="Wind_Turbine_Demo_Script.m"><style type="text/css">
--><title>Wind Turbine Demo Script</title><meta name="generator" content="MATLAB 9.7"><link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"><meta name="DC.date" content="2019-08-20"><meta name="DC.source" content="Wind_Turbine_Demo_Script.m"><style type="text/css">
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}:focus{outine:0}ins{text-decoration:none}del{text-decoration:line-through}table{border-collapse:collapse;border-spacing:0}

html { min-height:100%; margin-bottom:1px; }
Expand Down Expand Up @@ -76,7 +76,7 @@
<tr>3. <a href="matlab:Wind_Turbine;">Link Specification and Design</a><br>
<tr>4. <a href="matlab:Pitch_Control_Ideal_Testrig;">Determine Pitch Actuator Requirements</a><br>
<tr>5. <a href="matlab:Pitch_Actuation_Hydraulic_Testrig;">Test Hydraulic Pitch Actuator Design</a><br>
<tr>6. <a href="matlab:cd([WT_HomeDir '\PCT']);Pitch_Actuation_Hydraulic_Testrig;edit Hydraulic_Testrig_PCT_Sim;">Distribute Simulations Using Parallel Computing</a><br>
<tr>6. <a href="matlab:cd(fileparts(which('Hydraulic_Testrig_PCT_Sim.m')));Pitch_Actuation_Hydraulic_Testrig;edit Hydraulic_Testrig_PCT_Sim;">Distribute Simulations Using Parallel Computing</a><br>
<tr>7. <a href="matlab:Wind_Turbine;Compare_Pitch_Actuators;">Compare Pitch Actuators Using Full Turbine Model</a><br>
<tr><b><u>Yaw, Generator, Blades</u></b><br>
<tr>8. <a href="matlab:Wind_Turbine;Select_Turbine_Systems('IA_Yaw Test', WT_Configs);open_system('Wind_Turbine/Nacelle');open_system('Wind_Turbine/Scopes/Yaw Ctrl Scopes/Yaw Actuator Torque');">Determine Yaw Actuator Requirements</a><br>
Expand All @@ -92,11 +92,11 @@
<tr>17. Document Results: <a href="matlab:open('Wind_Turbine_Report_WIND_TESTS.html');">View Report</a>, <a href="matlab:open('Wind_Turbine_Report_WIND_TESTS.rpt');">Generate Report</a><br>
<tr><b><u>Deploy</u></b><br>
<tr>18. Improve Simulation Performance With Local Solvers<br>
<tr>... a.<a href="matlab:cd([WT_HomeDir '\Local_Solver\Pitch_System']);Pitch_Actuation_Hydraulic_Testrig;edit Test_RT_Model;">Pitch System</a><br>
<tr>... b.<a href="matlab:cd([WT_HomeDir '\Local_Solver\Full_Turbine']);Wind_Turbine;edit Test_RT_Model;">Full Turbine</a><br>
<tr>... a.<a href="matlab:cd(fileparts(which('Pitch_Actuation_Hydraulic_Testrig_SLRT.m')));Pitch_Actuation_Hydraulic_Testrig;edit Pitch_Actuation_Hydraulic_Testrig_SLRT;">Pitch System</a><br>
<tr>... b.<a href="matlab:cd(fileparts(which('Wind_Turbine_SLRT.m')));Wind_Turbine;edit Wind_Turbine_SLRT;">Full Turbine</a><br>
</style>
</style>
</p><p>Copyright 2009-2019 The MathWorks&#8482;, Inc.</p><p class="footer"><br><a href="https://www.mathworks.com/products/matlab/">Published with MATLAB&reg; R2019a</a><br></p></div><!--
</p><p>Copyright 2009-2019 The MathWorks&#8482;, Inc.</p><p class="footer"><br><a href="https://www.mathworks.com/products/matlab/">Published with MATLAB&reg; R2019b</a><br></p></div><!--
##### SOURCE BEGIN #####
%% Wind Turbine Demo Script
%
Expand All @@ -110,7 +110,7 @@
% <tr>3. <a href="matlab:Wind_Turbine;">Link Specification and Design</a><br>
% <tr>4. <a href="matlab:Pitch_Control_Ideal_Testrig;">Determine Pitch Actuator Requirements</a><br>
% <tr>5. <a href="matlab:Pitch_Actuation_Hydraulic_Testrig;">Test Hydraulic Pitch Actuator Design</a><br>
% <tr>6. <a href="matlab:cd([WT_HomeDir '\PCT']);Pitch_Actuation_Hydraulic_Testrig;edit Hydraulic_Testrig_PCT_Sim;">Distribute Simulations Using Parallel Computing</a><br>
% <tr>6. <a href="matlab:cd(fileparts(which('Hydraulic_Testrig_PCT_Sim.m')));Pitch_Actuation_Hydraulic_Testrig;edit Hydraulic_Testrig_PCT_Sim;">Distribute Simulations Using Parallel Computing</a><br>
% <tr>7. <a href="matlab:Wind_Turbine;Compare_Pitch_Actuators;">Compare Pitch Actuators Using Full Turbine Model</a><br>
% <tr><b><u>Yaw, Generator, Blades</u></b><br>
% <tr>8. <a href="matlab:Wind_Turbine;Select_Turbine_Systems('IA_Yaw Test', WT_Configs);open_system('Wind_Turbine/Nacelle');open_system('Wind_Turbine/Scopes/Yaw Ctrl Scopes/Yaw Actuator Torque');">Determine Yaw Actuator Requirements</a><br>
Expand All @@ -126,8 +126,8 @@
% <tr>17. Document Results: <a href="matlab:open('Wind_Turbine_Report_WIND_TESTS.html');">View Report</a>, <a href="matlab:open('Wind_Turbine_Report_WIND_TESTS.rpt');">Generate Report</a><br>
% <tr><b><u>Deploy</u></b><br>
% <tr>18. Improve Simulation Performance With Local Solvers<br>
% <tr>... a.<a href="matlab:cd([WT_HomeDir '\Local_Solver\Pitch_System']);Pitch_Actuation_Hydraulic_Testrig;edit Test_RT_Model;">Pitch System</a><br>
% <tr>... b.<a href="matlab:cd([WT_HomeDir '\Local_Solver\Full_Turbine']);Wind_Turbine;edit Test_RT_Model;">Full Turbine</a><br>
% <tr>... a.<a href="matlab:cd(fileparts(which('Pitch_Actuation_Hydraulic_Testrig_SLRT.m')));Pitch_Actuation_Hydraulic_Testrig;edit Pitch_Actuation_Hydraulic_Testrig_SLRT;">Pitch System</a><br>
% <tr>... b.<a href="matlab:cd(fileparts(which('Wind_Turbine_SLRT.m')));Wind_Turbine;edit Wind_Turbine_SLRT;">Full Turbine</a><br>
% </style>
% </style>
% </html>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
% <tr>3. <a href="matlab:Wind_Turbine;">Link Specification and Design</a><br>
% <tr>4. <a href="matlab:Pitch_Control_Ideal_Testrig;">Determine Pitch Actuator Requirements</a><br>
% <tr>5. <a href="matlab:Pitch_Actuation_Hydraulic_Testrig;">Test Hydraulic Pitch Actuator Design</a><br>
% <tr>6. <a href="matlab:cd([WT_HomeDir '\PCT']);Pitch_Actuation_Hydraulic_Testrig;edit Hydraulic_Testrig_PCT_Sim;">Distribute Simulations Using Parallel Computing</a><br>
% <tr>6. <a href="matlab:cd(fileparts(which('Hydraulic_Testrig_PCT_Sim.m')));Pitch_Actuation_Hydraulic_Testrig;edit Hydraulic_Testrig_PCT_Sim;">Distribute Simulations Using Parallel Computing</a><br>
% <tr>7. <a href="matlab:Wind_Turbine;Compare_Pitch_Actuators;">Compare Pitch Actuators Using Full Turbine Model</a><br>
% <tr><b><u>Yaw, Generator, Blades</u></b><br>
% <tr>8. <a href="matlab:Wind_Turbine;Select_Turbine_Systems('IA_Yaw Test', WT_Configs);open_system('Wind_Turbine/Nacelle');open_system('Wind_Turbine/Scopes/Yaw Ctrl Scopes/Yaw Actuator Torque');">Determine Yaw Actuator Requirements</a><br>
Expand All @@ -26,8 +26,8 @@
% <tr>17. Document Results: <a href="matlab:open('Wind_Turbine_Report_WIND_TESTS.html');">View Report</a>, <a href="matlab:open('Wind_Turbine_Report_WIND_TESTS.rpt');">Generate Report</a><br>
% <tr><b><u>Deploy</u></b><br>
% <tr>18. Improve Simulation Performance With Local Solvers<br>
% <tr>... a.<a href="matlab:cd([WT_HomeDir '\Local_Solver\Pitch_System']);Pitch_Actuation_Hydraulic_Testrig;edit Test_RT_Model;">Pitch System</a><br>
% <tr>... b.<a href="matlab:cd([WT_HomeDir '\Local_Solver\Full_Turbine']);Wind_Turbine;edit Test_RT_Model;">Full Turbine</a><br>
% <tr>... a.<a href="matlab:cd(fileparts(which('Pitch_Actuation_Hydraulic_Testrig_SLRT.m')));Pitch_Actuation_Hydraulic_Testrig;edit Pitch_Actuation_Hydraulic_Testrig_SLRT;">Pitch System</a><br>
% <tr>... b.<a href="matlab:cd(fileparts(which('Wind_Turbine_SLRT.m')));Wind_Turbine;edit Wind_Turbine_SLRT;">Full Turbine</a><br>
% </style>
% </style>
% </html>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
19 changes: 19 additions & 0 deletions Scripts_Data/shutdown_Wind_Turbine.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
% Copyright 2009-2019 The MathWorks, Inc.
cd(fileparts(which('Wind_Turbine.slx')))
cd(['Libraries' filesep 'Environment']);
if(exist('+AerodynamicLoads','dir') && exist('AerodynamicLoads_Lib.slx','file'))
bdclose('AerodynamicLoads_Lib')
ssc_clean AerodynamicLoads
end
cd(fileparts(which('Wind_Turbine.slx')))

% Testing for generated code
if(exist(['Libraries' filesep 'Pitch_Controller' filesep 'PCG'],'dir'))
cd(['Libraries' filesep 'Pitch_Controller' filesep 'PCG']);
%startup_Pitch_Controller_PCG
rmpath([pwd '\Scripts_Test_Case_Data_Slides']);
rmpath([pwd '\DD']);
rmpath([pwd '\wpi_target']);
rmpath(pwd);
cd(fileparts(which('Wind_Turbine.slx')))
end
23 changes: 23 additions & 0 deletions Scripts_Data/startup_Wind_Turbine.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
% Copyright 2009-2019 The MathWorks, Inc.
WT_HomeDir = pwd;

curr_proj = simulinkproject;
cd(curr_proj.RootFolder);
cd(['Libraries' filesep 'Environment']);
if(exist('+AerodynamicLoads','dir') && ~exist('AerodynamicLoads_Lib.slx','file'))
ssc_build AerodynamicLoads
end
cd(curr_proj.RootFolder);

% Testing for generated code
if(exist(['Libraries' filesep 'Pitch_Controller' filesep 'PCG'],'dir'))
addpath([pwd filesep 'Libraries' filesep 'Pitch_Controller' filesep 'PCG']);
cd(['Libraries' filesep 'Pitch_Controller' filesep 'PCG']);
startup_Pitch_Controller_PCG
cd(curr_proj.RootFolder);
end

Wind_Turbine_Parameters
load Actuator_Lookup_data
Wind_Turbine
open('Wind_Turbine_Demo_Script.html')
2 changes: 2 additions & 0 deletions Wind_Turbine.prj
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<MATLABProject xmlns="http://www.mathworks.com/MATLABProjectFile" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0"/>
Binary file modified Wind_Turbine.slx
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 22d5d19

Please sign in to comment.