Current-Voltage Simscape Interface
Ideal coupling between Simscape Electrical Specialized Power Systems and Simscape electrical circuits
Libraries:
Simscape /
Electrical /
Specialized Power Systems /
Utilities
Description
The Current-Voltage Simscape Interface block connects Simscape™ Electrical™ Specialized Power Systems circuits with electrical elements from the Simscape Foundation library. This block preserves current through the block and voltage across the block, conserving electrical power.
On the Simscape Electrical Specialized Power Systems side, the electrical connector ports
+sps
and-sps
act like a controlled current source, feeding current from the Simscape side to the connected Simscape Electrical Specialized Power Systems elements, while maintaining the voltage across the block.On the Simscape side, the electrical connector ports
+ssc
and-ssc
act like a controlled voltage source, feeding voltage from the Simscape Electrical Specialized Power Systems side to the connected Simscape elements, while maintaining the current through the block.
The following figure gives an overview of the interface.
The block measures the voltage between the +sps
and
-sps
ports and propagates it to the +ssc
and
-ssc
ports, preserving the polarity. The block also measures the current
flowing from the +ssc
to the -ssc
port and propagates it
from the -sps
to the +sps
port.
You can specify a filter to break the algebraic loop between Simscape Electrical Specialized Power Systems and Simscape ports. You can specify the filter as a first order continuous transfer function or as a discrete unit delay block. You can apply it on the Simscape Electrical Specialized Power Systems side, to the measured voltage, or on the Simscape side, to the measured current. Depending on the measured signal where the filter is applied, the other signal is always a direct feedthrough.
If you do not specify a filter, direct feedthrough is applied on both measured signals. However, this configuration results in an algebraic loop containing the Voltage Measurement, Controlled Voltage Source, Current Sensor, and Controlled Current Source blocks, which might cause numerical issues.
Examples
Limitations
When simulating Simscape Electrical Specialized Power Systems models along with Simscape blocks, select the Simulink® solver carefully.
Use ode23tb
solver for solving Simscape
Electrical Specialized Power Systems circuits containing switches or nonlinear element. If you
use other stiff solvers, Simscape
Electrical Specialized Power Systems software gives you the following warning:
Warning: You have required continuous-time simulation of a system containing switches or nonlinear elements. The ode23tb variable-step stiff solver with relative tolerance set to 1e-4 is recommended in order to get best accuracy and simulationperformance. For some highly nonlinear models it may be necessary to set the "Solver reset method" parameter to "Robust". See "Improving Simulation Performance" chapter in Simscape Electrical Specialized Power Systems documentation for additional information on how to select an appropriate integration method. 'To ignore Simscape Electrical Specialized Power Systems warnings, select "Disable Simscape Electrical SPS warnings" in the Powergui Preferences tab.';
The Simscape
Electrical Specialized Power Systems warning can be disabled, as described in the warning
message. However, if you use the ode23tb
solver for solving models containing
Simscape blocks, Simscape software gives you the following warning:
Warning: The solver chosen is not recommended if the model is stiff, which is typical for models containing Simscape components. These solvers are typically preferred for Simscape models:ode23t, ode15s or ode14x (fixed-step). To disable this diagnostic,change the explicit solver diagnostic setting on the Simscape panel of the model Configuration Parameters.
The Simscape warning can also be disabled, as described in the warning message.
Ports
Conserving
Output
Parameters
Extended Capabilities
Version History
Introduced in R2011b