%% Project file for IMPACT 

% Release
iRelease = 1.000;

% Models files
path{1} = fullfile(matlabroot,'toolbox','IMPACT','demo','wec4');
file{1} = 'wec4_IMPACT_Model.m';



% Controller parameters
Data(1).name = 'controller 1';
Data(1).ptoCont = '1.5014e7*(s+0.6544)/(s+2.197)';
Data(1).floaterImpedance = '8.7032e-07*(s^2 + 1.957e-05*s + 0.0006362)*(s^2 + 0.58*s + 0.8355)*(s^2 + 0.2382*s + 1.341)*(s^2 + 0.8647*s + 1.795)/((s^2 + 8.696e-08*s + 0.0002382)*(s^2 + 1.963e-05*s + 0.0006392)*(s^2 + 1.035*s + 1.059)*(s^2 + 0.2486*s + 1.373)*(s^2 + 0.423*s + 2.099))';
Data(1).sparImpedance = 'zpk([], [0 0], [1.17412e-08 ])';
Data(1).floaterFexc = 'tf(0.9841)';
Data(1).sparFexc = '-0.013604*(s^2 + 0.8605*s + 0.8799)*(s^2 + 0.3586*s + 2.132)/((s^2 + 0.4477*s + 0.744)*(s^2 + 0.7216*s + 1.876))';

Data(1).floaterImpedanceX = '8.1876e-07*(s^2 + 0.5653*s + 1.05)*(s^2 + 0.2934*s + 2.73)/((s^2 + 4.796e-06*s + 0.000269)*(s^2 + 0.7469*s + 1.388)*(s^2 + 0.2389*s + 2.691))';
Data(1).sparImpedanceX = ' 6.2735e-08/s^2';
Data(1).floaterFexcX = '0.92492*(s^2 + 0.5792*s + 1.435)*(s^2 + 0.1224*s + 1.62)/((s^2 + 0.5772*s + 1.465)*(s^2 + 0.1229*s + 1.621))';
Data(1).sparFexcX = ' -0.075077*(s^2 + 0.1166*s + 1.636)*(s^2 + 0.5447*s + 1.83)/((s^2 + 0.5732*s + 1.463)*(s^2 + 0.1154*s + 1.622))';

Data(1).ptoContX = '1.8523e7*s/(s+4)*(s^2+0.3067*s+21.16)/(s^2+2.453*s+21.16)';


EKFFloater.rInitialFrequencyEkf = 0.5;
EKFFloater.rInitialPhi0 = 100000;
EKFFloater.rTimeStep = 0.01;
EKFFloater.arProcessNoiseCovariance_1 = 1e+06;
EKFFloater.arProcessNoiseCovariance_2 = 1e+06;
EKFFloater.arProcessNoiseCovariance_3 = 1e-11;
EKFFloater.arProcessNoiseCovariance_1_0 = 100000;
EKFFloater.arProcessNoiseCovariance_2_0 = 100000;
EKFFloater.arProcessNoiseCovariance_3_0 = 0.1;
EKFFloater.arMeasurementNoiseCovariance = 1e+10;
EKFFloater.rUpperFreq = 10;

EKFSpar.rInitialFrequencyEkf = 0.5;
EKFSpar.rInitialPhi0 = 100000;
EKFSpar.rTimeStep = 0.01;
EKFSpar.arProcessNoiseCovariance_1 = 1e+06;
EKFSpar.arProcessNoiseCovariance_2 = 1e+06;
EKFSpar.arProcessNoiseCovariance_3 = 1e-11;
EKFSpar.arProcessNoiseCovariance_1_0 = 100000;
EKFSpar.arProcessNoiseCovariance_2_0 = 100000;
EKFSpar.arProcessNoiseCovariance_3_0 = 0.1;
EKFSpar.arMeasurementNoiseCovariance = 1e+10;
EKFSpar.rUpperFreq = 10;

iControlType = 2;
iAdaptiveDamping = 0;
iPtoPositionConstraint  = 1;
rDisplacementLimit = 10.000000;
rMaxForcePto = 300000000.000000;
rMinForcePto = -300000000.000000;
rOutputSampleTime = 0.010000;
rStartRampTime = 80.000000;
rRampTimeLength = 120.000000;
rPassiveDampingGain = -604830.000000;
rPassiveDampingGainX = -278660.000000;
rDisplacementLimitX = 10.000000;
stAddParamsFile = fullfile(matlabroot,'toolbox','IMPACT','demo','wec4','wec4AdditionalParams.m');
