├── Accel_slow_fast.m ├── Controller.m ├── LeaderAcceleration.m ├── LeaderAcceleration0.m ├── README.md ├── TrackingError.m ├── affineManeuver.mdl ├── affineManeuver.mdl.r2010a ├── affineManeuver.slxc ├── f_sin.m ├── main.m ├── saturate.m └── slprj └── sim └── varcache └── affineManeuver ├── checksumOfCache.mat ├── tmwinternal └── simulink_cache.xml └── varInfo.mat /Accel_slow_fast.m: -------------------------------------------------------------------------------- 1 | function acceleration=Accel_slow_fast(time_start, time_span, currentTime, distance_change) 2 | 3 | mu=time_start+time_span/2; 4 | sigma=time_span/8; 5 | acceleration=-distance_change*1/(sqrt(2*pi*sigma^2))*exp(-(currentTime-mu)^2/2/sigma^2)*(-currentTime+mu)/sigma^2; -------------------------------------------------------------------------------- /Controller.m: -------------------------------------------------------------------------------- 1 | function output = Controller(u) 2 | global nodenum neighborMat stressMat dim kp kv 3 | u_all = reshape(u,dim,3*nodenum); 4 | p_all=u_all(:,1:nodenum); 5 | v_all=u_all(:,nodenum+1:2*nodenum); 6 | v_dot_all_previous=u_all(:,2*nodenum+1:end); 7 | %output 8 | v_dot_all=zeros(dim,nodenum); 9 | for i=1:nodenum % for agent i 10 | for j=1:nodenum % for the neighbors of agent i 11 | if neighborMat(i,j)==1 && j~=i% the agent j is the neighbor of agent i 12 | omegaij=stressMat(i,j); 13 | % control law 1: no accelaration 14 | v_dot_all(:,i)=v_dot_all(:,i) - kp*omegaij*(p_all(:,i)-p_all(:,j)) - kv*omegaij*(v_all(:,i)-v_all(:,j)); 15 | end 16 | end 17 | % v_dot_all(:,i)=saturate(v_dot_all(:,i)); 18 | end 19 | 20 | %% based on control law 1, compute control law 2 21 | ifAcceleration=1; 22 | if ifAcceleration==1 23 | % compute sum omega_ij 24 | omegaSumAll=zeros(nodenum,1); 25 | for i=1:nodenum 26 | for j=1:nodenum 27 | if neighborMat(i,j)==1 && j~=i 28 | omegaSumAll(i)=omegaSumAll(i)+stressMat(i,j); 29 | end 30 | end 31 | end 32 | % add the acceleration term 33 | for i=1:nodenum 34 | for j=1:nodenum 35 | if neighborMat(i,j)==1 && j~=i 36 | omegaij=stressMat(i,j); 37 | v_dot_all(:,i)=v_dot_all(:,i)+omegaij*v_dot_all_previous(:,j); 38 | end 39 | end 40 | v_dot_all(:,i) = v_dot_all(:,i)/omegaSumAll(i); 41 | end 42 | end 43 | 44 | %% 45 | output=reshape(v_dot_all,dim*nodenum,1); 46 | -------------------------------------------------------------------------------- /LeaderAcceleration.m: -------------------------------------------------------------------------------- 1 | function output=LeaderAcceleration(u) 2 | global leaderNum dim nodenum simTime 3 | 4 | u_all = reshape(u(1:dim*nodenum*3),dim,nodenum*3); 5 | v_all=u_all(:,1:nodenum); 6 | p_all=u_all(:,nodenum+1:2*nodenum); 7 | control_all=u_all(:,2*nodenum+1:3*nodenum); 8 | currentTime=u(end); 9 | if currentTime-floor(currentTime)==0 10 | disp(strcat('Completed %', num2str(currentTime/simTime*100,'%.1f'))) 11 | end 12 | %output 13 | a_leader_all=zeros(dim,leaderNum); 14 | 15 | % speed up to speed=1 16 | time_start_speedup=0; 17 | time_span_speedup=15; 18 | if currentTime>time_start_speedup && currentTime=time_start_scaledown && currentTime<=time_start_scaledown+time_span_scaledown 29 | % agent 3 30 | a_leader_all(2,3)=-Accel_slow_fast(time_start_scaledown, time_span_scaledown, currentTime, 1); 31 | % agent 3 32 | a_leader_all(2,2)=Accel_slow_fast(time_start_scaledown, time_span_scaledown, currentTime, 1); 33 | end 34 | % scale up after passing through obstacles 35 | time_start_scaleup=time_start_scaledown+time_span_scaledown+5; 36 | time_span_scaleup=10; 37 | if currentTime>=time_start_scaleup && currentTime<=time_start_scaleup+time_span_scaleup 38 | % agent 3 39 | a_leader_all(2,3)=Accel_slow_fast(time_start_scaleup, time_span_scaleup, currentTime, 1); 40 | % agent 3 41 | a_leader_all(2,2)=-Accel_slow_fast(time_start_scaleup, time_span_scaleup, currentTime, 1); 42 | end 43 | 44 | % slow down to speed=0 45 | time_start_slowdown=time_start_scaleup+time_span_scaleup+5; 46 | time_span_slowdown=5; 47 | if currentTime>time_start_slowdown && currentTime=time_start_rotate && currentTime<=time_start_rotate+time_span_rotate 59 | % agent 2 60 | acce_mag=-Accel_slow_fast(time_start_rotate, time_span_rotate, currentTime, 4); 61 | acce_vec=[1 0]'; 62 | a_leader_all(:,2)=acce_mag*acce_vec; 63 | % agent 3 64 | acce_mag=-Accel_slow_fast(time_start_rotate, time_span_rotate, currentTime, 4); 65 | acce_vec=[0 1]'; 66 | a_leader_all(:,3)=acce_mag*acce_vec; 67 | end 68 | 69 | % move downward 70 | time_start_downward=time_start_rotate; 71 | time_span_downward=time_span_rotate; 72 | if currentTime>=time_start_downward && currentTime<=time_start_downward+time_span_downward 73 | % agent 1 74 | ay=f_sin(time_start_downward,time_span_downward,currentTime)/pi; 75 | a_leader_all(:,1)=[0,-ay]'; 76 | % agent 2 77 | a_leader_all(:,2)=a_leader_all(:,2)+[0,-ay]'; 78 | % agent 3 79 | a_leader_all(:,3)=a_leader_all(:,3)+[0,-ay]'; 80 | end 81 | 82 | % slow down to speed=0 83 | time_start_slowdown2=time_start_rotate+time_span_downward+10; 84 | time_span_slowdown2=5; 85 | if currentTime>time_start_slowdown2 && currentTime=time_start_rotate2 && currentTime<=time_start_rotate2+time_span_rotate2 97 | % agent 2 98 | acce_mag=-Accel_slow_fast(time_start_rotate2, time_span_rotate2, currentTime, 4); 99 | acce_vec=[0 -1]'; 100 | a_leader_all(:,2)=acce_mag*acce_vec; 101 | % agent 3 102 | acce_mag=-Accel_slow_fast(time_start_rotate2, time_span_rotate2, currentTime, 4); 103 | acce_vec=[1 0]'; 104 | a_leader_all(:,3)=acce_mag*acce_vec; 105 | end 106 | 107 | % speed up to move leftward 108 | time_start_leftward=time_start_rotate2; 109 | time_span_leftward=time_span_rotate2; 110 | if currentTime>=time_start_leftward && currentTime<=time_start_leftward+time_span_leftward 111 | % agent 1 112 | ax=-f_sin(time_start_leftward,time_span_leftward,currentTime)/pi; 113 | a_leader_all(:,1)=[ax,0]'; 114 | % agent 2 115 | a_leader_all(:,2)=a_leader_all(:,2)+[ax,0]'; 116 | % agent 3 117 | a_leader_all(:,3)=a_leader_all(:,3)+[ax,0]'; 118 | end 119 | 120 | % affine transformation: agent 3 move forward+scale down in the vertical direction 121 | time_start_affineVertical=time_start_leftward+time_span_leftward+5; 122 | time_span_affineVertical=20; 123 | if currentTime>=time_start_affineVertical && currentTime<=time_start_affineVertical+time_span_affineVertical 124 | % agent 3 125 | a_leader_all(1,3)=-Accel_slow_fast(time_start_affineVertical, time_span_affineVertical, currentTime, 1.5); 126 | % 127 | a_leader_all(2,3)=Accel_slow_fast(time_start_affineVertical, time_span_affineVertical, currentTime, 2); 128 | % agent 3 129 | a_leader_all(2,2)=-Accel_slow_fast(time_start_affineVertical, time_span_affineVertical, currentTime, 2); 130 | end 131 | 132 | % affine transformation: back to normal formation 133 | time_start_backtonormal=time_start_affineVertical+time_span_affineVertical+10; 134 | time_span_backtonormal=5; 135 | if currentTime>=time_start_backtonormal && currentTime<=time_start_backtonormal+time_span_backtonormal 136 | % x-direction: agent 3 137 | a_leader_all(1,3)=Accel_slow_fast(time_start_backtonormal, time_span_backtonormal, currentTime, 1.5); 138 | % y-direction 139 | % agent 3 140 | a_leader_all(2,3)=-Accel_slow_fast(time_start_backtonormal, time_span_backtonormal, currentTime, 2); 141 | % agent 2 142 | a_leader_all(2,2)=Accel_slow_fast(time_start_backtonormal, time_span_backtonormal, currentTime, 2); 143 | end 144 | 145 | % output: replace the leaders' velocity with the one prescribed above 146 | control_all(:,1:leaderNum) = a_leader_all; 147 | output=reshape(control_all, dim*nodenum, 1); 148 | 149 | 150 | 151 | -------------------------------------------------------------------------------- /LeaderAcceleration0.m: -------------------------------------------------------------------------------- 1 | function output=LeaderAcceleration0(u) 2 | global leaderNum dim nodenum 3 | global rotateFlag tempp2 tempp3 4 | 5 | u_all = reshape(u(1:dim*nodenum*3),dim,nodenum*3); 6 | v_all=u_all(:,1:nodenum); 7 | p_all=u_all(:,nodenum+1:2*nodenum); 8 | control_all=u_all(:,2*nodenum+1:3*nodenum); 9 | currentTime=u(end); 10 | %output 11 | a_leader_all=zeros(dim,leaderNum); 12 | 13 | % speed up to speed=1 14 | time_start_speedup=0; 15 | time_span_speedup=5; 16 | if currentTime>time_start_speedup && currentTimetime_start_slowdown && currentTime=time_start_rotate && currentTime<=time_start_rotate+time_span_rotate 46 | if rotateFlag==1 47 | tempp2=p2; 48 | tempp3=p3; 49 | rotateFlag=0; 50 | end 51 | % agent 2 52 | acce_mag=-Accel_slow_fast(time_start_rotate, time_span_rotate, currentTime, 4); 53 | % acce_vec=(p1+R90'*(tempp2-p1))-tempp2; 54 | % acce_vec=acce_vec/norm(acce_vec); 55 | acce_vec=[1 0]'; 56 | a_leader_all(:,2)=acce_mag*acce_vec; 57 | % agent 3 58 | acce_mag=-Accel_slow_fast(time_start_rotate, time_span_rotate, currentTime, 4); 59 | % acce_vec=(p1+R90'*(tempp3-p1))-tempp3; 60 | % acce_vec=acce_vec/norm(acce_vec); 61 | acce_vec=[0 1]'; 62 | a_leader_all(:,3)=acce_mag*acce_vec; 63 | end 64 | 65 | % move downward 66 | time_start_downward=time_start_rotate; 67 | time_span_downward=time_span_rotate; 68 | if currentTime>=time_start_downward && currentTime<=time_start_downward+time_span_downward 69 | % agent 1 70 | ay=f_sin(time_start_downward,time_span_downward,currentTime)/pi; 71 | a_leader_all(:,1)=[0,-ay]'; 72 | % agent 2 73 | a_leader_all(:,2)=a_leader_all(:,2)+[0,-ay]'; 74 | % agent 3 75 | a_leader_all(:,3)=a_leader_all(:,3)+[0,-ay]'; 76 | end 77 | 78 | % slow down to speed=0 79 | time_start_slowdown2=time_start_downward+time_span_downward+5; 80 | time_span_slowdown2=5; 81 | if currentTime>time_start_slowdown2 && currentTime 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | __MWOPC_PART_BEGIN__ /_rels/.rels 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | __MWOPC_PART_BEGIN__ /metadata/coreProperties.xml 39 | 40 | 41 | model 42 | 2013-07-12T04:55:49Z 43 | Shiyu Zhao 44 | asachd11 45 | 2022-12-03T03:13:38Z 46 | 24.0 47 | R2021b 48 | 49 | 50 | __MWOPC_PART_BEGIN__ /metadata/mwcoreProperties.xml 51 | 52 | 53 | application/vnd.mathworks.simulink.model 54 | Simulink Model 55 | R2021b 56 | 57 | 58 | __MWOPC_PART_BEGIN__ /metadata/mwcorePropertiesExtension.xml 59 | 60 | 61 | 0076242d-8671-41cf-8a5a-b47cee5310ee 62 | 63 | 64 | __MWOPC_PART_BEGIN__ /metadata/mwcorePropertiesReleaseInfo.xml 65 | 66 | 67 | 68 | 9.11.0.2022996 69 | R2021b 70 | Update 4 71 | Jul 22 2022 72 | 2158151302 73 | 74 | 75 | __MWOPC_PART_BEGIN__ /simulink/_rels/blockdiagram.xml.rels 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | __MWOPC_PART_BEGIN__ /simulink/_rels/configSetInfo.xml.rels 86 | 87 | 88 | 89 | 90 | 91 | __MWOPC_PART_BEGIN__ /simulink/bddefaults.xml 92 | 93 | 94 | 95 |

center

96 |

middle

97 |
98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 |

off

108 |

10

109 |
110 | 111 |

none

112 |

internal

113 |

0

114 |

off

115 |

inf

116 |

-inf

117 |

off

118 |

pi

119 |

-pi

120 |

off

121 |

off

122 |

auto

123 |

off

124 |

on

125 |

''

126 |
127 | 128 |

sin

129 |

-1

130 |

auto

131 |

on

132 |

-1

133 |
134 | 135 |

4

136 |

none

137 |

off

138 |

BusObject

139 |

off

140 |
141 | 142 |

Simulink.scopes.TimeScopeBlockCfg

143 |
144 | 145 |

round

146 |

++

147 |

All dimensions

148 |

1

149 |

off

150 |

Inherit: Inherit via internal rule

151 |

[]

152 |

[]

153 |

Inherit: Inherit via internal rule

154 |

off

155 |

Floor

156 |

off

157 |

-1

158 |
159 | 160 |

1

161 |

0

162 |

1024

163 |

off

164 |

off

165 |

0

166 |
167 |
168 |
169 | 170 | __MWOPC_PART_BEGIN__ /simulink/blockdiagram.xml 171 | 172 | 173 | 174 |

eb5b465b-5598-4004-bca5-bb6163a0bedf

175 |

win64

176 | 177 |

%<Auto>

178 |

%<Auto>

179 |

591912800

180 |

%<AutoIncrement:24.0>

181 |
182 | 183 |

none

184 |
185 | 186 |

normal

187 | 188 |

$bdroot

189 | 190 | $bdroot 191 | 192 | 193 | 194 | 195 |
196 |
197 | 198 |

warning

199 |
200 | 201 | 202 |

Ensure deterministic transfer (maximum delay)

203 |

Ensure data integrity only

204 |

Ensure deterministic transfer (minimum delay)

205 |

None

206 |
207 |
208 | 209 |
210 |
211 | 212 | __MWOPC_PART_BEGIN__ /simulink/configSet0.xml 213 | 214 | 215 | 216 |

[]

217 |

218 | 219 | 220 |

[]

221 |

222 |

[]

223 |

0.0

224 |

10.0

225 |

auto

226 |

on

227 |

0.01

228 |

auto

229 |

5

230 |

auto

231 |

10*128*eps

232 |

1000

233 |

4

234 |

1

235 |

0.02

236 |

auto

237 |

1

238 |

1e-3

239 |

on

240 |

off

241 |

off

242 |

ode4

243 |

auto

244 |

auto

245 |

DisableAll

246 |

UseLocalSettings

247 |

Nonadaptive

248 |

TrustRegion

249 |

off

250 |

off

251 |

Fast

252 |

off

253 |

off

254 |

Unconstrained

255 |

Whenever possible

256 |

[]

257 |

off

258 |

off

259 |

ode3

260 |
261 | 262 |

[]

263 |

264 |

[]

265 |

1

266 |

[t, u]

267 |

xFinal

268 |

xInitial

269 |

on

270 |

1000

271 |

off

272 |

off

273 |

off

274 |

off

275 |

Array

276 |

ModelDataLogs

277 |

on

278 |

off

279 |

on

280 |

on

281 |

off

282 |

on

283 |

off

284 |

streamout

285 |

on

286 |

off

287 |

xout

288 |

tout

289 |

yout

290 |

logsout

291 |

dsmout

292 |

RefineOutputTimes

293 |

[]

294 |

out

295 |

1

296 |

off

297 |

timeseries

298 |

out.mat

299 |

[-inf, inf]

300 |
301 | 302 | 303 | BooleansAsBitfields 304 | PassReuseOutputArgsAs 305 | PassReuseOutputArgsThreshold 306 | ZeroExternalMemoryAtStartup 307 | ZeroInternalMemoryAtStartup 308 | OptimizeModelRefInitCode 309 | NoFixptDivByZeroProtection 310 | UseSpecifiedMinMax 311 | EfficientTunableParamExpr 312 | 313 |

314 |

[]

315 |

on

316 |

on

317 |

on

318 |

Tunable

319 |

off

320 |

off

321 |

off

322 |

off

323 |

double

324 |

off

325 |

off

326 |

on

327 |

on

328 |

off

329 |

off

330 |

on

331 |

off

332 |

333 |

on

334 |

off

335 |

uint_T

336 |

Same as modeled

337 |

on

338 |

64

339 |

Structure reference

340 |

12

341 |

2147483647

342 |

on

343 |

5

344 |

off

345 |

off

346 |

Native Integer

347 |

on

348 |

on

349 |

off

350 |

off

351 |

off

352 |

on

353 |

inf

354 |

Inherit from target

355 |

on

356 |

off

357 |

off

358 |

off

359 |

on

360 |

on

361 |

off

362 |

off

363 |

level2

364 |

Balanced

365 |

on

366 |

off

367 |

off

368 |

GradualUnderflow

369 |

off

370 |
371 | 372 | 373 | UseOnlyExistingSharedCode 374 | 375 |

376 |

[]

377 |

error

378 |

none

379 |

none

380 |

none

381 |

error

382 |

none

383 |

UseLocalSettings

384 |

UseLocalSettings

385 |

UseLocalSettings

386 |

warning

387 |

warning

388 |

warning

389 |

warning

390 |

on

391 |

Classic

392 |

none

393 |

off

394 |

UseLocalSettings

395 |

warning

396 |

warning

397 |

none

398 |

error

399 |

warning

400 |

warning

401 |

warning

402 |

warning

403 |

error

404 |

error

405 |

error

406 |

none

407 |

warning

408 |

none

409 |

warning

410 |

none

411 |

warning

412 |

warning

413 |

error

414 |

error

415 |

none

416 |

warning

417 |

warning

418 |

none

419 |

none

420 |

none

421 |

none

422 |

none

423 |

none

424 |

warning

425 |

none

426 |

warning

427 |

warning

428 |

warning

429 |

error

430 |

none

431 |

error

432 |

none

433 |

warning

434 |

warning

435 |

UseLocalSettings

436 |

on

437 |

off

438 |

none

439 |

error

440 |

none

441 |

none

442 |

warning

443 |

warning

444 |

none

445 |

warning

446 |

error

447 |

warning

448 |

warning

449 |

error

450 |

none

451 |

warning

452 |

none

453 |

warning

454 |

ErrorLevel1

455 |

WarnAndRepair

456 |

none

457 |

warning

458 |

warning

459 |

error

460 |

error

461 |

none

462 |

warning

463 |

warning

464 |

warning

465 |

warning

466 |

warning

467 |

warning

468 |

warning

469 |

warning

470 |

error

471 |

warning

472 |

warning

473 |

none

474 |

warning

475 |

warning

476 |

all

477 |

warning

478 |

on

479 |

warning

480 |

warning

481 |

off

482 |

483 |

none

484 |

off

485 |

warning

486 |

none

487 |
488 | 489 |

[]

490 |

491 |

[]

492 |

8

493 |

16

494 |

32

495 |

32

496 |

64

497 |

32

498 |

64

499 |

32

500 |

32

501 |

32

502 |

Char

503 |

None

504 |

Undefined

505 |

Unspecified

506 |

32

507 |

on

508 |

off

509 |

32-bit Generic

510 |

8

511 |

16

512 |

32

513 |

32

514 |

64

515 |

32

516 |

64

517 |

32

518 |

32

519 |

32

520 |

Char

521 |

None

522 |

on

523 |

off

524 |

Undefined

525 |

Unspecified

526 |

32

527 |

32

528 |

32

529 |

Specified

530 |

off

531 |

on

532 |

on

533 |

on

534 |

EmbeddedCoderHSP

535 |
536 | 537 |

[]

538 |

539 |

[]

540 |

IfOutOfDateOrStructuralChange

541 |

on

542 |

error

543 |

off

544 |

on

545 |

None

546 |

Multi

547 |

Infer from blocks in model

548 |

549 |

on

550 |

off

551 |

off

552 |

off

553 |
554 | 555 |

[]

556 |

557 |

[]

558 |

559 |

560 |

561 |

562 |

[]

563 |

564 |

565 |

566 |

567 |

568 |

569 |

on

570 |

on

571 |

on

572 |

off

573 |

on

574 |

off

575 |

off

576 |

off

577 |

on

578 |

50

579 |

on

580 |

on

581 |

on

582 |

65536

583 |

off

584 |

[]

585 |

NotSpecified

586 |

UseInterfaceOnly

587 |

off

588 |

None

589 |

590 |

generic

591 |

C

592 |

off

593 |

200

594 |

1024

595 |

off

596 |

597 |

598 |

mkl-dnn

599 |

on

600 |
601 | 602 | 603 | IncludeHyperlinkInReport 604 | GenerateTraceInfo 605 | GenerateTraceReport 606 | GenerateTraceReportSl 607 | GenerateTraceReportSf 608 | GenerateTraceReportEml 609 | PortableWordSizes 610 | GenerateWebview 611 | GenerateCodeMetricsReport 612 | GenerateCodeReplacementReport 613 | GenerateMissedCodeReplacementReport 614 | GenerateErtSFunction 615 | CreateSILPILBlock 616 | CodeExecutionProfiling 617 | CodeProfilingSaveOptions 618 | CodeProfilingInstrumentation 619 | CodeStackProfiling 620 | 621 |

622 |

grt.tlc

623 |

None

624 |

off

625 |

off

626 |

627 |

off

628 |

make_rtw

629 |

on

630 |

off

631 |

632 |

grt_default_tmf

633 |

634 |

off

635 |

on

636 |

off

637 |

[]

638 |

off

639 |

off

640 |

off

641 |

off

642 |

off

643 |

off

644 |

645 |

646 |

647 |

648 |

649 |

650 |

651 |

652 |

653 |

654 |

655 |

Automatically locate an installed toolchain

656 |

Faster Builds

657 |

[]

658 |

off

659 |

off

660 |

off

661 |

None

662 |

off

663 |

executionProfile

664 |

SummaryOnly

665 |

off

666 |

off

667 |

C

668 |

None

669 |

off

670 |

off

671 |

off

672 |

off

673 |

off

674 |

off

675 |

off

676 |

off

677 |

off

678 |

off

679 |

off

680 |

[]

681 |

682 |

Off

683 |

1024

684 |

685 |

-1

686 |

discrete

687 |

200

688 |

off

689 |

1024

690 |

on

691 |

on

692 |

on

693 |

off

694 |

3.5

695 |

696 |

697 |

0

698 |

none

699 |

on

700 |

19.05

701 |

unspecified

702 | 703 | 704 | 705 | IgnoreCustomStorageClasses 706 | IgnoreTestpoints 707 | InsertBlockDesc 708 | SFDataObjDesc 709 | SimulinkDataObjDesc 710 | DefineNamingRule 711 | SignalNamingRule 712 | ParamNamingRule 713 | InlinedPrmAccess 714 | CustomSymbolStr 715 | CustomSymbolStrGlobalVar 716 | CustomSymbolStrType 717 | CustomSymbolStrField 718 | CustomSymbolStrFcn 719 | CustomSymbolStrFcnArg 720 | CustomSymbolStrBlkIO 721 | CustomSymbolStrTmpVar 722 | CustomSymbolStrMacro 723 | ReqsInCode 724 | BlockCommentType 725 | InsertPolySpaceComments 726 | MATLABFcnDesc 727 | InternalIdentifier 728 | CustomSymbolStrModelFcn 729 | CustomSymbolStrUtil 730 | CustomSymbolStrEmxType 731 | CustomSymbolStrEmxFcn 732 | CustomUserTokenString 733 | 734 |

735 |

[]

736 |

737 |

off

738 |

on

739 |

Auto

740 |

on

741 |

off

742 |

31

743 |

off

744 |

off

745 |

off

746 |

off

747 |

off

748 |

off

749 |

off

750 |

1

751 |

8

752 |

$R$N$M

753 |

$N$R$M_T

754 |

$N$M

755 |

$R$N$M$F

756 |

$R$N

757 |

rt$I$N$M

758 |

rtb_$N$M

759 |

$N$M

760 |

$R$N$M

761 |

$N$C

762 |

emxArray_$M$N

763 |

emx$M$N

764 |

765 |

766 |

None

767 |

768 |

None

769 |

770 |

None

771 |

772 |

off

773 |

off

774 |

on

775 |

BlockPathComment

776 |

on

777 |

off

778 |

off

779 |

780 |

Shortened

781 |

Literals

782 |

off

783 |

off

784 |

[]

785 |

error

786 |
787 | 788 | 789 | GeneratePreprocessorConditionals 790 | IncludeMdlTerminateFcn 791 | PreserveStateflowLocalDataDimensions 792 | SuppressErrorStatus 793 | ERTCustomFileBanners 794 | GenerateSampleERTMain 795 | GenerateTestInterfaces 796 | ModelStepFunctionPrototypeControlCompliant 797 | CPPClassGenCompliant 798 | PortableWordSizes 799 | PurelyIntegerCode 800 | GenerateAllocFcn 801 | SupportComplex 802 | SupportAbsoluteTime 803 | SupportContinuousTime 804 | SupportNonInlinedSFcns 805 | ExistingSharedCode 806 | ParenthesesLevel 807 | ERTMultiwordTypeDef 808 | MultiwordTypeDef 809 | RemoveDisableFunc 810 | RemoveResetFunc 811 | 812 |

813 |

[]

814 |

ansi_tfl_table_tmw.mat

815 |

816 |

817 |

NOT IN USE

818 |

C89/C90 (ANSI)

819 |

None

820 |

Auto

821 |

System defined

822 |

2048

823 |

256

824 |

on

825 |

off

826 |

827 |

off

828 |

off

829 |

on

830 |

on

831 |

on

832 |

on

833 |

on

834 |

off

835 |

off

836 |

off

837 |

off

838 |

Auto

839 |

off

840 |

on

841 |

rt_

842 |

on

843 |

Nonreusable function

844 |

off

845 |

on

846 |

on

847 |

on

848 |

on

849 |

off

850 |

off

851 |

off

852 |

Nominal

853 |

Nominal

854 |

Simulink.SoftwareTarget.GRTCustomization

855 |

off

856 |

on

857 |

off

858 |

off

859 |

on

860 |

off

861 |

on

862 |

on

863 |

[]

864 |

[]

865 |

1,2,3,4,...

866 |

Size,Breakpoints,Table

867 |

Size,Breakpoints,Table

868 |

Column-major

869 |

error

870 |

$R$E

871 |

$R$E

872 |

$R_data

873 | 874 | None 875 | 876 |

off

877 |

off

878 |

off

879 |

off

880 |

1000000

881 |

0

882 |

ext_comm

883 |

884 |

Level1

885 |

off

886 |

off

887 |

off

888 |

off

889 |

off

890 |

Error

891 |
892 |
893 |
894 | 895 |

[]

896 |

Simulink Coverage Configuration Component

897 |

[]

898 |

Simulink Coverage

899 |

off

900 |

EntireSystem

901 |

on

902 |

off

903 |

/

904 |

covdata

905 |

906 |

dw

907 |

908 |

909 |

off

910 |

on

911 |

on

912 |

on

913 |

on

914 |

covCumulativeData

915 |

off

916 |

on

917 |

slcov_output/$ModelName$

918 |

$ModelName$_cvdata

919 |

on

920 |

off

921 |

922 |

off

923 |

on

924 |

1e-05

925 |

0.01

926 |

off

927 |

0

928 |

0

929 |

Masking

930 |
931 |
932 |

Configuration

933 |

Solver

934 |

[ 94, 25, 1186, 731 ]

935 |

936 |

937 |
938 | 939 | __MWOPC_PART_BEGIN__ /simulink/configSetInfo.xml 940 | 941 | 942 | Configuration 943 | 944 | 945 | __MWOPC_PART_BEGIN__ /simulink/graphicalInterface.xml 946 | 947 | 948 |

0

949 |

0

950 |

951 |

0

952 |

0

953 |

0

954 |

0

955 |

0

956 |

0

957 |

0

958 |

Unset

959 |

0

960 |

Simulink

961 |

0

962 |

0

963 |

1

964 |
965 | 966 | __MWOPC_PART_BEGIN__ /simulink/modelDictionary.xml 967 | 968 | 969 | 970 | 971 | 972 | 973 | __MWOPC_PART_BEGIN__ /simulink/ScheduleCore.xml 974 | 975 | 976 | 977 | HighNumberLast 978 | 979 | true 980 | 981 | 982 | 983 | 984 | false 985 | Default 986 | -2147483648 987 | 988 | 989 | true 990 | 991 | false 992 | 1 993 | true 994 | Cont 995 | 40 996 | 997 | Cont 998 | 255 999 | true 1000 | Continuous00 1001 | 1002 | 0.0 1003 | 1004 | 0 1005 | 1006 | 1007 | D1 1008 | -436207361 1009 | true 1010 | 1011 | .005 1012 | 1013 | 1 1014 | 1015 | 1016 | 1017 | 1018 | 1019 | 1020 | __MWOPC_PART_BEGIN__ /simulink/ScheduleEditor.xml 1021 | 1022 | 1023 | 1024 | 1025 | 0,0 1026 | 0,0,0,0 1027 | 1028 | Cont 1029 | base 1030 | 1031 | 0,0 1032 | 1033 | Cont 1034 | graph.Graph 1035 | 1036 | 1037 | 1038 | Default 1039 | graph.Graph 1040 | 1041 | 1042 | 1043 | 1044 | 40 1045 | 1046 | #000000 1047 | true 1048 | 0 1049 | Cont 1050 | 1051 | 1052 | #e60000 1053 | true 1054 | 0.005 1055 | D1 1056 | 1057 | Cont 1058 | base 1059 | 1060 | 1061 | Cont 1062 | 1063 | 1064 | 1065 | Default 1066 | 1067 | 1068 | 1069 | 1070 | __MWOPC_PART_BEGIN__ /simulink/systems/system_root.xml 1071 | 1072 | 1073 |

[-7, -7, 1288, 688]

1074 |

[0.000000, 0.000000, 0.000000, 0.000000]

1075 |

on

1076 |

off

1077 |

Deduce

1078 |

simulink-default.rpt

1079 |

44

1080 |

Simulink

1081 | 1082 |

[275, 297, 305, 323]

1083 |

-1

1084 |

on

1085 |

top

1086 |

on

1087 |
1088 | 1089 |

[1, 1]

1090 |

[500, 125, 530, 155]

1091 |

-2

1092 |

x_init

1093 |
1094 | 1095 |

[1, 1]

1096 |

[345, 125, 375, 155]

1097 |

-3

1098 |

v_init

1099 |
1100 | 1101 |

[1, 1]

1102 |

[140, 245, 200, 275]

1103 |

-4

1104 |

on

1105 |

LeaderAcceleration

1106 |
1107 | 1108 |

[3, 1]

1109 |

[395, 209, 400, 291]

1110 |

-5

1111 |

on

1112 |

top

1113 |

off

1114 |

3

1115 |

bar

1116 |
1117 | 1118 |

[2, 1]

1119 |

[245, 240, 250, 280]

1120 |

-6

1121 |

on

1122 |

top

1123 |

off

1124 |

2

1125 |

bar

1126 |
1127 | 1128 |

[2, 1]

1129 |

[245, 190, 250, 230]

1130 |

-7

1131 |

on

1132 |

top

1133 |

off

1134 |

2

1135 |

bar

1136 |
1137 | 1138 |

[2, 1]

1139 |

[220, 240, 225, 280]

1140 |

-8

1141 |

on

1142 |

top

1143 |

off

1144 |

2

1145 |

bar

1146 |
1147 | 1148 |

[1]

1149 |

[270, 69, 300, 101]

1150 |

-9

1151 |

C++SS(StrPVP('Location','[1, 53, 1601, 851]'),StrPVP('Open','off'),StrPVP('ZoomMode','xonly'),MxPVP('AxesTitles',54,'struct(''axes1'',''%<SignalLabel>'')'),StrPVP('SaveToWorkspace','on'),StrPVP('SaveName','a_all'),StrPVP('DataFormat','StructureWithTime'),StrPVP('LimitDataPoints','off'),StrPVP('BlockParamSampleTime','0'),StrPVP('Decimation','1'),StrPVP('BlockParamSampleInput','off'))

1152 |

1

1153 |

off

1154 |
1155 | 1156 |

[1]

1157 |

[745, 124, 775, 156]

1158 |

-10

1159 |

C++SS(StrPVP('Location','[6, 48, 1372, 727]'),StrPVP('Open','off'),StrPVP('ZoomMode','yonly'),MxPVP('AxesTitles',54,'struct(''axes1'',''%<SignalLabel>'')'),StrPVP('SaveToWorkspace','on'),StrPVP('SaveName','error_all'),StrPVP('DataFormat','StructureWithTime'),StrPVP('LimitDataPoints','off'),StrPVP('BlockParamSampleTime','0'),StrPVP('Decimation','1'),StrPVP('BlockParamSampleInput','off'))

1160 |

1

1161 |

off

1162 |
1163 | 1164 |

[1]

1165 |

[570, 324, 600, 356]

1166 |

-11

1167 |

C++SS(StrPVP('Location','[687, 610, 1011, 849]'),StrPVP('Open','off'),StrPVP('ZoomMode','xonly'),MxPVP('AxesTitles',54,'struct(''axes1'',''%<SignalLabel>'')'),StrPVP('SaveToWorkspace','on'),StrPVP('SaveName','aDiff_all'),StrPVP('DataFormat','StructureWithTime'),StrPVP('LimitDataPoints','off'),StrPVP('BlockParamSampleTime','0'),StrPVP('Decimation','1'),StrPVP('BlockParamSampleInput','off'))

1168 |

1

1169 |

off

1170 |
1171 | 1172 |

[2, 1]

1173 |

[470, 330, 490, 350]

1174 |

-12

1175 |

off

1176 |

|+-

1177 |
1178 | 1179 |

[1, 1]

1180 |

[320, 325, 350, 355]

1181 |

-13

1182 |

stepsize

1183 |

zeros(dim*nodenum,1)

1184 |
1185 | 1186 |

[1, 1]

1187 |

[305, 235, 365, 265]

1188 |

-14

1189 |

on

1190 |

Controller

1191 |
1192 | 1193 |

[1]

1194 |

[625, 59, 655, 91]

1195 |

-15

1196 |

C++SS(StrPVP('Location','[475, 264, 799, 579]'),StrPVP('Open','off'),StrPVP('ZoomMode','xonly'),MxPVP('AxesTitles',54,'struct(''axes1'',''%<SignalLabel>'')'),StrPVP('SaveToWorkspace','on'),StrPVP('SaveName','p_all_time'),StrPVP('DataFormat','StructureWithTime'),StrPVP('LimitDataPoints','off'),StrPVP('BlockParamSampleTime','0'),StrPVP('Decimation','1'),StrPVP('BlockParamSampleInput','off'))

1197 |

1

1198 |

off

1199 |
1200 | 1201 |

[1, 1]

1202 |

[645, 125, 705, 155]

1203 |

-16

1204 |

TrackingError

1205 |
1206 | 1207 |

[1]

1208 |

[480, 49, 510, 81]

1209 |

-17

1210 |

C++SS(StrPVP('Location','[475, 264, 799, 579]'),StrPVP('Open','off'),StrPVP('ZoomMode','xonly'),MxPVP('AxesTitles',54,'struct(''axes1'',''%<SignalLabel>'')'),StrPVP('SaveToWorkspace','on'),StrPVP('SaveName','v_all_time'),StrPVP('DataFormat','StructureWithTime'),StrPVP('LimitDataPoints','off'),StrPVP('BlockParamSampleTime','0'),StrPVP('Decimation','1'),StrPVP('BlockParamSampleInput','off'))

1211 |

1

1212 |

off

1213 |
1214 | 1215 |

1

1216 |

5#out:1

1217 |

4#in:1

1218 |
1219 | 1220 |

2

1221 |

15#out:1

1222 |

14#in:1

1223 |
1224 | 1225 |

3

1226 |

2#out:1

1227 |

[60, 0]

1228 | 1229 |

4

1230 |

5#in:1

1231 |
1232 | 1233 |

5

1234 |

[0, -65]

1235 |

3#in:1

1236 |
1237 | 1238 |

6

1239 |

[0, 50]

1240 | 1241 |

7

1242 |

[0, 35]

1243 |

15#in:1

1244 |
1245 | 1246 |

8

1247 |

[-315, 0; 0, 30]

1248 |

37#in:2

1249 |
1250 |
1251 |
1252 | 1253 |

9

1254 |

19#out:1

1255 |

[65, 0]

1256 | 1257 |

10

1258 |

2#in:1

1259 |
1260 | 1261 |

11

1262 |

[0, -75]

1263 |

22#in:1

1264 |
1265 | 1266 |

12

1267 |

[0, 30]

1268 | 1269 |

13

1270 |

[0, 80]

1271 |

15#in:2

1272 |
1273 | 1274 |

14

1275 |

[-180, 0]

1276 |

37#in:1

1277 |
1278 |
1279 |
1280 | 1281 |

15

1282 |

14#out:1

1283 |

31#in:1

1284 |
1285 | 1286 |

16

1287 |

30#out:1

1288 |

[0, -40]

1289 |

31#in:2

1290 |
1291 | 1292 |

17

1293 |

29#out:1

1294 |

[-15, 0]

1295 | 1296 |

18

1297 |

[0, -120]

1298 | 1299 |

19

1300 |

19#in:1

1301 |
1302 | 1303 |

20

1304 |

[0, -55]

1305 |

33#in:1

1306 |
1307 |
1308 | 1309 |

21

1310 |

[0, 80]

1311 | 1312 |

22

1313 |

[0, 45; 360, 0]

1314 |

35#in:2

1315 |
1316 | 1317 |

23

1318 |

32#in:1

1319 |
1320 |
1321 |
1322 | 1323 |

24

1324 |

32#out:1

1325 |

[90, 0]

1326 | 1327 |

25

1328 |

[0, -65]

1329 |

15#in:3

1330 |
1331 | 1332 |

26

1333 |

35#in:1

1334 |
1335 |
1336 | 1337 |

27

1338 |

35#out:1

1339 |

34#in:1

1340 |
1341 | 1342 |

28

1343 |

37#out:1

1344 |

38#in:1

1345 |
1346 | 1347 |

29

1348 |

31#out:1

1349 |

38#in:2

1350 |
1351 | 1352 |

30

1353 |

38#out:1

1354 |

29#in:1

1355 |
1356 | 1357 |

a

1358 |

[317, 125, 324, 139]

1359 |

[0, 0, 0, 0]

1360 |

-1

1361 |
1362 | 1363 |

p

1364 |

[550, 127, 557, 141]

1365 |

[0, 0, 0, 0]

1366 |

-2

1367 |
1368 | 1369 |

v

1370 |

[392, 125, 399, 139]

1371 |

[0, 0, 0, 0]

1372 |

-3

1373 |
1374 | 1375 |

p

1376 |

[417, 210, 424, 224]

1377 |

[0, 0, 0, 0]

1378 |

-4

1379 |
1380 | 1381 |

v

1382 |

[415, 235, 422, 249]

1383 |

[0, 0, 0, 0]

1384 |

-5

1385 |
1386 | 1387 |

a

1388 |

[415, 260, 422, 274]

1389 |

[0, 0, 0, 0]

1390 |

-6

1391 |
1392 |
1393 | 1394 | __MWOPC_PART_BEGIN__ /simulink/windowsInfo.xml 1395 | 1396 | 1397 | 1398 | 1399 |

1

1400 |

[-7.0, -7.0, 1295.0, 695.0]

1401 | 1402 |

0

1403 |

Left

1404 |

50

1405 |

50

1406 |

8

1407 |

Unset

1408 |
1409 | 1410 |

1

1411 |
1412 | 1413 |

1

1414 |

1

1415 |

SimulinkTopLevel

1416 |

0

1417 |

[1864.0, 698.0]

1418 |

1.0

1419 |

[-216.02686703096606, 2.8533697632058761]

1420 |

[-216.02686703096606, 2.8533697632058761, 1242.6666666666667, 465.33333333333331]

1421 |
1422 | 1423 | 1424 |

Simulink:Editor:ReferencedFiles

1425 |

Referenced Files

1426 |

0

1427 |

1428 |

{"filterShowRefModels":"true","filterShowRefSubs":"true","filterShowOnlyDirtyFiles":"false"} 1429 |

1430 |

0

1431 |

Left

1432 |

426

1433 |

320

1434 |

Unset

1435 |
1436 | 1437 |

GLUE2:PropertyInspector

1438 |

Property Inspector

1439 |

0

1440 |

1441 |

1442 |

0

1443 |

Right

1444 |

426

1445 |

320

1446 |

Unset

1447 |
1448 |
1449 |

AAAA/wAAAAD9AAAAAwAAAAAAAAC9AAAB+PwCAAAABPsAAAAWAEQAbwBjAGsAVwBpAGQAZwBlAHQAMwEAAAAxAAAB+AAAAAAAAAAA+wAAABYARABvAGMAawBXAGkAZABnAGUAdAA0AAAAAAD/////AAAAAAAAAAD7AAAAUgBHAEwAVQBFADIAIAB0AHIAZQBlACAAYwBvAG0AcABvAG4AZQBuAHQALwBHAEwAVQBFADIAIAB0AHIAZQBlACAAYwBvAG0AcABvAG4AZQBuAHQAAAAAAP////8AAACTAP////sAAABgAFMAaQBtAHUAbABpAG4AawA6AEUAZABpAHQAbwByADoAUgBlAGYAZQByAGUAbgBjAGUAZABGAGkAbABlAHMALwBSAGUAZgBlAHIAZQBuAGMAZQBkACAARgBpAGwAZQBzAAAAAAD/////AAAAxwD///8AAAABAAAAAAAAAAD8AgAAAAH7AAAAVABHAEwAVQBFADIAOgBQAHIAbwBwAGUAcgB0AHkASQBuAHMAcABlAGMAdABvAHIALwBQAHIAbwBwAGUAcgB0AHkAIABJAG4AcwBwAGUAYwB0AG8AcgAAAAAA/////wAAAoAA////AAAAAwAAAAAAAAAA/AEAAAAB+/////8AAAAAAP////8AAAIDAP///wAAB4AAAAMIAAAAAQAAAAIAAAABAAAAAvwAAAAA

1450 | 1451 |

77c1c20f-41ef-4e9b-9b4f-f821ef63b305

1452 |
1453 |

1454 |

1455 |
1456 | 1457 | __MWOPC_PACKAGE_END__ 1458 | -------------------------------------------------------------------------------- /affineManeuver.mdl.r2010a: -------------------------------------------------------------------------------- 1 | Model { 2 | Name "affineManeuver" 3 | Version 7.5 4 | MdlSubVersion 0 5 | GraphicalInterface { 6 | NumRootInports 0 7 | NumRootOutports 0 8 | ParameterArgumentNames "" 9 | ComputedModelVersion "1.117" 10 | NumModelReferences 0 11 | NumTestPointedSignals 0 12 | } 13 | SavedCharacterEncoding "windows-1252" 14 | SaveDefaultBlockParams on 15 | ScopeRefreshTime 0.035000 16 | OverrideScopeRefreshTime on 17 | DisableAllScopes off 18 | DataTypeOverride "UseLocalSettings" 19 | MinMaxOverflowLogging "UseLocalSettings" 20 | MinMaxOverflowArchiveMode "Overwrite" 21 | MaxMDLFileLineLength 120 22 | Created "Thu Jul 11 21:55:49 2013" 23 | Creator "Shiyu Zhao" 24 | UpdateHistory "UpdateHistoryNever" 25 | ModifiedByFormat "%" 26 | LastModifiedBy "uos" 27 | ModifiedDateFormat "%" 28 | LastModifiedDate "Thu Jan 18 13:39:47 2018" 29 | RTWModifiedTimeStamp 438183584 30 | ModelVersionFormat "1.%" 31 | ConfigurationManager "None" 32 | SampleTimeColors off 33 | SampleTimeAnnotations off 34 | LibraryLinkDisplay "none" 35 | WideLines off 36 | ShowLineDimensions off 37 | ShowPortDataTypes off 38 | ShowLoopsOnError on 39 | IgnoreBidirectionalLines off 40 | ShowStorageClass off 41 | ShowTestPointIcons on 42 | ShowSignalResolutionIcons on 43 | ShowViewerIcons on 44 | SortedOrder off 45 | ExecutionContextIcon off 46 | ShowLinearizationAnnotations on 47 | BlockNameDataTip off 48 | BlockParametersDataTip off 49 | BlockDescriptionStringDataTip off 50 | ToolBar on 51 | StatusBar on 52 | BrowserShowLibraryLinks off 53 | BrowserLookUnderMasks off 54 | SimulationMode "normal" 55 | LinearizationMsg "none" 56 | Profile off 57 | ParamWorkspaceSource "MATLABWorkspace" 58 | AccelSystemTargetFile "accel.tlc" 59 | AccelTemplateMakefile "accel_default_tmf" 60 | AccelMakeCommand "make_rtw" 61 | TryForcingSFcnDF off 62 | RecordCoverage off 63 | CovPath "/" 64 | CovSaveName "covdata" 65 | CovMetricSettings "dw" 66 | CovNameIncrementing off 67 | CovHtmlReporting on 68 | CovForceBlockReductionOff on 69 | covSaveCumulativeToWorkspaceVar on 70 | CovSaveSingleToWorkspaceVar on 71 | CovCumulativeVarName "covCumulativeData" 72 | CovCumulativeReport off 73 | CovReportOnPause on 74 | CovModelRefEnable "Off" 75 | CovExternalEMLEnable off 76 | ExtModeBatchMode off 77 | ExtModeEnableFloating on 78 | ExtModeTrigType "manual" 79 | ExtModeTrigMode "normal" 80 | ExtModeTrigPort "1" 81 | ExtModeTrigElement "any" 82 | ExtModeTrigDuration 1000 83 | ExtModeTrigDurationFloating "auto" 84 | ExtModeTrigHoldOff 0 85 | ExtModeTrigDelay 0 86 | ExtModeTrigDirection "rising" 87 | ExtModeTrigLevel 0 88 | ExtModeArchiveMode "off" 89 | ExtModeAutoIncOneShot off 90 | ExtModeIncDirWhenArm off 91 | ExtModeAddSuffixToVar off 92 | ExtModeWriteAllDataToWs off 93 | ExtModeArmWhenConnect on 94 | ExtModeSkipDownloadWhenConnect off 95 | ExtModeLogAll on 96 | ExtModeAutoUpdateStatusClock on 97 | BufferReuse on 98 | ShowModelReferenceBlockVersion off 99 | ShowModelReferenceBlockIO off 100 | Array { 101 | Type "Handle" 102 | Dimension 1 103 | Simulink.ConfigSet { 104 | $ObjectID 1 105 | Version "1.10.0" 106 | Array { 107 | Type "Handle" 108 | Dimension 8 109 | Simulink.SolverCC { 110 | $ObjectID 2 111 | Version "1.10.0" 112 | StartTime "0.0" 113 | StopTime "10.0" 114 | AbsTol "auto" 115 | FixedStep "0.01" 116 | InitialStep "auto" 117 | MaxNumMinSteps "-1" 118 | MaxOrder 5 119 | ZcThreshold "auto" 120 | ConsecutiveZCsStepRelTol "10*128*eps" 121 | MaxConsecutiveZCs "1000" 122 | ExtrapolationOrder 4 123 | NumberNewtonIterations 1 124 | MaxStep "0.02" 125 | MinStep "auto" 126 | MaxConsecutiveMinStep "1" 127 | RelTol "1e-3" 128 | SolverMode "Auto" 129 | Solver "ode4" 130 | SolverName "ode4" 131 | SolverJacobianMethodControl "auto" 132 | ShapePreserveControl "DisableAll" 133 | ZeroCrossControl "UseLocalSettings" 134 | ZeroCrossAlgorithm "Nonadaptive" 135 | AlgebraicLoopSolver "TrustRegion" 136 | SolverResetMethod "Fast" 137 | PositivePriorityOrder off 138 | AutoInsertRateTranBlk off 139 | SampleTimeConstraint "Unconstrained" 140 | InsertRTBMode "Whenever possible" 141 | } 142 | Simulink.DataIOCC { 143 | $ObjectID 3 144 | Version "1.10.0" 145 | Decimation "1" 146 | ExternalInput "[t, u]" 147 | FinalStateName "xFinal" 148 | InitialState "xInitial" 149 | LimitDataPoints on 150 | MaxDataPoints "1000" 151 | LoadExternalInput off 152 | LoadInitialState off 153 | SaveFinalState off 154 | SaveCompleteFinalSimState off 155 | SaveFormat "Array" 156 | SaveOutput on 157 | SaveState off 158 | SignalLogging on 159 | DSMLogging on 160 | InspectSignalLogs off 161 | SaveTime on 162 | ReturnWorkspaceOutputs off 163 | StateSaveName "xout" 164 | TimeSaveName "tout" 165 | OutputSaveName "yout" 166 | SignalLoggingName "logsout" 167 | DSMLoggingName "dsmout" 168 | OutputOption "RefineOutputTimes" 169 | OutputTimes "[]" 170 | ReturnWorkspaceOutputsName "out" 171 | Refine "1" 172 | } 173 | Simulink.OptimizationCC { 174 | $ObjectID 4 175 | Version "1.10.0" 176 | Array { 177 | Type "Cell" 178 | Dimension 7 179 | Cell "BooleansAsBitfields" 180 | Cell "PassReuseOutputArgsAs" 181 | Cell "PassReuseOutputArgsThreshold" 182 | Cell "ZeroExternalMemoryAtStartup" 183 | Cell "ZeroInternalMemoryAtStartup" 184 | Cell "OptimizeModelRefInitCode" 185 | Cell "NoFixptDivByZeroProtection" 186 | PropName "DisabledProps" 187 | } 188 | BlockReduction on 189 | BooleanDataType on 190 | ConditionallyExecuteInputs on 191 | InlineParams off 192 | UseIntDivNetSlope off 193 | InlineInvariantSignals off 194 | OptimizeBlockIOStorage on 195 | BufferReuse on 196 | EnhancedBackFolding off 197 | StrengthReduction off 198 | EnforceIntegerDowncast on 199 | ExpressionFolding on 200 | BooleansAsBitfields off 201 | BitfieldContainerType "uint_T" 202 | EnableMemcpy on 203 | MemcpyThreshold 64 204 | PassReuseOutputArgsAs "Structure reference" 205 | ExpressionDepthLimit 2147483647 206 | FoldNonRolledExpr on 207 | LocalBlockOutputs on 208 | RollThreshold 5 209 | SystemCodeInlineAuto off 210 | StateBitsets off 211 | DataBitsets off 212 | UseTempVars off 213 | ZeroExternalMemoryAtStartup on 214 | ZeroInternalMemoryAtStartup on 215 | InitFltsAndDblsToZero off 216 | NoFixptDivByZeroProtection off 217 | EfficientFloat2IntCast off 218 | EfficientMapNaN2IntZero on 219 | OptimizeModelRefInitCode off 220 | LifeSpan "inf" 221 | MaxStackSize "Inherit from target" 222 | BufferReusableBoundary on 223 | SimCompilerOptimization "Off" 224 | AccelVerboseBuild off 225 | } 226 | Simulink.DebuggingCC { 227 | $ObjectID 5 228 | Version "1.10.0" 229 | RTPrefix "error" 230 | ConsistencyChecking "none" 231 | ArrayBoundsChecking "none" 232 | SignalInfNanChecking "none" 233 | SignalRangeChecking "none" 234 | ReadBeforeWriteMsg "UseLocalSettings" 235 | WriteAfterWriteMsg "UseLocalSettings" 236 | WriteAfterReadMsg "UseLocalSettings" 237 | AlgebraicLoopMsg "warning" 238 | ArtificialAlgebraicLoopMsg "warning" 239 | SaveWithDisabledLinksMsg "warning" 240 | SaveWithParameterizedLinksMsg "warning" 241 | CheckSSInitialOutputMsg on 242 | UnderspecifiedInitializationDetection "Classic" 243 | MergeDetectMultiDrivingBlocksExec "none" 244 | CheckExecutionContextPreStartOutputMsg off 245 | CheckExecutionContextRuntimeOutputMsg off 246 | SignalResolutionControl "UseLocalSettings" 247 | BlockPriorityViolationMsg "warning" 248 | MinStepSizeMsg "warning" 249 | TimeAdjustmentMsg "none" 250 | MaxConsecutiveZCsMsg "error" 251 | SolverPrmCheckMsg "warning" 252 | InheritedTsInSrcMsg "warning" 253 | DiscreteInheritContinuousMsg "warning" 254 | MultiTaskDSMMsg "error" 255 | MultiTaskCondExecSysMsg "error" 256 | MultiTaskRateTransMsg "error" 257 | SingleTaskRateTransMsg "none" 258 | TasksWithSamePriorityMsg "warning" 259 | SigSpecEnsureSampleTimeMsg "warning" 260 | CheckMatrixSingularityMsg "none" 261 | IntegerOverflowMsg "warning" 262 | Int32ToFloatConvMsg "warning" 263 | ParameterDowncastMsg "error" 264 | ParameterOverflowMsg "error" 265 | ParameterUnderflowMsg "none" 266 | ParameterPrecisionLossMsg "warning" 267 | ParameterTunabilityLossMsg "warning" 268 | FixptConstUnderflowMsg "none" 269 | FixptConstOverflowMsg "none" 270 | FixptConstPrecisionLossMsg "none" 271 | UnderSpecifiedDataTypeMsg "none" 272 | UnnecessaryDatatypeConvMsg "none" 273 | VectorMatrixConversionMsg "none" 274 | InvalidFcnCallConnMsg "error" 275 | FcnCallInpInsideContextMsg "Use local settings" 276 | SignalLabelMismatchMsg "none" 277 | UnconnectedInputMsg "warning" 278 | UnconnectedOutputMsg "warning" 279 | UnconnectedLineMsg "warning" 280 | SFcnCompatibilityMsg "none" 281 | UniqueDataStoreMsg "none" 282 | BusObjectLabelMismatch "warning" 283 | RootOutportRequireBusObject "warning" 284 | AssertControl "UseLocalSettings" 285 | EnableOverflowDetection off 286 | ModelReferenceIOMsg "none" 287 | ModelReferenceVersionMismatchMessage "none" 288 | ModelReferenceIOMismatchMessage "none" 289 | ModelReferenceCSMismatchMessage "none" 290 | UnknownTsInhSupMsg "warning" 291 | ModelReferenceDataLoggingMessage "warning" 292 | ModelReferenceSymbolNameMessage "warning" 293 | ModelReferenceExtraNoncontSigs "error" 294 | StateNameClashWarn "warning" 295 | SimStateInterfaceChecksumMismatchMsg "warning" 296 | StrictBusMsg "ErrorLevel1" 297 | BusNameAdapt "WarnAndRepair" 298 | NonBusSignalsTreatedAsBus "none" 299 | LoggingUnavailableSignals "error" 300 | BlockIODiagnostic "none" 301 | } 302 | Simulink.HardwareCC { 303 | $ObjectID 6 304 | Version "1.10.0" 305 | ProdBitPerChar 8 306 | ProdBitPerShort 16 307 | ProdBitPerInt 32 308 | ProdBitPerLong 32 309 | ProdIntDivRoundTo "Undefined" 310 | ProdEndianess "Unspecified" 311 | ProdWordSize 32 312 | ProdShiftRightIntArith on 313 | ProdHWDeviceType "32-bit Generic" 314 | TargetBitPerChar 8 315 | TargetBitPerShort 16 316 | TargetBitPerInt 32 317 | TargetBitPerLong 32 318 | TargetShiftRightIntArith on 319 | TargetIntDivRoundTo "Undefined" 320 | TargetEndianess "Unspecified" 321 | TargetWordSize 32 322 | TargetTypeEmulationWarnSuppressLevel 0 323 | TargetPreprocMaxBitsSint 32 324 | TargetPreprocMaxBitsUint 32 325 | TargetHWDeviceType "Specified" 326 | TargetUnknown off 327 | ProdEqTarget on 328 | } 329 | Simulink.ModelReferenceCC { 330 | $ObjectID 7 331 | Version "1.10.0" 332 | UpdateModelReferenceTargets "IfOutOfDateOrStructuralChange" 333 | CheckModelReferenceTargetMessage "error" 334 | EnableParallelModelReferenceBuilds off 335 | ParallelModelReferenceMATLABWorkerInit "None" 336 | ModelReferenceNumInstancesAllowed "Multi" 337 | PropagateVarSize "Infer from blocks in model" 338 | ModelReferencePassRootInputsByReference on 339 | ModelReferenceMinAlgLoopOccurrences off 340 | PropagateSignalLabelsOutOfModel off 341 | SupportModelReferenceSimTargetCustomCode off 342 | } 343 | Simulink.SFSimCC { 344 | $ObjectID 8 345 | Version "1.10.0" 346 | SFSimEnableDebug on 347 | SFSimOverflowDetection on 348 | SFSimEcho on 349 | SimBlas on 350 | SimCtrlC on 351 | SimExtrinsic on 352 | SimIntegrity on 353 | SimUseLocalCustomCode off 354 | SimBuildMode "sf_incremental_build" 355 | } 356 | Simulink.RTWCC { 357 | $BackupClass "Simulink.RTWCC" 358 | $ObjectID 9 359 | Version "1.10.0" 360 | Array { 361 | Type "Cell" 362 | Dimension 6 363 | Cell "IncludeHyperlinkInReport" 364 | Cell "GenerateTraceInfo" 365 | Cell "GenerateTraceReport" 366 | Cell "GenerateTraceReportSl" 367 | Cell "GenerateTraceReportSf" 368 | Cell "GenerateTraceReportEml" 369 | PropName "DisabledProps" 370 | } 371 | SystemTargetFile "grt.tlc" 372 | GenCodeOnly off 373 | MakeCommand "make_rtw" 374 | GenerateMakefile on 375 | TemplateMakefile "grt_default_tmf" 376 | GenerateReport off 377 | SaveLog off 378 | RTWVerbose on 379 | RetainRTWFile off 380 | ProfileTLC off 381 | TLCDebug off 382 | TLCCoverage off 383 | TLCAssert off 384 | ProcessScriptMode "Default" 385 | ConfigurationMode "Optimized" 386 | ConfigAtBuild off 387 | RTWUseLocalCustomCode off 388 | RTWUseSimCustomCode off 389 | IncludeHyperlinkInReport off 390 | LaunchReport off 391 | TargetLang "C" 392 | IncludeBusHierarchyInRTWFileBlockHierarchyMap off 393 | IncludeERTFirstTime off 394 | GenerateTraceInfo off 395 | GenerateTraceReport off 396 | GenerateTraceReportSl off 397 | GenerateTraceReportSf off 398 | GenerateTraceReportEml off 399 | GenerateCodeInfo off 400 | RTWCompilerOptimization "Off" 401 | CheckMdlBeforeBuild "Off" 402 | CustomRebuildMode "OnUpdate" 403 | Array { 404 | Type "Handle" 405 | Dimension 2 406 | Simulink.CodeAppCC { 407 | $ObjectID 10 408 | Version "1.10.0" 409 | Array { 410 | Type "Cell" 411 | Dimension 19 412 | Cell "IgnoreCustomStorageClasses" 413 | Cell "IgnoreTestpoints" 414 | Cell "InsertBlockDesc" 415 | Cell "SFDataObjDesc" 416 | Cell "SimulinkDataObjDesc" 417 | Cell "DefineNamingRule" 418 | Cell "SignalNamingRule" 419 | Cell "ParamNamingRule" 420 | Cell "InlinedPrmAccess" 421 | Cell "CustomSymbolStr" 422 | Cell "CustomSymbolStrGlobalVar" 423 | Cell "CustomSymbolStrType" 424 | Cell "CustomSymbolStrField" 425 | Cell "CustomSymbolStrFcn" 426 | Cell "CustomSymbolStrFcnArg" 427 | Cell "CustomSymbolStrBlkIO" 428 | Cell "CustomSymbolStrTmpVar" 429 | Cell "CustomSymbolStrMacro" 430 | Cell "ReqsInCode" 431 | PropName "DisabledProps" 432 | } 433 | ForceParamTrailComments off 434 | GenerateComments on 435 | IgnoreCustomStorageClasses on 436 | IgnoreTestpoints off 437 | IncHierarchyInIds off 438 | MaxIdLength 31 439 | PreserveName off 440 | PreserveNameWithParent off 441 | ShowEliminatedStatement off 442 | IncAutoGenComments off 443 | SimulinkDataObjDesc off 444 | SFDataObjDesc off 445 | IncDataTypeInIds off 446 | MangleLength 1 447 | CustomSymbolStrGlobalVar "$R$N$M" 448 | CustomSymbolStrType "$N$R$M_T" 449 | CustomSymbolStrField "$N$M" 450 | CustomSymbolStrFcn "$R$N$M$F" 451 | CustomSymbolStrFcnArg "rt$I$N$M" 452 | CustomSymbolStrBlkIO "rtb_$N$M" 453 | CustomSymbolStrTmpVar "$N$M" 454 | CustomSymbolStrMacro "$R$N$M" 455 | DefineNamingRule "None" 456 | ParamNamingRule "None" 457 | SignalNamingRule "None" 458 | InsertBlockDesc off 459 | SimulinkBlockComments on 460 | EnableCustomComments off 461 | InlinedPrmAccess "Literals" 462 | ReqsInCode off 463 | UseSimReservedNames off 464 | } 465 | Simulink.GRTTargetCC { 466 | $BackupClass "Simulink.TargetCC" 467 | $ObjectID 11 468 | Version "1.10.0" 469 | Array { 470 | Type "Cell" 471 | Dimension 16 472 | Cell "GeneratePreprocessorConditionals" 473 | Cell "IncludeMdlTerminateFcn" 474 | Cell "CombineOutputUpdateFcns" 475 | Cell "SuppressErrorStatus" 476 | Cell "ERTCustomFileBanners" 477 | Cell "GenerateSampleERTMain" 478 | Cell "GenerateTestInterfaces" 479 | Cell "ModelStepFunctionPrototypeControlCompliant" 480 | Cell "CPPClassGenCompliant" 481 | Cell "PortableWordSizes" 482 | Cell "PurelyIntegerCode" 483 | Cell "GenerateAllocFcn" 484 | Cell "SupportComplex" 485 | Cell "SupportAbsoluteTime" 486 | Cell "SupportContinuousTime" 487 | Cell "SupportNonInlinedSFcns" 488 | PropName "DisabledProps" 489 | } 490 | TargetFcnLib "ansi_tfl_table_tmw.mat" 491 | TargetLibSuffix "" 492 | TargetPreCompLibLocation "" 493 | TargetFunctionLibrary "ANSI_C" 494 | UtilityFuncGeneration "Auto" 495 | ERTMultiwordTypeDef "System defined" 496 | ERTCodeCoverageTool "None" 497 | ERTMultiwordLength 256 498 | MultiwordLength 2048 499 | GenerateFullHeader on 500 | GenerateSampleERTMain off 501 | GenerateTestInterfaces off 502 | IsPILTarget off 503 | ModelReferenceCompliant on 504 | ParMdlRefBuildCompliant on 505 | CompOptLevelCompliant on 506 | IncludeMdlTerminateFcn on 507 | GeneratePreprocessorConditionals "Disable all" 508 | CombineOutputUpdateFcns off 509 | SuppressErrorStatus off 510 | ERTFirstTimeCompliant off 511 | IncludeFileDelimiter "Auto" 512 | ERTCustomFileBanners off 513 | SupportAbsoluteTime on 514 | LogVarNameModifier "rt_" 515 | MatFileLogging on 516 | MultiInstanceERTCode off 517 | SupportNonFinite on 518 | SupportComplex on 519 | PurelyIntegerCode off 520 | SupportContinuousTime on 521 | SupportNonInlinedSFcns on 522 | SupportVariableSizeSignals off 523 | EnableShiftOperators on 524 | ParenthesesLevel "Nominal" 525 | PortableWordSizes off 526 | ModelStepFunctionPrototypeControlCompliant off 527 | CPPClassGenCompliant off 528 | AutosarCompliant off 529 | UseMalloc off 530 | ExtMode off 531 | ExtModeStaticAlloc off 532 | ExtModeTesting off 533 | ExtModeStaticAllocSize 1000000 534 | ExtModeTransport 0 535 | ExtModeMexFile "ext_comm" 536 | ExtModeIntrfLevel "Level1" 537 | RTWCAPISignals off 538 | RTWCAPIParams off 539 | RTWCAPIStates off 540 | GenerateASAP2 off 541 | } 542 | PropName "Components" 543 | } 544 | } 545 | PropName "Components" 546 | } 547 | Name "Configuration" 548 | CurrentDlgPage "Solver" 549 | ConfigPrmDlgPosition " [ 94, 25, 1186, 731 ] " 550 | } 551 | PropName "ConfigurationSets" 552 | } 553 | Simulink.ConfigSet { 554 | $PropName "ActiveConfigurationSet" 555 | $ObjectID 1 556 | } 557 | BlockDefaults { 558 | ForegroundColor "black" 559 | BackgroundColor "white" 560 | DropShadow off 561 | NamePlacement "normal" 562 | FontName "Helvetica" 563 | FontSize 10 564 | FontWeight "normal" 565 | FontAngle "normal" 566 | ShowName on 567 | BlockRotation 0 568 | BlockMirror off 569 | } 570 | AnnotationDefaults { 571 | HorizontalAlignment "center" 572 | VerticalAlignment "middle" 573 | ForegroundColor "black" 574 | BackgroundColor "white" 575 | DropShadow off 576 | FontName "Helvetica" 577 | FontSize 10 578 | FontWeight "normal" 579 | FontAngle "normal" 580 | UseDisplayTextAsClickCallback off 581 | } 582 | LineDefaults { 583 | FontName "Helvetica" 584 | FontSize 9 585 | FontWeight "normal" 586 | FontAngle "normal" 587 | } 588 | BlockParameterDefaults { 589 | Block { 590 | BlockType Clock 591 | DisplayTime off 592 | } 593 | Block { 594 | BlockType Integrator 595 | ExternalReset "none" 596 | InitialConditionSource "internal" 597 | InitialCondition "0" 598 | LimitOutput off 599 | UpperSaturationLimit "inf" 600 | LowerSaturationLimit "-inf" 601 | ShowSaturationPort off 602 | ShowStatePort off 603 | AbsoluteTolerance "auto" 604 | IgnoreLimit off 605 | ZeroCross on 606 | ContinuousStateAttributes "''" 607 | } 608 | Block { 609 | BlockType MATLABFcn 610 | MATLABFcn "sin" 611 | OutputDimensions "-1" 612 | OutputSignalType "auto" 613 | Output1D on 614 | SampleTime "-1" 615 | } 616 | Block { 617 | BlockType Mux 618 | Inputs "4" 619 | DisplayOption "none" 620 | UseBusObject off 621 | BusObject "BusObject" 622 | NonVirtualBus off 623 | } 624 | Block { 625 | BlockType Scope 626 | ModelBased off 627 | TickLabels "OneTimeTick" 628 | ZoomMode "on" 629 | Grid "on" 630 | TimeRange "auto" 631 | YMin "-5" 632 | YMax "5" 633 | SaveToWorkspace off 634 | SaveName "ScopeData" 635 | LimitDataPoints on 636 | MaxDataPoints "5000" 637 | Decimation "1" 638 | SampleInput off 639 | SampleTime "-1" 640 | } 641 | Block { 642 | BlockType Sum 643 | IconShape "rectangular" 644 | Inputs "++" 645 | CollapseMode "All dimensions" 646 | CollapseDim "1" 647 | InputSameDT on 648 | AccumDataTypeStr "Inherit: Inherit via internal rule" 649 | OutMin "[]" 650 | OutMax "[]" 651 | OutDataTypeMode "Same as first input" 652 | OutDataType "fixdt(1,16,0)" 653 | OutScaling "[]" 654 | OutDataTypeStr "Inherit: Same as first input" 655 | LockScale off 656 | RndMeth "Floor" 657 | SaturateOnIntegerOverflow on 658 | SampleTime "-1" 659 | } 660 | Block { 661 | BlockType TransportDelay 662 | DelayTime "1" 663 | InitialOutput "0" 664 | BufferSize "1024" 665 | FixedBuffer off 666 | TransDelayFeedthrough off 667 | PadeOrder "0" 668 | } 669 | } 670 | System { 671 | Name "affineManeuver" 672 | Location [2, 83, 1902, 1027] 673 | Open on 674 | ModelBrowserVisibility off 675 | ModelBrowserWidth 200 676 | ScreenColor "white" 677 | PaperOrientation "landscape" 678 | PaperPositionMode "auto" 679 | PaperType "usletter" 680 | PaperUnits "inches" 681 | TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000] 682 | TiledPageScale 1 683 | ShowPageBoundaries off 684 | ZoomFactor "183" 685 | ReportName "simulink-default.rpt" 686 | SIDHighWatermark 38 687 | Block { 688 | BlockType Clock 689 | Name "Clock" 690 | SID 30 691 | Position [275, 297, 305, 323] 692 | BlockMirror on 693 | NamePlacement "alternate" 694 | DisplayTime on 695 | Decimation "10" 696 | } 697 | Block { 698 | BlockType Integrator 699 | Name "Integrator" 700 | SID 2 701 | Ports [1, 1] 702 | Position [500, 125, 530, 155] 703 | InitialCondition "x_init" 704 | } 705 | Block { 706 | BlockType Integrator 707 | Name "Integrator2" 708 | SID 19 709 | Ports [1, 1] 710 | Position [345, 125, 375, 155] 711 | InitialCondition "v_init" 712 | } 713 | Block { 714 | BlockType MATLABFcn 715 | Name "Leader acceleration" 716 | SID 29 717 | Ports [1, 1] 718 | Position [140, 245, 200, 275] 719 | BlockMirror on 720 | MATLABFcn "fcn_LeaderAcceleration" 721 | } 722 | Block { 723 | BlockType Mux 724 | Name "Mux1" 725 | SID 15 726 | Ports [3, 1] 727 | Position [395, 209, 400, 291] 728 | BlockMirror on 729 | NamePlacement "alternate" 730 | ShowName off 731 | Inputs "3" 732 | DisplayOption "bar" 733 | } 734 | Block { 735 | BlockType Mux 736 | Name "Mux2" 737 | SID 31 738 | Ports [2, 1] 739 | Position [245, 240, 250, 280] 740 | BlockMirror on 741 | NamePlacement "alternate" 742 | ShowName off 743 | Inputs "2" 744 | DisplayOption "bar" 745 | } 746 | Block { 747 | BlockType Mux 748 | Name "Mux3" 749 | SID 37 750 | Ports [2, 1] 751 | Position [245, 190, 250, 230] 752 | BlockMirror on 753 | NamePlacement "alternate" 754 | ShowName off 755 | Inputs "2" 756 | DisplayOption "bar" 757 | } 758 | Block { 759 | BlockType Mux 760 | Name "Mux4" 761 | SID 38 762 | Ports [2, 1] 763 | Position [220, 240, 225, 280] 764 | BlockMirror on 765 | NamePlacement "alternate" 766 | ShowName off 767 | Inputs "2" 768 | DisplayOption "bar" 769 | } 770 | Block { 771 | BlockType Scope 772 | Name "Scope" 773 | SID 33 774 | Ports [1] 775 | Position [270, 69, 300, 101] 776 | Floating off 777 | Location [1, 53, 1601, 851] 778 | Open off 779 | NumInputPorts "1" 780 | ZoomMode "xonly" 781 | List { 782 | ListType AxesTitles 783 | axes1 "%" 784 | } 785 | SaveToWorkspace on 786 | SaveName "a_all" 787 | DataFormat "StructureWithTime" 788 | LimitDataPoints off 789 | SampleTime "0" 790 | } 791 | Block { 792 | BlockType Scope 793 | Name "Scope1" 794 | SID 4 795 | Ports [1] 796 | Position [745, 124, 775, 156] 797 | Floating off 798 | Location [6, 48, 1372, 727] 799 | Open off 800 | NumInputPorts "1" 801 | ZoomMode "yonly" 802 | List { 803 | ListType AxesTitles 804 | axes1 "%" 805 | } 806 | SaveToWorkspace on 807 | SaveName "error_all" 808 | DataFormat "StructureWithTime" 809 | LimitDataPoints off 810 | SampleTime "0" 811 | } 812 | Block { 813 | BlockType Scope 814 | Name "Scope2" 815 | SID 34 816 | Ports [1] 817 | Position [570, 324, 600, 356] 818 | Floating off 819 | Location [687, 610, 1011, 849] 820 | Open off 821 | NumInputPorts "1" 822 | ZoomMode "xonly" 823 | List { 824 | ListType AxesTitles 825 | axes1 "%" 826 | } 827 | SaveToWorkspace on 828 | SaveName "aDiff_all" 829 | DataFormat "StructureWithTime" 830 | LimitDataPoints off 831 | SampleTime "0" 832 | } 833 | Block { 834 | BlockType Sum 835 | Name "Sum" 836 | SID 35 837 | Ports [2, 1] 838 | Position [470, 330, 490, 350] 839 | ShowName off 840 | IconShape "round" 841 | Inputs "|+-" 842 | InputSameDT off 843 | OutDataTypeMode "Inherit via internal rule" 844 | OutDataType "fixdt(1, 16)" 845 | OutScaling "2^0" 846 | OutDataTypeStr "Inherit: Inherit via internal rule" 847 | SaturateOnIntegerOverflow off 848 | } 849 | Block { 850 | BlockType TransportDelay 851 | Name "Transport\nDelay" 852 | SID 32 853 | Position [320, 325, 350, 355] 854 | DelayTime "stepsize" 855 | InitialOutput "zeros(dim*nodenum,1)" 856 | } 857 | Block { 858 | BlockType MATLABFcn 859 | Name "control law" 860 | SID 14 861 | Ports [1, 1] 862 | Position [305, 235, 365, 265] 863 | BlockMirror on 864 | MATLABFcn "fcn_ControlLaw" 865 | } 866 | Block { 867 | BlockType Scope 868 | Name "p_all_time" 869 | SID 3 870 | Ports [1] 871 | Position [625, 59, 655, 91] 872 | Floating off 873 | Location [475, 264, 799, 579] 874 | Open off 875 | NumInputPorts "1" 876 | ZoomMode "xonly" 877 | List { 878 | ListType AxesTitles 879 | axes1 "%" 880 | } 881 | SaveToWorkspace on 882 | SaveName "p_all_time" 883 | DataFormat "StructureWithTime" 884 | LimitDataPoints off 885 | SampleTime "0" 886 | } 887 | Block { 888 | BlockType MATLABFcn 889 | Name "tracking error" 890 | SID 5 891 | Ports [1, 1] 892 | Position [645, 125, 705, 155] 893 | MATLABFcn "fcn_TrackingError" 894 | } 895 | Block { 896 | BlockType Scope 897 | Name "v_all_time" 898 | SID 22 899 | Ports [1] 900 | Position [480, 49, 510, 81] 901 | Floating off 902 | Location [475, 264, 799, 579] 903 | Open off 904 | NumInputPorts "1" 905 | ZoomMode "xonly" 906 | List { 907 | ListType AxesTitles 908 | axes1 "%" 909 | } 910 | SaveToWorkspace on 911 | SaveName "v_all_time" 912 | DataFormat "StructureWithTime" 913 | LimitDataPoints off 914 | SampleTime "0" 915 | } 916 | Line { 917 | SrcBlock "tracking error" 918 | SrcPort 1 919 | DstBlock "Scope1" 920 | DstPort 1 921 | } 922 | Line { 923 | SrcBlock "Mux1" 924 | SrcPort 1 925 | DstBlock "control law" 926 | DstPort 1 927 | } 928 | Line { 929 | SrcBlock "Integrator" 930 | SrcPort 1 931 | Points [60, 0] 932 | Branch { 933 | DstBlock "tracking error" 934 | DstPort 1 935 | } 936 | Branch { 937 | Points [0, -65] 938 | DstBlock "p_all_time" 939 | DstPort 1 940 | } 941 | Branch { 942 | Points [0, 50] 943 | Branch { 944 | Points [0, 35] 945 | DstBlock "Mux1" 946 | DstPort 1 947 | } 948 | Branch { 949 | Points [-315, 0; 0, 30] 950 | DstBlock "Mux3" 951 | DstPort 2 952 | } 953 | } 954 | } 955 | Line { 956 | SrcBlock "Integrator2" 957 | SrcPort 1 958 | Points [65, 0] 959 | Branch { 960 | DstBlock "Integrator" 961 | DstPort 1 962 | } 963 | Branch { 964 | Points [0, -75] 965 | DstBlock "v_all_time" 966 | DstPort 1 967 | } 968 | Branch { 969 | Points [0, 30] 970 | Branch { 971 | Points [0, 80] 972 | DstBlock "Mux1" 973 | DstPort 2 974 | } 975 | Branch { 976 | Points [-180, 0] 977 | DstBlock "Mux3" 978 | DstPort 1 979 | } 980 | } 981 | } 982 | Line { 983 | SrcBlock "control law" 984 | SrcPort 1 985 | DstBlock "Mux2" 986 | DstPort 1 987 | } 988 | Line { 989 | SrcBlock "Clock" 990 | SrcPort 1 991 | Points [0, -40] 992 | DstBlock "Mux2" 993 | DstPort 2 994 | } 995 | Line { 996 | SrcBlock "Leader acceleration" 997 | SrcPort 1 998 | Points [-15, 0] 999 | Branch { 1000 | Points [0, -120] 1001 | Branch { 1002 | DstBlock "Integrator2" 1003 | DstPort 1 1004 | } 1005 | Branch { 1006 | Points [0, -55] 1007 | DstBlock "Scope" 1008 | DstPort 1 1009 | } 1010 | } 1011 | Branch { 1012 | Points [0, 80] 1013 | Branch { 1014 | Points [0, 45; 360, 0] 1015 | DstBlock "Sum" 1016 | DstPort 2 1017 | } 1018 | Branch { 1019 | DstBlock "Transport\nDelay" 1020 | DstPort 1 1021 | } 1022 | } 1023 | } 1024 | Line { 1025 | SrcBlock "Transport\nDelay" 1026 | SrcPort 1 1027 | Points [85, 0] 1028 | Branch { 1029 | Points [5, 0; 0, -65] 1030 | DstBlock "Mux1" 1031 | DstPort 3 1032 | } 1033 | Branch { 1034 | DstBlock "Sum" 1035 | DstPort 1 1036 | } 1037 | } 1038 | Line { 1039 | SrcBlock "Sum" 1040 | SrcPort 1 1041 | DstBlock "Scope2" 1042 | DstPort 1 1043 | } 1044 | Line { 1045 | SrcBlock "Mux3" 1046 | SrcPort 1 1047 | DstBlock "Mux4" 1048 | DstPort 1 1049 | } 1050 | Line { 1051 | SrcBlock "Mux2" 1052 | SrcPort 1 1053 | DstBlock "Mux4" 1054 | DstPort 2 1055 | } 1056 | Line { 1057 | SrcBlock "Mux4" 1058 | SrcPort 1 1059 | DstBlock "Leader acceleration" 1060 | DstPort 1 1061 | } 1062 | Annotation { 1063 | Name "a" 1064 | Position [320, 132] 1065 | } 1066 | Annotation { 1067 | Name "p" 1068 | Position [553, 134] 1069 | } 1070 | Annotation { 1071 | Name "v" 1072 | Position [395, 132] 1073 | } 1074 | Annotation { 1075 | Name "p" 1076 | Position [420, 217] 1077 | } 1078 | Annotation { 1079 | Name "v" 1080 | Position [418, 242] 1081 | } 1082 | Annotation { 1083 | Name "a" 1084 | Position [418, 267] 1085 | } 1086 | } 1087 | } 1088 | -------------------------------------------------------------------------------- /affineManeuver.slxc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddahant/Maneuver-Control-of-Multirobot-Systems-Using-Affine-Formation/1b549dad89cbb2aca9b98d6035d16160df97f0ee/affineManeuver.slxc -------------------------------------------------------------------------------- /f_sin.m: -------------------------------------------------------------------------------- 1 | function output=f_sin(time_start,time_span,currentTime) 2 | 3 | % integral this function from 0 to time_span, it equals pi, so the agent 4 | % rotate for pi angle 5 | if currentTimetime_start+time_span 6 | output=0; 7 | else 8 | magnitude=pi^2/2/time_span; 9 | beta=pi/time_span; 10 | t=currentTime-time_start; 11 | output=magnitude*sin(beta*t); 12 | end -------------------------------------------------------------------------------- /main.m: -------------------------------------------------------------------------------- 1 | clc; clear; close all 2 | global nodenum neighborMat stressMat dim simTime leaderNum ifLeaderFollower kp kv samplePos_all 3 | global rotateFlag tempp1 tempp2 4 | % 5 | ifLeaderFollower=1; 6 | leaderNum=3; % number of Leaders 7 | dim=2; 8 | % configuration matrix 9 | P=2*[2 0;1 1;1 -1;0 1;0 -1;-1 1;-1 -1]; 10 | nodenum=size(P,1); % number of nodes 11 | % adjacent matrix:- tells about all the connections between the agents for 12 | % information 13 | neighborMat=zeros(nodenum,nodenum); 14 | neighborMat(1,2)=1;neighborMat(1,3)=1;neighborMat(1,4)=1;neighborMat(1,5)=1; 15 | neighborMat(2,4)=1; 16 | neighborMat(3,5)=1;neighborMat(3,6)=1; 17 | neighborMat(4,5)=1;neighborMat(4,6)=1;neighborMat(2,7)=1; 18 | neighborMat(5,7)=1; 19 | neighborMat(6,7)=1; 20 | m=sum(sum(neighborMat)); % number of edges 21 | neighborMat=neighborMat+neighborMat'; 22 | stressMat=StressMatrix(dim,nodenum,m,P,neighborMat); 23 | 24 | kv=2;kp=0.5; 25 | samplePos_all=P'; 26 | p=reshape(P',dim*nodenum,1); 27 | x_init=p+[0 0 0 0 0 0 1 1 0 1 -1 1 -2 -1]'; 28 | for k=1:leaderNum 29 | x_init(dim*(k-1)+1:dim*k)=samplePos_all(:,k); % initial position of all leaders 30 | end 31 | v_leader_init=zeros(dim*leaderNum,1); % Initializing zero velocity for all the leaders and followers 32 | v_init=zeros(dim*nodenum,1); 33 | v_init(1:dim*leaderNum,1)=v_leader_init; 34 | 35 | rotateFlag=1; % Flag variable for rotation 36 | tempp1=zeros(dim,1); 37 | tempp2=zeros(dim,1); 38 | %% SIMULINK 39 | simTime=125; 40 | stepsize=0.005 ; 41 | option=simset('fixedstep',stepsize); 42 | sim('affineManeuver.mdl', [0, simTime], option) 43 | 44 | 45 | %% ANIMATION REQUEST PLOT RESULTS 46 | simulation = 0; 47 | 48 | if simulation==1 49 | Animate_Maneuver(p_all_time, error_all) % Animate the simulation 50 | elseif simulation==0 51 | Plot_Results(p_all_time, v_all_time, a_all, error_all, aDiff_all) % Plot the results 52 | end 53 | 54 | %% FUNCTION STRESS MATRIX 55 | function stressMat=StressMatrix(d,n,m,P,adjMat) 56 | % incidence matrix 57 | H=zeros(m,n); 58 | pointer=1; 59 | for i=1:n 60 | for j=i+1:n 61 | if adjMat(i,j)~=0 62 | H(pointer,i)=-1; 63 | H(pointer,j)=1; 64 | pointer=pointer+1; 65 | end 66 | end 67 | end 68 | 69 | % Single value decomposition of Configuration Matrix 70 | Pbar=[ones(n,1),P]; 71 | [U,S,V]=svd(Pbar); 72 | U2=U(:,d+1+1:end); 73 | Q=U2'; 74 | 75 | % Plot the formation 76 | hold on; axis equal 77 | % plot edges 78 | for i=1:n 79 | for j=1:n 80 | if adjMat(i,j)~=0 81 | pi=P(i,:); 82 | pj=P(j,:); 83 | line([pi(1),pj(1)], [pi(2),pj(2)], 'linewidth', 2, 'color', 'b'); 84 | end 85 | end 86 | end 87 | % plot nodes 88 | for i=1:n 89 | pi=P(i,:); 90 | plot(pi(1), pi(2), 'o', ... 91 | 'MarkerSize', 15,... 92 | 'linewidth', 2,... 93 | 'MarkerEdgeColor', 'r',... 94 | 'markerFaceColor', 'white'); 95 | text(pi(1), pi(2), num2str(i),... 96 | 'color', 'r', 'FontSize', 13, 'horizontalAlignment', 'center', 'FontName', 'times'); 97 | end 98 | % numbering edges 99 | pointer=1; 100 | for i=1:n 101 | for j=i+1:n 102 | if adjMat(i,j)~=0 103 | pi=P(i,:); 104 | pj=P(j,:); 105 | text((pi(1)+pj(1))/2, (pi(2)+pj(2))/2, num2str(pointer),... 106 | 'color', 'k', 'FontSize', 12, 'horizontalAlignment', 'center'); 107 | pointer=pointer+1; 108 | end 109 | end 110 | end 111 | 112 | E=zeros(d*n,m); 113 | for i=1:n 114 | hi=H(:,i); 115 | E((i-1)*d+1:(i-1)*d+d,:)=P'*H'*diag(hi); 116 | end 117 | % Single Value Decomposition of Energy Matrix 118 | [U,S,V]=svd(E); 119 | B=V(:,rank(S)+1:end); 120 | num=size(B,2); 121 | 122 | % if num>1 -> LMI 123 | M=zeros(n-d-1,n-d-1,num); 124 | for i=1:num 125 | bi=B(:,i); 126 | M(:,:,i)=Q*H'*diag(bi)*H*Q'; 127 | end 128 | setlmis([]); 129 | LMI=newlmi; 130 | if num==0 131 | return; 132 | elseif num==1 133 | x1=lmivar(1,[1 0]); 134 | lmiterm([-LMI 1 1 x1],M(:,:,1),1); % right hand side 135 | LMIsys=getlmis; 136 | [tmin,x] = feasp(LMIsys,[0 0 1 0 0]); 137 | elseif num==2 138 | x1=lmivar(1,[1 0]); 139 | x2=lmivar(1,[1 0]); 140 | lmiterm([-LMI 1 1 x1],M(:,:,1),1); % right hand side 141 | lmiterm([-LMI 1 1 x2],M(:,:,2),1); % right hand side 142 | LMIsys=getlmis; 143 | [tmin,x] = feasp(LMIsys,[0 0 1 0 0]); 144 | elseif num>2 145 | return; 146 | end 147 | % calculate omega and stress matrix 148 | omega=B*x; 149 | omega=omega/norm(omega); 150 | stressMat=H'*diag(omega)*H; 151 | if max(eig(stressMat))>0 152 | omega=-omega; 153 | stressMat=-stressMat; 154 | end 155 | end 156 | 157 | 158 | %% FUNCTION PLOT RESULTS 159 | function Plot_Results(p_all_time, v_all_time, a_all_time, error_all, aDiff_all) 160 | close all 161 | 162 | global nodenum neighborMat dim simTime leaderNum 163 | 164 | delta=50; 165 | time_all=v_all_time.time(1:delta:end); 166 | p_all=p_all_time.signals.values(1:delta:end,:); 167 | v_all=v_all_time.signals.values(1:delta:end,:); 168 | a_all=a_all_time.signals.values(1:delta:end,:); 169 | error_all=error_all.signals.values(1:delta:end,:); 170 | aDiff_all=aDiff_all.signals.values(1:delta:end,:); 171 | 172 | linewidth=0.5; 173 | dotsize=7; 174 | fontsize=7;%15; 175 | formationColor=0*[0 0 1]; 176 | faceColorList=zeros(nodenum,3); 177 | for i=1:nodenum 178 | if i<=leaderNum 179 | faceColorList(i,:)=[1,0,0]; 180 | else 181 | faceColorList(i,:)=[0,0,1]; 182 | end 183 | end 184 | for i=1:nodenum 185 | if i<=leaderNum 186 | markerList(i)={'o'}; 187 | else 188 | markerList(i)={'o'}; 189 | end 190 | end 191 | for i=1:nodenum 192 | if i<=leaderNum 193 | linestyleList(i)={'-'}; 194 | else 195 | linestyleList(i)={'--'}; 196 | end 197 | end 198 | 199 | % plot trajectory 200 | figure; 201 | subplot(4,1,[1,2,3]); % to make the axis short 202 | hold on; box on; 203 | set(gca, 'fontSize', fontsize) 204 | set(get(gca, 'xlabel'), 'String', 'x (m)', 'fontSize', fontsize); 205 | set(get(gca, 'ylabel'), 'String', 'y (m)', 'fontSize', fontsize); 206 | axis equal 207 | set(gca, 'fontsize', fontsize); 208 | 209 | %plot trajectory 210 | for i=1:nodenum 211 | if dim==2 212 | xi_all=p_all(:,2*i-1); 213 | yi_all=p_all(:,2*i); 214 | plot(xi_all, yi_all, ':', 'linewidth', linewidth, 'color', faceColorList(i,:)); 215 | else 216 | xi_all=p_all(:,3*i-2); 217 | yi_all=p_all(:,3*i-1); 218 | zi_all=p_all(:,3*i); 219 | plot3(xi_all, yi_all, zi_all, ':', 'linewidth', linewidth, 'color', faceColorList(i,:)); 220 | end 221 | end 222 | 223 | % plot obstacle 224 | leftx=18; 225 | width=5; 226 | h=rectangle('Position', [leftx, 1.8, width, 15]); 227 | set(h, 'faceColor', 0.4*ones(1,3)) 228 | h=rectangle('Position', [leftx, -16.5, width, 14.5]); 229 | set(h, 'faceColor', 0.4*ones(1,3)) 230 | h=rectangle('Position', [leftx, -25, width, 6.5]); 231 | set(h, 'faceColor', 0.4*ones(1,3)) 232 | text(20.5, -9, 'Obstacle','color', 'w', 'FontSize', 8, 'horizontalAlignment', 'center', 'FontWeight', 'normal', 'Rotation', 0, 'fontname', 'Times'); 233 | 234 | axis tight 235 | xlim=get(gca,'xlim'); 236 | set(gca,'xlim', xlim+[-5,5]); 237 | ylim=get(gca,'ylim'); 238 | set(gca,'ylim', ylim+[-4,3]); 239 | 240 | % plot intermediate formations 241 | dataNum=size(p_all,1); 242 | hMarkerAll=zeros(nodenum,1); 243 | index=[1,floor(dataNum/10*1.4),floor(dataNum/10*2.2),floor(dataNum/10*3.2),floor(dataNum/10*4.47),... 244 | floor(dataNum/10*5.3),floor(dataNum/10*6.45),floor(dataNum/10*7.2),floor(dataNum/10*8),floor(dataNum/10*9),floor(dataNum/10*10)]; % for 2D scale big example 245 | 246 | for k=1:size(index,2) 247 | idx=index(k); 248 | for i=1:nodenum 249 | for j=1:nodenum 250 | if neighborMat(i,j)==1 251 | if dim==2 252 | pi=p_all(idx,2*i-1:2*i)'; 253 | pj=p_all(idx,2*j-1:2*j)'; 254 | line([pi(1),pj(1)], [pi(2),pj(2)], 'linewidth', 0.5, 'color', formationColor); 255 | else 256 | pi=p_all(idx,3*i-2:3*i)'; 257 | pj=p_all(idx,3*j-2:3*j)'; 258 | line([pi(1),pj(1)], [pi(2),pj(2)], [pi(3),pj(3)], 'linewidth', 0.5, 'color', formationColor); 259 | end 260 | end 261 | end 262 | end 263 | for i=1:nodenum 264 | if dim==2 265 | xi=p_all(idx,2*i-1); 266 | yi=p_all(idx,2*i); 267 | hMarkerAll(i)=plot(xi, yi, char(markerList(i)), 'MarkerEdgeColor', 'k', 'MarkerFaceColor', faceColorList(i,:), 'markersize', dotsize, 'linewidth', 0.5); 268 | text(xi, yi, num2str(i),'color', 'w', 'FontSize', 5, 'horizontalAlignment', 'center', 'FontWeight', 'bold'); 269 | else 270 | xi=p_all(idx,3*i-2); 271 | yi=p_all(idx,3*i-1); 272 | zi=p_all(idx,3*i); 273 | hMarkerAll(i)=plot3(xi, yi, zi, char(markerList(i)), 'MarkerEdgeColor', 'k', 'MarkerFaceColor', faceColorList(i,:), 'markersize', dotsize, 'linewidth', 1); 274 | end 275 | end 276 | end 277 | hLegendTraj=legend([hMarkerAll(1),hMarkerAll(leaderNum+1)], 'Leader', 'Follower', 'location', 'West'); 278 | 279 | % plot time for corresponding formation 280 | text(0, 5, strcat('t=',num2str(time_all(index(1)),'%.1f'),'s'),'color', 'k', 'FontSize', fontsize+1, 'horizontalAlignment', 'center', 'FontName', 'times'); 281 | text(10, 5, strcat('t=',num2str(time_all(index(2)),'%.1f'),'s'),'color', 'k', 'FontSize', fontsize+1, 'horizontalAlignment', 'center', 'FontName', 'times'); 282 | text(33, 5, strcat('t=',num2str(time_all(index(4)),'%.1f'),'s'),'color', 'k', 'FontSize', fontsize+1, 'horizontalAlignment', 'center', 'FontName', 'times'); 283 | text(45, 5, strcat('t=',num2str(time_all(index(5)),'%.1f'),'s'),'color', 'k', 'FontSize', fontsize+1, 'horizontalAlignment', 'center', 'FontName', 'times'); 284 | text(50, -7, strcat('t=',num2str(time_all(index(6)),'%.1f'),'s'),'color', 'k', 'FontSize', fontsize+1, 'horizontalAlignment', 'center', 'FontName', 'times'); 285 | text(50, -17, strcat('t=',num2str(time_all(index(7)),'%.1f'),'s'),'color', 'k', 'FontSize', fontsize+1, 'horizontalAlignment', 'center', 'FontName', 'times'); 286 | text(38, -22, strcat('t=',num2str(time_all(index(8)),'%.1f'),'s'),'color', 'k', 'FontSize', fontsize+1, 'horizontalAlignment', 'center', 'FontName', 'times'); 287 | text(28, -22, strcat('t=',num2str(time_all(index(9)),'%.1f'),'s'),'color', 'k', 'FontSize', fontsize+1, 'horizontalAlignment', 'center', 'FontName', 'times'); 288 | text(14, -22, strcat('t=',num2str(time_all(index(10)),'%.1f'),'s'),'color', 'k', 'FontSize', fontsize+1, 'horizontalAlignment', 'center', 'FontName', 'times'); 289 | text(3, -22, strcat('t=',num2str(time_all(index(11)),'%.1f'),'s'),'color', 'k', 'FontSize', fontsize+1, 'horizontalAlignment', 'center', 'FontName', 'times'); 290 | 291 | % plot error 292 | figure 293 | subplot(5,1,1) % to make the axis short 294 | hold on; box on 295 | % set the format of the axis 296 | set(gca, 'fontSize', fontsize) 297 | % set(get(gca, 'xlabel'), 'String', 'Time (s)', 'fontSize', fontsize); 298 | set(get(gca, 'ylabel'), 'String', 'Tracking error', 'fontSize', fontsize); 299 | set(gca, 'xlim', [0,simTime]) 300 | % set(gca, 'ylim', [0,10]) 301 | plot(time_all, error_all, 'color', 'm', 'linewidth', 1) 302 | % set(get(gca, 'title'), 'String', strcat('Tracking error: kp=',num2str(kp),', kv=',num2str(kv)), 'fontsize', fontsize); 303 | 304 | % plot velocity 305 | hLineAll=zeros(nodenum,1); 306 | if dim==2 307 | % x velocity 308 | subplot(5,1,2) 309 | hold on; box on; 310 | for i=1:nodenum 311 | hLineAll(i)=plot(time_all, v_all(:,2*i-1), 'color', faceColorList(i,:), 'linestyle', char(linestyleList(i)), 'linewidth', 1); 312 | end 313 | set(gca, 'fontSize', fontsize) 314 | set(get(gca, 'ylabel'), 'String', 'x-velocity (m/s)', 'fontSize', fontsize); 315 | set(gca, 'xlim', [0,simTime]) 316 | set(gca, 'ylim', [-3,3]) 317 | hLegend=legend([hLineAll(1),hLineAll(leaderNum+1)], 'Leader', 'Follower', 'location', 'southwest'); 318 | set(hLegend, 'fontsize', fontsize); 319 | % y velocity 320 | subplot(5,1,3) 321 | hold on; box on; 322 | for i=1:nodenum 323 | hLineAll(i)=plot(time_all, v_all(:,2*i), 'color', faceColorList(i,:), 'linestyle', char(linestyleList(i)), 'linewidth', 1); 324 | end 325 | set(gca, 'fontSize', fontsize) 326 | set(get(gca, 'ylabel'), 'String', 'y-velocity (m/s)', 'fontSize', fontsize); 327 | set(gca, 'xlim', [0,simTime]) 328 | set(gca, 'ylim', [-3,3]) 329 | hLegend=legend([hLineAll(1),hLineAll(leaderNum+1)], 'Leader', 'Follower', 'location', 'southwest'); 330 | set(hLegend, 'fontsize', fontsize); 331 | elseif dim==3 % plot vx and vy 332 | % x velocity 333 | subplot(3,1,1) 334 | hold on; box on; 335 | for i=1:nodenum 336 | hLineAll(i)=plot(time_all, v_all(:,3*i-2), 'color', faceColorList(i,:), 'linestyle', char(linestyleList(i)), 'linewidth', 1); 337 | end 338 | set(gca, 'fontSize', fontsize) 339 | set(get(gca, 'ylabel'), 'String', 'x-velocity (m/s)', 'fontSize', fontsize); 340 | set(gca, 'xlim', [0,simTime]) 341 | hLegend=legend([hLineAll(1),hLineAll(leaderNum+1)], 'Leader', 'Follower', 'location', 'southwest'); 342 | set(hLegend, 'fontsize', fontsize); 343 | % title 344 | set(get(gca, 'title'), 'String', 'Velocity', 'fontsize', fontsize); 345 | % y velocity 346 | subplot(3,1,2) 347 | hold on; box on; 348 | for i=1:nodenum 349 | hLineAll(i)=plot(time_all, v_all(:,3*i-1), 'color', faceColorList(i,:), 'linestyle', char(linestyleList(i)), 'linewidth', 1); 350 | end 351 | set(gca, 'fontSize', fontsize) 352 | set(get(gca, 'ylabel'), 'String', 'y-velocity (m/s)', 'fontSize', fontsize); 353 | set(gca, 'xlim', [0,simTime]) 354 | hLegend=legend([hLineAll(1),hLineAll(3)], 'Leader', 'Follower', 'location', 'southwest'); 355 | set(hLegend, 'fontsize', fontsize); 356 | % z velocity 357 | subplot(3,1,3) 358 | hold on; box on; 359 | for i=1:nodenum 360 | hLineAll(i)=plot(time_all, v_all(:,3*i), 'color', faceColorList(i,:), 'linestyle', char(linestyleList(i)), 'linewidth', 1); 361 | end 362 | set(gca, 'fontSize', fontsize) 363 | set(get(gca, 'xlabel'), 'String', 'Time (sec)', 'fontSize', fontsize); 364 | set(get(gca, 'ylabel'), 'String', 'z-velocity (m/s)', 'fontSize', fontsize); 365 | set(gca, 'xlim', [0,simTime]) 366 | hLegend=legend([hLineAll(1),hLineAll(3)], 'Leader', 'Follower', 'location', 'southwest'); 367 | set(hLegend, 'fontsize', fontsize); 368 | end 369 | 370 | % plot acceleration 371 | hLineAll=zeros(nodenum,1); 372 | if dim==2 373 | % x velocity 374 | subplot(5,1,4) 375 | hold on; box on; 376 | for i=1:nodenum 377 | hLineAll(i)=plot(time_all, a_all(:,2*i-1), 'color', faceColorList(i,:), 'linestyle', char(linestyleList(i)), 'linewidth', 1); 378 | end 379 | set(gca, 'fontSize', fontsize) 380 | set(get(gca, 'ylabel'), 'String', 'x-acceleration (m^2/s)', 'fontSize', fontsize); 381 | set(gca, 'xlim', [0,simTime]) 382 | hLegend=legend([hLineAll(1),hLineAll(leaderNum+1)], 'Leader', 'Follower', 'location', 'southwest'); 383 | set(hLegend, 'fontsize', fontsize); 384 | % title 385 | % set(get(gca, 'title'), 'String', 'Acceleration', 'fontsize', fontsize); 386 | % y velocity 387 | subplot(5,1,5) 388 | hold on; box on; 389 | for i=1:nodenum 390 | hLineAll(i)=plot(time_all, a_all(:,2*i), 'color', faceColorList(i,:), 'linestyle', char(linestyleList(i)), 'linewidth', 1); 391 | end 392 | set(gca, 'fontSize', fontsize) 393 | set(get(gca, 'ylabel'), 'String', 'y-acceleration (m^2/s)', 'fontSize', fontsize); 394 | set(get(gca, 'xlabel'), 'String', 'Time (s)', 'fontSize', fontsize); 395 | set(gca, 'xlim', [0,simTime]) 396 | hLegend=legend([hLineAll(1),hLineAll(leaderNum+1)], 'Leader', 'Follower', 'location', 'southwest'); 397 | set(hLegend, 'fontsize', fontsize); 398 | end 399 | 400 | % plot acceleration error 401 | figure 402 | hLineAll=zeros(nodenum,1); 403 | if dim==2 404 | % x velocity 405 | subplot(5,1,1) 406 | hold on; box on; 407 | for i=1:nodenum 408 | hLineAll(i)=plot(time_all, aDiff_all(:,2*i-1), 'color', faceColorList(i,:), 'linestyle', char(linestyleList(i)), 'linewidth', 1); 409 | end 410 | set(gca, 'fontSize', fontsize) 411 | set(get(gca, 'ylabel'), 'String', 'x-aDiff (m^2/s)', 'fontSize', fontsize); 412 | set(gca, 'xlim', [0,simTime]) 413 | hLegend=legend([hLineAll(1),hLineAll(leaderNum+1)], 'Leader', 'Follower', 'location', 'southwest'); 414 | set(hLegend, 'fontsize', fontsize); 415 | hLegend=legend([hLineAll(1),hLineAll(leaderNum+1)], 'Leader', 'Follower', 'location', 'southwest'); 416 | % y velocity 417 | subplot(5,1,2) 418 | hold on; box on; 419 | for i=1:nodenum 420 | hLineAll(i)=plot(time_all, aDiff_all(:,2*i), 'color', faceColorList(i,:), 'linestyle', char(linestyleList(i)), 'linewidth', 1); 421 | end 422 | set(gca, 'fontSize', fontsize) 423 | set(get(gca, 'ylabel'), 'String', 'y-aDiff (m^2/s)', 'fontSize', fontsize); 424 | set(gca, 'xlim', [0,simTime]) 425 | set(get(gca, 'xlabel'), 'String', 'Time (s)', 'fontSize', fontsize); 426 | hLegend=legend([hLineAll(1),hLineAll(leaderNum+1)], 'Leader', 'Follower', 'location', 'southwest'); 427 | set(hLegend, 'fontsize', fontsize); 428 | end 429 | end 430 | 431 | %% FUNCTION ANIMATE THE RESULTS 432 | function Animate_Maneuver(p_all_time, error_all) 433 | global nodenum edgenum neighborMat dim simTime leaderNum ki kp 434 | close all; 435 | figure; 436 | set(gcf, 'unit', 'norm', 'pos', [0.1,0.1,0.72,0.8]) 437 | hAxisTraj=subplot(4,1,1:3); 438 | hold on; box on; axis equal 439 | xlim([-10,55]) 440 | ylim([-25,6]) 441 | delta=50; 442 | time_all=p_all_time.time(1:delta:end); 443 | p_all=p_all_time.signals.values(1:delta:end,:); 444 | error_all=error_all.signals.values(1:delta:end,:); 445 | 446 | linewidth=0.5; 447 | fontsize=7; 448 | dotsize=9; 449 | formationColor=0*[0 0 1]; 450 | 451 | for i=1:nodenum 452 | if i<=leaderNum 453 | edgeColorList(i,:)=[1,0,0]; 454 | else 455 | edgeColorList(i,:)=[0,0,1]; 456 | end 457 | end 458 | faceColorList=edgeColorList; 459 | set(gca, 'fontSize', fontsize) 460 | set(get(gca, 'xlabel'), 'String', 'x (meter)', 'fontSize', fontsize); 461 | set(get(gca, 'ylabel'), 'String', 'y (meter)', 'fontSize', fontsize); 462 | 463 | for i=1:nodenum 464 | for j=1:nodenum 465 | if neighborMat(i,j)==1 466 | pi=p_all(1,2*i-1:2*i)'; 467 | pj=p_all(1,2*j-1:2*j)'; 468 | line([pi(1),pj(1)], [pi(2),pj(2)], 'linewidth', 1, 'color', formationColor); 469 | end 470 | end 471 | xi=p_all(1,2*i-1); 472 | yi=p_all(1,2*i); 473 | plot(xi, yi, 'o', 'MarkerEdgeColor', 'k', 'MarkerFaceColor', faceColorList(i,:), 'markersize', dotsize-2, 'linewidth', 1) 474 | end 475 | 476 | % plot obstacle 477 | leftx=18; 478 | width=5; 479 | h=rectangle('Position', [leftx, 1.8, width, 15]); 480 | set(h, 'faceColor', 0.4*ones(1,3)) 481 | h=rectangle('Position', [leftx, -16.5, width, 14.5]); 482 | set(h, 'faceColor', 0.4*ones(1,3)) 483 | h=rectangle('Position', [leftx, -25, width, 6.5]); 484 | set(h, 'faceColor', 0.4*ones(1,3)) 485 | text(20.5, -9, 'Obstacle','color', 'w', 'FontSize', 8, 'horizontalAlignment', 'center', 'FontWeight', 'normal', 'Rotation', 0, 'fontname', 'Times'); 486 | 487 | 488 | % objects of the lines 489 | hLine=zeros(nodenum,nodenum); 490 | for i=1:nodenum 491 | for j=i+1:nodenum 492 | if neighborMat(i,j)==1 493 | pi=p_all(1,2*i-1:2*i)'; 494 | pj=p_all(1,2*j-1:2*j)'; 495 | hLine(i,j)=line([pi(1),pj(1)], [pi(2),pj(2)], 'linewidth', linewidth, 'color', formationColor); 496 | end 497 | end 498 | end 499 | % >>>objects of the dots 500 | hMarker=zeros(1,nodenum); 501 | hText=zeros(1,nodenum); 502 | for i=1:nodenum 503 | xi=p_all(1,2*i-1); 504 | yi=p_all(1,2*i); 505 | hMarker(i) = plot(xi, yi, 'o', 'MarkerEdgeColor', 'k', 'MarkerFaceColor', faceColorList(i,:), 'markersize', dotsize, 'linewidth', 1); 506 | hText(i)=text(xi, yi, num2str(i),'color', 'w', 'FontSize', fontsize, 'horizontalAlignment', 'center', 'FontWeight', 'bold'); 507 | end 508 | hLegend=legend([hMarker(1),hMarker(leaderNum+1)], 'Leader', 'Follower', 'location', 'west'); 509 | set(hLegend, 'fontsize', fontsize); 510 | % objects of the trajectories 511 | hTraj=zeros(1,nodenum); 512 | for i=1:nodenum 513 | xi_all=p_all(1,2*i-1); 514 | yi_all=p_all(1,2*i); 515 | hTraj(i) = plot(xi_all, yi_all, ':', 'linewidth', 1, 'color', edgeColorList(i,:)); 516 | end 517 | 518 | % tracking error 519 | hAxisError=subplot(4,1,4); 520 | hold on; box on 521 | % set the format of the axis 522 | set(gca, 'fontSize', fontsize) 523 | set(get(gca, 'xlabel'), 'String', 'Time (second)', 'fontSize', fontsize); 524 | set(get(gca, 'ylabel'), 'String', 'Tracking error', 'fontSize', fontsize); 525 | set(gca, 'xlim',[0 125]) 526 | set(gca, 'ylim', [0 4]) 527 | hError=plot(time_all(1), error_all(1), 'm', 'linewidth', 2); 528 | 529 | % update the position of each object 530 | for k=1:4:size(p_all, 1) 531 | for i=1:nodenum 532 | % 533 | xi_all=p_all(1:k,2*i-1); 534 | yi_all=p_all(1:k,2*i); 535 | set(hTraj(i), 'xdata', xi_all, 'ydata', yi_all); 536 | % 537 | xi=p_all(k,2*i-1); 538 | yi=p_all(k,2*i); 539 | set(hMarker(i), 'xdata', xi, 'ydata', yi); 540 | set(hText(i), 'Position', [xi,yi]); 541 | % 542 | for j=i+1:nodenum 543 | if neighborMat(i,j)==1 544 | pi=p_all(k,2*i-1:2*i)'; 545 | pj=p_all(k,2*j-1:2*j)'; 546 | set( hLine(i,j), 'xdata', [pi(1),pj(1)], 'ydata', [pi(2),pj(2)]); 547 | end 548 | end 549 | set(hError, 'xdata', time_all(1:k), 'ydata', error_all(1:k)); 550 | end 551 | pause(0.1) 552 | end 553 | end 554 | 555 | -------------------------------------------------------------------------------- /saturate.m: -------------------------------------------------------------------------------- 1 | function y=saturate(x) 2 | beta=5; 3 | y=x; 4 | for i=1:size(x,1) 5 | if abs(x(i))0 8 | y(i)=beta; 9 | else 10 | y(i)=-beta; 11 | end 12 | end -------------------------------------------------------------------------------- /slprj/sim/varcache/affineManeuver/checksumOfCache.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddahant/Maneuver-Control-of-Multirobot-Systems-Using-Affine-Formation/1b549dad89cbb2aca9b98d6035d16160df97f0ee/slprj/sim/varcache/affineManeuver/checksumOfCache.mat -------------------------------------------------------------------------------- /slprj/sim/varcache/affineManeuver/tmwinternal/simulink_cache.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | bGfHPfISxc5LJZ8okOcztQHGJogC8bgT2k+/aHFONI+TDS4Z6SS+BMsyFTO5fWOtBFEYmS42Hm0onF1dYvJ9sA== 5 | 6 | -------------------------------------------------------------------------------- /slprj/sim/varcache/affineManeuver/varInfo.mat: -------------------------------------------------------------------------------- 1 | MATLAB 5.0 MAT-file, Platform: PCWIN64, Created on: Fri Dec 2 15:26:07 2022 IMGlobalWorkspace0dim@base workspace8globalX$$00000000-0000-0000-0000-000000000000008nodenum@base workspace8globalX$$00000000-0000-0000-0000-000000000000008stepsize@base workspace8globalX$$00000000-0000-0000-0000-000000000000008v_init@base workspace8globalX$$00000000-0000-0000-0000-000000000000008x_init@base workspace8globalX$$00000000-0000-0000-0000-000000000000008 ConfigSetRef8ModelWorkspace --------------------------------------------------------------------------------