Main Content

DC Voltage Source

R2026b

Ideal constant voltage source

  • DC Voltage Source block

Libraries:
Simscape / Foundation Library / Electrical / Electrical Sources

Description

The DC Voltage Source block represents an ideal voltage source that is powerful enough to maintain specified voltage across its terminals regardless of the current flowing through the source.

You specify the output voltage by using the Constant voltage parameter, which can be positive or negative.

Connections + and - are conserving electrical ports corresponding to the positive and negative terminals of the voltage source, respectively. The current is positive if it flows from positive to negative, and the voltage across the source is equal to the difference between the voltage at the positive and the negative terminal, V(+) – V(-).

Examples

Ports

Conserving

expand all

Electrical conserving port associated with the source positive terminal.

Programmatic Use

Port: p

Electrical conserving port associated with the source negative terminal.

Programmatic Use

Port: n

Parameters

expand all

Voltage across the source. You can specify positive or negative values.

Programmatic Use

Parameter: v0

Programmatic Use: Add Block

To add the block programmatically, use the add_block function with one of these library block paths as the source.

"fl_lib/Electrical/Electrical Sources/DC Voltage Source"

Example: add_block("fl_lib/Electrical/Electrical Sources/DC Voltage Source","myModel/myBlock",MakeNameUnique="on")

For information about programmatic access to individual block parameters, see the Programmatic Use section of parameter descriptions on this page.

Extended Capabilities

expand all

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Version History

Introduced in R2007a