+1 vote
580 views
in Helper by Hamid Hamza (19 points)
recategorized by Ognjen G.

Hello every overyone

I am trying to solve this system of quadratic equations in typhoon hil

% Va = 3, Vb = 2, Vc = 3

syms xb yb xc yc real

% Mise en equations

eq1 = (xb - Va)^2 + yb^2 == (Va - xc)^2 + yc^2; % Vab = Vac

eq2 = (xb - Va)^2 + yb^2 == (xb - xc)^2 + (yc - yb)^2; % Vab = Vbc

eq3 = xb^2 + yb^2 == Vb_mot^2;

eq4 = xc^2 + yc^2 == Vc^2;

% resolution

eqns = [eq1,eq2,eq3,eq4]; % regroupement des equations

vars = [xb yb xc yc]; % variables

sol = solve(eqns,vars); % resolution des equations

% % % % calcul des angles requis pour reequilibrer les tensions

theta_ab = double(max((atan2d(sol.yb,sol.xb)))); % angle entre a et b

theta_ac = double(max((atan2d(sol.yc,sol.xc)))); % angle entre a et c

theta_bc = 360-(theta_ab + theta_ac); % angle entew b et c

3 Answers

+1 vote
by Ricardo Morim (152 points)
Hi Hamid,

Could you be more specific and explain what exactly issue are you having on doing what you want to do?

Regards,

Ricardo
+1 vote
by Hamid Hamza (19 points)
Hello Ricardo, I am trying to implement the neutral-shifted fault-tolerant control (https://ieeexplore-ieee-org.biblioproxy.uqtr.ca/document/1375819?arnumber=1375819) using Typhoon HIL.

In Matlab, I used the symbolic variables to solve the nonlinear systems of equations and deduce the corresponding angles.

My question is:
Is it possible to solve such kinds of systems of equations in Typhoon HIL using the C-function?
+1 vote
by Ricardo Morim (152 points)
Your link goes to the University website and therefore I can't see the content.

W.r.t. the system of equations, I would say it is possible to solve in C function, but you need to implement the code for the solver in C.

Regards,

Ricardo
by Hamid Hamza (19 points)
Can you help me with that? Please i am not familiar with the c- code
by Ricardo Morim (152 points)
What is your question?
by Hamid Hamza (19 points)
+1
J. Rodriguez, J. Pontt, R. Musalem and P. Hammond, "Operation of a medium-voltage drive under faulty conditions," The 4th International Power Electronics and Motion Control Conference, 2004. IPEMC 2004., Xi'an, China, 2004, pp. 799-803 Vol.2.

I am trying to implement the results of this paper using Typhoon
by Ricardo Morim (152 points)
+2
Sounds good. If you are not familiar with our solutions, I suggest starting with Hil academy. You can access it for free.
https://hil.academy/
Regards,
Ricardo
by Hamid Hamza (19 points)
+1
ok thanks Ricardo
...