diff --git a/controls/model/test_model_R2015A.mdl b/controls/model/test_model_R2015A.mdl index a56eba769b13c0de7a72260081cce89619f24b74..ce48e8a27d8d691a51c7680ee7430230795f463d 100644 --- a/controls/model/test_model_R2015A.mdl +++ b/controls/model/test_model_R2015A.mdl @@ -7,7 +7,7 @@ Model { NumRootInports 0 NumRootOutports 0 ParameterArgumentNames "" - ComputedModelVersion "1.2001" + ComputedModelVersion "1.2002" NumModelReferences 0 NumTestPointedSignals 0 } @@ -29,7 +29,7 @@ Model { $ObjectID 2 $ClassName "Simulink.WindowInfo" IsActive [1] - Location [126.0, 17.0, 1743.0, 940.0] + Location [69.0, 48.0, 1743.0, 940.0] Object { $PropName "ModelBrowserInfo" $ObjectID 3 @@ -52,20 +52,20 @@ Model { Object { $ObjectID 5 IsActive [1] - ViewObjType "SimulinkSubsys" - LoadSaveID "604" + ViewObjType "SimulinkTopLevel" + LoadSaveID "0" Extents [1693.0, 762.0] ZoomFactor [1.25] - Offset [-176.29999999999973, 87.623328789075] + Offset [113.60000000000002, 92.0] } Object { $ObjectID 6 IsActive [0] ViewObjType "SimulinkSubsys" - LoadSaveID "650" + LoadSaveID "658" Extents [1693.0, 762.0] - ZoomFactor [1.25] - Offset [1131.6600014448165, 457.59999999999991] + ZoomFactor [1.0] + Offset [0.0, 0.0] } PropName "EditorsInfo" } @@ -77,9 +77,9 @@ Model { ModifiedByFormat "%<Auto>" LastModifiedBy "m87rich" ModifiedDateFormat "%<Auto>" - LastModifiedDate "Sat Feb 18 23:17:32 2017" - RTWModifiedTimeStamp 409360648 - ModelVersionFormat "1.%<AutoIncrement:2001>" + LastModifiedDate "Sun Feb 19 17:01:58 2017" + RTWModifiedTimeStamp 409366141 + ModelVersionFormat "1.%<AutoIncrement:2002>" ConfigurationManager "none" SampleTimeColors on SampleTimeAnnotations off @@ -194,7 +194,7 @@ Model { $ObjectID 9 Version "1.15.0" StartTime "0.0" - StopTime "300" + StopTime "20" AbsTol "auto" FixedStep "auto" InitialStep "auto" @@ -859,6 +859,41 @@ Model { ICPrevOutput "DiscIntNeverNeededParam" ICPrevScaledInput "DiscIntNeverNeededParam" } + Block { + BlockType DiscreteTransferFcn + NumeratorSource "Dialog" + Numerator "[1]" + DenominatorSource "Dialog" + Denominator "[1 0.5]" + InitialStatesSource "Dialog" + InitialStates "0" + InputProcessing "Elements as channels (sample based)" + ExternalReset "None" + InitialDenominatorStates "0" + FilterStructure "Direct form II" + SampleTime "-1" + a0EqualsOne off + NumCoefMin "[]" + NumCoefMax "[]" + DenCoefMin "[]" + DenCoefMax "[]" + OutMin "[]" + OutMax "[]" + StateDataTypeStr "Inherit: Same as input" + MultiplicandDataTypeStr "Inherit: Same as input" + NumCoefDataTypeStr "Inherit: Inherit via internal rule" + DenCoefDataTypeStr "Inherit: Inherit via internal rule" + NumProductDataTypeStr "Inherit: Inherit via internal rule" + DenProductDataTypeStr "Inherit: Inherit via internal rule" + NumAccumDataTypeStr "Inherit: Inherit via internal rule" + DenAccumDataTypeStr "Inherit: Inherit via internal rule" + OutDataTypeStr "Inherit: Inherit via internal rule" + LockScale off + RndMeth "Floor" + SaturateOnIntegerOverflow off + StateMustResolveToSignalObject off + RTWStateStorageClass "Auto" + } Block { BlockType Gain Gain "1" @@ -1071,8 +1106,8 @@ Model { } System { Name "test_model_R2015A" - Location [126, 17, 1869, 957] - Open off + Location [69, 48, 1812, 988] + Open on ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" @@ -1085,14 +1120,15 @@ Model { ShowPageBoundaries off ZoomFactor "125" ReportName "simulink-default.rpt" - SIDHighWatermark "894" + SIDHighWatermark "904" Block { BlockType SubSystem Name " Sensors " SID "650" - Ports [6, 3] + Ports [6, 4] Position [1195, 272, 1415, 508] ZOrder 73 + ForegroundColor "yellow" ShowName off RequestExecContextInheritance off Object { @@ -1107,8 +1143,8 @@ Model { } System { Name " Sensors " - Location [126, 17, 1869, 957] - Open on + Location [69, 48, 1812, 988] + Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" @@ -2674,6 +2710,17 @@ Model { Outputs "2" DisplayOption "bar" } + Block { + BlockType Demux + Name "Demux2" + SID "903" + Ports [1, 3] + Position [2275, 1038, 2280, 1092] + ZOrder 316 + ShowName off + Outputs "3" + DisplayOption "bar" + } Block { BlockType DiscreteIntegrator Name "Discrete-Time\nIntegrator" @@ -2734,8 +2781,8 @@ Model { } System { Name "IMU\n\n\n\n\n\n" - Location [163, 69, 1905, 1009] - Open off + Location [239, 71, 1982, 1011] + Open on ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" @@ -2991,12 +3038,56 @@ Model { } } } + Block { + BlockType Delay + Name "Delay" + SID "899" + Ports [1, 1] + Position [605, 193, 640, 227] + ZOrder 45 + InputPortMap "u0" + DelayLength "4" + } + Block { + BlockType Delay + Name "Delay1" + SID "900" + Ports [1, 1] + Position [605, 278, 640, 312] + ZOrder 46 + InputPortMap "u0" + DelayLength "4" + } + Block { + BlockType DiscreteTransferFcn + Name "Discrete\nTransfer Fcn" + SID "897" + Ports [1, 1] + Position [490, 187, 570, 233] + ZOrder 43 + InputPortMap "u0" + Numerator "[0.02469]" + Denominator "[1 -0.9752]" + SampleTime "5e-3" + } + Block { + BlockType DiscreteTransferFcn + Name "Discrete\nTransfer Fcn1" + SID "898" + Ports [1, 1] + Position [490, 272, 570, 318] + ZOrder 44 + InputPortMap "u0" + Numerator "[0.02469]" + Denominator "[1 -0.9752]" + SampleTime "5e-3" + } Block { BlockType DiscreteIntegrator Name "Discrete-Time\nIntegrator" SID "835" Ports [1, 1] - Position [725, 372, 760, 408] + Position [985, 372, 1020, 408] ZOrder 30 InitialConditionSetting "State (most efficient)" SampleTime "-1" @@ -3006,7 +3097,7 @@ Model { Name "Discrete-Time\nIntegrator1" SID "837" Ports [1, 1] - Position [910, 342, 945, 378] + Position [1170, 342, 1205, 378] ZOrder 32 InitialConditionSetting "State (most efficient)" SampleTime "-1" @@ -3016,7 +3107,7 @@ Model { Name "Discrete-Time\nIntegrator2" SID "839" Ports [1, 1] - Position [950, 247, 985, 283] + Position [1210, 247, 1245, 283] ZOrder 34 InitialConditionSetting "State (most efficient)" SampleTime "-1" @@ -3026,7 +3117,7 @@ Model { Name "Discrete-Time\nIntegrator3" SID "841" Ports [1, 1] - Position [575, 437, 610, 473] + Position [835, 437, 870, 473] ZOrder 36 InitialConditionSetting "State (most efficient)" SampleTime "-1" @@ -3035,14 +3126,14 @@ Model { BlockType Ground Name "Ground" SID "664" - Position [550, 340, 570, 360] + Position [810, 340, 830, 360] ZOrder 23 } Block { BlockType Ground Name "Ground1" SID "665" - Position [550, 145, 570, 165] + Position [810, 145, 830, 165] ZOrder 24 } Block { @@ -3058,7 +3149,7 @@ Model { Name "Scope" SID "836" Ports [1] - Position [805, 374, 835, 406] + Position [1065, 374, 1095, 406] ZOrder 31 Floating off Location [680, 330, 1240, 750] @@ -3089,7 +3180,7 @@ Model { Name "Scope1" SID "838" Ports [1] - Position [990, 344, 1020, 376] + Position [1250, 344, 1280, 376] ZOrder 33 Floating off Location [306, 114, 866, 534] @@ -3120,7 +3211,7 @@ Model { Name "Scope2" SID "840" Ports [1] - Position [1030, 249, 1060, 281] + Position [1290, 249, 1320, 281] ZOrder 35 Floating off Location [680, 330, 1240, 750] @@ -3151,7 +3242,7 @@ Model { Name "Scope3" SID "842" Ports [1] - Position [655, 439, 685, 471] + Position [915, 439, 945, 471] ZOrder 37 Floating off Location [306, 114, 866, 534] @@ -3182,7 +3273,7 @@ Model { Name "Scope4" SID "843" Ports [1] - Position [580, 389, 610, 421] + Position [840, 389, 870, 421] ZOrder 38 Floating off Location [306, 114, 866, 534] @@ -3244,7 +3335,7 @@ Model { Name "Sum" SID "666" Ports [2, 1] - Position [690, 285, 710, 305] + Position [950, 285, 970, 305] ZOrder 7 ShowName off IconShape "round" @@ -3258,7 +3349,7 @@ Model { Name "Sum1" SID "667" Ports [2, 1] - Position [690, 200, 710, 220] + Position [950, 200, 970, 220] ZOrder 8 ShowName off IconShape "round" @@ -3272,7 +3363,7 @@ Model { Name "Sum2" SID "668" Ports [2, 1] - Position [570, 285, 590, 305] + Position [830, 285, 850, 305] ZOrder 11 ShowName off IconShape "round" @@ -3286,7 +3377,7 @@ Model { Name "Sum3" SID "669" Ports [2, 1] - Position [570, 200, 590, 220] + Position [830, 200, 850, 220] ZOrder 12 ShowName off IconShape "round" @@ -3299,7 +3390,7 @@ Model { BlockType RandomNumber Name "accelerometer_noise" SID "670" - Position [630, 140, 660, 170] + Position [890, 140, 920, 170] ZOrder 2 Mean "zeros(3,1)" Variance "[ 3e-7 ; 3.3e-7 ; 7.2e-7 ] " @@ -3310,7 +3401,7 @@ Model { BlockType Quantizer Name "accelerometer_quantizer" SID "671" - Position [770, 195, 800, 225] + Position [1030, 195, 1060, 225] ZOrder 9 QuantizationInterval "2.4400e-04" } @@ -3318,7 +3409,7 @@ Model { BlockType ZeroOrderHold Name "accelerometer_sampling" SID "672" - Position [495, 195, 530, 225] + Position [755, 195, 790, 225] ZOrder 15 SampleTime "5e-3" } @@ -3326,7 +3417,7 @@ Model { BlockType RandomNumber Name "gyroscope_noise" SID "673" - Position [630, 315, 660, 345] + Position [890, 315, 920, 345] ZOrder 6 Mean "zeros(3,1)" Variance "[ 2.2e-8 ; 1.1e-7 ; 2.4e-8 ]" @@ -3337,7 +3428,7 @@ Model { BlockType Quantizer Name "gyroscope_qunatizer" SID "674" - Position [770, 280, 800, 310] + Position [1030, 280, 1060, 310] ZOrder 10 QuantizationInterval "1.1e-3" } @@ -3345,7 +3436,7 @@ Model { BlockType ZeroOrderHold Name "gyroscope_sampling" SID "675" - Position [495, 280, 530, 310] + Position [755, 280, 790, 310] ZOrder 16 SampleTime "5e-3" } @@ -3361,7 +3452,7 @@ Model { BlockType Outport Name "accelerometer" SID "677" - Position [840, 203, 870, 217] + Position [1100, 203, 1130, 217] ZOrder 29 IconDisplay "Port number" } @@ -3369,7 +3460,7 @@ Model { BlockType Outport Name "gyroscope" SID "678" - Position [840, 288, 870, 302] + Position [1100, 288, 1130, 302] ZOrder 21 Port "2" IconDisplay "Port number" @@ -3542,20 +3633,6 @@ Model { DstBlock "\n\n\n\n\n\n\n" DstPort 5 } - Line { - ZOrder 30 - SrcBlock "\n\n\n\n\n\n\n" - SrcPort 2 - DstBlock "gyroscope_sampling" - DstPort 1 - } - Line { - ZOrder 31 - SrcBlock "\n\n\n\n\n\n\n" - SrcPort 1 - DstBlock "accelerometer_sampling" - DstPort 1 - } Line { ZOrder 36 SrcBlock "Discrete-Time\nIntegrator" @@ -3605,6 +3682,48 @@ Model { DstBlock "accelerometer" DstPort 1 } + Line { + ZOrder 79 + SrcBlock "\n\n\n\n\n\n\n" + SrcPort 1 + DstBlock "Discrete\nTransfer Fcn" + DstPort 1 + } + Line { + ZOrder 80 + SrcBlock "\n\n\n\n\n\n\n" + SrcPort 2 + DstBlock "Discrete\nTransfer Fcn1" + DstPort 1 + } + Line { + ZOrder 81 + SrcBlock "Discrete\nTransfer Fcn" + SrcPort 1 + DstBlock "Delay" + DstPort 1 + } + Line { + ZOrder 82 + SrcBlock "Discrete\nTransfer Fcn1" + SrcPort 1 + DstBlock "Delay1" + DstPort 1 + } + Line { + ZOrder 83 + SrcBlock "Delay" + SrcPort 1 + DstBlock "accelerometer_sampling" + DstPort 1 + } + Line { + ZOrder 84 + SrcBlock "Delay1" + SrcPort 1 + DstBlock "gyroscope_sampling" + DstPort 1 + } } } Block { @@ -3623,7 +3742,7 @@ Model { Name "OptiTrack Camera System\n\n " SID "681" Ports [2, 2] - Position [1710, 946, 1950, 1039] + Position [1720, 906, 1950, 1039] ZOrder 299 ShowName off RequestExecContextInheritance off @@ -3637,7 +3756,7 @@ Model { } System { Name "OptiTrack Camera System\n\n " - Location [126, 17, 1868, 957] + Location [69, 48, 1812, 988] Open off ModelBrowserVisibility off ModelBrowserWidth 200 @@ -3770,7 +3889,8 @@ Model { SID "693" Position [545, 365, 575, 395] ZOrder 46 - Variance "1.0783e-9" + Mean "zeros(3,1)" + Variance "1.0783e-9*ones(3,1)" SampleTime "0.01" } Block { @@ -3949,7 +4069,7 @@ Model { Position [1385, 599, 1415, 631] ZOrder 271 Floating off - Location [1, 76, 1909, 1039] + Location [10, 76, 1918, 1039] Open off NumInputPorts "1" List { @@ -4149,6 +4269,15 @@ Model { Port "3" IconDisplay "Port number" } + Block { + BlockType Outport + Name "camera_euler" + SID "904" + Position [2430, 1038, 2460, 1052] + ZOrder 317 + Port "4" + IconDisplay "Port number" + } Line { ZOrder 1 SrcBlock "IMU\n\n\n\n\n\n" @@ -4274,6 +4403,12 @@ Model { SrcBlock "euler_angles" SrcPort 1 Points [23, 0] + Branch { + ZOrder 210 + Points [0, -45] + DstBlock "OptiTrack Camera System\n\n " + DstPort 2 + } Branch { ZOrder 27 Points [0, 70] @@ -4330,18 +4465,11 @@ Model { } Branch { ZOrder 36 + Points [0, -30] DstBlock "OptiTrack Camera System\n\n " DstPort 1 } } - Line { - ZOrder 37 - SrcBlock "Demux" - SrcPort 3 - Points [23, 0; 0, -55] - DstBlock "OptiTrack Camera System\n\n " - DstPort 2 - } Line { ZOrder 38 SrcBlock "First-Order\nHold1" @@ -4368,6 +4496,7 @@ Model { ZOrder 41 SrcBlock "OptiTrack Camera System\n\n " SrcPort 2 + Points [70, 0; 0, 10] DstBlock "Delay4" DstPort 1 } @@ -4398,6 +4527,7 @@ Model { ZOrder 45 SrcBlock "OptiTrack Camera System\n\n " SrcPort 1 + Points [48, 0; 0, 30] DstBlock "Delay3" DstPort 1 } @@ -4448,10 +4578,28 @@ Model { } } Line { - ZOrder 204 + ZOrder 211 SrcBlock "Delay4" SrcPort 1 - Points [290, 0; 0, -345] + Points [81, 0; 0, 16] + Branch { + ZOrder 214 + Points [144, 0; 0, 14] + DstBlock "camera_euler" + DstPort 1 + } + Branch { + ZOrder 213 + Points [0, 34] + DstBlock "Demux2" + DstPort 1 + } + } + Line { + ZOrder 212 + SrcBlock "Demux2" + SrcPort 3 + Points [14, 0; 0, -415] DstBlock "Mux" DstPort 3 } @@ -6624,7 +6772,7 @@ Model { } System { Name "Control System" - Location [126, 17, 1869, 957] + Location [69, 48, 1812, 988] Open off ModelBrowserVisibility off ModelBrowserWidth 200 @@ -6696,8 +6844,8 @@ Model { } System { Name "Controller" - Location [126, 17, 1869, 957] - Open on + Location [69, 48, 1812, 988] + Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" @@ -6890,7 +7038,7 @@ Model { Form "Parallel" UseFilter on ControllerParametersSource "internal" - P "0.0206615987594042" + P "0.015166894231541" I "1575.82088970639" D "504.111397357926" N "244.660686071579" @@ -7138,9 +7286,9 @@ Model { Form "Parallel" UseFilter off ControllerParametersSource "internal" - P "-0.0731264783484572" - I "-0.00816667990477195" - D "-0.163698158186742" + P "-0.0153859651723572" + I "-0.000331343308727455" + D "-0.178612271980841" N "5.79502261645411" InitialConditionSource "internal" InitialConditionForIntegrator "0" @@ -7386,7 +7534,7 @@ Model { Form "Parallel" UseFilter on ControllerParametersSource "internal" - P "1.96697712983457" + P "1.37514874127105" I "35.1207902652377" D "0.410623594074865" N "40.0107970227961" @@ -7510,9 +7658,9 @@ Model { Form "Parallel" UseFilter off ControllerParametersSource "internal" - P "-0.00205853009179667" + P "-0.00209477698719004" I "-5.49963745752816e-05" - D "-0.109985782101112" + D "-0.116816668948546" N "16.9491526069154" InitialConditionSource "internal" InitialConditionForIntegrator "0" @@ -7634,9 +7782,9 @@ Model { Form "Parallel" UseFilter off ControllerParametersSource "internal" - P "0.00195838852233056" + P "0.00209477698719004" I "9.56340991394167e-06" - D "0.107694320434245" + D "0.116816668948546" N "16.9491526069154" InitialConditionSource "internal" InitialConditionForIntegrator "0" @@ -7758,7 +7906,7 @@ Model { Form "Parallel" UseFilter on ControllerParametersSource "internal" - P "1.96697712983457" + P "1.37514874127105" I "35.1207902652377" D "0.2" N "40.0107970227961" @@ -7882,7 +8030,7 @@ Model { Form "Parallel" UseFilter on ControllerParametersSource "internal" - P "0.0206615987594042" + P "0.015166894231541" I "1575.82088970639" D "504.111397357926" N "244.660686071579" @@ -8279,7 +8427,7 @@ Model { Position [245, 484, 275, 516] ZOrder 119 Floating off - Location [1, 49, 1921, 1039] + Location [2, 57, 1918, 1038] Open on NumInputPorts "1" List { @@ -8297,8 +8445,8 @@ Model { MarkerStyles "none|none|none|none|none|none" } TimeRange "20" - YMin "1.135" - YMax "1.154" + YMin "2200" + YMax "4300" SaveName "ScopeData3" DataFormat "StructureWithTime" LimitDataPoints off @@ -8791,33 +8939,48 @@ Model { DstPort 1 } Line { - ZOrder 495 - SrcBlock "PID Controller8" + ZOrder 496 + SrcBlock "Saturation1" SrcPort 1 - DstBlock "Sum2" + DstBlock "PID Controller8" DstPort 1 } Line { - ZOrder 496 - SrcBlock "Saturation1" + ZOrder 498 + SrcBlock "PID Controller10" SrcPort 1 - DstBlock "PID Controller8" + DstBlock "Sum" DstPort 1 } Line { - ZOrder 497 - SrcBlock "PID Controller6" + ZOrder 500 + SrcBlock "PID Controller8" SrcPort 1 - DstBlock "Sum1" + DstBlock "Sum2" DstPort 1 } Line { - ZOrder 498 - SrcBlock "PID Controller10" + ZOrder 501 + SrcBlock "PID Controller6" SrcPort 1 - DstBlock "Sum" + DstBlock "Sum1" DstPort 1 } + Annotation { + SID "901" + Name "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">" + "\n<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\np, li { white-space: pre-wrap" + "; }\n</style></head><body style=\" font-family:'Helvetica'; font-size:10px; font-weight:400; font-style:normal;" + "\">\n<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px;" + " -qt-block-indent:0; text-indent:0px;\"><br /></p></body></html>" + Position [264, 366, 266, 381] + InternalMargins [0, 0, 0, 0] + FixedHeight off + FixedWidth off + HorizontalAlignment "left" + VerticalAlignment "top" + Interpreter "rich" + } } } Block { @@ -9449,7 +9612,7 @@ Model { ZOrder 195 SrcBlock " Sensors " SrcPort 3 - Points [9, 0; 0, 160; -903, 0; 0, -160] + Points [9, 0; 0, 210; -903, 0; 0, -160] DstBlock "Control System" DstPort 4 } @@ -9457,7 +9620,7 @@ Model { ZOrder 196 SrcBlock " Sensors " SrcPort 2 - Points [16, 0; 0, 272; -924, 0; 0, -247] + Points [16, 0; 0, 302; -924, 0; 0, -247] DstBlock "Control System" DstPort 3 } @@ -9469,10 +9632,10 @@ Model { DstPort 2 } Line { - ZOrder 200 + ZOrder 208 SrcBlock " Sensors " - SrcPort 1 - Points [2, 0; 0, 212; -903, 0; 0, -162] + SrcPort 4 + Points [2, 0; 0, 42; -903, 0; 0, -162] DstBlock "Control System" DstPort 2 }