Change frequency of sine source mid simulation

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.

  1. you can do a parameter sweep and set frequency as a variable.
  2. you can use the simple c block to write a function
  3. 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.