Skip to content

Resistance sweep #143

@paeder92

Description

@paeder92

Hello,

in order to simulate a dynamic load, I am looking for a way to sweep over resistance. Here is an example to illustrate what I tried:

circuit = Circuit('Resistor Sweep')

circuit.V('input', 'in', circuit.gnd, 10@u_V)
circuit.R('var', 'in', circuit.gnd, 1@u_Ω)

simulator = circuit.simulator(temperature=25, nominal_temperature=25)

analysis = simulator.dc(Rvar=slice(1,20,0.25))

However, this is not working, but returns a NotImplementedError:

NotImplementedError: {'vinput#branch': variable: vinput#branch current, 'in': variable: in voltage, 'res-sweep': variable: res-sweep res}

I am unsure, does that mean that this functionality is not available in PySpice/NgSpice, or am I doing something wrong? Generally, how can sweeping over resistance be done?

Thanks and best regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions