Current-Voltage Simscape Interface (gnd)

Library

Fundamental Blocks/Interface Elements

Description

The Current-Voltage Simscape Interface (gnd) block
connects Simscape™
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
Power Systems side, the electrical connector
port sps acts like a controlled current source
referred to the ground, feeding current from the Simscape side
to the connected Simscape
Power Systems elements.

On the Simscape side, the electrical connector
port ssc acts like a controlled voltage source
referred to the ground, feeding voltage from the Simscape
Power Systems side
to the connected Simscape elements.

The following figure gives an overview of the interface.

The block measures the voltage between the sps port
and Simscape
Power Systems electrical reference and propagates it to
the ssc port, preserving the polarity with respect
to the Simscape electrical reference. The block also measures
the current flowing from the ssc port to the Simscape electrical
reference and propagates it to the sps port.

You can specify a filter to break the algebraic loop between Simscape
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 the filter on the Simscape
Power Systems side,
to the measured voltage, or on the Simscape side, to the measured
current. Depending on the measured signal where you apply the filter,
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.

Parameters

Direct feedthrough (no filter)

If selected, direct feedthrough is applied between Simscape
Power Systems and Simscape ports
on both sides. Default is cleared.

Filter type

Set this parameter to Low pass filter (continuous) (default)
to implement a first order continuous transfer function filter between Simscape
Power Systems and Simscape ports.

Set this parameter to Unit delay (discrete) to
implement a discrete unit delay filter between Simscape
Power Systems and Simscape ports.

Set this parameter to First-order input filtering to
implement a first order continuous transfer function filter with first-order
filtering of the Simulink-PS Converter block that provides
one derivative. You can apply this filter only on the Simscape
Power Systems side.

Set this parameter to Second-order input filtering to
implement a first order continuous transfer function filter with second-order
filtering of the Simulink-PS Converter block that provides
derivatives one and two. You can apply this filter only on the Simscape
Power Systems side.

The Filter type parameter is not visible
when the Direct feedthrough (no filter) check
box is selected.

Low pass filter constant (s)

Specify the low pass filter time constant of the filter, in
seconds. This parameter is available only when the Filter
type parameter is set to Low pass filter (continuous), First-order
input filtering, or Second-order input
filtering. Default is 1e-6.

Sample time of unit delay (s)

Specify the sample time of the unit delay filter, in seconds.
This parameter is available only when the Filter type parameter
is set to Unit delay (discrete). Default
is 50e-6.

Initial voltage (V)

Specify the initial voltage value of the measured Simscape
Power Systems voltage.
Default is 0.

This parameter is available only when you apply the filter on
the Simscape
Power Systems side.

Initial current (A)

Specify the initial current value of the measured Simscape current.
Default is 0.

This parameter is available only when you apply the filter on
the Simscape side.

Apply filter on

Set this parameter to Simscape Power Systems side (default)
to apply the filter on the measured Simscape
Power Systems voltage.

Set this parameter to Simscape side to
apply the filter on the measured Simscape current.

The Apply filter on parameter is not visible
when the Direct feedthrough (no filter) check
box is selected, when the Filter type is set
to First-order input filtering, or when
the Filter type is set to Second-order
input filtering.

Show measurement port

If selected, adds a Simulink® output to the block that returns
the Simscape
Power Systems current and voltage and to the Simscape current
and voltages in a bus signal. Default is cleared.

Limitations

When simulating Simscape
Power Systems models along with Simscape blocks,
select the Simulink solver carefully.

Use the ode23tb solver for solving Simscape
Power Systems circuits
containing switches or nonlinear element. If you use other stiff solvers, Simscape
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 Power Systems documentation
for additional information on how to select an appropriate integration method.
'To ignore Simscape Power Systems (Specialized Technology) warnings,
select "Disable Simscape Power Systems ST warnings" in the Powergui Preferences tab.';

The Simscape
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.

Examples

The power_SSCmodeling example
shows how Simscape
Power Systems and Simscape models can interface
using the Current-Voltage Simscape Interface block.