Programmable Voltage Source
R2026bSingle-phase AC voltage source with optional programmable magnitude, frequency, phase shift and DC offset
Libraries:
Simscape /
Electrical /
Sources
Description
The Programmable Voltage Source block models a single-phase AC voltage source with programmable magnitude, frequency, phase shift and DC offset. Choose the external mode to specify these quantities by physical input signals M, F, Phi and DC. Harmonics and noise can be included in the voltage source.
For relevant equations, see the Voltage Source block.
Limitations
Simulating with harmonics enabled slows down simulation. If you include harmonics, choose a sample time such that harmonics are generated only at frequencies of interest, and not higher.
Simulating with noise enabled slows down simulation. If you include noise, choose a sample time such that noise is generated only at frequencies of interest, and not higher.
Variables
To set the priority and initial target values for the block variables before simulation, use the Initial Targets section in the block dialog box or Property Inspector. For more information, see Set Priority and Initial Target for Block Variables.
Nominal values provide a way to specify the expected magnitude of a variable in a model. Using system scaling based on nominal values increases the simulation robustness. You can specify nominal values using different sources, including the Nominal Values section in the block dialog box or Property Inspector. For more information, see System Scaling by Nominal Values.
Ports
Input
Conserving
Parameters
Programmatic Use: Add Block
To add the block programmatically, use the add_block function with one of these library block paths as the source.
"ee_lib/Sources/Programmable Voltage Source"
Example: add_block("ee_lib/Sources/Programmable Voltage Source","myModel/myBlock",MakeNameUnique="on")
Extended Capabilities
Version History
Introduced in R2019a
