Preface¶
Initial motor selection typically requires scanning a vast combination of geometric and electromagnetic parameters under constraints such as power, speed, and voltage, before handing off to solvers like RMxprt and Motor-CAD for detailed calculations. With so many candidates, solver time gets consumed entirely by clearly infeasible schemes; if the model is made to call tools step-by-step within a DSH conversation and echo the complete matrix back into context, it will hit DSH’s ~2000-line read limit—counts mismatch, intermediate results silently drop rows, and orchestrating a three-step chain carries structural risks.
dsh-motor-ai-l0 is a DSH plugin (bundle) published by maintainer wangxuewangxue98, implemented purely in JavaScript with no dependency on RMxprt, Motor-CAD, Python, or commercial licenses. It performs “parameter matrix → physical validation → L0 estimation ranking” locally, compressing e.g. 120 candidates down to TopN (documented examples in the tens of milliseconds), leaving only the worthwhile schemes for optional L1/L2 detailed computation. The following sections cover positioning, toolchain, installation, and usage notes.
What Is This¶
The plugin serves as the L0 layer of the motor design workflow within the DSH ecosystem: the requirements side specifies power, speed, voltage, etc.; the plugin generates a focused scan candidate matrix (not a simple Cartesian product), applies 17 physical consistency checks, then uses surrogate models and empirical formulas for millisecond-level estimation and ranking, outputting TopN and a handoff payload for L1. L1 (RMxprt magnetic circuit method) and L2 (Motor-CAD finite element) have reserved interfaces in this version but no delivered call capability.
The shared core logic comes from the npm package @wangxue98/dsh-motor-ai-core; the current package version is 0.6.5, licensed under MIT. DSH compatibility range is >=0.1.2 <0.3.0, and Node requires >=22.0.0.
Directory page: SkillHub · dsh-motor-ai-l0
Source code and documentation: GitHub · wangxuewangxue98/dsh-motor-ai-l0
Core Capabilities and Boundaries¶
Capabilities delivered in this version include: candidate parameter matrix generation, batch physical validation, L0 estimation ranking, TopN handoff, and regression quality gates. Explicitly not included: RMxprt / Motor-CAD calls, MCP Server, Python bridging, and multi-objective optimization.
| Layer | Engine | Speed (documented) | Status in This Version |
|---|---|---|---|
| L0 | Surrogate model + empirical formulas | Millisecond level | Delivered |
| L1 | RMxprt (optional) | ~1–3s/scheme | Reserved |
| L2 | Motor-CAD (optional) | ~200s/scheme | Reserved |
L0 results carry solve_mode='l0', used for ranking and relative comparison; the documentation emphasizes that L0 absolute values should not be used as final delivery conclusions—final values must come from L1/L2.
Formula Channel vs. Surrogate Channel (division of labor since v0.2.2)
- Default
l0Mode: 'auto'/'formula': outputs complete fields such as efficiency, temperature rise, loss breakdown, tooth/yoke flux density, power factor, feasibility verdict, suitable for routine ranking. l0Mode: 'surrogate': the surrogate model primarily supplements efficiency ranking references; PMSM and out-of-segment samples automatically fall back to the formula channel. When the surrogate is unavailable or confidence falls below the threshold, it also degrades—no hard numbers are forced.
When the formula channel is uncalibrated, confidence is marked as 0.5 (since v0.2.7), indicating it can be used for ranking but not as a high-confidence absolute value.
Tool Overview¶
| Tool | Purpose | Key Inputs |
|---|---|---|
motor_l0_pipeline |
Recommended entry: runs the full three-step chain in-process, returning only a compact summary and file handoff path to avoid context truncation | power_kw speed_rpm count top_n write_handoff |
motor_param_matrix |
Generates candidate matrix from power/speed/voltage etc. | power_kw speed_rpm voltage_v poles count |
motor_design_validate |
17 physical checks, returns passed / warning / failed |
params_list escalate bg_caliber |
motor_l0_estimate |
L0 estimation, ranking, L1 handoff payload | params_list top_n sort_by |
Input aliases: power→power_kw, rpm→speed_rpm, volt→voltage_v.
sort_by whitelist: efficiency, torque_density, temp_rise, total_loss, power (temp_rise and total_loss ascending—smaller is better).
Pipeline order (only split when debugging individually)
motor_param_matrixmotor_design_validatemotor_l0_estimate(only acceptsparams_listcontaining 16 L1 top-level fields; does not accept scatteredpower_kw/speed_rpm)
For daily use, prioritize the aggregated tool motor_l0_pipeline: when count=120, the single-step motor_param_matrix echo can exceed 4000 lines, easily triggering DSH’s 2000-line limit without any error.
Installation and Activation¶
Installation commands follow the repository README:
# Install (use npx if dsh is not on PATH)
npx -y @deepseek-ai/dsh plugin --profile web add dsh-motor-ai-l0
After installation, an offline self-check can be performed in the plugin directory (no DSH Runtime needed, bare Node suffices):
node scripts/verify.mjs
The plugin runs with the current DSH process permissions; before installing, review the source code and MIT license on GitHub, and confirm your Node version satisfies >=22.0.0.
Configuration resides in the bundle’s cordis.patch.yml; the merged configuration can be viewed with:
npx -y @deepseek-ai/dsh --profile web --dump-config
Common options include: level (default 'l0', setting to l1/l2 will fail fast), l0Mode, surrogatePath, surrogateConfidenceThreshold, efficiencyCap, insulationClass, line_freq_hz (60Hz or VFD conditions must be explicitly set, otherwise the 50Hz default may cause validation misjudgment). The full configuration table is in the repository’s docs/ENGINEERING.md.
Typical Usage¶
The README provides a real-run summary for a 15kW / 1460rpm / 380V induction motor with 120 candidates, full chain ~16ms:
motor_param_matrix { power_kw: 15, speed_rpm: 1460, voltage_v: 380, motor_type: 'induction', count: 120 } → 120 candidates
motor_design_validate 17 physical checks → 0 passed / 80 warning / 40 failed
motor_l0_estimate sort_by: 'efficiency' → Top5, OD310 / 6 poles / η=95.17%
The ranked Top5 can directly serve as L1 inputs, rather than handing all 120 schemes to the solver. The repository’s examples/ also includes cases such as 75kW induction and 200kW high-speed PMSM counterexamples with reproduction instructions.
In DSH conversations, the equivalent workflow should be completed in one call via motor_l0_pipeline, reading the returned count self-check, Top10, and handoff path—rather than having the model manually chain three steps and ingest the full matrix.
Applicable Scenarios and Notes¶
Who It’s For
- Already using DSH for motor scheme exploration, needing fast broad screening and relative comparison before deciding whether to proceed to RMxprt / Motor-CAD.
- Wanting to run matrix and L0 locally without pre-installing heavy CAE and Python environments.
Must Know
- L0 is a ranking layer, not a sign-off layer; the formula channel’s
confidence: 0.5merely indicates uncalibrated—do not treat as final values. - The free quota (
freeQuotaEnabled, default on) is a local natural-day hard gate (documented default 10/day); it is independent of desensitized telemetry (telemetryEnabled: false, default off). When no backend URL is configured, no bypass network waiting should occur. - Tool calls append metadata (count, elapsed time, scale, etc.) to the local
~/.dsh/storages/dsh-motor-ai-l0/usage.jsonl, without recording design parameter content; can be disabled viausageLog. - The community directory SkillHub is an independent site with no official affiliation with DeepSeek / 幻方; the plugin is published by community maintainers—please independently assess compliance and data export strategies before use (if telemetry is enabled).
Conclusion¶
dsh-motor-ai-l0 brings the most time-consuming “broad screening” of the motor design workflow into the DSH plugin process: millisecond-level L0, physical validation, and TopN handoff, deliberately using motor_l0_pipeline to avoid conversation context truncation. Detailed computation is still left to future L1/L2 or your existing RMxprt / Motor-CAD toolchain.
- Directory page: https://www.skillhub.cn/plugins/wangxuewangxue98/dsh-motor-ai-l0
- GitHub: https://github.com/wangxuewangxue98/dsh-motor-ai-l0