Does anyone know how to change the frequency of the sine source mid simulation? It is not a runtime variable.
There are a couple methods.
- you can do a parameter sweep and set frequency as a variable.
- you can use the simple c block to write a function
- you can use the voltage-controlled oscillator model in the examples/other folder of your PSIM install.
The most robust method is to use a DC source behind a resetting integrator that you then convert to a sine wave. There are plenty of examples of this circuit setup in the motor control examples.