Model { Name "fzy2" Version 2.09 SimParamPage Diagnostics SampleTimeColors off InvariantConstants off WideVectorLines off ShowLineWidths off PaperOrientation landscape PaperType usletter PaperUnits inches StartTime "0.0" StopTime "10.0" Solver FixedStepDiscrete RelTol "1e-3" AbsTol "1e-6" Refine "1" MaxStep "auto" InitialStep "auto" FixedStep "0.01" MaxOrder 5 OutputOption RefineOutputTimes OutputTimes "[]" LoadExternalInput off ExternalInput "[t, u]" SaveTime on TimeSaveName "tout" SaveState off StateSaveName "xout" SaveOutput on OutputSaveName "yout" LoadInitialState off InitialState "xInitial" SaveFinalState off FinalStateName "xFinal" LimitMaxRows off MaxRows "1000" Decimation "1" AlgebraicLoopMsg none MinStepSizeMsg warning UnconnectedInputMsg warning UnconnectedOutputMsg warning UnconnectedLineMsg warning ConsistencyChecking off ZeroCross on SimulationMode normal RTWSystemTargetFile "grt.tlc" RTWInlineParameters off RTWRetainRTWFile off RTWTemplateMakefile "grt_vc.tmf" RTWMakeCommand "make_rtw" RTWGenerateCodeOnly off ExtModeMexFile "ext_comm" ExtModeBatchMode off 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 "fzy2" Location [252, 235, 712, 554] Open on ScreenColor white Block { BlockType Clock Name "Clock" Position [20, 15, 40, 35] DeleteFcn "simclock BlockIsBeingDestroyed" PostSaveFcn "simclock Save" Location [12, 31, 119, 76] } Block { BlockType S-Function Name "Fuzzy Logic Controller" Ports [1, 1, 0, 0, 0] Position [275, 96, 320, 154] FunctionName "sffis" Parameters "fismatrix" MaskType "FIS" MaskDescription "FIS" MaskHelp "Fuzzy Inference System" MaskPromptString "FIS Matrix:" MaskStyleString "edit" MaskInitialization "fismatrix = @1;" MaskDisplay "plot(0, -0.3, 6, -0.3, 0, 1.2, 6, 1.2, [0 " "6], [0 0], [1 2 3],[0 1 0],[2 3 4],[0 1 0],[3 " "4 5],[0 1 0])" MaskIconFrame on MaskIconOpaque on MaskIconRotate none MaskIconUnits autoscale MaskValueString "fzy2_mat" } Block { BlockType Mux Name "Mux1" Ports [2, 1, 0, 0, 0] Position [205, 108, 240, 137] Inputs "2" } Block { BlockType ToWorkspace Name "To Workspace" Position [400, 109, 445, 141] VariableName "output" Buffer "inf" Decimation "1" SampleTime "-1" } Block { BlockType ToWorkspace Name "To Workspace2" Position [220, 215, 280, 245] VariableName "input2" Buffer "inf" Decimation "1" SampleTime "-1" } Block { BlockType ToWorkspace Name "To Workspace3" Position [220, 165, 280, 195] VariableName "input1" Buffer "inf" Decimation "1" SampleTime "-1" } Block { BlockType ToWorkspace Name "To Workspace4" Position [110, 220, 170, 250] VariableName "t" Buffer "inf" Decimation "1" SampleTime "-1" } Block { BlockType Constant Name "final state" Position [15, 50, 35, 70] Value "0" } Block { BlockType Step Name "reset at 5 sec" Position [15, 115, 45, 145] Time "5" Before "0" After "1" } Block { BlockType Switch Name "reset pulse " Position [120, 25, 150, 55] Threshold "8" } Block { BlockType Step Name "set at 2 sec" Position [15, 200, 45, 230] Time "2" Before "0" After "1" } Block { BlockType Switch Name "set pulse" Position [120, 170, 150, 200] Threshold "6" } Line { SrcBlock "Fuzzy Logic Controller" SrcPort 1 DstBlock "To Workspace" DstPort 1 } Line { SrcBlock "reset pulse " SrcPort 1 Points [10, 0; 0, 75] Branch { DstBlock "Mux1" DstPort 1 } Branch { Points [0, 5; 15, 0; 0, 110] DstBlock "To Workspace2" DstPort 1 } } Line { SrcBlock "Mux1" SrcPort 1 DstBlock "Fuzzy Logic Controller" DstPort 1 } Line { SrcBlock "reset at 5 sec" SrcPort 1 Points [40, 0; 0, -80] DstBlock "reset pulse " DstPort 3 } Line { SrcBlock "set at 2 sec" SrcPort 1 Points [55, 0] DstBlock "set pulse" DstPort 3 } Line { SrcBlock "Clock" SrcPort 1 Points [10, 0] Branch { Points [0, 160; 20, 0] Branch { Points [0, 50] DstBlock "To Workspace4" DstPort 1 } Branch { DstBlock "set pulse" DstPort 2 } } Branch { Points [15, 0; 0, 15] DstBlock "reset pulse " DstPort 2 } } Line { SrcBlock "final state" SrcPort 1 Points [25, 0] Branch { Points [15, 0; 0, -30] DstBlock "reset pulse " DstPort 1 } Branch { Points [0, 115] DstBlock "set pulse" DstPort 1 } } Line { SrcBlock "set pulse" SrcPort 1 Points [0, -50; 30, 0] Branch { Points [0, -5] DstBlock "Mux1" DstPort 2 } Branch { Points [0, 45] DstBlock "To Workspace3" DstPort 1 } } } }