Proposed course · AI for simulation
Automate simulations with AI
Run tests, analyze results, and design and tune controllers.
The approach works with most simulation tools. I've personally tried it with PLECS, MATLAB, PSCAD, PSIM, LTspice and QSPICE, and it worked with all six. We'll use PLECS as the worked example in the course; the scripts and setup will vary between tools.
Three parts of the course
-
01 · Automated simulations
Have AI run your simulations.
Tell AI what you want to test, in plain language. It writes and runs the scripts that control your simulation tool, then brings back the results. You work with AI, rather than writing the scripts yourself. In our worked example, AI uses Python to control PLECS.
- Describe a test: ask AI to step the load at 1 second and record the output voltage. It sets up the test for you.
- Ask for a sweep: tell AI which parameters and ranges to explore. It sets up and runs hundreds or thousands of combinations, then collects the results.
- Let it run: ask AI to queue a batch that your PC can work through for hours without you watching every simulation.
- Monitor and recover: have AI set up progress tracking and safe retries, investigate crashes, and resume interrupted batches where possible. It can flag anything that needs your attention.
Sweep example: switching frequency
Ask AI: “Sweep the switching frequency at several input voltages, then plot the current ripple for each one.” AI sets up the runs and puts the results into one comparison plot. Calculated illustration, not a PLECS run: ideal buck, 12 V output, 100 µH inductor and 5 A load.
Test example: a load step
Ask AI: “Increase the load at 1 second and show me how the output voltage responds.” It implements the test and records the signals. Only the load changes during this test. Other tests you could ask AI to run:
- An input-voltage dip while the load stays fixed.
- A change in the controller's reference value.
- Startup under different loads.
The key idea: you describe the test and review the results; AI handles the scripting. Simulation automation was possible before AI, but you no longer have to write that automation yourself. Python is the tool AI uses behind the scenes in our example.
Unattended monitoring and crash recovery need to be configured and tested. Run time and coverage depend on your model, PC and test plan.
-
02 · Reports and results analysis
Make sense of your automated test results.
Use AI to analyze the automated tests and sweeps from Part 1. Ask it to organize the signals, calculate the useful numbers and put the results into clear plots and reports, so you don't have to open and analyze every run yourself.
Style your plots
Ask AI to adjust colours, line styles, axes, labels and legends so your plots are easy to read. Add annotations to highlight what matters: rise time, overshoot, settling time or steady-state error, for example.
In this example, rise time is measured from 10% to 90% of the final value. Settling means staying within ±2%. Keep labels clear of the curves.
One example of plot styling: a calculated response with rise time, overshoot and settling time marked. Labels stay clear of the curve. Sort signals into useful plots
Have dozens of logged signals? Ask AI to group voltages, currents and control signals, put related traces together and keep their time axes aligned.
For a load-step test, you might want bus voltage and its reference on top, inductor and load current below, and duty command underneath. Keep units, legends and the event time visible.
Example layout: three groups, one time axis. Separate scales keep small control signals from disappearing beside large voltages. Perform calculations
Tell AI what you want to calculate from the simulation results. FFT, THD, RMS and ripple are just a few examples. You could also calculate power, energy, efficiency or quantities derived from several signals, depending on the data and model you have.
The analysis window matters. For periodic signals, select complete steady-state cycles and record the sample rate and harmonic range used.
Calculated example: 4%, 3% and 1% harmonics give 5.1% THD when all other harmonics are zero. The 100% fundamental is omitted from the bars to make the smaller components readable. Build a report you can actually review
Start with the conclusion, show the cases that need attention, then include a comparison table and the relevant plots. Add test conditions, measurement definitions and links to the saved runs.
Ask AI to turn the automated batch from Part 1 into a short summary or a detailed report with a section for each test. You shouldn't have to search through a folder of screenshots to understand what happened.
Example report for three calculated cases: two meet both example limits, one needs review. The values and plotted responses come from the same data. Calculate more from the signals you already have
Power and efficiency: calculate average input and output power, with efficiency based on the losses included in your model.
Core flux-density swing: derive the change in flux density from winding voltage, the number of turns and core area.
Capacitor ripple: for a buck's output capacitor, reconstruct current from inductor current minus load current, even if capacitor current wasn't logged. Then calculate RMS ripple current, or estimate voltage ripple using capacitance and ESR.
These calculations need the right signals, circuit connections and component parameters. Keep the assumptions and analysis window in the report so you can check the result.
-
03 · Controller design and tuning
Design, debug and tune a controller.
Use one PFC converter throughout: an outer loop regulates the DC-bus voltage, while an inner loop controls the input current. Start from an existing controller or have AI help build the first draft.
Use AI to design the controller
Give AI the converter model, available measurements and your requirements. Ask it to propose the control structure, build a first implementation and set up the tests to check it.
For this PFC example, that includes both loops, the shaped current reference, initial gains and practical limits. You get a draft to test and improve, not just suggestions for a controller you've already made.
A simplified boost-PFC controller draft. Feedback, scaling, limits and sample times still need to be implemented and checked in the actual model. Use AI to debug the controller
When the PFC doesn't behave as expected, give AI the model, settings and recorded signals. Ask it to trace the problem through the voltage loop, current reference and current loop.
If measured current goes the opposite way to its reference, start by checking sensor polarity and feedback sign. AI can propose a focused test, help patch the problem and rerun it. The test should confirm the cause before you accept the fix.
A debugging example, not a confirmed fault: an inverted current signal is a reason to inspect polarity and signs before changing gains. Use AI to tune the controller
Once the structure works, have AI compare candidate gains against your requirements. For the PFC, check DC-bus response, current tracking and limits across the operating range, not just at one load.
Use the same test before and after each change. Keep the settings and results together so you can see what improved and what became worse.
Calculated normalized responses show how a before/after comparison can be presented. These are second-order teaching examples, not PFC simulation results or promised tuning gains. AI can help create, debug and tune the implementation. A working simulation draft still needs engineering review and validation before hardware use.
Illustrations, not measured PLECS results or guaranteed improvements. AI suggestions still need to be checked in simulation.
I'm interestedPlanned paid course. Price and timing are not set. Registering interest involves no payment or commitment.
Interested in the course?
Leave your email if you'd like updates about this course. The survey answers are optional, but they help me decide what to build.