Simscape branch current equations
2 views (last 30 days)
Show older comments
What should be the current equations in branch section while desiging a ssc component which allows the power to flow on either directions. i1, i2 are current of side1 and i3,i4 are the currents at side 2
nodes
p1=foundation.electrical.electrical; % + 1:top
n1=foundation.electrical.electrical; % - 1:top
p2=foundation.electrical.electrical; % + 2:bottom
n2=foundation.electrical.electrical; % -2:bottom
end
variables
i1 = { 0, 'A' }; % input Current
v1 = { 0, 'V' }; % input Voltage
i2 = { 0, 'A' }; % input Current
v2 = { 0, 'V' }; % input Voltage1
v3={0,'V'}; % output Voltage2
i3= { 0, 'A' }; % output Current
i4 = {0,'A'};%output current
v4 = {0,'V'}%output voltage
% idc = { 0, 'A' }; % output Current
Pin= { 0, 'W' }; % Input power
Pout = { 0, 'W' }; % output power
Losses={ 0, 'W' }; % power loss
end
branches
i1 :p1.i->* ;
i2 : n1.i->*;
i3: p2.i->*;
i4: n2.i->*;
end
equations
v1 == p1.v ;
v2 == n1.v;
v3 == p2.v;
v4 == n2.v;
0 Comments
Answers (1)
Sabin
on 16 Dec 2024
The branches section establishes the relationship between the component Through variable and the component nodes (and therefore the domain Through variable). Considering a resistor, the i : p.i -> n.i statement indicates that the current through the resistor flows from node p to node n. For each Through variable, the sum of all its values flowing into a branch point equals the sum of all its values flowing out.
In Simscape power flow in either direction unless there is a mechanism to prevent this. The way we define the branch will dictate the sign convention.
0 Comments
See Also
Categories
Find more on Custom Components in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!