Bonnie,
thank you for your reply. I got FAST as a package and didn’t know that this is not NREL Code.
I run the simulation via Start_Simulation.m:
[code]% the FAST Simulation folder must be the current directory
clc
clear all;
Simulation_path = pwd; % current working directory as an variable
%% ============== 1_SteadyWind - 15 mps, NoControl =========================
% % multiple(k) simulations-runs with varying generator moments (rated): 1_SteadyWind - 15 mps, NoControl
% Uncomment to run !
GenMoment = 0; % starting generator moment (rated)
k = 1; % number of runs, divisible by 5! (number of subplot in a figure)
for i=1:k
Simsetup_path= fullfile(Simulation_path, 'Onshore', '1_SteadyWind_15mps_NoControl');
run ([Simsetup_path '\Simsetup.m']);
%GenMoment= GenMoment+1000; % increase of moment can be adjusted
end
run (fullfile(Simulation_path, ‘\Simulink’, ‘\Plotting’ ,‘\plotMapCp.m’)); % plotting Cp-map
run (fullfile(Simulation_path, ‘\Simulink’, ‘\Plotting’ ,‘\plotMapCm.m’)); % plotting Cm-map[/code]
Simsetup.m runs the following:
[code]clear FAST_SFunc;
%% ========== Display of #.run and with which generator moment ============
disp( ’ -------------------------------------------------’ );
disp( [’ ’ sprintf(‘%.0f’,i) ‘.run with ’ sprintf(’%.0f’, GenMoment) ‘Nm’] );
disp( ’ -------------------------------------------------’ );
%% ======================= Setup run ======================================
input_fast = [‘HTWBerlinHLV_Onshore.fst’]; % primary FAST-File (.fst)
addpath( [Simulation_path, ‘\Simulink’]); % Add Simulink folder to work-directories with the model and necessary m-scripts
% Read FAST input file and set initial conditions
Read_FAST_Input;
%% ======================= Simulation-modell ==============================
sim([Simulation_path, ‘\Simulink’, ‘\FAST_OpenLoop.mdl’],[0,TMax]); % TMax defined in primary FAST-File(.fst)
%% ================== Read outdata and calculate maps =====================
run ([ Simulation_path, ‘\Simulink’, ‘\Calculations’ , ‘\calcMap.m’]); % maps from FAST (Outdata in workspace)
%run ([ Simulation_path, ‘\Simulink’, ‘\Calculations’ , ‘\ImportELM.m’]); % reads AeroDyn-Output into Matlab workspace
%run ([ Simulation_path, ‘\Simulink’, ‘\Calculations’ , ‘\calcMap2.m’]); % maps from AeroDyn-Output
%% ============== Plotting the results of this Simulation-run =============
% run ([ Simulation_path, ‘\Simulink’, ‘\Plotting’ , ‘\Plot5MWresults.m’]);
% run ([ Simulation_path, ‘\Simulink’, ‘\Plotting’ , ‘\Plot5MWmap.m’]);
%% ====================== closing simulation ==============================
% If your there is an error that requires you to restart the Simulink
% simulation before FAST terminates properly (you should see the Simulation
% Time Ratio statistics printed to the Matlab command window when it
% terminates properly), call the FAST_SFunc routine with FLAG=9, like this:
%
FAST_SFunc(0,,,9);
rmpath( [Simulation_path, ‘\Simulink’]);[/code]
Line 24 runs
sim([Simulation_path, ‘\Simulink’, ‘\FAST_OpenLoop.mdl’],[0,TMax]);
This is the OpenLoop.mdl
Model {
Name "FAST_OpenLoop"
Version 7.6
MdlSubVersion 0
GraphicalInterface {
NumRootInports 0
NumRootOutports 0
ParameterArgumentNames ""
ComputedModelVersion "1.94"
NumModelReferences 0
NumTestPointedSignals 0
}
SavedCharacterEncoding "windows-1252"
SaveDefaultBlockParams on
ScopeRefreshTime 0.035000
OverrideScopeRefreshTime on
DisableAllScopes off
DataTypeOverride "UseLocalSettings"
DataTypeOverrideAppliesTo "AllNumericTypes"
MinMaxOverflowLogging "UseLocalSettings"
MinMaxOverflowArchiveMode "Overwrite"
MaxMDLFileLineLength 120
Created "Mon Feb 09 16:59:21 2004"
Creator "s0526152"
UpdateHistory "UpdateHistoryNever"
ModifiedByFormat "%<Auto>"
LastModifiedBy "s0526152"
ModifiedDateFormat "%<Auto>"
LastModifiedDate "Thu Sep 22 15:29:07 2011"
RTWModifiedTimeStamp 238594387
ModelVersionFormat "1.%<AutoIncrement:94>"
ConfigurationManager "None"
SampleTimeColors off
SampleTimeAnnotations off
LibraryLinkDisplay "none"
WideLines off
ShowLineDimensions on
ShowPortDataTypes off
ShowLoopsOnError on
IgnoreBidirectionalLines off
ShowStorageClass off
ShowTestPointIcons on
ShowSignalResolutionIcons on
ShowViewerIcons on
SortedOrder off
ExecutionContextIcon off
ShowLinearizationAnnotations on
BlockNameDataTip off
BlockParametersDataTip off
BlockDescriptionStringDataTip off
ToolBar on
StatusBar on
BrowserShowLibraryLinks off
BrowserLookUnderMasks off
SimulationMode "normal"
LinearizationMsg "none"
Profile off
ParamWorkspaceSource "MATLABWorkspace"
AccelSystemTargetFile "accel.tlc"
AccelTemplateMakefile "accel_default_tmf"
AccelMakeCommand "make_rtw"
TryForcingSFcnDF off
RecordCoverage off
CovPath "/"
CovSaveName "covdata"
CovMetricSettings "dw"
CovNameIncrementing off
CovHtmlReporting on
CovForceBlockReductionOff on
covSaveCumulativeToWorkspaceVar on
CovSaveSingleToWorkspaceVar on
CovCumulativeVarName "covCumulativeData"
CovCumulativeReport off
CovReportOnPause on
CovModelRefEnable "Off"
CovExternalEMLEnable off
ExtModeBatchMode off
ExtModeEnableFloating on
ExtModeTrigType "manual"
ExtModeTrigMode "normal"
ExtModeTrigPort "1"
ExtModeTrigElement "any"
ExtModeTrigDuration 1000
ExtModeTrigDurationFloating "auto"
ExtModeTrigHoldOff 0
ExtModeTrigDelay 0
ExtModeTrigDirection "rising"
ExtModeTrigLevel 0
ExtModeArchiveMode "off"
ExtModeAutoIncOneShot off
ExtModeIncDirWhenArm off
ExtModeAddSuffixToVar off
ExtModeWriteAllDataToWs off
ExtModeArmWhenConnect on
ExtModeSkipDownloadWhenConnect off
ExtModeLogAll on
ExtModeAutoUpdateStatusClock on
BufferReuse on
ShowModelReferenceBlockVersion off
ShowModelReferenceBlockIO off
Array {
Type "Handle"
Dimension 1
Simulink.ConfigSet {
$ObjectID 1
Version "1.10.0"
Array {
Type "Handle"
Dimension 8
Simulink.SolverCC {
$ObjectID 2
Version "1.10.0"
StartTime "0.0"
StopTime "TMax"
AbsTol "auto"
FixedStep "DT"
InitialStep "auto"
MaxNumMinSteps "-1"
MaxOrder 5
ZcThreshold "auto"
ConsecutiveZCsStepRelTol "10*128*eps"
MaxConsecutiveZCs "1000"
ExtrapolationOrder 4
NumberNewtonIterations 1
MaxStep "DT"
MinStep "auto"
MaxConsecutiveMinStep "1"
RelTol "1e-3"
SolverMode "Auto"
ConcurrentTasks off
Solver "ode4"
SolverName "ode4"
SolverJacobianMethodControl "auto"
ShapePreserveControl "DisableAll"
ZeroCrossControl "UseLocalSettings"
ZeroCrossAlgorithm "Nonadaptive"
AlgebraicLoopSolver "TrustRegion"
SolverResetMethod "Fast"
PositivePriorityOrder off
AutoInsertRateTranBlk off
SampleTimeConstraint "Unconstrained"
InsertRTBMode "Whenever possible"
}
Simulink.DataIOCC {
$ObjectID 3
Version "1.10.0"
Decimation "1"
ExternalInput "[t, u]"
FinalStateName "xFinal"
InitialState "xInitial"
LimitDataPoints on
MaxDataPoints "1000"
LoadExternalInput off
LoadInitialState off
SaveFinalState off
SaveCompleteFinalSimState off
SaveFormat "Array"
SaveOutput off
SaveState off
SignalLogging on
DSMLogging on
InspectSignalLogs off
SaveTime off
ReturnWorkspaceOutputs off
StateSaveName "xout"
TimeSaveName "tout"
OutputSaveName "yout"
SignalLoggingName "sigsOut"
DSMLoggingName "dsmout"
OutputOption "RefineOutputTimes"
OutputTimes "[]"
ReturnWorkspaceOutputsName "out"
Refine "1"
}
Simulink.OptimizationCC {
$ObjectID 4
Version "1.10.0"
Array {
Type "Cell"
Dimension 8
Cell "BooleansAsBitfields"
Cell "PassReuseOutputArgsAs"
Cell "PassReuseOutputArgsThreshold"
Cell "ZeroExternalMemoryAtStartup"
Cell "ZeroInternalMemoryAtStartup"
Cell "OptimizeModelRefInitCode"
Cell "NoFixptDivByZeroProtection"
Cell "UseSpecifiedMinMax"
PropName "DisabledProps"
}
BlockReduction on
BooleanDataType on
ConditionallyExecuteInputs on
InlineParams off
UseIntDivNetSlope off
UseSpecifiedMinMax off
InlineInvariantSignals off
OptimizeBlockIOStorage on
BufferReuse on
EnhancedBackFolding off
StrengthReduction off
ExpressionFolding on
BooleansAsBitfields off
BitfieldContainerType "uint_T"
EnableMemcpy on
MemcpyThreshold 64
PassReuseOutputArgsAs "Structure reference"
ExpressionDepthLimit 2147483647
FoldNonRolledExpr on
LocalBlockOutputs on
RollThreshold 5
SystemCodeInlineAuto off
StateBitsets off
DataBitsets off
UseTempVars off
ZeroExternalMemoryAtStartup on
ZeroInternalMemoryAtStartup on
InitFltsAndDblsToZero off
NoFixptDivByZeroProtection off
EfficientFloat2IntCast off
EfficientMapNaN2IntZero on
OptimizeModelRefInitCode off
LifeSpan "inf"
MaxStackSize "Inherit from target"
BufferReusableBoundary on
SimCompilerOptimization "Off"
AccelVerboseBuild off
}
Simulink.DebuggingCC {
$ObjectID 5
Version "1.10.0"
RTPrefix "error"
ConsistencyChecking "none"
ArrayBoundsChecking "none"
SignalInfNanChecking "none"
SignalRangeChecking "none"
ReadBeforeWriteMsg "UseLocalSettings"
WriteAfterWriteMsg "UseLocalSettings"
WriteAfterReadMsg "UseLocalSettings"
AlgebraicLoopMsg "warning"
ArtificialAlgebraicLoopMsg "warning"
SaveWithDisabledLinksMsg "warning"
SaveWithParameterizedLinksMsg "none"
CheckSSInitialOutputMsg on
UnderspecifiedInitializationDetection "Classic"
MergeDetectMultiDrivingBlocksExec "none"
CheckExecutionContextPreStartOutputMsg off
CheckExecutionContextRuntimeOutputMsg off
SignalResolutionControl "TryResolveAllWithWarning"
BlockPriorityViolationMsg "warning"
MinStepSizeMsg "warning"
TimeAdjustmentMsg "none"
MaxConsecutiveZCsMsg "error"
MaskedZcDiagnostic "warning"
IgnoredZcDiagnostic "warning"
SolverPrmCheckMsg "none"
InheritedTsInSrcMsg "warning"
DiscreteInheritContinuousMsg "warning"
MultiTaskDSMMsg "warning"
MultiTaskCondExecSysMsg "none"
MultiTaskRateTransMsg "error"
SingleTaskRateTransMsg "none"
TasksWithSamePriorityMsg "warning"
SigSpecEnsureSampleTimeMsg "warning"
CheckMatrixSingularityMsg "none"
IntegerOverflowMsg "warning"
Int32ToFloatConvMsg "warning"
ParameterDowncastMsg "error"
ParameterOverflowMsg "error"
ParameterUnderflowMsg "none"
ParameterPrecisionLossMsg "warning"
ParameterTunabilityLossMsg "warning"
FixptConstUnderflowMsg "none"
FixptConstOverflowMsg "none"
FixptConstPrecisionLossMsg "none"
UnderSpecifiedDataTypeMsg "none"
UnnecessaryDatatypeConvMsg "none"
VectorMatrixConversionMsg "none"
InvalidFcnCallConnMsg "error"
FcnCallInpInsideContextMsg "Use local settings"
SignalLabelMismatchMsg "none"
UnconnectedInputMsg "warning"
UnconnectedOutputMsg "warning"
UnconnectedLineMsg "warning"
SFcnCompatibilityMsg "none"
UniqueDataStoreMsg "none"
BusObjectLabelMismatch "warning"
RootOutportRequireBusObject "warning"
AssertControl "UseLocalSettings"
EnableOverflowDetection off
ModelReferenceIOMsg "none"
ModelReferenceMultiInstanceNormalModeStructChecksumCheck "error"
ModelReferenceVersionMismatchMessage "none"
ModelReferenceIOMismatchMessage "none"
ModelReferenceCSMismatchMessage "none"
UnknownTsInhSupMsg "warning"
ModelReferenceDataLoggingMessage "warning"
ModelReferenceSymbolNameMessage "warning"
ModelReferenceExtraNoncontSigs "error"
StateNameClashWarn "warning"
SimStateInterfaceChecksumMismatchMsg "warning"
InitInArrayFormatMsg "warning"
StrictBusMsg "None"
BusNameAdapt "WarnAndRepair"
NonBusSignalsTreatedAsBus "none"
LoggingUnavailableSignals "error"
BlockIODiagnostic "none"
SFUnusedDataAndEventsDiag "warning"
SFUnexpectedBacktrackingDiag "warning"
SFInvalidInputDataAccessInChartInitDiag "warning"
SFNoUnconditionalDefaultTransitionDiag "warning"
SFTransitionOutsideNaturalParentDiag "warning"
}
Simulink.HardwareCC {
$ObjectID 6
Version "1.10.0"
ProdBitPerChar 8
ProdBitPerShort 16
ProdBitPerInt 32
ProdBitPerLong 32
ProdBitPerFloat 32
ProdBitPerDouble 64
ProdBitPerPointer 32
ProdLargestAtomicInteger "Char"
ProdLargestAtomicFloat "None"
ProdIntDivRoundTo "Undefined"
ProdEndianess "Unspecified"
ProdWordSize 32
ProdShiftRightIntArith on
ProdHWDeviceType "32-bit Generic"
TargetBitPerChar 8
TargetBitPerShort 16
TargetBitPerInt 32
TargetBitPerLong 32
TargetBitPerFloat 32
TargetBitPerDouble 64
TargetBitPerPointer 32
TargetLargestAtomicInteger "Char"
TargetLargestAtomicFloat "None"
TargetShiftRightIntArith on
TargetIntDivRoundTo "Undefined"
TargetEndianess "Unspecified"
TargetWordSize 32
TargetTypeEmulationWarnSuppressLevel 0
TargetPreprocMaxBitsSint 32
TargetPreprocMaxBitsUint 32
TargetHWDeviceType "Specified"
TargetUnknown on
ProdEqTarget on
}
Simulink.ModelReferenceCC {
$ObjectID 7
Version "1.10.0"
UpdateModelReferenceTargets "IfOutOfDateOrStructuralChange"
CheckModelReferenceTargetMessage "error"
EnableParallelModelReferenceBuilds off
ParallelModelReferenceErrorOnInvalidPool on
ParallelModelReferenceMATLABWorkerInit "None"
ModelReferenceNumInstancesAllowed "Multi"
PropagateVarSize "Infer from blocks in model"
ModelReferencePassRootInputsByReference on
ModelReferenceMinAlgLoopOccurrences off
PropagateSignalLabelsOutOfModel off
SupportModelReferenceSimTargetCustomCode off
}
Simulink.SFSimCC {
$ObjectID 8
Version "1.10.0"
SFSimEnableDebug on
SFSimOverflowDetection on
SFSimEcho on
SimBlas on
SimCtrlC on
SimExtrinsic on
SimIntegrity on
SimUseLocalCustomCode off
SimParseCustomCode on
SimBuildMode "sf_incremental_build"
}
Simulink.RTWCC {
$BackupClass "Simulink.RTWCC"
$ObjectID 9
Version "1.10.0"
Array {
Type "Cell"
Dimension 7
Cell "IncludeHyperlinkInReport"
Cell "GenerateTraceInfo"
Cell "GenerateTraceReport"
Cell "GenerateTraceReportSl"
Cell "GenerateTraceReportSf"
Cell "GenerateTraceReportEml"
Cell "GenerateSLWebview"
PropName "DisabledProps"
}
SystemTargetFile "grt.tlc"
GenCodeOnly off
MakeCommand "make_rtw"
GenerateMakefile on
TemplateMakefile "grt_default_tmf"
GenerateReport off
SaveLog off
RTWVerbose on
RetainRTWFile off
ProfileTLC off
TLCDebug off
TLCCoverage off
TLCAssert off
ProcessScriptMode "Default"
ConfigurationMode "Optimized"
ConfigAtBuild off
RTWUseLocalCustomCode off
RTWUseSimCustomCode off
IncludeHyperlinkInReport off
LaunchReport off
TargetLang "C"
IncludeBusHierarchyInRTWFileBlockHierarchyMap off
IncludeERTFirstTime on
GenerateTraceInfo off
GenerateTraceReport off
GenerateTraceReportSl off
GenerateTraceReportSf off
GenerateTraceReportEml off
GenerateCodeInfo off
GenerateSLWebview off
RTWCompilerOptimization "Off"
CheckMdlBeforeBuild "Off"
CustomRebuildMode "OnUpdate"
Array {
Type "Handle"
Dimension 2
Simulink.CodeAppCC {
$ObjectID 10
Version "1.10.0"
Array {
Type "Cell"
Dimension 21
Cell "IgnoreCustomStorageClasses"
Cell "IgnoreTestpoints"
Cell "InsertBlockDesc"
Cell "InsertPolySpaceComments"
Cell "SFDataObjDesc"
Cell "MATLABFcnDesc"
Cell "SimulinkDataObjDesc"
Cell "DefineNamingRule"
Cell "SignalNamingRule"
Cell "ParamNamingRule"
Cell "InlinedPrmAccess"
Cell "CustomSymbolStr"
Cell "CustomSymbolStrGlobalVar"
Cell "CustomSymbolStrType"
Cell "CustomSymbolStrField"
Cell "CustomSymbolStrFcn"
Cell "CustomSymbolStrFcnArg"
Cell "CustomSymbolStrBlkIO"
Cell "CustomSymbolStrTmpVar"
Cell "CustomSymbolStrMacro"
Cell "ReqsInCode"
PropName "DisabledProps"
}
ForceParamTrailComments off
GenerateComments on
IgnoreCustomStorageClasses on
IgnoreTestpoints off
IncHierarchyInIds off
MaxIdLength 31
PreserveName off
PreserveNameWithParent off
ShowEliminatedStatement off
IncAutoGenComments off
SimulinkDataObjDesc off
SFDataObjDesc off
MATLABFcnDesc off
IncDataTypeInIds off
MangleLength 1
CustomSymbolStrGlobalVar "$R$N$M"
CustomSymbolStrType "$N$R$M"
CustomSymbolStrField "$N$M"
CustomSymbolStrFcn "$R$N$M$F"
CustomSymbolStrFcnArg "rt$I$N$M"
CustomSymbolStrBlkIO "rtb_$N$M"
CustomSymbolStrTmpVar "$N$M"
CustomSymbolStrMacro "$R$N$M"
DefineNamingRule "None"
ParamNamingRule "None"
SignalNamingRule "None"
InsertBlockDesc off
InsertPolySpaceComments off
SimulinkBlockComments on
MATLABSourceComments off
EnableCustomComments off
InlinedPrmAccess "Literals"
ReqsInCode off
UseSimReservedNames off
}
Simulink.GRTTargetCC {
$BackupClass "Simulink.TargetCC"
$ObjectID 11
Version "1.10.0"
Array {
Type "Cell"
Dimension 16
Cell "GeneratePreprocessorConditionals"
Cell "IncludeMdlTerminateFcn"
Cell "CombineOutputUpdateFcns"
Cell "SuppressErrorStatus"
Cell "ERTCustomFileBanners"
Cell "GenerateSampleERTMain"
Cell "GenerateTestInterfaces"
Cell "ModelStepFunctionPrototypeControlCompliant"
Cell "CPPClassGenCompliant"
Cell "MultiInstanceERTCode"
Cell "PurelyIntegerCode"
Cell "SupportComplex"
Cell "SupportAbsoluteTime"
Cell "SupportContinuousTime"
Cell "SupportNonInlinedSFcns"
Cell "PortableWordSizes"
PropName "DisabledProps"
}
TargetFcnLib "ansi_tfl_table_tmw.mat"
TargetLibSuffix ""
TargetPreCompLibLocation ""
TargetFunctionLibrary "ANSI_C"
UtilityFuncGeneration "Auto"
ERTMultiwordTypeDef "System defined"
ERTCodeCoverageTool "None"
ERTMultiwordLength 256
MultiwordLength 2048
GenerateFullHeader on
GenerateSampleERTMain off
GenerateTestInterfaces off
IsPILTarget off
ModelReferenceCompliant on
ParMdlRefBuildCompliant on
CompOptLevelCompliant on
IncludeMdlTerminateFcn on
GeneratePreprocessorConditionals "Disable all"
CombineOutputUpdateFcns off
CombineSignalStateStructs off
SuppressErrorStatus off
ERTFirstTimeCompliant off
IncludeFileDelimiter "Auto"
ERTCustomFileBanners off
SupportAbsoluteTime on
LogVarNameModifier "rt_"
MatFileLogging on
MultiInstanceERTCode off
SupportNonFinite on
SupportComplex on
PurelyIntegerCode off
SupportContinuousTime on
SupportNonInlinedSFcns on
SupportVariableSizeSignals off
EnableShiftOperators on
ParenthesesLevel "Nominal"
PortableWordSizes off
ModelStepFunctionPrototypeControlCompliant off
CPPClassGenCompliant off
AutosarCompliant off
UseMalloc off
ExtMode off
ExtModeStaticAlloc off
ExtModeTesting off
ExtModeStaticAllocSize 1000000
ExtModeTransport 0
ExtModeMexFile "ext_comm"
ExtModeIntrfLevel "Level1"
RTWCAPISignals off
RTWCAPIParams off
RTWCAPIStates off
GenerateASAP2 off
}
PropName "Components"
}
}
PropName "Components"
}
Name "Configuration"
CurrentDlgPage "Solver"
ConfigPrmDlgPosition " [ 400, 210, 1280, 840 ] "
}
PropName "ConfigurationSets"
}
Simulink.ConfigSet {
$PropName "ActiveConfigurationSet"
$ObjectID 1
}
BlockDefaults {
ForegroundColor "black"
BackgroundColor "white"
DropShadow off
NamePlacement "normal"
FontName "Helvetica"
FontSize 10
FontWeight "normal"
FontAngle "normal"
ShowName on
BlockRotation 0
BlockMirror off
}
AnnotationDefaults {
HorizontalAlignment "center"
VerticalAlignment "middle"
ForegroundColor "black"
BackgroundColor "white"
DropShadow off
FontName "Helvetica"
FontSize 10
FontWeight "normal"
FontAngle "normal"
UseDisplayTextAsClickCallback off
}
LineDefaults {
FontName "Helvetica"
FontSize 9
FontWeight "normal"
FontAngle "normal"
}
BlockParameterDefaults {
Block {
BlockType Clock
DisplayTime off
}
Block {
BlockType Constant
Value "1"
VectorParams1D on
SamplingMode "Sample based"
OutMin "[]"
OutMax "[]"
OutDataTypeStr "Inherit: Inherit from 'Constant value'"
LockScale off
SampleTime "inf"
FramePeriod "inf"
PreserveConstantTs off
}
Block {
BlockType Demux
Outputs "4"
DisplayOption "none"
BusSelectionMode off
}
Block {
BlockType Inport
Port "1"
OutMin "[]"
OutMax "[]"
OutDataTypeStr "Inherit: auto"
LockScale off
BusOutputAsStruct off
PortDimensions "-1"
VarSizeSig "Inherit"
SampleTime "-1"
SignalType "auto"
SamplingMode "auto"
LatchByDelayingOutsideSignal off
LatchInputForFeedbackSignals off
Interpolate on
}
Block {
BlockType Integrator
ExternalReset "none"
InitialConditionSource "internal"
InitialCondition "0"
LimitOutput off
UpperSaturationLimit "inf"
LowerSaturationLimit "-inf"
ShowSaturationPort off
ShowStatePort off
AbsoluteTolerance "auto"
IgnoreLimit off
ZeroCross on
ContinuousStateAttributes "''"
}
Block {
BlockType Mux
Inputs "4"
DisplayOption "none"
UseBusObject off
BusObject "BusObject"
NonVirtualBus off
}
Block {
BlockType Outport
Port "1"
OutMin "[]"
OutMax "[]"
OutDataTypeStr "Inherit: auto"
LockScale off
BusOutputAsStruct off
PortDimensions "-1"
VarSizeSig "Inherit"
SampleTime "-1"
SignalType "auto"
SamplingMode "auto"
SourceOfInitialOutputValue "Dialog"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Block {
BlockType "S-Function"
FunctionName "system"
SFunctionModules "''"
PortCounts "[]"
SFunctionDeploymentMode off
}
Block {
BlockType SignalSpecification
OutMin "[]"
OutMax "[]"
OutDataTypeStr "Inherit: auto"
LockScale off
BusOutputAsStruct off
Dimensions "-1"
VarSizeSig "Inherit"
SampleTime "-1"
SignalType "auto"
SamplingMode "auto"
}
Block {
BlockType SubSystem
ShowPortLabels "FromPortIcon"
Permissions "ReadWrite"
PermitHierarchicalResolution "All"
TreatAsAtomicUnit off
CheckFcnCallInpInsideContextMsg off
SystemSampleTime "-1"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
RTWMemSecFuncInitTerm "Inherit from model"
RTWMemSecFuncExecute "Inherit from model"
RTWMemSecDataConstants "Inherit from model"
RTWMemSecDataInternal "Inherit from model"
RTWMemSecDataParameters "Inherit from model"
SimViewingDevice off
DataTypeOverride "UseLocalSettings"
DataTypeOverrideAppliesTo "AllNumericTypes"
MinMaxOverflowLogging "UseLocalSettings"
Variant off
GeneratePreprocessorConditionals off
}
Block {
BlockType ToWorkspace
VariableName "simulink_output"
MaxDataPoints "1000"
Decimation "1"
SampleTime "0"
FixptAsFi off
}
}
System {
Name "FAST_OpenLoop"
Location [991, 186, 1574, 570]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
ReportName "simulink-default.rpt"
SIDHighWatermark "33"
Block {
BlockType Clock
Name "Clock"
SID "1"
Position [30, 25, 50, 45]
Decimation "10"
}
Block {
BlockType SubSystem
Name "FAST Nonlinear Wind Turbine"
SID "2"
Ports [3, 1]
Position [200, 98, 420, 292]
BackgroundColor "darkGreen"
MinAlgLoopOccurrences off
PropExecContextOutsideSubsystem off
RTWSystemCode "Auto"
FunctionWithSeparateData off
Opaque off
RequestExecContextInheritance off
MaskHideContents off
MaskType "FAST Nonlinear Wind Turbine"
MaskDescription "This block contains the FAST S-Function and blocks that integrate the DOF accelerations t"
"o get velocities and displacements."
MaskInitialization "clear FAST_SFunc\n"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskPortRotate "default"
MaskIconUnits "autoscale"
System {
Name "FAST Nonlinear Wind Turbine"
Location [321, 277, 1205, 801]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "Gen. Torque (Nm) and Power (W)"
SID "3"
Position [80, 33, 110, 47]
IconDisplay "Port number"
}
Block {
BlockType Inport
Name "Yaw Position (rad) and Rate (rad/s)"
SID "4"
Position [80, 73, 110, 87]
Port "2"
IconDisplay "Port number"
}
Block {
BlockType Inport
Name "Blade Pitch Angles (rad)"
SID "5"
Position [80, 113, 110, 127]
Port "3"
IconDisplay "Port number"
}
Block {
BlockType Demux
Name "Demux"
SID "6"
Ports [1, 2]
Position [475, 101, 480, 139]
BackgroundColor "black"
ShowName off
Outputs "[NDOF, NumOuts]"
}
Block {
BlockType Integrator
Name "Integrator"
SID "7"
Ports [1, 1]
Position [560, 95, 590, 125]
ShowName off
InitialCondition "qdot_init"
Port {
PortNumber 1
Name "qdot"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType Integrator
Name "Integrator1"
SID "8"
Ports [1, 1]
Position [640, 94, 670, 126]
ShowName off
InitialCondition "q_init"
Port {
PortNumber 1
Name "q"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType Mux
Name "Mux1"
SID "9"
Ports [5, 1]
Position [335, 23, 340, 217]
ShowName off
Inputs "5"
DisplayOption "bar"
}
Block {
BlockType "S-Function"
Name "S-Function"
SID "10"
Ports [1, 1]
Position [375, 81, 445, 159]
BackgroundColor "magenta"
FunctionName "FAST_SFunc"
EnableBusSupport off
}
Block {
BlockType SignalSpecification
Name "Signal Specification1"
SID "11"
Position [200, 30, 300, 50]
OutDataTypeStr "double"
Dimensions "2"
SignalType "real"
}
Block {
BlockType SignalSpecification
Name "Signal Specification2"
SID "12"
Position [200, 68, 300, 92]
OutDataTypeStr "double"
Dimensions "2"
SignalType "real"
}
Block {
BlockType Outport
Name "OutData"
SID "13"
Position [520, 122, 550, 138]
BackgroundColor "yellow"
IconDisplay "Port number"
}
Line {
Name "qdot"
SrcBlock "Integrator"
SrcPort 1
Points [20, 0]
Branch {
Labels [-1, 1]
DstBlock "Integrator1"
DstPort 1
}
Branch {
Points [0, 130; -310, 0; 0, -40]
DstBlock "Mux1"
DstPort 5
}
}
Line {
SrcBlock "Gen. Torque (Nm) and Power (W)"
SrcPort 1
DstBlock "Signal Specification1"
DstPort 1
}
Line {
SrcBlock "S-Function"
SrcPort 1
DstBlock "Demux"
DstPort 1
}
Line {
Labels [0, 0]
SrcBlock "Demux"
SrcPort 1
DstBlock "Integrator"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 2
DstBlock "OutData"
DstPort 1
}
Line {
SrcBlock "Mux1"
SrcPort 1
DstBlock "S-Function"
DstPort 1
}
Line {
SrcBlock "Blade Pitch Angles (rad)"
SrcPort 1
DstBlock "Mux1"
DstPort 3
}
Line {
SrcBlock "Yaw Position (rad) and Rate (rad/s)"
SrcPort 1
DstBlock "Signal Specification2"
DstPort 1
}
Line {
Name "q"
Labels [0, 1]
SrcBlock "Integrator1"
SrcPort 1
Points [15, 0; 0, 160; -415, 0; 0, -110]
DstBlock "Mux1"
DstPort 4
}
Line {
SrcBlock "Signal Specification1"
SrcPort 1
DstBlock "Mux1"
DstPort 1
}
Line {
SrcBlock "Signal Specification2"
SrcPort 1
DstBlock "Mux1"
DstPort 2
}
Annotation {
Name "qdotdot"
Position [508, 101]
}
Annotation {
Name "q"
Position [459, 251]
}
}
}
Block {
BlockType SubSystem
Name "Pitch Controller"
SID "14"
Ports [0, 1]
Position [30, 239, 130, 281]
MinAlgLoopOccurrences off
PropExecContextOutsideSubsystem off
RTWSystemCode "Auto"
FunctionWithSeparateData off
Opaque off
RequestExecContextInheritance off
MaskHideContents off
System {
Name "Pitch Controller"
Location [433, 403, 916, 538]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Constant
Name "Blade Pitch Angles"
SID "15"
Position [55, 35, 85, 65]
Value "zeros(1,NumBl)'"
}
Block {
BlockType Outport
Name "Out1"
SID "16"
Position [140, 43, 170, 57]
IconDisplay "Port number"
}
Line {
SrcBlock "Blade Pitch Angles"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
}
}
Block {
BlockType ToWorkspace
Name "To Workspace"
SID "17"
Ports [1]
Position [70, 20, 130, 50]
VariableName "Time"
MaxDataPoints "inf"
SampleTime "-1"
SaveFormat "Array"
}
Block {
BlockType SubSystem
Name "Torque Controller"
SID "18"
Ports [0, 1]
Position [30, 109, 130, 151]
MinAlgLoopOccurrences off
PropExecContextOutsideSubsystem off
RTWSystemCode "Auto"
FunctionWithSeparateData off
Opaque off
RequestExecContextInheritance off
MaskHideContents off
System {
Name "Torque Controller"
Location [433, 403, 919, 560]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Constant
Name "Electrical Power"
SID "19"
Position [55, 85, 85, 115]
Value "0"
}
Block {
BlockType Constant
Name "Generator Torque"
SID "20"
Position [55, 30, 85, 60]
Value "GenMoment"
}
Block {
BlockType Mux
Name "Mux"
SID "21"
Ports [2, 1]
Position [200, 51, 205, 89]
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType Outport
Name "Out1"
SID "22"
Position [255, 63, 285, 77]
IconDisplay "Port number"
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "Generator Torque"
SrcPort 1
Points [45, 0; 0, 15]
DstBlock "Mux"
DstPort 1
}
Line {
SrcBlock "Electrical Power"
SrcPort 1
Points [45, 0; 0, -20]
DstBlock "Mux"
DstPort 2
}
}
}
Block {
BlockType SubSystem
Name "Yaw Controller"
SID "23"
Ports [0, 1]
Position [30, 174, 130, 216]
MinAlgLoopOccurrences off
PropExecContextOutsideSubsystem off
RTWSystemCode "Auto"
FunctionWithSeparateData off
Opaque off
RequestExecContextInheritance off
MaskHideContents off
System {
Name "Yaw Controller"
Location [433, 403, 907, 565]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Mux
Name "Mux"
SID "24"
Ports [2, 1]
Position [190, 56, 195, 94]
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType Constant
Name "Yaw Position"
SID "25"
Position [45, 30, 75, 60]
Value "0"
}
Block {
BlockType Constant
Name "Yaw rate"
SID "26"
Position [45, 90, 75, 120]
Value "0"
}
Block {
BlockType Outport
Name "Out1"
SID "27"
Position [245, 68, 275, 82]
IconDisplay "Port number"
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "Yaw Position"
SrcPort 1
Points [45, 0; 0, 20]
DstBlock "Mux"
DstPort 1
}
Line {
SrcBlock "Yaw rate"
SrcPort 1
Points [45, 0; 0, -20]
DstBlock "Mux"
DstPort 2
}
}
}
Block {
BlockType ToWorkspace
Name "qdotdot_out"
SID "28"
Ports [1]
Position [485, 183, 555, 207]
BackgroundColor "yellow"
ShowName off
VariableName "OutData"
MaxDataPoints "inf"
SampleTime "-1"
SaveFormat "Array"
}
Line {
SrcBlock "Clock"
SrcPort 1
DstBlock "To Workspace"
DstPort 1
}
Line {
SrcBlock "FAST Nonlinear Wind Turbine"
SrcPort 1
DstBlock "qdotdot_out"
DstPort 1
}
Line {
SrcBlock "Torque Controller"
SrcPort 1
DstBlock "FAST Nonlinear Wind Turbine"
DstPort 1
}
Line {
SrcBlock "Yaw Controller"
SrcPort 1
DstBlock "FAST Nonlinear Wind Turbine"
DstPort 2
}
Line {
SrcBlock "Pitch Controller"
SrcPort 1
DstBlock "FAST Nonlinear Wind Turbine"
DstPort 3
}
}
}
Unfortunately I can’t upload my openloop.mdl. I did change the File-Names in Simsetp.m so they fit my simulation bot noting else. I also did not change anything in the OpenLopp.mdl. I try to get a “cleaner” Version of FAST but while I have no other I try to figure out where the problem is.
The code runs for approximately 30 seconds and the errors above are visible in the Command Window.
I assumed the OpenLoop.mdl is equivalent to “No Control”, since I don’t want a Control in my simulation.
Thank you for your help.
Julian