Simscape Electrical element (e.g. diode) shows extra signals in SDI when using Log All

6 次查看(过去 30 天)
I want to observe signals from Simscape model in SDI. Since I don't want to use explicit Voltage Sensor and Current Sensor blocks I decided to log all signals by default.
In Configuration Parameters -> Simscape -> Data Logging I selected "Log simulation data -> All" and checked "Record data in Simulation Data Inspector".
In SDI I get the whole log for every element in the circuit, which is great.
However, there are more signals available for each element as one would expect (i.e.voltage, current, power). For example, a log for a diode contains i, v, and power_dissipated, but there are also sublevels "n" and "p", each containg signal v. What are those signals? The same behaviour applies to other elements in the circuit, e.g. inductor, resistor.

回答(1 个)

Adarsh
Adarsh 2025-5-28
I see that you are trying to log signals from a Simscape electrical circuit and facing an issue where the Simscape is logging extra signals in the “Data Inspector”.
The components “n” and “p” that you observe in the logged signals under the Simscape electrical blocks represent the negative and positive ports of the blocks.
To get a better idea on why extra signals are being logged, select any block for example, the “Inductor” block, go to “description” tab and select “source code” option. Now, the source code for inductor block will be opened, where you can see the signalsi_L”,power_dissipated” as shown in the image below:
The class for “inductor” inherits from “foundation.electrical.branch”, which contains “p” and “n” as attributes which are instances of “foundation.electrical.electrical”. If you open this file using “edit foundation.electrical.electrical” you will observe an attribute ‘v’ which stores the voltage at that particular node as shown in the image below:
So when you select the option to log all signals these voltage signals at each node will also be logged into the “Data Inspector” these are the extra signals that are shown.
To log only selected signals, you can use the “Selective Logging” feature. To know more about “Selective Logging” you can refer to the following documentation link:
I hope this helps!

类别

Help CenterFile Exchange 中查找有关 Electrical Systems 的更多信息

产品


版本

R2024b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by