-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFAST_Driver.m
57 lines (42 loc) · 1.47 KB
/
FAST_Driver.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
%% Simulate Non-Linear OpenFAST
clear all; close all; clc;
tests = {'C2_PinkNoise'};
FASTdir = 'C:\\Umaine Google Sync\Masters Working Folder\FOCAL_C2';
model = 'DT1';
for i = 1:length(tests)
runFAST(model,tests{i},FASTdir,'CheckSimFolder',false);
end
%% Perform OpenFAST Linearization
clear all; close all; clc;
tests = {'000_Linearize'};
FASTdir = 'C:\\Umaine Google Sync\Masters Working Folder\FOCAL_C2';
model = 'DT1_Locked_Platform';
for i = 1:length(tests)
runFAST(model,tests{i},FASTdir,'MoveFiles',false,'Linearize',true,...
'CheckSimFolder',false,'HydroDyn',false);
end
% Check Observability
%% Run State-Space Model
clear all; close all; clc;
% tests = {'FD_Surge','FD_Heave','FD_Pitch'}
tests = {'C2_PinkNoise'}
% FD_IC = readmatrix('FD_IC.csv');
% FD_IC = FD_IC(:,2);
SLXdir = 'C:\Umaine Google Sync\Masters Working Folder\FOCAL_C2';
model = 'DT1_Locked';
for i = 1:length(tests)
IC_x = zeros(20,1);
% IC_x(i) = FD_IC(i);
simout = runSLX(model,tests{i},SLXdir,'SeparateOutput',true,'InitialConditions',IC_x);
end
%% Run State-Space w/ Kalman Filter
clear all; close all; clc;
tests = {'Test_01'}
measurements = {'PtfmPitch','PtfmRoll','FAIRTEN1','FAIRTEN2','FAIRTEN3'};
SLXdir = 'C:\Umaine Google Sync\Masters Working Folder\FOCAL_C2';
model = 'DT1_Locked';
for i = 1:length(tests)
IC_x = zeros(20,1);
runSLX(model,tests{i},SLXdir,'Observer',true,'MeasurementFields',measurements,...
'SeparateOutput',true,'InitialConditions',IC_x);
end