Skip to content

Conversation

@frantic0
Copy link

This pull request adds support for simulating the Chua circuit in pywdf and introduces a small set of extensions to the core WDF API, along with new examples and documentation updates.

Core API changes (pywdf/core/wdf.py)

  • Add ChuaDiode, a nonlinear negative-resistance element implementing a piecewise-linear I–V characteristic.
  • Add SeriesVoltage, a two-port series adaptor with an embedded resistive voltage source for injecting voltage impulses (used to excite the Chua circuit, but reusable in other circuits).
  • Implement an α-transform discretisation option for linear dynamic elements (Capacitor and Inductor), with parameters for selecting between bilinear (Tustin) and backward-Euler behaviour and exploring different stability/accuracy trade-offs.
  • Add a base-class helper method to convert wave variables to currents, following the WDF parametric definition.

New examples

  • Add two WDF Chua circuit examples:
    • Chua circuit excited by a resistive voltage source.
    • Chua circuit excited via the new SeriesVoltage adaptor.
  • Add basic RLC example circuits: resistor, resistor_series, resistor_parallel, inductor, and capacitor.

Documentation

  • Add a reference in README.md to the Meerkötter & Scholz paper describing the digital simulation of nonlinear circuits by WDF principles.

Testing

  • Verified that the new core elements and helpers can be instantiated and used in WDF circuits without errors.
  • Ran existing example scripts plus the new Chua and basic-circuit examples to confirm they execute and produce reasonable outputs.

@xaviliz
Copy link
Collaborator

xaviliz commented Nov 21, 2025

Hi @frantic0

Thanks a lot for your contribution.
It looks like a really interesting example to include in the library.
It is really exciting that others enlarge this library.

Unfortunately, I am very busy these days.
We are at the end of the course :)
But we have start to revise it.

Hopefully we can give you some feedback soon.

@frantic0
Copy link
Author

Thanks so much for the reply @xaviliz, and no worries at all, I completely understand how busy the end of a course can be (it’s a hectic time on my side too!).

I really appreciate you taking the time to look at this. I also wanted to say how much I enjoy pywdf, it’s a fantastic project and a great resource for exploring WDFs in practice.

Happy to make any changes or adjustments once you’ve had a chance to review.

@gusanthon
Copy link
Owner

gusanthon commented Nov 26, 2025

Hey @frantic0 , thanks so much for the contribution this is great work! Just added a few minor comments but otherwise looks great!

@frantic0
Copy link
Author

Hi @gusanthon @xaviliz, I hope you’re both enjoying a good seasonal break. Just checking in on the state of the PR, I’m very happy to make any changes you’d like before it’s ready to merge. Do let me know, please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants