System Prompt Design
Variants within each controller family are allowed as long as they remain in that family. The primary objective is to achieve the best possible tracking of each degree of freedom to the constant target a fixed target value for each controlled degree of freedom.
A standardized code template is provided as a structural skeleton. The code template includes definitions of the controlled system and the two controller types. A brief description can be found in the appendix. The language model is instructed to fill in the specific TODO sections within this framework to ensure executability.
Fixed-3 Method
For the Fixed-3 method, the model is forced to perform exactly three iterations. The successful controller with the highest performance score among the three iterations is used for performance evaluation. If none of the three controllers satisfies the success criteria, the trial is marked as failed.
Success-Stop Method
For the Success-Stop method, the iteration terminates immediately once the designed controller meets the predefined success criteria. If the design fails, the model is permitted to retry up to the maximum limit of three attempts.
In each step, feedback from the previous iteration—including performance metrics or error logs—is provided to the model, allowing it to progressively refine the controller parameters or structure.

Distillation Strategies
DeepSeek-R1-Distill-Qwen-1.5B is adopted as the student backbone, motivated by evidence that models at this scale can support local inference on edge-class accelerators following standard deployment optimizations. GPT-5.5 serves as the teacher model and generates the supervision targets.
To investigate the role of intermediate diagnostic reasoning, two distillation variants are constructed from matched controller-tuning tasks.
Answer Distillation
The target consists of a concise rationale followed by executable controller code, without explicit supervision of the intermediate diagnostic process. This setting encourages the student to map the observed response history directly to a controller.
The resulting student is denoted as DeepSeek-1.5B-control-answer, or the Answer-Model.
Reasoning Distillation
The target consists of a teacher-generated reasoning trace followed by the same type of controller code. The reasoning trace describes how the observed system behavior is interpreted and how the corresponding controller modification is selected.
The resulting student is denoted as DeepSeek-1.5B-control-think, or the Think-Model.

Conflict of Interest Statement
The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.
Frequently Asked Questions
What is the primary objective of the controller-design task? The primary objective is to achieve the best possible tracking of each degree of freedom to a constant target.
How does the Fixed-3 method evaluate controller designs? It performs exactly three iterations and evaluates the successful controller with the highest performance score. If none meets the success criteria, the trial is marked as failed.
When does the Success-Stop method terminate iteration? It terminates immediately when the designed controller meets the predefined success criteria, with up to three attempts permitted if the design fails.
What is the difference between answer distillation and reasoning distillation? Answer distillation supervises a concise rationale and executable code, while reasoning distillation also supervises a teacher-generated diagnostic reasoning trace.
