Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem conducting ac_sensitivity analysis. #364

Open
dipaishaj opened this issue Dec 21, 2023 · 0 comments
Open

Problem conducting ac_sensitivity analysis. #364

dipaishaj opened this issue Dec 21, 2023 · 0 comments

Comments

@dipaishaj
Copy link

Environment (OS - Ubuntu 22.4, Python version - 3.10(2), PySpice version - 1.5, simulator -Ngspice 36)

Expected Behaviour - Should return ac sensitivity analysis for nodes or circuit elements

Actual Behaviour - Creates None type object

Steps to reproduce the behavior -

circuit = Circuit('LPF')
circuit.SinusoidalVoltageSource('in', 'x0', circuit.gnd, amplitude=3 @ u_V, frequency=1 @ u_kHz)

circuit.V(1, 'xo' , circuit.gnd, 10 @ u_V)

circuit.R(1, 'xo', 'out', 1 @ u_kOhm)

circuit.R(2, 'out', circuit.gnd, 10 @ u_kOhm)

circuit.C(1, 'out', circuit.gnd, 1@u_uF)

simulator = circuit.simulator(temprature=25, nominal_temperature=25)
analysis = simulator.ac_sensitivity(output_variable='v(out)', start_frequency=10@u_Hz, stop_frequency=10@u_kHz, variation= 'dec', number_of_points=10)

analysis = simulator.dc_sensitivity('v(out)')

for element in analysis.elements.values():
print(element, float(element))

I am running the above snippet for AC sensitivity analysis, however, I'm getting an error as the None type object has no elements (analysis -none object), I have tried printing nodes too but it produces the same error. If I run the dc_sensitivity analysis it works fine. Please help?

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

No branches or pull requests

1 participant