How about AC impedance analysis?The good results for the DC analysis got me thinking if Claude would be able to implement Python scripts for AC (impedance) analysis as well? This could not be simple! The AC analysis options for CAD packages are expensive. Can Claude cobble something together within a few hours? Time to find out!
After some tinkering, honing and clauding and installing ngspice, Claude came up with a solution where it would mesh the traces and model these into a PSpice circuit. But I wanted verification as well so this required doing some measurements.
I decided to measure two points on the board. The first point is at the capacitors right next to the DC-DC converter, the second at a ball for the FPGA. I used a DIY impedance probe with a 1 Ohm reference resistor and 1 Ohm current injection resistor to do the measurements using FRA analysis on a DSO. As R&S has been so kind to let me play with an MXO3 for a while and it can do FRA up to 50MHz, I used that.
First the test setup:

I setup the MXO3 to do the FRA and pointed Claude to the IP address the MXO3 sits at and told Claude to get FRA data using SCPI over telnet + Pyvisa. That worked just fine. It is not in the MXO3's manual but you can telnet to port 5025 and type commands. No need for extra bloat.

After doing a null-measurement (probe shorted) Claude combined the data from the MXO3 and the simulation into this graph:

Nice. But I'm not convinced yet. So I wanted to measure another point. A ball on the FPGA. Fortunately the FPGA has a 1mm pitch so soldering wires to a pad is doable.

This resulted in a graph where simulation and measurement corresponded pretty well. So the simulations are trustworthy. Keep in mind that component variations can be large where it comes to capacitors. Back to the DUT: I noticed that the impedance was a bit high in certain places. What if I ask Claude to optimise? And sure enough, it went sweeping through some options and it came back suggesting to replace two 10nf 0402 capacitors with two 1uf 0402 capacitors. It resulted in this graph:

Again the measurement matched the prediction.
But ofcourse I had more questions. Like: What does each capacitor do?

This is an interesting graph to check if all capacitors do at least some work. It also shows the division of labour across the frequency band. A good question to ask Claude is whether capacitors can be left out.
Something else that interested me is what are the other effects? Because the power plane has capacitance and inductance as well. The latter is the reason why the impedance at the DC-DC converter is different compared to the impedance at the FPGA pad. So I let Claude produce this graph:

These graphs show a complete picture of what contributes to the PDN impedance across the frequency bands. It is quite informative.
Time for some real workI can't divulge too much into details of the big design I worked on. But it was impressive to use Claude combined with the AC and DC analysis tools to pinpoint weak points in the power distribution. But this required some work on the tooling as well. The power planes are large in a 250x250mm board and the Pspice models quickly ballooned to millions of points. Because it was late I let a simulation run overnight and the next morning it wasn't done even while loading the CPU 100%. So I had Claude do some hefty optimisations on how the models where created and optimised. In the end Claude came up with two flows: a simplified model for a quick scan and a complex model for more accuracy. And there is also an option to simulate with a regulator on or off. The whole workflow is run as Python scripts. Going for C or C++ isn't worth it as the cores used by Python for the calculations are written in C/C++ anyway.
For my complex design running 40+ nets through the simplified model took about 40 minutes. Using the complex model, my PC is working for several hours. But I have to say my PC starts to become outdated where it comes to speed. Also, these simulations need memory. With 48GB and some other programs (including a VM) I could only run two simulations in parallel. With a faster PC and more memory, the simulation time can be cut drastically.
Doing the optimisations was interesting. Some fixes required pushing in extra 0402 parts under the BGAs. Other fixes required using tantalum Polymer caps with a specific ESR (especially on power nets behind a ferrite bead; the ESR dampens the resonance with the bead). Just ask Claude how to optimise and it comes back with several options / suggestions to improve. More interestingly, in many places using a 100nf, 1uf and 10uf capacitor was the optimal solution. Some regard this as cargo cult engineering but the simulations at least show there is ground not to dismiss this. And there is also a lot to be gained from choosing the PCB stackup. For one net the solution was to put the power plane on a layer with less distance to the ground plane.
All in all I'm super happy with this. Earlier I was considering upgrading / expanding Orcad with power analysis but spending a day with Claude and doing measurements gave me the tooling for a fraction of the costs and with way more flexibility. Claude just adds features on the go.
Also worth mentioning is that I also fed the BOM into Claude which lead Claude to find the exact models for the parts and extract data needed for accurate modelling. Unfortunately some of this information is not reachable for AI so I had to add that manually. For unknown MLCC caps, the model uses an approximation for the DC bias effects (reduced capacity at increasing voltage).
And there is more!Dutch people are never satisfied and I'm no exception.

What else to do with the extracted data? Well, let Claude do an analysis of the PCB. Any lose tracks? Via placements to be optimised? Are there high speed return current vias in the right places? Remember; the design I'm working on has 100+ diff pairs so there are quite a few places where the pairs have to go to another layer which requires a return current via in place. Again, the tooling Claude made and drove worked like a charm. It came up with a list of useless vias going nowhere (as I ripped part of the design from another design, some parts became messy), overlapping vias, traces going nowhere, traces being close to diff pairs or sensitive traces, analysis of annular rings, etc. All in all very useful info which you don't get from a DRC analysis. And if there are more questions, Claude easely adds more analysis options.
Still not satisfied though.... A circuit board needs a casing. So I let Claude analyse the design to identify the connectors going to the outside world and create a technical drawing with the connector locations and mounting holes. That worked like a charm after some guidance on the layout of the drawing. But it still meant I would need to muck around with drawing a casing. So I asked to design the front and rear panels and pointed Claude to the directory with the datasheets for the connectors. For some reason Claude picked up a initial casing design I made with Protocase designer and offered to modify the design with the required opening. That process didn't go super smooth as Claude had to figure out the YAML format used by Protocase designer but after some guidance and placing some library cut-outs myself, Claude managed to get the cutouts right:
A casing designed (mostly) by AI from a PCB layout and BOM:

I specifically let Claude keep the definitions for the locations of the holes in a seperate file so what the tooling does is ingest a casing template and add the cutouts where needed.
Sharing is caringI like to think these tools (DC, AC, PCB check, case design) can be very handy to others. So I made them available through Github (under MIT license):
https://github.com/nctnico/Claude-PDN-toolsThere is a template in the project directory where the analysis results end up. The vendor directory has some models in it.
Right now the backend is for Allegro (running on Linux) but I'm sure Claude is able to find ways to extract the data needed from other PCBs package. It might even work from Gerbers and a pick & place file. I'm aware that Claude costs money. Perhaps a free AI can lead to similar results. Most of the heavy lifting where it comes to writing the analysis tools has been done already.