Model { Name "PHLOOP" Version 3.00 SimParamPage "Solver" SampleTimeColors off InvariantConstants off WideVectorLines off ShowLineWidths off ShowPortDataTypes off StartTime "0.0" StopTime "10" SolverMode "SingleTasking" Solver "ode45" RelTol "1e-3" AbsTol "1e-3" Refine "1" MaxStep "0.010" 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:40:19 2000" UpdateHistory "UpdateHistoryNever" ModifiedByFormat "%" ModifiedDateFormat "%" LastModifiedDate "Tue Jan 18 20:43:31 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 "PHLOOP" Location [2, 72, 785, 552] 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 Step Name "Dist" Position [330, 71, 355, 99] BackgroundColor "cyan" DropShadow on FontName "Arial" FontSize 14 Time "5000" Before "0" After "0.000" SampleTime "0" } Block { BlockType SubSystem Name "Model" Ports [1, 3, 0, 0, 0] Position [325, 291, 410, 429] ForegroundColor "red" DropShadow on ShowName off FontName "Arial" FontSize 14 ShowPortLabels off MaskType "pH model" MaskDescription "pH plant " MaskPromptString " Tank volume V:| Inlet stream conc. ci:|control" " acid stream conc. cu:|inlet stream flow rate q:|measurement time constant a" "lpha:" MaskStyleString "edit,edit,edit,edit,edit" MaskTunableValueString "on,on,on,on,on" MaskCallbackString "||||" MaskEnableString "on,on,on,on,on" MaskVisibilityString "on,on,on,on,on" MaskInitialization "V=@1;ci=@2;cu=@3;q=@4; alpha=@5;" MaskDisplay "disp('pH model')" MaskIconFrame on MaskIconOpaque on MaskIconRotate "none" MaskIconUnits "autoscale" MaskValueString "V|ci|cu|q|alpha" System { Name "Model" Location [5, 67, 809, 564] 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 [20, 220, 40, 240] BackgroundColor "lightBlue" DropShadow on FontName "Arial" FontSize 14 Port "1" PortWidth "-1" SampleTime "-1" DataType "auto" SignalType "auto" Interpolate on } Block { BlockType Fcn Name "Fcn" Position [215, 126, 525, 174] BackgroundColor "yellow" DropShadow on ShowName off FontName "Arial" FontSize 14 Expr "u[2]*(cu-u[1])/V +q*(ci-u[1])/V" } Block { BlockType Fcn Name "Fcn1" Position [240, 268, 370, 312] BackgroundColor "yellow" DropShadow on ShowName off FontName "Arial" FontSize 14 Expr "(u[2]-u[1])/alpha" } Block { BlockType Fcn Name "Fcn2" Position [180, 377, 440, 423] BackgroundColor "yellow" DropShadow on ShowName off FontName "Arial" FontSize 14 Expr "-log10(sqrt(10^(-14)+0.25*(u[1])*(u[1]))+0." "5*u[1])" } Block { BlockType Integrator Name "Integrator" Ports [1, 1, 0, 0, 0] Position [545, 127, 585, 173] BackgroundColor "yellow" DropShadow on ShowName off FontName "Arial" FontSize 14 ExternalReset "none" InitialConditionSource "internal" InitialCondition "ci" LimitOutput off UpperSaturationLimit "inf" LowerSaturationLimit "-inf" ShowSaturationPort off ShowStatePort off AbsoluteTolerance "auto" } Block { BlockType Integrator Name "Integrator1" Ports [1, 1, 0, 0, 0] Position [410, 267, 450, 313] BackgroundColor "yellow" DropShadow on ShowName off FontName "Arial" FontSize 14 ExternalReset "none" InitialConditionSource "internal" InitialCondition "-log10(sqrt(10^(-14)+0.25*(ci)*(ci))+0.5*ci" ")" LimitOutput off UpperSaturationLimit "inf" LowerSaturationLimit "-inf" ShowSaturationPort off ShowStatePort off AbsoluteTolerance "auto" } Block { BlockType Mux Name "Mux" Ports [2, 1, 0, 0, 0] Position [140, 100, 185, 200] 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 [180, 240, 220, 340] BackgroundColor "yellow" DropShadow on ShowName off FontName "Arial" FontSize 14 Inputs "2" DisplayOption "none" } Block { BlockType Outport Name "out_1" Position [700, 140, 720, 160] BackgroundColor "green" DropShadow on FontName "Arial" FontSize 14 Port "1" OutputWhenDisabled "held" InitialOutput "0" } Block { BlockType Outport Name "out_2" Position [700, 280, 720, 300] BackgroundColor "green" DropShadow on FontName "Arial" FontSize 14 Port "2" OutputWhenDisabled "held" InitialOutput "0" } Block { BlockType Outport Name "out_3" Position [705, 390, 725, 410] BackgroundColor "green" DropShadow on FontName "Arial" FontSize 14 Port "3" OutputWhenDisabled "held" InitialOutput "0" } Line { SrcBlock "in_1" SrcPort 1 Points [40, 0; 0, -55] DstBlock "Mux" DstPort 2 } Line { SrcBlock "Integrator" SrcPort 1 Points [20, 0] Branch { DstBlock "out_1" DstPort 1 } Branch { Points [0, -75; -490, 0; 0, 40] Branch { Points [0, 10] DstBlock "Mux" DstPort 1 } Branch { Points [0, 285] DstBlock "Fcn2" DstPort 1 } } } Line { SrcBlock "Fcn2" SrcPort 1 Points [0, 0] Branch { DstBlock "out_3" DstPort 1 } Branch { Points [0, -40; -290, 0; 0, -45] DstBlock "Mux1" DstPort 2 } } Line { SrcBlock "Integrator1" SrcPort 1 Points [40, 0] Branch { DstBlock "out_2" DstPort 1 } Branch { Points [0, -70; -335, 0; 0, 45] DstBlock "Mux1" DstPort 1 } } Line { SrcBlock "Fcn1" SrcPort 1 DstBlock "Integrator1" 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 } Annotation { Position [637, 263] VerticalAlignment "top" BackgroundColor "green" Text "pm_hat" FontName "Arial" FontSize 14 } Annotation { Position [642, 373] VerticalAlignment "top" BackgroundColor "green" Text "po_hat" FontName "Arial" FontSize 14 } Annotation { Position [642, 163] VerticalAlignment "top" BackgroundColor "green" Text "co_hat" FontName "Arial" FontSize 14 } Annotation { Position [67, 202] VerticalAlignment "top" BackgroundColor "lightBlue" Text "u" FontName "Arial" FontSize 14 } } } Block { BlockType SubSystem Name "Non linear\n controller" Ports [1, 1, 0, 0, 0] Position [155, 116, 270, 194] ForegroundColor "red" DropShadow on FontName "Arial" FontSize 14 ShowPortLabels off MaskType "Controller" MaskDescription "Controller" MaskPromptString "tank volume V:|inlet stream conc. ci:|control " "stream conc. cu:|inlet stream flow rate q:|measurement tiem constant alpha:|c" "ontroller time constant beta:" MaskStyleString "edit,edit,edit,edit,edit,edit" MaskTunableValueString "on,on,on,on,on,on" MaskCallbackString "|||||" MaskEnableString "on,on,on,on,on,on" MaskVisibilityString "on,on,on,on,on,on" MaskInitialization "V=@1;ci=@2;cu=@3;q=@4;alpha=@5;beta=@6;" MaskDisplay "disp('CONTROLLER')" MaskIconFrame on MaskIconOpaque on MaskIconRotate "none" MaskIconUnits "autoscale" MaskValueString "V|ci|cu|q|alpha|beta" System { Name "Non linear\n controller" Location [38, 131, 752, 559] 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 [15, 25, 35, 45] 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 [195, 72, 520, 118] ForegroundColor "red" DropShadow on ShowName off FontName "Arial" FontSize 14 Expr "q*(ci-u[2])/(u[2]-cu)+V*log(10)*sqrt((u[2]^" "2)+4*10^(-14))*(u[1]-u[3])/(beta*(u[2]-cu))" } Block { BlockType SubSystem Name "Model" Ports [1, 2, 0, 0, 0] Position [305, 246, 415, 344] Orientation "left" ForegroundColor "red" DropShadow on ShowName off FontName "Arial" FontSize 14 ShowPortLabels off MaskType "Model" MaskDisplay "disp('MODEL')" MaskIconFrame on MaskIconOpaque on MaskIconRotate "none" MaskIconUnits "autoscale" System { Name "Model" Location [-14, 122, 790, 603] 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 [15, 165, 45, 195] ForegroundColor "blue" DropShadow on FontName "Arial" FontSize 12 FontWeight "bold" Port "1" PortWidth "-1" SampleTime "-1" DataType "auto" SignalType "auto" Interpolate on } Block { BlockType Fcn Name "Fcn" Position [205, 129, 435, 181] BackgroundColor "yellow" DropShadow on ShowName off FontName "Arial" FontSize 14 Expr "u[2]*(cu-u[1])/V +q*(ci-u[1])/V" } Block { BlockType Fcn Name "Fcn1" Position [230, 273, 335, 317] BackgroundColor "yellow" DropShadow on ShowName off FontName "Arial" FontSize 14 Expr "(u[2]-u[1])/alpha" } Block { BlockType Fcn Name "Fcn2" Position [170, 392, 430, 438] BackgroundColor "yellow" DropShadow on ShowName off FontName "Arial" FontSize 14 Expr "-log10(sqrt(10^(-14)+0.25*(u[1])*(u[1])" ")+0.5*u[1])" } Block { BlockType Integrator Name "Integrator" Ports [1, 1, 0, 0, 0] Position [470, 132, 510, 178] BackgroundColor "yellow" DropShadow on ShowName off FontName "Arial" FontSize 14 ExternalReset "none" InitialConditionSource "internal" InitialCondition "ci" LimitOutput off UpperSaturationLimit "inf" LowerSaturationLimit "-inf" ShowSaturationPort off ShowStatePort off AbsoluteTolerance "auto" } Block { BlockType Integrator Name "Integrator1" Ports [1, 1, 0, 0, 0] Position [400, 272, 440, 318] BackgroundColor "yellow" DropShadow on ShowName off FontName "Arial" FontSize 14 ExternalReset "none" InitialConditionSource "internal" InitialCondition "-log10(sqrt(10^(-14)+0.25*(ci)*(ci))+0." "5*abs(ci))" LimitOutput off UpperSaturationLimit "inf" LowerSaturationLimit "-inf" ShowSaturationPort off ShowStatePort off AbsoluteTolerance "auto" } Block { BlockType Mux Name "Mux" Ports [2, 1, 0, 0, 0] Position [130, 105, 175, 205] 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 [170, 245, 210, 345] BackgroundColor "yellow" DropShadow on ShowName off FontName "Arial" FontSize 14 Inputs "2" DisplayOption "none" } Block { BlockType Outport Name "out_1" Position [650, 142, 675, 168] BackgroundColor "green" DropShadow on FontName "Arial" FontSize 12 FontWeight "bold" Port "1" OutputWhenDisabled "held" InitialOutput "0" } Block { BlockType Outport Name "out_2" Position [635, 391, 665, 419] BackgroundColor "green" DropShadow on FontName "Arial" FontSize 12 FontWeight "bold" Port "2" OutputWhenDisabled "held" InitialOutput "0" } Line { SrcBlock "in_1" SrcPort 1 DstBlock "Mux" DstPort 2 } Line { SrcBlock "Integrator" SrcPort 1 Points [85, 1] Branch { DstBlock "out_1" DstPort 1 } Branch { Points [0, -76; -515, 0; 0, 40] Branch { Points [0, 10] DstBlock "Mux" DstPort 1 } Branch { Points [0, 295] DstBlock "Fcn2" DstPort 1 } } } Line { SrcBlock "Fcn2" SrcPort 1 Points [0, -10] Branch { DstBlock "out_2" DstPort 1 } Branch { Points [55, 0; 0, -40; -370, 0; 0, -45] DstBlock "Mux1" DstPort 2 } } Line { SrcBlock "Integrator1" SrcPort 1 Points [40, 0; 0, -70; -360, 0; 0, 45] DstBlock "Mux1" DstPort 1 } Line { SrcBlock "Fcn1" SrcPort 1 DstBlock "Integrator1" 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 } Annotation { Position [652, 363] VerticalAlignment "top" BackgroundColor "green" Text "po_hat" FontName "Arial" FontSize 12 FontWeight "bold" } Annotation { Position [667, 113] VerticalAlignment "top" BackgroundColor "green" Text "co_hat" FontName "Arial" FontSize 12 FontWeight "bold" } Annotation { Position [37, 142] VerticalAlignment "top" ForegroundColor "yellow" BackgroundColor "blue" Text "u" FontName "Arial" FontSize 12 FontWeight "bold" } Annotation { Position [547, 268] VerticalAlignment "top" BackgroundColor "green" Text "pm_hat" FontName "Arial" FontSize 12 FontWeight "bold" } } } Block { BlockType Mux Name "Mux" Ports [3, 1, 0, 0, 0] Position [105, 3, 165, 187] ForegroundColor "red" DropShadow on ShowName off FontName "Arial" FontSize 14 Inputs "3" DisplayOption "none" } Block { BlockType Outport Name "out_1" Position [635, 85, 655, 105] ForegroundColor "green" DropShadow on FontName "Arial" FontSize 14 Port "1" OutputWhenDisabled "held" InitialOutput "0" } Line { SrcBlock "Mux" SrcPort 1 DstBlock "Fcn" DstPort 1 } Line { SrcBlock "in_1" SrcPort 1 DstBlock "Mux" DstPort 1 } Line { SrcBlock "Model" SrcPort 1 Points [-260, 0; 0, -175] DstBlock "Mux" DstPort 2 } Line { SrcBlock "Model" SrcPort 2 Points [-240, 0; 0, -165] DstBlock "Mux" DstPort 3 } Line { SrcBlock "Fcn" SrcPort 1 Points [65, 0] Branch { DstBlock "out_1" DstPort 1 } Branch { Points [0, 200] DstBlock "Model" DstPort 1 } } } } Block { BlockType SubSystem Name "Plant" Ports [2, 3, 0, 0, 0] Position [400, 51, 485, 189] BackgroundColor "yellow" DropShadow on ShowName off FontName "Arial" FontSize 14 ShowPortLabels off MaskType "pH plant" MaskDescription "pH plant " MaskPromptString " Tank volume V:| Inlet stream conc. ci:|control" " acid stream conc. cu:|inlet stream flow rate q:|measurement time constant a" "lpha:" MaskStyleString "edit,edit,edit,edit,edit" MaskTunableValueString "on,on,on,on,on" MaskCallbackString "||||" MaskEnableString "on,on,on,on,on" MaskVisibilityString "on,on,on,on,on" MaskInitialization "V=@1;ci=@2;cu=@3;q=@4; alpha=@5;" MaskDisplay "disp('pH plant')" MaskIconFrame on MaskIconOpaque on MaskIconRotate "none" MaskIconUnits "autoscale" MaskValueString "V|ci|cu|q|alpha" System { Name "Plant" Location [-12, 90, 792, 574] 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 [15, 140, 35, 160] BackgroundColor "lightBlue" DropShadow on FontName "Arial" FontSize 14 Port "1" PortWidth "-1" SampleTime "-1" DataType "auto" SignalType "auto" Interpolate on } Block { BlockType Inport Name "in_2" Position [15, 235, 35, 255] BackgroundColor "lightBlue" DropShadow on FontName "Arial" FontSize 14 Port "2" PortWidth "-1" SampleTime "-1" DataType "auto" SignalType "auto" Interpolate on } Block { BlockType Fcn Name "Fcn" Position [215, 126, 525, 174] BackgroundColor "yellow" DropShadow on ShowName off FontName "Arial" FontSize 14 Expr "u[3]*(cu-u[1])/V +q*(ci-u[1]+u[2])/V" } Block { BlockType Fcn Name "Fcn1" Position [255, 268, 360, 312] BackgroundColor "yellow" DropShadow on ShowName off FontName "Arial" FontSize 14 Expr "(u[2]-u[1])/alpha" } Block { BlockType Fcn Name "Fcn2" Position [180, 377, 440, 423] BackgroundColor "yellow" DropShadow on ShowName off FontName "Arial" FontSize 14 Expr "-log10(sqrt(10^(-14)+0.25*(u[1])*(u[1]))+0." "5*u[1])" } Block { BlockType Integrator Name "Integrator" Ports [1, 1, 0, 0, 0] Position [550, 127, 590, 173] BackgroundColor "yellow" DropShadow on ShowName off FontName "Arial" FontSize 14 ExternalReset "none" InitialConditionSource "internal" InitialCondition "ci" LimitOutput off UpperSaturationLimit "inf" LowerSaturationLimit "-inf" ShowSaturationPort off ShowStatePort off AbsoluteTolerance "auto" } Block { BlockType Integrator Name "Integrator1" Ports [1, 1, 0, 0, 0] Position [410, 267, 450, 313] BackgroundColor "yellow" DropShadow on ShowName off FontName "Arial" FontSize 14 ExternalReset "none" InitialConditionSource "internal" InitialCondition "-log10(sqrt(10^(-14)+0.25*(ci)*(ci))+0.5*ci" ")" LimitOutput off UpperSaturationLimit "inf" LowerSaturationLimit "-inf" ShowSaturationPort off ShowStatePort off AbsoluteTolerance "auto" } Block { BlockType Mux Name "Mux" Ports [3, 1, 0, 0, 0] Position [140, 100, 185, 200] BackgroundColor "yellow" DropShadow on ShowName off FontName "Arial" FontSize 14 Inputs "3" DisplayOption "none" } Block { BlockType Mux Name "Mux1" Ports [2, 1, 0, 0, 0] Position [180, 240, 220, 340] BackgroundColor "yellow" DropShadow on ShowName off FontName "Arial" FontSize 14 Inputs "2" DisplayOption "none" } Block { BlockType Outport Name "out_1" Position [645, 140, 665, 160] BackgroundColor "green" DropShadow on FontName "Arial" FontSize 14 Port "1" OutputWhenDisabled "held" InitialOutput "0" } Block { BlockType Outport Name "out_2" Position [665, 280, 685, 300] BackgroundColor "green" DropShadow on FontName "Arial" FontSize 14 Port "2" OutputWhenDisabled "held" InitialOutput "0" } Block { BlockType Outport Name "out_3" Position [645, 390, 665, 410] BackgroundColor "green" DropShadow on FontName "Arial" FontSize 14 Port "3" OutputWhenDisabled "held" InitialOutput "0" } Line { SrcBlock "in_2" SrcPort 1 Points [40, 0; 0, -60] DstBlock "Mux" DstPort 3 } Line { SrcBlock "in_1" SrcPort 1 DstBlock "Mux" DstPort 2 } Line { SrcBlock "Mux" SrcPort 1 DstBlock "Fcn" DstPort 1 } Line { SrcBlock "Fcn" SrcPort 1 DstBlock "Integrator" DstPort 1 } Line { SrcBlock "Integrator" SrcPort 1 Points [15, 0] Branch { DstBlock "out_1" DstPort 1 } Branch { Points [0, -75; -515, 0; 0, 40] Branch { DstBlock "Mux" DstPort 1 } Branch { Points [0, 285] DstBlock "Fcn2" DstPort 1 } } } Line { SrcBlock "Mux1" SrcPort 1 DstBlock "Fcn1" DstPort 1 } Line { SrcBlock "Fcn1" SrcPort 1 DstBlock "Integrator1" DstPort 1 } Line { SrcBlock "Integrator1" SrcPort 1 Points [40, 0] Branch { DstBlock "out_2" DstPort 1 } Branch { Points [0, -70; -360, 0; 0, 45] DstBlock "Mux1" DstPort 1 } } Line { SrcBlock "Fcn2" SrcPort 1 Points [0, 0] Branch { DstBlock "out_3" DstPort 1 } Branch { Points [25, 0; 0, -40; -340, 0; 0, -45] DstBlock "Mux1" DstPort 2 } } Annotation { Position [52, 117] VerticalAlignment "top" BackgroundColor "lightBlue" Text "d" FontName "Arial" FontSize 14 } Annotation { Position [52, 287] VerticalAlignment "top" BackgroundColor "lightBlue" Text "u" FontName "Arial" FontSize 14 } Annotation { Position [627, 258] VerticalAlignment "top" BackgroundColor "green" Text "pm" FontName "Arial" FontSize 14 } Annotation { Position [617, 373] VerticalAlignment "top" BackgroundColor "green" Text "po" FontName "Arial" FontSize 14 } Annotation { Position [647, 113] VerticalAlignment "top" BackgroundColor "green" Text "co" FontName "Arial" FontSize 14 } } } Block { BlockType Step Name "Ref" Position [25, 126, 50, 154] BackgroundColor "cyan" DropShadow on FontName "Arial" FontSize 14 Time "2" Before "11" After "5" SampleTime "0" } Block { BlockType Scope Name "Scope" Ports [1, 0, 0, 0, 0] Position [535, 209, 580, 261] BackgroundColor "green" DropShadow on ShowName off FontName "Arial" FontSize 14 Floating off Location [19, 120, 809, 434] Open off NumInputPorts "1" TickLabels "on" ZoomMode "on" List { ListType AxesTitles axes1 "%" } Grid "on" TimeRange "10" YMin "0" YMax "14" SaveToWorkspace off SaveName "ScopeData" DataFormat "Matrix" LimitMaxRows on MaxRows "5000" Decimation "1" SampleInput off SampleTime "0" } Block { BlockType Scope Name "Scope2" Ports [1, 0, 0, 0, 0] Position [695, 85, 745, 155] BackgroundColor "green" DropShadow on ShowName off FontName "Arial" FontSize 14 Floating off Location [6, 280, 796, 594] Open off NumInputPorts "1" TickLabels "on" ZoomMode "on" List { ListType AxesTitles axes1 "%" } Grid "on" TimeRange "10" YMin "0" YMax "14" 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 [621, 375, 674, 400] Orientation "down" 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 [95, 128, 120, 177] ForegroundColor "red" DropShadow on ShowName off FontName "Arial" FontSize 14 IconShape "rectangular" Inputs "+-" SaturateOnIntegerOverflow on } Block { BlockType ToWorkspace Name "To Workspace1" Position [650, 36, 710, 64] BackgroundColor "green" DropShadow on ShowName off FontName "Arial" FontSize 14 VariableName "pm" Buffer "10000" Decimation "1" SampleTime "0" SaveFormat "Matrix" } Block { BlockType ToWorkspace Name "To Workspace2" Position [530, 151, 590, 179] BackgroundColor "green" DropShadow on ShowName off FontName "Arial" FontSize 14 VariableName "po" Buffer "10000" Decimation "1" SampleTime "0" SaveFormat "Matrix" } Block { BlockType ToWorkspace Name "To Workspace3" Position [525, 390, 585, 420] BackgroundColor "green" DropShadow on ShowName off FontName "Arial" FontSize 14 VariableName "po_hat" Buffer "10000" Decimation "1" SampleTime "0" SaveFormat "Matrix" } Block { BlockType ToWorkspace Name "To Workspace4" Position [515, 301, 575, 329] BackgroundColor "green" DropShadow on ShowName off FontName "Arial" FontSize 14 VariableName "co_hat" Buffer "10000" Decimation "1" SampleTime "0" SaveFormat "Matrix" } Block { BlockType ToWorkspace Name "To Workspace5" Position [520, 61, 580, 89] BackgroundColor "green" DropShadow on ShowName off FontName "Arial" FontSize 14 VariableName "co" Buffer "10000" Decimation "1" SampleTime "0" SaveFormat "Matrix" } Block { BlockType ToWorkspace Name "To Workspace6" Position [330, 197, 375, 223] BackgroundColor "green" DropShadow on ShowName off FontName "Arial" FontSize 14 VariableName "u" Buffer "10000" Decimation "1" SampleTime "0" SaveFormat "Matrix" } Line { SrcBlock "Model" SrcPort 2 DstBlock "Sum" DstPort 1 } Line { SrcBlock "Model" SrcPort 3 DstBlock "To Workspace3" DstPort 1 } Line { SrcBlock "Model" SrcPort 1 DstBlock "To Workspace4" DstPort 1 } Line { SrcBlock "Ref" SrcPort 1 DstBlock "Sum1" DstPort 1 } Line { SrcBlock "Plant" SrcPort 1 DstBlock "To Workspace5" DstPort 1 } Line { SrcBlock "Sum1" SrcPort 1 DstBlock "Non linear\n controller" DstPort 1 } Line { SrcBlock "Sum" SrcPort 1 Points [0, 55; -580, 0; 0, -295] DstBlock "Sum1" DstPort 2 } Line { SrcBlock "Dist" SrcPort 1 DstBlock "Plant" DstPort 1 } Line { SrcBlock "Non linear\n controller" SrcPort 1 Points [20, 0] Branch { DstBlock "Plant" DstPort 2 } Branch { Points [0, 55] Branch { Points [0, 150] DstBlock "Model" DstPort 1 } Branch { DstBlock "To Workspace6" DstPort 1 } } } Line { SrcBlock "Plant" SrcPort 3 Points [10, 0] Branch { DstBlock "To Workspace2" DstPort 1 } Branch { Points [0, 70] DstBlock "Scope" DstPort 1 } } Line { SrcBlock "Plant" SrcPort 2 Points [130, 0] Branch { Points [0, -70] DstBlock "To Workspace1" DstPort 1 } Branch { Points [55, 0] Branch { DstBlock "Scope2" DstPort 1 } Branch { Points [-15, 0] DstBlock "Sum" DstPort 2 } } } Annotation { Position [467, 341] VerticalAlignment "top" ForegroundColor "darkGreen" Text "pm_hat" FontName "Arial" FontSize 14 } Annotation { Position [432, 517] VerticalAlignment "top" ForegroundColor "blue" Text "pH CONTROL USING APPROXIMATE NONLINEAR INVERSIO" "N" DropShadow on FontName "Arial" FontSize 14 } Annotation { Position [447, 562] VerticalAlignment "top" ForegroundColor "red" Text "Before running the simulation, the user must lo" "ad MATLAB data file phloop.mat " FontName "Arial" FontSize 14 } } }