New advertisers: 50% off your first month with code FIRSTMONTHSee slots

Aerospace skills for Simulink models using Aerospace Blockset

version
0.1.0
GitHub stars
1.4K
View on GitHub

Add marketplace

/plugin marketplace add matlab/simulink-agentic-toolkit

Run it inside Claude Code once, then install the plugin below.

Install

/plugin install aerospace@simulink-agentic-toolkit

Run it inside Claude Code after adding the marketplace.

Files

Discovered from source

Compose Multi-Vehicle Systems

Build multi-vehicle scenes with the Kinematic Aerospace Actor block and the Aero.trajectory functions in Aerospace Blockset.

Requires MATLAB R2026b or later; the Kinematic Aerospace Actor block and several Aero.trajectory functions first ship in R2026b. Before anything else, check the release with isMATLABReleaseOlderThan("R2026b"). If it returns true, tell the user this skill needs R2026b or later and stop.

When to Use

  • Several vehicles (aircraft, UAVs, agile aerial vehicles, ships) share one Simulink scene.
  • The task is a coordinated mission: surveillance, formation, coverage, escort, or search and rescue.
  • Reference trajectories must drive vehicle models.
  • The request names the Kinematic Aerospace Actor block or Aero.trajectory functions.

When NOT to Use

  • One vehicle with detailed aerodynamics: use 6DOF blocks or a custom plant.
  • 3D visualization: out of scope.
  • Wind and atmosphere effects: out of scope. Scenes assume calm air.
  • Model-building mechanics (block placement, wiring, running simulations): delegate to the companion skills below.
Companion skillSkill groupDelegate for
building-simulink-modelsModel-Based Design CoreBlock placement, wiring, bus configuration, data dictionary API
building-architecture-modelsModel-Based System EngineeringSystem Composer models, components, ports
managing-simulink-projectsModel-Based Design CoreMATLAB Project creation, paths, startup and shutdown
simulating-simulink-modelsModel-Based Design CoreRunning sim, SimulationInput, logged data
simulink-run-parallel-simulationsSimulink SimulationParameter sweeps with parsim, batchsim, DesignStudy
testing-simulink-modelsVerification, Validation & TestTest harnesses and regression tests

Model-Based Design Core installs by default. If a companion skill from another group is not installed, name the group to install. For example, scenes with three or more vehicles use building-architecture-models from Model-Based System Engineering.

Workflow

  1. Collect the Required Inputs. Verify: every row of the table below has a value.
  2. Decompose the architecture with System Composer (3+ vehicles or a complex mission). Verify: each component maps to one referenced model.
  3. Create the MATLAB Project with the required folders. Verify: the project opens and its startup runs without errors.
  4. Generate the data dictionary with code: bus objects, fleet parameters, simulation settings. Verify: every bus object the actor blocks name exists in the dictionary.
  5. Create one vehicle model per vehicle with one Kinematic Aerospace Actor block. Verify: the model compiles on its own.
  6. Generate trajectories with Aero.trajectory and load them for each vehicle. Verify: plot each trajectory before you wire it.
  7. Wire coordination and integrate. Verify: the frame check and compile check in § Validation pass.
  8. Simulate and check intent. Verify: the mission-intent check in § Validation passes.

Required Inputs

InputAsk or deriveRule
Number of vehiclesASK if not givenIt cannot be inferred safely
Vehicle typesDERIVE"UAV/aircraft" → Fixed Wing. "ship/boat" → Surface Vehicle. "agile/high-maneuver vehicle" → Agile Aerial Vehicle. ASK if ambiguous
Mission typeDERIVE"patrol" → surveillance. "fly together" → formation. "search area" → coverage. "protect" → escort. ASK if unclear
Coordinate frameDERIVELocal area under about 50 km → Flat Earth. Global routes, or positions given as latitude and longitude → WGS84 Ellipsoid
Trajectory typeDERIVESee § Trajectory Selection. ASK only when two options fit equally well
FidelityDERIVEKinematic by default. Redirect if the user asks for aerodynamics or 6DOF
Mission area (coverage, search, patrol)ASK if no size or location is givenIt sets the trajectory geometry. A guessed area wastes the build

List every derived value in your response so the user can override it, then continue.

Guardrails

Always

  1. Get all seven Required Inputs before you build. A wrong vehicle count or frame forces a rebuild.
  2. Put each vehicle in its own .slx and use it through Model Reference. Separate models compile in parallel, test alone, and scale.
  3. Make a System Composer architecture model the top level for 3+ vehicles or a complex mission (several coordination modes, sensor interactions, or mixed vehicle types). It keeps the interfaces between vehicles and coordination explicit. Expressing the architecture only in a build script does not satisfy this rule.
  4. Use the same frame for every actor and trajectory. A mismatch runs without error and gives wrong relative positions.
  5. Define a bus object for every actor port before you compile. The block ships with a placeholder bus name, so compile fails until you set real bus objects.
  6. Generate the data dictionary (.sldd) with code and keep fleet parameters, bus objects, and settings in it. Never create entries in the GUI. A scripted dictionary is reproducible and reviewable.
  7. Organize the work as a MATLAB Project. The root holds only the .prj file, README.md, buildLog.md, and the folders models/ (all .slx), data/ (.sldd), utilities/ (all .m), and work/ (cache). A fixed layout lets the user find every file.
  8. Put coordination in Stateflow, in its own referenced model, and make its output change vehicle motion. A flag that nothing reads is not coordination.
  9. Keep a run log while you work, and write a README when the build works. The log makes a long build reviewable and resumable.

Ask First

  • Before you skip or change any Always rule. Give the rule number, the reason, and your alternative. The user cannot review a decision that is already built, and finding it later costs them rework.
  • When the mission type is not in the Required Inputs table and the request needs coordination.
  • When a rule costs a lot of effort. Cost is a reason to ask, never a reason to decide alone.

Never

  • Never build the simulation as a MATLAB script. Use scripts only for setup and analysis.
  • Never hand-roll kinematics with Integrator or MATLAB Function blocks. Use the actor block.
  • Never use MATLAB Function blocks for coordination logic.
  • Never build first and report a deviation afterward. An unapproved deviation is a violation.
  • Never clamp or saturate an output to hide a wrong value. Fix the parameter that caused it.
  • Never rely on automatic signal names at bus boundaries. Name every signal explicitly.
  • Never write to the shared dictionary inside a parallel sweep. Override parameters per simulation instead.

Key Functions

Function or blockPurposeToolboxAvailable From
Kinematic Aerospace ActorKinematic motion, inertial sensing, and target tracking for one vehicleAerospace BlocksetR2026b
Aero.trajectory.polylineTrajectoryStraight legs between waypointsAerospace BlocksetR2026a
Aero.trajectory.bezierTrajectory, polynomialTrajectory, circularTrajectorySmooth transit between two pointsAerospace BlocksetR2026a
Aero.trajectory.parallelSweepTrajectory, creepingTrajectory, expandingSquareTrajectory, sectorTrajectory, tracklineTrajectorySearch patternsAerospace BlocksetR2026a
Aero.trajectory.lissajousTrajectory, spaceFillingTrajectoryCoverage patternsAerospace BlocksetR2026b
Aero.trajectory.mergeJoin two trajectories with a smooth transitionAerospace BlocksetR2026b
Aero.trajectory.addEventAdd named events to a trajectoryAerospace BlocksetR2026a

Trajectory Selection

Mission intentUse
Transit through waypoints (default)polylineTrajectory
Smooth transit between two pointsbezierTrajectory or polynomialTrajectory
Perimeter patrol, loiter, orbit, or transit with turn-radius limitscircularTrajectory
Area searchparallelSweepTrajectory, creepingTrajectory, expandingSquareTrajectory, sectorTrajectory, tracklineTrajectory
Area coverage (R2026b)lissajousTrajectory, spaceFillingTrajectory
Join two segments of the same familyPriorTrajectory on the new segment
Join a smooth segment and a waypoint segmentmerge (R2026b). PriorTrajectory does not support mixing the families
ref = Aero.trajectory.parallelSweepTrajectory( ...
    DatumPoint=[100 50], Bearing=pi/4, ...
    FieldLength=500, FieldWidth=200, TrackSpacing=25, ...
    Speed=15, Altitude=100);

The output is a struct of timeseries: xNorth, yEast, Speed, Altitude, Heading, FlightPathAngle, WaypointIndex. Run help Aero.trajectory.<name> for exact arguments. Read references/mission-planning-reference.md for arguments, gotchas, and packing.

Actor Selection

Vehicle roleActor typeControlled channels
Aircraft, fixed-wing UAVs (default)Fixed WingSpeed, flight path angle, heading or bank
High-maneuver aerial vehicles, agile UAVsAgile Aerial VehicleSpeed, lateral and vertical acceleration
Ships, ground vehiclesSurface VehicleSpeed, heading
SceneNavigation frame
Local, under about 50 km (default)Flat Earth
Latitude and longitude inputs or outputsWGS84 Ellipsoid
Earth-centered Cartesian positionsECEF Frame

Read references/frame-consistency-rules.md when you set up a scene or debug distances and positions.

Use model_query_params with params: ["all"] on an actor block to read its parameters and valid values. Read references/actor-models-reference.md for ports, buses, dynamics, and the tracker.

Gotchas

  • Bearing, AbsoluteBearing, and RelativeBearing are in RADIANS.
  • parallelSweepTrajectory takes FieldLength, FieldWidth, TrackSpacing. It has no SweepWidth or LegSpacing.
  • Altitude has no default on the waypoint and search functions. Omitting it errors.
  • Search patterns require DatumPoint and Bearing.
  • A vector argument (for example Speed=[15 20 25]) returns a cell array, one trajectory per element. Index it with traj{k}.
  • Only polylineTrajectory takes CoordinatePlane. All other functions output Flat Earth NED.
  • Trajectory angles are radians. The actor reads angles in its Attitude units (default Degrees). Convert when you pack the signals.
  • Declare the unit convention once, in the data dictionary. Store each angle parameter in the unit of the layer that reads it, and check units at every boundary. Never assume they match.
  • Hold the last trajectory value until the simulation stop time. Otherwise the reference signal ends early.
  • Bus element ORDER must match the actor's port definition. Element names are free.
  • In Flat Earth, Fixed Wing and Agile Aerial Vehicle positions are NED. Surface Vehicle positions are ENU. Convert before you compute distances between them.
  • Surface vehicles stay at constant altitude. Do not set FPA or altitude dynamics on them; those parameters have no effect.
  • Detection type defaults to None. Set it to Tracker, or no target is ever detected.
  • Feeding actor states back into another actor's Target States input can create an algebraic loop. Insert a Unit Delay.
  • Reuse one referenced vehicle model when instances have the same ports (same number, and the same bus signals in the same order). Feed each instance its trajectory through an Inport and vary its parameters with model arguments. Use a separately named model when any port differs. Read references/architecture-components.md § Per-Instance Data.

Coordination

Mission typePattern
Surveillance, coverageTiming Gate
Formation flightLeader Rotation
Staged or sequential area entryPhased Entry
Any mission with abort criteriaRecall Watchdog, in parallel with the primary pattern

Feed each vehicle's Actor States bus into the chart. Feed the chart's mode or phase output back into each vehicle model, and select that vehicle's reference from it. Use temporal logic (after(N, sec)), never manual counters. Read references/coordination-patterns.md for each pattern.

Validation

Run these checks through the MCP tools after you build or change a model.

CheckHowRun when
Frame consistencymodel_query_params with params: ["actorFrame"] on every actor block. All values must matchAfter you add or change an actor
TrajectoryPlot xNorth against yEast for each trajectoryBefore wiring
Compileevaluate_matlab_code: mdl([],[],[],'compile'); mdl([],[],[],'term')After wiring buses
SimulationRun through simulating-simulink-models and plot each vehicle's pathAfter compile passes
Mission intentCompare simulated results against numbers you wrote down before the buildBefore you report complete

Mission intent. Before you build, write down the numbers the scenario must produce: closest-approach distances and times, mode-change times, detection windows. After simulation, compare the results against them. "It compiles" is not a pass criterion.

Before you report complete, mark each Always and Never rule as yes, approved deviation (with the user's approval), or VIOLATION. "Partly" counts as a violation. Name every violation in the report and do not call the task complete. Do not hide a violation as a design note, an "as-built deviation", or a known limitation.

Deliverables

Offer both at the start of the task.

  1. Run log (buildLog.md, updated as you work): the plan, the action history, each error and its fix, inputs and corrections from the user, and each approved deviation with its rule number, the user's decision, and the date.
  2. README (README.md): what each folder holds, how to run the simulation, and how to change fleet size, a trajectory, or a controller.

Read references/common-mistakes.md when a model misbehaves or a build step fails.


Copyright 2026 The MathWorks, Inc.


From the matlab/simulink-agentic-toolkit README

Simulink Agentic Toolkit

The Simulink® Agentic Toolkit enables you to use AI agents with Simulink. It gives your AI agent the knowledge and context to read, build, edit, and test Simulink models by using Model-Based Design best practices. It connects agents to Simulink through the MATLAB MCP Server, giving them the ability (tools) and the knowledge (skills) to work with Simulink models effectively. Use this toolkit to provide trusted Simulink capabilities to your agent. This toolkit helps prevent your AI coding agent from hallucinating, missing new features, and wasting time with extra steps that experienced Simulink users skip.

The toolkit provides:

  • MCP tools for reading, editing, querying, testing, and checking Simulink models
  • Agent skills encoding Model-Based Design best practices for model building, simulation, plant specification, testing, requirements, project management, and architecture modeling
  • Support for Claude Code, GitHub Copilot in Visual Studio Code, GitHub Copilot CLI, and OpenAI Codex

To use AI agents with MATLAB, install the MATLAB Agentic Toolkit. The Agentic Toolkit Installer can install both toolkits in one step.

How the Simulink Agentic Toolkit Works

┌───────────┐       ┌───────────┐       ┌──────────┐
│ AI Agent  │◄─MCP─►│MCP Server │◄─────►│ MATLAB / │
│ (Claude,  │       │ (MATLAB   │       │ Simulink │
│  Codex,   │       │ MCP)      │       └──────────┘
│  Copilot) │       └───────────┘
└───────────┘
      ▲
      │ reads
┌─────┴─────┐
│  Skills   │
│ (MBD best │
│ practices)│
└───────────┘

Your agent reads skills for domain knowledge, then calls MCP tools to interact with MATLAB and Simulink. The MATLAB MCP Server bridges the connection.

Requirements

  • MATLAB R2023a or later with Simulink
  • An AI coding agent that supports MCP servers and skills. The installer configures supported agents automatically. To manually configure the MCP server and install skills, see the documentation for your agent. Supported agents include:
  • Simulink Test (optional) — required only for the model_test tool
  • Some skills require additional toolboxes (e.g., System Composer, Simscape, Stateflow). Check the requires-products field in each skill's manifest.yaml under skills-catalog/ for additional requirements.

Get Started with Simulink Agentic Toolkit

These steps show you how to install the Simulink Agentic Toolkit and the MATLAB MCP Server and how to add skills to your agent.

Install the Simulink Agentic Toolkit

To install, update, or uninstall the Simulink Agentic Toolkit and MATLAB MCP Server together, use the Agentic Toolkit Installer. Follow the installation instructions in the repository. The installer downloads the toolkit and MATLAB MCP Server, installs the required MATLAB toolboxes, and configures the MCP server and skills for your agent.

When you use the installer, you do not need to set up the toolkit for each MATLAB session. The toolkit is automatically available on the MATLAB path, and agents can connect to MATLAB automatically. To use an existing MATLAB session and retain its workspace and loaded models, run shareMATLABSession in that session.

Existing users: If you previously set up the toolkit by using setupAgenticToolkit or the earlier agent-driven workflow, the installer detects the previous installation and prompts you to remove it. You no longer need to run satk_initialize. Remove satk_initialize from your startup.m file. For more information, see Migrate from a Previous Installation.

Verify the Installation

To check your installation, run this in MATLAB:

satk_doctor

satk_doctor checks the toolkit's MATLAB tools, the MATLAB path, and MATLAB session sharing. To check installed versions, configured agents, and the MCP server, run agentic-toolkit-installer status in a terminal. Confirm that your agent lists the Simulink Agentic Toolkit skills. For example, in Claude Code, use the /skills command.

Then, open a Simulink model. You can use your own model or open an example model.

openExample('simulink_general/sldemo_househeatExample')

This command opens the shipped example model sldemo_househeat. Ask your agent:

Describe the structure of the currently open model.

For troubleshooting, see Configuration and Troubleshooting.

Library Configuration

Toolbox Libraries

Use satk.Configuration.setToolboxes to activate pre-built knowledge bases for installed MathWorks toolboxes:

satk.Configuration.setToolboxes('all')                                 % Activate all installed toolbox KBs
satk.Configuration.setToolboxes({'Aerospace Blockset', 'Simscape'})    % Activate specific toolboxes by name
satk.Configuration.setToolboxes('none')                                % Deactivate all toolbox KBs

Custom Libraries

To use your own custom Simulink block libraries with the toolkit, register them in MATLAB once:

satk.Configuration.setCustomLibraries("C:\path\to\customLibs")

This declares your custom libraries. By default (GenerateKB=false), the toolkit does not build the knowledge base immediately. Instead, the agent indexes the libraries into a knowledge base on the next model-building task or when you invoke the setup-custom-libraries skill. Indexing takes about 3–5 minutes and enables the agent to use custom blocks alongside built-in ones.

Each entry is either a folder, which registers every .slx and .mdl file in it, or the path to a single library file. To register more than one entry, pass a string array or a cell array:

% Multiple folders
satk.Configuration.setCustomLibraries(["C:\path\to\motorLibs", "C:\path\to\sensorLibs"])

% Individual library files
satk.Configuration.setCustomLibraries(["C:\libs\motorLib.slx", "C:\libs\sensorLib.slx"])

Each call replaces the full set of registered custom libraries instead of adding to it, so list every library that you want in a single call.

Options

setCustomLibraries accepts the following options:

% Build the knowledge base deterministically from block metadata present in the libraries. 
satk.Configuration.setCustomLibraries("C:\path\to\customLibs", GenerateKB=true)
% Choose where the KB and configuration folder is written.
% Omitted  -> MATLAB prefdir (default): per-user, global, paths stored absolute.
% <dir>    -> an existing directory: library paths on the same drive are
%             stored relative to this root (so the .satk folder can be
%             committed and shared); paths on a different drive are stored
%             absolute.
satk.Configuration.setCustomLibraries("libs", Location="C:\repo\myProject")

When you register custom libraries with a Location, activating toolbox knowledge bases with setToolboxes writes them into that same .satk folder.

If you activate toolbox KBs globally first and later register custom libraries with a Location, the toolkit automatically moves the toolbox KBs alongside the custom libraries.

Clearing Configuration

To remove the global (prefdir) library configuration:

satk.Configuration.clearConfig()

To remove a project-local configuration, including its .satk/ folder and any satk-libraries.json file at the project root, run this command. For example, remove the project configuration if it shadows the global configuration and you want the global configuration to take precedence.

satk.Configuration.clearConfig("C:\repo\myProject")

Both forms are destructive and not reversible.

MCP Tools

After you install the Simulink Agentic Toolkit, your agent can use the following tools.

ToolWhat your agent can do
model_overviewExplore model architecture. Review subsystem hierarchy, interfaces, and how major components connect
model_readUnderstand model behavior. Inspect blocks, algorithmic expressions, signal flow, and parameter values
model_editBuild and modify models. Add blocks, wire signals, create subsystems, and configure parameters as needed
model_checkValidate model structure. Detect unconnected ports, dangling lines, and edit-time check issues in states and subcharts
model_read_diagnosticsRead diagnostics. Retrieve errors, warnings, and info messages from the Diagnostic Viewer after compilation, simulation, or code generation
model_testVerify requirements. Run human-readable Gherkin tests with automatic harness generation (requires Simulink Test)
model_query_paramsInspect any parameter. Query block settings, signal properties, solver config, and logging flags
model_resolve_paramsGet actual values. Resolve workspace variables such as Kp to their numeric values across all scopes
model_scanFind something specific, fast. Regex-search the saved .slx file on disk for a block name, parameter value, or string without loading the model

Agent Skills

After you install the Simulink Agentic Toolkit, your agent can use the skills in the following groups. To see lists of available skills, see the skills catalog.

Skill GroupDescription
Model-Based Design CoreCore Model-Based Design (MBD) skills for building, testing, and specifying Simulink models
Model-Based System EngineeringModel-Based System Engineering skills for System Composer architecture models
Verification, Validation, and TestAuthor custom Model Advisor checks, run compliance reviews against industry standards (MISRA, MAB, ISO 26262, DO-178C, etc.), fix SLDV incompatibilities, and explain missing coverage
Simulink SimulationSkills for constructing simulation input datasets and configuring simulation workflows
Simulink ModelingConfigure and integrate C/C++ and Python code into Simulink models via C Function and Python Code blocks
Control SystemsControl system design and analysis skills for Simulink models
Simulink Environment FundamentalsCore Simulink environment capabilities, including discovering shipped example models
Signal ProcessingBuild frame-based streaming DSP models in Simulink by using DSP System Toolbox
Physical ModelingModel, simulate, and analyze multidomain physical systems with the Simscape product family
Code GenerationPrepare Simulink models for production code generation, including single-precision conversion, optimizing generated embedded code, configuring Embedded Coder deployment settings, and customizing A2L calibration files
Real-Time Simulation and TestingConfigure, deploy, and run Simulink models on real-time target computers with Simulink Real-Time
Simulink Block and Blockset AuthoringAuthor the appearance of custom Simulink blocks, such as dynamic SVG block icons
AerospaceAerospace skills for Simulink models using Aerospace Blockset

Security Considerations

When you use the Simulink Agentic Toolkit and MATLAB MCP Server, review and validate all tool calls before you run them. Always keep a human in the loop for important actions, and proceed only when you are confident that the call does what you expect. For more information, see User Interaction Model (MCP) and Security Considerations (MCP).

Licensing and Usage

The license is available in the LICENSE.md file in this GitHub repository.

MCP servers are only permitted to be used with MATLAB and Simulink in accordance with the MathWorks Software License Agreement, and must not be shared by multiple users. Contact MathWorks if you need to support shared or centralized server use.

Research Preview: Agentic Task Explorer

The Agentic Task Explorer provides curated, multi-step tasks that show what agents can do with Simulink — model understanding, creation, editing, testing, bug fixing, and verification. Each task includes Simulink models and supporting files, ready to go.

slAgenticTaskExplorer

Select a task from the interactive UI. The explorer stages it into an isolated workspace with all required files, then opens your coding agent. Each task presents step-by-step prompts — copy each prompt into your coding agent and watch it work.

This is a research preview. Behavior and interfaces might change.


Report Bugs

If you encounter a bug, use the filing-bug-reports skill to generate a report before opening a GitHub issue. Ask your agent:

File a bug report for this issue

The skill automatically captures environment details, reproduction steps, and error output. Run the skill in the same session where the bug occurred, because it uses conversation context to reconstruct what happened. Then open a bug report and paste the generated report.


Support and Contributions

MathWorks encourages you to use this repository and provide feedback. To request technical support or submit an enhancement request, create a GitHub issue or contact technical support. For installation issues, see the Agentic Toolkit Installer repository. For MATLAB MCP Server issues, see the MATLAB MCP Server repository.

This repository does not accept pull requests. See CONTRIBUTING.md for details.

Copyright 2025-2026 The MathWorks, Inc.

Details

Marketplace
matlab/simulink-agentic-toolkit
Source
skills-catalog/aerospace
Author
MathWorks
Category
Development
Keywords
simulink, aerospace, aerospace-blockset, multi-vehicle, uav, mission-planning, trajectory

More from matlab/simulink-agentic-toolkit

All 13

Similar to aerospace

More Development Tools