Model { Name "hw1cruise" Version 4.00 SampleTimeColors off LibraryLinkDisplay "none" WideLines off ShowLineDimensions off ShowPortDataTypes off RecordCoverage off CovPath "/" CovSaveName "covdata" CovNameIncrementing off CovHtmlReporting on BlockNameDataTip off BlockParametersDataTip off BlockDescriptionStringDataTip off ToolBar on StatusBar on BrowserShowLibraryLinks off BrowserLookUnderMasks off Created "Sat Sep 28 13:19:30 2002" Creator "shreesh" UpdateHistory "UpdateHistoryNever" ModifiedByFormat "%" LastModifiedBy "Richard Murray" ModifiedDateFormat "%" LastModifiedDate "Sun Sep 29 04:26:54 2002" ModelVersionFormat "1.%" ConfigurationManager "none" SimParamPage "Solver" StartTime "0.0" StopTime "30" SolverMode "Auto" Solver "ode45" RelTol "1e-3" AbsTol "auto" Refine "1" MaxStep "0.02" MinStep "auto" MaxNumMinSteps "-1" InitialStep "auto" FixedStep "auto" MaxOrder 5 OutputOption "RefineOutputTimes" OutputTimes "[]" LoadExternalInput off ExternalInput "[t, u]" SaveTime on TimeSaveName "tout" SaveState off StateSaveName "xout" SaveOutput on OutputSaveName "yout" LoadInitialState off InitialState "xInitial" SaveFinalState off FinalStateName "xFinal" SaveFormat "Array" LimitDataPoints on MaxDataPoints "1000" Decimation "1" AlgebraicLoopMsg "warning" MinStepSizeMsg "warning" UnconnectedInputMsg "warning" UnconnectedOutputMsg "warning" UnconnectedLineMsg "warning" InheritedTsInSrcMsg "warning" SingleTaskRateTransMsg "none" MultiTaskRateTransMsg "error" IntegerOverflowMsg "warning" CheckForMatrixSingularity "none" UnnecessaryDatatypeConvMsg "none" Int32ToFloatConvMsg "warning" SignalLabelMismatchMsg "none" LinearizationMsg "none" VectorMatrixConversionMsg "none" SfunCompatibilityCheckMsg "none" BlockPriorityViolationMsg "warning" ArrayBoundsChecking "none" ConsistencyChecking "none" ZeroCross on Profile off SimulationMode "normal" RTWSystemTargetFile "grt.tlc" RTWInlineParameters off RTWRetainRTWFile off RTWTemplateMakefile "grt_default_tmf" RTWMakeCommand "make_rtw" RTWGenerateCodeOnly off TLCProfiler off TLCDebug off TLCCoverage off AccelSystemTargetFile "accel.tlc" AccelTemplateMakefile "accel_default_tmf" AccelMakeCommand "make_rtw" ExtModeMexFile "ext_comm" ExtModeBatchMode off ExtModeTrigType "manual" ExtModeTrigMode "normal" 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 on ExtModeLogAll on OptimizeBlockIOStorage on BufferReuse on ParameterPooling on BlockReductionOpt off BooleanDataType 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 "hw1cruise" Location [81, 226, 969, 712] Open on ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "yellow" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" ZoomFactor "100" ReportName "simulink-default.rpt" Block { BlockType SubSystem Name "Car dynamics" Description "a" Ports [1, 1] Position [455, 238, 545, 312] ShowPortLabels off TreatAsAtomicUnit off RTWSystemCode "Auto" RTWFcnNameOpts "Auto" RTWFileNameOpts "Auto" Port { PortNumber 1 Name "output speed (v)" TestPoint off LinearAnalysisOutput off LinearAnalysisInput off RTWStorageClass "Auto" } System { Name "Car dynamics" Location [590, 313, 1197, 512] Open on ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" ZoomFactor "100" Block { BlockType Inport Name "In2" Position [80, 108, 110, 122] Port "1" Interpolate on Port { PortNumber 1 Name "Control input" PropagatedSignals "Control input" TestPoint off LinearAnalysisOutput off LinearAnalysisInput off RTWStorageClass "Auto" } } Block { BlockType TransportDelay Name "Engine" Position [180, 100, 210, 130] DelayTime "0.2" InitialInput "55*50" BufferSize "1024" PadeOrder "0" } Block { BlockType StateSpace Name "Vehicle" Position [270, 98, 330, 132] A "-50/1000" B "1/1000" C "1" D "0" X0 "55" AbsoluteTolerance "auto" Realization "auto" } Block { BlockType Outport Name "Out1" Position [390, 108, 420, 122] Port "1" OutputWhenDisabled "held" InitialOutput "[]" } Line { SrcBlock "Vehicle" SrcPort 1 DstBlock "Out1" DstPort 1 } Line { Name "Control input" Labels [0, 0] SrcBlock "In2" SrcPort 1 DstBlock "Engine" DstPort 1 } Line { SrcBlock "Engine" SrcPort 1 DstBlock "Vehicle" DstPort 1 } Annotation { Position [289, 176] Text "Assume that the inertia of wheels is zero a" "nd that friction (proportional to speed of car) opposes motion" } Annotation { Position [292, 20] Text "Car dynamics" FontSize 12 FontWeight "bold" } } } Block { BlockType Clock Name "Clock" Position [600, 200, 620, 220] DisplayTime off Decimation "10" } Block { BlockType Reference Name "Integral\nGain" Ports [1, 1] Position [235, 185, 265, 215] BackgroundColor "green" SourceBlock "simulink3/Math/Slider\nGain" SourceType "Slider Gain" low "0" gain "100" high "500" } Block { BlockType Integrator Name "Integrator" Ports [1, 1] Position [310, 185, 340, 215] ExternalReset "none" InitialConditionSource "internal" InitialCondition "55*50" LimitOutput off UpperSaturationLimit "inf" LowerSaturationLimit "-inf" ShowSaturationPort off ShowStatePort off AbsoluteTolerance "auto" } Block { BlockType Reference Name "Propotional\nGain" Ports [1, 1] Position [235, 260, 265, 290] BackgroundColor "green" SourceBlock "simulink3/Math/Slider\nGain" SourceType "Slider Gain" low "0" gain "500" high "5000" } Block { BlockType Step Name "Step input" Position [30, 260, 60, 290] Time "10" Before "55" After "65" SampleTime "0" VectorParams1D on Port { PortNumber 1 Name "reference speed\n55 to 65 @ t = 0" TestPoint off LinearAnalysisOutput off LinearAnalysisInput off RTWStorageClass "Auto" } } Block { BlockType Sum Name "Sum" Ports [2, 1] Position [180, 265, 200, 285] ShowName off IconShape "round" Inputs "|+-" SaturateOnIntegerOverflow on } Block { BlockType Sum Name "Sum2" Ports [2, 1] Position [355, 265, 375, 285] ShowName off IconShape "round" Inputs "++|" SaturateOnIntegerOverflow on Port { PortNumber 1 Name "Control input" TestPoint off LinearAnalysisOutput off LinearAnalysisInput off RTWStorageClass "Auto" } } Block { BlockType ToWorkspace Name "To Workspace" Position [665, 195, 725, 225] VariableName "time" MaxDataPoints "inf" Decimation "1" SampleTime "-1" SaveFormat "Array" } Block { BlockType ToWorkspace Name "To Workspace1" Position [665, 260, 725, 290] VariableName "vel" MaxDataPoints "inf" Decimation "1" SampleTime "-1" SaveFormat "Array" } Block { BlockType ToWorkspace Name "To Workspace2" Position [90, 330, 150, 360] VariableName "ref" MaxDataPoints "inf" Decimation "1" SampleTime "-1" SaveFormat "Array" } Line { Name "reference speed\n55 to 65 @ t = 0" Labels [0, 1] SrcBlock "Step input" SrcPort 1 Points [10, 0] Branch { DstBlock "Sum" DstPort 1 } Branch { DstBlock "To Workspace2" DstPort 1 } } Line { Name "Control input" Labels [1, 0] SrcBlock "Sum2" SrcPort 1 DstBlock "Car dynamics" DstPort 1 } Line { Name "output speed (v)" SrcBlock "Car dynamics" SrcPort 1 Points [0, 0; 25, 0] Branch { DstBlock "To Workspace1" DstPort 1 } Branch { Labels [3, 0; 1, 0] Points [10, 0; 0, 90; -395, 0] DstBlock "Sum" DstPort 2 } } Line { SrcBlock "Clock" SrcPort 1 DstBlock "To Workspace" DstPort 1 } Line { SrcBlock "Propotional\nGain" SrcPort 1 DstBlock "Sum2" DstPort 2 } Line { SrcBlock "Sum" SrcPort 1 Points [5, 0] Branch { DstBlock "Propotional\nGain" DstPort 1 } Branch { Points [0, -75] DstBlock "Integral\nGain" DstPort 1 } } Line { SrcBlock "Integral\nGain" SrcPort 1 DstBlock "Integrator" DstPort 1 } Line { SrcBlock "Integrator" SrcPort 1 Points [20, 0] DstBlock "Sum2" DstPort 1 } Annotation { Position [448, 33] Text "Cruise Control Model" DropShadow on FontName "courier" FontSize 28 FontWeight "bold" } Annotation { Position [53, 108] HorizontalAlignment "left" Text "Instructions: modify the gains of the PI contro" "l law to adjust the response of the \nsystem. The gain blocks are marked in " "green. Double click on them to change values, \nthen use Simulation->Start t" "o generate a new simulation. Outputs are stored as 'ref',\n'vel' and 'time' " "in MATLAB workspace." DropShadow on FontName "courier" FontSize 12 } } }