Model { Name "cruise_ctrl" Version 7.0 MdlSubVersion 0 GraphicalInterface { NumRootInports 0 NumRootOutports 0 ParameterArgumentNames "" ComputedModelVersion "1.19" NumModelReferences 0 NumTestPointedSignals 0 } SavedCharacterEncoding "windows-1252" PreLoadFcn "m = 1000;\nalpha = [40, 25, 16, 12, 10];\nTm = 190;\nwm = 420;\nbeta = 0.4;\nCr = 0.01;\nrho = 1.3;\nCd = 0.32;\nA = 2.4;\ng = 9.8;\ntheta = 0;\ngear = 3;" SaveDefaultBlockParams on SampleTimeColors off LibraryLinkDisplay "none" WideLines off ShowLineDimensions off ShowPortDataTypes off ShowLoopsOnError on IgnoreBidirectionalLines off ShowStorageClass off ShowTestPointIcons on ShowViewerIcons on SortedOrder off ExecutionContextIcon off ShowLinearizationAnnotations on ScopeRefreshTime 0.035000 OverrideScopeRefreshTime on DisableAllScopes off DataTypeOverride "UseLocalSettings" MinMaxOverflowLogging "UseLocalSettings" MinMaxOverflowArchiveMode "Overwrite" BlockNameDataTip off BlockParametersDataTip off BlockDescriptionStringDataTip off ToolBar on StatusBar on BrowserShowLibraryLinks off BrowserLookUnderMasks off Created "Sat Feb 02 14:45:55 2008" Creator "Cole Lepine" UpdateHistory "UpdateHistoryNever" ModifiedByFormat "%" LastModifiedBy "Cole Lepine" ModifiedDateFormat "%" LastModifiedDate "Tue Feb 12 15:24:53 2008" RTWModifiedTimeStamp 0 ModelVersionFormat "1.%" ConfigurationManager "None" SimulationMode "normal" LinearizationMsg "none" Profile off ParamWorkspaceSource "MATLABWorkspace" AccelSystemTargetFile "accel.tlc" AccelTemplateMakefile "accel_default_tmf" AccelMakeCommand "make_rtw" TryForcingSFcnDF off RecordCoverage off CovPath "/" CovSaveName "covdata" CovMetricSettings "dw" CovNameIncrementing off CovHtmlReporting on covSaveCumulativeToWorkspaceVar on CovSaveSingleToWorkspaceVar on CovCumulativeVarName "covCumulativeData" CovCumulativeReport off CovReportOnPause on ExtModeBatchMode off ExtModeEnableFloating on ExtModeTrigType "manual" ExtModeTrigMode "normal" ExtModeTrigPort "1" ExtModeTrigElement "any" ExtModeTrigDuration 1000 ExtModeTrigDurationFloating "auto" ExtModeTrigHoldOff 0 ExtModeTrigDelay 0 ExtModeTrigDirection "rising" ExtModeTrigLevel 0 ExtModeArchiveMode "off" ExtModeAutoIncOneShot off ExtModeIncDirWhenArm off ExtModeAddSuffixToVar off ExtModeWriteAllDataToWs off ExtModeArmWhenConnect on ExtModeSkipDownloadWhenConnect off ExtModeLogAll on ExtModeAutoUpdateStatusClock on BufferReuse on ShowModelReferenceBlockVersion off ShowModelReferenceBlockIO off Array { Type "Handle" Dimension 1 Simulink.ConfigSet { $ObjectID 1 Version "1.3.0" Array { Type "Handle" Dimension 7 Simulink.SolverCC { $ObjectID 2 Version "1.3.0" StartTime "0.0" StopTime "60" AbsTol "auto" FixedStep "auto" InitialStep "auto" MaxNumMinSteps "-1" MaxOrder 5 ConsecutiveZCsStepRelTol "10*128*eps" MaxConsecutiveZCs "1000" ExtrapolationOrder 4 NumberNewtonIterations 1 MaxStep "0.1" MinStep "auto" MaxConsecutiveMinStep "1" RelTol "1e-3" SolverMode "Auto" Solver "ode45" SolverName "ode45" ZeroCrossControl "UseLocalSettings" AlgebraicLoopSolver "TrustRegion" SolverResetMethod "Fast" PositivePriorityOrder off AutoInsertRateTranBlk off SampleTimeConstraint "Unconstrained" RateTranMode "Deterministic" } Simulink.DataIOCC { $ObjectID 3 Version "1.3.0" Decimation "1" ExternalInput "[t, u]" FinalStateName "xFinal" InitialState "xInitial" LimitDataPoints on MaxDataPoints "1000" LoadExternalInput off LoadInitialState off SaveFinalState off SaveFormat "Array" SaveOutput on SaveState off SignalLogging on InspectSignalLogs off SaveTime on StateSaveName "xout" TimeSaveName "tout" OutputSaveName "yout" SignalLoggingName "logsout" OutputOption "RefineOutputTimes" OutputTimes "[]" Refine "1" } Simulink.OptimizationCC { $ObjectID 4 Array { Type "Cell" Dimension 5 Cell "ZeroExternalMemoryAtStartup" Cell "ZeroInternalMemoryAtStartup" Cell "InitFltsAndDblsToZero" Cell "OptimizeModelRefInitCode" Cell "NoFixptDivByZeroProtection" PropName "DisabledProps" } Version "1.3.0" BlockReduction on BooleanDataType on ConditionallyExecuteInputs on InlineParams off InlineInvariantSignals off OptimizeBlockIOStorage on BufferReuse on EnforceIntegerDowncast on ExpressionFolding on ExpressionDepthLimit 2147483647 FoldNonRolledExpr on LocalBlockOutputs on RollThreshold 5 SystemCodeInlineAuto off StateBitsets off DataBitsets off UseTempVars off ZeroExternalMemoryAtStartup on ZeroInternalMemoryAtStartup on InitFltsAndDblsToZero on NoFixptDivByZeroProtection off EfficientFloat2IntCast off OptimizeModelRefInitCode off LifeSpan "inf" BufferReusableBoundary on SimCompilerOptimization "Off" AccelVerboseBuild off } Simulink.DebuggingCC { $ObjectID 5 Version "1.3.0" RTPrefix "error" ConsistencyChecking "none" ArrayBoundsChecking "none" SignalInfNanChecking "none" SignalRangeChecking "none" ReadBeforeWriteMsg "UseLocalSettings" WriteAfterWriteMsg "UseLocalSettings" WriteAfterReadMsg "UseLocalSettings" AlgebraicLoopMsg "warning" ArtificialAlgebraicLoopMsg "warning" SaveWithDisabledLinksMsg "warning" SaveWithParameterizedLinksMsg "warning" CheckSSInitialOutputMsg on CheckExecutionContextPreStartOutputMsg off CheckExecutionContextRuntimeOutputMsg off SignalResolutionControl "UseLocalSettings" BlockPriorityViolationMsg "warning" MinStepSizeMsg "warning" TimeAdjustmentMsg "none" MaxConsecutiveZCsMsg "error" SolverPrmCheckMsg "warning" InheritedTsInSrcMsg "warning" DiscreteInheritContinuousMsg "warning" MultiTaskDSMMsg "error" MultiTaskCondExecSysMsg "error" MultiTaskRateTransMsg "error" SingleTaskRateTransMsg "none" TasksWithSamePriorityMsg "warning" SigSpecEnsureSampleTimeMsg "warning" CheckMatrixSingularityMsg "none" IntegerOverflowMsg "warning" Int32ToFloatConvMsg "warning" ParameterDowncastMsg "error" ParameterOverflowMsg "error" ParameterUnderflowMsg "none" ParameterPrecisionLossMsg "warning" ParameterTunabilityLossMsg "warning" UnderSpecifiedDataTypeMsg "none" UnnecessaryDatatypeConvMsg "none" VectorMatrixConversionMsg "none" InvalidFcnCallConnMsg "error" FcnCallInpInsideContextMsg "Use local settings" SignalLabelMismatchMsg "none" UnconnectedInputMsg "warning" UnconnectedOutputMsg "warning" UnconnectedLineMsg "warning" SFcnCompatibilityMsg "none" UniqueDataStoreMsg "none" BusObjectLabelMismatch "warning" RootOutportRequireBusObject "warning" AssertControl "UseLocalSettings" EnableOverflowDetection off ModelReferenceIOMsg "none" ModelReferenceVersionMismatchMessage "none" ModelReferenceIOMismatchMessage "none" ModelReferenceCSMismatchMessage "none" ModelReferenceSimTargetVerbose off UnknownTsInhSupMsg "warning" ModelReferenceDataLoggingMessage "warning" ModelReferenceSymbolNameMessage "warning" ModelReferenceExtraNoncontSigs "error" StateNameClashWarn "warning" StrictBusMsg "Warning" LoggingUnavailableSignals "error" } Simulink.HardwareCC { $ObjectID 6 Version "1.3.0" ProdBitPerChar 8 ProdBitPerShort 16 ProdBitPerInt 32 ProdBitPerLong 32 ProdIntDivRoundTo "Undefined" ProdEndianess "Unspecified" ProdWordSize 32 ProdShiftRightIntArith on ProdHWDeviceType "32-bit Generic" TargetBitPerChar 8 TargetBitPerShort 16 TargetBitPerInt 32 TargetBitPerLong 32 TargetShiftRightIntArith on TargetIntDivRoundTo "Undefined" TargetEndianess "Unspecified" TargetWordSize 32 TargetTypeEmulationWarnSuppressLevel 0 TargetPreprocMaxBitsSint 32 TargetPreprocMaxBitsUint 32 TargetHWDeviceType "Specified" TargetUnknown off ProdEqTarget on } Simulink.ModelReferenceCC { $ObjectID 7 Version "1.3.0" UpdateModelReferenceTargets "IfOutOfDateOrStructuralChange" CheckModelReferenceTargetMessage "error" ModelReferenceNumInstancesAllowed "Multi" ModelReferencePassRootInputsByReference on ModelReferenceMinAlgLoopOccurrences off } Simulink.RTWCC { $BackupClass "Simulink.RTWCC" $ObjectID 8 Array { Type "Cell" Dimension 2 Cell "IncludeHyperlinkInReport" Cell "GenerateTraceInfo" PropName "DisabledProps" } Version "1.3.0" SystemTargetFile "grt.tlc" GenCodeOnly off MakeCommand "make_rtw" GenerateMakefile on TemplateMakefile "grt_default_tmf" GenerateReport off SaveLog off RTWVerbose on RetainRTWFile off ProfileTLC off TLCDebug off TLCCoverage off TLCAssert off ProcessScriptMode "Default" ConfigurationMode "Optimized" ConfigAtBuild off IncludeHyperlinkInReport off LaunchReport off TargetLang "C" IncludeBusHierarchyInRTWFileBlockHierarchyMap off IncludeERTFirstTime off GenerateTraceInfo off RTWCompilerOptimization "Off" Array { Type "Handle" Dimension 2 Simulink.CodeAppCC { $ObjectID 9 Array { Type "Cell" Dimension 16 Cell "IgnoreCustomStorageClasses" Cell "InsertBlockDesc" Cell "SFDataObjDesc" Cell "SimulinkDataObjDesc" Cell "DefineNamingRule" Cell "SignalNamingRule" Cell "ParamNamingRule" Cell "InlinedPrmAccess" Cell "CustomSymbolStr" Cell "CustomSymbolStrGlobalVar" Cell "CustomSymbolStrType" Cell "CustomSymbolStrField" Cell "CustomSymbolStrFcn" Cell "CustomSymbolStrBlkIO" Cell "CustomSymbolStrTmpVar" Cell "CustomSymbolStrMacro" PropName "DisabledProps" } Version "1.3.0" ForceParamTrailComments off GenerateComments on IgnoreCustomStorageClasses on IncHierarchyInIds off MaxIdLength 31 PreserveName off PreserveNameWithParent off ShowEliminatedStatement off IncAutoGenComments off SimulinkDataObjDesc off SFDataObjDesc off IncDataTypeInIds off MangleLength 1 CustomSymbolStrGlobalVar "$R$N$M" CustomSymbolStrType "$N$R$M" CustomSymbolStrField "$N$M" CustomSymbolStrFcn "$R$N$M$F" CustomSymbolStrBlkIO "rtb_$N$M" CustomSymbolStrTmpVar "$N$M" CustomSymbolStrMacro "$R$N$M" DefineNamingRule "None" ParamNamingRule "None" SignalNamingRule "None" InsertBlockDesc off SimulinkBlockComments on EnableCustomComments off InlinedPrmAccess "Literals" ReqsInCode off } Simulink.GRTTargetCC { $BackupClass "Simulink.TargetCC" $ObjectID 10 Array { Type "Cell" Dimension 15 Cell "IncludeMdlTerminateFcn" Cell "CombineOutputUpdateFcns" Cell "SuppressErrorStatus" Cell "ERTCustomFileBanners" Cell "GenerateSampleERTMain" Cell "GenerateTestInterfaces" Cell "ModelStepFunctionPrototypeControlCompliant" Cell "MultiInstanceERTCode" Cell "PurelyIntegerCode" Cell "SupportNonFinite" Cell "SupportComplex" Cell "SupportAbsoluteTime" Cell "SupportContinuousTime" Cell "SupportNonInlinedSFcns" Cell "PortableWordSizes" PropName "DisabledProps" } Version "1.3.0" TargetFcnLib "ansi_tfl_table_tmw.mat" TargetLibSuffix "" TargetPreCompLibLocation "" GenFloatMathFcnCalls "ANSI_C" UtilityFuncGeneration "Auto" GenerateFullHeader on GenerateSampleERTMain off GenerateTestInterfaces off IsPILTarget off ModelReferenceCompliant on CompOptLevelCompliant on IncludeMdlTerminateFcn on CombineOutputUpdateFcns off SuppressErrorStatus off IncludeFileDelimiter "Auto" ERTCustomFileBanners off SupportAbsoluteTime on LogVarNameModifier "rt_" MatFileLogging on MultiInstanceERTCode off SupportNonFinite on SupportComplex on PurelyIntegerCode off SupportContinuousTime on SupportNonInlinedSFcns on EnableShiftOperators on ParenthesesLevel "Nominal" PortableWordSizes off ModelStepFunctionPrototypeControlCompliant off ExtMode off ExtModeStaticAlloc off ExtModeTesting off ExtModeStaticAllocSize 1000000 ExtModeTransport 0 ExtModeMexFile "ext_comm" ExtModeIntrfLevel "Level1" RTWCAPISignals off RTWCAPIParams off RTWCAPIStates off GenerateASAP2 off } PropName "Components" } } PropName "Components" } Name "Configuration" CurrentDlgPage "Solver" } PropName "ConfigurationSets" } Simulink.ConfigSet { $PropName "ActiveConfigurationSet" $ObjectID 1 } BlockDefaults { Orientation "right" ForegroundColor "black" BackgroundColor "white" DropShadow off NamePlacement "normal" FontName "Arial" FontSize 10 FontWeight "normal" FontAngle "normal" ShowName on } BlockParameterDefaults { Block { BlockType Clock DisplayTime off } Block { BlockType Fcn Expr "sin(u[1])" SampleTime "-1" } Block { BlockType Gain Gain "1" Multiplication "Element-wise(K.*u)" ParamMin "[]" ParamMax "[]" ParameterDataTypeMode "Same as input" ParameterDataType "fixdt(1,16,0)" ParameterScalingMode "Best Precision: Matrix-wise" ParameterScaling "[]" OutMin "[]" OutMax "[]" OutDataTypeMode "Same as input" OutDataType "fixdt(1,16,0)" OutScaling "[]" LockScale off RndMeth "Floor" SaturateOnIntegerOverflow on SampleTime "-1" } Block { BlockType Integrator ExternalReset "none" InitialConditionSource "internal" InitialCondition "0" LimitOutput off UpperSaturationLimit "inf" LowerSaturationLimit "-inf" ShowSaturationPort off ShowStatePort off AbsoluteTolerance "auto" IgnoreLimit off ZeroCross on ContinuousStateAttributes "''" } Block { BlockType Outport Port "1" UseBusObject off BusObject "BusObject" BusOutputAsStruct off PortDimensions "-1" SampleTime "-1" OutMin "[]" OutMax "[]" DataType "auto" OutDataType "fixdt(1,16,0)" OutScaling "[]" SignalType "auto" SamplingMode "auto" OutputWhenDisabled "held" InitialOutput "[]" } Block { BlockType Product Inputs "2" Multiplication "Element-wise(.*)" CollapseMode "All dimensions" CollapseDim "1" InputSameDT on OutMin "[]" OutMax "[]" OutDataTypeMode "Same as first input" OutDataType "fixdt(1,16,0)" OutScaling "[]" LockScale off RndMeth "Zero" SaturateOnIntegerOverflow on SampleTime "-1" } Block { BlockType Step Time "1" Before "0" After "1" SampleTime "-1" VectorParams1D on ZeroCross on } Block { BlockType SubSystem ShowPortLabels "FromPortIcon" Permissions "ReadWrite" PermitHierarchicalResolution "All" TreatAsAtomicUnit off SystemSampleTime "-1" RTWFcnNameOpts "Auto" RTWFileNameOpts "Auto" RTWMemSecFuncInitTerm "Inherit from model" RTWMemSecFuncExecute "Inherit from model" RTWMemSecDataConstants "Inherit from model" RTWMemSecDataInternal "Inherit from model" RTWMemSecDataParameters "Inherit from model" SimViewingDevice off DataTypeOverride "UseLocalSettings" MinMaxOverflowLogging "UseLocalSettings" } Block { BlockType Sum IconShape "rectangular" Inputs "++" CollapseMode "All dimensions" CollapseDim "1" InputSameDT on OutMin "[]" OutMax "[]" OutDataTypeMode "Same as first input" OutDataType "fixdt(1,16,0)" OutScaling "[]" LockScale off RndMeth "Floor" SaturateOnIntegerOverflow on SampleTime "-1" } Block { BlockType ToWorkspace VariableName "simulink_output" MaxDataPoints "1000" Decimation "1" SampleTime "0" FixptAsFi off } Block { BlockType Constant Value "1" VectorParams1D on SamplingMode "Sample based" OutMin "[]" OutMax "[]" OutDataTypeMode "Inherit from 'Constant value'" OutDataType "fixdt(1,16,0)" ConRadixGroup "Use specified scaling" OutScaling "[]" SampleTime "inf" FramePeriod "inf" } Block { BlockType Saturate UpperLimit "0.5" LowerLimit "-0.5" LinearizeAsGain on ZeroCross on SampleTime "-1" OutMin "[]" OutMax "[]" OutDataTypeMode "Same as input" OutDataType "fixdt(1,16,0)" OutScaling "[]" LockScale off RndMeth "Floor" } } AnnotationDefaults { HorizontalAlignment "center" VerticalAlignment "middle" ForegroundColor "black" BackgroundColor "white" DropShadow off FontName "Arial" FontSize 10 FontWeight "normal" FontAngle "normal" UseDisplayTextAsClickCallback off } LineDefaults { FontName "Arial" FontSize 9 FontWeight "normal" FontAngle "normal" } System { Name "cruise_ctrl" Location [52, 100, 1287, 510] Open on ModelBrowserVisibility off ModelBrowserWidth 212 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000] TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" ReportName "simulink-default.rpt" Block { BlockType Clock Name "Clock" Position [115, 345, 135, 365] Decimation "10" } Block { BlockType Integrator Name "Compute Velocity" Ports [1, 1] Position [995, 130, 1025, 160] InitialCondition "20" } Block { BlockType Fcn Name "Drag and Frictional\nForces" Position [650, 60, 710, 90] Expr "m * g * Cr + 0.5 * rho * Cd * A * (u[1])^2 " } Block { BlockType Product Name "Engine Force" Ports [2, 1] Position [680, 197, 710, 228] Inputs "**" CollapseMode "All dimensions" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Error" Ports [2, 1] Position [100, 162, 130, 193] Inputs "+-" CollapseMode "All dimensions" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" SaturateOnIntegerOverflow off } Block { BlockType Fcn Name "Fcn" Position [490, 220, 550, 250] Expr "Tm * (1 - beta * (u[1]/wm - 1)^2)" } Block { BlockType Fcn Name "Fcn1" Position [540, 70, 600, 100] } Block { BlockType Constant Name "Gear Ratio" Position [450, 335, 480, 365] Value "alpha(gear)" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "Grav. Const." Position [580, 140, 610, 170] Value "m*g" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Product Name "Gravitational Forces" Ports [2, 1] Position [665, 132, 695, 163] CollapseMode "All dimensions" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" SaturateOnIntegerOverflow off } Block { BlockType Saturate Name "Hill Control" Position [390, 70, 420, 100] UpperLimit "1" LowerLimit "0" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Reference Name "Hill Encounter" Ports [0, 1] Position [295, 45, 325, 75] SourceBlock "simulink/Sources/Ramp" SourceType "Ramp" ShowPortLabels "FromPortIcon" SystemSampleTime "-1" FunctionWithSeparateData off RTWMemSecFuncInitTerm "Inherit from model" RTWMemSecFuncExecute "Inherit from model" RTWMemSecDataConstants "Inherit from model" RTWMemSecDataInternal "Inherit from model" RTWMemSecDataParameters "Inherit from model" slope "1" start "60" X0 "0" VectorParams1D on } Block { BlockType Gain Name "Integral\nGain" Position [245, 90, 275, 120] Gain "0.1" ParameterDataTypeMode "Inherit via internal rule" ParameterDataType "sfix(16)" ParameterScaling "2^0" OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "Max Hill Slope" Position [460, 70, 490, 100] Gain "4*pi/180" ParameterDataTypeMode "Inherit via internal rule" ParameterDataType "sfix(16)" ParameterScaling "2^0" OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" SaturateOnIntegerOverflow off } Block { BlockType Fcn Name "Newton's\nSecond Law" Position [890, 130, 950, 160] Expr "u[1]/m" } Block { BlockType Product Name "Omega" Ports [2, 1] Position [435, 217, 465, 248] CollapseMode "All dimensions" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" SaturateOnIntegerOverflow off } Block { BlockType ToWorkspace Name "Output to Workspace\nVariable \"Thottle\"" Position [490, 120, 550, 150] VariableName "Throttle" MaxDataPoints "inf" SampleTime "-1" SaveFormat "Array" } Block { BlockType ToWorkspace Name "Output to Workspace\nVariable \"Time\"" Position [215, 340, 275, 370] VariableName "Time" MaxDataPoints "inf" Decimation "2" SampleTime "-1" SaveFormat "Array" } Block { BlockType ToWorkspace Name "Output to Workspace\nVariable \"Vel\"" Position [1135, 130, 1195, 160] VariableName "Vel" MaxDataPoints "inf" Decimation "2" SampleTime "-1" SaveFormat "Array" } Block { BlockType Integrator Name "Past\nHistory" Ports [1, 1] Position [170, 90, 200, 120] InitialCondition "1" } Block { BlockType Gain Name "Proportional\nGain" Position [245, 165, 275, 195] Gain "0.5" ParameterDataTypeMode "Inherit via internal rule" ParameterDataType "sfix(16)" ParameterScaling "2^0" OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" SaturateOnIntegerOverflow off } Block { BlockType Step Name "Reference Speed" Position [25, 155, 55, 185] Time "20" Before "20" After "30" SampleTime "0" } Block { BlockType Saturate Name "Signal Must Be\nBetween 0 and 1" Position [400, 140, 430, 170] UpperLimit "1" LowerLimit "0" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Product Name "Torque" Ports [2, 1] Position [580, 187, 610, 218] CollapseMode "All dimensions" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Total\nExt.\nForces" Ports [2, 1] Position [750, 117, 780, 148] CollapseMode "All dimensions" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Total Control\nSignal" Ports [2, 1] Position [330, 137, 360, 168] CollapseMode "All dimensions" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Total Force" Ports [2, 1] Position [825, 127, 855, 158] Inputs "-+" CollapseMode "All dimensions" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^-10" SaturateOnIntegerOverflow off } Line { SrcBlock "Engine Force" SrcPort 1 Points [85, 0; 0, -65] DstBlock "Total Force" DstPort 2 } Line { SrcBlock "Total Force" SrcPort 1 DstBlock "Newton's\nSecond Law" DstPort 1 } Line { SrcBlock "Newton's\nSecond Law" SrcPort 1 DstBlock "Compute Velocity" DstPort 1 } Line { SrcBlock "Compute Velocity" SrcPort 1 Points [55, 0] Branch { Points [0, 0] Branch { Points [0, 245; -700, 0; 0, -110] Branch { Points [0, -55] DstBlock "Omega" DstPort 1 } Branch { Points [-300, 0] DstBlock "Error" DstPort 2 } } Branch { DstBlock "Output to Workspace\nVariable \"Vel\"" DstPort 1 } } Branch { Points [0, -105; -455, 0; 0, 35] DstBlock "Drag and Frictional\nForces" DstPort 1 } } Line { SrcBlock "Gear Ratio" SrcPort 1 Points [145, 0; 0, -55] Branch { Points [0, -75] DstBlock "Engine Force" DstPort 2 } Branch { Points [-210, 0] DstBlock "Omega" DstPort 2 } } Line { SrcBlock "Omega" SrcPort 1 DstBlock "Fcn" DstPort 1 } Line { SrcBlock "Torque" SrcPort 1 DstBlock "Engine Force" DstPort 1 } Line { SrcBlock "Fcn" SrcPort 1 Points [0, -25] DstBlock "Torque" DstPort 2 } Line { SrcBlock "Signal Must Be\nBetween 0 and 1" SrcPort 1 Points [30, 0] Branch { Points [0, 40] DstBlock "Torque" DstPort 1 } Branch { Points [0, 0; 0, -20] DstBlock "Output to Workspace\nVariable \"Thottle\"" DstPort 1 } } Line { SrcBlock "Reference Speed" SrcPort 1 DstBlock "Error" DstPort 1 } Line { SrcBlock "Total Control\nSignal" SrcPort 1 DstBlock "Signal Must Be\nBetween 0 and 1" DstPort 1 } Line { SrcBlock "Proportional\nGain" SrcPort 1 Points [30, 0; 0, -20] DstBlock "Total Control\nSignal" DstPort 2 } Line { SrcBlock "Integral\nGain" SrcPort 1 Points [25, 0; 0, 40] DstBlock "Total Control\nSignal" DstPort 1 } Line { SrcBlock "Error" SrcPort 1 Points [15, 0] Branch { DstBlock "Proportional\nGain" DstPort 1 } Branch { Points [0, -75] DstBlock "Past\nHistory" DstPort 1 } } Line { SrcBlock "Past\nHistory" SrcPort 1 DstBlock "Integral\nGain" DstPort 1 } Line { SrcBlock "Clock" SrcPort 1 DstBlock "Output to Workspace\nVariable \"Time\"" DstPort 1 } Line { SrcBlock "Total\nExt.\nForces" SrcPort 1 DstBlock "Total Force" DstPort 1 } Line { SrcBlock "Drag and Frictional\nForces" SrcPort 1 Points [10, 0; 0, 50] DstBlock "Total\nExt.\nForces" DstPort 1 } Line { SrcBlock "Gravitational Forces" SrcPort 1 Points [15, 0; 0, -10] DstBlock "Total\nExt.\nForces" DstPort 2 } Line { SrcBlock "Fcn1" SrcPort 1 Points [20, 0; 0, 55] DstBlock "Gravitational Forces" DstPort 1 } Line { SrcBlock "Max Hill Slope" SrcPort 1 DstBlock "Fcn1" DstPort 1 } Line { SrcBlock "Grav. Const." SrcPort 1 DstBlock "Gravitational Forces" DstPort 2 } Line { SrcBlock "Hill Control" SrcPort 1 DstBlock "Max Hill Slope" DstPort 1 } Line { SrcBlock "Hill Encounter" SrcPort 1 Points [30, 0; 0, 25] DstBlock "Hill Control" DstPort 1 } } }