Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Motor control algorithms and driver implementation
.claude/skills/a5c-ai-motor-control/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 40% | 0% |
| case-19 | ✗→✓ | ▲ Improved | -32% | 0% |
| case-16 | ✓→✗ | ▼ Worse | 29% | 0% |
| case-04 | ✓→✓ | = Same ✓ | 12% | 0% |
| case-06 | ✓→✓ | = Same ✓ | 124% | 0% |
This skill provides motor control algorithm implementation and driver development expertise for embedded systems controlling DC, BLDC, stepper, and AC induction motors.
device-driver-development.js - Motor driver implementationreal-time-architecture-design.js - Real-time control designisr-design.js - Control loop ISR designThis skill is invoked when tasks require:
| Type | Control Method | Feedback | |------|---------------|----------| | Brushed DC | PWM duty cycle | Encoder optional | | BLDC | Six-step, FOC | Hall, encoder, sensorless | | PMSM | FOC | Encoder, resolver, sensorless | | Stepper | Step/direction, microstepping | Open-loop, encoder | | AC Induction | V/f, FOC | Encoder, sensorless |
ctypedef struct { float i_alpha, i_beta; // Clarke transform output float i_d, i_q; // Park transform output float v_d, v_q; // Voltage commands float v_alpha, v_beta; // Inverse Park output float theta; // Rotor angle float speed; // Rotor speed } foc_state_t; void foc_current_loop(foc_state_t* state, float i_a, float i_b, float i_c) { // Clarke transform clarke_transform(i_a, i_b, i_c, &state->i_alpha, &state->i_beta); // Park transform park_transform(state->i_alpha, state->i_beta, state->theta, &state->i_d, &state->i_q); // PI controllers state->v_d = pi_controller(&pid_d, state->i_d_ref - state->i_d); state->v_q = pi_controller(&pid_q, state->i_q_ref - state->i_q); // Inverse Park inv_park_transform(state->v_d, state->v_q, state->theta, &state->v_alpha, &state->v_beta); // SVPWM svpwm_generate(state->v_alpha, state->v_beta, pwm_duties); }
yamlmotor_control: motor_type: bldc | pmsm | stepper | induction control_method: foc | six_step | vf | step_dir pwm_frequency: 20000 # Hz current_loop_rate: 20000 # Hz speed_loop_rate: 1000 # Hz feedback: encoder | hall | sensorless
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 18,375 | 51,575 | +181% | 1 | 1 | 0% | 4,006 | 5,615 | +40% | 0 | 0 | — |
case-02 | fail→fail | 31,195 | 20,944 | -33% | 1 | 1 | 0% | 5,997 | 5,178 | -14% | 0 | 0 | — |
case-03 | fail→fail | 27,518 | 35,009 | +27% | 1 | 1 | 0% | 4,027 | 7,640 | +90% | 0 | 0 | — |
case-04 | pass→pass | 24,984 | 21,067 | -16% | 1 | 1 | 0% | 4,839 | 5,403 | +12% | 0 | 0 | — |
case-05 | fail→fail | 27,455 | 36,228 | +32% | 1 | 1 | 0% | 4,720 | 7,454 | +58% | 0 | 0 | — |
case-06 | pass→pass | 24,263 | 45,815 | +89% | 1 | 1 | 0% | 3,893 | 8,704 | +124% | 0 | 0 | — |
case-07 | pass→pass | 20,197 | 36,203 | +79% | 1 | 1 | 0% | 3,142 | 7,950 | +153% | 0 | 0 | — |
case-08 | pass→pass | 25,586 | 31,138 | +22% | 1 | 1 | 0% | 3,722 | 6,243 | +68% | 0 | 0 | — |
case-09 | pass→pass | 28,363 | 30,832 | +9% | 1 | 1 | 0% | 4,071 | 6,527 | +60% | 0 | 0 | — |
case-10 | pass→pass | 22,823 | 21,134 | -7% | 1 | 1 | 0% | 3,134 | 4,175 | +33% | 0 | 0 | — |
case-11 | fail→fail | 18,440 | 19,427 | +5% | 1 | 1 | 0% | 2,679 | 3,877 | +45% | 0 | 0 | — |
case-12 | pass→pass | 22,166 | 26,346 | +19% | 1 | 1 | 0% | 3,379 | 5,101 | +51% | 0 | 0 | — |
case-13 | pass→pass | 23,250 | 26,384 | +13% | 1 | 1 | 0% | 3,773 | 5,332 | +41% | 0 | 0 | — |
case-14 | pass→pass | 46,772 | 43,774 | -6% | 1 | 1 | 0% | 8,221 | 9,232 | +12% | 0 | 0 | — |
case-15 | pass→pass | 15,355 | 20,417 | +33% | 1 | 1 | 0% | 2,419 | 4,813 | +99% | 0 | 0 | — |
case-16 | pass→fail | 23,383 | 16,807 | -28% | 1 | 1 | 0% | 3,145 | 4,049 | +29% | 0 | 0 | — |
case-17 | fail→fail | 21,229 | 19,692 | -7% | 1 | 1 | 0% | 3,334 | 4,196 | +26% | 0 | 0 | — |
case-18 | pass→pass | 21,006 | 28,002 | +33% | 1 | 1 | 0% | 3,955 | 5,372 | +36% | 0 | 0 | — |
case-19 | fail→pass | 20,975 | 5,790 | -72% | 1 | 1 | 0% | 2,937 | 1,989 | -32% | 0 | 0 | — |
case-20 | pass→pass | 27,926 | 38,690 | +39% | 1 | 1 | 0% | 6,065 | 7,462 | +23% | 0 | 0 | — |
case-21 | pass→pass | 28,918 | 22,323 | -23% | 1 | 1 | 0% | 4,520 | 5,722 | +27% | 0 | 0 | — |
case-22 | pass→pass | 21,713 | 19,369 | -11% | 1 | 1 | 0% | 3,454 | 5,015 | +45% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +5 percentage points is the difference between those two pass rates over the 22 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.