How do I use a behavioural resistor?

I see that a behavioural resistor has been added as a built in SPICE module but I can’t find any information on how to use it. I want to define a resistor that I can control in the same way as a pulse voltage source. Can anyone give ne advice on how to do it?

In general for anything spice-related, you should refer to the ngspice manual. KiCad’s built in spice model types are just the models that ngspice supports.

The behavioral resistor’s “expression for resistance” is the “expression” described here in section 3.3.4: Ngspice User's ManualVersion 44plus(ngspice development version)

Thank you for the link it is most informative. I am primarily using KiCad for circuit and PCB design so I’m looking for a tool to help me with my simulation rather than trying to design my own tool. I’m not yet ready to learn the intricacies of NGSpice. I was hoping that someone would already have come up with a device I could use. I’m sure I could do it with TINA-TI but I’m trying to use the simulation part of KiCad to avoid having to draw my schematic twice.

After some searching I found some simulation examples by holger from June 2023 which included an epot symbol. This does the job perfectly. Thank you holger.