Model { Name "amenl" Version 3.00 SimParamPage "Solver" SampleTimeColors off InvariantConstants off WideVectorLines off ShowLineWidths off ShowPortDataTypes off StartTime "0.0" StopTime "100" SolverMode "SingleTasking" Solver "ode45" RelTol "1e-4" AbsTol "1e-4" Refine "1" MaxStep "0.10" InitialStep "auto" FixedStep "auto" MaxOrder 5 OutputOption "RefineOutputTimes" OutputTimes "[]" LoadExternalInput off ExternalInput "[t, u]" SaveTime on TimeSaveName "t" SaveState off StateSaveName "xout" SaveOutput off OutputSaveName "yout" LoadInitialState off InitialState "xInitial" SaveFinalState off FinalStateName "xFinal" SaveFormat "Matrix" LimitMaxRows off MaxRows "1000" Decimation "1" AlgebraicLoopMsg "warning" MinStepSizeMsg "warning" UnconnectedInputMsg "warning" UnconnectedOutputMsg "warning" UnconnectedLineMsg "warning" InheritedTsInSrcMsg "warning" IntegerOverflowMsg "warning" UnnecessaryDatatypeConvMsg "none" Int32ToFloatConvMsg "warning" SignalLabelMismatchMsg "none" ConsistencyChecking "off" ZeroCross on SimulationMode "normal" BlockDataTips on BlockParametersDataTip on BlockAttributesDataTip off BlockPortWidthsDataTip off BlockDescriptionStringDataTip off BlockMaskParametersDataTip off ToolBar on StatusBar on BrowserShowLibraryLinks off BrowserLookUnderMasks off OptimizeBlockIOStorage on BufferReuse on BooleanDataType off RTWSystemTargetFile "grt.tlc" RTWInlineParameters off RTWRetainRTWFile off RTWTemplateMakefile "grt_default_tmf" RTWMakeCommand "make_rtw" RTWGenerateCodeOnly off ExtModeMexFile "ext_comm" ExtModeBatchMode off ExtModeTrigType "manual" ExtModeTrigMode "oneshot" ExtModeTrigPort "1" ExtModeTrigElement "any" ExtModeTrigDuration 1000 ExtModeTrigHoldOff 0 ExtModeTrigDelay 0 ExtModeTrigDirection "rising" ExtModeTrigLevel 0 ExtModeArchiveMode "off" ExtModeAutoIncOneShot off ExtModeIncDirWhenArm off ExtModeAddSuffixToVar off ExtModeWriteAllDataToWs off ExtModeArmWhenConnect off Created "Tue Jan 18 19:28:58 2000" UpdateHistory "UpdateHistoryNever" ModifiedByFormat "%" ModifiedDateFormat "%" LastModifiedDate "Tue Jan 18 19:35:33 2000" ModelVersionFormat "1.%" ConfigurationManager "none" BlockDefaults { Orientation "right" ForegroundColor "black" BackgroundColor "white" DropShadow off NamePlacement "normal" FontName "Helvetica" FontSize 10 FontWeight "normal" FontAngle "normal" ShowName on } AnnotationDefaults { HorizontalAlignment "center" VerticalAlignment "middle" ForegroundColor "black" BackgroundColor "white" DropShadow off FontName "Helvetica" FontSize 10 FontWeight "normal" FontAngle "normal" } LineDefaults { FontName "Helvetica" FontSize 9 FontWeight "normal" FontAngle "normal" } System { Name "amenl" Location [2, 74, 802, 548] Open on ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" ZoomFactor "100" AutoZoom on ReportName "simulink-default.rpt" Block { BlockType TransferFcn Name "-Suo(s)" Position [510, 46, 580, 94] ForegroundColor "red" DropShadow on ShowName off FontName "Arial" FontSize 14 Numerator "-nsuo" Denominator "dsuo" MaskType "SUO" MaskDisplay "disp('-Suo(s)')" MaskIconFrame on MaskIconOpaque on MaskIconRotate "none" MaskIconUnits "autoscale" } Block { BlockType SubSystem Name "Additive \nModel Error" Ports [1, 1, 0, 0, 0] Position [380, 118, 460, 192] BackgroundColor "yellow" DropShadow on FontName "Arial" FontSize 14 ShowPortLabels off MaskType "Additive modelling error" MaskDescription "Additive modelling error" MaskHelp "This block implements the AME for a non linear " "plant with modelling error" MaskPromptString " numerator linear model:|denominator linear mod" "el:" MaskStyleString "edit,edit" MaskTunableValueString "on,on" MaskCallbackString "|" MaskEnableString "on,on" MaskVisibilityString "on,on" MaskInitialization "nplin=@1;dplin=@2;" MaskDisplay "disp('AME')" MaskIconFrame on MaskIconOpaque on MaskIconRotate "none" MaskIconUnits "autoscale" MaskValueString "nplin|dplin" System { Name "Additive \nModel Error" Location [203, 237, 534, 487] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "yellow" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" ZoomFactor "100" AutoZoom on Block { BlockType Inport Name "in_1" Position [15, 115, 35, 135] ForegroundColor "blue" DropShadow on FontName "Arial" FontSize 14 Port "1" PortWidth "-1" SampleTime "-1" DataType "auto" SignalType "auto" Interpolate on } Block { BlockType TransferFcn Name "Linear model " Position [100, 151, 170, 199] DropShadow on FontName "Arial" FontSize 14 Numerator "nplin" Denominator "dplin" } Block { BlockType SubSystem Name "Nonlinear\nplant" Ports [1, 1, 0, 0, 0] Position [100, 48, 175, 102] DropShadow on FontName "Arial" FontSize 14 ShowPortLabels off MaskType "Real Plant" MaskDisplay "disp('Plant')" MaskIconFrame on MaskIconOpaque on MaskIconRotate "none" MaskIconUnits "autoscale" System { Name "Nonlinear\nplant" Location [6, 76, 794, 578] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" ZoomFactor "100" AutoZoom on Block { BlockType Inport Name "in_1" Position [50, 353, 70, 377] ForegroundColor "blue" DropShadow on FontName "Arial" FontSize 14 Port "1" PortWidth "-1" SampleTime "-1" DataType "auto" SignalType "auto" Interpolate on } Block { BlockType Fcn Name "Fcn" Position [250, 115, 475, 175] BackgroundColor "yellow" DropShadow on ShowName off FontName "Arial" FontSize 14 Expr "(u[2])^3+u[2]" } Block { BlockType Fcn Name "Fcn1" Position [245, 197, 425, 243] BackgroundColor "yellow" DropShadow on ShowName off FontName "Arial" FontSize 14 Expr "-2*(u[1])-3*(u[2])" } Block { BlockType Fcn Name "Fcn2" Position [225, 327, 405, 383] BackgroundColor "yellow" DropShadow on ShowName off FontName "Arial" FontSize 14 Expr "(1+0.1*(u[1])^2)*u[2]" } Block { BlockType Integrator Name "Integrator" Ports [1, 1, 0, 0, 0] Position [525, 130, 555, 160] BackgroundColor "yellow" DropShadow on ShowName off FontName "Arial" FontSize 14 ExternalReset "none" InitialConditionSource "internal" InitialCondition "0" LimitOutput off UpperSaturationLimit "inf" LowerSaturationLimit "-inf" ShowSaturationPort off ShowStatePort off AbsoluteTolerance "auto" } Block { BlockType Integrator Name "Integrator1" Ports [1, 1, 0, 0, 0] Position [585, 230, 615, 260] BackgroundColor "yellow" DropShadow on ShowName off FontName "Arial" FontSize 14 ExternalReset "none" InitialConditionSource "internal" InitialCondition "0" LimitOutput off UpperSaturationLimit "inf" LowerSaturationLimit "-inf" ShowSaturationPort off ShowStatePort off AbsoluteTolerance "auto" } Block { BlockType Mux Name "Mux" Ports [2, 1, 0, 0, 0] Position [175, 125, 220, 165] BackgroundColor "yellow" DropShadow on ShowName off FontName "Arial" FontSize 14 Inputs "2" DisplayOption "none" } Block { BlockType Mux Name "Mux1" Ports [2, 1, 0, 0, 0] Position [70, 200, 115, 235] BackgroundColor "yellow" DropShadow on ShowName off FontName "Arial" FontSize 14 Inputs "2" DisplayOption "none" } Block { BlockType Mux Name "Mux2" Ports [2, 1, 0, 0, 0] Position [150, 328, 195, 377] BackgroundColor "yellow" DropShadow on ShowName off FontName "Arial" FontSize 14 Inputs "2" DisplayOption "none" } Block { BlockType Sum Name "Sum" Ports [2, 1, 0, 0, 0] Position [495, 198, 520, 287] BackgroundColor "yellow" DropShadow on ShowName off FontName "Arial" FontSize 14 IconShape "rectangular" Inputs "++" SaturateOnIntegerOverflow on } Block { BlockType ToWorkspace Name "state1" Position [620, 65, 665, 85] BackgroundColor "yellow" DropShadow on FontName "Arial" FontSize 14 VariableName "x1" Buffer "10000" Decimation "1" SampleTime "0" SaveFormat "Matrix" } Block { BlockType ToWorkspace Name "state2" Position [715, 235, 760, 255] BackgroundColor "yellow" DropShadow on FontName "Arial" FontSize 14 VariableName "x2" Buffer "10000" Decimation "1" SampleTime "0" SaveFormat "Matrix" } Block { BlockType Outport Name "out_1" Position [645, 132, 665, 158] ForegroundColor "green" DropShadow on FontName "Arial" FontSize 14 Port "1" OutputWhenDisabled "held" InitialOutput "0" } Line { SrcBlock "Integrator1" SrcPort 1 Points [80, 0] Branch { DstBlock "state2" DstPort 1 } Branch { Points [-5, 0; 0, -222; -655, 0; 0, 132] Branch { Points [0, 70] DstBlock "Mux1" DstPort 2 } Branch { DstBlock "Mux" DstPort 2 } } } Line { SrcBlock "Integrator" SrcPort 1 Points [40, 0] Branch { Points [0, -70] DstBlock "state1" DstPort 1 } Branch { Points [20, 0] Branch { DstBlock "out_1" DstPort 1 } Branch { Points [0, 45; -470, 0] Branch { Points [-20, 0] Branch { Points [-80, 0; 0, 20] DstBlock "Mux1" DstPort 1 } Branch { Points [0, 150] DstBlock "Mux2" DstPort 1 } } Branch { Points [0, -55] DstBlock "Mux" DstPort 1 } } } } Line { SrcBlock "Mux2" SrcPort 1 DstBlock "Fcn2" DstPort 1 } Line { SrcBlock "Fcn2" SrcPort 1 Points [25, 0; 0, -90] DstBlock "Sum" DstPort 2 } Line { SrcBlock "Sum" SrcPort 1 DstBlock "Integrator1" DstPort 1 } Line { SrcBlock "Fcn1" SrcPort 1 DstBlock "Sum" DstPort 1 } Line { SrcBlock "Mux1" SrcPort 1 DstBlock "Fcn1" DstPort 1 } Line { SrcBlock "Fcn" SrcPort 1 DstBlock "Integrator" DstPort 1 } Line { SrcBlock "Mux" SrcPort 1 DstBlock "Fcn" DstPort 1 } Line { SrcBlock "in_1" SrcPort 1 DstBlock "Mux2" DstPort 2 } } } Block { BlockType Sum Name "Sum2" Ports [2, 1, 0, 0, 0] Position [245, 100, 265, 135] DropShadow on ShowName off FontName "Arial" FontSize 14 IconShape "rectangular" Inputs "++" SaturateOnIntegerOverflow on } Block { BlockType Outport Name "out_1" Position [285, 110, 305, 130] ForegroundColor "green" DropShadow on FontName "Arial" FontSize 14 Port "1" OutputWhenDisabled "held" InitialOutput "0" } Line { SrcBlock "in_1" SrcPort 1 Points [12, 0] Branch { Points [0, -50] DstBlock "Nonlinear\nplant" DstPort 1 } Branch { Points [0, 50] DstBlock "Linear model " DstPort 1 } } Line { SrcBlock "Linear model " SrcPort 1 Points [27, 0; 0, -50] DstBlock "Sum2" DstPort 2 } Line { SrcBlock "Nonlinear\nplant" SrcPort 1 Points [22, 0; 0, 35] DstBlock "Sum2" DstPort 1 } Line { SrcBlock "Sum2" SrcPort 1 DstBlock "out_1" DstPort 1 } } } Block { BlockType SubSystem Name "Disturbance" Ports [0, 1, 0, 0, 0] Position [155, 18, 255, 62] BackgroundColor "cyan" DropShadow on ShowName off FontName "Arial" FontSize 14 ShowPortLabels off MaskType "Pulse disturbance" MaskDescription "Pulse" MaskHelp "This block generates a (one shot) pulse" MaskPromptString "pulse amplitude:|initial time:|pulse duration:" MaskStyleString "edit,edit,edit" MaskTunableValueString "on,on,on" MaskCallbackString "||" MaskEnableString "on,on,on" MaskVisibilityString "on,on,on" MaskInitialization "D=@1;ti=@2;dt=@3;" MaskDisplay "disp('Disturbance')" MaskIconFrame on MaskIconOpaque on MaskIconRotate "none" MaskIconUnits "autoscale" MaskValueString "1|15|30" System { Name "Disturbance" Location [175, 217, 667, 446] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "cyan" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" ZoomFactor "100" AutoZoom on Block { BlockType Step Name "Dist1" Position [60, 17, 95, 43] DropShadow on FontName "Arial" FontSize 14 Time "ti" Before "0" After "D" SampleTime "0" } Block { BlockType Step Name "Dist2" Position [60, 112, 95, 138] DropShadow on FontName "Arial" FontSize 14 Time "ti+dt" Before "0" After "-D" SampleTime "0" } Block { BlockType Sum Name "Sum2" Ports [2, 1, 0, 0, 0] Position [240, 73, 260, 117] DropShadow on ShowName off FontName "Arial" FontSize 14 IconShape "rectangular" Inputs "++" SaturateOnIntegerOverflow on } Block { BlockType Outport Name "out_1" Position [345, 85, 365, 105] DropShadow on FontName "Arial" FontSize 14 Port "1" OutputWhenDisabled "held" InitialOutput "0" } Line { SrcBlock "Dist2" SrcPort 1 Points [63, 0; 0, -20] DstBlock "Sum2" DstPort 2 } Line { SrcBlock "Dist1" SrcPort 1 Points [63, 0; 0, 55] DstBlock "Sum2" DstPort 1 } Line { SrcBlock "Sum2" SrcPort 1 DstBlock "out_1" DstPort 1 } } } Block { BlockType Mux Name "Mux" Ports [2, 1, 0, 0, 0] Position [650, 118, 695, 167] ForegroundColor "green" DropShadow on ShowName off FontName "Arial" FontSize 14 Inputs "2" DisplayOption "none" } Block { BlockType SubSystem Name "Reference" Ports [0, 1, 0, 0, 0] Position [15, 133, 110, 177] BackgroundColor "cyan" DropShadow on ShowName off FontName "Arial" FontSize 14 ShowPortLabels off MaskType "Reference" MaskDescription "reference" MaskHelp "This block generates a signal with a mean value" " Ro and a superimposed square wave of frequency fsw [rad/s] and peak value as" "w." MaskPromptString "average value:| frequency square wave [rad/s]:|" "peak value of square wave:" MaskStyleString "edit,edit,edit" MaskTunableValueString "on,on,on" MaskCallbackString "||" MaskEnableString "on,on,on" MaskVisibilityString "on,on,on" MaskInitialization "Ro=@1;fsw=@2;asw=@3;" MaskDisplay "disp('Reference')" MaskIconFrame on MaskIconOpaque on MaskIconRotate "none" MaskIconUnits "autoscale" MaskValueString "2|0.1|0.3" System { Name "Reference" Location [23, 230, 631, 408] Open on ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "cyan" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" ZoomFactor "100" AutoZoom on Block { BlockType Clock Name "Clock" Position [65, 91, 90, 119] DropShadow on FontName "Arial" FontSize 14 DisplayTime off Decimation "10" } Block { BlockType Fcn Name "Fcn" Position [145, 70, 245, 140] DropShadow on FontName "Arial" FontSize 14 Expr "sin(u[1]*fsw)" } Block { BlockType Relay Name "Relay" Position [290, 76, 350, 134] DropShadow on FontName "Arial" FontSize 14 OnSwitchValue "0" OffSwitchValue "0" OnOutputValue "asw" OffOutputValue "-asw" } Block { BlockType Sum Name "Sum2" Ports [2, 1, 0, 0, 0] Position [435, 58, 455, 122] DropShadow on ShowName off FontName "Arial" FontSize 14 IconShape "rectangular" Inputs "++" SaturateOnIntegerOverflow on } Block { BlockType Step Name "reference mean value" Position [120, 12, 155, 38] DropShadow on FontName "Arial" FontSize 14 Time "0" Before "0" After "Ro" SampleTime "0" } Block { BlockType Outport Name "out_1" Position [510, 76, 535, 104] DropShadow on FontName "Arial" FontSize 14 Port "1" OutputWhenDisabled "held" InitialOutput "0" } Line { SrcBlock "reference mean value" SrcPort 1 Points [240, 0; 0, 50] DstBlock "Sum2" DstPort 1 } Line { SrcBlock "Sum2" SrcPort 1 DstBlock "out_1" DstPort 1 } Line { SrcBlock "Clock" SrcPort 1 DstBlock "Fcn" DstPort 1 } Line { SrcBlock "Fcn" SrcPort 1 DstBlock "Relay" DstPort 1 } Line { SrcBlock "Relay" SrcPort 1 DstBlock "Sum2" DstPort 2 } } } Block { BlockType Scope Name "Scope" Ports [1, 0, 0, 0, 0] Position [715, 115, 765, 175] BackgroundColor "green" DropShadow on ShowName off FontName "Arial" FontSize 14 Floating off Location [54, 237, 795, 551] Open off NumInputPorts "1" TickLabels "on" ZoomMode "on" List { ListType AxesTitles axes1 "%" } Grid "on" TimeRange "100.000000" YMin "-1" YMax "1" SaveToWorkspace off SaveName "ScopeData" DataFormat "Matrix" LimitMaxRows on MaxRows "5000" Decimation "1" SampleInput off SampleTime "0" } Block { BlockType TransferFcn Name "So(s)" Position [510, 132, 580, 178] ForegroundColor "red" DropShadow on ShowName off FontName "Arial" FontSize 14 Numerator "nso" Denominator "dso" MaskType "SO" MaskDisplay "disp('So(s)')" MaskIconFrame on MaskIconOpaque on MaskIconRotate "none" MaskIconUnits "autoscale" } Block { BlockType TransferFcn Name "So(s) " Position [254, 80, 326, 125] Orientation "down" ForegroundColor "red" DropShadow on ShowName off FontName "Arial" FontSize 14 Numerator "nso" Denominator "dso" MaskType "SO" MaskDisplay "disp('So(s)')" MaskIconFrame on MaskIconOpaque on MaskIconRotate "none" MaskIconUnits "autoscale" } Block { BlockType Sum Name "Sum" Ports [2, 1, 0, 0, 0] Position [145, 143, 165, 187] ForegroundColor "red" DropShadow on ShowName off FontName "Arial" FontSize 14 IconShape "rectangular" Inputs "+-" SaturateOnIntegerOverflow on } Block { BlockType Sum Name "Sum1" Ports [2, 1, 0, 0, 0] Position [330, 133, 350, 177] ForegroundColor "red" DropShadow on ShowName off FontName "Arial" FontSize 14 IconShape "rectangular" Inputs "++" SaturateOnIntegerOverflow on } Block { BlockType TransferFcn Name "Suo(s)" Position [200, 143, 270, 187] ForegroundColor "red" DropShadow on ShowName off FontName "Arial" FontSize 14 Numerator "nsuo" Denominator "dsuo" MaskType "SUO" MaskDisplay "disp('Suo(s)')" MaskIconFrame on MaskIconOpaque on MaskIconRotate "none" MaskIconUnits "autoscale" } Block { BlockType ToWorkspace Name "To Workspace" Position [655, 56, 695, 84] BackgroundColor "green" DropShadow on ShowName off FontName "Arial" FontSize 14 VariableName "ue" Buffer "20000" Decimation "1" SampleTime "0" SaveFormat "Matrix" } Block { BlockType ToWorkspace Name "To Workspace1" Position [535, 230, 575, 260] Orientation "left" BackgroundColor "green" DropShadow on ShowName off FontName "Arial" FontSize 14 VariableName "ye" Buffer "20000" Decimation "1" SampleTime "0" SaveFormat "Matrix" } Block { BlockType ToWorkspace Name "To Workspace2" Position [325, 26, 365, 54] BackgroundColor "green" DropShadow on ShowName off FontName "Arial" FontSize 14 VariableName "di" Buffer "20000" Decimation "1" SampleTime "0" SaveFormat "Matrix" } Block { BlockType ToWorkspace Name "To Workspace3" Position [150, 77, 190, 103] BackgroundColor "green" DropShadow on ShowName off FontName "Arial" FontSize 14 VariableName "r" Buffer "20000" Decimation "1" SampleTime "0" SaveFormat "Matrix" } Line { SrcBlock "Sum" SrcPort 1 DstBlock "Suo(s)" DstPort 1 } Line { SrcBlock "Suo(s)" SrcPort 1 DstBlock "Sum1" DstPort 2 } Line { SrcBlock "Sum1" SrcPort 1 DstBlock "Additive \nModel Error" DstPort 1 } Line { SrcBlock "So(s) " SrcPort 1 Points [0, 15] DstBlock "Sum1" DstPort 1 } Line { SrcBlock "Additive \nModel Error" SrcPort 1 Points [22, 0] Branch { Points [0, -85] DstBlock "-Suo(s)" DstPort 1 } Branch { Points [3, 0] Branch { DstBlock "So(s)" DstPort 1 } Branch { Points [0, 95; -360, 0] DstBlock "Sum" DstPort 2 } } } Line { SrcBlock "Mux" SrcPort 1 DstBlock "Scope" DstPort 1 } Line { SrcBlock "-Suo(s)" SrcPort 1 Points [5, 0] Branch { DstBlock "To Workspace" DstPort 1 } Branch { Points [44, 0; 0, 60] DstBlock "Mux" DstPort 1 } } Line { SrcBlock "Reference" SrcPort 1 Points [15, 0] Branch { DstBlock "Sum" DstPort 1 } Branch { Points [-7, 0; 0, -65] DstBlock "To Workspace3" DstPort 1 } } Line { SrcBlock "So(s)" SrcPort 1 Points [10, 0] Branch { DstBlock "Mux" DstPort 2 } Branch { Points [32, 0; 0, 90] DstBlock "To Workspace1" DstPort 1 } } Line { SrcBlock "Disturbance" SrcPort 1 Points [30, 0] Branch { DstBlock "To Workspace2" DstPort 1 } Branch { DstBlock "So(s) " DstPort 1 } } } }