Main Content

Voltage Sensor

R2026b

Voltage sensor in electrical systems

  • Voltage Sensor block

Libraries:
Simscape / Foundation Library / Electrical / Electrical Sensors
Simscape / Electrical / Sensors & Transducers

Description

The Voltage Sensor block represents an ideal voltage sensor, that is, a device that converts voltage measured between two points of an electrical circuit into a physical signal proportional to the voltage.

Use the + and - ports to connect the sensor in parallel with the block (or several blocks) where you want to measure the voltage. Port V outputs the measurement result as a physical signal. Use a PS-Simulink Converter block to connect this port to Simulink® blocks, such as Scope or Display.

Examples

Ports

Output

expand all

Physical signal output port for the voltage measurement.

Programmatic Use

Port: V

Conserving

expand all

Electrical conserving port associated with the sensor positive terminal.

Programmatic Use

Port: p

Electrical conserving port associated with the sensor negative terminal.

Programmatic Use

Port: n

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 Sensors/Voltage Sensor"
"ee_lib/Sensors & Transducers/Voltage Sensor"

Example: add_block("fl_lib/Electrical/Electrical Sensors/Voltage Sensor","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