Model { Name "HGO_car_experiment" Version 2.20 SimParamPage Solver SampleTimeColors off InvariantConstants off WideVectorLines off ShowLineWidths off StartTime "0.0" StopTime "5" Solver ode1 RelTol "1e-3" AbsTol "1e-6" Refine "1" MaxStep "auto" InitialStep "auto" FixedStep "0.001" 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" LimitMaxRows off MaxRows "1000" Decimation "1" AlgebraicLoopMsg warning MinStepSizeMsg warning UnconnectedInputMsg warning UnconnectedOutputMsg warning UnconnectedLineMsg warning ConsistencyChecking off ZeroCross on SimulationMode external RTWSystemTargetFile "wincon.tlc -aAllSignals=1 -aAllParameters=1" RTWInlineParameters off RTWPlaceOutputsASAP off RTWRetainRTWFile off RTWTemplateMakefile "wc95_msvc6.tmf" RTWMakeCommand "make_wc" RTWGenerateCodeOnly off ExtModeMexFile "wc_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 "HGO_car_experiment" Location [25, 111, 863, 662] Open on ToolBar on StatusBar on ScreenColor white PaperOrientation landscape PaperPositionMode auto PaperType usletter PaperUnits inches Block { BlockType Reference Name "-(bar_alpha-bar_am)/epsilon" Ports [1, 1, 0, 0, 0] Position [430, 225, 460, 255] Orientation left SourceBlock "simulink/Linear/Matrix\nGain" SourceType "Matrix Gain" K "bar_alpha_am" } Block { BlockType Reference Name "-bar_S" Ports [1, 1, 0, 0, 0] Position [485, 445, 515, 475] Orientation left SourceBlock "simulink/Linear/Matrix\nGain" SourceType "Matrix Gain" K "bar_S" } Block { BlockType Reference Name "Cm" Ports [1, 1, 0, 0, 0] Position [590, 305, 620, 335] SourceBlock "simulink/Linear/Matrix\nGain" SourceType "Matrix Gain" K "Cm" } Block { BlockType Reference Name "From potentiometer" Ports [0, 1, 0, 0, 0] Position [85, 137, 190, 183] SourceBlock "winlib/Quanser Consulting\nMultiQ Series/Analog" " Input" SourceType "Analog Input Module" baseAddr "0x320" channels "[0]" sampleTime "str2num(get_param(bdroot, 'FixedStep'))" } Block { BlockType StateSpace Name "Reference model" Position [250, 57, 310, 93] A "Am" B "Bm" C "Cm" D "[0]" X0 "xm0" } Block { BlockType Reference Name "Time-Base" Ports [0, 1, 0, 0, 0] Position [615, 414, 720, 486] SourceBlock "winlib/Quanser Consulting\nMultiQ Series/Time-B" "ase" SourceType "Timer Module" baseAddr "0x320" irqLevel "9" clockSource "1" } Block { BlockType Reference Name "To power\namplifier" Ports [1, 0, 0, 0, 0] Position [175, 217, 280, 263] SourceBlock "winlib/Quanser Consulting\nMultiQ Series/Analog" " Output" SourceType "Analog Output Module" baseAddr "0x320" channels "[0]" initialOutputs "0" finalOutputs "0" sampleTime "str2num(get_param(bdroot, 'FixedStep'))" } Block { BlockType Product Name "U" Ports [2, 1, 0, 0, 0] Position [330, 452, 360, 483] Orientation left Inputs "2" } Block { BlockType Sum Name "U+unom" Ports [2, 1, 0, 0, 0] Position [105, 222, 135, 253] Inputs "++" } Block { BlockType Reference Name "bar_Am/epsilon" Ports [1, 1, 0, 0, 0] Position [420, 380, 450, 410] Orientation left SourceBlock "simulink/Linear/Matrix\nGain" SourceType "Matrix Gain" K "bar_Am" } Block { BlockType Gain Name "c1" Position [320, 560, 350, 590] NamePlacement alternate Gain "c1" } Block { BlockType Sum Name "dot_hat_zeta" Ports [3, 1, 0, 0, 0] Position [380, 292, 410, 348] Inputs "+++" } Block { BlockType Scope Name "e" Ports [1, 0, 0, 0, 0] Position [690, 160, 720, 190] Floating off Location [94, 57, 418, 292] Open off Grid on TickLabels on ZoomMode on TimeRange "auto" YMin "-0.01 " YMax "0.1 " SaveToWorkspace off SaveName "ScopeData" LimitMaxRows on MaxRows "50000" Decimation "100" SampleInput off SampleTime "0" } Block { BlockType Reference Name "epsilon^(pm-1)*Bm*Knom" Ports [1, 1, 0, 0, 0] Position [290, 420, 320, 450] Orientation up NamePlacement alternate SourceBlock "simulink/Linear/Matrix\nGain" SourceType "Matrix Gain" K "bar_Bm" } Block { BlockType Sum Name "error" Ports [2, 1, 0, 0, 0] Position [385, 157, 415, 188] Inputs "-+" } Block { BlockType Constant Name "hat_d" Position [450, 563, 520, 587] Orientation left NamePlacement alternate Value "hat_d" } Block { BlockType Scope Name "hat_zeta" Ports [1, 0, 0, 0, 0] Position [695, 265, 725, 295] Floating off Location [492, 291, 816, 526] Open off Grid on TickLabels on ZoomMode on TimeRange "auto" YMin "0 " YMax "0.1 " SaveToWorkspace off SaveName "ScopeData" LimitMaxRows on MaxRows "50000" Decimation "100" SampleInput off SampleTime "0" } Block { BlockType Integrator Name "hat_zeta1" Ports [1, 1, 0, 0, 0] Position [455, 305, 485, 335] ExternalReset none InitialConditionSource internal InitialCondition "hat_zeta0" LimitOutput off UpperSaturationLimit "inf" LowerSaturationLimit "-inf" ShowSaturationPort off ShowStatePort off AbsoluteTolerance "auto" } Block { BlockType Gain Name "m/V\nscale factor" Position [210, 142, 275, 178] Gain "0.09346" } Block { BlockType SignalGenerator Name "r" Position [80, 60, 110, 90] WaveForm square Amplitude "0.02" Frequency "3" Units "rad/sec" } Block { BlockType Sum Name "rho" Ports [2, 1, 0, 0, 0] Position [360, 510, 395, 545] Orientation up Inputs "++" } Block { BlockType Signum Name "sgn(-bar_sigma)" Position [415, 444, 450, 476] Orientation left } Block { BlockType Reference Name "theta_nomT" Ports [1, 1, 0, 0, 0] Position [80, 565, 110, 595] Orientation left NamePlacement alternate SourceBlock "simulink/Linear/Matrix\nGain" SourceType "Matrix Gain" K "theta_nomT" } Block { BlockType Scope Name "tilde_e" Ports [1, 0, 0, 0, 0] Position [585, 115, 615, 145] Floating off Location [269, 271, 593, 510] Open off Grid on TickLabels on ZoomMode on TimeRange "auto" YMin "-0.1 " YMax "0.025 " SaveToWorkspace off SaveName "ScopeData" LimitMaxRows on MaxRows "50000" Decimation "100" SampleInput off SampleTime "0" } Block { BlockType Sum Name "tilde_e1" Ports [2, 1, 0, 0, 0] Position [570, 222, 600, 253] Orientation left Inputs "-+" } Block { BlockType Scope Name "u" Ports [1, 0, 0, 0, 0] Position [105, 285, 135, 315] Orientation left Floating off Location [460, 326, 784, 565] Open off Grid on TickLabels on ZoomMode on TimeRange "auto" YMin "-30 " YMax "30 " SaveToWorkspace off SaveName "ScopeData" LimitMaxRows on MaxRows "500000" Decimation "10" SampleInput off SampleTime "0" } Block { BlockType Mux Name "w" Ports [4, 1, 0, 0, 0] Position [116, 505, 179, 545] Orientation down NamePlacement alternate Inputs "4" } Block { BlockType StateSpace Name "w1" Position [125, 335, 185, 375] Orientation down NamePlacement alternate A "Phi" B "Gamma" C "Csf" D "Dsf" X0 "xsf0" } Block { BlockType StateSpace Name "w2" Position [210, 335, 270, 375] Orientation down NamePlacement alternate A "Phi" B "Gamma" C "Csf" D "Dsf" X0 "xsf0" } Block { BlockType Scope Name "y" Ports [1, 0, 0, 0, 0] Position [325, 195, 355, 225] Floating off Location [6, 323, 330, 562] Open off Grid on TickLabels on ZoomMode on TimeRange "auto" YMin "-0.01 " YMax "0.11 " SaveToWorkspace off SaveName "ScopeData" LimitMaxRows on MaxRows "50000" Decimation "100" SampleInput off SampleTime "0" } Block { BlockType Scope Name "ym" Ports [1, 0, 0, 0, 0] Position [395, 60, 425, 90] Floating off Location [471, 43, 795, 282] Open off Grid on TickLabels on ZoomMode on TimeRange "auto" YMin "-0.01 " YMax "0.01 " SaveToWorkspace off SaveName "ScopeData" LimitMaxRows on MaxRows "50000" Decimation "100" SampleInput off SampleTime "0" } Block { BlockType Math Name "||w||" Ports [1, 1, 0, 0, 0] Position [265, 560, 295, 590] NamePlacement alternate Operator sqrt } Block { BlockType Reference Name "||w||^2" Ports [2, 1, 0, 0, 0] Position [205, 557, 235, 588] NamePlacement alternate SourceBlock "simulink/Linear/Dot Product" SourceType "Dot Product" } Line { SrcBlock "Reference model" SrcPort 1 Points [40, 0] Branch { DstBlock "ym" DstPort 1 } Branch { Points [0, 90] DstBlock "error" DstPort 1 } } Line { SrcBlock "tilde_e1" SrcPort 1 Points [-10, 0] Branch { DstBlock "-(bar_alpha-bar_am)/epsilon" DstPort 1 } Branch { Points [0, -110] DstBlock "tilde_e" DstPort 1 } } Line { SrcBlock "error" SrcPort 1 Points [225, 0] Branch { Points [0, 55] DstBlock "tilde_e1" DstPort 1 } Branch { DstBlock "e" DstPort 1 } } Line { SrcBlock "-(bar_alpha-bar_am)/epsilon" SrcPort 1 Points [-70, 0; 0, 60] DstBlock "dot_hat_zeta" DstPort 1 } Line { SrcBlock "Cm" SrcPort 1 Points [20, 0; 0, -75] DstBlock "tilde_e1" DstPort 2 } Line { SrcBlock "hat_zeta1" SrcPort 1 Points [55, 0] Branch { Points [0, 0] Branch { Points [0, -40] DstBlock "hat_zeta" DstPort 1 } Branch { Points [0, 75] Branch { Points [0, 65] DstBlock "-bar_S" DstPort 1 } Branch { DstBlock "bar_Am/epsilon" DstPort 1 } } } Branch { DstBlock "Cm" DstPort 1 } } Line { SrcBlock "bar_Am/epsilon" SrcPort 1 Points [-60, 0; 0, -55] DstBlock "dot_hat_zeta" DstPort 3 } Line { SrcBlock "dot_hat_zeta" SrcPort 1 DstBlock "hat_zeta1" DstPort 1 } Line { SrcBlock "epsilon^(pm-1)*Bm*Knom" SrcPort 1 Points [0, -95] DstBlock "dot_hat_zeta" DstPort 2 } Line { SrcBlock "sgn(-bar_sigma)" SrcPort 1 DstBlock "U" DstPort 1 } Line { SrcBlock "U+unom" SrcPort 1 Points [15, 0] Branch { DstBlock "To power\namplifier" DstPort 1 } Branch { Points [0, 60] Branch { Points [0, 0] DstBlock "u" DstPort 1 } Branch { DstBlock "w1" DstPort 1 } } } Line { SrcBlock "U" SrcPort 1 Points [-20, 0] Branch { DstBlock "epsilon^(pm-1)*Bm*Knom" DstPort 1 } Branch { Points [-220, 0; 0, -225] DstBlock "U+unom" DstPort 2 } } Line { SrcBlock "w1" SrcPort 1 Points [0, 10; -30, 0] DstBlock "w" DstPort 1 } Line { SrcBlock "w2" SrcPort 1 Points [0, 20; -100, 0] DstBlock "w" DstPort 2 } Line { SrcBlock "r" SrcPort 1 Points [55, 0; 0, 40] Branch { Points [0, -40] DstBlock "Reference model" DstPort 1 } Branch { Points [-100, 0; 0, 365; 100, 0] DstBlock "w" DstPort 4 } } Line { SrcBlock "theta_nomT" SrcPort 1 Points [-20, 0; 0, -350] DstBlock "U+unom" DstPort 1 } Line { SrcBlock "w" SrcPort 1 Points [0, 30; 0, 0] Branch { DstBlock "theta_nomT" DstPort 1 } Branch { Points [25, 0] Branch { Points [0, 0] DstBlock "||w||^2" DstPort 2 } Branch { Points [0, -15] DstBlock "||w||^2" DstPort 1 } } } Line { SrcBlock "||w||^2" SrcPort 1 DstBlock "||w||" DstPort 1 } Line { SrcBlock "rho" SrcPort 1 Points [0, -30] DstBlock "U" DstPort 2 } Line { SrcBlock "hat_d" SrcPort 1 Points [-60, 0] DstBlock "rho" DstPort 2 } Line { SrcBlock "||w||" SrcPort 1 DstBlock "c1" DstPort 1 } Line { SrcBlock "c1" SrcPort 1 Points [15, 0] DstBlock "rho" DstPort 1 } Line { SrcBlock "From potentiometer" SrcPort 1 DstBlock "m/V\nscale factor" DstPort 1 } Line { SrcBlock "m/V\nscale factor" SrcPort 1 Points [20, 0; 0, 20] Branch { Points [0, 30] Branch { Points [0, 90; -15, 0] Branch { Points [-45, 0] DstBlock "w2" DstPort 1 } Branch { Points [0, 110; -130, 0] DstBlock "w" DstPort 3 } } Branch { DstBlock "y" DstPort 1 } } Branch { DstBlock "error" DstPort 2 } } Line { SrcBlock "-bar_S" SrcPort 1 DstBlock "sgn(-bar_sigma)" DstPort 1 } } }