Model { Name "pid1" Version 2.20 SimParamPage Solver SampleTimeColors off InvariantConstants off WideVectorLines off ShowLineWidths off StartTime "0.0" StopTime "15" Solver ode45 RelTol "1e-3" AbsTol "1e-3" Refine "1" MaxStep "0.1" 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 "pid1" Location [12, 74, 854, 831] 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 [690, 376, 720, 409] ShowName off FontSize 12 Inputs "2" } Block { BlockType Mux Name "Mux1" Ports [2, 1, 0, 0, 0] Position [690, 251, 720, 284] ShowName off FontSize 12 Inputs "2" } Block { BlockType ZeroPole Name "P(s)" Position [425, 233, 540, 287] FontSize 12 Zeros "[]" Poles "[-1;-1; -1]" Gain "[1]" } Block { BlockType ZeroPole Name "P(s) " Position [425, 448, 540, 502] FontSize 12 Zeros "[]" Poles "[-1;-1; -1]" Gain "[1]" } Block { BlockType TransferFcn Name "R_D(s)" Position [225, 300, 290, 340] FontSize 12 Numerator "[1, 0]" Denominator "[0.1 1]" } Block { BlockType TransferFcn Name "R_D(s) " Position [225, 515, 290, 555] FontSize 12 Numerator "[1, 0]" Denominator "[0.1 1]" } Block { BlockType ZeroPole Name "R_I(s)" Position [230, 242, 275, 278] FontSize 12 Zeros "[]" Poles "[0]" Gain "[1]" } Block { BlockType ZeroPole Name "R_I(s) " Position [230, 457, 275, 493] FontSize 12 Zeros "[]" Poles "[0]" Gain "[1]" } Block { BlockType Gain Name "R_P(s)" Position [235, 188, 270, 212] FontSize 12 Gain "2" } Block { BlockType Gain Name "R_P(s) " Position [235, 403, 270, 427] FontSize 12 Gain "2" } Block { BlockType Step Name "Step Input" Position [30, 235, 50, 255] FontSize 12 Time "1" Before "0" After "1" } Block { BlockType Sum Name "Sum" Ports [3, 1, 0, 0, 0] Position [315, 166, 340, 354] ShowName off FontSize 12 Inputs "+++" } Block { BlockType Sum Name "Sum1" Ports [2, 1, 0, 0, 0] Position [150, 234, 170, 281] ShowName off FontSize 12 Inputs "+-" } Block { BlockType Sum Name "Sum2" Ports [3, 1, 0, 0, 0] Position [315, 381, 340, 569] ShowName off FontSize 12 Inputs "++-" } Block { BlockType Sum Name "Sum3" Ports [2, 1, 0, 0, 0] Position [150, 449, 170, 496] ShowName off FontSize 12 Inputs "+-" } Block { BlockType SubSystem Name "ingresso\ndi controllo" Ports [1, 0, 0, 0, 0] Position [745, 375, 775, 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 "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 [745, 250, 775, 290] 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 } Branch { Points [25, 0; 0, 60] DstBlock "R_D(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 "P(s)" SrcPort 1 Points [0, 0] Branch { DstBlock "Mux1" DstPort 1 } Branch { Points [40, 0; 0, 100; -460, 0; 0, -90] DstBlock "Sum1" DstPort 2 } } Line { SrcBlock "Step Input" SrcPort 1 Points [35, 0] Branch { DstBlock "Sum1" DstPort 1 } Branch { Points [0, 215] DstBlock "Sum3" DstPort 1 } } Line { SrcBlock "P(s) " SrcPort 1 Points [40, 0] Branch { Points [35, 0; -5, -200] DstBlock "Mux1" DstPort 2 } Branch { Points [0, 110; -385, 0] Branch { Points [-75, 0; 0, -100] DstBlock "Sum3" DstPort 2 } Branch { Points [0, -50] DstBlock "R_D(s) " 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 } Annotation { Position [337, 122] VerticalAlignment top Text "Schema P.I.D.\ncon schema a derivazione dell'er" "rore" FontName "Arial" FontSize 12 } Annotation { Position [322, 612] VerticalAlignment top Text "Schema P.I.D.\ncon schema a derivazione dell'us" "cita" FontName "Arial" FontSize 12 } Annotation { Position [222, 27] VerticalAlignment top Text "Esempio di controllo P.I.D. tramite due schemi " "alternativi:\n- parte derivativa con derivazione dell'errore\n- parte derivat" "iva con derivazione dell'uscita\n" FontName "Arial" FontSize 12 } Annotation { Position [642, 27] VerticalAlignment top Text "Notare la notevole differenza nell'andamento\nd" "ell'ingresso di controllo a parita' di\nprestazioni in termini di variabile c" "ontrollata" FontName "Arial" FontSize 12 } } }