├── Control algorithm - Jiang ├── control_error.m ├── dynamic.m ├── dynamic_control.m ├── jiang.mdl ├── jiang.slx ├── kinematic.m ├── kinematic_control.m ├── line_traj.m ├── line_traj_dot.m ├── plot_all.m ├── plot_jiang.m ├── trig_traj.m ├── trig_traj_dot.m └── velocity_error.m ├── Control algorithm - Paliotta ├── controller.m ├── dynamic.m ├── kinematic.m ├── line_traj.m ├── paliotta.mdl ├── paliotta.slx ├── plot.m ├── trig_traj.m └── zeta_calculation.m └── README.md /Control algorithm - Jiang/control_error.m: -------------------------------------------------------------------------------- 1 | function [ output ] = control_error( input ) 2 | %CONTROL_ERROR Calculation of the control error 3 | % Function compares current position and orientation of the vehicle to 4 | % the desired reference position and orientation and returns the 5 | % difference as its output. 6 | 7 | x_ref=input(1); 8 | y_ref=input(2); 9 | psi_ref=input(3); 10 | x=input(4); 11 | y=input(5); 12 | psi=input(6); 13 | 14 | % x_e=(x-x_ref)*cosd(psi)+(y-y_ref)*sind(psi); 15 | % y_e=-(x-x_ref)*sind(psi)+(y-y_ref)*cosd(psi); 16 | % psi_e=psi-psi_ref; 17 | 18 | x_e=x-x_ref; 19 | y_e=y-y_ref; 20 | psi_e=psi-psi_ref; 21 | 22 | output=[x_e; y_e; psi_e]; 23 | 24 | end 25 | 26 | -------------------------------------------------------------------------------- /Control algorithm - Jiang/dynamic.m: -------------------------------------------------------------------------------- 1 | function [ output ] = dynamic( input ) 2 | %DYNAMIC Dynamic equations of the model 3 | % Function takes current control inputs, as well as velocities 4 | % vector generated by itself in the previous iteration, as inputs and 5 | % gives vector of velocities of the vehicle in the body frame as an 6 | % output. 7 | 8 | m1=215; 9 | m2=265; 10 | m3=80; 11 | 12 | X_u=70; 13 | Y_v=100; 14 | N_r=100; 15 | X_uu=100; 16 | Y_vv=200; 17 | N_rr=100; 18 | 19 | Tau_u=input(1); 20 | Tau_r=input(2); 21 | u=input(3); 22 | v=input(4); 23 | r=input(5); 24 | 25 | u_dot=(m2*v*r-X_u*u-X_uu*u*abs(u)+Tau_u)/m1; 26 | v_dot=(-m1*u*r-Y_v*v-Y_vv*v*abs(v))/m2; 27 | r_dot=((m1-m2)*u*v-N_r*r-N_rr*r*abs(r)+Tau_r)/m3; 28 | 29 | 30 | output=[u_dot; v_dot; r_dot]; 31 | 32 | end 33 | 34 | -------------------------------------------------------------------------------- /Control algorithm - Jiang/dynamic_control.m: -------------------------------------------------------------------------------- 1 | function [ output ] = dynamic_control( input ) 2 | %KINEMATIC_CONTROL Implementation of the control law 3 | % Function gives thruster force Tau_u and rudder angle Tau_r as its 4 | % output. 5 | 6 | m1=215; 7 | m2=265; 8 | m3=80; 9 | 10 | X_u=70; 11 | Y_v=100; 12 | N_r=100; 13 | X_uu=100; 14 | Y_vv=200; 15 | N_rr=100; 16 | 17 | k_x=1.5; 18 | k_psi=3.5; 19 | k_u=3.5; 20 | k_r=0.8; 21 | lambda1=0.1; 22 | lambda2=0.1; 23 | gamma1=0.5; 24 | gamma2=0.3; 25 | 26 | u_d_dot=input(1); 27 | r_d_dot=input(2); 28 | u_e0=input(3); 29 | r_e0=input(4); 30 | u_e=input(5); 31 | r_e=input(6); 32 | u_e_integ=input(7); 33 | r_e_integ=input(8); 34 | u=input(9); 35 | v=input(10); 36 | r=input(11); 37 | % x_e=input(12); 38 | % y_e=input(13); 39 | % psi_e=input(14); 40 | 41 | 42 | S1=u_e+lambda1*u_e_integ-u_e0; 43 | S2=r_e+lambda2*r_e_integ-r_e0; 44 | 45 | n1=m2*abs(v*r)+X_u*abs(u)+X_uu*abs(u^2)+m1*abs(u_d_dot)+lambda1*m1*abs(u_e)+m1*gamma1; 46 | n2=(m1-m2)*abs(u*v)+N_r*abs(r)+N_rr*abs(r^2)+m3*abs(r_d_dot)+m3*lambda2*abs(r_e)+m3*gamma2; 47 | 48 | % Tau_u=-m2*v*r+X_u*u+X_uu*u+m1*u_d_dot-lambda1*m1*u_e-n1*sign(S1); 49 | % Tau_r=-(m1-m2)*u*v+N_r*r+N_rr*r+m3*r_d_dot-m3*lambda2*r_e-n2*sign(S2); 50 | Tau_u=-m2*v*r+X_u*u+X_uu*u+m1*u_d_dot-lambda1*m1*u_e; 51 | Tau_r=-(m1-m2)*u*v+N_r*r+N_rr*r+m3*r_d_dot-m3*lambda2*r_e; 52 | 53 | output=[Tau_u, Tau_r]; 54 | 55 | end 56 | 57 | -------------------------------------------------------------------------------- /Control algorithm - Jiang/jiang.mdl: -------------------------------------------------------------------------------- 1 | Model { 2 | Name "jiang" 3 | Version 7.9 4 | SavedCharacterEncoding "windows-1250" 5 | GraphicalInterface { 6 | NumRootInports 0 7 | NumRootOutports 0 8 | ParameterArgumentNames "" 9 | ComputedModelVersion "1.65" 10 | NumModelReferences 0 11 | NumTestPointedSignals 0 12 | } 13 | slprops.hdlmdlprops { 14 | $PropName "HDLParams" 15 | $ObjectID 1 16 | Array { 17 | Type "Cell" 18 | Dimension 2 19 | Cell "HDLSubsystem" 20 | Cell "jiang" 21 | PropName "mdlProps" 22 | } 23 | } 24 | ScopeRefreshTime 0.035000 25 | OverrideScopeRefreshTime on 26 | DisableAllScopes off 27 | DataTypeOverride "UseLocalSettings" 28 | DataTypeOverrideAppliesTo "AllNumericTypes" 29 | MinMaxOverflowLogging "UseLocalSettings" 30 | MinMaxOverflowArchiveMode "Overwrite" 31 | FPTRunName "Run 1" 32 | MaxMDLFileLineLength 120 33 | Created "Mon Jan 13 14:56:26 2020" 34 | Creator "Staciej" 35 | UpdateHistory "UpdateHistoryNever" 36 | ModifiedByFormat "%" 37 | LastModifiedBy "Staciej" 38 | ModifiedDateFormat "%" 39 | LastModifiedDate "Fri Jan 31 12:23:46 2020" 40 | RTWModifiedTimeStamp 502374226 41 | ModelVersionFormat "1.%" 42 | ConfigurationManager "none" 43 | SampleTimeColors off 44 | SampleTimeAnnotations off 45 | LibraryLinkDisplay "disabled" 46 | WideLines off 47 | ShowLineDimensions off 48 | ShowPortDataTypes off 49 | ShowDesignRanges off 50 | ShowLoopsOnError on 51 | IgnoreBidirectionalLines off 52 | ShowStorageClass off 53 | ShowTestPointIcons on 54 | ShowSignalResolutionIcons on 55 | ShowViewerIcons on 56 | SortedOrder off 57 | ExecutionContextIcon off 58 | ShowLinearizationAnnotations on 59 | BlockNameDataTip off 60 | BlockParametersDataTip off 61 | BlockDescriptionStringDataTip off 62 | ToolBar on 63 | StatusBar on 64 | BrowserShowLibraryLinks off 65 | BrowserLookUnderMasks off 66 | SimulationMode "normal" 67 | LinearizationMsg "none" 68 | Profile off 69 | ParamWorkspaceSource "MATLABWorkspace" 70 | AccelSystemTargetFile "accel.tlc" 71 | AccelTemplateMakefile "accel_default_tmf" 72 | AccelMakeCommand "make_rtw" 73 | TryForcingSFcnDF off 74 | Object { 75 | $PropName "DataLoggingOverride" 76 | $ObjectID 10 77 | $ClassName "Simulink.SimulationData.ModelLoggingInfo" 78 | model_ "model_mat_v2" 79 | overrideMode_ [0.0] 80 | Array { 81 | Type "Cell" 82 | Dimension 1 83 | Cell "model_mat_v2" 84 | PropName "logAsSpecifiedByModels_" 85 | } 86 | Array { 87 | Type "Cell" 88 | Dimension 1 89 | Cell [] 90 | PropName "logAsSpecifiedByModelsSSIDs_" 91 | } 92 | } 93 | RecordCoverage off 94 | CovPath "/" 95 | CovSaveName "covdata" 96 | CovMetricSettings "dw" 97 | CovNameIncrementing off 98 | CovHtmlReporting on 99 | CovForceBlockReductionOff on 100 | covSaveCumulativeToWorkspaceVar on 101 | CovSaveSingleToWorkspaceVar on 102 | CovCumulativeVarName "covCumulativeData" 103 | CovCumulativeReport off 104 | CovReportOnPause on 105 | CovModelRefEnable "off" 106 | CovExternalEMLEnable off 107 | ExtModeBatchMode off 108 | ExtModeEnableFloating on 109 | ExtModeTrigType "manual" 110 | ExtModeTrigMode "normal" 111 | ExtModeTrigPort "1" 112 | ExtModeTrigElement "any" 113 | ExtModeTrigDuration 1000 114 | ExtModeTrigDurationFloating "auto" 115 | ExtModeTrigHoldOff 0 116 | ExtModeTrigDelay 0 117 | ExtModeTrigDirection "rising" 118 | ExtModeTrigLevel 0 119 | ExtModeArchiveMode "off" 120 | ExtModeAutoIncOneShot off 121 | ExtModeIncDirWhenArm off 122 | ExtModeAddSuffixToVar off 123 | ExtModeWriteAllDataToWs off 124 | ExtModeArmWhenConnect on 125 | ExtModeSkipDownloadWhenConnect off 126 | ExtModeLogAll on 127 | ExtModeAutoUpdateStatusClock on 128 | ShowModelReferenceBlockVersion off 129 | ShowModelReferenceBlockIO off 130 | Array { 131 | Type "Handle" 132 | Dimension 1 133 | Simulink.ConfigSet { 134 | $ObjectID 11 135 | Version "1.12.0" 136 | Array { 137 | Type "Handle" 138 | Dimension 9 139 | Simulink.SolverCC { 140 | $ObjectID 12 141 | Version "1.12.0" 142 | StartTime "0.0" 143 | StopTime "1000" 144 | AbsTol "auto" 145 | FixedStep "0.05" 146 | InitialStep "auto" 147 | MaxNumMinSteps "-1" 148 | MaxOrder 5 149 | ZcThreshold "auto" 150 | ConsecutiveZCsStepRelTol "10*128*eps" 151 | MaxConsecutiveZCs "1000" 152 | ExtrapolationOrder 4 153 | NumberNewtonIterations 1 154 | MaxStep "auto" 155 | MinStep "auto" 156 | MaxConsecutiveMinStep "1" 157 | RelTol "1e-3" 158 | SolverMode "Auto" 159 | EnableConcurrentExecution off 160 | ConcurrentTasks off 161 | Solver ode3 162 | SolverName ode3 163 | SolverJacobianMethodControl "auto" 164 | ShapePreserveControl "DisableAll" 165 | ZeroCrossControl "UseLocalSettings" 166 | ZeroCrossAlgorithm "Nonadaptive" 167 | AlgebraicLoopSolver "TrustRegion" 168 | SolverResetMethod "Fast" 169 | PositivePriorityOrder off 170 | AutoInsertRateTranBlk off 171 | SampleTimeConstraint "Unconstrained" 172 | InsertRTBMode "Whenever possible" 173 | } 174 | Simulink.DataIOCC { 175 | $ObjectID 13 176 | Version "1.12.0" 177 | Decimation "1" 178 | ExternalInput "[t, u]" 179 | FinalStateName "xFinal" 180 | InitialState "xInitial" 181 | LimitDataPoints off 182 | MaxDataPoints "1000" 183 | LoadExternalInput off 184 | LoadInitialState off 185 | SaveFinalState off 186 | SaveCompleteFinalSimState off 187 | SaveFormat "StructureWithTime" 188 | SignalLoggingSaveFormat "Dataset" 189 | SaveOutput on 190 | SaveState off 191 | SignalLogging on 192 | DSMLogging on 193 | InspectSignalLogs off 194 | SaveTime on 195 | ReturnWorkspaceOutputs off 196 | StateSaveName "xout" 197 | TimeSaveName "tout" 198 | OutputSaveName "yout" 199 | SignalLoggingName "logsout" 200 | DSMLoggingName "dsmout" 201 | OutputOption "RefineOutputTimes" 202 | OutputTimes "[]" 203 | ReturnWorkspaceOutputsName "out" 204 | Refine "1" 205 | } 206 | Simulink.OptimizationCC { 207 | $ObjectID 14 208 | Version "1.12.0" 209 | Array { 210 | Type "Cell" 211 | Dimension 8 212 | Cell "BooleansAsBitfields" 213 | Cell "PassReuseOutputArgsAs" 214 | Cell "PassReuseOutputArgsThreshold" 215 | Cell "ZeroExternalMemoryAtStartup" 216 | Cell "ZeroInternalMemoryAtStartup" 217 | Cell "OptimizeModelRefInitCode" 218 | Cell "NoFixptDivByZeroProtection" 219 | Cell "UseSpecifiedMinMax" 220 | PropName "DisabledProps" 221 | } 222 | BlockReduction on 223 | BooleanDataType on 224 | ConditionallyExecuteInputs on 225 | InlineParams off 226 | UseFloatMulNetSlope off 227 | UseSpecifiedMinMax off 228 | InlineInvariantSignals off 229 | OptimizeBlockIOStorage on 230 | BufferReuse on 231 | EnhancedBackFolding off 232 | StrengthReduction off 233 | ExpressionFolding on 234 | BooleansAsBitfields off 235 | BitfieldContainerType "uint_T" 236 | EnableMemcpy on 237 | MemcpyThreshold 64 238 | PassReuseOutputArgsAs "Structure reference" 239 | ExpressionDepthLimit 128 240 | LocalBlockOutputs on 241 | RollThreshold 5 242 | StateBitsets off 243 | DataBitsets off 244 | ZeroExternalMemoryAtStartup on 245 | ZeroInternalMemoryAtStartup on 246 | InitFltsAndDblsToZero off 247 | NoFixptDivByZeroProtection off 248 | EfficientFloat2IntCast off 249 | EfficientMapNaN2IntZero on 250 | OptimizeModelRefInitCode off 251 | LifeSpan "inf" 252 | MaxStackSize "Inherit from target" 253 | BufferReusableBoundary on 254 | SimCompilerOptimization "Off" 255 | AccelVerboseBuild off 256 | UseIntDivNetSlope off 257 | } 258 | Simulink.DebuggingCC { 259 | $ObjectID 15 260 | Version "1.12.0" 261 | RTPrefix "error" 262 | ConsistencyChecking "none" 263 | ArrayBoundsChecking "none" 264 | SignalInfNanChecking "none" 265 | SignalRangeChecking "none" 266 | ReadBeforeWriteMsg "UseLocalSettings" 267 | WriteAfterWriteMsg "UseLocalSettings" 268 | WriteAfterReadMsg "UseLocalSettings" 269 | AlgebraicLoopMsg "warning" 270 | ArtificialAlgebraicLoopMsg "warning" 271 | SaveWithDisabledLinksMsg "warning" 272 | SaveWithParameterizedLinksMsg "warning" 273 | CheckSSInitialOutputMsg on 274 | UnderspecifiedInitializationDetection "Simplified" 275 | MergeDetectMultiDrivingBlocksExec "error" 276 | CheckExecutionContextPreStartOutputMsg off 277 | CheckExecutionContextRuntimeOutputMsg off 278 | SignalResolutionControl "UseLocalSettings" 279 | BlockPriorityViolationMsg "warning" 280 | MinStepSizeMsg "warning" 281 | TimeAdjustmentMsg "none" 282 | MaxConsecutiveZCsMsg "error" 283 | MaskedZcDiagnostic "warning" 284 | IgnoredZcDiagnostic "warning" 285 | SolverPrmCheckMsg "none" 286 | InheritedTsInSrcMsg "warning" 287 | MultiTaskDSMMsg "error" 288 | MultiTaskCondExecSysMsg "error" 289 | MultiTaskRateTransMsg "error" 290 | SingleTaskRateTransMsg "none" 291 | TasksWithSamePriorityMsg "warning" 292 | SigSpecEnsureSampleTimeMsg "warning" 293 | CheckMatrixSingularityMsg "none" 294 | IntegerOverflowMsg "warning" 295 | Int32ToFloatConvMsg "warning" 296 | ParameterDowncastMsg "error" 297 | ParameterOverflowMsg "error" 298 | ParameterUnderflowMsg "none" 299 | ParameterPrecisionLossMsg "warning" 300 | ParameterTunabilityLossMsg "warning" 301 | FixptConstUnderflowMsg "none" 302 | FixptConstOverflowMsg "none" 303 | FixptConstPrecisionLossMsg "none" 304 | UnderSpecifiedDataTypeMsg "none" 305 | UnnecessaryDatatypeConvMsg "none" 306 | VectorMatrixConversionMsg "none" 307 | InvalidFcnCallConnMsg "error" 308 | FcnCallInpInsideContextMsg "Enable All" 309 | SignalLabelMismatchMsg "none" 310 | UnconnectedInputMsg "warning" 311 | UnconnectedOutputMsg "warning" 312 | UnconnectedLineMsg "warning" 313 | SFcnCompatibilityMsg "none" 314 | FrameProcessingCompatibilityMsg "error" 315 | UniqueDataStoreMsg "none" 316 | BusObjectLabelMismatch "warning" 317 | RootOutportRequireBusObject "warning" 318 | AssertControl "UseLocalSettings" 319 | ModelReferenceIOMsg "none" 320 | ModelReferenceMultiInstanceNormalModeStructChecksumCheck "error" 321 | ModelReferenceVersionMismatchMessage "none" 322 | ModelReferenceIOMismatchMessage "none" 323 | UnknownTsInhSupMsg "warning" 324 | ModelReferenceDataLoggingMessage "warning" 325 | ModelReferenceSymbolNameMessage "warning" 326 | ModelReferenceExtraNoncontSigs "error" 327 | StateNameClashWarn "none" 328 | SimStateInterfaceChecksumMismatchMsg "warning" 329 | SimStateOlderReleaseMsg "error" 330 | InitInArrayFormatMsg "warning" 331 | StrictBusMsg "ErrorLevel1" 332 | BusNameAdapt "WarnAndRepair" 333 | NonBusSignalsTreatedAsBus "none" 334 | BlockIODiagnostic "none" 335 | SFUnusedDataAndEventsDiag "warning" 336 | SFUnexpectedBacktrackingDiag "warning" 337 | SFInvalidInputDataAccessInChartInitDiag "warning" 338 | SFNoUnconditionalDefaultTransitionDiag "warning" 339 | SFTransitionOutsideNaturalParentDiag "warning" 340 | SFUnconditionalTransitionShadowingDiag "warning" 341 | ModelReferenceCSMismatchMessage "none" 342 | } 343 | Simulink.HardwareCC { 344 | $ObjectID 16 345 | Version "1.12.0" 346 | ProdBitPerChar 8 347 | ProdBitPerShort 16 348 | ProdBitPerInt 32 349 | ProdBitPerLong 32 350 | ProdBitPerFloat 32 351 | ProdBitPerDouble 64 352 | ProdBitPerPointer 64 353 | ProdLargestAtomicInteger "Char" 354 | ProdLargestAtomicFloat "Float" 355 | ProdIntDivRoundTo "Zero" 356 | ProdEndianess "LittleEndian" 357 | ProdWordSize 32 358 | ProdShiftRightIntArith on 359 | ProdHWDeviceType "Specified" 360 | TargetBitPerChar 8 361 | TargetBitPerShort 16 362 | TargetBitPerInt 32 363 | TargetBitPerLong 32 364 | TargetBitPerFloat 32 365 | TargetBitPerDouble 64 366 | TargetBitPerPointer 32 367 | TargetLargestAtomicInteger "Char" 368 | TargetLargestAtomicFloat "None" 369 | TargetShiftRightIntArith on 370 | TargetIntDivRoundTo "Undefined" 371 | TargetEndianess "Unspecified" 372 | TargetWordSize 32 373 | TargetPreprocMaxBitsSint 32 374 | TargetPreprocMaxBitsUint 32 375 | TargetHWDeviceType "Specified" 376 | TargetUnknown off 377 | ProdEqTarget on 378 | } 379 | Simulink.ModelReferenceCC { 380 | $ObjectID 17 381 | Version "1.12.0" 382 | UpdateModelReferenceTargets "IfOutOfDateOrStructuralChange" 383 | CheckModelReferenceTargetMessage "error" 384 | EnableParallelModelReferenceBuilds off 385 | ParallelModelReferenceErrorOnInvalidPool on 386 | ParallelModelReferenceMATLABWorkerInit "None" 387 | ModelReferenceNumInstancesAllowed "Multi" 388 | PropagateVarSize "Infer from blocks in model" 389 | ModelReferencePassRootInputsByReference on 390 | ModelReferenceMinAlgLoopOccurrences off 391 | PropagateSignalLabelsOutOfModel on 392 | SupportModelReferenceSimTargetCustomCode off 393 | } 394 | Simulink.SFSimCC { 395 | $ObjectID 18 396 | Version "1.12.0" 397 | SFSimEcho on 398 | SimCtrlC on 399 | SimIntegrity on 400 | SimUseLocalCustomCode off 401 | SimParseCustomCode on 402 | SimBuildMode "sf_incremental_build" 403 | } 404 | Simulink.RTWCC { 405 | $BackupClass "Simulink.RTWCC" 406 | $ObjectID 19 407 | Version "1.12.0" 408 | Array { 409 | Type "Cell" 410 | Dimension 15 411 | Cell "IncludeHyperlinkInReport" 412 | Cell "GenerateTraceInfo" 413 | Cell "GenerateTraceReport" 414 | Cell "GenerateTraceReportSl" 415 | Cell "GenerateTraceReportSf" 416 | Cell "GenerateTraceReportEml" 417 | Cell "PortableWordSizes" 418 | Cell "GenerateWebview" 419 | Cell "GenerateCodeMetricsReport" 420 | Cell "GenerateCodeReplacementReport" 421 | Cell "GenerateErtSFunction" 422 | Cell "CreateSILPILBlock" 423 | Cell "CodeExecutionProfiling" 424 | Cell "CodeProfilingSaveOptions" 425 | Cell "CodeProfilingInstrumentation" 426 | PropName "DisabledProps" 427 | } 428 | SystemTargetFile "grt.tlc" 429 | TLCOptions "" 430 | GenCodeOnly off 431 | MakeCommand "make_rtw" 432 | GenerateMakefile on 433 | TemplateMakefile "grt_default_tmf" 434 | PostCodeGenCommand "" 435 | Description "" 436 | GenerateReport off 437 | SaveLog off 438 | RTWVerbose on 439 | RetainRTWFile off 440 | ProfileTLC off 441 | TLCDebug off 442 | TLCCoverage off 443 | TLCAssert off 444 | RTWUseLocalCustomCode off 445 | RTWUseSimCustomCode off 446 | IncludeHyperlinkInReport off 447 | LaunchReport off 448 | TargetLang "C" 449 | IncludeBusHierarchyInRTWFileBlockHierarchyMap off 450 | GenerateTraceInfo off 451 | GenerateTraceReport off 452 | GenerateTraceReportSl off 453 | GenerateTraceReportSf off 454 | GenerateTraceReportEml off 455 | GenerateWebview off 456 | GenerateCodeMetricsReport off 457 | GenerateCodeReplacementReport off 458 | RTWCompilerOptimization "Off" 459 | RTWCustomCompilerOptimizations "" 460 | CheckMdlBeforeBuild "Off" 461 | Array { 462 | Type "Handle" 463 | Dimension 2 464 | Simulink.CodeAppCC { 465 | $ObjectID 20 466 | Version "1.12.0" 467 | Array { 468 | Type "Cell" 469 | Dimension 23 470 | Cell "IgnoreCustomStorageClasses" 471 | Cell "IgnoreTestpoints" 472 | Cell "InsertBlockDesc" 473 | Cell "InsertPolySpaceComments" 474 | Cell "SFDataObjDesc" 475 | Cell "MATLABFcnDesc" 476 | Cell "SimulinkDataObjDesc" 477 | Cell "DefineNamingRule" 478 | Cell "SignalNamingRule" 479 | Cell "ParamNamingRule" 480 | Cell "InternalIdentifier" 481 | Cell "InlinedPrmAccess" 482 | Cell "CustomSymbolStr" 483 | Cell "CustomSymbolStrGlobalVar" 484 | Cell "CustomSymbolStrType" 485 | Cell "CustomSymbolStrField" 486 | Cell "CustomSymbolStrFcn" 487 | Cell "CustomSymbolStrFcnArg" 488 | Cell "CustomSymbolStrBlkIO" 489 | Cell "CustomSymbolStrTmpVar" 490 | Cell "CustomSymbolStrMacro" 491 | Cell "CustomSymbolStrUtil" 492 | Cell "ReqsInCode" 493 | PropName "DisabledProps" 494 | } 495 | ForceParamTrailComments off 496 | GenerateComments on 497 | IgnoreCustomStorageClasses on 498 | IgnoreTestpoints off 499 | IncHierarchyInIds off 500 | MaxIdLength 31 501 | PreserveName off 502 | PreserveNameWithParent off 503 | ShowEliminatedStatement off 504 | IncAutoGenComments off 505 | SimulinkDataObjDesc off 506 | SFDataObjDesc off 507 | MATLABFcnDesc off 508 | IncDataTypeInIds off 509 | MangleLength 1 510 | CustomSymbolStrGlobalVar "$R$N$M" 511 | CustomSymbolStrType "$N$R$M_T" 512 | CustomSymbolStrField "$N$M" 513 | CustomSymbolStrFcn "$R$N$M$F" 514 | CustomSymbolStrFcnArg "rt$I$N$M" 515 | CustomSymbolStrBlkIO "rtb_$N$M" 516 | CustomSymbolStrTmpVar "$N$M" 517 | CustomSymbolStrMacro "$R$N$M" 518 | DefineNamingRule "None" 519 | ParamNamingRule "None" 520 | SignalNamingRule "None" 521 | InsertBlockDesc off 522 | InsertPolySpaceComments off 523 | SimulinkBlockComments on 524 | MATLABSourceComments off 525 | EnableCustomComments off 526 | InlinedPrmAccess "Literals" 527 | ReqsInCode off 528 | UseSimReservedNames off 529 | } 530 | Simulink.GRTTargetCC { 531 | $BackupClass "Simulink.TargetCC" 532 | $ObjectID 21 533 | Version "1.12.0" 534 | Array { 535 | Type "Cell" 536 | Dimension 14 537 | Cell "GeneratePreprocessorConditionals" 538 | Cell "IncludeMdlTerminateFcn" 539 | Cell "SupportNonInlinedSFcns" 540 | Cell "SuppressErrorStatus" 541 | Cell "ERTCustomFileBanners" 542 | Cell "GenerateSampleERTMain" 543 | Cell "GenerateTestInterfaces" 544 | Cell "ModelStepFunctionPrototypeControlCompliant" 545 | Cell "MultiInstanceERTCode" 546 | Cell "PurelyIntegerCode" 547 | Cell "SupportComplex" 548 | Cell "SupportAbsoluteTime" 549 | Cell "SupportContinuousTime" 550 | Cell "CombineOutputUpdateFcns" 551 | PropName "DisabledProps" 552 | } 553 | TargetFcnLib "ansi_tfl_table_tmw.mat" 554 | TargetLibSuffix "" 555 | CodeReplacementLibrary "C89/C90 (ANSI)" 556 | UtilityFuncGeneration "Auto" 557 | ERTMultiwordTypeDef "System defined" 558 | ERTMultiwordLength 256 559 | MultiwordLength 2048 560 | GenerateFullHeader on 561 | GenerateSampleERTMain off 562 | GenerateTestInterfaces off 563 | ModelReferenceCompliant on 564 | ParMdlRefBuildCompliant on 565 | CompOptLevelCompliant on 566 | ConcurrentExecutionCompliant on 567 | IncludeMdlTerminateFcn on 568 | GeneratePreprocessorConditionals "Disable all" 569 | CombineOutputUpdateFcns on 570 | CombineSignalStateStructs off 571 | SuppressErrorStatus off 572 | ERTFirstTimeCompliant off 573 | IncludeFileDelimiter "Auto" 574 | ERTCustomFileBanners off 575 | SupportAbsoluteTime on 576 | LogVarNameModifier "rt_" 577 | MatFileLogging on 578 | MultiInstanceERTCode off 579 | SupportNonFinite on 580 | SupportComplex on 581 | PurelyIntegerCode off 582 | SupportContinuousTime on 583 | SupportNonInlinedSFcns on 584 | SupportVariableSizeSignals off 585 | ParenthesesLevel "Nominal" 586 | ModelStepFunctionPrototypeControlCompliant off 587 | CPPClassGenCompliant off 588 | AutosarCompliant off 589 | GRTInterface off 590 | UseMalloc off 591 | ExtMode off 592 | ExtModeStaticAlloc off 593 | ExtModeTesting off 594 | ExtModeStaticAllocSize 1000000 595 | ExtModeTransport 0 596 | ExtModeMexFile "ext_comm" 597 | ExtModeIntrfLevel "Level1" 598 | RTWCAPISignals off 599 | RTWCAPIParams off 600 | RTWCAPIStates off 601 | RTWCAPIRootIO off 602 | GenerateASAP2 off 603 | } 604 | PropName "Components" 605 | } 606 | } 607 | hdlcoderui.hdlcc { 608 | $ObjectID 23 609 | Version "1.12.0" 610 | Description "HDL Coder custom configuration component" 611 | Name "HDL Coder" 612 | Array { 613 | Type "Cell" 614 | Dimension 1 615 | Cell " " 616 | PropName "HDLConfigFile" 617 | } 618 | HDLCActiveTab "0" 619 | } 620 | PropName "Components" 621 | } 622 | Name "Configuration" 623 | CurrentDlgPage "Solver" 624 | ConfigPrmDlgPosition [ 320, 92, 1212, 704 ] 625 | } 626 | PropName "ConfigurationSets" 627 | } 628 | Simulink.ConfigSet { 629 | $PropName "ActiveConfigurationSet" 630 | $ObjectID 11 631 | } 632 | ExplicitPartitioning off 633 | BlockDefaults { 634 | ForegroundColor "black" 635 | BackgroundColor "white" 636 | DropShadow off 637 | NamePlacement "normal" 638 | FontName "Helvetica" 639 | FontSize 10 640 | FontWeight "normal" 641 | FontAngle "normal" 642 | ShowName on 643 | BlockRotation 0 644 | BlockMirror off 645 | } 646 | AnnotationDefaults { 647 | HorizontalAlignment "center" 648 | VerticalAlignment "middle" 649 | ForegroundColor "black" 650 | BackgroundColor "white" 651 | DropShadow off 652 | FontName "Helvetica" 653 | FontSize 10 654 | FontWeight "normal" 655 | FontAngle "normal" 656 | UseDisplayTextAsClickCallback off 657 | } 658 | LineDefaults { 659 | FontName "Helvetica" 660 | FontSize 9 661 | FontWeight "normal" 662 | FontAngle "normal" 663 | } 664 | BlockParameterDefaults { 665 | Block { 666 | BlockType Clock 667 | DisplayTime off 668 | Decimation "10" 669 | } 670 | Block { 671 | BlockType Demux 672 | Outputs "4" 673 | DisplayOption "none" 674 | BusSelectionMode off 675 | } 676 | Block { 677 | BlockType Derivative 678 | CoefficientInTFapproximation "inf" 679 | } 680 | Block { 681 | BlockType FrameConversion 682 | OutFrame "Frame-based" 683 | } 684 | Block { 685 | BlockType Inport 686 | Port "1" 687 | OutputFunctionCall off 688 | OutMin "[]" 689 | OutMax "[]" 690 | OutDataTypeStr "Inherit: auto" 691 | LockScale off 692 | BusOutputAsStruct off 693 | PortDimensions "-1" 694 | VarSizeSig "Inherit" 695 | SampleTime "-1" 696 | SignalType "auto" 697 | SamplingMode "auto" 698 | LatchByDelayingOutsideSignal off 699 | LatchInputForFeedbackSignals off 700 | Interpolate on 701 | } 702 | Block { 703 | BlockType Integrator 704 | ExternalReset "none" 705 | InitialConditionSource "internal" 706 | InitialCondition "0" 707 | LimitOutput off 708 | UpperSaturationLimit "inf" 709 | LowerSaturationLimit "-inf" 710 | ShowSaturationPort off 711 | ShowStatePort off 712 | AbsoluteTolerance "auto" 713 | IgnoreLimit off 714 | ZeroCross on 715 | ContinuousStateAttributes "''" 716 | } 717 | Block { 718 | BlockType MATLABFcn 719 | MATLABFcn "sin" 720 | OutputDimensions "-1" 721 | OutputSignalType "auto" 722 | Output1D on 723 | SampleTime "-1" 724 | } 725 | Block { 726 | BlockType Memory 727 | X0 "0" 728 | InheritSampleTime off 729 | LinearizeMemory off 730 | LinearizeAsDelay off 731 | StateMustResolveToSignalObject off 732 | RTWStateStorageClass "Auto" 733 | } 734 | Block { 735 | BlockType Mux 736 | Inputs "4" 737 | DisplayOption "none" 738 | UseBusObject off 739 | BusObject "BusObject" 740 | NonVirtualBus off 741 | } 742 | Block { 743 | BlockType Outport 744 | Port "1" 745 | OutMin "[]" 746 | OutMax "[]" 747 | OutDataTypeStr "Inherit: auto" 748 | LockScale off 749 | BusOutputAsStruct off 750 | PortDimensions "-1" 751 | VarSizeSig "Inherit" 752 | SampleTime "-1" 753 | SignalType "auto" 754 | SamplingMode "auto" 755 | SourceOfInitialOutputValue "Dialog" 756 | OutputWhenDisabled "held" 757 | InitialOutput "[]" 758 | } 759 | Block { 760 | BlockType Scope 761 | Floating off 762 | } 763 | Block { 764 | BlockType SubSystem 765 | ShowPortLabels "FromPortIcon" 766 | Permissions "ReadWrite" 767 | PermitHierarchicalResolution "All" 768 | TreatAsAtomicUnit off 769 | CheckFcnCallInpInsideContextMsg off 770 | SystemSampleTime "-1" 771 | RTWFcnNameOpts "Auto" 772 | RTWFileNameOpts "Auto" 773 | RTWMemSecFuncInitTerm "Inherit from model" 774 | RTWMemSecFuncExecute "Inherit from model" 775 | RTWMemSecDataConstants "Inherit from model" 776 | RTWMemSecDataInternal "Inherit from model" 777 | RTWMemSecDataParameters "Inherit from model" 778 | SimViewingDevice off 779 | DataTypeOverride "UseLocalSettings" 780 | DataTypeOverrideAppliesTo "AllNumericTypes" 781 | MinMaxOverflowLogging "UseLocalSettings" 782 | SFBlockType "NONE" 783 | GeneratePreprocessorConditionals off 784 | TreatAsGroupedWhenPropagatingVariantConditions on 785 | } 786 | Block { 787 | BlockType ToWorkspace 788 | VariableName "simulink_output" 789 | MaxDataPoints "1000" 790 | Decimation "1" 791 | SaveFormat "Array" 792 | FixptAsFi off 793 | NumInputs "1" 794 | SampleTime "0" 795 | } 796 | } 797 | System { 798 | Name "jiang" 799 | Location [-6, 0, 1543, 837] 800 | Open off 801 | ModelBrowserVisibility off 802 | ModelBrowserWidth 200 803 | ScreenColor "white" 804 | PaperOrientation "landscape" 805 | PaperPositionMode "auto" 806 | PaperType "usletter" 807 | PaperUnits "inches" 808 | TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000] 809 | TiledPageScale 1 810 | ShowPageBoundaries off 811 | ZoomFactor "125" 812 | ReportName "simulink-default.rpt" 813 | SIDHighWatermark "118" 814 | Block { 815 | BlockType Clock 816 | Name "Clock" 817 | SID "1" 818 | Position [240, 270, 260, 290] 819 | ZOrder 28 820 | } 821 | Block { 822 | BlockType SubSystem 823 | Name "Controller" 824 | SID "2" 825 | Ports [3, 1] 826 | Position [765, 257, 865, 343] 827 | ZOrder 30 828 | RequestExecContextInheritance off 829 | Variant off 830 | System { 831 | Name "Controller" 832 | Location [-6, 0, 1543, 837] 833 | Open off 834 | ModelBrowserVisibility off 835 | ModelBrowserWidth 200 836 | ScreenColor "white" 837 | PaperOrientation "landscape" 838 | PaperPositionMode "auto" 839 | PaperType "A4" 840 | PaperUnits "centimeters" 841 | TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] 842 | TiledPageScale 1 843 | ShowPageBoundaries off 844 | ZoomFactor "100" 845 | Block { 846 | BlockType Inport 847 | Name "q_r_dot" 848 | SID "3" 849 | Position [20, 138, 50, 152] 850 | ZOrder -1 851 | IconDisplay "Port number" 852 | } 853 | Block { 854 | BlockType Inport 855 | Name "e" 856 | SID "4" 857 | Position [20, 218, 50, 232] 858 | ZOrder 36 859 | Port "2" 860 | IconDisplay "Port number" 861 | } 862 | Block { 863 | BlockType Inport 864 | Name "n" 865 | SID "6" 866 | Position [285, 238, 315, 252] 867 | ZOrder 34 868 | Port "3" 869 | IconDisplay "Port number" 870 | } 871 | Block { 872 | BlockType Demux 873 | Name "Demux" 874 | SID "7" 875 | Ports [1, 2] 876 | Position [1240, 286, 1245, 324] 877 | ZOrder 27 878 | ShowName off 879 | Outputs "2" 880 | DisplayOption "bar" 881 | } 882 | Block { 883 | BlockType Demux 884 | Name "Demux1" 885 | SID "69" 886 | Ports [1, 4] 887 | Position [625, 186, 630, 224] 888 | ZOrder 46 889 | ShowName off 890 | DisplayOption "bar" 891 | } 892 | Block { 893 | BlockType Derivative 894 | Name "Derivative" 895 | SID "73" 896 | Position [520, 125, 550, 155] 897 | ZOrder 50 898 | } 899 | Block { 900 | BlockType Integrator 901 | Name "Integrator" 902 | SID "72" 903 | Ports [1, 1] 904 | Position [735, 245, 765, 275] 905 | ZOrder 49 906 | } 907 | Block { 908 | BlockType Memory 909 | Name "Memory" 910 | SID "74" 911 | Position [540, 300, 570, 330] 912 | ZOrder 51 913 | BlockMirror on 914 | X0 "[0;0]" 915 | } 916 | Block { 917 | BlockType Mux 918 | Name "Mux" 919 | SID "61" 920 | Ports [2, 1] 921 | Position [155, 148, 160, 217] 922 | ZOrder 38 923 | ShowName off 924 | Inputs "2" 925 | DisplayOption "bar" 926 | } 927 | Block { 928 | BlockType Mux 929 | Name "Mux1" 930 | SID "66" 931 | Ports [3, 1] 932 | Position [410, 175, 415, 245] 933 | ZOrder 43 934 | ShowName off 935 | Inputs "3" 936 | DisplayOption "bar" 937 | } 938 | Block { 939 | BlockType Mux 940 | Name "Mux2" 941 | SID "67" 942 | Ports [5, 1] 943 | Position [925, 159, 930, 301] 944 | ZOrder 44 945 | ShowName off 946 | Inputs "5" 947 | DisplayOption "bar" 948 | } 949 | Block { 950 | BlockType Mux 951 | Name "Mux3" 952 | SID "70" 953 | Ports [2, 1] 954 | Position [700, 181, 705, 219] 955 | ZOrder 47 956 | ShowName off 957 | Inputs "2" 958 | DisplayOption "bar" 959 | } 960 | Block { 961 | BlockType Mux 962 | Name "Mux4" 963 | SID "71" 964 | Ports [2, 1] 965 | Position [670, 211, 675, 249] 966 | ZOrder 48 967 | ShowName off 968 | Inputs "2" 969 | DisplayOption "bar" 970 | } 971 | Block { 972 | BlockType Scope 973 | Name "Scope" 974 | SID "89" 975 | Ports [1] 976 | Position [1160, 329, 1190, 361] 977 | ZOrder 52 978 | Open off 979 | TimeRange auto 980 | TickLabels OneTimeTick 981 | ShowLegends off 982 | LimitDataPoints off 983 | MaxDataPoints 5000 984 | SaveToWorkspace off 985 | SaveName ScopeData 986 | YMin -249.84575 987 | YMax 752.27677 988 | SampleInput off 989 | SampleTime -1 990 | ZoomMode on 991 | Grid on 992 | DataFormat StructureWithTime 993 | Decimation 1 994 | List { 995 | ListType AxesTitles 996 | axes1 "%" 997 | } 998 | List { 999 | ListType ScopeGraphics 1000 | FigureColor "[0.156862745098039 0.156862745098039 0.156862745098039]" 1001 | AxesColor "[0 0 0]" 1002 | AxesTickColor "[0.686274509803922 0.686274509803922 0.686274509803922]" 1003 | LineColors "[1 1 0;1 0 1;0 1 1;1 0 0;0 1 0;0 0 1]" 1004 | LineStyles "-|-|-|-|-|-" 1005 | LineWidths "[0.5 0.5 0.5 0.5 0.5 0.5]" 1006 | MarkerStyles "none|none|none|none|none|none" 1007 | } 1008 | Location [488 222 1048 642] 1009 | } 1010 | Block { 1011 | BlockType ToWorkspace 1012 | Name "To Workspace" 1013 | SID "14" 1014 | Ports [1] 1015 | Position [1405, 250, 1435, 280] 1016 | ZOrder 28 1017 | VariableName "Tau_u" 1018 | MaxDataPoints "inf" 1019 | FixptAsFi on 1020 | SampleTime "-1" 1021 | } 1022 | Block { 1023 | BlockType ToWorkspace 1024 | Name "To Workspace1" 1025 | SID "15" 1026 | Ports [1] 1027 | Position [1405, 330, 1435, 360] 1028 | ZOrder 29 1029 | VariableName "Tau_r" 1030 | MaxDataPoints "inf" 1031 | FixptAsFi on 1032 | SampleTime "-1" 1033 | } 1034 | Block { 1035 | BlockType ToWorkspace 1036 | Name "To Workspace2" 1037 | SID "94" 1038 | Ports [1] 1039 | Position [440, 50, 470, 80] 1040 | ZOrder 53 1041 | VariableName "v_d" 1042 | MaxDataPoints "inf" 1043 | FixptAsFi on 1044 | SampleTime "-1" 1045 | } 1046 | Block { 1047 | BlockType ToWorkspace 1048 | Name "To Workspace3" 1049 | SID "98" 1050 | Ports [1] 1051 | Position [760, 375, 790, 405] 1052 | ZOrder 55 1053 | VariableName "u_e" 1054 | MaxDataPoints "inf" 1055 | FixptAsFi on 1056 | SampleTime "-1" 1057 | } 1058 | Block { 1059 | BlockType ToWorkspace 1060 | Name "To Workspace4" 1061 | SID "99" 1062 | Ports [1] 1063 | Position [760, 450, 790, 480] 1064 | ZOrder 56 1065 | VariableName "r_e" 1066 | MaxDataPoints "inf" 1067 | FixptAsFi on 1068 | SampleTime "-1" 1069 | } 1070 | Block { 1071 | BlockType MATLABFcn 1072 | Name "dynamic_control" 1073 | SID "63" 1074 | Ports [1, 1] 1075 | Position [1090, 215, 1160, 245] 1076 | ZOrder 40 1077 | MATLABFcn "dynamic_control" 1078 | OutputDimensions "2" 1079 | } 1080 | Block { 1081 | BlockType MATLABFcn 1082 | Name "kinematic_control" 1083 | SID "62" 1084 | Ports [1, 1] 1085 | Position [245, 170, 315, 200] 1086 | ZOrder 39 1087 | MATLABFcn "kinematic_control" 1088 | OutputDimensions "2" 1089 | } 1090 | Block { 1091 | BlockType FrameConversion 1092 | Name "tp45531943_d9ac_440f_948b_8040e2d407f6" 1093 | SID "101" 1094 | Ports [1, 1] 1095 | Position [1320, 250, 1380, 280] 1096 | ZOrder 57 1097 | ShowName off 1098 | InheritSamplingMode off 1099 | OutFrame "Sample-based" 1100 | } 1101 | Block { 1102 | BlockType FrameConversion 1103 | Name "tp459885f7_d422_4581_8d2d_e6ee320bb0a5" 1104 | SID "105" 1105 | Ports [1, 1] 1106 | Position [675, 450, 735, 480] 1107 | ZOrder 61 1108 | ShowName off 1109 | InheritSamplingMode off 1110 | OutFrame "Sample-based" 1111 | } 1112 | Block { 1113 | BlockType FrameConversion 1114 | Name "tp4c600b90_18ba_45c7_a8fa_2fc70ede2d0c" 1115 | SID "102" 1116 | Ports [1, 1] 1117 | Position [1320, 330, 1380, 360] 1118 | ZOrder 58 1119 | ShowName off 1120 | InheritSamplingMode off 1121 | OutFrame "Sample-based" 1122 | } 1123 | Block { 1124 | BlockType FrameConversion 1125 | Name "tp6e65603a_b1c4_4201_a758_92d25c1557e1" 1126 | SID "103" 1127 | Ports [1, 1] 1128 | Position [355, 50, 415, 80] 1129 | ZOrder 59 1130 | ShowName off 1131 | InheritSamplingMode off 1132 | OutFrame "Sample-based" 1133 | } 1134 | Block { 1135 | BlockType FrameConversion 1136 | Name "tpbad36ef8_ea6d_42a6_ac3a_19ddc9caed30" 1137 | SID "104" 1138 | Ports [1, 1] 1139 | Position [675, 375, 735, 405] 1140 | ZOrder 60 1141 | ShowName off 1142 | InheritSamplingMode off 1143 | OutFrame "Sample-based" 1144 | } 1145 | Block { 1146 | BlockType MATLABFcn 1147 | Name "velocity_error" 1148 | SID "64" 1149 | Ports [1, 1] 1150 | Position [520, 190, 590, 220] 1151 | ZOrder 41 1152 | MATLABFcn "velocity_error" 1153 | OutputDimensions "4" 1154 | } 1155 | Block { 1156 | BlockType Outport 1157 | Name "TAU" 1158 | SID "17" 1159 | Position [1270, 203, 1300, 217] 1160 | ZOrder -2 1161 | IconDisplay "Port number" 1162 | } 1163 | Line { 1164 | SrcBlock "dynamic_control" 1165 | SrcPort 1 1166 | Points [26, 0] 1167 | Branch { 1168 | Points [0, 64; -45, 0; 0, 51] 1169 | DstBlock "Scope" 1170 | DstPort 1 1171 | } 1172 | Branch { 1173 | Points [18, 0] 1174 | Branch { 1175 | Points [0, 75] 1176 | DstBlock "Demux" 1177 | DstPort 1 1178 | } 1179 | Branch { 1180 | Points [0, -20] 1181 | DstBlock "TAU" 1182 | DstPort 1 1183 | } 1184 | } 1185 | } 1186 | Line { 1187 | SrcBlock "q_r_dot" 1188 | SrcPort 1 1189 | Points [42, 0; 0, 20] 1190 | DstBlock "Mux" 1191 | DstPort 1 1192 | } 1193 | Line { 1194 | SrcBlock "e" 1195 | SrcPort 1 1196 | Points [41, 0; 0, -25] 1197 | DstBlock "Mux" 1198 | DstPort 2 1199 | } 1200 | Line { 1201 | SrcBlock "Mux" 1202 | SrcPort 1 1203 | DstBlock "kinematic_control" 1204 | DstPort 1 1205 | } 1206 | Line { 1207 | SrcBlock "kinematic_control" 1208 | SrcPort 1 1209 | Points [0, 0] 1210 | Branch { 1211 | Points [47, 0] 1212 | Branch { 1213 | Points [0, -47; 0, 2] 1214 | DstBlock "Derivative" 1215 | DstPort 1 1216 | } 1217 | Branch { 1218 | DstBlock "Mux1" 1219 | DstPort 1 1220 | } 1221 | } 1222 | Branch { 1223 | Points [20, 0] 1224 | DstBlock "tp6e65603a_b1c4_4201_a758_92d25c1557e1" 1225 | DstPort 1 1226 | } 1227 | } 1228 | Line { 1229 | SrcBlock "Mux1" 1230 | SrcPort 1 1231 | Points [43, 0; 0, -5] 1232 | DstBlock "velocity_error" 1233 | DstPort 1 1234 | } 1235 | Line { 1236 | SrcBlock "n" 1237 | SrcPort 1 1238 | Points [55, 0] 1239 | Branch { 1240 | Points [0, -35] 1241 | DstBlock "Mux1" 1242 | DstPort 2 1243 | } 1244 | Branch { 1245 | Points [0, 45] 1246 | DstBlock "Mux2" 1247 | DstPort 5 1248 | } 1249 | } 1250 | Line { 1251 | SrcBlock "velocity_error" 1252 | SrcPort 1 1253 | DstBlock "Demux1" 1254 | DstPort 1 1255 | } 1256 | Line { 1257 | SrcBlock "Demux1" 1258 | SrcPort 1 1259 | DstBlock "Mux3" 1260 | DstPort 1 1261 | } 1262 | Line { 1263 | SrcBlock "Demux1" 1264 | SrcPort 2 1265 | Points [48, 0; 0, 10] 1266 | DstBlock "Mux3" 1267 | DstPort 2 1268 | } 1269 | Line { 1270 | SrcBlock "Mux3" 1271 | SrcPort 1 1272 | Points [184, 0] 1273 | Branch { 1274 | Points [0, 115] 1275 | DstBlock "Memory" 1276 | DstPort 1 1277 | } 1278 | Branch { 1279 | DstBlock "Mux2" 1280 | DstPort 2 1281 | } 1282 | } 1283 | Line { 1284 | SrcBlock "Demux1" 1285 | SrcPort 3 1286 | Points [0, 0] 1287 | Branch { 1288 | Points [15, 0; 0, 10] 1289 | DstBlock "Mux4" 1290 | DstPort 1 1291 | } 1292 | Branch { 1293 | Points [10, 0; 0, 180] 1294 | DstBlock "tpbad36ef8_ea6d_42a6_ac3a_19ddc9caed30" 1295 | DstPort 1 1296 | } 1297 | } 1298 | Line { 1299 | SrcBlock "Demux1" 1300 | SrcPort 4 1301 | Points [0, 0] 1302 | Branch { 1303 | Points [5, 0; 0, 20] 1304 | DstBlock "Mux4" 1305 | DstPort 2 1306 | } 1307 | Branch { 1308 | Points [10, 0; 0, 245] 1309 | DstBlock "tp459885f7_d422_4581_8d2d_e6ee320bb0a5" 1310 | DstPort 1 1311 | } 1312 | } 1313 | Line { 1314 | SrcBlock "Mux4" 1315 | SrcPort 1 1316 | Points [25, 0] 1317 | Branch { 1318 | DstBlock "Mux2" 1319 | DstPort 3 1320 | } 1321 | Branch { 1322 | Points [0, 30] 1323 | DstBlock "Integrator" 1324 | DstPort 1 1325 | } 1326 | } 1327 | Line { 1328 | SrcBlock "Integrator" 1329 | SrcPort 1 1330 | DstBlock "Mux2" 1331 | DstPort 4 1332 | } 1333 | Line { 1334 | SrcBlock "Derivative" 1335 | SrcPort 1 1336 | Points [104, 0; 0, 30] 1337 | DstBlock "Mux2" 1338 | DstPort 1 1339 | } 1340 | Line { 1341 | SrcBlock "Mux2" 1342 | SrcPort 1 1343 | DstBlock "dynamic_control" 1344 | DstPort 1 1345 | } 1346 | Line { 1347 | SrcBlock "Memory" 1348 | SrcPort 1 1349 | Points [-142, 0; 0, -80] 1350 | DstBlock "Mux1" 1351 | DstPort 3 1352 | } 1353 | Line { 1354 | SrcBlock "Demux" 1355 | SrcPort 1 1356 | Points [25, 0; 0, -30] 1357 | DstBlock "tp45531943_d9ac_440f_948b_8040e2d407f6" 1358 | DstPort 1 1359 | } 1360 | Line { 1361 | SrcBlock "tp45531943_d9ac_440f_948b_8040e2d407f6" 1362 | SrcPort 1 1363 | DstBlock "To Workspace" 1364 | DstPort 1 1365 | } 1366 | Line { 1367 | SrcBlock "Demux" 1368 | SrcPort 2 1369 | Points [25, 0; 0, 30] 1370 | DstBlock "tp4c600b90_18ba_45c7_a8fa_2fc70ede2d0c" 1371 | DstPort 1 1372 | } 1373 | Line { 1374 | SrcBlock "tp4c600b90_18ba_45c7_a8fa_2fc70ede2d0c" 1375 | SrcPort 1 1376 | DstBlock "To Workspace1" 1377 | DstPort 1 1378 | } 1379 | Line { 1380 | SrcBlock "tp6e65603a_b1c4_4201_a758_92d25c1557e1" 1381 | SrcPort 1 1382 | DstBlock "To Workspace2" 1383 | DstPort 1 1384 | } 1385 | Line { 1386 | SrcBlock "tpbad36ef8_ea6d_42a6_ac3a_19ddc9caed30" 1387 | SrcPort 1 1388 | DstBlock "To Workspace3" 1389 | DstPort 1 1390 | } 1391 | Line { 1392 | SrcBlock "tp459885f7_d422_4581_8d2d_e6ee320bb0a5" 1393 | SrcPort 1 1394 | DstBlock "To Workspace4" 1395 | DstPort 1 1396 | } 1397 | } 1398 | RTWSystemCode "Auto" 1399 | MinAlgLoopOccurrences off 1400 | PropExecContextOutsideSubsystem off 1401 | FunctionWithSeparateData off 1402 | Opaque off 1403 | MaskHideContents off 1404 | } 1405 | Block { 1406 | BlockType SubSystem 1407 | Name "Error" 1408 | SID "18" 1409 | Ports [2, 1] 1410 | Position [520, 279, 620, 321] 1411 | ZOrder 34 1412 | RequestExecContextInheritance off 1413 | Variant off 1414 | System { 1415 | Name "Error" 1416 | Location [-7, -7, 1543, 831] 1417 | Open off 1418 | ModelBrowserVisibility off 1419 | ModelBrowserWidth 200 1420 | ScreenColor "white" 1421 | PaperOrientation "landscape" 1422 | PaperPositionMode "auto" 1423 | PaperType "A4" 1424 | PaperUnits "centimeters" 1425 | TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] 1426 | TiledPageScale 1 1427 | ShowPageBoundaries off 1428 | ZoomFactor "125" 1429 | Block { 1430 | BlockType Inport 1431 | Name "q_r" 1432 | SID "19" 1433 | Position [150, 218, 180, 232] 1434 | ZOrder -1 1435 | IconDisplay "Port number" 1436 | } 1437 | Block { 1438 | BlockType Inport 1439 | Name "q" 1440 | SID "20" 1441 | Position [150, 248, 180, 262] 1442 | ZOrder 1 1443 | Port "2" 1444 | IconDisplay "Port number" 1445 | } 1446 | Block { 1447 | BlockType Mux 1448 | Name "Mux" 1449 | SID "22" 1450 | Ports [2, 1] 1451 | Position [235, 208, 240, 272] 1452 | ZOrder 5 1453 | ShowName off 1454 | Inputs "2" 1455 | DisplayOption "bar" 1456 | } 1457 | Block { 1458 | BlockType ToWorkspace 1459 | Name "To Workspace" 1460 | SID "23" 1461 | Ports [1] 1462 | Position [655, 295, 685, 325] 1463 | ZOrder 7 1464 | VariableName "e" 1465 | MaxDataPoints "inf" 1466 | FixptAsFi on 1467 | SampleTime "-1" 1468 | } 1469 | Block { 1470 | BlockType MATLABFcn 1471 | Name "control_error" 1472 | SID "24" 1473 | Ports [1, 1] 1474 | Position [340, 225, 410, 255] 1475 | ZOrder 12 1476 | MATLABFcn "control_error" 1477 | OutputDimensions "3" 1478 | } 1479 | Block { 1480 | BlockType FrameConversion 1481 | Name "tpc037e98a_a284_4b9c_8697_c0724c365e5b" 1482 | SID "106" 1483 | Ports [1, 1] 1484 | Position [570, 295, 630, 325] 1485 | ZOrder 13 1486 | ShowName off 1487 | InheritSamplingMode off 1488 | OutFrame "Sample-based" 1489 | } 1490 | Block { 1491 | BlockType Outport 1492 | Name "e" 1493 | SID "25" 1494 | Position [585, 233, 615, 247] 1495 | ZOrder -2 1496 | IconDisplay "Port number" 1497 | } 1498 | Line { 1499 | SrcBlock "q_r" 1500 | SrcPort 1 1501 | DstBlock "Mux" 1502 | DstPort 1 1503 | } 1504 | Line { 1505 | SrcBlock "Mux" 1506 | SrcPort 1 1507 | DstBlock "control_error" 1508 | DstPort 1 1509 | } 1510 | Line { 1511 | SrcBlock "q" 1512 | SrcPort 1 1513 | DstBlock "Mux" 1514 | DstPort 2 1515 | } 1516 | Line { 1517 | SrcBlock "control_error" 1518 | SrcPort 1 1519 | Points [0, 0] 1520 | Branch { 1521 | DstBlock "e" 1522 | DstPort 1 1523 | } 1524 | Branch { 1525 | Points [70, 0; 0, 70] 1526 | DstBlock "tpc037e98a_a284_4b9c_8697_c0724c365e5b" 1527 | DstPort 1 1528 | } 1529 | } 1530 | Line { 1531 | SrcBlock "tpc037e98a_a284_4b9c_8697_c0724c365e5b" 1532 | SrcPort 1 1533 | DstBlock "To Workspace" 1534 | DstPort 1 1535 | } 1536 | } 1537 | RTWSystemCode "Auto" 1538 | MinAlgLoopOccurrences off 1539 | PropExecContextOutsideSubsystem off 1540 | FunctionWithSeparateData off 1541 | Opaque off 1542 | MaskHideContents off 1543 | } 1544 | Block { 1545 | BlockType SubSystem 1546 | Name "Model" 1547 | SID "28" 1548 | Ports [1, 4] 1549 | Position [990, 258, 1090, 342] 1550 | ZOrder 31 1551 | RequestExecContextInheritance off 1552 | Variant off 1553 | System { 1554 | Name "Model" 1555 | Location [-6, 0, 1543, 837] 1556 | Open off 1557 | ModelBrowserVisibility off 1558 | ModelBrowserWidth 200 1559 | ScreenColor "white" 1560 | PaperOrientation "landscape" 1561 | PaperPositionMode "auto" 1562 | PaperType "A4" 1563 | PaperUnits "centimeters" 1564 | TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] 1565 | TiledPageScale 1 1566 | ShowPageBoundaries off 1567 | ZoomFactor "80" 1568 | Block { 1569 | BlockType Inport 1570 | Name "TAU" 1571 | SID "29" 1572 | Position [120, 238, 150, 252] 1573 | ZOrder -1 1574 | IconDisplay "Port number" 1575 | } 1576 | Block { 1577 | BlockType Demux 1578 | Name "Demux" 1579 | SID "30" 1580 | Ports [1, 3] 1581 | Position [940, 246, 945, 284] 1582 | ZOrder 8 1583 | ShowName off 1584 | Outputs "3" 1585 | DisplayOption "bar" 1586 | } 1587 | Block { 1588 | BlockType Demux 1589 | Name "Demux1" 1590 | SID "90" 1591 | Ports [1, 3] 1592 | Position [620, 451, 625, 489] 1593 | ZOrder 16 1594 | ShowName off 1595 | Outputs "3" 1596 | DisplayOption "bar" 1597 | } 1598 | Block { 1599 | BlockType MATLABFcn 1600 | Name "Dynamic" 1601 | SID "31" 1602 | Ports [1, 1] 1603 | Position [340, 240, 410, 270] 1604 | ZOrder 5 1605 | MATLABFcn "dynamic" 1606 | OutputDimensions "3" 1607 | } 1608 | Block { 1609 | BlockType Integrator 1610 | Name "Integrator" 1611 | SID "32" 1612 | Ports [1, 1] 1613 | Position [490, 240, 520, 270] 1614 | ZOrder 3 1615 | InitialCondition "[0 0 0]" 1616 | } 1617 | Block { 1618 | BlockType Integrator 1619 | Name "Integrator1" 1620 | SID "33" 1621 | Ports [1, 1] 1622 | Position [830, 250, 860, 280] 1623 | ZOrder 13 1624 | InitialCondition "[5 10 0.5]" 1625 | } 1626 | Block { 1627 | BlockType MATLABFcn 1628 | Name "Kinematic" 1629 | SID "34" 1630 | Ports [1, 1] 1631 | Position [730, 250, 800, 280] 1632 | ZOrder 6 1633 | MATLABFcn "kinematic" 1634 | OutputDimensions "3" 1635 | } 1636 | Block { 1637 | BlockType Mux 1638 | Name "Mux" 1639 | SID "35" 1640 | Ports [2, 1] 1641 | Position [235, 236, 240, 274] 1642 | ZOrder 1 1643 | ShowName off 1644 | Inputs "2" 1645 | DisplayOption "bar" 1646 | } 1647 | Block { 1648 | BlockType Mux 1649 | Name "Mux1" 1650 | SID "36" 1651 | Ports [2, 1] 1652 | Position [650, 246, 655, 284] 1653 | ZOrder 7 1654 | ShowName off 1655 | Inputs "2" 1656 | DisplayOption "bar" 1657 | } 1658 | Block { 1659 | BlockType ToWorkspace 1660 | Name "To Workspace" 1661 | SID "37" 1662 | Ports [1] 1663 | Position [1095, 55, 1125, 85] 1664 | ZOrder 10 1665 | VariableName "x" 1666 | MaxDataPoints "inf" 1667 | FixptAsFi on 1668 | SampleTime "-1" 1669 | } 1670 | Block { 1671 | BlockType ToWorkspace 1672 | Name "To Workspace1" 1673 | SID "38" 1674 | Ports [1] 1675 | Position [1165, 160, 1195, 190] 1676 | ZOrder 11 1677 | VariableName "y" 1678 | MaxDataPoints "inf" 1679 | FixptAsFi on 1680 | SampleTime "-1" 1681 | } 1682 | Block { 1683 | BlockType ToWorkspace 1684 | Name "To Workspace2" 1685 | SID "87" 1686 | Ports [1] 1687 | Position [1130, 280, 1160, 310] 1688 | ZOrder 15 1689 | VariableName "psi" 1690 | MaxDataPoints "inf" 1691 | FixptAsFi on 1692 | SampleTime "-1" 1693 | } 1694 | Block { 1695 | BlockType ToWorkspace 1696 | Name "To Workspace3" 1697 | SID "91" 1698 | Ports [1] 1699 | Position [755, 395, 785, 425] 1700 | ZOrder 17 1701 | VariableName "u" 1702 | MaxDataPoints "inf" 1703 | FixptAsFi on 1704 | SampleTime "-1" 1705 | } 1706 | Block { 1707 | BlockType ToWorkspace 1708 | Name "To Workspace4" 1709 | SID "92" 1710 | Ports [1] 1711 | Position [780, 455, 810, 485] 1712 | ZOrder 18 1713 | VariableName "v" 1714 | MaxDataPoints "inf" 1715 | FixptAsFi on 1716 | SampleTime "-1" 1717 | } 1718 | Block { 1719 | BlockType ToWorkspace 1720 | Name "To Workspace5" 1721 | SID "93" 1722 | Ports [1] 1723 | Position [770, 520, 800, 550] 1724 | ZOrder 19 1725 | VariableName "r" 1726 | MaxDataPoints "inf" 1727 | FixptAsFi on 1728 | SampleTime "-1" 1729 | } 1730 | Block { 1731 | BlockType FrameConversion 1732 | Name "tp25ee92a5_cfae_472f_93d1_7b993d44970c" 1733 | SID "108" 1734 | Ports [1, 1] 1735 | Position [1080, 160, 1140, 190] 1736 | ZOrder 21 1737 | ShowName off 1738 | InheritSamplingMode off 1739 | OutFrame "Sample-based" 1740 | } 1741 | Block { 1742 | BlockType FrameConversion 1743 | Name "tp3c6d5481_5046_4814_9362_4848ed7962ad" 1744 | SID "111" 1745 | Ports [1, 1] 1746 | Position [695, 455, 755, 485] 1747 | ZOrder 24 1748 | ShowName off 1749 | InheritSamplingMode off 1750 | OutFrame "Sample-based" 1751 | } 1752 | Block { 1753 | BlockType FrameConversion 1754 | Name "tp6cc2519a_c92b_4e8c_a790_e70a0a1378da" 1755 | SID "110" 1756 | Ports [1, 1] 1757 | Position [670, 395, 730, 425] 1758 | ZOrder 23 1759 | ShowName off 1760 | InheritSamplingMode off 1761 | OutFrame "Sample-based" 1762 | } 1763 | Block { 1764 | BlockType FrameConversion 1765 | Name "tp79f989b8_184b_4cae_813f_ddfebe13ee74" 1766 | SID "112" 1767 | Ports [1, 1] 1768 | Position [685, 520, 745, 550] 1769 | ZOrder 25 1770 | ShowName off 1771 | InheritSamplingMode off 1772 | OutFrame "Sample-based" 1773 | } 1774 | Block { 1775 | BlockType FrameConversion 1776 | Name "tpa12f4306_a713_4667_9ea2_d040d9adc66b" 1777 | SID "107" 1778 | Ports [1, 1] 1779 | Position [1010, 55, 1070, 85] 1780 | ZOrder 20 1781 | ShowName off 1782 | InheritSamplingMode off 1783 | OutFrame "Sample-based" 1784 | } 1785 | Block { 1786 | BlockType FrameConversion 1787 | Name "tpeee33afc_780b_4462_85c3_fbfe5f0d2ac9" 1788 | SID "109" 1789 | Ports [1, 1] 1790 | Position [1045, 280, 1105, 310] 1791 | ZOrder 22 1792 | ShowName off 1793 | InheritSamplingMode off 1794 | OutFrame "Sample-based" 1795 | } 1796 | Block { 1797 | BlockType Outport 1798 | Name "x" 1799 | SID "39" 1800 | Position [1000, 18, 1030, 32] 1801 | ZOrder -2 1802 | IconDisplay "Port number" 1803 | } 1804 | Block { 1805 | BlockType Outport 1806 | Name "y" 1807 | SID "40" 1808 | Position [1045, 118, 1075, 132] 1809 | ZOrder 12 1810 | Port "2" 1811 | IconDisplay "Port number" 1812 | } 1813 | Block { 1814 | BlockType Outport 1815 | Name "kinematic" 1816 | SID "41" 1817 | Position [915, 168, 945, 182] 1818 | ZOrder 14 1819 | Port "3" 1820 | IconDisplay "Port number" 1821 | } 1822 | Block { 1823 | BlockType Outport 1824 | Name "dynamic" 1825 | SID "42" 1826 | Position [595, 333, 625, 347] 1827 | ZOrder 9 1828 | Port "4" 1829 | IconDisplay "Port number" 1830 | } 1831 | Line { 1832 | SrcBlock "TAU" 1833 | SrcPort 1 1834 | DstBlock "Mux" 1835 | DstPort 1 1836 | } 1837 | Line { 1838 | SrcBlock "Mux" 1839 | SrcPort 1 1840 | DstBlock "Dynamic" 1841 | DstPort 1 1842 | } 1843 | Line { 1844 | SrcBlock "Dynamic" 1845 | SrcPort 1 1846 | DstBlock "Integrator" 1847 | DstPort 1 1848 | } 1849 | Line { 1850 | SrcBlock "Integrator" 1851 | SrcPort 1 1852 | Points [12, 0] 1853 | Branch { 1854 | Points [0, 55; -387, 0; 0, -45] 1855 | DstBlock "Mux" 1856 | DstPort 2 1857 | } 1858 | Branch { 1859 | Points [25, 0] 1860 | Branch { 1861 | Points [0, 85] 1862 | Branch { 1863 | Points [0, 130] 1864 | DstBlock "Demux1" 1865 | DstPort 1 1866 | } 1867 | Branch { 1868 | DstBlock "dynamic" 1869 | DstPort 1 1870 | } 1871 | } 1872 | Branch { 1873 | DstBlock "Mux1" 1874 | DstPort 1 1875 | } 1876 | } 1877 | } 1878 | Line { 1879 | SrcBlock "Mux1" 1880 | SrcPort 1 1881 | DstBlock "Kinematic" 1882 | DstPort 1 1883 | } 1884 | Line { 1885 | SrcBlock "Kinematic" 1886 | SrcPort 1 1887 | DstBlock "Integrator1" 1888 | DstPort 1 1889 | } 1890 | Line { 1891 | SrcBlock "Demux" 1892 | SrcPort 3 1893 | Points [0, 0] 1894 | Branch { 1895 | Points [9, 0; 0, 37; -323, 0; 0, -37] 1896 | DstBlock "Mux1" 1897 | DstPort 2 1898 | } 1899 | Branch { 1900 | Points [40, 0; 0, 20] 1901 | DstBlock "tpeee33afc_780b_4462_85c3_fbfe5f0d2ac9" 1902 | DstPort 1 1903 | } 1904 | } 1905 | Line { 1906 | SrcBlock "Demux" 1907 | SrcPort 1 1908 | Points [0, 0] 1909 | Branch { 1910 | Points [35, 0] 1911 | DstBlock "x" 1912 | DstPort 1 1913 | } 1914 | Branch { 1915 | Points [20, 0; 0, -185] 1916 | DstBlock "tpa12f4306_a713_4667_9ea2_d040d9adc66b" 1917 | DstPort 1 1918 | } 1919 | } 1920 | Line { 1921 | SrcBlock "Demux" 1922 | SrcPort 2 1923 | Points [0, 0] 1924 | Branch { 1925 | Points [82, 0; 0, -140] 1926 | DstBlock "y" 1927 | DstPort 1 1928 | } 1929 | Branch { 1930 | Points [55, 0; 0, -90] 1931 | DstBlock "tp25ee92a5_cfae_472f_93d1_7b993d44970c" 1932 | DstPort 1 1933 | } 1934 | } 1935 | Line { 1936 | SrcBlock "Integrator1" 1937 | SrcPort 1 1938 | Points [27, 0] 1939 | Branch { 1940 | Points [0, -90] 1941 | DstBlock "kinematic" 1942 | DstPort 1 1943 | } 1944 | Branch { 1945 | DstBlock "Demux" 1946 | DstPort 1 1947 | } 1948 | } 1949 | Line { 1950 | SrcBlock "tpa12f4306_a713_4667_9ea2_d040d9adc66b" 1951 | SrcPort 1 1952 | DstBlock "To Workspace" 1953 | DstPort 1 1954 | } 1955 | Line { 1956 | SrcBlock "tp25ee92a5_cfae_472f_93d1_7b993d44970c" 1957 | SrcPort 1 1958 | DstBlock "To Workspace1" 1959 | DstPort 1 1960 | } 1961 | Line { 1962 | SrcBlock "tpeee33afc_780b_4462_85c3_fbfe5f0d2ac9" 1963 | SrcPort 1 1964 | DstBlock "To Workspace2" 1965 | DstPort 1 1966 | } 1967 | Line { 1968 | SrcBlock "Demux1" 1969 | SrcPort 1 1970 | Points [10, 0; 0, -50] 1971 | DstBlock "tp6cc2519a_c92b_4e8c_a790_e70a0a1378da" 1972 | DstPort 1 1973 | } 1974 | Line { 1975 | SrcBlock "tp6cc2519a_c92b_4e8c_a790_e70a0a1378da" 1976 | SrcPort 1 1977 | DstBlock "To Workspace3" 1978 | DstPort 1 1979 | } 1980 | Line { 1981 | SrcBlock "Demux1" 1982 | SrcPort 2 1983 | DstBlock "tp3c6d5481_5046_4814_9362_4848ed7962ad" 1984 | DstPort 1 1985 | } 1986 | Line { 1987 | SrcBlock "tp3c6d5481_5046_4814_9362_4848ed7962ad" 1988 | SrcPort 1 1989 | DstBlock "To Workspace4" 1990 | DstPort 1 1991 | } 1992 | Line { 1993 | SrcBlock "Demux1" 1994 | SrcPort 3 1995 | Points [20, 0; 0, 55] 1996 | DstBlock "tp79f989b8_184b_4cae_813f_ddfebe13ee74" 1997 | DstPort 1 1998 | } 1999 | Line { 2000 | SrcBlock "tp79f989b8_184b_4cae_813f_ddfebe13ee74" 2001 | SrcPort 1 2002 | DstBlock "To Workspace5" 2003 | DstPort 1 2004 | } 2005 | } 2006 | RTWSystemCode "Auto" 2007 | MinAlgLoopOccurrences off 2008 | PropExecContextOutsideSubsystem off 2009 | FunctionWithSeparateData off 2010 | Opaque off 2011 | MaskHideContents off 2012 | } 2013 | Block { 2014 | BlockType SubSystem 2015 | Name "Reference trajectory" 2016 | SID "43" 2017 | Ports [1, 2] 2018 | Position [345, 259, 445, 301] 2019 | ZOrder 29 2020 | RequestExecContextInheritance off 2021 | Variant off 2022 | System { 2023 | Name "Reference trajectory" 2024 | Location [-7, 0, 1542, 837] 2025 | Open off 2026 | ModelBrowserVisibility off 2027 | ModelBrowserWidth 200 2028 | ScreenColor "white" 2029 | PaperOrientation "landscape" 2030 | PaperPositionMode "auto" 2031 | PaperType "A4" 2032 | PaperUnits "centimeters" 2033 | TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] 2034 | TiledPageScale 1 2035 | ShowPageBoundaries off 2036 | ZoomFactor "80" 2037 | Block { 2038 | BlockType Inport 2039 | Name "t" 2040 | SID "44" 2041 | Position [110, 178, 140, 192] 2042 | ZOrder -1 2043 | IconDisplay "Port number" 2044 | } 2045 | Block { 2046 | BlockType Demux 2047 | Name "Demux" 2048 | SID "45" 2049 | Ports [1, 3] 2050 | Position [735, 376, 740, 424] 2051 | ZOrder 5 2052 | ShowName off 2053 | Outputs "3" 2054 | DisplayOption "bar" 2055 | } 2056 | Block { 2057 | BlockType Demux 2058 | Name "Demux1" 2059 | SID "56" 2060 | Ports [1, 3] 2061 | Position [785, 621, 790, 669] 2062 | ZOrder 10 2063 | ShowName off 2064 | Outputs "3" 2065 | DisplayOption "bar" 2066 | } 2067 | Block { 2068 | BlockType Demux 2069 | Name "Demux2" 2070 | SID "78" 2071 | Ports [1, 2] 2072 | Position [675, 211, 680, 249] 2073 | ZOrder 16 2074 | ShowName off 2075 | Outputs "2" 2076 | DisplayOption "bar" 2077 | } 2078 | Block { 2079 | BlockType Derivative 2080 | Name "Derivative" 2081 | SID "96" 2082 | Position [980, 645, 1010, 675] 2083 | ZOrder 60 2084 | } 2085 | Block { 2086 | BlockType Reference 2087 | Name "Manual Switch" 2088 | SID "100" 2089 | Ports [2, 1] 2090 | Position [490, 212, 520, 248] 2091 | ZOrder 62 2092 | LibraryVersion "1.1" 2093 | SourceBlock "simulink/Signal\nRouting/Manual Switch" 2094 | SourceType "" 2095 | sw "1" 2096 | action "0" 2097 | varsize "off" 2098 | } 2099 | Block { 2100 | BlockType Mux 2101 | Name "Mux" 2102 | SID "77" 2103 | Ports [2, 1] 2104 | Position [415, 426, 420, 464] 2105 | ZOrder 15 2106 | ShowName off 2107 | Inputs "2" 2108 | DisplayOption "bar" 2109 | } 2110 | Block { 2111 | BlockType Mux 2112 | Name "Mux1" 2113 | SID "80" 2114 | Ports [2, 1] 2115 | Position [430, 61, 435, 99] 2116 | ZOrder 18 2117 | ShowName off 2118 | Inputs "2" 2119 | DisplayOption "bar" 2120 | } 2121 | Block { 2122 | BlockType Mux 2123 | Name "Mux3" 2124 | SID "95" 2125 | Ports [3, 1] 2126 | Position [970, 201, 975, 239] 2127 | ZOrder 59 2128 | ShowName off 2129 | Inputs "3" 2130 | DisplayOption "bar" 2131 | } 2132 | Block { 2133 | BlockType Mux 2134 | Name "Mux4" 2135 | SID "97" 2136 | Ports [3, 1] 2137 | Position [1075, 601, 1080, 639] 2138 | ZOrder 61 2139 | ShowName off 2140 | Inputs "3" 2141 | DisplayOption "bar" 2142 | } 2143 | Block { 2144 | BlockType ToWorkspace 2145 | Name "To Workspace" 2146 | SID "47" 2147 | Ports [1] 2148 | Position [905, 305, 935, 335] 2149 | ZOrder 6 2150 | VariableName "x_r" 2151 | MaxDataPoints "inf" 2152 | FixptAsFi on 2153 | SampleTime "-1" 2154 | } 2155 | Block { 2156 | BlockType ToWorkspace 2157 | Name "To Workspace1" 2158 | SID "48" 2159 | Ports [1] 2160 | Position [905, 435, 935, 465] 2161 | ZOrder 7 2162 | VariableName "y_r" 2163 | MaxDataPoints "inf" 2164 | FixptAsFi on 2165 | SampleTime "-1" 2166 | } 2167 | Block { 2168 | BlockType ToWorkspace 2169 | Name "To Workspace2" 2170 | SID "57" 2171 | Ports [1] 2172 | Position [955, 550, 985, 580] 2173 | ZOrder 11 2174 | VariableName "x_r_dot" 2175 | MaxDataPoints "inf" 2176 | FixptAsFi on 2177 | SampleTime "-1" 2178 | } 2179 | Block { 2180 | BlockType ToWorkspace 2181 | Name "To Workspace3" 2182 | SID "58" 2183 | Ports [1] 2184 | Position [955, 700, 985, 730] 2185 | ZOrder 12 2186 | VariableName "y_r_dot" 2187 | MaxDataPoints "inf" 2188 | FixptAsFi on 2189 | SampleTime "-1" 2190 | } 2191 | Block { 2192 | BlockType ToWorkspace 2193 | Name "To Workspace4" 2194 | SID "86" 2195 | Ports [1] 2196 | Position [1085, 465, 1115, 495] 2197 | ZOrder 58 2198 | VariableName "psi_r" 2199 | MaxDataPoints "inf" 2200 | FixptAsFi on 2201 | SampleTime "-1" 2202 | } 2203 | Block { 2204 | BlockType MATLABFcn 2205 | Name "line_traj" 2206 | SID "50" 2207 | Ports [1, 1] 2208 | Position [285, 375, 355, 405] 2209 | ZOrder 2 2210 | MATLABFcn "line_traj" 2211 | OutputDimensions "3" 2212 | } 2213 | Block { 2214 | BlockType MATLABFcn 2215 | Name "line_traj_dot" 2216 | SID "76" 2217 | Ports [1, 1] 2218 | Position [285, 465, 355, 495] 2219 | ZOrder 14 2220 | MATLABFcn "line_traj_dot" 2221 | OutputDimensions "3" 2222 | } 2223 | Block { 2224 | BlockType Reference 2225 | Name "reference_traj" 2226 | SID "49" 2227 | Ports [2] 2228 | Position [820, 375, 850, 410] 2229 | ZOrder 4 2230 | LibraryVersion "1.386" 2231 | SourceBlock "simulink/Sinks/XY Graph" 2232 | SourceType "XY scope." 2233 | xmin "-100" 2234 | xmax "1000" 2235 | ymin "-200" 2236 | ymax "200" 2237 | st "-1" 2238 | } 2239 | Block { 2240 | BlockType FrameConversion 2241 | Name "tp25b3ccc0_2233_43fd_a956_11f7c14c9eba" 2242 | SID "114" 2243 | Ports [1, 1] 2244 | Position [820, 435, 880, 465] 2245 | ZOrder 64 2246 | ShowName off 2247 | InheritSamplingMode off 2248 | OutFrame "Sample-based" 2249 | } 2250 | Block { 2251 | BlockType FrameConversion 2252 | Name "tp3c997b2e_bac5_48f6_b3c7_4078155f11bf" 2253 | SID "115" 2254 | Ports [1, 1] 2255 | Position [870, 550, 930, 580] 2256 | ZOrder 65 2257 | ShowName off 2258 | InheritSamplingMode off 2259 | OutFrame "Sample-based" 2260 | } 2261 | Block { 2262 | BlockType FrameConversion 2263 | Name "tp4e53ad63_58d5_4089_92ec_1cb6cfc4744a" 2264 | SID "116" 2265 | Ports [1, 1] 2266 | Position [870, 700, 930, 730] 2267 | ZOrder 66 2268 | ShowName off 2269 | InheritSamplingMode off 2270 | OutFrame "Sample-based" 2271 | } 2272 | Block { 2273 | BlockType FrameConversion 2274 | Name "tp54b2a857_3095_4664_acd4_a91cb6ef64ad" 2275 | SID "117" 2276 | Ports [1, 1] 2277 | Position [1000, 465, 1060, 495] 2278 | ZOrder 67 2279 | ShowName off 2280 | InheritSamplingMode off 2281 | OutFrame "Sample-based" 2282 | } 2283 | Block { 2284 | BlockType FrameConversion 2285 | Name "tpbbe0d337_879f_49f7_8e33_d237b0f04842" 2286 | SID "113" 2287 | Ports [1, 1] 2288 | Position [820, 305, 880, 335] 2289 | ZOrder 63 2290 | ShowName off 2291 | InheritSamplingMode off 2292 | OutFrame "Sample-based" 2293 | } 2294 | Block { 2295 | BlockType MATLABFcn 2296 | Name "trig_traj" 2297 | SID "51" 2298 | Ports [1, 1] 2299 | Position [295, 20, 365, 50] 2300 | ZOrder 1 2301 | MATLABFcn "trig_traj" 2302 | OutputDimensions "3" 2303 | } 2304 | Block { 2305 | BlockType MATLABFcn 2306 | Name "trig_traj_dot" 2307 | SID "79" 2308 | Ports [1, 1] 2309 | Position [295, 105, 365, 135] 2310 | ZOrder 17 2311 | MATLABFcn "trig_traj_dot" 2312 | OutputDimensions "3" 2313 | } 2314 | Block { 2315 | BlockType Outport 2316 | Name "q_r_dot" 2317 | SID "60" 2318 | Position [1180, 613, 1210, 627] 2319 | ZOrder 13 2320 | IconDisplay "Port number" 2321 | } 2322 | Block { 2323 | BlockType Outport 2324 | Name "q_r" 2325 | SID "52" 2326 | Position [1065, 213, 1095, 227] 2327 | ZOrder -2 2328 | Port "2" 2329 | IconDisplay "Port number" 2330 | } 2331 | Line { 2332 | SrcBlock "t" 2333 | SrcPort 1 2334 | Points [60, 0] 2335 | Branch { 2336 | Points [0, -65] 2337 | Branch { 2338 | DstBlock "trig_traj_dot" 2339 | DstPort 1 2340 | } 2341 | Branch { 2342 | Points [0, -85] 2343 | DstBlock "trig_traj" 2344 | DstPort 1 2345 | } 2346 | } 2347 | Branch { 2348 | Points [0, 205] 2349 | Branch { 2350 | DstBlock "line_traj" 2351 | DstPort 1 2352 | } 2353 | Branch { 2354 | Points [0, 90] 2355 | DstBlock "line_traj_dot" 2356 | DstPort 1 2357 | } 2358 | } 2359 | } 2360 | Line { 2361 | SrcBlock "Demux" 2362 | SrcPort 1 2363 | Points [0, 0] 2364 | Branch { 2365 | Points [37, 0] 2366 | Branch { 2367 | DstBlock "reference_traj" 2368 | DstPort 1 2369 | } 2370 | Branch { 2371 | Points [0, -175] 2372 | DstBlock "Mux3" 2373 | DstPort 1 2374 | } 2375 | } 2376 | Branch { 2377 | Points [30, 0; 0, -65] 2378 | DstBlock "tpbbe0d337_879f_49f7_8e33_d237b0f04842" 2379 | DstPort 1 2380 | } 2381 | } 2382 | Line { 2383 | SrcBlock "Demux" 2384 | SrcPort 2 2385 | Points [0, 0] 2386 | Branch { 2387 | Points [53, 0] 2388 | Branch { 2389 | Points [0, -180] 2390 | DstBlock "Mux3" 2391 | DstPort 2 2392 | } 2393 | Branch { 2394 | DstBlock "reference_traj" 2395 | DstPort 2 2396 | } 2397 | } 2398 | Branch { 2399 | Points [30, 0; 0, 50] 2400 | DstBlock "tp25b3ccc0_2233_43fd_a956_11f7c14c9eba" 2401 | DstPort 1 2402 | } 2403 | } 2404 | Line { 2405 | SrcBlock "Demux1" 2406 | SrcPort 1 2407 | Points [0, 0] 2408 | Branch { 2409 | Points [37, 0; 0, -20] 2410 | DstBlock "Mux4" 2411 | DstPort 1 2412 | } 2413 | Branch { 2414 | Points [30, 0; 0, -65] 2415 | DstBlock "tp3c997b2e_bac5_48f6_b3c7_4078155f11bf" 2416 | DstPort 1 2417 | } 2418 | } 2419 | Line { 2420 | SrcBlock "Demux1" 2421 | SrcPort 2 2422 | Points [0, 0] 2423 | Branch { 2424 | Points [38, 0; 0, 1; 53, 0; 0, -26] 2425 | DstBlock "Mux4" 2426 | DstPort 2 2427 | } 2428 | Branch { 2429 | Points [30, 0; 0, 70] 2430 | DstBlock "tp4e53ad63_58d5_4089_92ec_1cb6cfc4744a" 2431 | DstPort 1 2432 | } 2433 | } 2434 | Line { 2435 | SrcBlock "Demux2" 2436 | SrcPort 2 2437 | Points [9, 0; 0, 405] 2438 | DstBlock "Demux1" 2439 | DstPort 1 2440 | } 2441 | Line { 2442 | SrcBlock "line_traj_dot" 2443 | SrcPort 1 2444 | Points [22, 0; 0, -25] 2445 | DstBlock "Mux" 2446 | DstPort 2 2447 | } 2448 | Line { 2449 | SrcBlock "line_traj" 2450 | SrcPort 1 2451 | Points [25, 0; 0, 45] 2452 | DstBlock "Mux" 2453 | DstPort 1 2454 | } 2455 | Line { 2456 | SrcBlock "Mux" 2457 | SrcPort 1 2458 | Points [28, 0; 0, -205] 2459 | DstBlock "Manual Switch" 2460 | DstPort 2 2461 | } 2462 | Line { 2463 | SrcBlock "Demux2" 2464 | SrcPort 1 2465 | Points [23, 0; 0, 180] 2466 | DstBlock "Demux" 2467 | DstPort 1 2468 | } 2469 | Line { 2470 | SrcBlock "trig_traj_dot" 2471 | SrcPort 1 2472 | Points [28, 0; 0, -30] 2473 | DstBlock "Mux1" 2474 | DstPort 2 2475 | } 2476 | Line { 2477 | SrcBlock "trig_traj" 2478 | SrcPort 1 2479 | Points [28, 0; 0, 35] 2480 | DstBlock "Mux1" 2481 | DstPort 1 2482 | } 2483 | Line { 2484 | SrcBlock "Mux1" 2485 | SrcPort 1 2486 | Points [23, 0; 0, 140] 2487 | DstBlock "Manual Switch" 2488 | DstPort 1 2489 | } 2490 | Line { 2491 | SrcBlock "Manual Switch" 2492 | SrcPort 1 2493 | DstBlock "Demux2" 2494 | DstPort 1 2495 | } 2496 | Line { 2497 | SrcBlock "Demux1" 2498 | SrcPort 3 2499 | Points [0, 0] 2500 | Branch { 2501 | Points [144, 0] 2502 | Branch { 2503 | DstBlock "Derivative" 2504 | DstPort 1 2505 | } 2506 | Branch { 2507 | Points [0, -430] 2508 | DstBlock "Mux3" 2509 | DstPort 3 2510 | } 2511 | } 2512 | Branch { 2513 | Points [55, 0; 0, -180] 2514 | DstBlock "tp54b2a857_3095_4664_acd4_a91cb6ef64ad" 2515 | DstPort 1 2516 | } 2517 | } 2518 | Line { 2519 | SrcBlock "Derivative" 2520 | SrcPort 1 2521 | Points [28, 0; 0, -30] 2522 | DstBlock "Mux4" 2523 | DstPort 3 2524 | } 2525 | Line { 2526 | SrcBlock "Mux4" 2527 | SrcPort 1 2528 | DstBlock "q_r_dot" 2529 | DstPort 1 2530 | } 2531 | Line { 2532 | SrcBlock "Mux3" 2533 | SrcPort 1 2534 | DstBlock "q_r" 2535 | DstPort 1 2536 | } 2537 | Line { 2538 | SrcBlock "tpbbe0d337_879f_49f7_8e33_d237b0f04842" 2539 | SrcPort 1 2540 | DstBlock "To Workspace" 2541 | DstPort 1 2542 | } 2543 | Line { 2544 | SrcBlock "tp25b3ccc0_2233_43fd_a956_11f7c14c9eba" 2545 | SrcPort 1 2546 | DstBlock "To Workspace1" 2547 | DstPort 1 2548 | } 2549 | Line { 2550 | SrcBlock "tp3c997b2e_bac5_48f6_b3c7_4078155f11bf" 2551 | SrcPort 1 2552 | DstBlock "To Workspace2" 2553 | DstPort 1 2554 | } 2555 | Line { 2556 | SrcBlock "tp4e53ad63_58d5_4089_92ec_1cb6cfc4744a" 2557 | SrcPort 1 2558 | DstBlock "To Workspace3" 2559 | DstPort 1 2560 | } 2561 | Line { 2562 | SrcBlock "tp54b2a857_3095_4664_acd4_a91cb6ef64ad" 2563 | SrcPort 1 2564 | DstBlock "To Workspace4" 2565 | DstPort 1 2566 | } 2567 | } 2568 | RTWSystemCode "Auto" 2569 | MinAlgLoopOccurrences off 2570 | PropExecContextOutsideSubsystem off 2571 | FunctionWithSeparateData off 2572 | Opaque off 2573 | MaskHideContents off 2574 | } 2575 | Block { 2576 | BlockType ToWorkspace 2577 | Name "To Workspace" 2578 | SID "53" 2579 | Ports [1] 2580 | Position [460, 345, 490, 375] 2581 | ZOrder 32 2582 | VariableName "t" 2583 | MaxDataPoints "inf" 2584 | FixptAsFi on 2585 | SampleTime "-1" 2586 | } 2587 | Block { 2588 | BlockType Reference 2589 | Name "XY Graph" 2590 | SID "54" 2591 | Ports [2] 2592 | Position [1145, 245, 1175, 280] 2593 | ZOrder 33 2594 | LibraryVersion "1.386" 2595 | SourceBlock "simulink/Sinks/XY Graph" 2596 | SourceType "XY scope." 2597 | xmin "-100" 2598 | xmax "1000" 2599 | ymin "-200" 2600 | ymax "200" 2601 | st "-1" 2602 | } 2603 | Block { 2604 | BlockType FrameConversion 2605 | Name "tpa5cdaa39_3fb8_453e_85ba_5be139e0eb7f" 2606 | SID "118" 2607 | Ports [1, 1] 2608 | Position [375, 345, 435, 375] 2609 | ZOrder 35 2610 | ShowName off 2611 | InheritSamplingMode off 2612 | OutFrame "Sample-based" 2613 | } 2614 | Line { 2615 | SrcBlock "Clock" 2616 | SrcPort 1 2617 | Points [0, 0] 2618 | Branch { 2619 | DstBlock "Reference trajectory" 2620 | DstPort 1 2621 | } 2622 | Branch { 2623 | Points [45, 0; 0, 80] 2624 | DstBlock "tpa5cdaa39_3fb8_453e_85ba_5be139e0eb7f" 2625 | DstPort 1 2626 | } 2627 | } 2628 | Line { 2629 | SrcBlock "Controller" 2630 | SrcPort 1 2631 | DstBlock "Model" 2632 | DstPort 1 2633 | } 2634 | Line { 2635 | SrcBlock "Model" 2636 | SrcPort 1 2637 | Points [23, 0; 0, -15] 2638 | DstBlock "XY Graph" 2639 | DstPort 1 2640 | } 2641 | Line { 2642 | SrcBlock "Model" 2643 | SrcPort 2 2644 | Points [35, 0] 2645 | DstBlock "XY Graph" 2646 | DstPort 2 2647 | } 2648 | Line { 2649 | SrcBlock "Reference trajectory" 2650 | SrcPort 2 2651 | DstBlock "Error" 2652 | DstPort 1 2653 | } 2654 | Line { 2655 | SrcBlock "Error" 2656 | SrcPort 1 2657 | DstBlock "Controller" 2658 | DstPort 2 2659 | } 2660 | Line { 2661 | SrcBlock "Model" 2662 | SrcPort 4 2663 | Points [9, 0; 0, 40; -354, 0] 2664 | DstBlock "Controller" 2665 | DstPort 3 2666 | } 2667 | Line { 2668 | SrcBlock "Model" 2669 | SrcPort 3 2670 | Points [23, 0; 0, 90; -630, 0; 0, -90] 2671 | DstBlock "Error" 2672 | DstPort 2 2673 | } 2674 | Line { 2675 | SrcBlock "Reference trajectory" 2676 | SrcPort 1 2677 | DstBlock "Controller" 2678 | DstPort 1 2679 | } 2680 | Line { 2681 | SrcBlock "tpa5cdaa39_3fb8_453e_85ba_5be139e0eb7f" 2682 | SrcPort 1 2683 | DstBlock "To Workspace" 2684 | DstPort 1 2685 | } 2686 | } 2687 | } 2688 | #Finite State Machines 2689 | # 2690 | # Stateflow 80000009 2691 | # 2692 | # 2693 | Stateflow { 2694 | machine { 2695 | id 1 2696 | name "jiang" 2697 | created "13-Jan-2020 14:56:41" 2698 | isLibrary 0 2699 | firstTarget 2 2700 | sfVersion 76014001.0004 2701 | } 2702 | target { 2703 | id 2 2704 | name "sfun" 2705 | description "Default Simulink S-Function Target." 2706 | machine 1 2707 | linkNode [1 0 0] 2708 | } 2709 | } 2710 | -------------------------------------------------------------------------------- /Control algorithm - Jiang/jiang.slx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaciPaci/Simulation-of-Underactuated-AUV-Control-Algorithms/0a5ef275c51ae883f8046e52e8c6c85cc2c55612/Control algorithm - Jiang/jiang.slx -------------------------------------------------------------------------------- /Control algorithm - Jiang/kinematic.m: -------------------------------------------------------------------------------- 1 | function [ output ] = kinematic( input ) 2 | %KINEMATIC Kinematic equations of the model 3 | % Function takes vector of velocities of the vehicle in the body frame 4 | % [u; v; r], generated by the dynamic block and angle psi, generated by 5 | % itself in the previous iteration, as inputs and gives current 6 | % velocities in x, y axis, as well as angular velocity psi as an output. 7 | 8 | u=input(1); 9 | v=input(2); 10 | r=input(3); 11 | psi=input(4); 12 | 13 | x_dot=u*cos(psi)-v*sin(psi); 14 | y_dot=u*sin(psi)+v*cos(psi); 15 | psi_dot=r; 16 | 17 | 18 | output=[x_dot; y_dot; psi_dot]; 19 | 20 | end 21 | 22 | -------------------------------------------------------------------------------- /Control algorithm - Jiang/kinematic_control.m: -------------------------------------------------------------------------------- 1 | function [ output ] = kinematic_control( input ) 2 | %DYNAMIC_CONTROL Calculation of the virtual input variables 3 | % Function takes reference trajectory and error vectors as its input and 4 | % returns virtual input variables, that are later used to calculate 5 | % control inputs, as its output. 6 | 7 | k_x=1.5; 8 | k_psi=3.5; 9 | 10 | x_r_dot=input(1); 11 | y_r_dot=input(2); 12 | psi_r_dot=input(3); 13 | x_e=input(4); 14 | y_e=input(5); 15 | psi_e=input(6); 16 | 17 | u_r=sqrt(x_r_dot+y_r_dot); 18 | r_r=psi_r_dot; 19 | 20 | u_d= u_r*cos(psi_e)-k_x*x_e; 21 | r_d=r_r-u_r*y_e-k_psi*psi_e; 22 | 23 | output=[u_d, r_d]; 24 | 25 | end 26 | 27 | -------------------------------------------------------------------------------- /Control algorithm - Jiang/line_traj.m: -------------------------------------------------------------------------------- 1 | function [ output ] = line_traj( time ) 2 | %LINE_TRAJ Line trajectory generator 3 | % Generates a linear reference trajectory starting at the point 4 | % [x; y] = [0; 0]. Function takes current simulation time as an input 5 | % and gives reference position x_r, y_r and reference angle psi_r as an output. 6 | 7 | x_r=time; 8 | y_r=time; 9 | psi_r=atan2(y_r,x_r); 10 | 11 | output=[x_r; y_r; psi_r]; 12 | 13 | end 14 | 15 | -------------------------------------------------------------------------------- /Control algorithm - Jiang/line_traj_dot.m: -------------------------------------------------------------------------------- 1 | function [ output ] = line_traj_dot( time ) 2 | %LINE_TRAJ_DOT First derivative of a linear trajectory generator 3 | % Returns first derivative of the chosen linear trajectory 4 | 5 | x_r_dot=1; 6 | y_r_dot=1; 7 | psi_r_dot=atan2(y_r_dot,x_r_dot); 8 | 9 | output=[x_r_dot; y_r_dot; psi_r_dot]; 10 | 11 | end 12 | 13 | -------------------------------------------------------------------------------- /Control algorithm - Jiang/plot_all.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaciPaci/Simulation-of-Underactuated-AUV-Control-Algorithms/0a5ef275c51ae883f8046e52e8c6c85cc2c55612/Control algorithm - Jiang/plot_all.m -------------------------------------------------------------------------------- /Control algorithm - Jiang/plot_jiang.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaciPaci/Simulation-of-Underactuated-AUV-Control-Algorithms/0a5ef275c51ae883f8046e52e8c6c85cc2c55612/Control algorithm - Jiang/plot_jiang.m -------------------------------------------------------------------------------- /Control algorithm - Jiang/trig_traj.m: -------------------------------------------------------------------------------- 1 | function [ output ] = trig_traj( time ) 2 | %TRIG_TRAJ Trigonometric trajectory generator 3 | % Generates a trigonometric reference trajectory starting at the point 4 | % [x; y] = [0; 0]. Function takes current simulation time as an input 5 | % and gives reference position x_r, y_r and reference angle psi_r as an output. 6 | 7 | %sine trajectory 8 | x_r=time; 9 | y_r=100*sin(0.01*time); 10 | psi_r=atan2(y_r,x_r); 11 | 12 | %cosine trajectory 13 | % x_r=time; 14 | % y_r=-100*cos(0.01*time)+100; 15 | % psi_r=atan2(y_r,x_r); 16 | 17 | output=[x_r; y_r; psi_r]; 18 | 19 | end 20 | 21 | -------------------------------------------------------------------------------- /Control algorithm - Jiang/trig_traj_dot.m: -------------------------------------------------------------------------------- 1 | function [ output ] = trig_traj_dot( time ) 2 | %TRIG_TRAJ_DOT First derivative of a trigonometric trajectory generator 3 | % Returns first derivative of the chosen trigonometric trajectory 4 | 5 | %derivative of a sine trajectory 6 | x_r_dot=1; 7 | y_r_dot=cos(0.01*time); 8 | psi_r_dot=atan2(y_r_dot,x_r_dot); 9 | 10 | %derivative of a cosine trajectory 11 | % x_r_dot=1; 12 | % y_r_dot=sin(0.01*time); 13 | % psi_r_dot=atan2(y_r_dot,x_r_dot); 14 | 15 | output=[x_r_dot; y_r_dot; psi_r_dot]; 16 | 17 | end 18 | 19 | -------------------------------------------------------------------------------- /Control algorithm - Jiang/velocity_error.m: -------------------------------------------------------------------------------- 1 | function [ output ] = velocity_error( input ) 2 | %VELOCITY_ERROR Calculation of the velocity error 3 | % Function compares current velocities of the vehicle to the virtual 4 | % velocities u_d, r_d and returns the difference as its output. 5 | 6 | u_d=input(1); 7 | r_d=input(2); 8 | u=input(3); 9 | v=input(4); 10 | r=input(5); 11 | u_e0in=input(6); 12 | r_e0in=input(7); 13 | 14 | load_system('jiang'); 15 | sim_time=get_param('jiang', 'SimulationTime'); 16 | if(sim_time==0) 17 | u_e0=u-u_d; 18 | r_e0=r-r_d; 19 | u_e=u-u_d; 20 | r_e=r-r_d; 21 | else 22 | u_e=u-u_d; 23 | r_e=r-r_d; 24 | u_e0=u_e0in; 25 | r_e0=r_e0in; 26 | end 27 | 28 | output=[u_e0; r_e0; u_e; r_e]; 29 | 30 | end 31 | 32 | -------------------------------------------------------------------------------- /Control algorithm - Paliotta/controller.m: -------------------------------------------------------------------------------- 1 | function [ output ] = controller( input ) 2 | %CONTROLLER Implementation of the control law 3 | % Function gives thruster force Tau_u and rudder angle Tau_r as its 4 | % output. Calculations are based on the current position and orientation 5 | % of the vehicle in reference to the given trajectory. 6 | 7 | %Light vehicle 8 | % m11=19; 9 | % m22=34; 10 | % m33=2.1; 11 | % m23=0; 12 | % m32=0; 13 | % d11=2.4; 14 | % d22=23; 15 | % d33=9.7; 16 | % d23=0; 17 | % d32=0; 18 | 19 | %Heavy vehicle 20 | m11=215; 21 | m22=265; 22 | m33=80; 23 | m23=0; 24 | m32=0; 25 | d11=70; 26 | d22=100; 27 | d33=100; 28 | d23=0; 29 | d32=0; 30 | 31 | %trigonometric and linear trajectory parameters 32 | l=1; 33 | k_vx=50; 34 | k_vy=50; 35 | k_px=5; 36 | k_py=5; 37 | k_Ix=0.5; 38 | k_Iy=0.5; 39 | 40 | %circle trajectory parameters 41 | % l=0.75; 42 | % k_vx=200; 43 | % k_vy=200; 44 | % k_px=5; 45 | % k_py=5; 46 | % k_Ix=0.1; 47 | % k_Iy=0.1; 48 | 49 | zeta_1=input(1); 50 | zeta_2=input(2); 51 | %zeta_3=input(3); 52 | %zeta_4=input(4); 53 | zeta_1d=input(5); 54 | zeta_2d=input(6); 55 | zeta_3d=input(7); 56 | zeta_4d=input(8); 57 | zeta_1I=input(9); 58 | zeta_2I=input(10); 59 | zeta_1dI=input(11); 60 | zeta_2dI=input(12); 61 | zeta_3d_dot=input(13); 62 | zeta_4d_dot=input(14); 63 | zeta_3=input(15); 64 | zeta_4=input(16); 65 | z2=input(17); %r 66 | z1=input(18); 67 | 68 | u=zeta_3*cos(z1)+zeta_4*sin(z1); 69 | v=-zeta_3*sin(z1)+zeta_4*cos(z1)-z2*l; 70 | 71 | mi1=-k_vx*(zeta_3-zeta_3d)-k_px*(zeta_1-zeta_1d)-k_Ix*(zeta_1I-zeta_1dI)+zeta_3d_dot; 72 | mi2=-k_vy*(zeta_4-zeta_4d)-k_py*(zeta_2-zeta_2d)-k_Iy*(zeta_2I-zeta_2dI)+zeta_4d_dot; 73 | 74 | a=((m22*v+m23*z2)*z2-d11*u)/m11-(v*z2-l*z2^2); 75 | b=u*z2+((-(m11*m33-m23^2)/(m22*m33-m23^2))*u+(d33*m23-d23*m33)/(m22*m33-m23^2))*z2+(-(((m11-m22)*m23)/(m22*m33-m23^2))*u-(d22*m33-d32*m23)/(m22*m33-m23^2))*v+(((m23*d22-m22*(d32+(m22-m11)*u))*v+(m23*(d23+m11*u)-m22*(d33+m23*u))*z2)/(m22*m33-m23^2))*l; 76 | 77 | F=[cos(z1) -sin(z1); sin(z1) cos(z1)]*[a;b]; 78 | 79 | G=[cos(z1) -l*sin(z1); sin(z1) l*cos(z1)]; 80 | A=-F+[mi1;mi2]; 81 | 82 | TAU=G\A; 83 | 84 | Tau_u=TAU(1); 85 | Tau_r=TAU(2); 86 | 87 | Taur_max=0.4363; 88 | %Taur_max=0.2; 89 | if Tau_r>Taur_max 90 | Tau_r=Taur_max; 91 | end 92 | 93 | if Tau_r<-Taur_max 94 | Tau_r=-Taur_max; 95 | end 96 | 97 | %Tau_max=0.75; 98 | Tau_max=16.6667-0.126*41.6667*zeta_3; 99 | %Tau_max=17; 100 | if Tau_u>Tau_max 101 | Tau_u=Tau_max; 102 | end 103 | if Tau_u<0 104 | Tau_u=0; 105 | end 106 | 107 | output=[Tau_u; Tau_r]; 108 | 109 | end 110 | 111 | -------------------------------------------------------------------------------- /Control algorithm - Paliotta/dynamic.m: -------------------------------------------------------------------------------- 1 | function [ output ] = dynamic( input ) 2 | %DYNAMIC Dynamic equations of the model 3 | % Function takes current control inputs, as well as velocities 4 | % vector generated by itself in the previous iteration, as inputs and 5 | % gives vector of velocities of the vehicle in the body frame as an 6 | % output. 7 | 8 | %Light vehicle 9 | % m11=19; 10 | % m22=34; 11 | % m33=2.1; 12 | % m23=0; 13 | % m32=0; 14 | % d11=2.4; 15 | % d22=23; 16 | % d33=9.7; 17 | % d23=0; 18 | % d32=0; 19 | 20 | %Heavy vehicle 21 | m11=215; 22 | m22=265; 23 | m33=80; 24 | m23=0; 25 | m32=0; 26 | d11=70; 27 | d22=100; 28 | d33=100; 29 | d23=0; 30 | d32=0; 31 | 32 | l=1; 33 | 34 | Tau_u=input(1); 35 | Tau_r=input(2); 36 | zeta_3=input(3);%u 37 | zeta_4=input(4);%v 38 | z2=input(5);%r 39 | z1=input(6);%psi 40 | 41 | u=zeta_3*cos(z1)+zeta_4*sin(z1); 42 | v=-zeta_3*sin(z1)+zeta_4*cos(z1)-z2*l; 43 | 44 | a=((m22*v+m23*z2)*z2-d11*u)/m11-(v*z2-l*z2^2); 45 | b=u*z2+((-(m11*m33-m23^2)/(m22*m33-m23^2))*u+(d33*m23-d23*m33)/(m22*m33-m23^2))*z2+(-(((m11-m22)*m23)/(m22*m33-m23^2))*u-(d22*m33-d32*m23)/(m22*m33-m23^2))*v+(((m23*d22-m22*(d32+(m22-m11)*u))*v+(m23*(d23+m11*u)-m22*(d33+m23*u))*z2)/(m22*m33-m23^2))*l; 46 | 47 | F=[cos(z1) -sin(z1); sin(z1) cos(z1)]*[a;b]; 48 | F1=F(1); 49 | F2=F(2); 50 | 51 | zeta_3_dot=F1+cos(z1)*Tau_u-l*sin(z1)*Tau_r; 52 | zeta_4_dot=F2+sin(z1)*Tau_u+l*cos(z1)*Tau_r; 53 | z2_dot=((m23*d22-m22*(d32+(m22-m11)*u))*v+(m23*(d23+m11*u)-m22*(d33+m23*u))*z2)/(m22*m33-m23^2)+Tau_r; 54 | 55 | output=[zeta_3_dot; zeta_4_dot; z2_dot]; 56 | end 57 | 58 | -------------------------------------------------------------------------------- /Control algorithm - Paliotta/kinematic.m: -------------------------------------------------------------------------------- 1 | function [ output ] = kinematic( input ) 2 | %KINEMATIC Kinematic equations of the model 3 | % Function takes vector of velocities of the vehicle in the body frame 4 | % [u; v; r], generated by the dynamic block and angle psi, generated by 5 | % itself in the previous iteration, as inputs and gives current 6 | % velocities in x, y axis, as well as angular velocity psi as an output. 7 | 8 | V_x=0.05; 9 | V_y=-0.08; 10 | 11 | zeta_3=input(1); 12 | zeta_4=input(2); 13 | z2=input(3); 14 | psi=input(4); 15 | 16 | zeta_1_dot=zeta_3+V_x; 17 | zeta_2_dot=zeta_4+V_y; 18 | z1_dot=z2; 19 | 20 | 21 | % x_dot=u*cos(psi)-v*sin(psi)+V_x; 22 | % y_dot=u*sin(psi)+v*cos(psi)+V_y; 23 | 24 | % x_dot=u*cos(psi)-v*sin(psi); 25 | % y_dot=u*sin(psi)+v*cos(psi); 26 | % psi_dot=r; 27 | 28 | % 29 | % output=[x_dot; y_dot; psi_dot]; 30 | 31 | output=[zeta_1_dot; zeta_2_dot; z1_dot]; 32 | 33 | end 34 | 35 | -------------------------------------------------------------------------------- /Control algorithm - Paliotta/line_traj.m: -------------------------------------------------------------------------------- 1 | function [ output ] = line_traj( time ) 2 | %LINE_TRAJ Line trajectory generator 3 | % Generates a linear reference trajectory starting at the point 4 | % [x; y] = [0; 0]. Function takes current simulation time as an input 5 | % and gives reference position x_r, y_r and reference angle psi_r as an output. 6 | 7 | x_r=0.5*time; 8 | y_r=0.25*time; 9 | psi_r=atan2(y_r,x_r); 10 | x_r_dot=0.5; 11 | y_r_dot=0.25; 12 | psi_r_dot=atan2(y_r_dot,x_r_dot); 13 | 14 | output=[x_r; y_r; psi_r_dot; x_r_dot; y_r_dot]; 15 | 16 | end 17 | 18 | -------------------------------------------------------------------------------- /Control algorithm - Paliotta/paliotta.mdl: -------------------------------------------------------------------------------- 1 | Model { 2 | Name "paliotta" 3 | Version 7.9 4 | SavedCharacterEncoding "windows-1250" 5 | GraphicalInterface { 6 | NumRootInports 0 7 | NumRootOutports 0 8 | ParameterArgumentNames "" 9 | ComputedModelVersion "1.111" 10 | NumModelReferences 0 11 | NumTestPointedSignals 0 12 | } 13 | slprops.hdlmdlprops { 14 | $PropName "HDLParams" 15 | $ObjectID 1 16 | Array { 17 | Type "Cell" 18 | Dimension 2 19 | Cell "HDLSubsystem" 20 | Cell "paliotta" 21 | PropName "mdlProps" 22 | } 23 | } 24 | ScopeRefreshTime 0.035000 25 | OverrideScopeRefreshTime on 26 | DisableAllScopes off 27 | DataTypeOverride "UseLocalSettings" 28 | DataTypeOverrideAppliesTo "AllNumericTypes" 29 | MinMaxOverflowLogging "UseLocalSettings" 30 | MinMaxOverflowArchiveMode "Overwrite" 31 | FPTRunName "Run 1" 32 | MaxMDLFileLineLength 120 33 | Created "Mon Jan 13 14:56:26 2020" 34 | Creator "Staciej" 35 | UpdateHistory "UpdateHistoryNever" 36 | ModifiedByFormat "%" 37 | LastModifiedBy "Staciej" 38 | ModifiedDateFormat "%" 39 | LastModifiedDate "Fri Jan 31 12:24:08 2020" 40 | RTWModifiedTimeStamp 502374248 41 | ModelVersionFormat "1.%" 42 | ConfigurationManager "none" 43 | SampleTimeColors off 44 | SampleTimeAnnotations off 45 | LibraryLinkDisplay "disabled" 46 | WideLines off 47 | ShowLineDimensions off 48 | ShowPortDataTypes off 49 | ShowDesignRanges off 50 | ShowLoopsOnError on 51 | IgnoreBidirectionalLines off 52 | ShowStorageClass off 53 | ShowTestPointIcons on 54 | ShowSignalResolutionIcons on 55 | ShowViewerIcons on 56 | SortedOrder off 57 | ExecutionContextIcon off 58 | ShowLinearizationAnnotations on 59 | BlockNameDataTip off 60 | BlockParametersDataTip off 61 | BlockDescriptionStringDataTip off 62 | ToolBar on 63 | StatusBar on 64 | BrowserShowLibraryLinks off 65 | BrowserLookUnderMasks off 66 | SimulationMode "normal" 67 | LinearizationMsg "none" 68 | Profile off 69 | ParamWorkspaceSource "MATLABWorkspace" 70 | AccelSystemTargetFile "accel.tlc" 71 | AccelTemplateMakefile "accel_default_tmf" 72 | AccelMakeCommand "make_rtw" 73 | TryForcingSFcnDF off 74 | Object { 75 | $PropName "DataLoggingOverride" 76 | $ObjectID 10 77 | $ClassName "Simulink.SimulationData.ModelLoggingInfo" 78 | model_ "paliotta" 79 | overrideMode_ [0.0] 80 | Array { 81 | Type "Cell" 82 | Dimension 1 83 | Cell "paliotta" 84 | PropName "logAsSpecifiedByModels_" 85 | } 86 | Array { 87 | Type "Cell" 88 | Dimension 1 89 | Cell [] 90 | PropName "logAsSpecifiedByModelsSSIDs_" 91 | } 92 | } 93 | RecordCoverage off 94 | CovPath "/" 95 | CovSaveName "covdata" 96 | CovMetricSettings "dw" 97 | CovNameIncrementing off 98 | CovHtmlReporting on 99 | CovForceBlockReductionOff on 100 | covSaveCumulativeToWorkspaceVar on 101 | CovSaveSingleToWorkspaceVar on 102 | CovCumulativeVarName "covCumulativeData" 103 | CovCumulativeReport off 104 | CovReportOnPause on 105 | CovModelRefEnable "off" 106 | CovExternalEMLEnable off 107 | ExtModeBatchMode off 108 | ExtModeEnableFloating on 109 | ExtModeTrigType "manual" 110 | ExtModeTrigMode "normal" 111 | ExtModeTrigPort "1" 112 | ExtModeTrigElement "any" 113 | ExtModeTrigDuration 1000 114 | ExtModeTrigDurationFloating "auto" 115 | ExtModeTrigHoldOff 0 116 | ExtModeTrigDelay 0 117 | ExtModeTrigDirection "rising" 118 | ExtModeTrigLevel 0 119 | ExtModeArchiveMode "off" 120 | ExtModeAutoIncOneShot off 121 | ExtModeIncDirWhenArm off 122 | ExtModeAddSuffixToVar off 123 | ExtModeWriteAllDataToWs off 124 | ExtModeArmWhenConnect on 125 | ExtModeSkipDownloadWhenConnect off 126 | ExtModeLogAll on 127 | ExtModeAutoUpdateStatusClock on 128 | ShowModelReferenceBlockVersion off 129 | ShowModelReferenceBlockIO off 130 | Array { 131 | Type "Handle" 132 | Dimension 1 133 | Simulink.ConfigSet { 134 | $ObjectID 11 135 | Version "1.12.0" 136 | Array { 137 | Type "Handle" 138 | Dimension 9 139 | Simulink.SolverCC { 140 | $ObjectID 12 141 | Version "1.12.0" 142 | StartTime "0.0" 143 | StopTime "1000" 144 | AbsTol "auto" 145 | FixedStep "0.05" 146 | InitialStep "auto" 147 | MaxNumMinSteps "-1" 148 | MaxOrder 5 149 | ZcThreshold "auto" 150 | ConsecutiveZCsStepRelTol "10*128*eps" 151 | MaxConsecutiveZCs "1000" 152 | ExtrapolationOrder 4 153 | NumberNewtonIterations 1 154 | MaxStep "auto" 155 | MinStep "auto" 156 | MaxConsecutiveMinStep "1" 157 | RelTol "1e-3" 158 | SolverMode "Auto" 159 | EnableConcurrentExecution off 160 | ConcurrentTasks off 161 | Solver ode3 162 | SolverName ode3 163 | SolverJacobianMethodControl "auto" 164 | ShapePreserveControl "DisableAll" 165 | ZeroCrossControl "UseLocalSettings" 166 | ZeroCrossAlgorithm "Nonadaptive" 167 | AlgebraicLoopSolver "TrustRegion" 168 | SolverResetMethod "Fast" 169 | PositivePriorityOrder off 170 | AutoInsertRateTranBlk off 171 | SampleTimeConstraint "Unconstrained" 172 | InsertRTBMode "Whenever possible" 173 | } 174 | Simulink.DataIOCC { 175 | $ObjectID 13 176 | Version "1.12.0" 177 | Decimation "1" 178 | ExternalInput "[t, u]" 179 | FinalStateName "xFinal" 180 | InitialState "xInitial" 181 | LimitDataPoints off 182 | MaxDataPoints "1000" 183 | LoadExternalInput off 184 | LoadInitialState off 185 | SaveFinalState off 186 | SaveCompleteFinalSimState off 187 | SaveFormat "StructureWithTime" 188 | SignalLoggingSaveFormat "Dataset" 189 | SaveOutput on 190 | SaveState off 191 | SignalLogging on 192 | DSMLogging on 193 | InspectSignalLogs off 194 | SaveTime on 195 | ReturnWorkspaceOutputs off 196 | StateSaveName "xout" 197 | TimeSaveName "tout" 198 | OutputSaveName "yout" 199 | SignalLoggingName "logsout" 200 | DSMLoggingName "dsmout" 201 | OutputOption "RefineOutputTimes" 202 | OutputTimes "[]" 203 | ReturnWorkspaceOutputsName "out" 204 | Refine "1" 205 | } 206 | Simulink.OptimizationCC { 207 | $ObjectID 14 208 | Version "1.12.0" 209 | Array { 210 | Type "Cell" 211 | Dimension 8 212 | Cell "BooleansAsBitfields" 213 | Cell "PassReuseOutputArgsAs" 214 | Cell "PassReuseOutputArgsThreshold" 215 | Cell "ZeroExternalMemoryAtStartup" 216 | Cell "ZeroInternalMemoryAtStartup" 217 | Cell "OptimizeModelRefInitCode" 218 | Cell "NoFixptDivByZeroProtection" 219 | Cell "UseSpecifiedMinMax" 220 | PropName "DisabledProps" 221 | } 222 | BlockReduction on 223 | BooleanDataType on 224 | ConditionallyExecuteInputs on 225 | InlineParams off 226 | UseFloatMulNetSlope off 227 | UseSpecifiedMinMax off 228 | InlineInvariantSignals off 229 | OptimizeBlockIOStorage on 230 | BufferReuse on 231 | EnhancedBackFolding off 232 | StrengthReduction off 233 | ExpressionFolding on 234 | BooleansAsBitfields off 235 | BitfieldContainerType "uint_T" 236 | EnableMemcpy on 237 | MemcpyThreshold 64 238 | PassReuseOutputArgsAs "Structure reference" 239 | ExpressionDepthLimit 128 240 | LocalBlockOutputs on 241 | RollThreshold 5 242 | StateBitsets off 243 | DataBitsets off 244 | ZeroExternalMemoryAtStartup on 245 | ZeroInternalMemoryAtStartup on 246 | InitFltsAndDblsToZero off 247 | NoFixptDivByZeroProtection off 248 | EfficientFloat2IntCast off 249 | EfficientMapNaN2IntZero on 250 | OptimizeModelRefInitCode off 251 | LifeSpan "inf" 252 | MaxStackSize "Inherit from target" 253 | BufferReusableBoundary on 254 | SimCompilerOptimization "Off" 255 | AccelVerboseBuild off 256 | UseIntDivNetSlope off 257 | } 258 | Simulink.DebuggingCC { 259 | $ObjectID 15 260 | Version "1.12.0" 261 | RTPrefix "error" 262 | ConsistencyChecking "none" 263 | ArrayBoundsChecking "none" 264 | SignalInfNanChecking "none" 265 | SignalRangeChecking "none" 266 | ReadBeforeWriteMsg "UseLocalSettings" 267 | WriteAfterWriteMsg "UseLocalSettings" 268 | WriteAfterReadMsg "UseLocalSettings" 269 | AlgebraicLoopMsg "warning" 270 | ArtificialAlgebraicLoopMsg "warning" 271 | SaveWithDisabledLinksMsg "warning" 272 | SaveWithParameterizedLinksMsg "warning" 273 | CheckSSInitialOutputMsg on 274 | UnderspecifiedInitializationDetection "Simplified" 275 | MergeDetectMultiDrivingBlocksExec "error" 276 | CheckExecutionContextPreStartOutputMsg off 277 | CheckExecutionContextRuntimeOutputMsg off 278 | SignalResolutionControl "UseLocalSettings" 279 | BlockPriorityViolationMsg "warning" 280 | MinStepSizeMsg "warning" 281 | TimeAdjustmentMsg "none" 282 | MaxConsecutiveZCsMsg "error" 283 | MaskedZcDiagnostic "warning" 284 | IgnoredZcDiagnostic "warning" 285 | SolverPrmCheckMsg "none" 286 | InheritedTsInSrcMsg "warning" 287 | MultiTaskDSMMsg "error" 288 | MultiTaskCondExecSysMsg "error" 289 | MultiTaskRateTransMsg "error" 290 | SingleTaskRateTransMsg "none" 291 | TasksWithSamePriorityMsg "warning" 292 | SigSpecEnsureSampleTimeMsg "warning" 293 | CheckMatrixSingularityMsg "none" 294 | IntegerOverflowMsg "warning" 295 | Int32ToFloatConvMsg "warning" 296 | ParameterDowncastMsg "error" 297 | ParameterOverflowMsg "error" 298 | ParameterUnderflowMsg "none" 299 | ParameterPrecisionLossMsg "warning" 300 | ParameterTunabilityLossMsg "warning" 301 | FixptConstUnderflowMsg "none" 302 | FixptConstOverflowMsg "none" 303 | FixptConstPrecisionLossMsg "none" 304 | UnderSpecifiedDataTypeMsg "none" 305 | UnnecessaryDatatypeConvMsg "none" 306 | VectorMatrixConversionMsg "none" 307 | InvalidFcnCallConnMsg "error" 308 | FcnCallInpInsideContextMsg "Enable All" 309 | SignalLabelMismatchMsg "none" 310 | UnconnectedInputMsg "warning" 311 | UnconnectedOutputMsg "warning" 312 | UnconnectedLineMsg "warning" 313 | SFcnCompatibilityMsg "none" 314 | FrameProcessingCompatibilityMsg "error" 315 | UniqueDataStoreMsg "none" 316 | BusObjectLabelMismatch "warning" 317 | RootOutportRequireBusObject "warning" 318 | AssertControl "UseLocalSettings" 319 | ModelReferenceIOMsg "none" 320 | ModelReferenceMultiInstanceNormalModeStructChecksumCheck "error" 321 | ModelReferenceVersionMismatchMessage "none" 322 | ModelReferenceIOMismatchMessage "none" 323 | UnknownTsInhSupMsg "warning" 324 | ModelReferenceDataLoggingMessage "warning" 325 | ModelReferenceSymbolNameMessage "warning" 326 | ModelReferenceExtraNoncontSigs "error" 327 | StateNameClashWarn "none" 328 | SimStateInterfaceChecksumMismatchMsg "warning" 329 | SimStateOlderReleaseMsg "error" 330 | InitInArrayFormatMsg "warning" 331 | StrictBusMsg "ErrorLevel1" 332 | BusNameAdapt "WarnAndRepair" 333 | NonBusSignalsTreatedAsBus "none" 334 | BlockIODiagnostic "none" 335 | SFUnusedDataAndEventsDiag "warning" 336 | SFUnexpectedBacktrackingDiag "warning" 337 | SFInvalidInputDataAccessInChartInitDiag "warning" 338 | SFNoUnconditionalDefaultTransitionDiag "warning" 339 | SFTransitionOutsideNaturalParentDiag "warning" 340 | SFUnconditionalTransitionShadowingDiag "warning" 341 | ModelReferenceCSMismatchMessage "none" 342 | } 343 | Simulink.HardwareCC { 344 | $ObjectID 16 345 | Version "1.12.0" 346 | ProdBitPerChar 8 347 | ProdBitPerShort 16 348 | ProdBitPerInt 32 349 | ProdBitPerLong 32 350 | ProdBitPerFloat 32 351 | ProdBitPerDouble 64 352 | ProdBitPerPointer 64 353 | ProdLargestAtomicInteger "Char" 354 | ProdLargestAtomicFloat "Float" 355 | ProdIntDivRoundTo "Zero" 356 | ProdEndianess "LittleEndian" 357 | ProdWordSize 32 358 | ProdShiftRightIntArith on 359 | ProdHWDeviceType "Specified" 360 | TargetBitPerChar 8 361 | TargetBitPerShort 16 362 | TargetBitPerInt 32 363 | TargetBitPerLong 32 364 | TargetBitPerFloat 32 365 | TargetBitPerDouble 64 366 | TargetBitPerPointer 32 367 | TargetLargestAtomicInteger "Char" 368 | TargetLargestAtomicFloat "None" 369 | TargetShiftRightIntArith on 370 | TargetIntDivRoundTo "Undefined" 371 | TargetEndianess "Unspecified" 372 | TargetWordSize 32 373 | TargetPreprocMaxBitsSint 32 374 | TargetPreprocMaxBitsUint 32 375 | TargetHWDeviceType "Specified" 376 | TargetUnknown off 377 | ProdEqTarget on 378 | } 379 | Simulink.ModelReferenceCC { 380 | $ObjectID 17 381 | Version "1.12.0" 382 | UpdateModelReferenceTargets "IfOutOfDateOrStructuralChange" 383 | CheckModelReferenceTargetMessage "error" 384 | EnableParallelModelReferenceBuilds off 385 | ParallelModelReferenceErrorOnInvalidPool on 386 | ParallelModelReferenceMATLABWorkerInit "None" 387 | ModelReferenceNumInstancesAllowed "Multi" 388 | PropagateVarSize "Infer from blocks in model" 389 | ModelReferencePassRootInputsByReference on 390 | ModelReferenceMinAlgLoopOccurrences off 391 | PropagateSignalLabelsOutOfModel on 392 | SupportModelReferenceSimTargetCustomCode off 393 | } 394 | Simulink.SFSimCC { 395 | $ObjectID 18 396 | Version "1.12.0" 397 | SFSimEcho on 398 | SimCtrlC on 399 | SimIntegrity on 400 | SimUseLocalCustomCode off 401 | SimParseCustomCode on 402 | SimBuildMode "sf_incremental_build" 403 | } 404 | Simulink.RTWCC { 405 | $BackupClass "Simulink.RTWCC" 406 | $ObjectID 19 407 | Version "1.12.0" 408 | Array { 409 | Type "Cell" 410 | Dimension 15 411 | Cell "IncludeHyperlinkInReport" 412 | Cell "GenerateTraceInfo" 413 | Cell "GenerateTraceReport" 414 | Cell "GenerateTraceReportSl" 415 | Cell "GenerateTraceReportSf" 416 | Cell "GenerateTraceReportEml" 417 | Cell "PortableWordSizes" 418 | Cell "GenerateWebview" 419 | Cell "GenerateCodeMetricsReport" 420 | Cell "GenerateCodeReplacementReport" 421 | Cell "GenerateErtSFunction" 422 | Cell "CreateSILPILBlock" 423 | Cell "CodeExecutionProfiling" 424 | Cell "CodeProfilingSaveOptions" 425 | Cell "CodeProfilingInstrumentation" 426 | PropName "DisabledProps" 427 | } 428 | SystemTargetFile "grt.tlc" 429 | TLCOptions "" 430 | GenCodeOnly off 431 | MakeCommand "make_rtw" 432 | GenerateMakefile on 433 | TemplateMakefile "grt_default_tmf" 434 | PostCodeGenCommand "" 435 | Description "" 436 | GenerateReport off 437 | SaveLog off 438 | RTWVerbose on 439 | RetainRTWFile off 440 | ProfileTLC off 441 | TLCDebug off 442 | TLCCoverage off 443 | TLCAssert off 444 | RTWUseLocalCustomCode off 445 | RTWUseSimCustomCode off 446 | IncludeHyperlinkInReport off 447 | LaunchReport off 448 | TargetLang "C" 449 | IncludeBusHierarchyInRTWFileBlockHierarchyMap off 450 | GenerateTraceInfo off 451 | GenerateTraceReport off 452 | GenerateTraceReportSl off 453 | GenerateTraceReportSf off 454 | GenerateTraceReportEml off 455 | GenerateWebview off 456 | GenerateCodeMetricsReport off 457 | GenerateCodeReplacementReport off 458 | RTWCompilerOptimization "Off" 459 | RTWCustomCompilerOptimizations "" 460 | CheckMdlBeforeBuild "Off" 461 | Array { 462 | Type "Handle" 463 | Dimension 2 464 | Simulink.CodeAppCC { 465 | $ObjectID 20 466 | Version "1.12.0" 467 | Array { 468 | Type "Cell" 469 | Dimension 23 470 | Cell "IgnoreCustomStorageClasses" 471 | Cell "IgnoreTestpoints" 472 | Cell "InsertBlockDesc" 473 | Cell "InsertPolySpaceComments" 474 | Cell "SFDataObjDesc" 475 | Cell "MATLABFcnDesc" 476 | Cell "SimulinkDataObjDesc" 477 | Cell "DefineNamingRule" 478 | Cell "SignalNamingRule" 479 | Cell "ParamNamingRule" 480 | Cell "InternalIdentifier" 481 | Cell "InlinedPrmAccess" 482 | Cell "CustomSymbolStr" 483 | Cell "CustomSymbolStrGlobalVar" 484 | Cell "CustomSymbolStrType" 485 | Cell "CustomSymbolStrField" 486 | Cell "CustomSymbolStrFcn" 487 | Cell "CustomSymbolStrFcnArg" 488 | Cell "CustomSymbolStrBlkIO" 489 | Cell "CustomSymbolStrTmpVar" 490 | Cell "CustomSymbolStrMacro" 491 | Cell "CustomSymbolStrUtil" 492 | Cell "ReqsInCode" 493 | PropName "DisabledProps" 494 | } 495 | ForceParamTrailComments off 496 | GenerateComments on 497 | IgnoreCustomStorageClasses on 498 | IgnoreTestpoints off 499 | IncHierarchyInIds off 500 | MaxIdLength 31 501 | PreserveName off 502 | PreserveNameWithParent off 503 | ShowEliminatedStatement off 504 | IncAutoGenComments off 505 | SimulinkDataObjDesc off 506 | SFDataObjDesc off 507 | MATLABFcnDesc off 508 | IncDataTypeInIds off 509 | MangleLength 1 510 | CustomSymbolStrGlobalVar "$R$N$M" 511 | CustomSymbolStrType "$N$R$M_T" 512 | CustomSymbolStrField "$N$M" 513 | CustomSymbolStrFcn "$R$N$M$F" 514 | CustomSymbolStrFcnArg "rt$I$N$M" 515 | CustomSymbolStrBlkIO "rtb_$N$M" 516 | CustomSymbolStrTmpVar "$N$M" 517 | CustomSymbolStrMacro "$R$N$M" 518 | DefineNamingRule "None" 519 | ParamNamingRule "None" 520 | SignalNamingRule "None" 521 | InsertBlockDesc off 522 | InsertPolySpaceComments off 523 | SimulinkBlockComments on 524 | MATLABSourceComments off 525 | EnableCustomComments off 526 | InlinedPrmAccess "Literals" 527 | ReqsInCode off 528 | UseSimReservedNames off 529 | } 530 | Simulink.GRTTargetCC { 531 | $BackupClass "Simulink.TargetCC" 532 | $ObjectID 21 533 | Version "1.12.0" 534 | Array { 535 | Type "Cell" 536 | Dimension 14 537 | Cell "GeneratePreprocessorConditionals" 538 | Cell "IncludeMdlTerminateFcn" 539 | Cell "SupportNonInlinedSFcns" 540 | Cell "SuppressErrorStatus" 541 | Cell "ERTCustomFileBanners" 542 | Cell "GenerateSampleERTMain" 543 | Cell "GenerateTestInterfaces" 544 | Cell "ModelStepFunctionPrototypeControlCompliant" 545 | Cell "MultiInstanceERTCode" 546 | Cell "PurelyIntegerCode" 547 | Cell "SupportComplex" 548 | Cell "SupportAbsoluteTime" 549 | Cell "SupportContinuousTime" 550 | Cell "CombineOutputUpdateFcns" 551 | PropName "DisabledProps" 552 | } 553 | TargetFcnLib "ansi_tfl_table_tmw.mat" 554 | TargetLibSuffix "" 555 | CodeReplacementLibrary "C89/C90 (ANSI)" 556 | UtilityFuncGeneration "Auto" 557 | ERTMultiwordTypeDef "System defined" 558 | ERTMultiwordLength 256 559 | MultiwordLength 2048 560 | GenerateFullHeader on 561 | GenerateSampleERTMain off 562 | GenerateTestInterfaces off 563 | ModelReferenceCompliant on 564 | ParMdlRefBuildCompliant on 565 | CompOptLevelCompliant on 566 | ConcurrentExecutionCompliant on 567 | IncludeMdlTerminateFcn on 568 | GeneratePreprocessorConditionals "Disable all" 569 | CombineOutputUpdateFcns on 570 | CombineSignalStateStructs off 571 | SuppressErrorStatus off 572 | ERTFirstTimeCompliant off 573 | IncludeFileDelimiter "Auto" 574 | ERTCustomFileBanners off 575 | SupportAbsoluteTime on 576 | LogVarNameModifier "rt_" 577 | MatFileLogging on 578 | MultiInstanceERTCode off 579 | SupportNonFinite on 580 | SupportComplex on 581 | PurelyIntegerCode off 582 | SupportContinuousTime on 583 | SupportNonInlinedSFcns on 584 | SupportVariableSizeSignals off 585 | ParenthesesLevel "Nominal" 586 | ModelStepFunctionPrototypeControlCompliant off 587 | CPPClassGenCompliant off 588 | AutosarCompliant off 589 | GRTInterface off 590 | UseMalloc off 591 | ExtMode off 592 | ExtModeStaticAlloc off 593 | ExtModeTesting off 594 | ExtModeStaticAllocSize 1000000 595 | ExtModeTransport 0 596 | ExtModeMexFile "ext_comm" 597 | ExtModeIntrfLevel "Level1" 598 | RTWCAPISignals off 599 | RTWCAPIParams off 600 | RTWCAPIStates off 601 | RTWCAPIRootIO off 602 | GenerateASAP2 off 603 | } 604 | PropName "Components" 605 | } 606 | } 607 | hdlcoderui.hdlcc { 608 | $ObjectID 23 609 | Version "1.12.0" 610 | Description "HDL Coder custom configuration component" 611 | Name "HDL Coder" 612 | Array { 613 | Type "Cell" 614 | Dimension 1 615 | Cell " " 616 | PropName "HDLConfigFile" 617 | } 618 | HDLCActiveTab "0" 619 | } 620 | PropName "Components" 621 | } 622 | Name "Configuration" 623 | CurrentDlgPage "Solver" 624 | ConfigPrmDlgPosition [ 320, 92, 1212, 704 ] 625 | } 626 | PropName "ConfigurationSets" 627 | } 628 | Simulink.ConfigSet { 629 | $PropName "ActiveConfigurationSet" 630 | $ObjectID 11 631 | } 632 | ExplicitPartitioning off 633 | BlockDefaults { 634 | ForegroundColor "black" 635 | BackgroundColor "white" 636 | DropShadow off 637 | NamePlacement "normal" 638 | FontName "Helvetica" 639 | FontSize 10 640 | FontWeight "normal" 641 | FontAngle "normal" 642 | ShowName on 643 | BlockRotation 0 644 | BlockMirror off 645 | } 646 | AnnotationDefaults { 647 | HorizontalAlignment "center" 648 | VerticalAlignment "middle" 649 | ForegroundColor "black" 650 | BackgroundColor "white" 651 | DropShadow off 652 | FontName "Helvetica" 653 | FontSize 10 654 | FontWeight "normal" 655 | FontAngle "normal" 656 | UseDisplayTextAsClickCallback off 657 | } 658 | LineDefaults { 659 | FontName "Helvetica" 660 | FontSize 9 661 | FontWeight "normal" 662 | FontAngle "normal" 663 | } 664 | BlockParameterDefaults { 665 | Block { 666 | BlockType Clock 667 | DisplayTime off 668 | Decimation "10" 669 | } 670 | Block { 671 | BlockType Constant 672 | Value "1" 673 | VectorParams1D on 674 | SamplingMode "Sample based" 675 | OutMin "[]" 676 | OutMax "[]" 677 | OutDataTypeStr "Inherit: Inherit from 'Constant value'" 678 | LockScale off 679 | SampleTime "inf" 680 | FramePeriod "inf" 681 | PreserveConstantTs off 682 | } 683 | Block { 684 | BlockType Demux 685 | Outputs "4" 686 | DisplayOption "none" 687 | BusSelectionMode off 688 | } 689 | Block { 690 | BlockType Derivative 691 | CoefficientInTFapproximation "inf" 692 | } 693 | Block { 694 | BlockType FrameConversion 695 | OutFrame "Frame-based" 696 | } 697 | Block { 698 | BlockType Inport 699 | Port "1" 700 | OutputFunctionCall off 701 | OutMin "[]" 702 | OutMax "[]" 703 | OutDataTypeStr "Inherit: auto" 704 | LockScale off 705 | BusOutputAsStruct off 706 | PortDimensions "-1" 707 | VarSizeSig "Inherit" 708 | SampleTime "-1" 709 | SignalType "auto" 710 | SamplingMode "auto" 711 | LatchByDelayingOutsideSignal off 712 | LatchInputForFeedbackSignals off 713 | Interpolate on 714 | } 715 | Block { 716 | BlockType Integrator 717 | ExternalReset "none" 718 | InitialConditionSource "internal" 719 | InitialCondition "0" 720 | LimitOutput off 721 | UpperSaturationLimit "inf" 722 | LowerSaturationLimit "-inf" 723 | ShowSaturationPort off 724 | ShowStatePort off 725 | AbsoluteTolerance "auto" 726 | IgnoreLimit off 727 | ZeroCross on 728 | ContinuousStateAttributes "''" 729 | } 730 | Block { 731 | BlockType MATLABFcn 732 | MATLABFcn "sin" 733 | OutputDimensions "-1" 734 | OutputSignalType "auto" 735 | Output1D on 736 | SampleTime "-1" 737 | } 738 | Block { 739 | BlockType Mux 740 | Inputs "4" 741 | DisplayOption "none" 742 | UseBusObject off 743 | BusObject "BusObject" 744 | NonVirtualBus off 745 | } 746 | Block { 747 | BlockType Outport 748 | Port "1" 749 | OutMin "[]" 750 | OutMax "[]" 751 | OutDataTypeStr "Inherit: auto" 752 | LockScale off 753 | BusOutputAsStruct off 754 | PortDimensions "-1" 755 | VarSizeSig "Inherit" 756 | SampleTime "-1" 757 | SignalType "auto" 758 | SamplingMode "auto" 759 | SourceOfInitialOutputValue "Dialog" 760 | OutputWhenDisabled "held" 761 | InitialOutput "[]" 762 | } 763 | Block { 764 | BlockType SubSystem 765 | ShowPortLabels "FromPortIcon" 766 | Permissions "ReadWrite" 767 | PermitHierarchicalResolution "All" 768 | TreatAsAtomicUnit off 769 | CheckFcnCallInpInsideContextMsg off 770 | SystemSampleTime "-1" 771 | RTWFcnNameOpts "Auto" 772 | RTWFileNameOpts "Auto" 773 | RTWMemSecFuncInitTerm "Inherit from model" 774 | RTWMemSecFuncExecute "Inherit from model" 775 | RTWMemSecDataConstants "Inherit from model" 776 | RTWMemSecDataInternal "Inherit from model" 777 | RTWMemSecDataParameters "Inherit from model" 778 | SimViewingDevice off 779 | DataTypeOverride "UseLocalSettings" 780 | DataTypeOverrideAppliesTo "AllNumericTypes" 781 | MinMaxOverflowLogging "UseLocalSettings" 782 | SFBlockType "NONE" 783 | GeneratePreprocessorConditionals off 784 | TreatAsGroupedWhenPropagatingVariantConditions on 785 | } 786 | Block { 787 | BlockType Sum 788 | IconShape "rectangular" 789 | Inputs "++" 790 | CollapseMode "All dimensions" 791 | CollapseDim "1" 792 | InputSameDT on 793 | AccumDataTypeStr "Inherit: Inherit via internal rule" 794 | OutMin "[]" 795 | OutMax "[]" 796 | OutDataTypeStr "Inherit: Same as first input" 797 | LockScale off 798 | RndMeth "Floor" 799 | SaturateOnIntegerOverflow on 800 | SampleTime "-1" 801 | } 802 | Block { 803 | BlockType ToWorkspace 804 | VariableName "simulink_output" 805 | MaxDataPoints "1000" 806 | Decimation "1" 807 | SaveFormat "Array" 808 | FixptAsFi off 809 | NumInputs "1" 810 | SampleTime "0" 811 | } 812 | } 813 | System { 814 | Name "paliotta" 815 | Location [-6, 0, 1542, 836] 816 | Open off 817 | ModelBrowserVisibility off 818 | ModelBrowserWidth 200 819 | ScreenColor "white" 820 | PaperOrientation "landscape" 821 | PaperPositionMode "auto" 822 | PaperType "usletter" 823 | PaperUnits "inches" 824 | TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000] 825 | TiledPageScale 1 826 | ShowPageBoundaries off 827 | ZoomFactor "100" 828 | ReportName "simulink-default.rpt" 829 | SIDHighWatermark "186" 830 | Block { 831 | BlockType Clock 832 | Name "Clock" 833 | SID "1" 834 | Position [390, 265, 410, 285] 835 | ZOrder 28 836 | } 837 | Block { 838 | BlockType SubSystem 839 | Name "Controller" 840 | SID "2" 841 | Ports [3, 1] 842 | Position [765, 260, 865, 340] 843 | ZOrder 30 844 | RequestExecContextInheritance off 845 | Variant off 846 | System { 847 | Name "Controller" 848 | Location [-6, 0, 1542, 836] 849 | Open off 850 | ModelBrowserVisibility off 851 | ModelBrowserWidth 200 852 | ScreenColor "white" 853 | PaperOrientation "landscape" 854 | PaperPositionMode "auto" 855 | PaperType "A4" 856 | PaperUnits "centimeters" 857 | TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] 858 | TiledPageScale 1 859 | ShowPageBoundaries off 860 | ZoomFactor "80" 861 | Block { 862 | BlockType Inport 863 | Name "q_r" 864 | SID "3" 865 | Position [20, 273, 50, 287] 866 | ZOrder -1 867 | IconDisplay "Port number" 868 | } 869 | Block { 870 | BlockType Inport 871 | Name "q" 872 | SID "4" 873 | Position [20, 353, 50, 367] 874 | ZOrder 36 875 | Port "2" 876 | IconDisplay "Port number" 877 | } 878 | Block { 879 | BlockType Inport 880 | Name "zeta" 881 | SID "95" 882 | Position [1000, 498, 1030, 512] 883 | ZOrder 62 884 | Port "3" 885 | IconDisplay "Port number" 886 | } 887 | Block { 888 | BlockType Constant 889 | Name "Constant" 890 | SID "122" 891 | Position [740, 20, 770, 50] 892 | ZOrder 80 893 | Value "0.05" 894 | } 895 | Block { 896 | BlockType Constant 897 | Name "Constant1" 898 | SID "123" 899 | Position [740, 110, 770, 140] 900 | ZOrder 82 901 | Value "-0.08" 902 | } 903 | Block { 904 | BlockType Demux 905 | Name "Demux" 906 | SID "138" 907 | Ports [1, 2] 908 | Position [1345, 541, 1350, 579] 909 | ZOrder 86 910 | ShowName off 911 | Outputs "2" 912 | DisplayOption "bar" 913 | } 914 | Block { 915 | BlockType Demux 916 | Name "Demux1" 917 | SID "86" 918 | Ports [1, 8] 919 | Position [505, 210, 510, 425] 920 | ZOrder 53 921 | ShowName off 922 | Outputs "8" 923 | DisplayOption "bar" 924 | } 925 | Block { 926 | BlockType Demux 927 | Name "Demux2" 928 | SID "94" 929 | Ports [1, 3] 930 | Position [160, 546, 165, 584] 931 | ZOrder 61 932 | ShowName off 933 | Outputs "3" 934 | DisplayOption "bar" 935 | } 936 | Block { 937 | BlockType Derivative 938 | Name "Derivative" 939 | SID "96" 940 | Position [775, 685, 805, 715] 941 | ZOrder 63 942 | } 943 | Block { 944 | BlockType Derivative 945 | Name "Derivative1" 946 | SID "97" 947 | Position [775, 755, 805, 785] 948 | ZOrder 64 949 | } 950 | Block { 951 | BlockType Derivative 952 | Name "Derivative2" 953 | SID "117" 954 | Position [580, 365, 610, 395] 955 | ZOrder 75 956 | } 957 | Block { 958 | BlockType Derivative 959 | Name "Derivative3" 960 | SID "118" 961 | Position [580, 390, 610, 420] 962 | ZOrder 76 963 | } 964 | Block { 965 | BlockType Derivative 966 | Name "Derivative4" 967 | SID "119" 968 | Position [695, 55, 725, 85] 969 | ZOrder 77 970 | } 971 | Block { 972 | BlockType Derivative 973 | Name "Derivative5" 974 | SID "120" 975 | Position [715, 165, 745, 195] 976 | ZOrder 78 977 | } 978 | Block { 979 | BlockType Integrator 980 | Name "Integrator" 981 | SID "88" 982 | Ports [1, 1] 983 | Position [775, 435, 805, 465] 984 | ZOrder 55 985 | } 986 | Block { 987 | BlockType Integrator 988 | Name "Integrator1" 989 | SID "89" 990 | Ports [1, 1] 991 | Position [775, 495, 805, 525] 992 | ZOrder 56 993 | } 994 | Block { 995 | BlockType Integrator 996 | Name "Integrator2" 997 | SID "90" 998 | Ports [1, 1] 999 | Position [775, 555, 805, 585] 1000 | ZOrder 57 1001 | } 1002 | Block { 1003 | BlockType Integrator 1004 | Name "Integrator3" 1005 | SID "91" 1006 | Ports [1, 1] 1007 | Position [775, 615, 805, 645] 1008 | ZOrder 58 1009 | } 1010 | Block { 1011 | BlockType Mux 1012 | Name "Mux" 1013 | SID "61" 1014 | Ports [3, 1] 1015 | Position [155, 285, 160, 355] 1016 | ZOrder 38 1017 | ShowName off 1018 | Inputs "3" 1019 | DisplayOption "bar" 1020 | } 1021 | Block { 1022 | BlockType Mux 1023 | Name "Mux1" 1024 | SID "87" 1025 | Ports [8, 1] 1026 | Position [870, 210, 875, 425] 1027 | ZOrder 54 1028 | ShowName off 1029 | Inputs "8" 1030 | DisplayOption "bar" 1031 | } 1032 | Block { 1033 | BlockType Mux 1034 | Name "Mux2" 1035 | SID "92" 1036 | Ports [4, 1] 1037 | Position [870, 468, 875, 577] 1038 | ZOrder 59 1039 | ShowName off 1040 | DisplayOption "bar" 1041 | } 1042 | Block { 1043 | BlockType Mux 1044 | Name "Mux3" 1045 | SID "93" 1046 | Ports [5, 1] 1047 | Position [1070, 428, 1075, 542] 1048 | ZOrder 60 1049 | ShowName off 1050 | Inputs "5" 1051 | DisplayOption "bar" 1052 | } 1053 | Block { 1054 | BlockType Mux 1055 | Name "Mux4" 1056 | SID "98" 1057 | Ports [2, 1] 1058 | Position [870, 711, 875, 749] 1059 | ZOrder 65 1060 | ShowName off 1061 | Inputs "2" 1062 | DisplayOption "bar" 1063 | } 1064 | Block { 1065 | BlockType Sum 1066 | Name "Sum" 1067 | SID "121" 1068 | Ports [2, 1] 1069 | Position [790, 60, 810, 80] 1070 | ZOrder 79 1071 | ShowName off 1072 | IconShape "round" 1073 | Inputs "-+|" 1074 | InputSameDT off 1075 | OutDataTypeStr "Inherit: Inherit via internal rule" 1076 | SaturateOnIntegerOverflow off 1077 | } 1078 | Block { 1079 | BlockType Sum 1080 | Name "Sum1" 1081 | SID "124" 1082 | Ports [2, 1] 1083 | Position [790, 170, 810, 190] 1084 | ZOrder 81 1085 | ShowName off 1086 | IconShape "round" 1087 | Inputs "-+|" 1088 | InputSameDT off 1089 | OutDataTypeStr "Inherit: Inherit via internal rule" 1090 | SaturateOnIntegerOverflow off 1091 | } 1092 | Block { 1093 | BlockType ToWorkspace 1094 | Name "To Workspace" 1095 | SID "139" 1096 | Ports [1] 1097 | Position [1585, 685, 1615, 715] 1098 | ZOrder 87 1099 | VariableName "Tau_r" 1100 | MaxDataPoints "inf" 1101 | FixptAsFi on 1102 | SampleTime "-1" 1103 | } 1104 | Block { 1105 | BlockType ToWorkspace 1106 | Name "To Workspace1" 1107 | SID "140" 1108 | Ports [1] 1109 | Position [1625, 630, 1655, 660] 1110 | ZOrder 88 1111 | VariableName "Tau_u" 1112 | MaxDataPoints "inf" 1113 | FixptAsFi on 1114 | SampleTime "-1" 1115 | } 1116 | Block { 1117 | BlockType MATLABFcn 1118 | Name "controller" 1119 | SID "63" 1120 | Ports [1, 1] 1121 | Position [1220, 470, 1290, 500] 1122 | ZOrder 40 1123 | MATLABFcn "controller" 1124 | OutputDimensions "2" 1125 | } 1126 | Block { 1127 | BlockType FrameConversion 1128 | Name "tp8a16fd7e_7cd0_4d2b_8b60_378b0087ee1f" 1129 | SID "170" 1130 | Ports [1, 1] 1131 | Position [1500, 685, 1560, 715] 1132 | ZOrder 89 1133 | ShowName off 1134 | InheritSamplingMode off 1135 | OutFrame "Sample-based" 1136 | } 1137 | Block { 1138 | BlockType FrameConversion 1139 | Name "tpf31b258a_4496_404b_bafe_5462b0462114" 1140 | SID "171" 1141 | Ports [1, 1] 1142 | Position [1540, 630, 1600, 660] 1143 | ZOrder 90 1144 | ShowName off 1145 | InheritSamplingMode off 1146 | OutFrame "Sample-based" 1147 | } 1148 | Block { 1149 | BlockType MATLABFcn 1150 | Name "zeta_calculation" 1151 | SID "85" 1152 | Ports [1, 1] 1153 | Position [310, 305, 380, 335] 1154 | ZOrder 52 1155 | MATLABFcn "zeta_calculation" 1156 | OutputDimensions "8" 1157 | } 1158 | Block { 1159 | BlockType Outport 1160 | Name "TAU" 1161 | SID "17" 1162 | Position [1580, 478, 1610, 492] 1163 | ZOrder -2 1164 | IconDisplay "Port number" 1165 | } 1166 | Line { 1167 | SrcBlock "controller" 1168 | SrcPort 1 1169 | Points [23, 0] 1170 | Branch { 1171 | DstBlock "TAU" 1172 | DstPort 1 1173 | } 1174 | Branch { 1175 | Points [0, 75] 1176 | DstBlock "Demux" 1177 | DstPort 1 1178 | } 1179 | } 1180 | Line { 1181 | SrcBlock "q_r" 1182 | SrcPort 1 1183 | Points [42, 0; 0, 15] 1184 | DstBlock "Mux" 1185 | DstPort 1 1186 | } 1187 | Line { 1188 | SrcBlock "q" 1189 | SrcPort 1 1190 | Points [41, 0] 1191 | Branch { 1192 | Points [0, 205] 1193 | DstBlock "Demux2" 1194 | DstPort 1 1195 | } 1196 | Branch { 1197 | Points [0, -40] 1198 | DstBlock "Mux" 1199 | DstPort 2 1200 | } 1201 | } 1202 | Line { 1203 | SrcBlock "Mux" 1204 | SrcPort 1 1205 | DstBlock "zeta_calculation" 1206 | DstPort 1 1207 | } 1208 | Line { 1209 | SrcBlock "zeta_calculation" 1210 | SrcPort 1 1211 | DstBlock "Demux1" 1212 | DstPort 1 1213 | } 1214 | Line { 1215 | SrcBlock "Demux1" 1216 | SrcPort 1 1217 | Points [99, 0] 1218 | Branch { 1219 | Points [0, -160] 1220 | DstBlock "Derivative4" 1221 | DstPort 1 1222 | } 1223 | Branch { 1224 | Points [124, 0] 1225 | Branch { 1226 | Points [0, 220] 1227 | DstBlock "Integrator" 1228 | DstPort 1 1229 | } 1230 | Branch { 1231 | DstBlock "Mux1" 1232 | DstPort 1 1233 | } 1234 | } 1235 | } 1236 | Line { 1237 | SrcBlock "Demux1" 1238 | SrcPort 2 1239 | Points [152, 0] 1240 | Branch { 1241 | Points [0, -75] 1242 | DstBlock "Derivative5" 1243 | DstPort 1 1244 | } 1245 | Branch { 1246 | Points [56, 0] 1247 | Branch { 1248 | Points [0, 255] 1249 | DstBlock "Integrator1" 1250 | DstPort 1 1251 | } 1252 | Branch { 1253 | DstBlock "Mux1" 1254 | DstPort 2 1255 | } 1256 | } 1257 | } 1258 | Line { 1259 | SrcBlock "Demux1" 1260 | SrcPort 5 1261 | Points [191, 0] 1262 | Branch { 1263 | Points [0, 240] 1264 | DstBlock "Integrator2" 1265 | DstPort 1 1266 | } 1267 | Branch { 1268 | DstBlock "Mux1" 1269 | DstPort 5 1270 | } 1271 | } 1272 | Line { 1273 | SrcBlock "Demux1" 1274 | SrcPort 6 1275 | Points [173, 0] 1276 | Branch { 1277 | Points [0, 275] 1278 | DstBlock "Integrator3" 1279 | DstPort 1 1280 | } 1281 | Branch { 1282 | DstBlock "Mux1" 1283 | DstPort 6 1284 | } 1285 | } 1286 | Line { 1287 | SrcBlock "Demux1" 1288 | SrcPort 7 1289 | DstBlock "Derivative2" 1290 | DstPort 1 1291 | } 1292 | Line { 1293 | SrcBlock "Demux1" 1294 | SrcPort 8 1295 | DstBlock "Derivative3" 1296 | DstPort 1 1297 | } 1298 | Line { 1299 | SrcBlock "Integrator" 1300 | SrcPort 1 1301 | Points [12, 0; 0, 35] 1302 | DstBlock "Mux2" 1303 | DstPort 1 1304 | } 1305 | Line { 1306 | SrcBlock "Integrator1" 1307 | SrcPort 1 1308 | DstBlock "Mux2" 1309 | DstPort 2 1310 | } 1311 | Line { 1312 | SrcBlock "Integrator2" 1313 | SrcPort 1 1314 | Points [15, 0; 0, -35] 1315 | DstBlock "Mux2" 1316 | DstPort 3 1317 | } 1318 | Line { 1319 | SrcBlock "Integrator3" 1320 | SrcPort 1 1321 | Points [24, 0; 0, -70] 1322 | DstBlock "Mux2" 1323 | DstPort 4 1324 | } 1325 | Line { 1326 | SrcBlock "Mux1" 1327 | SrcPort 1 1328 | Points [88, 0; 0, 125] 1329 | DstBlock "Mux3" 1330 | DstPort 1 1331 | } 1332 | Line { 1333 | SrcBlock "Mux2" 1334 | SrcPort 1 1335 | Points [93, 0; 0, -60] 1336 | DstBlock "Mux3" 1337 | DstPort 2 1338 | } 1339 | Line { 1340 | SrcBlock "Mux3" 1341 | SrcPort 1 1342 | DstBlock "controller" 1343 | DstPort 1 1344 | } 1345 | Line { 1346 | SrcBlock "zeta" 1347 | SrcPort 1 1348 | Points [4, 0] 1349 | Branch { 1350 | Points [0, 411; -907, 0; 0, -571] 1351 | DstBlock "Mux" 1352 | DstPort 3 1353 | } 1354 | Branch { 1355 | DstBlock "Mux3" 1356 | DstPort 4 1357 | } 1358 | } 1359 | Line { 1360 | SrcBlock "Demux2" 1361 | SrcPort 3 1362 | Points [189, 0; 0, 277; 695, 0; 0, -327] 1363 | DstBlock "Mux3" 1364 | DstPort 5 1365 | } 1366 | Line { 1367 | SrcBlock "Derivative1" 1368 | SrcPort 1 1369 | Points [28, 0; 0, -30] 1370 | DstBlock "Mux4" 1371 | DstPort 2 1372 | } 1373 | Line { 1374 | SrcBlock "Derivative" 1375 | SrcPort 1 1376 | Points [29, 0; 0, 20] 1377 | DstBlock "Mux4" 1378 | DstPort 1 1379 | } 1380 | Line { 1381 | SrcBlock "Mux4" 1382 | SrcPort 1 1383 | Points [112, 0; 0, -245] 1384 | DstBlock "Mux3" 1385 | DstPort 3 1386 | } 1387 | Line { 1388 | SrcBlock "Derivative2" 1389 | SrcPort 1 1390 | Points [51, 0] 1391 | Branch { 1392 | Points [0, 320] 1393 | DstBlock "Derivative" 1394 | DstPort 1 1395 | } 1396 | Branch { 1397 | DstBlock "Mux1" 1398 | DstPort 7 1399 | } 1400 | } 1401 | Line { 1402 | SrcBlock "Derivative3" 1403 | SrcPort 1 1404 | Points [23, 0] 1405 | Branch { 1406 | Points [0, 365] 1407 | DstBlock "Derivative1" 1408 | DstPort 1 1409 | } 1410 | Branch { 1411 | DstBlock "Mux1" 1412 | DstPort 8 1413 | } 1414 | } 1415 | Line { 1416 | SrcBlock "Constant" 1417 | SrcPort 1 1418 | Points [25, 0] 1419 | DstBlock "Sum" 1420 | DstPort 1 1421 | } 1422 | Line { 1423 | SrcBlock "Derivative4" 1424 | SrcPort 1 1425 | DstBlock "Sum" 1426 | DstPort 2 1427 | } 1428 | Line { 1429 | SrcBlock "Derivative5" 1430 | SrcPort 1 1431 | DstBlock "Sum1" 1432 | DstPort 2 1433 | } 1434 | Line { 1435 | SrcBlock "Constant1" 1436 | SrcPort 1 1437 | Points [25, 0] 1438 | DstBlock "Sum1" 1439 | DstPort 1 1440 | } 1441 | Line { 1442 | SrcBlock "Sum" 1443 | SrcPort 1 1444 | Points [25, 0; 0, 210] 1445 | DstBlock "Mux1" 1446 | DstPort 3 1447 | } 1448 | Line { 1449 | SrcBlock "Sum1" 1450 | SrcPort 1 1451 | Points [10, 0; 0, 125] 1452 | DstBlock "Mux1" 1453 | DstPort 4 1454 | } 1455 | Line { 1456 | SrcBlock "Demux" 1457 | SrcPort 2 1458 | Points [65, 0; 0, 130] 1459 | DstBlock "tp8a16fd7e_7cd0_4d2b_8b60_378b0087ee1f" 1460 | DstPort 1 1461 | } 1462 | Line { 1463 | SrcBlock "tp8a16fd7e_7cd0_4d2b_8b60_378b0087ee1f" 1464 | SrcPort 1 1465 | DstBlock "To Workspace" 1466 | DstPort 1 1467 | } 1468 | Line { 1469 | SrcBlock "Demux" 1470 | SrcPort 1 1471 | Points [85, 0; 0, 95] 1472 | DstBlock "tpf31b258a_4496_404b_bafe_5462b0462114" 1473 | DstPort 1 1474 | } 1475 | Line { 1476 | SrcBlock "tpf31b258a_4496_404b_bafe_5462b0462114" 1477 | SrcPort 1 1478 | DstBlock "To Workspace1" 1479 | DstPort 1 1480 | } 1481 | } 1482 | RTWSystemCode "Auto" 1483 | MinAlgLoopOccurrences off 1484 | PropExecContextOutsideSubsystem off 1485 | FunctionWithSeparateData off 1486 | Opaque off 1487 | MaskHideContents off 1488 | } 1489 | Block { 1490 | BlockType Demux 1491 | Name "Demux" 1492 | SID "102" 1493 | Ports [1, 3] 1494 | Position [860, 451, 865, 489] 1495 | ZOrder 37 1496 | ShowName off 1497 | Outputs "3" 1498 | DisplayOption "bar" 1499 | } 1500 | Block { 1501 | BlockType SubSystem 1502 | Name "Model" 1503 | SID "28" 1504 | Ports [1, 4] 1505 | Position [990, 258, 1090, 342] 1506 | ZOrder 31 1507 | RequestExecContextInheritance off 1508 | Variant off 1509 | System { 1510 | Name "Model" 1511 | Location [-7, 0, 1541, 836] 1512 | Open off 1513 | ModelBrowserVisibility off 1514 | ModelBrowserWidth 200 1515 | ScreenColor "white" 1516 | PaperOrientation "landscape" 1517 | PaperPositionMode "auto" 1518 | PaperType "A4" 1519 | PaperUnits "centimeters" 1520 | TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] 1521 | TiledPageScale 1 1522 | ShowPageBoundaries off 1523 | ZoomFactor "100" 1524 | Block { 1525 | BlockType Inport 1526 | Name "TAU" 1527 | SID "29" 1528 | Position [120, 238, 150, 252] 1529 | ZOrder -1 1530 | IconDisplay "Port number" 1531 | } 1532 | Block { 1533 | BlockType Demux 1534 | Name "Demux" 1535 | SID "30" 1536 | Ports [1, 3] 1537 | Position [940, 246, 945, 284] 1538 | ZOrder 8 1539 | ShowName off 1540 | Outputs "3" 1541 | DisplayOption "bar" 1542 | } 1543 | Block { 1544 | BlockType Demux 1545 | Name "Demux1" 1546 | SID "141" 1547 | Ports [1, 3] 1548 | Position [565, 81, 570, 119] 1549 | ZOrder 16 1550 | ShowName off 1551 | Outputs "3" 1552 | DisplayOption "bar" 1553 | } 1554 | Block { 1555 | BlockType MATLABFcn 1556 | Name "Dynamic" 1557 | SID "31" 1558 | Ports [1, 1] 1559 | Position [340, 240, 410, 270] 1560 | ZOrder 5 1561 | MATLABFcn "dynamic" 1562 | OutputDimensions "3" 1563 | } 1564 | Block { 1565 | BlockType Integrator 1566 | Name "Integrator" 1567 | SID "32" 1568 | Ports [1, 1] 1569 | Position [490, 240, 520, 270] 1570 | ZOrder 3 1571 | InitialCondition "[0 0 0]" 1572 | } 1573 | Block { 1574 | BlockType Integrator 1575 | Name "Integrator1" 1576 | SID "33" 1577 | Ports [1, 1] 1578 | Position [830, 250, 860, 280] 1579 | ZOrder 13 1580 | InitialCondition "[5 10 0]" 1581 | } 1582 | Block { 1583 | BlockType MATLABFcn 1584 | Name "Kinematic" 1585 | SID "34" 1586 | Ports [1, 1] 1587 | Position [730, 250, 800, 280] 1588 | ZOrder 6 1589 | MATLABFcn "kinematic" 1590 | OutputDimensions "3" 1591 | } 1592 | Block { 1593 | BlockType Mux 1594 | Name "Mux" 1595 | SID "35" 1596 | Ports [3, 1] 1597 | Position [235, 236, 240, 274] 1598 | ZOrder 1 1599 | ShowName off 1600 | Inputs "3" 1601 | DisplayOption "bar" 1602 | } 1603 | Block { 1604 | BlockType Mux 1605 | Name "Mux1" 1606 | SID "36" 1607 | Ports [3, 1] 1608 | Position [650, 246, 655, 284] 1609 | ZOrder 7 1610 | ShowName off 1611 | Inputs "3" 1612 | DisplayOption "bar" 1613 | } 1614 | Block { 1615 | BlockType ToWorkspace 1616 | Name "To Workspace" 1617 | SID "37" 1618 | Ports [1] 1619 | Position [1095, 55, 1125, 85] 1620 | ZOrder 10 1621 | VariableName "x" 1622 | MaxDataPoints "inf" 1623 | FixptAsFi on 1624 | SampleTime "-1" 1625 | } 1626 | Block { 1627 | BlockType ToWorkspace 1628 | Name "To Workspace1" 1629 | SID "38" 1630 | Ports [1] 1631 | Position [1165, 160, 1195, 190] 1632 | ZOrder 11 1633 | VariableName "y" 1634 | MaxDataPoints "inf" 1635 | FixptAsFi on 1636 | SampleTime "-1" 1637 | } 1638 | Block { 1639 | BlockType ToWorkspace 1640 | Name "To Workspace2" 1641 | SID "137" 1642 | Ports [1] 1643 | Position [1170, 280, 1200, 310] 1644 | ZOrder 15 1645 | VariableName "psi" 1646 | MaxDataPoints "inf" 1647 | FixptAsFi on 1648 | SampleTime "-1" 1649 | } 1650 | Block { 1651 | BlockType ToWorkspace 1652 | Name "To Workspace3" 1653 | SID "142" 1654 | Ports [1] 1655 | Position [680, 10, 710, 40] 1656 | ZOrder 17 1657 | VariableName "u" 1658 | MaxDataPoints "inf" 1659 | FixptAsFi on 1660 | SampleTime "-1" 1661 | } 1662 | Block { 1663 | BlockType ToWorkspace 1664 | Name "To Workspace4" 1665 | SID "143" 1666 | Ports [1] 1667 | Position [680, 85, 710, 115] 1668 | ZOrder 18 1669 | VariableName "v" 1670 | MaxDataPoints "inf" 1671 | FixptAsFi on 1672 | SampleTime "-1" 1673 | } 1674 | Block { 1675 | BlockType ToWorkspace 1676 | Name "To Workspace5" 1677 | SID "144" 1678 | Ports [1] 1679 | Position [680, 160, 710, 190] 1680 | ZOrder 19 1681 | VariableName "r" 1682 | MaxDataPoints "inf" 1683 | FixptAsFi on 1684 | SampleTime "-1" 1685 | } 1686 | Block { 1687 | BlockType FrameConversion 1688 | Name "tp007415ff_8339_4311_b1d7_fae4e63511c9" 1689 | SID "174" 1690 | Ports [1, 1] 1691 | Position [1085, 280, 1145, 310] 1692 | ZOrder 22 1693 | ShowName off 1694 | InheritSamplingMode off 1695 | OutFrame "Sample-based" 1696 | } 1697 | Block { 1698 | BlockType FrameConversion 1699 | Name "tp229ba95b_2c5e_4cae_90d9_8105af601a4f" 1700 | SID "177" 1701 | Ports [1, 1] 1702 | Position [595, 160, 655, 190] 1703 | ZOrder 25 1704 | ShowName off 1705 | InheritSamplingMode off 1706 | OutFrame "Sample-based" 1707 | } 1708 | Block { 1709 | BlockType FrameConversion 1710 | Name "tp35e40414_bbae_4308_bb87_aa5930dad280" 1711 | SID "172" 1712 | Ports [1, 1] 1713 | Position [1010, 55, 1070, 85] 1714 | ZOrder 20 1715 | ShowName off 1716 | InheritSamplingMode off 1717 | OutFrame "Sample-based" 1718 | } 1719 | Block { 1720 | BlockType FrameConversion 1721 | Name "tp4d0f3936_fded_441b_9ea6_90500c7f4fb5" 1722 | SID "175" 1723 | Ports [1, 1] 1724 | Position [595, 10, 655, 40] 1725 | ZOrder 23 1726 | ShowName off 1727 | InheritSamplingMode off 1728 | OutFrame "Sample-based" 1729 | } 1730 | Block { 1731 | BlockType FrameConversion 1732 | Name "tp5b22f10d_9573_47e4_9a51_f15c82cf95f5" 1733 | SID "173" 1734 | Ports [1, 1] 1735 | Position [1080, 160, 1140, 190] 1736 | ZOrder 21 1737 | ShowName off 1738 | InheritSamplingMode off 1739 | OutFrame "Sample-based" 1740 | } 1741 | Block { 1742 | BlockType FrameConversion 1743 | Name "tpe6b8ae77_716d_41db_9a37_b8a13569f6e5" 1744 | SID "176" 1745 | Ports [1, 1] 1746 | Position [595, 85, 655, 115] 1747 | ZOrder 24 1748 | ShowName off 1749 | InheritSamplingMode off 1750 | OutFrame "Sample-based" 1751 | } 1752 | Block { 1753 | BlockType Outport 1754 | Name "x" 1755 | SID "39" 1756 | Position [1000, 18, 1030, 32] 1757 | ZOrder -2 1758 | IconDisplay "Port number" 1759 | } 1760 | Block { 1761 | BlockType Outport 1762 | Name "y" 1763 | SID "40" 1764 | Position [1045, 118, 1075, 132] 1765 | ZOrder 12 1766 | Port "2" 1767 | IconDisplay "Port number" 1768 | } 1769 | Block { 1770 | BlockType Outport 1771 | Name "kinematic" 1772 | SID "41" 1773 | Position [915, 168, 945, 182] 1774 | ZOrder 14 1775 | Port "3" 1776 | IconDisplay "Port number" 1777 | } 1778 | Block { 1779 | BlockType Outport 1780 | Name "dynamic" 1781 | SID "42" 1782 | Position [595, 403, 625, 417] 1783 | ZOrder 9 1784 | Port "4" 1785 | IconDisplay "Port number" 1786 | } 1787 | Line { 1788 | SrcBlock "TAU" 1789 | SrcPort 1 1790 | Points [24, 0] 1791 | Branch { 1792 | Points [0, 99; 452, 0; 0, -69] 1793 | DstBlock "Mux1" 1794 | DstPort 3 1795 | } 1796 | Branch { 1797 | DstBlock "Mux" 1798 | DstPort 1 1799 | } 1800 | } 1801 | Line { 1802 | SrcBlock "Mux" 1803 | SrcPort 1 1804 | DstBlock "Dynamic" 1805 | DstPort 1 1806 | } 1807 | Line { 1808 | SrcBlock "Dynamic" 1809 | SrcPort 1 1810 | DstBlock "Integrator" 1811 | DstPort 1 1812 | } 1813 | Line { 1814 | SrcBlock "Integrator" 1815 | SrcPort 1 1816 | Points [12, 0] 1817 | Branch { 1818 | Points [0, 55; -340, 0; 0, -55] 1819 | DstBlock "Mux" 1820 | DstPort 2 1821 | } 1822 | Branch { 1823 | Points [0, -155] 1824 | DstBlock "Demux1" 1825 | DstPort 1 1826 | } 1827 | Branch { 1828 | Points [25, 0] 1829 | Branch { 1830 | Points [0, 155] 1831 | DstBlock "dynamic" 1832 | DstPort 1 1833 | } 1834 | Branch { 1835 | DstBlock "Mux1" 1836 | DstPort 1 1837 | } 1838 | } 1839 | } 1840 | Line { 1841 | SrcBlock "Mux1" 1842 | SrcPort 1 1843 | DstBlock "Kinematic" 1844 | DstPort 1 1845 | } 1846 | Line { 1847 | SrcBlock "Kinematic" 1848 | SrcPort 1 1849 | DstBlock "Integrator1" 1850 | DstPort 1 1851 | } 1852 | Line { 1853 | SrcBlock "Demux" 1854 | SrcPort 3 1855 | Points [0, 0] 1856 | Branch { 1857 | Points [9, 0; 0, 37; -352, 0] 1858 | Branch { 1859 | Points [0, 10; -401, 0; 0, -57] 1860 | DstBlock "Mux" 1861 | DstPort 3 1862 | } 1863 | Branch { 1864 | Points [0, -47] 1865 | DstBlock "Mux1" 1866 | DstPort 2 1867 | } 1868 | } 1869 | Branch { 1870 | Points [60, 0; 0, 20] 1871 | DstBlock "tp007415ff_8339_4311_b1d7_fae4e63511c9" 1872 | DstPort 1 1873 | } 1874 | } 1875 | Line { 1876 | SrcBlock "Demux" 1877 | SrcPort 1 1878 | Points [0, 0] 1879 | Branch { 1880 | Points [35, 0] 1881 | DstBlock "x" 1882 | DstPort 1 1883 | } 1884 | Branch { 1885 | Points [20, 0; 0, -185] 1886 | DstBlock "tp35e40414_bbae_4308_bb87_aa5930dad280" 1887 | DstPort 1 1888 | } 1889 | } 1890 | Line { 1891 | SrcBlock "Demux" 1892 | SrcPort 2 1893 | Points [0, 0] 1894 | Branch { 1895 | Points [82, 0; 0, -140] 1896 | DstBlock "y" 1897 | DstPort 1 1898 | } 1899 | Branch { 1900 | Points [55, 0; 0, -90] 1901 | DstBlock "tp5b22f10d_9573_47e4_9a51_f15c82cf95f5" 1902 | DstPort 1 1903 | } 1904 | } 1905 | Line { 1906 | SrcBlock "Integrator1" 1907 | SrcPort 1 1908 | Points [27, 0] 1909 | Branch { 1910 | Points [0, -90] 1911 | DstBlock "kinematic" 1912 | DstPort 1 1913 | } 1914 | Branch { 1915 | DstBlock "Demux" 1916 | DstPort 1 1917 | } 1918 | } 1919 | Line { 1920 | SrcBlock "tp35e40414_bbae_4308_bb87_aa5930dad280" 1921 | SrcPort 1 1922 | DstBlock "To Workspace" 1923 | DstPort 1 1924 | } 1925 | Line { 1926 | SrcBlock "tp5b22f10d_9573_47e4_9a51_f15c82cf95f5" 1927 | SrcPort 1 1928 | DstBlock "To Workspace1" 1929 | DstPort 1 1930 | } 1931 | Line { 1932 | SrcBlock "tp007415ff_8339_4311_b1d7_fae4e63511c9" 1933 | SrcPort 1 1934 | DstBlock "To Workspace2" 1935 | DstPort 1 1936 | } 1937 | Line { 1938 | SrcBlock "Demux1" 1939 | SrcPort 1 1940 | Points [0, -65] 1941 | DstBlock "tp4d0f3936_fded_441b_9ea6_90500c7f4fb5" 1942 | DstPort 1 1943 | } 1944 | Line { 1945 | SrcBlock "tp4d0f3936_fded_441b_9ea6_90500c7f4fb5" 1946 | SrcPort 1 1947 | DstBlock "To Workspace3" 1948 | DstPort 1 1949 | } 1950 | Line { 1951 | SrcBlock "Demux1" 1952 | SrcPort 2 1953 | DstBlock "tpe6b8ae77_716d_41db_9a37_b8a13569f6e5" 1954 | DstPort 1 1955 | } 1956 | Line { 1957 | SrcBlock "tpe6b8ae77_716d_41db_9a37_b8a13569f6e5" 1958 | SrcPort 1 1959 | DstBlock "To Workspace4" 1960 | DstPort 1 1961 | } 1962 | Line { 1963 | SrcBlock "Demux1" 1964 | SrcPort 3 1965 | Points [0, 65] 1966 | DstBlock "tp229ba95b_2c5e_4cae_90d9_8105af601a4f" 1967 | DstPort 1 1968 | } 1969 | Line { 1970 | SrcBlock "tp229ba95b_2c5e_4cae_90d9_8105af601a4f" 1971 | SrcPort 1 1972 | DstBlock "To Workspace5" 1973 | DstPort 1 1974 | } 1975 | } 1976 | RTWSystemCode "Auto" 1977 | MinAlgLoopOccurrences off 1978 | PropExecContextOutsideSubsystem off 1979 | FunctionWithSeparateData off 1980 | Opaque off 1981 | MaskHideContents off 1982 | } 1983 | Block { 1984 | BlockType SubSystem 1985 | Name "Reference trajectory" 1986 | SID "43" 1987 | Ports [1, 1] 1988 | Position [505, 254, 605, 296] 1989 | ZOrder 29 1990 | RequestExecContextInheritance off 1991 | Variant off 1992 | System { 1993 | Name "Reference trajectory" 1994 | Location [-6, 0, 1542, 836] 1995 | Open off 1996 | ModelBrowserVisibility off 1997 | ModelBrowserWidth 200 1998 | ScreenColor "white" 1999 | PaperOrientation "landscape" 2000 | PaperPositionMode "auto" 2001 | PaperType "A4" 2002 | PaperUnits "centimeters" 2003 | TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] 2004 | TiledPageScale 1 2005 | ShowPageBoundaries off 2006 | ZoomFactor "100" 2007 | Block { 2008 | BlockType Inport 2009 | Name "t" 2010 | SID "44" 2011 | Position [70, 168, 100, 182] 2012 | ZOrder -1 2013 | IconDisplay "Port number" 2014 | } 2015 | Block { 2016 | BlockType Demux 2017 | Name "Demux" 2018 | SID "45" 2019 | Ports [1, 3] 2020 | Position [775, 301, 780, 349] 2021 | ZOrder 5 2022 | ShowName off 2023 | Outputs "3" 2024 | DisplayOption "bar" 2025 | } 2026 | Block { 2027 | BlockType Demux 2028 | Name "Demux1" 2029 | SID "165" 2030 | Ports [1, 5] 2031 | Position [635, 126, 640, 204] 2032 | ZOrder 59 2033 | ShowName off 2034 | Outputs "5" 2035 | DisplayOption "bar" 2036 | } 2037 | Block { 2038 | BlockType Reference 2039 | Name "Manual Switch" 2040 | SID "169" 2041 | Ports [2, 1] 2042 | Position [490, 107, 520, 143] 2043 | ZOrder 63 2044 | LibraryVersion "1.1" 2045 | SourceBlock "simulink/Signal\nRouting/Manual Switch" 2046 | SourceType "" 2047 | sw "1" 2048 | action "0" 2049 | varsize "off" 2050 | } 2051 | Block { 2052 | BlockType Mux 2053 | Name "Mux" 2054 | SID "166" 2055 | Ports [3, 1] 2056 | Position [695, 126, 700, 164] 2057 | ZOrder 60 2058 | ShowName off 2059 | Inputs "3" 2060 | DisplayOption "bar" 2061 | } 2062 | Block { 2063 | BlockType ToWorkspace 2064 | Name "To Workspace" 2065 | SID "47" 2066 | Ports [1] 2067 | Position [970, 225, 1000, 255] 2068 | ZOrder 6 2069 | VariableName "x_r" 2070 | MaxDataPoints "inf" 2071 | FixptAsFi on 2072 | SampleTime "-1" 2073 | } 2074 | Block { 2075 | BlockType ToWorkspace 2076 | Name "To Workspace1" 2077 | SID "48" 2078 | Ports [1] 2079 | Position [970, 375, 1000, 405] 2080 | ZOrder 7 2081 | VariableName "y_r" 2082 | MaxDataPoints "inf" 2083 | FixptAsFi on 2084 | SampleTime "-1" 2085 | } 2086 | Block { 2087 | BlockType ToWorkspace 2088 | Name "To Workspace2" 2089 | SID "126" 2090 | Ports [1] 2091 | Position [970, 460, 1000, 490] 2092 | ZOrder 58 2093 | VariableName "psi_r" 2094 | MaxDataPoints "inf" 2095 | FixptAsFi on 2096 | SampleTime "-1" 2097 | } 2098 | Block { 2099 | BlockType ToWorkspace 2100 | Name "To Workspace3" 2101 | SID "167" 2102 | Ports [1] 2103 | Position [780, 400, 810, 430] 2104 | ZOrder 61 2105 | VariableName "x_r_dot" 2106 | MaxDataPoints "inf" 2107 | FixptAsFi on 2108 | SampleTime "-1" 2109 | } 2110 | Block { 2111 | BlockType ToWorkspace 2112 | Name "To Workspace4" 2113 | SID "168" 2114 | Ports [1] 2115 | Position [780, 465, 810, 495] 2116 | ZOrder 62 2117 | VariableName "y_r_dot" 2118 | MaxDataPoints "inf" 2119 | FixptAsFi on 2120 | SampleTime "-1" 2121 | } 2122 | Block { 2123 | BlockType MATLABFcn 2124 | Name "line" 2125 | SID "50" 2126 | Ports [1, 1] 2127 | Position [250, 160, 320, 190] 2128 | ZOrder 2 2129 | MATLABFcn "line_traj" 2130 | OutputDimensions "5" 2131 | } 2132 | Block { 2133 | BlockType Reference 2134 | Name "reference_traj" 2135 | SID "49" 2136 | Ports [2] 2137 | Position [885, 295, 915, 330] 2138 | ZOrder 4 2139 | LibraryVersion "1.386" 2140 | SourceBlock "simulink/Sinks/XY Graph" 2141 | SourceType "XY scope." 2142 | xmin "-100" 2143 | xmax "1000" 2144 | ymin "-200" 2145 | ymax "200" 2146 | st "-1" 2147 | } 2148 | Block { 2149 | BlockType MATLABFcn 2150 | Name "sine" 2151 | SID "51" 2152 | Ports [1, 1] 2153 | Position [250, 40, 320, 70] 2154 | ZOrder 1 2155 | MATLABFcn "trig_traj" 2156 | OutputDimensions "5" 2157 | } 2158 | Block { 2159 | BlockType FrameConversion 2160 | Name "tp84f53d2c_4be7_400b_aa56_3a055e913420" 2161 | SID "181" 2162 | Ports [1, 1] 2163 | Position [695, 400, 755, 430] 2164 | ZOrder 67 2165 | ShowName off 2166 | InheritSamplingMode off 2167 | OutFrame "Sample-based" 2168 | } 2169 | Block { 2170 | BlockType FrameConversion 2171 | Name "tp8912d223_19c6_4a0c_a8b2_14da8ac616a3" 2172 | SID "180" 2173 | Ports [1, 1] 2174 | Position [885, 460, 945, 490] 2175 | ZOrder 66 2176 | ShowName off 2177 | InheritSamplingMode off 2178 | OutFrame "Sample-based" 2179 | } 2180 | Block { 2181 | BlockType FrameConversion 2182 | Name "tpcbb95b13_082c_43aa_b3f6_a1c69c419fd3" 2183 | SID "179" 2184 | Ports [1, 1] 2185 | Position [885, 375, 945, 405] 2186 | ZOrder 65 2187 | ShowName off 2188 | InheritSamplingMode off 2189 | OutFrame "Sample-based" 2190 | } 2191 | Block { 2192 | BlockType FrameConversion 2193 | Name "tpe0bc82f4_e76b_497f_a056_e177cc41e789" 2194 | SID "178" 2195 | Ports [1, 1] 2196 | Position [885, 225, 945, 255] 2197 | ZOrder 64 2198 | ShowName off 2199 | InheritSamplingMode off 2200 | OutFrame "Sample-based" 2201 | } 2202 | Block { 2203 | BlockType FrameConversion 2204 | Name "tpf6f19800_c774_4e07_809a_8677dca4b7ea" 2205 | SID "182" 2206 | Ports [1, 1] 2207 | Position [695, 465, 755, 495] 2208 | ZOrder 68 2209 | ShowName off 2210 | InheritSamplingMode off 2211 | OutFrame "Sample-based" 2212 | } 2213 | Block { 2214 | BlockType Outport 2215 | Name "q_r" 2216 | SID "52" 2217 | Position [785, 158, 815, 172] 2218 | ZOrder -2 2219 | IconDisplay "Port number" 2220 | } 2221 | Line { 2222 | SrcBlock "t" 2223 | SrcPort 1 2224 | Points [55, 0] 2225 | Branch { 2226 | Points [0, -120] 2227 | DstBlock "sine" 2228 | DstPort 1 2229 | } 2230 | Branch { 2231 | DstBlock "line" 2232 | DstPort 1 2233 | } 2234 | } 2235 | Line { 2236 | SrcBlock "Demux" 2237 | SrcPort 1 2238 | Points [0, 0] 2239 | Branch { 2240 | Points [62, 0; 0, -5] 2241 | DstBlock "reference_traj" 2242 | DstPort 1 2243 | } 2244 | Branch { 2245 | Points [40, 0; 0, -70] 2246 | DstBlock "tpe0bc82f4_e76b_497f_a056_e177cc41e789" 2247 | DstPort 1 2248 | } 2249 | } 2250 | Line { 2251 | SrcBlock "Demux" 2252 | SrcPort 2 2253 | Points [0, 0] 2254 | Branch { 2255 | Points [63, 0; 0, -5] 2256 | DstBlock "reference_traj" 2257 | DstPort 2 2258 | } 2259 | Branch { 2260 | Points [40, 0; 0, 65] 2261 | DstBlock "tpcbb95b13_082c_43aa_b3f6_a1c69c419fd3" 2262 | DstPort 1 2263 | } 2264 | } 2265 | Line { 2266 | SrcBlock "line" 2267 | SrcPort 1 2268 | Points [91, 0; 0, -40] 2269 | DstBlock "Manual Switch" 2270 | DstPort 2 2271 | } 2272 | Line { 2273 | SrcBlock "sine" 2274 | SrcPort 1 2275 | Points [35, 0; 0, 60] 2276 | DstBlock "Manual Switch" 2277 | DstPort 1 2278 | } 2279 | Line { 2280 | SrcBlock "Manual Switch" 2281 | SrcPort 1 2282 | Points [60, 0; 0, 40] 2283 | DstBlock "Demux1" 2284 | DstPort 1 2285 | } 2286 | Line { 2287 | SrcBlock "Demux1" 2288 | SrcPort 1 2289 | DstBlock "Mux" 2290 | DstPort 1 2291 | } 2292 | Line { 2293 | SrcBlock "Demux1" 2294 | SrcPort 2 2295 | Points [15, 0; 0, -5] 2296 | DstBlock "Mux" 2297 | DstPort 2 2298 | } 2299 | Line { 2300 | SrcBlock "Demux1" 2301 | SrcPort 3 2302 | Points [15, 0; 0, -10] 2303 | DstBlock "Mux" 2304 | DstPort 3 2305 | } 2306 | Line { 2307 | SrcBlock "Mux" 2308 | SrcPort 1 2309 | Points [30, 0; 0, 20] 2310 | Branch { 2311 | Points [0, 160] 2312 | DstBlock "Demux" 2313 | DstPort 1 2314 | } 2315 | Branch { 2316 | DstBlock "q_r" 2317 | DstPort 1 2318 | } 2319 | } 2320 | Line { 2321 | SrcBlock "tpe0bc82f4_e76b_497f_a056_e177cc41e789" 2322 | SrcPort 1 2323 | DstBlock "To Workspace" 2324 | DstPort 1 2325 | } 2326 | Line { 2327 | SrcBlock "tpcbb95b13_082c_43aa_b3f6_a1c69c419fd3" 2328 | SrcPort 1 2329 | DstBlock "To Workspace1" 2330 | DstPort 1 2331 | } 2332 | Line { 2333 | SrcBlock "Demux" 2334 | SrcPort 3 2335 | Points [30, 0; 0, 135] 2336 | DstBlock "tp8912d223_19c6_4a0c_a8b2_14da8ac616a3" 2337 | DstPort 1 2338 | } 2339 | Line { 2340 | SrcBlock "tp8912d223_19c6_4a0c_a8b2_14da8ac616a3" 2341 | SrcPort 1 2342 | DstBlock "To Workspace2" 2343 | DstPort 1 2344 | } 2345 | Line { 2346 | SrcBlock "Demux1" 2347 | SrcPort 4 2348 | Points [15, 0; 0, 235] 2349 | DstBlock "tp84f53d2c_4be7_400b_aa56_3a055e913420" 2350 | DstPort 1 2351 | } 2352 | Line { 2353 | SrcBlock "tp84f53d2c_4be7_400b_aa56_3a055e913420" 2354 | SrcPort 1 2355 | DstBlock "To Workspace3" 2356 | DstPort 1 2357 | } 2358 | Line { 2359 | SrcBlock "Demux1" 2360 | SrcPort 5 2361 | Points [5, 0; 0, 285] 2362 | DstBlock "tpf6f19800_c774_4e07_809a_8677dca4b7ea" 2363 | DstPort 1 2364 | } 2365 | Line { 2366 | SrcBlock "tpf6f19800_c774_4e07_809a_8677dca4b7ea" 2367 | SrcPort 1 2368 | DstBlock "To Workspace4" 2369 | DstPort 1 2370 | } 2371 | } 2372 | RTWSystemCode "Auto" 2373 | MinAlgLoopOccurrences off 2374 | PropExecContextOutsideSubsystem off 2375 | FunctionWithSeparateData off 2376 | Opaque off 2377 | MaskHideContents off 2378 | } 2379 | Block { 2380 | BlockType Sum 2381 | Name "Sum" 2382 | SID "101" 2383 | Ports [2, 1] 2384 | Position [765, 460, 785, 480] 2385 | ZOrder 36 2386 | ShowName off 2387 | IconShape "round" 2388 | Inputs "-+|" 2389 | InputSameDT off 2390 | OutDataTypeStr "Inherit: Inherit via internal rule" 2391 | SaturateOnIntegerOverflow off 2392 | } 2393 | Block { 2394 | BlockType ToWorkspace 2395 | Name "To Workspace" 2396 | SID "53" 2397 | Ports [1] 2398 | Position [610, 345, 640, 375] 2399 | ZOrder 32 2400 | VariableName "t" 2401 | MaxDataPoints "inf" 2402 | FixptAsFi on 2403 | SampleTime "-1" 2404 | } 2405 | Block { 2406 | BlockType ToWorkspace 2407 | Name "To Workspace1" 2408 | SID "128" 2409 | Ports [1] 2410 | Position [1000, 430, 1030, 460] 2411 | ZOrder 57 2412 | VariableName "e_x" 2413 | MaxDataPoints "inf" 2414 | FixptAsFi on 2415 | SampleTime "-1" 2416 | } 2417 | Block { 2418 | BlockType ToWorkspace 2419 | Name "To Workspace2" 2420 | SID "129" 2421 | Ports [1] 2422 | Position [1000, 480, 1030, 510] 2423 | ZOrder 58 2424 | VariableName "e_y" 2425 | MaxDataPoints "inf" 2426 | FixptAsFi on 2427 | SampleTime "-1" 2428 | } 2429 | Block { 2430 | BlockType ToWorkspace 2431 | Name "To Workspace3" 2432 | SID "134" 2433 | Ports [1] 2434 | Position [1000, 535, 1030, 565] 2435 | ZOrder 63 2436 | VariableName "e_psi" 2437 | MaxDataPoints "inf" 2438 | FixptAsFi on 2439 | SampleTime "-1" 2440 | } 2441 | Block { 2442 | BlockType Reference 2443 | Name "XY Graph" 2444 | SID "54" 2445 | Ports [2] 2446 | Position [1145, 245, 1175, 280] 2447 | ZOrder 33 2448 | LibraryVersion "1.386" 2449 | SourceBlock "simulink/Sinks/XY Graph" 2450 | SourceType "XY scope." 2451 | xmin "-100" 2452 | xmax "1000" 2453 | ymin "-200" 2454 | ymax "200" 2455 | st "-1" 2456 | } 2457 | Block { 2458 | BlockType FrameConversion 2459 | Name "tp1867c2e4_302f_4618_8b54_572a129d09c5" 2460 | SID "185" 2461 | Ports [1, 1] 2462 | Position [915, 480, 975, 510] 2463 | ZOrder 66 2464 | ShowName off 2465 | InheritSamplingMode off 2466 | OutFrame "Sample-based" 2467 | } 2468 | Block { 2469 | BlockType FrameConversion 2470 | Name "tp6be89c97_76e5_43b7_be9f_a8d080676e2e" 2471 | SID "184" 2472 | Ports [1, 1] 2473 | Position [915, 430, 975, 460] 2474 | ZOrder 65 2475 | ShowName off 2476 | InheritSamplingMode off 2477 | OutFrame "Sample-based" 2478 | } 2479 | Block { 2480 | BlockType FrameConversion 2481 | Name "tpc5157b15_d720_45df_a9b1_da0e37c379e1" 2482 | SID "183" 2483 | Ports [1, 1] 2484 | Position [525, 345, 585, 375] 2485 | ZOrder 64 2486 | ShowName off 2487 | InheritSamplingMode off 2488 | OutFrame "Sample-based" 2489 | } 2490 | Block { 2491 | BlockType FrameConversion 2492 | Name "tpf15964db_2bc4_428f_9f94_8a8785d05fbc" 2493 | SID "186" 2494 | Ports [1, 1] 2495 | Position [915, 535, 975, 565] 2496 | ZOrder 67 2497 | ShowName off 2498 | InheritSamplingMode off 2499 | OutFrame "Sample-based" 2500 | } 2501 | Line { 2502 | SrcBlock "Clock" 2503 | SrcPort 1 2504 | Points [0, 0] 2505 | Branch { 2506 | DstBlock "Reference trajectory" 2507 | DstPort 1 2508 | } 2509 | Branch { 2510 | Points [45, 0; 0, 85] 2511 | DstBlock "tpc5157b15_d720_45df_a9b1_da0e37c379e1" 2512 | DstPort 1 2513 | } 2514 | } 2515 | Line { 2516 | SrcBlock "Model" 2517 | SrcPort 1 2518 | Points [23, 0; 0, -15] 2519 | DstBlock "XY Graph" 2520 | DstPort 1 2521 | } 2522 | Line { 2523 | SrcBlock "Model" 2524 | SrcPort 2 2525 | Points [35, 0] 2526 | DstBlock "XY Graph" 2527 | DstPort 2 2528 | } 2529 | Line { 2530 | SrcBlock "Reference trajectory" 2531 | SrcPort 1 2532 | Points [57, 0] 2533 | Branch { 2534 | DstBlock "Controller" 2535 | DstPort 1 2536 | } 2537 | Branch { 2538 | Points [0, 195] 2539 | DstBlock "Sum" 2540 | DstPort 2 2541 | } 2542 | } 2543 | Line { 2544 | SrcBlock "Model" 2545 | SrcPort 4 2546 | Points [9, 0; 0, 39; -353, 0; 0, -44] 2547 | DstBlock "Controller" 2548 | DstPort 3 2549 | } 2550 | Line { 2551 | SrcBlock "Model" 2552 | SrcPort 3 2553 | Points [23, 0; 0, 78; -343, 0] 2554 | Branch { 2555 | Points [-38, 0; 0, -88] 2556 | DstBlock "Controller" 2557 | DstPort 2 2558 | } 2559 | Branch { 2560 | DstBlock "Sum" 2561 | DstPort 1 2562 | } 2563 | } 2564 | Line { 2565 | SrcBlock "Sum" 2566 | SrcPort 1 2567 | DstBlock "Demux" 2568 | DstPort 1 2569 | } 2570 | Line { 2571 | SrcBlock "Controller" 2572 | SrcPort 1 2573 | DstBlock "Model" 2574 | DstPort 1 2575 | } 2576 | Line { 2577 | SrcBlock "tpc5157b15_d720_45df_a9b1_da0e37c379e1" 2578 | SrcPort 1 2579 | DstBlock "To Workspace" 2580 | DstPort 1 2581 | } 2582 | Line { 2583 | SrcBlock "Demux" 2584 | SrcPort 1 2585 | Points [15, 0; 0, -15] 2586 | DstBlock "tp6be89c97_76e5_43b7_be9f_a8d080676e2e" 2587 | DstPort 1 2588 | } 2589 | Line { 2590 | SrcBlock "tp6be89c97_76e5_43b7_be9f_a8d080676e2e" 2591 | SrcPort 1 2592 | DstBlock "To Workspace1" 2593 | DstPort 1 2594 | } 2595 | Line { 2596 | SrcBlock "Demux" 2597 | SrcPort 2 2598 | Points [15, 0; 0, 25] 2599 | DstBlock "tp1867c2e4_302f_4618_8b54_572a129d09c5" 2600 | DstPort 1 2601 | } 2602 | Line { 2603 | SrcBlock "tp1867c2e4_302f_4618_8b54_572a129d09c5" 2604 | SrcPort 1 2605 | DstBlock "To Workspace2" 2606 | DstPort 1 2607 | } 2608 | Line { 2609 | SrcBlock "Demux" 2610 | SrcPort 3 2611 | Points [5, 0; 0, 70] 2612 | DstBlock "tpf15964db_2bc4_428f_9f94_8a8785d05fbc" 2613 | DstPort 1 2614 | } 2615 | Line { 2616 | SrcBlock "tpf15964db_2bc4_428f_9f94_8a8785d05fbc" 2617 | SrcPort 1 2618 | DstBlock "To Workspace3" 2619 | DstPort 1 2620 | } 2621 | } 2622 | } 2623 | #Finite State Machines 2624 | # 2625 | # Stateflow 80000009 2626 | # 2627 | # 2628 | Stateflow { 2629 | machine { 2630 | id 1 2631 | name "paliotta" 2632 | created "13-Jan-2020 14:56:41" 2633 | isLibrary 0 2634 | firstTarget 2 2635 | sfVersion 76014001.0004 2636 | } 2637 | target { 2638 | id 2 2639 | name "sfun" 2640 | description "Default Simulink S-Function Target." 2641 | machine 1 2642 | linkNode [1 0 0] 2643 | } 2644 | } 2645 | -------------------------------------------------------------------------------- /Control algorithm - Paliotta/paliotta.slx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaciPaci/Simulation-of-Underactuated-AUV-Control-Algorithms/0a5ef275c51ae883f8046e52e8c6c85cc2c55612/Control algorithm - Paliotta/paliotta.slx -------------------------------------------------------------------------------- /Control algorithm - Paliotta/plot.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaciPaci/Simulation-of-Underactuated-AUV-Control-Algorithms/0a5ef275c51ae883f8046e52e8c6c85cc2c55612/Control algorithm - Paliotta/plot.m -------------------------------------------------------------------------------- /Control algorithm - Paliotta/trig_traj.m: -------------------------------------------------------------------------------- 1 | function [ output ] = trig_traj( time ) 2 | %TRIG_TRAJ Trigonometric trajectory generator 3 | % Generates a trigonometric reference trajectory starting at the point 4 | % [x; y] = [0; 0]. Function takes current simulation time as an input 5 | % and gives reference position x_r, y_r and reference angle psi_r as an output. 6 | 7 | %sine trajectory 8 | 9 | x_r=time; 10 | y_r=100*sin(0.01*time); 11 | psi_r=atan2(y_r,x_r); 12 | x_r_dot=1; 13 | y_r_dot=cos(0.01*time); 14 | psi_r_dot=atan2(y_r_dot,x_r_dot); 15 | 16 | %cosine trajectory 17 | % 18 | % x_r=time; 19 | % y_r=-200*cos(0.01*time)+200; 20 | % psi_r=atan2(y_r,x_r); 21 | % x_r_dot=1; 22 | % y_r_dot=2*sin(0.01*time); 23 | % psi_r_dot=atan2(y_r_dot,x_r_dot); 24 | 25 | output=[x_r; y_r; psi_r_dot; x_r_dot; y_r_dot]; 26 | 27 | end 28 | 29 | -------------------------------------------------------------------------------- /Control algorithm - Paliotta/zeta_calculation.m: -------------------------------------------------------------------------------- 1 | function [ output ] = zeta_calculation( input ) 2 | %ZETA_CALCULATION Calculations of the change of coordinates 3 | % Function calculates change of coordinates, based on the definition of 4 | % the hand position. 5 | 6 | l=1; 7 | %l=0.75; 8 | 9 | x_r=input(1); 10 | y_r=input(2); 11 | psi_r=input(3); 12 | x=input(4); 13 | y=input(5); 14 | psi=input(6); 15 | % zeta_1_dot=input(7); 16 | % zeta_2_dot=input(8); 17 | % zeta_1d_dot=input(9); 18 | % zeta_2d_dot=input(10); 19 | zeta_3=input(7); 20 | zeta_4=input(8); 21 | z2=input(9); 22 | 23 | zeta_1=x+l*cos(psi); 24 | zeta_2=y+l*sin(psi); 25 | % zeta_3=zeta_1_dot-V_x; 26 | % zeta_4=zeta_2_dot-V_y; 27 | % zeta_3=u*cos(psi)-v*sin(psi)-r*l*sin(psi); 28 | % zeta_4=u*sin(psi)+v*cos(psi)+r*l*cos(psi); 29 | 30 | 31 | % zeta_1d=x_r+l*cos(psi_r); 32 | % zeta_2d=y_r+l*sin(psi_r); 33 | % zeta_3d=zeta_1d_dot-V_x; 34 | % zeta_4d=zeta_2d_dot-V_y; 35 | zeta_1d=x_r; 36 | zeta_2d=y_r; 37 | zeta_3d=zeta_1d; 38 | zeta_4d=zeta_2d; 39 | 40 | 41 | output=[zeta_1; zeta_2; zeta_3; zeta_4; zeta_1d; zeta_2d; zeta_3d; zeta_4d]; 42 | 43 | end 44 | 45 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Simulation-of-Underactuated-AUV-Control-Algorithms 2 | MatLAB and Simulink simulation of different analytical methods of trajectory tracking and path following algorithms for Underactuated Autonomous Vehicles. 3 | 4 | Mathematical groundwork for algorithms used in these simulations are based on following research articles: 5 | 6 | - [Horizontal trajectory tracking control for an underactuated AUV adopted global integral sliding mode control (Yunbiao Jiang; Chen Guo; Haomiao Yu)](https://ieeexplore.ieee.org/document/8408142) 7 | 8 | - [Trajectory Tracking and Path Following for Underactuated Marine Vehicles (Claudio Paliotta; Erjen Lefeber; Kristin Ytterstad Pettersen; José Pinto; Maria Costa)](https://ieeexplore.ieee.org/document/8367854) 9 | 10 | # Running the simulations 11 | To run the simulations simply clone repository onto your local machine. Open MatLAB, navigate to the directory and open Simulnk's .slx file. After simulation has loaded run the simulation. All the resulting time series will be imported to MatLAB's workspace after the simulation has ended. 12 | --------------------------------------------------------------------------------