diff --git a/controls/model/test_model_R2015A.mdl b/controls/model/test_model_R2015A.mdl index bdec86fe72075d99163046fc48e26d1eb4ad7931..e9f89ef1567370796e8fc84617da0252023faa91 100644 --- a/controls/model/test_model_R2015A.mdl +++ b/controls/model/test_model_R2015A.mdl @@ -6,7 +6,7 @@ Model { NumRootInports 0 NumRootOutports 0 ParameterArgumentNames "" - ComputedModelVersion "1.1926" + ComputedModelVersion "1.1990" NumModelReferences 0 NumTestPointedSignals 0 } @@ -45,28 +45,16 @@ Model { $ClassName "Simulink.ExplorerBarInfo" Visible [0] } - Array { - Type "Simulink.EditorInfo" - Dimension 2 - Object { - $ObjectID 5 - IsActive [0] - ViewObjType "SimulinkTopLevel" - LoadSaveID "0" - Extents [1755.0, 904.0] - ZoomFactor [1.25] - Offset [317.9000000000002, 148.73333824475606] - } - Object { - $ObjectID 6 - IsActive [1] - ViewObjType "SimulinkSubsys" - LoadSaveID "573" - Extents [1755.0, 904.0] - ZoomFactor [1.5] - Offset [135.31666666666638, 158.93095238095214] - } - PropName "EditorsInfo" + Object { + $PropName "EditorsInfo" + $ObjectID 5 + $ClassName "Simulink.EditorInfo" + IsActive [1] + ViewObjType "SimulinkSubsys" + LoadSaveID "604" + Extents [1755.0, 906.0] + ZoomFactor [1.25] + Offset [-66.504761904761608, 11.616666666666674] } } } @@ -76,9 +64,9 @@ Model { ModifiedByFormat "%<Auto>" LastModifiedBy "Andy" ModifiedDateFormat "%<Auto>" - LastModifiedDate "Wed Feb 08 12:06:59 2017" - RTWModifiedTimeStamp 408456418 - ModelVersionFormat "1.%<AutoIncrement:1926>" + LastModifiedDate "Fri Feb 17 19:24:55 2017" + RTWModifiedTimeStamp 409260295 + ModelVersionFormat "1.%<AutoIncrement:1990>" ConfigurationManager "none" SampleTimeColors off SampleTimeAnnotations off @@ -119,7 +107,7 @@ Model { TryForcingSFcnDF off Object { $PropName "DataLoggingOverride" - $ObjectID 8 + $ObjectID 7 $ClassName "Simulink.SimulationData.ModelLoggingInfo" model_ "test_model_R2015A" overrideMode_ [0.0] @@ -184,16 +172,16 @@ Model { Type "Handle" Dimension 1 Simulink.ConfigSet { - $ObjectID 9 + $ObjectID 8 Version "1.15.0" Array { Type "Handle" Dimension 8 Simulink.SolverCC { - $ObjectID 10 + $ObjectID 9 Version "1.15.0" StartTime "0.0" - StopTime "10" + StopTime "20" AbsTol "auto" FixedStep "auto" InitialStep "auto" @@ -225,7 +213,7 @@ Model { InsertRTBMode "Whenever possible" } Simulink.DataIOCC { - $ObjectID 11 + $ObjectID 10 Version "1.15.0" Decimation "1" ExternalInput "[t, u]" @@ -258,7 +246,7 @@ Model { Refine "1" } Simulink.OptimizationCC { - $ObjectID 12 + $ObjectID 11 Version "1.15.0" Array { Type "Cell" @@ -315,7 +303,7 @@ Model { AccelVerboseBuild off } Simulink.DebuggingCC { - $ObjectID 13 + $ObjectID 12 Version "1.15.0" RTPrefix "error" ConsistencyChecking "none" @@ -403,7 +391,7 @@ Model { IntegerSaturationMsg "warning" } Simulink.HardwareCC { - $ObjectID 14 + $ObjectID 13 Version "1.15.0" ProdBitPerChar 8 ProdBitPerShort 16 @@ -443,7 +431,7 @@ Model { ProdEqTarget on } Simulink.ModelReferenceCC { - $ObjectID 15 + $ObjectID 14 Version "1.15.0" UpdateModelReferenceTargets "IfOutOfDateOrStructuralChange" CheckModelReferenceTargetMessage "error" @@ -458,7 +446,7 @@ Model { SupportModelReferenceSimTargetCustomCode off } Simulink.SFSimCC { - $ObjectID 16 + $ObjectID 15 Version "1.15.0" SFSimEcho on SimCtrlC on @@ -470,7 +458,7 @@ Model { } Simulink.RTWCC { $BackupClass "Simulink.RTWCC" - $ObjectID 17 + $ObjectID 16 Version "1.15.0" Array { Type "Cell" @@ -538,7 +526,7 @@ Model { Type "Handle" Dimension 2 Simulink.CodeAppCC { - $ObjectID 18 + $ObjectID 17 Version "1.15.0" Array { Type "Cell" @@ -611,7 +599,7 @@ Model { } Simulink.GRTTargetCC { $BackupClass "Simulink.TargetCC" - $ObjectID 19 + $ObjectID 18 Version "1.15.0" Array { Type "Cell" @@ -707,11 +695,11 @@ Model { } Simulink.ConfigSet { $PropName "ActiveConfigurationSet" - $ObjectID 9 + $ObjectID 8 } Object { $PropName "DataTransfer" - $ObjectID 21 + $ObjectID 20 $ClassName "Simulink.GlobalDataTransfer" DefaultTransitionBetweenSyncTasks "Ensure deterministic transfer (maximum delay)" DefaultTransitionBetweenAsyncTasks "Ensure data integrity only" @@ -1051,7 +1039,7 @@ Model { ShowPageBoundaries off ZoomFactor "125" ReportName "simulink-default.rpt" - SIDHighWatermark "864" + SIDHighWatermark "876" Block { BlockType SubSystem Name " Sensors " @@ -1060,12 +1048,11 @@ Model { Position [1300, 422, 1520, 658] ZOrder 73 ShowName off - Commented "on" RequestExecContextInheritance off Variant off Object { $PropName "MaskObject" - $ObjectID 22 + $ObjectID 21 $ClassName "Simulink.Mask" Display "port_label('input', 1, '^{B}Omega', 'texmode', 'on');\nport_label('input', 2, '\\Theta', 'texmode', 'on');" "\nport_label('input', 3, '^{B}v_o', 'texmode', 'on');\nport_label('input', 4, '^{E}r_o', 'texmode', 'on');\nport_labe" @@ -1153,7 +1140,7 @@ Model { Variant off Object { $PropName "MaskObject" - $ObjectID 23 + $ObjectID 22 $ClassName "Simulink.Mask" Display "port_label('input',1,'r_{o}','texmode','on')\nport_label('input',2,'\\Theta','texmode','on')" } @@ -1650,7 +1637,7 @@ Model { Variant off Object { $PropName "MaskObject" - $ObjectID 24 + $ObjectID 23 $ClassName "Simulink.Mask" Display "port_label('input',1, '\\Theta','texmode','on')\nport_label('input',2,'r_{o}','texmode','on')" } @@ -2152,7 +2139,7 @@ Model { Variant off Object { $PropName "MaskObject" - $ObjectID 25 + $ObjectID 24 $ClassName "Simulink.Mask" Display "port_label('input', 1, 'Gyroscope Reading', 'texmode', 'on');\nport_label('input', 2, '\\Theta_{IMU" "}', 'texmode', 'on');\nport_label('output', 1, 'd\\Theta_{Gyro}/dt', 'texmode', 'on');\ndisp('A_{EB}', 'texmode'," @@ -2290,7 +2277,7 @@ Model { Variant off Object { $PropName "MaskObject" - $ObjectID 26 + $ObjectID 25 $ClassName "Simulink.Mask" Display "port_label('input', 1, 'Accelerometer Reading', 'texmode', 'on');\nport_label('output', 1, '\\theta" "_{accel}', 'texmode', 'on');\nport_label('output', 2, '\\phi_{accel}', 'texmode', 'on');\ndisp('Calculate Pitch a" @@ -2451,7 +2438,7 @@ Model { Variant off Object { $PropName "MaskObject" - $ObjectID 27 + $ObjectID 26 $ClassName "Simulink.Mask" Display "port_label('input', 1, '\\theta_{accel}', 'texmode', 'on');\nport_label('input', 2, '\\phi_{accel}'" ", 'texmode', 'on');\nport_label('input', 3, '\\Theta_{Gyro}', 'texmode', 'on');\n%port_label('input', 4, '\\Theta" @@ -2676,7 +2663,7 @@ Model { Variant off Object { $PropName "MaskObject" - $ObjectID 28 + $ObjectID 27 $ClassName "Simulink.Mask" Display "port_label('input', 1, '^{B}dv_o/dt', 'texmode', 'on')\nport_label('input', 2, '^{B}v_o', 'texmode'" ", 'on')\nport_label('input', 3, '^{B}\\Omega', 'texmode', 'on')\nport_label('input', 4, '^{B}g', 'texmode', 'on')" @@ -2749,7 +2736,7 @@ Model { Variant off Object { $PropName "MaskObject" - $ObjectID 29 + $ObjectID 28 $ClassName "Simulink.Mask" Display "port_label('input', 1, '^{B}dv_o/dt', 'texmode', 'on')\nport_label('input', 2, '^{B}v_o', 'texmode', 'on'" ")\nport_label('input', 3, '^{B}\\Omega', 'texmode', 'on')\nport_label('input', 4, '^{B}g', 'texmode', 'on')\nport_la" @@ -3653,7 +3640,7 @@ Model { Variant off Object { $PropName "MaskObject" - $ObjectID 30 + $ObjectID 29 $ClassName "Simulink.Mask" Display "port_label('input', 1, '^{E}r_o', 'texmode', 'on');\nport_label('input', 2, '\\psi', 'texmode', 'on" "');\nport_label('output', 1, '^{E}r_o camera', 'texmode', 'on');\nport_label('output', 2, '\\psi camera', 'texmod" @@ -4189,12 +4176,12 @@ Model { EnableBusSupport off Object { $PropName "MaskObject" - $ObjectID 31 + $ObjectID 30 $ClassName "Simulink.Mask" Display "color('red')\ndisp('Soft Real Time')\n" Object { $PropName "Parameters" - $ObjectID 32 + $ObjectID 31 $ClassName "Simulink.MaskParameter" Type "edit" Name "x" @@ -4529,14 +4516,14 @@ Model { Name "Actuation" SID "436" Ports [1, 6] - Position [950, 426, 1200, 654] + Position [955, 426, 1205, 654] ZOrder 71 ShowName off RequestExecContextInheritance off Variant off Object { $PropName "MaskObject" - $ObjectID 33 + $ObjectID 32 $ClassName "Simulink.Mask" Display "port_label('input', 1, 'Rotor Duty Cycles', 'texmode', 'on');\nport_label('output', 1, '^{B}Omega', 'texmo" "de', 'on');\nport_label('output', 2, '\\Theta', 'texmode', 'on');\nport_label('output', 3, '^{B}v_o', 'texmode', 'on'" @@ -4557,7 +4544,7 @@ Model { TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000] TiledPageScale 1 ShowPageBoundaries off - ZoomFactor "60" + ZoomFactor "50" Block { BlockType Inport Name "Rotor Duty Cycles" @@ -4582,7 +4569,7 @@ Model { Variant off Object { $PropName "MaskObject" - $ObjectID 34 + $ObjectID 33 $ClassName "Simulink.Mask" Display "port_label('input', 1, '^B\\Omega', 'texmode', 'on');\nport_label('input', 2, '\\Theta', 'texmode'," " 'on');\nport_label('output', 1, 'd\\Theta/dt', 'texmode', 'on');\ndisp('A_{EB}', 'texmode', 'on');" @@ -4864,7 +4851,7 @@ Model { Variant off Object { $PropName "MaskObject" - $ObjectID 35 + $ObjectID 34 $ClassName "Simulink.Mask" Display "port_label('input', 1, 'Rotor Duty Cycle', 'texmode', 'on');\nport_label('output', 1, 'Vb_{eff}', '" "texmode', 'on');\ndisp('ESC System');" @@ -4985,7 +4972,7 @@ Model { Variant off Object { $PropName "MaskObject" - $ObjectID 36 + $ObjectID 35 $ClassName "Simulink.Mask" Display "port_label('output', 1, '^EF_g', 'texmode', 'on');\nfprintf('Gravity');\n" } @@ -5150,7 +5137,7 @@ Model { Variant off Object { $PropName "MaskObject" - $ObjectID 37 + $ObjectID 36 $ClassName "Simulink.Mask" Display "port_label('input', 1, '^Bv_o', 'texmode', 'on');\nport_label('input', 2, '\\Theta', 'texmode', 'on" "');\nport_label('output', 1, '^Ev_o', 'texmode', 'on');\ndisp('L_{EB}', 'texmode', 'on');" @@ -5287,7 +5274,7 @@ Model { Variant off Object { $PropName "MaskObject" - $ObjectID 38 + $ObjectID 37 $ClassName "Simulink.Mask" Display "port_label('input', 1, '^EF_g', 'texmode', 'on');\nport_label('input', 2, '\\Theta', 'texmode', 'on" "');\nport_label('output', 1, '^BF_g', 'texmode', 'on');\ndisp('L_{BE}', 'texmode', 'on');" @@ -5448,7 +5435,7 @@ Model { Variant off Object { $PropName "MaskObject" - $ObjectID 39 + $ObjectID 38 $ClassName "Simulink.Mask" Display "port_label('input', 1, 'Vb_{eff}', 'texmode', 'on');\nport_label('input', 2, '\\omega', 'texmode', " "'on');\nport_label('output', 1, '\\alpha', 'texmode', 'on');\ndisp('Motor System');\n" @@ -5585,7 +5572,7 @@ Model { Variant off Object { $PropName "MaskObject" - $ObjectID 40 + $ObjectID 39 $ClassName "Simulink.Mask" Display "port_label('input', 1, '\\alpha', 'texmode', 'on');\nport_label('input', 2, '\\omega', 'texmode', '" "on');\nport_label('input', 3, '^BF_g', 'texmode', 'on');\nport_label('input', 4, '^B\\Omega', 'texmode', 'on');\n" @@ -5797,8 +5784,8 @@ Model { MaxDataPoints 5000 SaveToWorkspace off SaveName ScopeData - YMin 5.92023 - YMax 7.92023 + YMin -1.3875 + YMax 12.4875 SampleInput off SampleTime -1 ZoomMode on @@ -5819,7 +5806,7 @@ Model { LineWidths "[0.5 0.5 0.5 0.5 0.5 0.5]" MarkerStyles "none|none|none|none|none|none" } - Location [1 76 1921 1039] + Location [1 431.666666666667 1281 1039] } Block { BlockType Scope @@ -6736,7 +6723,7 @@ Model { Variant off Object { $PropName "MaskObject" - $ObjectID 41 + $ObjectID 40 $ClassName "Simulink.Mask" Display "port_label('output', 1, 'Setpoints', 'texmode', 'on');" } @@ -6754,7 +6741,7 @@ Model { TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000] TiledPageScale 1 ShowPageBoundaries off - ZoomFactor "300" + ZoomFactor "400" Block { BlockType Step Name "Step" @@ -6763,7 +6750,7 @@ Model { ZOrder 32 Time "0" Before "[0; 0; 0; 0]" - After "[1; 0; 0; 0]" + After "[1; 1; 1; 0]" SampleTime "0" } Block { @@ -6795,7 +6782,7 @@ Model { Variant off Object { $PropName "MaskObject" - $ObjectID 42 + $ObjectID 41 $ClassName "Simulink.Mask" Display "port_label('input', 1, 'Setpoints', 'texmode', 'on');\nport_label('input', 2, '\\Theta_{filtered}', 'texmo" "de', 'on');\nport_label('input', 3, 'd\\Theta_{gyro}/dt', 'texmode', 'on');\nport_label('input', 4, '^{E}r_o', 'texmo" @@ -6815,7 +6802,7 @@ Model { TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000] TiledPageScale 1 ShowPageBoundaries off - ZoomFactor "150" + ZoomFactor "125" Block { BlockType Inport Name "setpoints" @@ -6862,7 +6849,7 @@ Model { Variant off Object { $PropName "MaskObject" - $ObjectID 43 + $ObjectID 42 $ClassName "Simulink.Mask" Display "port_label('input', 1, '^{E}r_{x,setpoint}', 'texmode', 'on');\nport_label('input', 2, '^{E}r_{y,se" "tpoint}', 'texmode', 'on');\nport_label('input', 3, '^{E}r_{z,setpoint}', 'texmode', 'on');\nport_label('input', " @@ -6888,7 +6875,7 @@ Model { TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000] TiledPageScale 1 ShowPageBoundaries off - ZoomFactor "100" + ZoomFactor "125" Block { BlockType Inport Name "x_setpoint" @@ -7010,26 +6997,26 @@ Model { Block { BlockType Reference Name "PID Controller1" - SID "590" + SID "873" Ports [1, 1] - Position [260, 392, 300, 428] - ZOrder 32 + Position [545, 392, 585, 428] + ZOrder 142 LibraryVersion "1.388" SourceBlock "simulink/Continuous/PID Controller" SourceType "PID 1dof" ContentPreviewEnabled off - Controller "PID" - TimeDomain "Continuous-time" + Controller "P" + TimeDomain "Discrete-time" SampleTime "-1" IntegratorMethod "Forward Euler" FilterMethod "Forward Euler" Form "Parallel" UseFilter on ControllerParametersSource "internal" - P "-4.09881115615483" - I "-0.786626898521519" - D "-2.54021507170204" - N "2907.76761508735" + P "11704.603181499" + I "1575.82088970639" + D "504.111397357926" + N "244.660686071579" InitialConditionSource "internal" InitialConditionForIntegrator "0" InitialConditionForFilter "0" @@ -7143,17 +7130,17 @@ Model { SourceType "PID 1dof" ContentPreviewEnabled off Controller "PID" - TimeDomain "Continuous-time" + TimeDomain "Discrete-time" SampleTime "-1" IntegratorMethod "Forward Euler" FilterMethod "Forward Euler" Form "Parallel" UseFilter on ControllerParametersSource "internal" - P "9.8515811170609" - I "10.3080265333453" - D "1.32394710402659" - N "7.32609641947859" + P "18.2047089970703" + I "41.2370914044818" + D "0.164227327211332" + N "17.8214030142826" InitialConditionSource "internal" InitialConditionForIntegrator "0" InitialConditionForFilter "0" @@ -7267,17 +7254,17 @@ Model { SourceType "PID 1dof" ContentPreviewEnabled off Controller "PID" - TimeDomain "Continuous-time" + TimeDomain "Discrete-time" SampleTime "-1" IntegratorMethod "Forward Euler" FilterMethod "Forward Euler" Form "Parallel" UseFilter on ControllerParametersSource "internal" - P "-5.58*5" - I "-0.323" - D "-15.5*0.6" - N "1/0.00106" + P "-3138.91816077077" + I "-320.189162634817" + D "-7421.98260028101" + N "5.79502261645411" InitialConditionSource "internal" InitialConditionForIntegrator "0" InitialConditionForFilter "0" @@ -7391,14 +7378,14 @@ Model { SourceType "PID 1dof" ContentPreviewEnabled off Controller "P" - TimeDomain "Continuous-time" + TimeDomain "Discrete-time" SampleTime "-1" IntegratorMethod "Forward Euler" FilterMethod "Forward Euler" Form "Parallel" UseFilter on ControllerParametersSource "internal" - P "-359098.201085257" + P "73938.0302695888" I "-77.7" D "2.32" N "1/0.0818" @@ -7505,27 +7492,27 @@ Model { } Block { BlockType Reference - Name "PID Controller4" - SID "854" + Name "PID Controller3" + SID "874" Ports [1, 1] Position [405, 392, 445, 428] - ZOrder 128 + ZOrder 143 LibraryVersion "1.388" SourceBlock "simulink/Continuous/PID Controller" SourceType "PID 1dof" ContentPreviewEnabled off - Controller "PD" - TimeDomain "Continuous-time" + Controller "P" + TimeDomain "Discrete-time" SampleTime "-1" IntegratorMethod "Forward Euler" FilterMethod "Forward Euler" Form "Parallel" UseFilter on ControllerParametersSource "internal" - P "49.9288564716647" + P "7.19768640475995" I "35.1207902652377" - D "1.71644717082694" - N "5320.80923448602" + D "0.410623594074865" + N "40.0107970227961" InitialConditionSource "internal" InitialConditionForIntegrator "0" InitialConditionForFilter "0" @@ -7629,27 +7616,27 @@ Model { } Block { BlockType Reference - Name "PID Controller5" - SID "594" + Name "PID Controller4" + SID "876" Ports [1, 1] - Position [405, 237, 445, 273] - ZOrder 36 + Position [260, 392, 300, 428] + ZOrder 145 LibraryVersion "1.388" SourceBlock "simulink/Continuous/PID Controller" SourceType "PID 1dof" ContentPreviewEnabled off - Controller "PD" - TimeDomain "Continuous-time" + Controller "PID" + TimeDomain "Discrete-time" SampleTime "-1" IntegratorMethod "Forward Euler" FilterMethod "Forward Euler" Form "Parallel" UseFilter on ControllerParametersSource "internal" - P "0.718*5" - I "0" - D "2.15" - N "100" + P "-0.0367011843201958" + I "-0.000988506276189655" + D "-0.12757930213039" + N "2.69036257045651" InitialConditionSource "internal" InitialConditionForIntegrator "0" InitialConditionForFilter "0" @@ -7753,27 +7740,27 @@ Model { } Block { BlockType Reference - Name "PID Controller7" - SID "596" + Name "PID Controller6" + SID "867" Ports [1, 1] - Position [545, 392, 585, 428] - ZOrder 133 + Position [260, 237, 300, 273] + ZOrder 136 LibraryVersion "1.388" SourceBlock "simulink/Continuous/PID Controller" SourceType "PID 1dof" ContentPreviewEnabled off - Controller "PD" - TimeDomain "Continuous-time" + Controller "PID" + TimeDomain "Discrete-time" SampleTime "-1" IntegratorMethod "Forward Euler" FilterMethod "Forward Euler" Form "Parallel" UseFilter on ControllerParametersSource "internal" - P "18237.343549923" - I "1575.82088970639" - D "674.387075196541" - N "309.449971015086" + P "0.0367011843201958" + I "0.000988506276189655" + D "0.12757930213039" + N "2.69036257045651" InitialConditionSource "internal" InitialConditionForIntegrator "0" InitialConditionForFilter "0" @@ -7878,26 +7865,26 @@ Model { Block { BlockType Reference Name "PID Controller8" - SID "597" + SID "868" Ports [1, 1] - Position [545, 237, 585, 273] - ZOrder 39 + Position [405, 237, 445, 273] + ZOrder 137 LibraryVersion "1.388" SourceBlock "simulink/Continuous/PID Controller" SourceType "PID 1dof" ContentPreviewEnabled off Controller "P" - TimeDomain "Continuous-time" + TimeDomain "Discrete-time" SampleTime "-1" IntegratorMethod "Forward Euler" FilterMethod "Forward Euler" Form "Parallel" UseFilter on ControllerParametersSource "internal" - P "20" - I "0" - D "0" - N "100" + P "7.19768640475995" + I "35.1207902652377" + D "0.410623594074865" + N "40.0107970227961" InitialConditionSource "internal" InitialConditionForIntegrator "0" InitialConditionForFilter "0" @@ -8002,26 +7989,26 @@ Model { Block { BlockType Reference Name "PID Controller9" - SID "829" + SID "869" Ports [1, 1] - Position [260, 237, 300, 273] - ZOrder 120 + Position [545, 237, 585, 273] + ZOrder 138 LibraryVersion "1.388" SourceBlock "simulink/Continuous/PID Controller" SourceType "PID 1dof" ContentPreviewEnabled off - Controller "PID" - TimeDomain "Continuous-time" + Controller "P" + TimeDomain "Discrete-time" SampleTime "-1" IntegratorMethod "Forward Euler" FilterMethod "Forward Euler" Form "Parallel" UseFilter on ControllerParametersSource "internal" - P "0.7" - I "0.114" - D "0.596" - N "1/0.00195" + P "11704.603181499" + I "1575.82088970639" + D "504.111397357926" + N "244.660686071579" InitialConditionSource "internal" InitialConditionForIntegrator "0" InitialConditionForFilter "0" @@ -8179,8 +8166,8 @@ Model { MaxDataPoints 5000 SaveToWorkspace off SaveName ScopeData2 - YMin -6.26281 - YMax 31.28638 + YMin -0.00426 + YMax 0.00536 SampleInput off SampleTime -1 ZoomMode on @@ -8219,8 +8206,8 @@ Model { MaxDataPoints 5000 SaveToWorkspace off SaveName ScopeData5 - YMin -1.20714 - YMax 0.22148 + YMin -0.14356 + YMax 1.29207 SampleInput off SampleTime -1 ZoomMode on @@ -8231,16 +8218,6 @@ Model { ListType AxesTitles axes1 "%<SignalLabel>" } - List { - ListType ScopeGraphics - FigureColor "[0.156862745098039 0.156862745098039 0.156862745098039]" - AxesColor "[0 0 0]" - AxesTickColor "[0.686274509803922 0.686274509803922 0.686274509803922]" - LineColors "[1 1 0;1 0 1;0 1 1;1 0 0;0 1 0;0 0 1]" - LineStyles "-|-|-|-|-|-" - LineWidths "[0.5 0.5 0.5 0.5 0.5 0.5]" - MarkerStyles "none|none|none|none|none|none" - } Location [1 76 1921 1039] } Block { @@ -8339,8 +8316,8 @@ Model { MaxDataPoints 5000 SaveToWorkspace off SaveName ScopeData3 - YMin -0.14703 - YMax 1.31859 + YMin -8.5404 + YMax 73.19137 SampleInput off SampleTime -1 ZoomMode on @@ -8351,16 +8328,6 @@ Model { ListType AxesTitles axes1 "%<SignalLabel>" } - List { - ListType ScopeGraphics - FigureColor "[0.156862745098039 0.156862745098039 0.156862745098039]" - AxesColor "[0 0 0]" - AxesTickColor "[0.686274509803922 0.686274509803922 0.686274509803922]" - LineColors "[1 1 0;1 0 1;0 1 1;1 0 0;0 1 0;0 0 1]" - LineStyles "-|-|-|-|-|-" - LineWidths "[0.5 0.5 0.5 0.5 0.5 0.5]" - MarkerStyles "none|none|none|none|none|none" - } Location [1 76 1921 1039] } Block { @@ -8459,8 +8426,8 @@ Model { MaxDataPoints 5000 SaveToWorkspace off SaveName ScopeData3 - YMin -81.1648 - YMax 21.11528 + YMin -36.42496 + YMax 11.06872 SampleInput off SampleTime -1 ZoomMode on @@ -8471,16 +8438,6 @@ Model { ListType AxesTitles axes1 "%<SignalLabel>" } - List { - ListType ScopeGraphics - FigureColor "[0.156862745098039 0.156862745098039 0.156862745098039]" - AxesColor "[0 0 0]" - AxesTickColor "[0.686274509803922 0.686274509803922 0.686274509803922]" - LineColors "[1 1 0;1 0 1;0 1 1;1 0 0;0 1 0;0 0 1]" - LineStyles "-|-|-|-|-|-" - LineWidths "[0.5 0.5 0.5 0.5 0.5 0.5]" - MarkerStyles "none|none|none|none|none|none" - } Location [1 76 1921 1039] } Block { @@ -8831,45 +8788,31 @@ Model { DstPort 1 } Line { - ZOrder 207 + ZOrder 436 SrcBlock "Sum1" SrcPort 1 - DstBlock "PID Controller5" - DstPort 1 - } - Line { - ZOrder 212 - SrcBlock "Sum2" - SrcPort 1 DstBlock "PID Controller8" DstPort 1 } Line { - ZOrder 216 - SrcBlock "PID Controller5" - SrcPort 1 - DstBlock "Sum2" - DstPort 1 - } - Line { - ZOrder 243 - SrcBlock "PID Controller9" + ZOrder 434 + SrcBlock "Sum2" SrcPort 1 - DstBlock "Sum1" + DstBlock "PID Controller9" DstPort 1 } Line { - ZOrder 244 + ZOrder 416 SrcBlock "Sum6" SrcPort 1 - DstBlock "PID Controller9" + DstBlock "PID Controller6" DstPort 1 } Line { - ZOrder 247 + ZOrder 461 SrcBlock "Sum5" SrcPort 1 - DstBlock "PID Controller1" + DstBlock "PID Controller4" DstPort 1 } Line { @@ -8887,47 +8830,68 @@ Model { DstPort 1 } Line { - ZOrder 349 - SrcBlock "Sum3" + ZOrder 451 + SrcBlock "Sum4" SrcPort 1 - DstBlock "PID Controller4" + DstBlock "PID Controller1" DstPort 1 } Line { - ZOrder 388 - SrcBlock "Sum4" + ZOrder 413 + SrcBlock "PID Controller10" SrcPort 1 - DstBlock "PID Controller7" + DstBlock "Sum" DstPort 1 } Line { - ZOrder 401 - SrcBlock "PID Controller10" + ZOrder 449 + SrcBlock "PID Controller8" SrcPort 1 - DstBlock "Sum" + DstBlock "Sum2" DstPort 1 } Line { - ZOrder 404 - SrcBlock "PID Controller7" + ZOrder 450 + SrcBlock "PID Controller6" + SrcPort 1 + DstBlock "Sum1" + DstPort 1 + } + Line { + ZOrder 456 + SrcBlock "PID Controller1" SrcPort 1 DstBlock "x_controlled" DstPort 1 } Line { - ZOrder 408 - SrcBlock "PID Controller4" + ZOrder 458 + SrcBlock "PID Controller3" SrcPort 1 DstBlock "Sum4" DstPort 1 } Line { - ZOrder 409 - SrcBlock "PID Controller1" + ZOrder 459 + SrcBlock "Sum3" + SrcPort 1 + DstBlock "PID Controller3" + DstPort 1 + } + Line { + ZOrder 462 + SrcBlock "PID Controller4" SrcPort 1 DstBlock "Sum3" DstPort 1 } + Line { + ZOrder 464 + SrcBlock "PID Controller9" + SrcPort 1 + DstBlock "y_controlled" + DstPort 1 + } } } Block { @@ -9182,7 +9146,7 @@ Model { LineWidths "[0.5 0.5 0.5 0.5 0.5 0.5]" MarkerStyles "none|none|none|none|none|none" } - Location [1 76 1921 1039] + Location [1 431.666666666667 1281 1039] } Block { BlockType Sum @@ -9528,29 +9492,71 @@ Model { DstPort 1 } Line { - ZOrder 186 + ZOrder 189 + SrcBlock "Actuation" + SrcPort 1 + DstBlock " Sensors " + DstPort 1 + } + Line { + ZOrder 190 SrcBlock "Actuation" SrcPort 2 - Points [9, 0; 0, 192; -583, 0; 0, -162] - DstBlock "Control System" + DstBlock " Sensors " DstPort 2 } Line { - ZOrder 187 + ZOrder 191 SrcBlock "Actuation" - SrcPort 1 - Points [2, 0; 0, 246; -590, 0; 0, -121] - DstBlock "Control System" + SrcPort 3 + DstBlock " Sensors " DstPort 3 } Line { - ZOrder 188 + ZOrder 192 SrcBlock "Actuation" SrcPort 4 - Points [23, 0; 0, 140; -604, 0; 0, -80] + DstBlock " Sensors " + DstPort 4 + } + Line { + ZOrder 193 + SrcBlock "Actuation" + SrcPort 5 + DstBlock " Sensors " + DstPort 5 + } + Line { + ZOrder 194 + SrcBlock "Actuation" + SrcPort 6 + DstBlock " Sensors " + DstPort 6 + } + Line { + ZOrder 195 + SrcBlock " Sensors " + SrcPort 3 + Points [9, 0; 0, 52; -903, 0; 0, -52] DstBlock "Control System" DstPort 4 } + Line { + ZOrder 196 + SrcBlock " Sensors " + SrcPort 2 + Points [16, 0; 0, 146; -924, 0; 0, -121] + DstBlock "Control System" + DstPort 3 + } + Line { + ZOrder 197 + SrcBlock " Sensors " + SrcPort 1 + Points [23, 0; 0, 240; -940, 0; 0, -190] + DstBlock "Control System" + DstPort 2 + } } } #Finite State Machines @@ -10500,35 +10506,38 @@ Stateflow { eml { isEML 1 script "function [B_omega_dot, B_vo_dot]= rotor(angular_acceleration, angular_velocity, B_Fg, B_omega, B_" - "vo, m, Kt, Kd, rhx, rhy, rhz, Jreq, Jxx, Jyy, Jzz)\n\nB_vo_dot = zeros(3,1);\nB_omega_dot = zeros(3,1);\n\n% Cre" - "ate J vector\nJ = [Jxx, 0 , 0 ; ...\n 0 , Jyy, 0 ; ...\n 0 , 0 , Jzz;];\n\n% Create r_hi vector\nr" - "h_0 = [-rhx; rhy; rhz];\nrh_1 = [rhx; rhy; rhz];\nrh_2 = [-rhx; -rhy; rhz];\nrh_3 = [rhx; -rhy; rhz];\n\n% Defin" - "e vector from body frame origin to center of mass\nbr_oc = [0; 0; 0];\n\n% Define 3x3 Identity Matrix\nI = eye(3" - ");\n\n% Create gamma vectors\ngamma_Ti = [0; 0; -1];\ngamma_omega_03 = [0; 0; -1]; %Rotors 0 and 3 use this gam" - "ma_omega vector\ngamma_omega_12 = [0; 0; 1]; %Rotors 1 and 2 use this gamma_omega vector\n\n% Define angular vel" - "ocities for each rotor\nw_0 = angular_velocity(1);\nw_1 = angular_velocity(2);\nw_2 = angular_velocity(3);\nw_3 " - "= angular_velocity(4);\n\n% Define angular acceleration for each rotor\nw_0_dot = angular_acceleration(1);\nw_1_" - "dot = angular_acceleration(2);\nw_2_dot = angular_acceleration(3);\nw_3_dot = angular_acceleration(4);\n\n% Defi" - "ne the rotor force in the z-direction from each rotor\nB_Fr_0 = Kt * w_0 * w_0 * gamma_Ti;\nB_Fr_1 = Kt * w_1 * " - "w_1 * gamma_Ti;\nB_Fr_2 = Kt * w_2 * w_2 * gamma_Ti;\nB_Fr_3 = Kt * w_3 * w_3 * gamma_Ti;\n\n% Sum up the rotor " - "forces in the z-direction from each vector to get the\n% total body force in the z-direction\nB_Fr = B_Fr_0 + B_" - "Fr_1 + B_Fr_2 + B_Fr_3;\n\n% Define the in-plane drag and induced torque produced by each rotor\n B_Q_d0 = -1 * " - "Kd * w_0 * w_0 * gamma_omega_03;\n B_Q_d1 = -1 * Kd * w_1 * w_1 * gamma_omega_12;\n B_Q_d2 = -1 * Kd * w_2 * w_2" - " * gamma_omega_12;\n B_Q_d3 = -1 * Kd * w_3 * w_3 * gamma_omega_03;\n\n% Sum up the total in-plane drag and indu" - "ced torque to get the total\n% in-plane drag and induced torque on the body\nB_Q_d = B_Q_d0 + B_Q_d1 + B_Q_d2 + " - "B_Q_d3;\n\n% Define the force lever arm torque created from the force produced by each\n% rotor in the z-directi" - "on\nB_Q_F0 = cross( rh_0, B_Fr_0 );\nB_Q_F1 = cross( rh_1, B_Fr_1 );\nB_Q_F2 = cross( rh_2, B_Fr_2 );\nB_Q_F3 = " - "cross( rh_3, B_Fr_3 );\n\nB_Q_F = B_Q_F0 + B_Q_F1 + B_Q_F2 + B_Q_F3;\n\n%Define the change in angular momentum t" - "orque produced by each rotor \nB_Q_L0 = -1 * Jreq * ( cross(B_omega, w_0 * gamma_omega_03) + w_0_dot * gamma_ome" - "ga_03 );\nB_Q_L1 = -1 * Jreq * ( cross(B_omega, w_1 * gamma_omega_12) + w_1_dot * gamma_omega_12 ); \nB_Q_L2 = -" - "1 * Jreq * ( cross(B_omega, w_2 * gamma_omega_12) + w_2_dot * gamma_omega_12 ); \nB_Q_L3 = -1 * Jreq * ( cross(B" - "_omega, w_3 * gamma_omega_03) + w_3_dot * gamma_omega_03 );\n\n% Sum up the total change in angular momentum tor" - "que produced by each rotor\nB_Q_L = B_Q_L0 + B_Q_L1 + B_Q_L2 + B_Q_L3;\n\n% Define the total rotor system torque" - " as the sum of the in-plane drag and\n% induced torque, force lever arm torque, and change in angular momentum\n" - "% torques\nB_Q = B_Q_d + B_Q_F + B_Q_L;\n\n% Define the body forces in the z-direction from each vector to get t" - "he\n% total body force in the z-direction\nB_F = B_Fr + B_Fg; \n\n% Define the body frame linear velocities\nB_v" - "o_dot = (m*I)^(-1) * ( B_F - cross( B_omega, m*(B_vo + cross(B_omega, br_oc)) ) );\n\n% Define the body frame an" - "gular velocities\nB_omega_dot = J ^(-1) * ( B_Q - cross(B_omega, J * B_omega) - cross(br_oc, B_F) );\n\n" + "vo, m, Kt, Kd, rhx, rhy, rhz, Jreq, Jxx, Jyy, Jzz)\n\n%B_vo_dot = zeros(3,1);\n%B_omega_dot = zeros(3,1);\n\n% C" + "reate J vector\nJ = [Jxx, 0 , 0 ; ...\n 0 , Jyy, 0 ; ...\n 0 , 0 , Jzz;];\n\n% Create r_hi vector\n" + "% rh_0 = [-rhx; rhy; rhz];\n% rh_1 = [rhx; rhy; rhz];\n% rh_2 = [-rhx; -rhy; rhz];\n% rh_3 = [rhx; -rhy; rhz];\n" + "rh_0 = [-rhx; rhy; -rhz];\nrh_1 = [rhx; rhy; -rhz];\nrh_2 = [-rhx; -rhy; -rhz];\nrh_3 = [rhx; -rhy; -rhz];\n\n% " + "Define vector from body frame origin to center of mass\nbr_oc = [0; 0; 0];\n\n% Define 3x3 Identity Matrix\nI = " + "eye(3);\n\n% Create gamma vectors\ngamma_Ti = [0; 0; -1];\n%gamma_omega_03 = [0; 0; -1]; %Rotors 0 and 3 use th" + "is gamma_omega vector\n%gamma_omega_12 = [0; 0; 1]; %Rotors 1 and 2 use this gamma_omega vector\ngamma_omega_03 " + "= [0; 0; 1]; %Rotors 0 and 3 use this gamma_omega vector\ngamma_omega_12 = [0; 0; -1]; %Rotors 1 and 2 use this" + " gamma_omega vector\n\n% Define angular velocities for each rotor\nw_0 = angular_velocity(1);\nw_1 = angular_vel" + "ocity(2);\nw_2 = angular_velocity(3);\nw_3 = angular_velocity(4);\n\n% Define angular acceleration for each roto" + "r\nw_0_dot = angular_acceleration(1);\nw_1_dot = angular_acceleration(2);\nw_2_dot = angular_acceleration(3);\nw" + "_3_dot = angular_acceleration(4);\n\n% Define the rotor force in the z-direction from each rotor\nB_Fr_0 = Kt * " + "w_0 * w_0 * gamma_Ti;\nB_Fr_1 = Kt * w_1 * w_1 * gamma_Ti;\nB_Fr_2 = Kt * w_2 * w_2 * gamma_Ti;\nB_Fr_3 = Kt * w" + "_3 * w_3 * gamma_Ti;\n\n% Sum up the rotor forces in the z-direction from each vector to get the\n% total body f" + "orce in the z-direction\nB_Fr = B_Fr_0 + B_Fr_1 + B_Fr_2 + B_Fr_3;\n\n% Define the in-plane drag and induced tor" + "que produced by each rotor\n B_Q_d0 = -1 * Kd * w_0 * w_0 * gamma_omega_03;\n B_Q_d1 = -1 * Kd * w_1 * w_1 * gam" + "ma_omega_12;\n B_Q_d2 = -1 * Kd * w_2 * w_2 * gamma_omega_12;\n B_Q_d3 = -1 * Kd * w_3 * w_3 * gamma_omega_03;\n" + "\n% Sum up the total in-plane drag and induced torque to get the total\n% in-plane drag and induced torque on th" + "e body\nB_Q_d = B_Q_d0 + B_Q_d1 + B_Q_d2 + B_Q_d3;\n\n% Define the force lever arm torque created from the force" + " produced by each\n% rotor in the z-direction\nB_Q_F0 = cross( rh_0, B_Fr_0 );\nB_Q_F1 = cross( rh_1, B_Fr_1 );\n" + "B_Q_F2 = cross( rh_2, B_Fr_2 );\nB_Q_F3 = cross( rh_3, B_Fr_3 );\n\nB_Q_F = B_Q_F0 + B_Q_F1 + B_Q_F2 + B_Q_F3;\n" + "\n%Define the change in angular momentum torque produced by each rotor \nB_Q_L0 = -1 * Jreq * ( cross(B_omega, w" + "_0 * gamma_omega_03) + w_0_dot * gamma_omega_03 );\nB_Q_L1 = -1 * Jreq * ( cross(B_omega, w_1 * gamma_omega_12) " + "+ w_1_dot * gamma_omega_12 ); \nB_Q_L2 = -1 * Jreq * ( cross(B_omega, w_2 * gamma_omega_12) + w_2_dot * gamma_om" + "ega_12 ); \nB_Q_L3 = -1 * Jreq * ( cross(B_omega, w_3 * gamma_omega_03) + w_3_dot * gamma_omega_03 );\n\n% Sum u" + "p the total change in angular momentum torque produced by each rotor\nB_Q_L = B_Q_L0 + B_Q_L1 + B_Q_L2 + B_Q_L3;" + "\n\n% Define the total rotor system torque as the sum of the in-plane drag and\n% induced torque, force lever ar" + "m torque, and change in angular momentum\n% torques\nB_Q = B_Q_d + B_Q_F + B_Q_L;\n\n% Define the body forces in" + " the z-direction from each vector to get the\n% total body force in the z-direction\nB_F = B_Fr + B_Fg; \n\n% De" + "fine the body frame linear velocities\nB_vo_dot = (m*I)^(-1) * ( B_F - cross( B_omega, m*(B_vo + cross(B_omega, " + "br_oc)) ) );\n\n% Define the body frame angular velocities\nB_omega_dot = J ^(-1) * ( B_Q - cross(B_omega, J * B" + "_omega) - cross(br_oc, B_F) );\n\n" editorLayout "100 M4x1[10 5 700 500]" } }