Discrete variable capacitor
Simscape / Electrical / Specialized Power Systems / Passives
The Variable Capacitor block represents a linear time-varying capacitor. It implements a discrete variable capacitor as a current source. The capacitance is specified by the Simulink® input signal. The capacitance value can be negative.
When you use a Variable Capacitor block in your model, set the
powergui block Simulation type to
Discrete and select the Automatically handle
Discrete solver and Advanced tab solver settings of blocks parameter in
the Preferences tab. The robust discrete solver is used to
discretize the electrical model. Simulink signals an error if the robust discrete solver is not used.
The block uses the following equations for the relationship between the voltage, v, across the device and the current through the capacitor, i, when the capacitance at port C is C:
Input port associated with the capacitance. The capacitance can be negative and must be finite.
+— Positive terminal
Specialized electrical conserving port associated with the capacitor positive voltage.
-— Negative terminal
Specialized electrical conserving port associated with the capacitor negative voltage.
Discrete Solver— Solver type
Backward Euler(default) |
Robust integration method used by the block. The discrete solver method is automatically
Trapezoidal when, in the
powergui block, in the Preferences
settings, you select Automatically handle discrete solver and
Advanced tab solver settings of blocks.
Trapezoidal robust solver is slightly more
accurate than the
Backward Euler robust solver,
especially when the model is simulated at larger sample times. The
Trapezoidal robust solver may produce slight
damped numerical oscillations on machine voltage in no-load conditions,
Backward Euler robust solver prevents
oscillations and maintains good accuracy.
Minimal capacitance absolute value (F)— Minimal capacitance
1e-6(default) | nonnegative scalar
Lower limit on the absolute value of the signal at port C. This limit prevents the signal from reaching a value that has no physical meaning. The value of this parameter must be greater than 0.