Logo van Matlab Control Optimization

Matlab Control Optimization

Community
wzyn20051216
matlab-control-optimization

MATLAB workflow for control systems, system identification, robust control, MPC, Simulink Control Design, parameter tuning, constrained optimization, and numerical validation. Use whenever the user asks for controllers, transfer functions, state-space models, tuning, identification, optimal control, or solver-based engineering.

Overzicht

Uitgeverwzyn20051216
Repositorymatlab-agent-skills
Skillnaammatlab-control-optimization
Sterren
32
Forks
1
Meegeleverde bestanden
7
LicentieMIT
Links
  • Instructies in Markdown

    Het model laadt het bestand SKILL.md alleen als dat nodig is. Dat kost dus alleen tokens als een verzoek daadwerkelijk bij de skill past.

  • Werkt met elk LLM

    AI-skills bestaan uit instructies in gewone Markdown, niet uit aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • Meegeleverde bestanden: 7

    Scripts, sjablonen en referentiemateriaal die het model tijdens het werken kan lezen. De bestanden kunnen alleen worden gelezen en worden nooit uitgevoerd.

  • Open source

    Gepubliceerd door wzyn20051216 op GitHub. Bekijk de bronbestanden voordat je de skill installeert.

Installatie

Installeer de AI-skill Matlab Control Optimization in TypingMind om deze met elk LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map. De app leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/wzyn20051216/matlab-agent-skills/tree/main/skills/matlab-control-optimization
  4. Schakel de skill in voor elke chat waarin je de skill wilt kunnen gebruiken.
Plug-ins → Skills → Skill toevoegen → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/wzyn20051216/matlab-agent-skills.git /tmp/matlab-agent-skills
mkdir -p .claude/skills
cp -r /tmp/matlab-agent-skills/skills/matlab-control-optimization .claude/skills/matlab-control-optimization
Start Claude Code na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel Matlab Control Optimization in voor een chat naar keuze in TypingMind en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek bij de skill past, laadt het model zelf de volledige instructies. Je hoeft de skill nooit handmatig aan te roepen. Pas als het model de skill daadwerkelijk gebruikt, kost dat tokens.

Het model laadt Matlab Control Optimization automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is Matlab Control Optimization niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.

MATLAB Control Optimization

Use this skill for control design and optimization workflows.

Skill Root

The installed directory containing this SKILL.md is the resource root. Add its helper folder for the current MATLAB session only — never through savepath, startup.m, or a global path edit:

matlab
skillRoot = '<absolute path to the installed matlab-control-optimization Skill directory>';
addpath(fullfile(skillRoot, 'scripts'));

Resolve references/, tests/, and helper calls from that root, not from the caller's working directory. If a shipped helper or reference is missing, report the exact path and reinstall the Skill; do not scan the disk for a substitute.

Workflow

  1. Define plant model, units, sample time, constraints, and performance goals.
  2. Confirm required products: Control System Toolbox, System Identification Toolbox, Optimization Toolbox, Robust Control Toolbox, or MPC Toolbox.
  3. Build an executable baseline model.
  4. Tune or optimize with explicit objective and constraints.
  5. Validate time-domain, frequency-domain, and robustness behavior when applicable.
  6. Save plots, tuned parameters, and numerical metrics.

Preferred APIs

  • tf, ss, zpk, c2d, d2c
  • step, lsim, bode, margin, bandwidth
  • pidtune, systune, hinfsyn, musyn when licensed
  • iddata, tfest, ssest, compare
  • optimproblem, fmincon, lsqnonlin, ga, particleswarm

Validation Metrics

Use checks such as:

  • Rise time, settling time, overshoot.
  • Gain margin, phase margin, bandwidth.
  • Constraint violation count.
  • Objective value and solver exit flag.
  • Identification fit percentage on held-out data.

Risk Checklist

Watch for:

  • Continuous/discrete sample-time mismatch.
  • Unscaled optimization variables.
  • Local minima and solver sensitivity.
  • Hidden actuator saturation.
  • Controller instability outside nominal operating points.

Stability Is Three Answers, Not One

Use mas_stability_verdict before reporting any stability conclusion:

matlab
r = mas_ctrl_analyze(L);                 % every crossing, poles, notes
v = mas_stability_verdict(L);            % or mas_stability_verdict(r)
v.math.stability                         % STABLE | UNSTABLE | UNDETERMINED
v.target.status                          % PASS | FAIL | UNDETERMINED
v.evidence.quality                       % VERIFIED | PARTIAL | NOT VERIFIED
v.notes                                  % why a value is NaN / undetermined
r = mas_ctrl_pid_design(P, struct('pmTarget',50,'gmTarget',6));
r = mas_ctrl_aw_sim(P, cfg, opts);       % saturation + 'none'|'clamp'|'backcalc'

Never turn "MATLAB ran", "poles are stable", "PM passed", or "the curve looks smooth" into one of the other answers. A missing margin is UNDETERMINED, not PASS. When the closed-loop poles and the frequency margins disagree, the verdict is UNDETERMINED with an EVIDENCE_CONFLICT note.

Boundary rules this tool encodes (each one a paid-for defect):

  • margin() returns Gm as an absolute ratio, not dB; allmargin also reports a ratio. c2d(10/(s+1),0.01) has ratio 20.0002 = 26.02 dB.
  • Phase is unwrapped and PM is wrapped into (-180,180]. Without the wrap a negative-gain loop reports +275.7 deg instead of -84.26 deg.
  • DC unity gain has its PM at DC (1/(s+1) -> 180 deg), not NaN.
  • Phase = -180 at DC with |L|>1 is a negative GM at w=0; -10/(s+1) is UNSTABLE although its 0 dB crossing looks healthy.
  • Discrete loops reach -180 at pi/Ts; that Nyquist boundary must be checked.
  • Multiple crossings: the worst one binds, never the first.
  • Delay: rational closed-loop poles exclude the delay, so evidence is PARTIAL.

Units are explicit: every crossing carries f (Hz) and wRadPerSec (rad/s), and opts.freqUnit selects how wmin/wmax are interpreted. Verify w = 2*pi*f.

Full definitions, boundary table, and independent reference values: references/stability-contracts.md.

tests/test_ctrl_analyze.m covers the known-stable loop, known-unstable plant, multi-crossing loop, discrete and delayed loops, PID design and anti-windup. tests/test_stability_contract.m covers the negative-gain encirclement, DC unity, double integrator, discrete Nyquist margin, no-crossing target, target-not-met, Hz/rad-s equivalence, NaN/Inf/empty inputs, and margin return-order units.

Meegeleverde bestanden

Zolang de skill geladen is, leest het model deze bestanden als dat nodig is. Het model kan ze alleen lezen; ze worden nooit uitgevoerd.

Veelgestelde vragen

Wat doet de AI-skill Matlab Control Optimization?

MATLAB workflow for control systems, system identification, robust control, MPC, Simulink Control Design, parameter tuning, constrained optimization, and numerical validation. Use whenever the user asks for controllers, transfer functions, state-space models, tuning, identification, optimal control, or solver-based engineering.

Waarom Matlab Control Optimization gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. Matlab Control Optimization bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model. Ook als je midden in een chat van model wisselt, blijft de skill werken. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek af te sluiten. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik Matlab Control Optimization in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/wzyn20051216/matlab-agent-skills/tree/main/skills/matlab-control-optimization. TypingMind leest het bestand SKILL.md, bundelt de bijbehorende bestanden en installeert het geheel als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen Matlab Control Optimization gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met Matlab Control Optimization gebruiken?

Zoveel als je wilt. Je kunt Matlab Control Optimization gebruiken met elk model dat skills ondersteunt, zoals GPT, Claude, Gemini, Grok, DeepSeek, Mistral of Llama. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill Matlab Control Optimization gratis?

Ja. Deze skill is door wzyn20051216 op GitHub gepubliceerd onder de licentie MIT. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. De skill volgt het open Agent Skills-formaat: het bestand SKILL.md bevat de naam en beschrijving van de skill. Daarnaast kan de skill scripts, sjablonen of referentiebestanden bevatten die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Bekijk alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇