|
32 | 32 |
|
33 | 33 | circuit.V('input', 'input', circuit.gnd, 20@u_V) |
34 | 34 | circuit.R('load', circuit.gnd, 'sw_node', 5@u_Ohm) |
35 | | -circuit.VoltageControlledSwitch('input', 'sw_node', 'sw_drive', circuit.gnd, 'sw1', model=None) |
| 35 | + |
| 36 | +# circuit.VoltageControlledSwitch('input', 'sw_node', 'sw_drive', circuit.gnd, 'sw1', model=None) |
| 37 | + |
| 38 | +# circuit.VoltageControlledSwitch('sw1', 'sw_node', 'sw_drive', circuit.gnd, 'sw1', model=None, initial_state=True) |
| 39 | +# circuit.VoltageControlledSwitch('sw2', 'sw_node', 'sw_drive', circuit.gnd, 'sw1', model=None, initial_state=False) |
| 40 | +# circuit.VoltageControlledSwitch('sw3', input_plus='sw_drive', input_minus=circuit.gnd, output_minus='sw_node', output_plus='input', model='SW') |
| 41 | + |
| 42 | +circuit.VoltageControlledSwitch('input', 'sw_node', 'sw_drive', circuit.gnd, 'sw1', model='switch1') |
| 43 | +circuit.model('switch1', 'SW', Ron=.002@u_Ohm, Roff=1@u_MOhm, Vt=3.0@u_V) |
| 44 | + |
| 45 | +print(circuit) |
36 | 46 |
|
37 | 47 | simulator = circuit.simulator(temperature=25, nominal_temperature=25) |
38 | 48 | analysis = simulator.transient(step_time=0.1E-6, end_time=50E-3) |
|
0 commit comments