Model { Name "adaptive_controller" Version 7.7 MdlSubVersion 0 GraphicalInterface { NumRootInports 0 NumRootOutports 0 ParameterArgumentNames "" ComputedModelVersion "1.224" 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 "Wed Jun 09 15:26:50 2010" Creator "throne" UpdateHistory "UpdateHistoryNever" ModifiedByFormat "%" LastModifiedBy "throne" ModifiedDateFormat "%" LastModifiedDate "Wed Oct 24 12:00:25 2012" RTWModifiedTimeStamp 272980242 ModelVersionFormat "1.%" 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.11.0" Array { Type "Handle" Dimension 8 Simulink.SolverCC { $ObjectID 2 Version "1.11.0" StartTime "0.0" StopTime "Tf" AbsTol "auto" FixedStep "Ts" InitialStep "auto" MaxNumMinSteps "-1" MaxOrder 5 ZcThreshold "auto" ConsecutiveZCsStepRelTol "10*128*eps" MaxConsecutiveZCs "1000" ExtrapolationOrder 4 NumberNewtonIterations 1 MaxStep "auto" MinStep "auto" MaxConsecutiveMinStep "1" RelTol "1e-3" SolverMode "Auto" ConcurrentTasks off Solver "FixedStepDiscrete" SolverName "FixedStepDiscrete" 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.11.0" Decimation "1" ExternalInput "[t, u]" FinalStateName "xFinal" InitialState "xInitial" LimitDataPoints on MaxDataPoints "1000" LoadExternalInput off LoadInitialState off SaveFinalState off SaveCompleteFinalSimState off SaveFormat "Array" SignalLoggingSaveFormat "ModelDataLogs" SaveOutput on SaveState off SignalLogging on DSMLogging on InspectSignalLogs off SaveTime on ReturnWorkspaceOutputs off StateSaveName "xout" TimeSaveName "tout" OutputSaveName "yout" SignalLoggingName "logsout" DSMLoggingName "dsmout" OutputOption "RefineOutputTimes" OutputTimes "[]" ReturnWorkspaceOutputsName "out" Refine "1" } Simulink.OptimizationCC { $ObjectID 4 Version "1.11.0" Array { Type "Cell" Dimension 7 Cell "ZeroExternalMemoryAtStartup" Cell "ZeroInternalMemoryAtStartup" Cell "NoFixptDivByZeroProtection" Cell "OptimizeModelRefInitCode" Cell "BooleansAsBitfields" Cell "PassReuseOutputArgsAs" Cell "PassReuseOutputArgsThreshold" 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 on NoFixptDivByZeroProtection off EfficientFloat2IntCast off EfficientMapNaN2IntZero on OptimizeModelRefInitCode off LifeSpan "inf" MaxStackSize "Inherit from target" BufferReusableBoundary on SimCompilerOptimization "Off" AccelVerboseBuild off AccelParallelForEachSubsystem on } Simulink.DebuggingCC { $ObjectID 5 Version "1.11.0" RTPrefix "error" ConsistencyChecking "none" ArrayBoundsChecking "none" SignalInfNanChecking "none" SignalRangeChecking "none" ReadBeforeWriteMsg "UseLocalSettings" WriteAfterWriteMsg "UseLocalSettings" WriteAfterReadMsg "UseLocalSettings" AlgebraicLoopMsg "warning" ArtificialAlgebraicLoopMsg "warning" SaveWithDisabledLinksMsg "warning" SaveWithParameterizedLinksMsg "warning" CheckSSInitialOutputMsg on UnderspecifiedInitializationDetection "Classic" MergeDetectMultiDrivingBlocksExec "none" CheckExecutionContextPreStartOutputMsg off CheckExecutionContextRuntimeOutputMsg off SignalResolutionControl "UseLocalSettings" BlockPriorityViolationMsg "warning" MinStepSizeMsg "warning" TimeAdjustmentMsg "none" MaxConsecutiveZCsMsg "error" MaskedZcDiagnostic "warning" IgnoredZcDiagnostic "warning" SolverPrmCheckMsg "warning" InheritedTsInSrcMsg "warning" DiscreteInheritContinuousMsg "warning" MultiTaskDSMMsg "error" MultiTaskCondExecSysMsg "error" 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" SimStateOlderReleaseMsg "error" InitInArrayFormatMsg "warning" StrictBusMsg "Warning" BusNameAdapt "WarnAndRepair" NonBusSignalsTreatedAsBus "none" LoggingUnavailableSignals "error" BlockIODiagnostic "none" SFUnusedDataAndEventsDiag "warning" SFUnexpectedBacktrackingDiag "warning" SFInvalidInputDataAccessInChartInitDiag "warning" SFNoUnconditionalDefaultTransitionDiag "warning" SFTransitionOutsideNaturalParentDiag "warning" } Simulink.HardwareCC { $ObjectID 6 Version "1.11.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 off ProdEqTarget on } Simulink.ModelReferenceCC { $ObjectID 7 Version "1.11.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.11.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.11.0" Array { Type "Cell" Dimension 6 Cell "IncludeHyperlinkInReport" Cell "GenerateTraceInfo" Cell "GenerateTraceReport" Cell "GenerateTraceReportSl" Cell "GenerateTraceReportSf" Cell "GenerateTraceReportEml" 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 off GenerateTraceInfo off GenerateTraceReport off GenerateTraceReportSl off GenerateTraceReportSf off GenerateTraceReportEml off GenerateCodeInfo off GenerateSLWebview off GenerateCodeMetricsReport off RTWCompilerOptimization "Off" CheckMdlBeforeBuild "Off" CustomRebuildMode "OnUpdate" Array { Type "Handle" Dimension 2 Simulink.CodeAppCC { $ObjectID 10 Version "1.11.0" Array { Type "Cell" Dimension 19 Cell "IgnoreCustomStorageClasses" Cell "InsertBlockDesc" Cell "SFDataObjDesc" Cell "SimulinkDataObjDesc" Cell "DefineNamingRule" Cell "SignalNamingRule" Cell "ParamNamingRule" Cell "InlinedPrmAccess" Cell "CustomSymbolStr" Cell "CustomSymbolStrGlobalVar" Cell "CustomSymbolStrType" Cell "CustomSymbolStrField" Cell "CustomSymbolStrFcn" Cell "CustomSymbolStrBlkIO" Cell "CustomSymbolStrTmpVar" Cell "CustomSymbolStrMacro" Cell "IgnoreTestpoints" Cell "CustomSymbolStrFcnArg" 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.11.0" Array { Type "Cell" Dimension 16 Cell "IncludeMdlTerminateFcn" Cell "CombineOutputUpdateFcns" Cell "SuppressErrorStatus" Cell "ERTCustomFileBanners" Cell "GenerateSampleERTMain" Cell "GenerateTestInterfaces" Cell "ModelStepFunctionPrototypeControlCompliant" Cell "CPPClassGenCompliant" Cell "MultiInstanceERTCode" Cell "PurelyIntegerCode" Cell "GeneratePreprocessorConditionals" 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" FunctionExecutionProfile off CodeExecutionProfiling off 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 RTWCAPIRootIO off GenerateASAP2 off } PropName "Components" } } PropName "Components" } Name "Configuration" ExtraOptions "-aGenerateTraceInfo=0 -aIgnoreTestpoints=0 " 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 Demux Outputs "4" DisplayOption "none" BusSelectionMode off } Block { BlockType FromWorkspace VariableName "simulink_input" SampleTime "-1" Interpolate on ZeroCross off OutputAfterFinalValue "Extrapolation" } Block { BlockType Gain Gain "1" Multiplication "Element-wise(K.*u)" ParamMin "[]" ParamMax "[]" ParamDataTypeStr "Inherit: Same as input" OutMin "[]" OutMax "[]" OutDataTypeStr "Inherit: Same as input" LockScale off RndMeth "Floor" SaturateOnIntegerOverflow on SampleTime "-1" } Block { BlockType Inport Port "1" OutputFunctionCall off 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 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 Saturate UpperLimitSource "Dialog" UpperLimit "0.5" LowerLimitSource "Dialog" LowerLimit "-0.5" LinearizeAsGain on ZeroCross on SampleTime "-1" OutMin "[]" OutMax "[]" OutDataTypeStr "Inherit: Same as input" LockScale off RndMeth "Floor" } 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 Sum IconShape "rectangular" Inputs "++" CollapseMode "All dimensions" CollapseDim "1" InputSameDT on AccumDataTypeStr "Inherit: Inherit via internal rule" OutMin "[]" OutMax "[]" OutDataTypeStr "Inherit: Same as first input" LockScale off RndMeth "Floor" SaturateOnIntegerOverflow on SampleTime "-1" } Block { BlockType Terminator } Block { BlockType ToWorkspace VariableName "simulink_output" MaxDataPoints "1000" Decimation "1" SampleTime "0" FixptAsFi off NumInputs "1" } } System { Name "adaptive_controller" Location [251, 341, 1459, 751] 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 "15" Block { BlockType SubSystem Name "Adaptive Controller" SID "1" Ports [2, 1] Position [400, 121, 525, 234] ForegroundColor "blue" ErrorFcn "Stateflow.Translate.translate" PermitHierarchicalResolution "ExplicitOnly" TreatAsAtomicUnit on MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off MaskType "Stateflow" MaskDescription "Embedded MATLAB block" MaskSelfModifiable on MaskDisplay "bgColor = Simulink.Root.ColorString2Rgb(get_param(gcbh, 'BackgroundColor')); image(imread('pr" "ivate/eml_membrane_16.png','png','BackgroundColor',bgColor(1:3)),'center'); disp([10 10 'fcn']);" MaskIconFrame on MaskIconOpaque off MaskIconRotate "none" MaskPortRotate "default" MaskIconUnits "normalized" System { Name "Adaptive Controller" Location [257, 457, 812, 717] 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" SIDHighWatermark "10" Block { BlockType Inport Name "u_in" SID "1::1" Position [20, 101, 40, 119] IconDisplay "Port number" } Block { BlockType Inport Name "e_in" SID "1::2" Position [20, 136, 40, 154] Port "2" IconDisplay "Port number" } Block { BlockType Demux Name " Demux " SID "1::8" Ports [1, 1] Position [270, 160, 320, 200] Outputs "1" } Block { BlockType S-Function Name " SFunction " SID "1::7" Tag "Stateflow S-Function adaptive_controller 1" Ports [2, 2] Position [180, 100, 230, 160] FunctionName "sf_sfun" Parameters "D,Nbc,Nbp,Ts" PortCounts "[2 2]" EnableBusSupport on Port { PortNumber 2 Name "u_out" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Terminator Name " Terminator " SID "1::10" Position [460, 171, 480, 189] } Block { BlockType Outport Name "u_out" SID "1::6" Position [460, 101, 480, 119] IconDisplay "Port number" } Line { SrcBlock "u_in" SrcPort 1 DstBlock " SFunction " DstPort 1 } Line { SrcBlock "e_in" SrcPort 1 DstBlock " SFunction " DstPort 2 } Line { Name "u_out" Labels [0, 0] SrcBlock " SFunction " SrcPort 2 DstBlock "u_out" DstPort 1 } Line { SrcBlock " Demux " SrcPort 1 DstBlock " Terminator " DstPort 1 } Line { SrcBlock " SFunction " SrcPort 1 DstBlock " Demux " DstPort 1 } } } Block { BlockType Clock Name "Clock" SID "2" Position [150, 75, 170, 95] Decimation "1" } Block { BlockType FromWorkspace Name "From\nWorkspace" SID "3" Position [100, 193, 165, 217] VariableName "rt" SampleTime "0" ZeroCross on } Block { BlockType Gain Name "Gain" SID "4" Position [210, 190, 240, 220] Gain "Gpf" ParamDataTypeStr "Inherit: Inherit via internal rule" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Saturate Name "Saturation" SID "5" Ports [1, 1] Position [705, 165, 735, 195] InputPortMap "u0" UpperLimit "saturation_level" LowerLimit "-saturation_level" } Block { BlockType Sum Name "Sum" SID "6" Ports [2, 1] Position [285, 195, 305, 215] ShowName off IconShape "round" Inputs "|+-" InputSameDT off OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Reference Name "Tapped Delay1" SID "7" Ports [1, 1] Position [340, 187, 375, 223] LibraryVersion "1.236" SourceBlock "simulink/Discrete/Tapped Delay" SourceType "Tapped Delay Line" vinit "0.0" samptime "-1" NumDelays "Nbc-1" DelayOrder "Newest" includeCurrent on } Block { BlockType Reference Name "Tapped Delay2" SID "8" Ports [1, 1] Position [455, 42, 490, 78] BlockMirror on LibraryVersion "1.236" SourceBlock "simulink/Discrete/Tapped Delay" SourceType "Tapped Delay Line" vinit "0.0" samptime "-1" NumDelays "Nbc-1" DelayOrder "Newest" includeCurrent off } Block { BlockType Reference Name "Tapped Delay3" SID "9" Ports [1, 1] Position [875, 32, 910, 68] BlockMirror on LibraryVersion "1.236" SourceBlock "simulink/Discrete/Tapped Delay" SourceType "Tapped Delay Line" vinit "0.0" samptime "-1" NumDelays "Nbp-1" DelayOrder "Newest" includeCurrent off } Block { BlockType Reference Name "Tapped Delay4" SID "10" Ports [1, 1] Position [605, 162, 640, 198] LibraryVersion "1.236" SourceBlock "simulink/Discrete/Tapped Delay" SourceType "Tapped Delay Line" vinit "0.0" samptime "-1" NumDelays "Nbp-1" DelayOrder "Newest" includeCurrent on } Block { BlockType Reference Name "Tapped Delay5" SID "11" Ports [1, 1] Position [660, 312, 695, 348] BlockMirror on LibraryVersion "1.236" SourceBlock "simulink/Discrete/Tapped Delay" SourceType "Tapped Delay Line" vinit "0.0" samptime "-1" NumDelays "1" DelayOrder "Newest" includeCurrent off } Block { BlockType ToWorkspace Name "To Workspace" SID "12" Ports [1] Position [1065, 140, 1125, 170] VariableName "ys" MaxDataPoints "inf" SampleTime "-1" SaveFormat "Array" } Block { BlockType ToWorkspace Name "To Workspace1" SID "13" Ports [1] Position [245, 70, 305, 100] VariableName "ts" MaxDataPoints "inf" SampleTime "Ts" SaveFormat "Array" } Block { BlockType ToWorkspace Name "To Workspace2" SID "14" Ports [1] Position [820, 255, 880, 285] VariableName "us" MaxDataPoints "inf" SampleTime "-1" SaveFormat "Array" } Block { BlockType SubSystem Name "Varying Plant" SID "15" Ports [2, 1] Position [830, 107, 955, 203] ForegroundColor "blue" ErrorFcn "Stateflow.Translate.translate" PermitHierarchicalResolution "ExplicitOnly" TreatAsAtomicUnit on MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off MaskType "Stateflow" MaskDescription "Embedded MATLAB block" MaskSelfModifiable on MaskDisplay "bgColor = Simulink.Root.ColorString2Rgb(get_param(gcbh, 'BackgroundColor')); image(imread('pr" "ivate/eml_membrane_16.png','png','BackgroundColor',bgColor(1:3)),'center'); disp([10 10 'fcn']);" MaskIconFrame on MaskIconOpaque off MaskIconRotate "none" MaskPortRotate "default" MaskIconUnits "normalized" System { Name "Varying Plant" Location [257, 457, 812, 717] 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" SIDHighWatermark "10" Block { BlockType Inport Name "y_in" SID "15::1" Position [20, 101, 40, 119] IconDisplay "Port number" } Block { BlockType Inport Name "u_in" SID "15::2" Position [20, 136, 40, 154] Port "2" IconDisplay "Port number" } Block { BlockType Demux Name " Demux " SID "15::8" Ports [1, 1] Position [270, 160, 320, 200] Outputs "1" } Block { BlockType S-Function Name " SFunction " SID "15::7" Tag "Stateflow S-Function adaptive_controller 2" Ports [2, 2] Position [180, 100, 230, 160] FunctionName "sf_sfun" Parameters "Nbp,Ts" PortCounts "[2 2]" EnableBusSupport on Port { PortNumber 2 Name "y_out" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Terminator Name " Terminator " SID "15::10" Position [460, 171, 480, 189] } Block { BlockType Outport Name "y_out" SID "15::6" Position [460, 101, 480, 119] IconDisplay "Port number" } Line { SrcBlock "y_in" SrcPort 1 DstBlock " SFunction " DstPort 1 } Line { SrcBlock "u_in" SrcPort 1 DstBlock " SFunction " DstPort 2 } Line { Name "y_out" Labels [0, 0] SrcBlock " SFunction " SrcPort 2 DstBlock "y_out" DstPort 1 } Line { SrcBlock " Demux " SrcPort 1 DstBlock " Terminator " DstPort 1 } Line { SrcBlock " SFunction " SrcPort 1 DstBlock " Demux " DstPort 1 } } } Line { SrcBlock "Clock" SrcPort 1 DstBlock "To Workspace1" DstPort 1 } Line { SrcBlock "Tapped Delay3" SrcPort 1 Points [-65, 0; 0, 80] DstBlock "Varying Plant" DstPort 1 } Line { SrcBlock "Tapped Delay2" SrcPort 1 Points [-75, 0; 0, 90] DstBlock "Adaptive Controller" DstPort 1 } Line { SrcBlock "Tapped Delay1" SrcPort 1 DstBlock "Adaptive Controller" DstPort 2 } Line { SrcBlock "Sum" SrcPort 1 DstBlock "Tapped Delay1" DstPort 1 } Line { SrcBlock "Tapped Delay5" SrcPort 1 Points [-360, 0] DstBlock "Sum" DstPort 2 } Line { SrcBlock "Gain" SrcPort 1 DstBlock "Sum" DstPort 1 } Line { SrcBlock "From\nWorkspace" SrcPort 1 DstBlock "Gain" DstPort 1 } Line { SrcBlock "Adaptive Controller" SrcPort 1 Points [25, 0] Branch { DstBlock "Tapped Delay4" DstPort 1 } Branch { Points [0, -120] DstBlock "Tapped Delay2" DstPort 1 } } Line { SrcBlock "Saturation" SrcPort 1 Points [30, 0] Branch { DstBlock "Varying Plant" DstPort 2 } Branch { Points [0, 90] DstBlock "To Workspace2" DstPort 1 } } Line { SrcBlock "Tapped Delay4" SrcPort 1 DstBlock "Saturation" DstPort 1 } Line { SrcBlock "Varying Plant" SrcPort 1 Points [35, 0] Branch { DstBlock "To Workspace" DstPort 1 } Branch { Points [0, -105] DstBlock "Tapped Delay3" DstPort 1 } Branch { Points [0, 175] DstBlock "Tapped Delay5" DstPort 1 } } } } # Finite State Machines # # Stateflow Version 7.5 (R2010a) dated Mar 5 2011, 00:01:50 # # Stateflow { machine { id 1 name "adaptive_controller" created "09-Jun-2010 15:54:16" isLibrary 0 firstTarget 24 sfVersion 75014001 } chart { id 2 name "Adaptive Controller" windowPosition [399.879 291.305 200.25 189.75] viewLimits [0 156.75 0 153.75] screen [1 1 1680 1050 1.333333333333333] treeNode [0 3 0 0] firstTransition 5 firstJunction 4 viewObj 2 machine 1 toolbarMode LIBRARY_TOOLBAR ssIdHighWaterMark 33 decomposition CLUSTER_CHART type EML_CHART firstData 6 chartFileNumber 1 disableImplicitCasting 1 eml { name "fcn" } supportVariableSizing 0 } state { id 3 labelString "eML_blk_kernel()" position [18 64.5 118 66] fontSize 12 chart 2 treeNode [2 0 0 0] superState SUBCHART subviewer 2 ssIdNumber 1 type FUNC_STATE decomposition CLUSTER_STATE eml { isEML 1 script "function u_out = fcn(u_in, e_in, Nbc, D, Nbp, Ts)\n% This block supports the Embedded MATLAB sub" "set.\n% See the help menu for details.\n%\npersistent initial_flag; % is this the first time through the algor" "ithm\npersistent n; % number of times this routine has been called\npersistent Tlast;\n%\n if isem" "pty(initial_flag)\n initial_flag = 1;\n n=1;\n Tlast = eye(4,4);\n else\n n=n+1;\n end;\n%\n% get" " the current time\n%\n tc = n*Ts; \n%\n% initialize the matrices and vectors\n%\n Bp= zeros(1,2);\n Ap = zer" "os(1,2);\n Bc = zeros(1,3);\n Ac = zeros(1,3);\n T = zeros(4,4);\n Y = zeros(4,1);\n X = zeros(4,1);\n%\n% " " start off with the known plant values, comment these out when using the \n% least squares estimates\n%\n Bp " "= [0.5 0.8+0.5*cos(2*pi*tc)];\n Ap = [1 0.1+0.5*cos(1*pi*tc)];\n% \n% uncomment these to use the estimated " "plant values\n%\n% Ap(1) = -theta_in(1);\n% Bp(1) = theta_in(2); Bp(2) = theta_in(3);\n%\n% solve the for t" "he controller\n% \n T = zeros(4,4);\n Y = zeros(4,1);\n T(1,1) = -1; T(1,2) = Bp(1);\n T(2,1) = 1-Ap(2); T(2" ",2)=Bp(2); T(2,3) = Bp(1);\n T(3,1) = Ap(2); T(3,3) = Bp(2); T(3,4) = Bp(1);\n T(4,4) = Bp(2); \n Y(1) = D(2)" "-Ap(2)+1;\n Y(2) = D(3)+Ap(2);\n Y(3) = D(4);\n Y(4) = D(5);\n%\n% check to see if T has nan, if yes, use th" "e last T\n%\n if(sum(sum(isnan(T))) > 0 )\n T = Tlast;\n else\n Tlast = T;\n end; \n%\n% solve th" "e matrix equations\n%\n X = pinv(T,0.0001)*Y;\n%\n% get the controller coefficients\n%\n alpha = X(1);\n Bc(" "1) = X(2);\n Bc(2) = X(3);\n Bc(3) = X(4);\n Ac(1) = 1;\n Ac(2) = -1-alpha;\n Ac(3) = alpha;\n%\n% now com" "pute the control effort\n%\n u_out = Bc(1)*e_in(1);\n for k = 2:Nbc\n u_out = u_out-Ac(k)*u_in(k-1)+Bc(k)*e" "_in(k);\n end;\n% u_out = 0.333*(u_out+u_in(1)+u_in(2));\n% u_out = 0.5*(u_out+u_in(1));\n%\n% we need to use" " a simple P controller to get the system started\n%\n if (n < 4) u_out = 0.1*e_in(1); end;" editorLayout "100 M4x1[600 249 945 631]" fimathString "fimath(...\n'RoundMode', 'floor',...\n'OverflowMode', 'wrap',...\n'ProductMode', 'KeepLSB', " "'ProductWordLength', 32,...\n'SumMode', 'KeepLSB', 'SumWordLength', 32,...\n'CastBeforeSum', true)" fimathForFiConstructors FimathMatlabFactoryDefault emlDefaultFimath FimathUserSpecified } } junction { id 4 position [23.5747 49.5747 7] chart 2 linkNode [2 0 0] subviewer 2 ssIdNumber 3 type CONNECTIVE_JUNCTION } transition { id 5 labelString "{eML_blk_kernel();}" labelPosition [32.125 19.875 102.544 14.964] fontSize 12 src { intersection [0 0 1 0 23.5747 14.625 0 0] } dst { id 4 intersection [7 0 -1 -1 23.5747 42.5747 0 0] } midPoint [23.5747 24.9468] chart 2 linkNode [2 0 0] dataLimits [23.575 23.575 14.625 34.575] subviewer 2 drawStyle SMART executionOrder 1 ssIdNumber 2 } data { id 6 ssIdNumber 4 name "u_in" linkNode [2 0 7] scope INPUT_DATA machine 1 props { array { size "[Nbc-1 1]" } type { method SF_INHERITED_TYPE primitive SF_DOUBLE_TYPE } complexity SF_COMPLEX_INHERITED } dataType "Inherit: Same as Simulink" } data { id 7 ssIdNumber 17 name "e_in" linkNode [2 6 8] scope INPUT_DATA machine 1 props { array { size "[Nbc 1]" } type { method SF_INHERITED_TYPE primitive SF_DOUBLE_TYPE isSigned 1 wordLength "16" } complexity SF_COMPLEX_INHERITED frame SF_FRAME_INHERITED } dataType "Inherit: Same as Simulink" } data { id 8 ssIdNumber 10 name "u_out" linkNode [2 7 9] scope OUTPUT_DATA machine 1 props { array { size "-1" } type { method SF_INHERITED_TYPE primitive SF_DOUBLE_TYPE isSigned 1 wordLength "16" } complexity SF_COMPLEX_INHERITED frame SF_FRAME_NO } dataType "Inherit: Same as Simulink" } data { id 9 ssIdNumber 22 name "Nbc" linkNode [2 8 10] scope PARAMETER_DATA initFromWorkspace 1 paramIndexForInitFromWorkspace 1 machine 1 props { array { size "-1" } type { method SF_INHERITED_TYPE primitive SF_DOUBLE_TYPE isSigned 1 wordLength "16" } complexity SF_COMPLEX_INHERITED frame SF_FRAME_INHERITED } dataType "Inherit: Same as Simulink" } data { id 10 ssIdNumber 30 name "D" linkNode [2 9 11] scope PARAMETER_DATA initFromWorkspace 1 machine 1 props { array { size "[1 2*Nbp+1]" } type { method SF_INHERITED_TYPE primitive SF_DOUBLE_TYPE isSigned 1 wordLength "16" } complexity SF_COMPLEX_INHERITED frame SF_FRAME_INHERITED } dataType "Inherit: Same as Simulink" } data { id 11 ssIdNumber 32 name "Nbp" linkNode [2 10 12] scope PARAMETER_DATA paramIndexForInitFromWorkspace 2 machine 1 props { array { size "-1" } type { method SF_INHERITED_TYPE primitive SF_DOUBLE_TYPE isSigned 1 wordLength "16" } complexity SF_COMPLEX_INHERITED frame SF_FRAME_INHERITED } dataType "Inherit: Same as Simulink" } data { id 12 ssIdNumber 33 name "Ts" linkNode [2 11 0] scope PARAMETER_DATA paramIndexForInitFromWorkspace 3 machine 1 props { array { size "-1" } type { method SF_INHERITED_TYPE primitive SF_DOUBLE_TYPE isSigned 1 wordLength "16" } complexity SF_COMPLEX_INHERITED frame SF_FRAME_INHERITED } dataType "Inherit: Same as Simulink" } instance { id 13 name "Adaptive Controller" machine 1 chart 2 } chart { id 14 name "Varying Plant" windowPosition [369.879 321.305 200.25 189.75] viewLimits [0 156.75 0 153.75] screen [1 1 1680 1050 1.333333333333333] treeNode [0 15 0 0] firstTransition 17 firstJunction 16 viewObj 14 machine 1 toolbarMode LIBRARY_TOOLBAR ssIdHighWaterMark 20 decomposition CLUSTER_CHART type EML_CHART firstData 18 chartFileNumber 2 disableImplicitCasting 1 eml { name "fcn" } supportVariableSizing 0 } state { id 15 labelString "eML_blk_kernel()" position [18 64.5 118 66] fontSize 12 chart 14 treeNode [14 0 0 0] superState SUBCHART subviewer 14 ssIdNumber 1 type FUNC_STATE decomposition CLUSTER_STATE eml { isEML 1 script "function y_out = fcn(y_in, u_in, Ts, Nbp)\n% This block supports the Embedded MATLAB subset.\n% " "See the help menu for details. \n%\npersistent initial_flag; % is this the first time through the algorithm\np" "ersistent n; % number of times this routine has been called\npersistent Tlast;\n%\n% initialize th" "e arrays\n%\n Bp = zeros(1,2);\n Ap = zeros(1,2);\n%\n if isempty(initial_flag)\n initial_flag = 1;\n n" "=1;\n else\n n=n+1;\n end;\n%\n% get the current time\n%\n tc = n*Ts;\n%\n% get the coefficients for the" " plants\n%\n Bp = [0.5 0.8+0.5*cos(2*pi*tc)];\n Ap = [1 0.1+0.5*cos(1*pi*tc)];\n%\n y_out = Bp(1)*u_in(1);\n" " for k = 2:Nbp\n y_out = y_out-Ap(k)*y_in(k-1)+Bp(k)*u_in(k);\n end;\n\n" editorLayout "100 M4x1[600 249 945 631]" fimathString "fimath(...\n'RoundMode', 'floor',...\n'OverflowMode', 'wrap',...\n'ProductMode', 'KeepLSB', " "'ProductWordLength', 32,...\n'SumMode', 'KeepLSB', 'SumWordLength', 32,...\n'CastBeforeSum', true)" fimathForFiConstructors FimathMatlabFactoryDefault emlDefaultFimath FimathUserSpecified } } junction { id 16 position [23.5747 49.5747 7] chart 14 linkNode [14 0 0] subviewer 14 ssIdNumber 3 type CONNECTIVE_JUNCTION } transition { id 17 labelString "{eML_blk_kernel();}" labelPosition [32.125 19.875 102.544 14.964] fontSize 12 src { intersection [0 0 1 0 23.5747 14.625 0 0] } dst { id 16 intersection [7 0 -1 -1 23.5747 42.5747 0 0] } midPoint [23.5747 24.9468] chart 14 linkNode [14 0 0] dataLimits [23.575 23.575 14.625 34.575] subviewer 14 drawStyle SMART executionOrder 1 ssIdNumber 2 } data { id 18 ssIdNumber 4 name "y_in" linkNode [14 0 19] scope INPUT_DATA machine 1 props { array { size "[Nbp-1 1]" } type { method SF_INHERITED_TYPE primitive SF_DOUBLE_TYPE } complexity SF_COMPLEX_INHERITED } dataType "Inherit: Same as Simulink" } data { id 19 ssIdNumber 17 name "u_in" linkNode [14 18 20] scope INPUT_DATA machine 1 props { array { size "[Nbp 1]" } type { method SF_INHERITED_TYPE primitive SF_DOUBLE_TYPE isSigned 1 wordLength "16" } complexity SF_COMPLEX_INHERITED frame SF_FRAME_INHERITED } dataType "Inherit: Same as Simulink" } data { id 20 ssIdNumber 10 name "y_out" linkNode [14 19 21] scope OUTPUT_DATA machine 1 props { array { size "-1" } type { method SF_INHERITED_TYPE primitive SF_DOUBLE_TYPE isSigned 1 wordLength "16" } complexity SF_COMPLEX_INHERITED frame SF_FRAME_NO } dataType "Inherit: Same as Simulink" } data { id 21 ssIdNumber 15 name "Ts" linkNode [14 20 22] scope PARAMETER_DATA initFromWorkspace 1 paramIndexForInitFromWorkspace 1 machine 1 props { array { size "-1" } type { method SF_INHERITED_TYPE primitive SF_DOUBLE_TYPE isSigned 1 wordLength "16" } complexity SF_COMPLEX_INHERITED frame SF_FRAME_INHERITED } dataType "Inherit: Same as Simulink" } data { id 22 ssIdNumber 19 name "Nbp" linkNode [14 21 0] scope PARAMETER_DATA initFromWorkspace 1 machine 1 props { array { size "-1" } type { method SF_INHERITED_TYPE primitive SF_DOUBLE_TYPE isSigned 1 wordLength "16" } complexity SF_COMPLEX_INHERITED frame SF_FRAME_INHERITED } dataType "Inherit: Same as Simulink" } instance { id 23 name "Varying Plant" machine 1 chart 14 } target { id 24 name "sfun" codeFlags "" machine 1 linkNode [1 0 0] } }