VoltageSource
IconVoltageSource
The input signal V
is provided as the voltage difference across the positive to the negative pins.
This component extends from TwoPin
Usage
VoltageSource(uV=1.0)
Parameters:
Name | Description | Units | Default value |
---|---|---|---|
uV | V | 1 |
Connectors
p
- (Pin
)n
- (Pin
)V
- This connector represents a real signal as an input to a component (RealInput
)
Variables
Name | Description | Units |
---|---|---|
v | V | |
i | A |
Behavior
\[ \begin{align} v\left( t \right) &= \mathtt{p.v}\left( t \right) - \mathtt{n.v}\left( t \right) \\ i\left( t \right) &= \mathtt{p.i}\left( t \right) \\ \mathtt{n.i}\left( t \right) + \mathtt{p.i}\left( t \right) &= 0 \\ v\left( t \right) &= \mathtt{uV} V\left( t \right) \end{align} \]
Source
# The input signal `V` is provided as the voltage difference across the positive to
# the negative pins.
component VoltageSource
extends TwoPin
V = RealInput() [{
"JuliaSim": {"placement": {"icon": {"x1": 450, "y1": -50, "x2": 550, "y2": 50, "rot": 90}}}
}]
parameter uV::Voltage = 1.0
relations
v = V*uV
metadata {
"JuliaSim": {
"labels": [{"label": "$(instance)", "x": 500, "y": 1100, "rot": 0}],
"icons": {"default": "jsml://ElectricalComponents/Voltage.svg"}
}
}
end
Flattened Source
# The input signal `V` is provided as the voltage difference across the positive to # the negative pins. component VoltageSource p = Pin() [{ "JuliaSim": { "placement": {"icon": {"iconName": "pos", "x1": -50, "y1": 450, "x2": 50, "y2": 550}} } }] n = Pin() [{ "JuliaSim": { "placement": {"icon": {"iconName": "neg", "x1": 950, "y1": 450, "x2": 1050, "y2": 550}} } }] variable v::Voltage variable i::Current V = RealInput() [{ "JuliaSim": {"placement": {"icon": {"x1": 450, "y1": -50, "x2": 550, "y2": 50, "rot": 90}}} }] parameter uV::Voltage = 1.0 relations v = p.v-n.v i = p.i p.i+n.i = 0 v = V*uV metadata { "JuliaSim": { "labels": [{"label": "$(instance)", "x": 500, "y": 1100, "rot": 0}], "icons": {"default": "jsml://ElectricalComponents/Voltage.svg"} } } end
Test Cases
Related
- Examples
- Experiments
- Analyses
- Tests