Model { Name "pid2" Version 2.20 SimParamPage Solver SampleTimeColors off InvariantConstants off WideVectorLines off ShowLineWidths off StartTime "0.0" StopTime "10" Solver ode45 RelTol "1e-3" AbsTol "1e-3" Refine "1" MaxStep "0.01" InitialStep "auto" FixedStep "auto" MaxOrder 5 OutputOption RefineOutputTimes OutputTimes "[]" LoadExternalInput off ExternalInput "[t, u]" SaveTime off TimeSaveName "tout" SaveState off StateSaveName "xout" SaveOutput off OutputSaveName "yout" LoadInitialState off InitialState "xInitial" SaveFinalState off FinalStateName "xFinal" LimitMaxRows off MaxRows "1000" Decimation "1" AlgebraicLoopMsg warning MinStepSizeMsg warning UnconnectedInputMsg warning UnconnectedOutputMsg warning UnconnectedLineMsg warning ConsistencyChecking off ZeroCross on SimulationMode normal RTWSystemTargetFile "grt.tlc" RTWInlineParameters off RTWPlaceOutputsASAP off RTWRetainRTWFile off RTWTemplateMakefile "grt_default_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 "pid2" Location [12, 74, 987, 842] Open on ToolBar on StatusBar on ScreenColor white PaperOrientation landscape PaperPositionMode auto PaperType usletter PaperUnits inches Block { BlockType Mux Name "Mux" Ports [2, 1, 0, 0, 0] Position [715, 511, 745, 544] ShowName off FontSize 12 Inputs "2" } Block { BlockType Mux Name "Mux1" Ports [2, 1, 0, 0, 0] Position [735, 376, 765, 409] ShowName off FontSize 12 Inputs "2" } Block { BlockType ZeroPole Name "P(s)" Position [450, 368, 565, 422] FontName "Arial" FontSize 12 Zeros "[]" Poles "[-1;-1; -1]" Gain "[1]" } Block { BlockType ZeroPole Name "P(s) " Position [450, 583, 565, 637] FontName "Arial" FontSize 12 Zeros "[]" Poles "[-1;-1; -1]" Gain "[1]" } Block { BlockType TransferFcn Name "R_D(s)" Position [250, 435, 315, 475] FontSize 12 Numerator "[1, 0]" Denominator "[0.1 1]" } Block { BlockType TransferFcn Name "R_D(s) " Position [250, 650, 315, 690] FontSize 12 Numerator "[1, 0]" Denominator "[0.01 1]" } Block { BlockType ZeroPole Name "R_I(s)" Position [255, 377, 300, 413] FontSize 12 Zeros "[]" Poles "[0]" Gain "[1]" } Block { BlockType ZeroPole Name "R_I(s) " Position [255, 592, 300, 628] FontSize 12 Zeros "[]" Poles "[0]" Gain "[1]" } Block { BlockType Gain Name "R_P(s)" Position [260, 323, 295, 347] FontSize 12 Gain "2" } Block { BlockType Gain Name "R_P(s) " Position [260, 538, 295, 562] FontSize 12 Gain "2" } Block { BlockType SubSystem Name "Rumore in \nuscita" Ports [0, 1, 0, 0, 0] Position [380, 197, 425, 233] FontSize 12 ShowPortLabels off MaskType "Continuous White Noise." MaskDescription "White noise for continuous (s-domain) systems." "\nBand-limited using zero-order-hold." MaskHelp "Implemented using white noise into Zero-Order H" "old block. The seed and power can be vectors of the same length to produce a " "vector of white noise sources. For faster simulation, set sample time to the " "highest value possible but in accordance with the fastest dynamics of system." MaskPromptString "Noise Power:|Sample Time:|Seed" MaskStyleString "edit,edit,edit" MaskTunableValueString "on,on,on" MaskInitialization "Cov = @1; Ts = @2; seed = @3; r = rand(1,12); r" "2 = [r(1),r;r,r(12)]; t =[1:13;1:13];" MaskDisplay "plot(t(:),r2(:))" MaskIconFrame on MaskIconOpaque on MaskIconRotate none MaskIconUnits autoscale MaskValueString "[0.01]|0.05|[23341]" System { Name "Rumore in \nuscita" Location [54, 341, 339, 470] Open off ToolBar off StatusBar off ScreenColor white PaperOrientation landscape PaperPositionMode auto PaperType usletter PaperUnits inches Block { BlockType Gain Name "Gain" Position [155, 31, 195, 69] Gain "[sqrt(Cov)]/[sqrt(Ts)]" } Block { BlockType RandomNumber Name "White Noise" Position [25, 40, 45, 60] Mean "0" Variance "1" Seed "seed" SampleTime "-1" } Block { BlockType ZeroOrderHold Name "Zero-Order\nHold" Position [85, 34, 120, 66] SampleTime "Ts" } Block { BlockType Outport Name "Out_1" Position [230, 40, 250, 60] Port "1" OutputWhenDisabled held InitialOutput "0" } Line { SrcBlock "White Noise" SrcPort 1 DstBlock "Zero-Order\nHold" DstPort 1 } Line { SrcBlock "Gain" SrcPort 1 DstBlock "Out_1" DstPort 1 } Line { SrcBlock "Zero-Order\nHold" SrcPort 1 DstBlock "Gain" DstPort 1 } } } Block { BlockType Step Name "Step Input" Position [55, 370, 75, 390] FontSize 12 Time "1" Before "0" After "1" } Block { BlockType Sum Name "Sum" Ports [3, 1, 0, 0, 0] Position [340, 301, 365, 489] ShowName off FontSize 12 Inputs "++-" } Block { BlockType Sum Name "Sum1" Ports [2, 1, 0, 0, 0] Position [175, 369, 195, 416] ShowName off FontSize 12 Inputs "+-" } Block { BlockType Sum Name "Sum2" Ports [3, 1, 0, 0, 0] Position [340, 516, 365, 704] ShowName off FontSize 12 Inputs "++-" } Block { BlockType Sum Name "Sum3" Ports [2, 1, 0, 0, 0] Position [175, 584, 195, 631] ShowName off FontSize 12 Inputs "+-" } Block { BlockType Sum Name "Sum4" Ports [2, 1, 0, 0, 0] Position [615, 359, 635, 406] ShowName off FontSize 12 Inputs "++" } Block { BlockType Sum Name "Sum5" Ports [2, 1, 0, 0, 0] Position [615, 574, 635, 621] ShowName off FontSize 12 Inputs "++" } Block { BlockType Gain Name "i" Position [460, 200, 580, 230] ShowName off FontSize 12 Gain "0.01" } Block { BlockType SubSystem Name "ingresso \ndi controllo" Ports [1, 0, 0, 0, 0] Position [790, 510, 820, 550] FontSize 12 ShowPortLabels off MaskType "Storage scope." MaskDescription "Storage scope using MATLAB graph window.\nEnter" " plotting ranges and line type." MaskHelp "This block uses a MATLAB figure window to plot " "the input signal. The graph limits are automatically scaled to the min and m" "ax values of the signal stored in the scope's signal buffer. Line type must " "be in quotes. See the M-file sfunyst.m." MaskPromptString "Initial Time Range:|Initial y-min:|Initial y-ma" "x:|Storage pts.:|Line type (rgbw-.:xo):" MaskStyleString "edit,edit,edit,edit,edit" MaskTunableValueString "on,on,on,on,on" MaskInitialization "npts = @4; color = @5; ax = [0, @1, @2, @3]; dt" "=-1;" MaskDisplay "plot(0,0,100,100,[83,76,63,52,42,38,28,16,11,84" ",11,11,11,90,90,11],[75,58,47,54,72,80,84,74,65,65,65,90,40,40,90,90])" MaskIconFrame on MaskIconOpaque on MaskIconRotate none MaskIconUnits autoscale MaskValueString "5|-1|1|200000|'b-/r--/c-./w:/m*/ro/b+'" System { Name "ingresso \ndi controllo" Location [0, 59, 274, 252] Open off ToolBar off StatusBar off ScreenColor white PaperOrientation landscape PaperPositionMode auto PaperType usletter PaperUnits inches Block { BlockType Inport Name "x" Position [65, 55, 85, 75] Port "1" PortWidth "-1" SampleTime "-1" } Block { BlockType "S-Function" Name "S-function\nM-file which plots\nlines\n" Ports [1, 0, 0, 0, 0] Position [130, 55, 180, 75] CopyFcn "sfunyst([],[],[],'CopyBlock')" DeleteFcn "sfunyst([],[],[],'DeleteBlock')" LoadFcn "sfunyst([],[],[],'LoadBlock')" FunctionName "sfunyst" Parameters "ax, color, npts, dt" PortCounts "[]" SFunctionModules "''" } Line { SrcBlock "x" SrcPort 1 DstBlock "S-function\nM-file which plots\nlines\n" DstPort 1 } } } Block { BlockType SubSystem Name "uscita\ncontrollata" Ports [1, 0, 0, 0, 0] Position [795, 375, 825, 415] FontSize 12 ShowPortLabels off MaskType "Storage scope." MaskDescription "Storage scope using MATLAB graph window.\nEnter" " plotting ranges and line type." MaskHelp "This block uses a MATLAB figure window to plot " "the input signal. The graph limits are automatically scaled to the min and m" "ax values of the signal stored in the scope's signal buffer. Line type must " "be in quotes. See the M-file sfunyst.m." MaskPromptString "Initial Time Range:|Initial y-min:|Initial y-ma" "x:|Storage pts.:|Line type (rgbw-.:xo):" MaskStyleString "edit,edit,edit,edit,edit" MaskTunableValueString "on,on,on,on,on" MaskInitialization "npts = @4; color = @5; ax = [0, @1, @2, @3]; dt" "=-1;" MaskDisplay "plot(0,0,100,100,[83,76,63,52,42,38,28,16,11,84" ",11,11,11,90,90,11],[75,58,47,54,72,80,84,74,65,65,65,90,40,40,90,90])" MaskIconFrame on MaskIconOpaque on MaskIconRotate none MaskIconUnits autoscale MaskValueString "5|-1|1|200000|'b-/r--/c-./w:/m*/ro/b+'" System { Name "uscita\ncontrollata" Location [0, 59, 274, 252] Open off ToolBar off StatusBar off ScreenColor white PaperOrientation landscape PaperPositionMode auto PaperType usletter PaperUnits inches Block { BlockType Inport Name "x" Position [65, 55, 85, 75] Port "1" PortWidth "-1" SampleTime "-1" } Block { BlockType "S-Function" Name "S-function\nM-file which plots\nlines\n" Ports [1, 0, 0, 0, 0] Position [130, 55, 180, 75] CopyFcn "sfunyst([],[],[],'CopyBlock')" DeleteFcn "sfunyst([],[],[],'DeleteBlock')" LoadFcn "sfunyst([],[],[],'LoadBlock')" FunctionName "sfunyst" Parameters "ax, color, npts, dt" PortCounts "[]" SFunctionModules "''" } Line { SrcBlock "x" SrcPort 1 DstBlock "S-function\nM-file which plots\nlines\n" DstPort 1 } } } Line { SrcBlock "R_I(s)" SrcPort 1 DstBlock "Sum" DstPort 2 } Line { SrcBlock "R_P(s)" SrcPort 1 DstBlock "Sum" DstPort 1 } Line { SrcBlock "R_D(s)" SrcPort 1 DstBlock "Sum" DstPort 3 } Line { SrcBlock "Sum1" SrcPort 1 Points [0, 0] Branch { DstBlock "R_I(s)" DstPort 1 } Branch { Points [25, 0; 0, -60] DstBlock "R_P(s)" DstPort 1 } } Line { SrcBlock "R_I(s) " SrcPort 1 DstBlock "Sum2" DstPort 2 } Line { SrcBlock "R_P(s) " SrcPort 1 DstBlock "Sum2" DstPort 1 } Line { SrcBlock "R_D(s) " SrcPort 1 DstBlock "Sum2" DstPort 3 } Line { SrcBlock "Sum3" SrcPort 1 Points [25, 0] Branch { DstBlock "R_I(s) " DstPort 1 } Branch { Points [0, -60] DstBlock "R_P(s) " DstPort 1 } } Line { SrcBlock "Step Input" SrcPort 1 Points [35, 0] Branch { DstBlock "Sum1" DstPort 1 } Branch { Points [0, 215] DstBlock "Sum3" DstPort 1 } } Line { SrcBlock "Mux" SrcPort 1 DstBlock "ingresso \ndi controllo" DstPort 1 } Line { SrcBlock "Sum" SrcPort 1 Points [35, 0] Branch { DstBlock "P(s)" DstPort 1 } Branch { Points [0, -90; 295, 0] DstBlock "Mux" DstPort 1 } } Line { SrcBlock "Sum2" SrcPort 1 Points [35, 0] Branch { DstBlock "P(s) " DstPort 1 } Branch { Points [0, -75] DstBlock "Mux" DstPort 2 } } Line { SrcBlock "Mux1" SrcPort 1 DstBlock "uscita\ncontrollata" DstPort 1 } Line { SrcBlock "P(s)" SrcPort 1 DstBlock "Sum4" DstPort 2 } Line { SrcBlock "Rumore in \nuscita" SrcPort 1 DstBlock "i" DstPort 1 } Line { SrcBlock "Sum4" SrcPort 1 Points [0, 0] Branch { DstBlock "Mux1" DstPort 1 } Branch { Points [0, 115; -485, 0; 0, -45] Branch { Points [0, -50] DstBlock "Sum1" DstPort 2 } Branch { DstBlock "R_D(s)" DstPort 1 } } } Line { SrcBlock "P(s) " SrcPort 1 DstBlock "Sum5" DstPort 2 } Line { SrcBlock "i" SrcPort 1 Points [5, 0; 0, 105] Branch { Points [0, 50] DstBlock "Sum4" DstPort 1 } Branch { Points [0, 265] DstBlock "Sum5" DstPort 1 } } Line { SrcBlock "Sum5" SrcPort 1 Points [15, 0] Branch { Points [15, 0; 0, -200] DstBlock "Mux1" DstPort 2 } Branch { Points [0, 120; -430, 0] Branch { Points [-80, 0; 0, -100] DstBlock "Sum3" DstPort 2 } Branch { Points [0, -50] DstBlock "R_D(s) " DstPort 1 } } } Annotation { Position [352, 17] VerticalAlignment top Text "Schema di controllo P.I.D. con azione derivativ" "a dall'uscita" FontName "Arial" FontSize 12 } Annotation { Position [327, 42] VerticalAlignment top Text "Effetto della scelta del 'polo lontano' \nnell'" "approssimazione dell'azione derivativa" FontName "Arial" FontSize 12 } Annotation { Position [362, 87] VerticalAlignment top Text "Notare come piu' il polo e' lontano piu' il dis" "turbo in uscita influenza\nl'andamento dell'ingresso di controllo, a parita' " "di prestazioni" FontName "Arial" FontSize 12 } } }