How can I ensure a bidirectional signal flow using physical signals and calculations in Simscape?

14 views (last 30 days)
Hello everyone,
My goal is to write Model representing a transformer for a 3 phase voltage. In order to do so, I have to use the space-vector transformation (Clarke, Park) to use the given equivalent circuit diagram.
The problem: the model has to allow bidirectional information flow. Is there any way to do this?
In my mind one way would be the following: Write a new simscape Model, in which i put the calculations for the transformations in the "function setup" section. I then use these results under the "equations" sections. I fear I will thereby destroy the bidirectional signal flow.
I could also do my calculations in the "equations" section, but I think it will give me an error message.
It is very important that the model will work not only have a unidirectional signal flow.
I really hope I could explain my problem in an understandable way. I would deeply appreciate some good ideas and help! Thanks to everyone in advance!
EDIT:
This is the code I wrote so far:
component Clarke
%abc/alpha-beta
%
%Clarke Transformation
%
nodes
a = foundation.electrical.electrical; % in u1 :left
b = foundation.electrical.electrical; % in v1 :left
c = foundation.electrical.electrical; % in w1 :left
u_alpha = foundation.electrical.electrical; % out u2 :right
u_beta = foundation.electrical.electrical; % out v2 :right
end
variables(Hidden=true)
u_a = {0, 'V'}; %Spg
u_b = {0, 'V'}; %Spg
u_c = {0, 'V'}; %Spg
u_out = {0, 'V'}; %Spg
i1_u = {0, 'A'}; %Strom u1
i1_v = {0, 'A'}; %Strom v1
i1_w = {0, 'A'}; %Strom w1
i2 = {0, 'A'}; %Strom u2
end
branches
i1_u: a.i -> b.i;
i1_v: b.i -> c.i;
i1_w: c.i -> a.i;
i2: u_alpha.i -> u_beta.i;
end
equations
u_a == a.v - b.v;
u_b == b.v - c.v;
u_c == c.v - a.v;
u_out == u_alpha.v - u_beta.v;
u_out == 2/3*(u_a+ u_b * cos( (2/3) *pi ) + u_c * cos( (4/3) *pi ) + 1i * (u_b * sin( (2/3) *pi ) + u_c * sin( (4/3) *pi ) ));
end
end
The message I get is the following: Number of variables exceeds number of equations.
I expected a problem because I changed a physical signal to a mathematical equation which does not exist in physics. Any suggestions?

Answers (0)

Categories

Find more on Variable Initialization in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!