Model { Name "distffun" Version 3.00 SimParamPage "Solver" SampleTimeColors off InvariantConstants off WideVectorLines off ShowLineWidths off ShowPortDataTypes off StartTime "0.0" StopTime "15" SolverMode "SingleTasking" 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 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 20:11:33 2000" UpdateHistory "UpdateHistoryNever" ModifiedByFormat "%" ModifiedDateFormat "%" LastModifiedDate "Tue Jan 18 20:16:11 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 "distffun" Location [2, 74, 802, 558] 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 "C(s)" Position [130, 147, 250, 203] ForegroundColor "red" DropShadow on FontName "Arial" FontSize 14 Numerator "numc" Denominator "denc" MaskType "Controlador" MaskDescription "Controlador" MaskHelp "Linear controller" MaskPromptString "numerator:|denominator:" MaskStyleString "edit,edit" MaskTunableValueString "on,on" MaskCallbackString "|" MaskEnableString "on,on" MaskVisibilityString "on,on" MaskInitialization "numc=@1;denc=@2;" MaskDisplay "disp('CONTROL')" MaskIconFrame on MaskIconOpaque on MaskIconRotate "none" MaskIconUnits "autoscale" MaskValueString "[38 88 72]|[1 13 0]" } Block { BlockType SubSystem Name "Disturbance1" Ports [0, 1, 0, 0, 0] Position [495, 43, 595, 77] Orientation "left" BackgroundColor "cyan" DropShadow on ShowName off FontName "Arial" FontSize 14 ShowPortLabels off MaskType "Generalised disturbance" MaskDescription "disturbance" MaskHelp "This block generates a signal with average valu" "e Kc and a varying component amplified by Kv" MaskPromptString "Amplitude of constant component:|Amplitude of" " varying component:" MaskStyleString "edit,edit" MaskTunableValueString "on,on" MaskCallbackString "|" MaskEnableString "on,on" MaskVisibilityString "on,on" MaskInitialization "Kc=@1;Kv=@2;" MaskDisplay "disp('Disturbance')" MaskIconFrame on MaskIconOpaque on MaskIconRotate "none" MaskIconUnits "autoscale" MaskValueString "1|0.5" System { Name "Disturbance1" Location [157, 236, 627, 470] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "cyan" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" ZoomFactor "100" AutoZoom on Block { BlockType SubSystem Name "Band-Limited\nWhite Noise" Ports [0, 1, 0, 0, 0] Position [75, 67, 120, 103] DropShadow on FontName "Arial" FontSize 14 ShowPortLabels off MaskType "Continuous White Noise." MaskDescription "White noise for continuous (s-domain) syste" "ms.\nBand-limited using zero-order-hold." MaskHelp "Implemented using white noise into Zero-Ord" "er Hold block. The seed and power can be vectors of the same length to produc" "e 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 sys" "tem." MaskPromptString "Noise Power:|Sample Time:|Seed" MaskStyleString "edit,edit,edit" MaskTunableValueString "on,on,on" MaskCallbackString "||" MaskEnableString "on,on,on" MaskVisibilityString "on,on,on" MaskInitialization "Cov = @1; Ts = @2; seed = @3; r = rand(1,12" "); r2 = [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.1]|0.1|[23341]" System { Name "Band-Limited\nWhite Noise" Location [56, 339, 341, 468] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" ZoomFactor "100" AutoZoom on Block { BlockType Gain Name "Gain" Position [155, 31, 195, 69] Gain "[sqrt(Cov)]/[sqrt(Ts)]" SaturateOnIntegerOverflow on } Block { BlockType RandomNumber Name "White Noise" Position [25, 40, 45, 60] Mean "0" Variance "1" Seed "seed" SampleTime "0" } 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 "Zero-Order\nHold" SrcPort 1 DstBlock "Gain" DstPort 1 } Line { SrcBlock "Gain" SrcPort 1 DstBlock "Out_1" DstPort 1 } Line { SrcBlock "White Noise" SrcPort 1 DstBlock "Zero-Order\nHold" DstPort 1 } } } Block { BlockType Step Name "Dist-const" Position [60, 144, 95, 176] DropShadow on FontName "Arial" FontSize 14 Time "0" Before "0" After "1" SampleTime "0" } Block { BlockType ZeroPole Name "Filter" Position [140, 63, 200, 107] DropShadow on FontName "Arial" FontSize 14 Zeros "z" Poles "p" Gain "k" MaskType "buttap" MaskDescription "Analog Butterworth low pass filter.\n\n(Req" "uires Signal Processing Toolbox)" MaskHelp "Butterworth low pass filter using MATLAB's " "butter command." MaskPromptString "Cutoff frequency (rad/sec)|Order" MaskStyleString "edit,edit" MaskTunableValueString "on,on" MaskCallbackString "|" MaskEnableString "on,on" MaskVisibilityString "on,on" MaskInitialization "[z,p,k]=buttap(@2); z=@1*z; p=@1*p; k=real(" "prod(-p)); [num,den]=zp2tf(z,p,k); w=logspace(log10(@1/10),log10(10*@1),20); " "h=freqs(num,den,w); " MaskDisplay "plot(20*log10(w),20*log10(abs(h)))" MaskIconFrame on MaskIconOpaque on MaskIconRotate "none" MaskIconUnits "autoscale" MaskValueString "4|6" } Block { BlockType Gain Name "Gain1" Position [165, 138, 225, 182] DropShadow on ShowName off FontName "Arial" FontSize 14 Gain "Kc" SaturateOnIntegerOverflow on } Block { BlockType Gain Name "Gain2" Position [235, 64, 305, 106] DropShadow on ShowName off FontName "Arial" FontSize 14 Gain "Kv" SaturateOnIntegerOverflow on } Block { BlockType Sum Name "Sum5" Ports [2, 1, 0, 0, 0] Position [345, 116, 365, 174] DropShadow on ShowName off FontName "Arial" FontSize 14 IconShape "rectangular" Inputs "++" SaturateOnIntegerOverflow on } Block { BlockType Outport Name "out_1" Position [395, 135, 415, 155] DropShadow on FontName "Arial" FontSize 14 Port "1" OutputWhenDisabled "held" InitialOutput "0" } Line { SrcBlock "Dist-const" SrcPort 1 DstBlock "Gain1" DstPort 1 } Line { SrcBlock "Sum5" SrcPort 1 DstBlock "out_1" DstPort 1 } Line { SrcBlock "Band-Limited\nWhite Noise" SrcPort 1 DstBlock "Filter" DstPort 1 } Line { SrcBlock "Gain1" SrcPort 1 DstBlock "Sum5" DstPort 2 } Line { SrcBlock "Filter" SrcPort 1 DstBlock "Gain2" DstPort 1 } Line { SrcBlock "Gain2" SrcPort 1 Points [5, 0; 0, 45] DstBlock "Sum5" DstPort 1 } } } Block { BlockType SubSystem Name "Gf(s)" Ports [1, 1, 0, 0, 0] Position [295, 30, 385, 90] Orientation "left" ForegroundColor "red" DropShadow on FontName "Arial" FontSize 14 ShowPortLabels off MaskType "DIST-FF" MaskDescription "Disturbance feedforward block Gf" MaskHelp "Dynamic controller to provide disturbance feedf" "orward" MaskPromptString "numerator:| denominator:" MaskStyleString "edit,edit" MaskTunableValueString "on,on" MaskCallbackString "|" MaskEnableString "on,on" MaskVisibilityString "on,on" MaskInitialization "ngf=-@1;dgf=@2;" MaskDisplay "disp('DIST-FF')" MaskIconFrame on MaskIconOpaque on MaskIconRotate "none" MaskIconUnits "autoscale" MaskValueString "[-1 2]|[0.02 2]" System { Name "Gf(s)" Location [100, 254, 584, 530] 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 [440, 105, 460, 125] Orientation "left" ForegroundColor "blue" DropShadow on FontName "Arial" FontSize 14 Port "1" PortWidth "-1" SampleTime "-1" DataType "auto" SignalType "auto" Interpolate on } Block { BlockType TransferFcn Name "C(s)" Position [230, 87, 350, 143] Orientation "left" ForegroundColor "red" DropShadow on FontName "Arial" FontSize 14 Numerator "ngf" Denominator "dgf" } Block { BlockType Gain Name "Gain" Position [140, 96, 185, 134] Orientation "left" ForegroundColor "red" DropShadow on ShowName off FontName "Arial" FontSize 14 Gain "-1" SaturateOnIntegerOverflow on } Block { BlockType Outport Name "out_1" Position [40, 105, 60, 125] Orientation "left" ForegroundColor "green" DropShadow on FontName "Arial" FontSize 14 Port "1" OutputWhenDisabled "held" InitialOutput "0" } Line { SrcBlock "Gain" SrcPort 1 DstBlock "out_1" DstPort 1 } Line { SrcBlock "C(s)" SrcPort 1 DstBlock "Gain" DstPort 1 } Line { SrcBlock "in_1" SrcPort 1 DstBlock "C(s)" DstPort 1 } } } Block { BlockType TransferFcn Name "Go1" Position [390, 140, 445, 190] BackgroundColor "yellow" DropShadow on FontName "Arial" FontSize 14 Numerator "[2]" Denominator "[1 -2]" } Block { BlockType TransferFcn Name "Go2" Position [530, 128, 585, 182] BackgroundColor "yellow" DropShadow on FontName "Arial" FontSize 14 Numerator "[1]" Denominator "[1 1]" } Block { BlockType ToWorkspace Name "Plant" Position [660, 143, 710, 167] BackgroundColor "green" DropShadow on ShowName off FontName "Arial" FontSize 14 VariableName "y" Buffer "6000" Decimation "1" SampleTime "0" SaveFormat "Matrix" } Block { BlockType Step Name "Ref" Position [15, 150, 50, 180] BackgroundColor "cyan" DropShadow on FontName "Arial" FontSize 14 Time "1" Before "0" After "1" SampleTime "0" } Block { BlockType Scope Name "Scope" Ports [1, 0, 0, 0, 0] Position [660, 57, 715, 113] BackgroundColor "green" DropShadow on ShowName off FontName "Arial" FontSize 14 Floating off Location [464, 280, 795, 594] Open off NumInputPorts "1" TickLabels "on" ZoomMode "on" List { ListType AxesTitles axes1 "%" } Grid "on" TimeRange "15.000000" YMin "-2" YMax "2" SaveToWorkspace off SaveName "ScopeData" DataFormat "Matrix" LimitMaxRows on MaxRows "5000" Decimation "1" SampleInput off SampleTime "0" } Block { BlockType Sum Name "Sum" Ports [2, 1, 0, 0, 0] Position [85, 154, 105, 196] 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 [485, 135, 505, 175] BackgroundColor "yellow" DropShadow on ShowName off FontName "Arial" FontSize 14 IconShape "rectangular" Inputs "++" SaturateOnIntegerOverflow on } Block { BlockType Sum Name "Sum2" Ports [2, 1, 0, 0, 0] Position [290, 144, 310, 186] ForegroundColor "red" DropShadow on ShowName off FontName "Arial" FontSize 14 IconShape "rectangular" Inputs "++" SaturateOnIntegerOverflow on } Block { BlockType ToWorkspace Name "control" Position [335, 213, 385, 237] BackgroundColor "green" DropShadow on ShowName off FontName "Arial" FontSize 14 VariableName "u" Buffer "6000" Decimation "1" SampleTime "0" SaveFormat "Matrix" } Line { SrcBlock "Sum" SrcPort 1 DstBlock "C(s)" DstPort 1 } Line { SrcBlock "C(s)" SrcPort 1 DstBlock "Sum2" DstPort 2 } Line { SrcBlock "Go1" SrcPort 1 DstBlock "Sum1" DstPort 2 } Line { SrcBlock "Sum1" SrcPort 1 DstBlock "Go2" DstPort 1 } Line { SrcBlock "Ref" SrcPort 1 DstBlock "Sum" DstPort 1 } Line { SrcBlock "Gf(s)" SrcPort 1 Points [-20, 0; 0, 95] DstBlock "Sum2" DstPort 1 } Line { SrcBlock "Disturbance1" SrcPort 1 Points [-26, 0] Branch { Points [0, 85] DstBlock "Sum1" DstPort 1 } Branch { DstBlock "Gf(s)" DstPort 1 } } Line { SrcBlock "Sum2" SrcPort 1 Points [0, 0] Branch { DstBlock "Go1" DstPort 1 } Branch { Points [5, 0] DstBlock "control" DstPort 1 } } Line { SrcBlock "Go2" SrcPort 1 Points [20, 0] Branch { DstBlock "Plant" DstPort 1 } Branch { Points [0, 105; -540, 0] DstBlock "Sum" DstPort 2 } Branch { Points [0, -70] DstBlock "Scope" DstPort 1 } } Annotation { Position [352, 289] VerticalAlignment "top" ForegroundColor "blue" Text "DISTURBANCE FEEDFORWARD PROBLEM \nUNSTABLE PL" "ANT AND CLASSICAL CONTROL STRUCTURE" DropShadow on FontName "Arial" FontSize 14 } Annotation { Position [352, 337] VerticalAlignment "top" ForegroundColor "red" Text "DOUBLE CLICK ON BLOCKS CONTROL AND DIST-FF TO S" "ET AND TEST YOUR DESIGN" DropShadow on FontName "Arial" FontSize 14 } } }