Model { Name "osa" Version 2.09 SimParamPage WorkspaceI/O SampleTimeColors off InvariantConstants off WideVectorLines off ShowLineWidths off PaperOrientation landscape PaperType usletter PaperUnits inches StartTime "0.0" StopTime "600" Solver ode4 RelTol "1e-3" AbsTol "1e-3" Refine "1" MaxStep "0.05" InitialStep "auto" FixedStep "0.05" MaxOrder 5 OutputOption RefineOutputTimes OutputTimes "[]" LoadExternalInput off ExternalInput "[t, u]" SaveTime on TimeSaveName "tout" SaveState off StateSaveName "xout" SaveOutput off OutputSaveName "yout" LoadInitialState off InitialState "xInitial" SaveFinalState off FinalStateName "xFinal" LimitMaxRows off MaxRows "1000" Decimation "10" AlgebraicLoopMsg warning 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 "osa" Location [20, 64, 664, 693] Open on ScreenColor white Block { BlockType Constant Name "Arousal \nThreshold (L/min)" Position [150, 450, 170, 470] Value "25" } Block { BlockType Constant Name "Arousal Threshold (mm Hg)" Position [455, 575, 475, 595] Value "55" } Block { BlockType ToWorkspace Name "Arterial PCO2" Position [550, 435, 610, 465] VariableName "PaCO2" Buffer "inf" Decimation "1" SampleTime "0.5" } Block { BlockType Reference Name "Central\nChemoreflex" Ports [1, 1, 0, 0, 0] Position [385, 361, 430, 399] Orientation left SourceBlock "simulink_extras/Additional\nLinear/Transfer " "Fcn\n(with initial outputs)" SourceType "Transfer Function with Initial Outputs" N "[1]" D "[100 1]" Y0 "0" U0 "0" } Block { BlockType Reference Name "Central\nChemoreflex1" Ports [1, 1, 0, 0, 0] Position [385, 286, 430, 324] Orientation left SourceBlock "simulink_extras/Additional\nLinear/Transfer " "Fcn\n(with initial outputs)" SourceType "Transfer Function with Initial Outputs" N "[1]" D "[5 1]" Y0 "0" U0 "0" } Block { BlockType Gain Name "Central Gain" Position [320, 365, 350, 395] Orientation left Gain "2" } Block { BlockType TransportDelay Name "Circulatory\nDelay" Position [535, 310, 575, 340] Orientation left DelayTime "6" InitialInput "40.7172" BufferSize "5140" } Block { BlockType Gain Name "Gain" Position [175, 35, 205, 65] Gain "-7" } Block { BlockType SubSystem Name "Gas Exchange" Ports [1, 1, 0, 0, 0] Position [475, 174, 575, 236] ShowPortLabels on System { Name "Gas Exchange" Location [122, 245, 711, 673] Open off ScreenColor white Block { BlockType Inport Name "Ventilation" Position [65, 240, 85, 260] Port "1" PortWidth "-1" SampleTime "-1" } Block { BlockType Gain Name "1/60/VL" Position [405, 286, 465, 314] Gain "1/150" } Block { BlockType Gain Name "863*Q*Kco2*60" Position [180, 166, 240, 194] Orientation left Gain "33.657" } Block { BlockType Reference Name "Body Tissues\nCompartment)" Ports [1, 1, 0, 0, 0] Position [270, 57, 330, 93] SourceBlock "simulink_extras/Additional\nLinear/Transfer " "Fcn\n(with initial outputs)" SourceType "Transfer Function with Initial Outputs" N "[1]" D "[150 1]" Y0 "46.4" U0 "46.4" } Block { BlockType Constant Name "Dead Space\nVentilation" Position [70, 310, 110, 330] Value "2.25" } Block { BlockType Integrator Name "Integrator" Ports [1, 1, 0, 0, 0] Position [485, 285, 515, 315] ExternalReset none InitialConditionSource internal InitialCondition "40.7172" LimitOutput off UpperSaturationLimit "80" LowerSaturationLimit "10" ShowSaturationPort off ShowStatePort off AbsoluteTolerance "auto" } Block { BlockType Constant Name "MRco2/Kco2/Q" Position [85, 79, 135, 101] Value "5.4" } Block { BlockType Product Name "Product" Ports [2, 1, 0, 0, 0] Position [255, 287, 285, 318] Inputs "2" } Block { BlockType Sum Name "Sum" Ports [2, 1, 0, 0, 0] Position [160, 277, 190, 308] Inputs "+-" } Block { BlockType Sum Name "Sum1" Ports [2, 1, 0, 0, 0] Position [330, 282, 360, 313] Inputs "+-" } Block { BlockType Sum Name "Sum2" Ports [2, 1, 0, 0, 0] Position [185, 57, 215, 88] Inputs "++" } Block { BlockType Sum Name "Sum3" Ports [2, 1, 0, 0, 0] Position [290, 162, 320, 193] Orientation left Inputs "+-" } Block { BlockType Outport Name "PaCO2" Position [465, 225, 485, 245] Orientation left Port "1" OutputWhenDisabled held InitialOutput "0" } Line { SrcBlock "Sum" SrcPort 1 DstBlock "Product" DstPort 1 } Line { SrcBlock "Dead Space\nVentilation" SrcPort 1 Points [15, 0; 0, -20] DstBlock "Sum" DstPort 2 } Line { SrcBlock "Product" SrcPort 1 DstBlock "Sum1" DstPort 2 } Line { SrcBlock "Sum1" SrcPort 1 DstBlock "1/60/VL" DstPort 1 } Line { SrcBlock "1/60/VL" SrcPort 1 DstBlock "Integrator" DstPort 1 } Line { SrcBlock "Ventilation" SrcPort 1 Points [0, 35] DstBlock "Sum" DstPort 1 } Line { SrcBlock "Integrator" SrcPort 1 Points [10, 0] Branch { Points [10, 0; 0, 15] Branch { Points [0, 70; -320, 0; 0, -75] DstBlock "Product" DstPort 2 } Branch { Points [15, 0; 0, -295; -400, 0; 0, 45] DstBlock "Sum2" DstPort 1 } } Branch { Points [0, -35] Branch { Points [0, -30] DstBlock "PaCO2" DstPort 1 } Branch { Points [-150, 0; 0, -80] DstBlock "Sum3" DstPort 2 } } } Line { SrcBlock "Sum2" SrcPort 1 DstBlock "Body Tissues\nCompartment)" DstPort 1 } Line { SrcBlock "MRco2/Kco2/Q" SrcPort 1 Points [30, 0] DstBlock "Sum2" DstPort 2 } Line { SrcBlock "Body Tissues\nCompartment)" SrcPort 1 Points [45, 0; 0, 95] DstBlock "Sum3" DstPort 1 } Line { SrcBlock "Sum3" SrcPort 1 DstBlock "863*Q*Kco2*60" DstPort 1 } Line { SrcBlock "863*Q*Kco2*60" SrcPort 1 Points [-30, 0; 0, 55; 150, 0; 0, 55] DstBlock "Sum1" DstPort 1 } } } Block { BlockType Integrator Name "Integrator\n(Reset to zero\nby arousal)" Ports [2, 1, 0, 0, 0] Position [120, 137, 150, 168] ExternalReset rising InitialConditionSource internal InitialCondition "0" LimitOutput off UpperSaturationLimit "inf" LowerSaturationLimit "-inf" ShowSaturationPort off ShowStatePort off AbsoluteTolerance "auto" } Block { BlockType Logic Name "Logical\nOperator" Ports [2, 1, 0, 0, 0] Position [75, 502, 105, 533] Orientation left Operator OR Inputs "2" } Block { BlockType Math Name "Math\nFunction" Ports [1, 1, 0, 0, 0] Position [125, 35, 155, 65] Operator reciprocal } Block { BlockType Scope Name "PaCO2" Ports [1, 0, 0, 0, 0] Position [565, 495, 595, 525] Floating off Location [687, 284, 1011, 503] Open on Grid on TickLabels on ZoomMode on TimeRange "auto" YMin "20" YMax "70" SaveToWorkspace off SaveName "ScopeData" LimitMaxRows off MaxRows "5000" Decimation "1" SampleInput off SampleTime "0" } Block { BlockType Gain Name "Peripheral\nGain" Position [315, 291, 340, 319] Orientation left Gain "0.5" } Block { BlockType RelationalOperator Name "Relational\nOperator" Position [445, 502, 475, 533] Orientation left Operator > } Block { BlockType RelationalOperator Name "Relational\nOperator1" Position [140, 387, 170, 418] Orientation left Operator > } Block { BlockType Constant Name "Resting\nPaCO2" Position [460, 397, 495, 423] Value "40.63" } Block { BlockType Constant Name "Resting Ventilation" Position [245, 435, 275, 455] Value "6.74" } Block { BlockType Scope Name "S" Ports [1, 0, 0, 0, 0] Position [310, 95, 340, 125] Floating off Location [689, 523, 1013, 762] Open on Grid on TickLabels on ZoomMode on TimeRange "auto" YMin "-10" YMax "5" SaveToWorkspace off SaveName "ScopeData" LimitMaxRows off MaxRows "5000" Decimation "1" SampleInput off SampleTime "0" } Block { BlockType Saturate Name "Saturation" Position [180, 110, 210, 140] UpperLimit "0" LowerLimit "-7" } Block { BlockType Saturate Name "Saturation1" Position [275, 190, 305, 220] UpperLimit "inf" LowerLimit "0" } Block { BlockType SubSystem Name "State-dependent\nUpper Airway" Ports [2, 1, 0, 0, 0] Position [350, 172, 410, 223] ShowPortLabels on System { Name "State-dependent\nUpper Airway" Location [190, 149, 713, 445] Open off ScreenColor white Block { BlockType Inport Name "State-related\nDrive" Position [35, 58, 65, 72] Port "1" PortWidth "-1" SampleTime "-1" } Block { BlockType Inport Name "Respiratory\nDrive" Position [55, 213, 85, 227] Port "2" PortWidth "-1" SampleTime "-1" } Block { BlockType Constant Name "Constant" Position [105, 130, 125, 150] Value "1" } Block { BlockType Product Name "Product" Ports [2, 1, 0, 0, 0] Position [370, 162, 400, 193] Inputs "2" } Block { BlockType Saturate Name "Saturation" Position [260, 60, 290, 90] UpperLimit "1" LowerLimit "0" } Block { BlockType Sum Name "Sum" Ports [2, 1, 0, 0, 0] Position [205, 57, 235, 88] Inputs "++" } Block { BlockType Reference Name "Upper airway sensitivity \nto State" Ports [1, 1, 0, 0, 0] Position [120, 49, 170, 81] SourceBlock "simulink/Linear/Slider\nGain" SourceType "Slider Gain" low "0" gain "0.143" high "0.143" } Block { BlockType Outport Name "Airflow" Position [455, 143, 485, 157] Port "1" OutputWhenDisabled held InitialOutput "0" } Line { SrcBlock "Constant" SrcPort 1 Points [50, 0; 0, -60] DstBlock "Sum" DstPort 2 } Line { SrcBlock "Upper airway sensitivity \nto State" SrcPort 1 DstBlock "Sum" DstPort 1 } Line { SrcBlock "Respiratory\nDrive" SrcPort 1 Points [0, -35] DstBlock "Product" DstPort 2 } Line { SrcBlock "Product" SrcPort 1 Points [0, -30] DstBlock "Airflow" DstPort 1 } Line { SrcBlock "State-related\nDrive" SrcPort 1 DstBlock "Upper airway sensitivity \nto State" DstPort 1 } Line { SrcBlock "Sum" SrcPort 1 DstBlock "Saturation" DstPort 1 } Line { SrcBlock "Saturation" SrcPort 1 Points [35, 0; 0, 95] DstBlock "Product" DstPort 1 } Annotation { Position [371, 101] Text "Upper Airway\n\nConductance" } } } Block { BlockType ToWorkspace Name "State-related\nDrive" Position [290, 25, 350, 55] VariableName "S" Buffer "inf" Decimation "1" SampleTime "0.5" } Block { BlockType Sum Name "Sum" Ports [2, 1, 0, 0, 0] Position [470, 307, 500, 338] Orientation left Inputs "+-" } Block { BlockType Sum Name "Sum of\nChemical\nand State \nDrives\n" Ports [2, 1, 0, 0, 0] Position [225, 182, 245, 218] Inputs "++" } Block { BlockType Sum Name "Total\nChemoreflex\nOutput\n" Ports [3, 1, 0, 0, 0] Position [240, 331, 260, 369] Orientation left Inputs "+++" } Block { BlockType ToWorkspace Name "Vent" Position [465, 60, 525, 90] VariableName "Ve" Buffer "inf" Decimation "1" SampleTime "0.5" } Block { BlockType Scope Name "Ventilation" Ports [1, 0, 0, 0, 0] Position [540, 125, 570, 155] Floating off Location [686, 30, 1010, 269] Open on Grid on TickLabels on ZoomMode on TimeRange "auto" YMin "0" YMax "30" SaveToWorkspace off SaveName "ScopeData" LimitMaxRows off MaxRows "5000" Decimation "1" SampleInput off SampleTime "0" } Block { BlockType Constant Name "Wake-to-sleep\nTransition Time\n(secs)" Position [35, 40, 55, 60] Value "60" } Line { SrcBlock "Sum" SrcPort 1 Points [-5, 0] Branch { Points [0, -20] DstBlock "Central\nChemoreflex1" DstPort 1 } Branch { Points [-5, 0; 0, 55] DstBlock "Central\nChemoreflex" DstPort 1 } } Line { SrcBlock "Central\nChemoreflex1" SrcPort 1 DstBlock "Peripheral\nGain" DstPort 1 } Line { SrcBlock "Wake-to-sleep\nTransition Time\n(secs)" SrcPort 1 DstBlock "Math\nFunction" DstPort 1 } Line { SrcBlock "Central\nChemoreflex" SrcPort 1 DstBlock "Central Gain" DstPort 1 } Line { SrcBlock "Circulatory\nDelay" SrcPort 1 Points [-5, 0] Branch { Points [-10, 0] DstBlock "Sum" DstPort 1 } Branch { Points [0, 125; 5, 0] Branch { DstBlock "Arterial PCO2" DstPort 1 } Branch { Points [0, 60] Branch { DstBlock "PaCO2" DstPort 1 } Branch { DstBlock "Relational\nOperator" DstPort 1 } } } } Line { SrcBlock "Gas Exchange" SrcPort 1 Points [15, 0; 0, 120] DstBlock "Circulatory\nDelay" DstPort 1 } Line { SrcBlock "State-dependent\nUpper Airway" SrcPort 1 Points [20, 0] Branch { Points [0, -60; 10, 0] Branch { Points [0, -65] DstBlock "Vent" DstPort 1 } Branch { DstBlock "Ventilation" DstPort 1 } } Branch { Points [25, 0] DstBlock "Gas Exchange" DstPort 1 } } Line { SrcBlock "Central Gain" SrcPort 1 Points [-30, 0; 0, -30] DstBlock "Total\nChemoreflex\nOutput\n" DstPort 2 } Line { SrcBlock "Peripheral\nGain" SrcPort 1 Points [-35, 0] DstBlock "Total\nChemoreflex\nOutput\n" DstPort 1 } Line { SrcBlock "Integrator\n(Reset to zero\nby arousal)" SrcPort 1 Points [0, -30] DstBlock "Saturation" DstPort 1 } Line { SrcBlock "Saturation" SrcPort 1 Points [15, 0; 0, 25] Branch { Points [0, 20; -35, 0; 0, 20] DstBlock "Sum of\nChemical\nand State \nDrives\n" DstPort 1 } Branch { Points [45, 0] Branch { Points [0, -40] Branch { DstBlock "State-related\nDrive" DstPort 1 } Branch { DstBlock "S" DstPort 1 } } Branch { Points [15, 0; 0, 35] DstBlock "State-dependent\nUpper Airway" DstPort 1 } } } Line { SrcBlock "Resting\nPaCO2" SrcPort 1 Points [15, 0] DstBlock "Sum" DstPort 2 } Line { SrcBlock "Resting Ventilation" SrcPort 1 Points [0, -85] DstBlock "Total\nChemoreflex\nOutput\n" DstPort 3 } Line { SrcBlock "Math\nFunction" SrcPort 1 DstBlock "Gain" DstPort 1 } Line { SrcBlock "Gain" SrcPort 1 Points [10, 0; 0, 45; -80, 0; 0, 15; -60, 0; 0, 35] DstBlock "Integrator\n(Reset to zero\nby arousal)" DstPort 1 } Line { SrcBlock "Logical\nOperator" SrcPort 1 Points [-20, 0; 0, -360] DstBlock "Integrator\n(Reset to zero\nby arousal)" DstPort 2 } Line { SrcBlock "Sum of\nChemical\nand State \nDrives\n" SrcPort 1 Points [0, 5] DstBlock "Saturation1" DstPort 1 } Line { SrcBlock "Arousal Threshold (mm Hg)" SrcPort 1 Points [25, 0; 0, -60] DstBlock "Relational\nOperator" DstPort 2 } Line { SrcBlock "Arousal \nThreshold (L/min)" SrcPort 1 Points [15, 0; 0, -50] DstBlock "Relational\nOperator1" DstPort 2 } Line { SrcBlock "Relational\nOperator1" SrcPort 1 Points [-15, 0] DstBlock "Logical\nOperator" DstPort 1 } Line { SrcBlock "Relational\nOperator" SrcPort 1 Points [-320, 0] DstBlock "Logical\nOperator" DstPort 2 } Line { SrcBlock "Saturation1" SrcPort 1 Points [0, 5] DstBlock "State-dependent\nUpper Airway" DstPort 2 } Line { SrcBlock "Total\nChemoreflex\nOutput\n" SrcPort 1 Points [-40, 0] Branch { Points [0, -140] DstBlock "Sum of\nChemical\nand State \nDrives\n" DstPort 2 } Branch { Points [0, 45] DstBlock "Relational\nOperator1" DstPort 1 } } Annotation { Position [582, 367] VerticalAlignment top Text "." } } }