frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

OpenCiv3: Open-source, cross-platform reimagining of Civilization III

https://openciv3.org/
598•klaussilveira•11h ago•177 comments

The Waymo World Model

https://waymo.com/blog/2026/02/the-waymo-world-model-a-new-frontier-for-autonomous-driving-simula...
906•xnx•17h ago•545 comments

What Is Ruliology?

https://writings.stephenwolfram.com/2026/01/what-is-ruliology/
22•helloplanets•4d ago•17 comments

How we made geo joins 400× faster with H3 indexes

https://floedb.ai/blog/how-we-made-geo-joins-400-faster-with-h3-indexes
97•matheusalmeida•1d ago•23 comments

Unseen Footage of Atari Battlezone Arcade Cabinet Production

https://arcadeblogger.com/2026/02/02/unseen-footage-of-atari-battlezone-cabinet-production/
28•videotopia•4d ago•0 comments

Show HN: Look Ma, No Linux: Shell, App Installer, Vi, Cc on ESP32-S3 / BreezyBox

https://github.com/valdanylchuk/breezydemo
204•isitcontent•11h ago•24 comments

Monty: A minimal, secure Python interpreter written in Rust for use by AI

https://github.com/pydantic/monty
202•dmpetrov•12h ago•93 comments

Show HN: I spent 4 years building a UI design tool with only the features I use

https://vecti.com
314•vecti•14h ago•137 comments

Microsoft open-sources LiteBox, a security-focused library OS

https://github.com/microsoft/litebox
353•aktau•18h ago•178 comments

Sheldon Brown's Bicycle Technical Info

https://www.sheldonbrown.com/
357•ostacke•17h ago•93 comments

Hackers (1995) Animated Experience

https://hackers-1995.vercel.app/
459•todsacerdoti•19h ago•231 comments

Delimited Continuations vs. Lwt for Threads

https://mirageos.org/blog/delimcc-vs-lwt
24•romes•4d ago•3 comments

Show HN: If you lose your memory, how to regain access to your computer?

https://eljojo.github.io/rememory/
259•eljojo•14h ago•156 comments

Dark Alley Mathematics

https://blog.szczepan.org/blog/three-points/
80•quibono•4d ago•20 comments

An Update on Heroku

https://www.heroku.com/blog/an-update-on-heroku/
394•lstoll•18h ago•267 comments

PC Floppy Copy Protection: Vault Prolok

https://martypc.blogspot.com/2024/09/pc-floppy-copy-protection-vault-prolok.html
53•kmm•4d ago•3 comments

Was Benoit Mandelbrot a hedgehog or a fox?

https://arxiv.org/abs/2602.01122
7•bikenaga•3d ago•1 comments

How to effectively write quality code with AI

https://heidenstedt.org/posts/2026/how-to-effectively-write-quality-code-with-ai/
235•i5heu•14h ago•178 comments

Vocal Guide – belt sing without killing yourself

https://jesperordrup.github.io/vocal-guide/
4•jesperordrup•1h ago•0 comments

Introducing the Developer Knowledge API and MCP Server

https://developers.googleblog.com/introducing-the-developer-knowledge-api-and-mcp-server/
47•gfortaine•9h ago•14 comments

Female Asian Elephant Calf Born at the Smithsonian National Zoo

https://www.si.edu/newsdesk/releases/female-asian-elephant-calf-born-smithsonians-national-zoo-an...
26•gmays•6h ago•8 comments

Why I Joined OpenAI

https://www.brendangregg.com/blog/2026-02-07/why-i-joined-openai.html
123•SerCe•7h ago•103 comments

I spent 5 years in DevOps – Solutions engineering gave me what I was missing

https://infisical.com/blog/devops-to-solutions-engineering
136•vmatsiiako•16h ago•60 comments

Show HN: R3forth, a ColorForth-inspired language with a tiny VM

https://github.com/phreda4/r3
68•phreda4•11h ago•12 comments

Understanding Neural Network, Visually

https://visualrambling.space/neural-network/
271•surprisetalk•3d ago•37 comments

I now assume that all ads on Apple news are scams

https://kirkville.com/i-now-assume-that-all-ads-on-apple-news-are-scams/
1047•cdrnsf•21h ago•431 comments

Zlob.h 100% POSIX and glibc compatible globbing lib that is faste and better

https://github.com/dmtrKovalenko/zlob
14•neogoose•4h ago•9 comments

Learning from context is harder than we thought

https://hy.tencent.com/research/100025?langVersion=en
171•limoce•3d ago•92 comments

FORTH? Really!?

https://rescrv.net/w/2026/02/06/associative
60•rescrv•19h ago•22 comments

Show HN: ARM64 Android Dev Kit

https://github.com/denuoweb/ARM64-ADK
15•denuoweb•1d ago•2 comments
Open in hackernews

Bridging the Gap Between PLECS and SPICE

https://erickschulz.dev/posts/plecs-spice/
44•eschu•1w ago

Comments

Cyph0n•1w ago
I know what SPICE is: https://en.wikipedia.org/wiki/SPICE

And apparently, this is PLECS: https://www.plexim.com/products/plecs

eschu•1w ago
SPICE uses modified nodal analysis (MNA), which leads to differential algebraic equations (DAEs). This is very well-suited to detailed semi-conductor models (a bunch of convergence helpers are used behind the scenes to make the simulation of extreme exponential transients possible).

PLECS, on the other hand, uses ideal switches (on/off) for MOSFETs, diodes, etc. This is, in a way, the "most extreme" form of nonlinearity. But by leaning into it, we can solve more efficiently the resulting circuit equations using far fewer degrees of freedom. PLECS uses a piecewise state-space fomulation (ODEs). A simplified approach like that is basically essential for high-frequency power electronics at system-level if you don't want to wait all day for your waveforms. But obviously the trade-off is that you can't see the switching transients, because they are instantaneous.

To get both type of analyses (zoomed in device-level v.s. multi-physics system-level), we had to build the complex schematics in two different softwares (PLECS and SPICE). This took a long time. It's also quite error prone, especially when complicated initialization or post-processing scripts are involved. With PLECS Spice, we solved our problem. We can build one schematic in PLECS and "spice-ify" the bits we care about within it using a configurable subsystem.

Cyph0n•1w ago
Thanks for clarifying. HN is ~generally more software centric, so this context is helpful.

So SPICE is a low-level circuit sim, and PLECS is a bit higher level as it ignores non-linearities at the device level. Does PLECS simulate at a level similar to that of the popular EDA tools like Cadence?

eschu•1w ago
Roughly speaking yes, but Cadence has a large offering of products, so I need to be a little more specific. Ultimately, when you design analog devices with Cadence's tools, their transient behavior is simulated by Spectre (or FastSPICE) for IC (very) low-level analog validation. This is still SPICE, but with an engine really tailored for reading Verilog-A or large netlist descriptions (a format to describe circuits with plain text). Let's call this level 1.

They also have PSpice. Here, we are already speaking mixed-signal (including digital) for board-level simulation and systems. It competes with the likes of QSpice, the very popular Ltspice, SIMetrix etc. This is level 2.

Before PLECS or SIMPLIS, system-level designs that include controller, power-plant, thermal behavior and magnetics were also simulated with those tools. PLECS went one more level of abstraction higher so that all these systems could be simulated together (including say the power-train of a power electronic system that comprises battery to wheels of an electric car). This is level 3. Think of it like Simulink (MATLAB) but dedicated to the challenges of power electronics (high frequencies are difficult to simulate with general off-the-shelf simulators).

What is new now is that within PLECS, you can import SPICE netlists, effectively enabling level 2 and 3 within one tool, and even to some extent together in the same simulation run (ideal switches coexisting with SPICE models). So you can design top-down. You start from the system, and then deep dive by replacing, in some sub-circuits you care about, the PLECS ideal switches by the detailed SPICE models of your real devices. These are often provided by semiconductor manufacturers (and they may have been generated by an analog design tool from Cadence).

hulitu•1w ago
> you can't see the switching transients, because they are instantaneous.

Kids those days. So Plecs is an ideal simulator, or ?

eschu•1w ago
PLECS uses ideal switches, but now with SPICE integrated you can import any netlist to create a new block, including semiconductors.
eschluntz•1w ago
I did a double take at your name. Hello doppelganger!
eschu•1w ago
Hello! Haha
Archit3ch•1w ago
Cool! Does PLECS do any symbolic simplification for its equations? Without that step, we found it impossible to handle even the smallest examples for realtime audio circuit modeling.
eschu•1w ago
We could call the state-space approach of PLECS quasi-symbolic, because it reduces circuits with linear components to state-space equations. As a result, it needs to solve for much fewer variables. The price to pay is that the obtained system is dense. But for power electronics, this is great, because a tailored implementation of RADAU5 can be used (one of the gold standard for very stiff ODEs). For real-time though, the system has to be built differently with companion models for the swtiches, especially to be able to run it on the FPGA.

On the SPICE side of PLECS Spice, we also perform this kind of reduction for some components if we can, using graph algorithms. For instance, a basic SPICE solver would use a zero voltage source as an ammeter, which adds not only a current variable, but also a nodal voltage because the element has two terminals. Currents can be bad for Newton's method, because they have a very different scale. Often, we can completely avoid this by computing the current from surrounding components. But SPICE is very far from anything real-time.

fecal_henge•1w ago
Conversely, traditional SPICE simulators embody an inherently bottom-up approach

- its a lower down approach, but far from the bottom!

eschu•1w ago
Haha, ok fair enough. In the world of system-level integration of power electronics, SPICE is often considered the bottom. There is already a long way from an ideal on/off switch to a SPICE model of a MOSFET with a gate driver featuring 15 000 variables. Especially for a model that wants to include everything like the controls, the converter, the mechanical load, the thermal and magnetics. But I know that IC design go much lower down. I believe I have seen articles from Xyce pushed to many millions of variables and more. I forget the details, but I think I remember seeing an article somewhere for a benchmark of KLU of an integrated circuit with over a billion variables. We are definitely not at such a low level with our tool.
kayson•1w ago
3 years seems like a long time (though to be fair, I know spectre has been around for decades). Were there any particular challenges that made it difficult?
eschu•1w ago
There was a lot of learning and reinventing to do. It started with a team of 1, and we eventually grew to a team 5. We all started working on it more or less fresh out of university. We were trained as mathematicians, physicists and computational science engineers, not electrical engineers. So just that was a journey. Along the way we learned about SPICE, PLECS, power electronics, and how to manage ourselves. In the end, it turned out to be quite a strength to come from the outside and give the field a fresh look.

But there were serious technical challenges too.

- Most circuit simulators use either trap or BDF methods for stepping in time. Most are 2nd order. It has been the case for many decades. We went ahead in the end with modern 3rd order (E)SDIRK (Runge-Kutta) methods. It took a lot of digging, research and trial and error to make that work. But we basically had to, because since we wanted PLECS models to run alongside SPICE circuits as a whole system (just straight up coupling the two formulations together into one set of equations, avoiding the synchronization required by bi-directional coupling strategies or relaxation methods), we needed a memoryless solver that was tough enough to handle the very frequent discontinuities from the ideal switch models of PLECS. To compensate for the implicit steps, we needed to develop a strategy to track convergence rates and reliably bypass Jacobian computations when possible (and inform the convergence detection). The new solver has an embedded error estimator, an optimized PPID stepsize controller, a discontinuity detector and dense interpolation for zero-crossing detection built-in (to handle those ideal switches and discontinuous pulses from system-level power electronics and digital controls). Each components also inform the stepsize control.

- We have implemented condensed MNA to reduce the number of degrees of freedom (from the capacitor currents), and implemented and tested different recent research suggestions from Sandia Labs, e.g. different forms of PCNR for voltage limiting. We had to reinvent convergence helpers (homotopy) that worked with our formulation. And since PLECS was originally designed to solve ODEs, it started with initial conditions, while SPICE typically starts performing an operating point. So we needed there too to invent a graph algorithm that could initialize the combined formulations (MNA + piecewise state-space) consistently in a way that avoids over-determined states.

- A major endeavor was also the netlist parser. It was built from scratch and handles many dialects. Rather than making yet another rigid set of rules and push another syntax to the SPICE world, we wanted a parser that could parse it all, so that most semiconductor manufacturer's netlists could be used. It also comes with a simple netlist editor that gives you line feedback with detailed warnings and errors when something goes wrong.

- Netlists in SPICE aren't full descriptions based on elementary elements. They often assume built-in compact models, which are standardized models of semiconductors like MOSFET, diode, etc., that are parameterized by users (or automatic generation tools). Rather them wrapping existing code, we built them from scratch to be able to optimize and regularize problematic equations. We could improve on the basic compact models and adopted charge-conservative formulations.

Then, there was the UI integration into the PLECS schematic editor, optimization, parallelization etc. Overall, the result is quite a modern take on circuit simulation.

namibj•1w ago
Do you have any opinions on the use of frequency-domain/harmonics-based SPICE for high-frequency (relative to the transition frequency of the power and their pre-amp devices involved) fixed-frequency converters, particularly the resonant kinds?

At some point the gate signals become digital pre-distortion for the pre-amps ("gate drivers") and come out of a wave table like synthesizer, and sure, system-level behavior still matters...

eschu•1w ago
I am not sure that I know what harmonics-based SPICE is. Is it about AC analysis?
namibj•1d ago
A related mode is "11.3.12 .PSS: Periodic Steady State Analysis" in [1], though that's arguably "light mode"; the heavy mode is "HB (Harmonic Balance Analysis) Calculates steady states of nonlinear circuits in the frequency domain. General Form .HB <fundamental frequencies>" as implemented in Xyce[0]:

Harmonic balance (HB) is a technique that solves for the steady state solution of nonlinear circuits in the frequency domain. In harmonic balance simulation, voltages and currents in a nonlinear circuit are represented by truncated Fourier series. HB directly computes the frequency spectrum of voltages and currents at the steady state solution. This can be more efficient than transient analysis in applications where a transient analysis may take a long time to reach the steady state solution. In particular, HB is well suited for simulating analog RF and microwave circuits.

HB supports an unlimited number of independent input tones for driven circuits in both serial and parallel builds of Xyce. The output of HB analysis is the real and imaginary components of voltages and currents in the frequency domain. Xyce also provides time domain responses of a circuit. By default, the numbers of samples in both time and frequency domain outputs are the same. However, the number of time domain samples can be much larger than the number of frequency domain samples by setting numtpts in .options hbint. This enables the users to use a small number of harmonics for each tone and produce well-resolved results in time domain.

[0]: https://xyce.sandia.gov/documentation-tutorials/ [1]: https://ngspice.sourceforge.io/docs/ngspice-html-manual/manu...

mwban•1w ago
Very nice read. I wonder, have you also investigated the coupling of thermal and electrical systems in these simulations using reduced order multirate techniques?
eschu•1w ago
It was brought to our attention that it would be interesting to have a good interface for ROM models. It seems like POD-based dimensional reduction is widely used in the industry.

On the other hand, PLECS does have clever way to simulate thermal losses from ideal switch models:

https://www.plexim.com/products/plecs/thermal

Since simulation with standard PLECS ideal switches is so much more efficient than SPICE, it allows validation of thermal behavior at system-level.

But PLECS Spice does come in the picture here. What the above technique needs is a LUT table (XML) for the losses, and this can be extracted from SPICE. Now that PLECS Spice is part of PLECS, you can do it in the same tool. The idea is to prepare a simulated test bench for a double pulse test with the detailed SPICE model provided on the semiconductor manufacturer's website.

Then, you can use the data sheet impedance data (or generate the step-response curve yourself from experiment, the finite-elements method, etc) and fit an RC thermal network to it. I built a python tool for that available here:

https://thermal-network.pages.dev/

I wish I had a little more time to improve on the API, but I think it's very convenient. It is also possible to fit impedance data directly in PLECS. Cross-talk for spacial coupling can also be modeled there using similar strategy. The end result is a high accuracy thermal simulation at system-level.

There are some limitations to the approach, and if a full bi-directional coupling is needed (where the energy is taken out of the analog system) you can get more complex behavior by staying within PLECS Spice and modeling the thermal behavior there. It is slower though.