<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Typhoon HIL Forum - Recent questions in Helper</title>
<link>https://typhoon-hil.com/forum/?qa=questions/bootcamp/helper</link>
<description>Powered by Question2Answer</description>
<item>
<title>PSO optimization technique how to adapt this code properly for execution in the Typhoon HIL C-block.</title>
<link>https://typhoon-hil.com/forum/?qa=491/optimization-technique-adapt-properly-execution-typhoon</link>
<description>&lt;p&gt;Dear Typhoon HIL Team,&lt;/p&gt;&lt;p&gt;Dear Typhoon HIL Team,&lt;/p&gt;&lt;p&gt;I am working on a research project titled &lt;em&gt;“Photovoltaic MPPT Performance Adaptability to Partial Shading Resilience and Load Variations with PSO.”&lt;/em&gt; In MATLAB/Simulink, I have implemented and validated the PSO-based MPPT algorithm using a C-function block, and I now wish to port this into Typhoon HIL Control Center for hardware-in-the-loop testing and real-time verification.&lt;/p&gt;&lt;p&gt;My MATLAB code (attached below) takes PV voltage and current (Vpv, Ipv) as inputs and generates the duty cycle (D_out) as output. It uses persistent variables for swarm initialization, particle updates, personal/global best tracking, and smoothing of the duty cycle output.&lt;/p&gt;&lt;p&gt;I would like guidance on:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Code Structure:&lt;/strong&gt; How to adapt my MATLAB C-function for Typhoon HIL’s C-block (syntax, supported functions, use of init() and step()).&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Inputs/Outputs:&lt;/strong&gt; Correct way to declare Vpv, Ipv as inputs and D_out as output, and how to connect the duty cycle output to PWM blocks.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Implementation Steps:&lt;/strong&gt; The procedure to load and compile this code in the Schematic Editor, handle unsupported functions (e.g., rand, linspace), and properly manage persistent variables.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Verification:&lt;/strong&gt; Best practices to confirm that the Typhoon C-block produces results consistent with MATLAB under partial shading and load variation tests.&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;My main goal is to compare MATLAB simulations with Typhoon HIL results under identical conditions for benchmarking MPPT performance. Any step-by-step instructions, references, or example templates would be greatly appreciated.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Thank you for your support.&lt;/p&gt;&lt;p&gt;Below, I have provided a detailed explanation of the MATLAB C-function block along with the points where I am seeking clarification:&lt;/p&gt;&lt;hr&gt;&lt;h3&gt;1. Code Structure&lt;/h3&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;In MATLAB, my MPPT logic is encapsulated in a C-function block with persistent variables for maintaining PSO states such as swarm positions, velocities, particle bests, and global best. Below is the complete implementation:&lt;/p&gt;&lt;p&gt;%% ------------------ PSO Parameters ------------------&lt;/p&gt;&lt;p&gt;persistent swarm iter stepCounter P_hist D_out_prev&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;% PSO constants&lt;/p&gt;&lt;p&gt;N = 30;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;% number of particles&lt;/p&gt;&lt;p&gt;maxIter = 300;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; % max iterations&lt;/p&gt;&lt;p&gt;c1 = 1.8;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;% cognitive factor&lt;/p&gt;&lt;p&gt;c2 = 1.8;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;% social factor&lt;/p&gt;&lt;p&gt;w_max = 0.9;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; % max inertia&lt;/p&gt;&lt;p&gt;w_min = 0.4;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; % min inertia&lt;/p&gt;&lt;p&gt;D_min = 0.05;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;% min duty cycle&lt;/p&gt;&lt;p&gt;D_max = 0.95;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;% max duty cycle&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;% Moving average for stability&lt;/p&gt;&lt;p&gt;avgWindow = 7;&lt;/p&gt;&lt;p&gt;updatePeriod = 1;&amp;nbsp; &amp;nbsp; &amp;nbsp; % update every step&lt;/p&gt;&lt;p&gt;perturbMagnitude = 0.02; % small perturbation&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;%% ------------------ Initialization ------------------&lt;/p&gt;&lt;p&gt;if isempty(swarm)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; D_sweep = linspace(D_min, D_max, N);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; swarm.x = D_sweep;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;% particle positions (duty cycles)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; swarm.v = zeros(1,N);&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; % particle velocities&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; swarm.pBest = D_sweep;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;% personal bests&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; swarm.pBestVal = -inf(1,N);&amp;nbsp; &amp;nbsp; &amp;nbsp; % personal best power&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; swarm.gBest = D_min;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;% global best duty cycle&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; swarm.gBestVal = -inf;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;% global best power&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; swarm.k = 1;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; % current particle index&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; iter = 1;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; stepCounter = 0;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; P_hist = zeros(1, avgWindow);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; D_out_prev = swarm.gBest;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; D_out = swarm.gBest;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; return;&lt;/p&gt;&lt;p&gt;end&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;%% ------------------ Slow Update ------------------&lt;/p&gt;&lt;p&gt;stepCounter = stepCounter + 1;&lt;/p&gt;&lt;p&gt;if stepCounter &amp;lt; updatePeriod&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; D_out = D_out_prev;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; return;&lt;/p&gt;&lt;p&gt;else&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; stepCounter = 0;&lt;/p&gt;&lt;p&gt;end&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;%% ------------------ Moving Average Power ------------------&lt;/p&gt;&lt;p&gt;P_hist = [P_hist(2:end), Vpv*Ipv];&lt;/p&gt;&lt;p&gt;P = mean(P_hist);&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;%% ------------------ Update Personal Best ------------------&lt;/p&gt;&lt;p&gt;if P &amp;gt; swarm.pBestVal(swarm.k)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; swarm.pBest(swarm.k) = swarm.x(swarm.k);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; swarm.pBestVal(swarm.k) = P;&lt;/p&gt;&lt;p&gt;end&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;%% ------------------ PSO Update ------------------&lt;/p&gt;&lt;p&gt;w = w_max - (w_max - w_min)*(iter/maxIter);&lt;/p&gt;&lt;p&gt;r1 = rand; r2 = rand;&lt;/p&gt;&lt;p&gt;swarm.v(swarm.k) = w*swarm.v(swarm.k) ...&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;+ c1*r1*(swarm.pBest(swarm.k)-swarm.x(swarm.k)) ...&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;+ c2*r2*(swarm.gBest - swarm.x(swarm.k));&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;swarm.x(swarm.k) = swarm.x(swarm.k) + swarm.v(swarm.k);&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;%% ------------------ Clamp Duty Cycle ------------------&lt;/p&gt;&lt;p&gt;swarm.x(swarm.k) = max(min(swarm.x(swarm.k), D_max), D_min);&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;%% ------------------ Move to Next Particle ------------------&lt;/p&gt;&lt;p&gt;swarm.k = swarm.k + 1;&lt;/p&gt;&lt;p&gt;if swarm.k &amp;gt; N&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; swarm.k = 1;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; iter = iter + 1;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; % ------------------ Update Global Best after all particles ------------------&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; [bestP, idx] = max(swarm.pBestVal);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; swarm.gBest = swarm.pBest(idx);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; swarm.gBestVal = bestP;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; % ------------------ Small Random Perturbation ------------------&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; if mod(iter,20)==0&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; swarm.x = swarm.x + perturbMagnitude*(rand(1,N)-0.5);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; swarm.x = max(min(swarm.x, D_max), D_min);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; end&lt;/p&gt;&lt;p&gt;end&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;%% ------------------ Reset if maxIter ------------------&lt;/p&gt;&lt;p&gt;if iter &amp;gt; maxIter&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; D_sweep = linspace(D_min,D_max,N);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; swarm.x = D_sweep;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; swarm.v = zeros(1,N);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; swarm.pBest = D_sweep;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; swarm.pBestVal = -inf(1,N);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; swarm.gBest = D_min;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; swarm.gBestVal = -inf;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; iter = 1;&lt;/p&gt;&lt;p&gt;end&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;%% ------------------ Smooth Duty Cycle Output ------------------&lt;/p&gt;&lt;p&gt;alpha = 0.2; % smoothing factor&lt;/p&gt;&lt;p&gt;D_out = alpha*swarm.gBest + (1-alpha)*D_out_prev;&lt;/p&gt;&lt;p&gt;D_out_prev = D_out;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;end&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;function D_out = PSO_MPPT_PV_Stable(Vpv, Ipv)&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</description>
<category>Helper</category>
<guid isPermaLink="true">https://typhoon-hil.com/forum/?qa=491/optimization-technique-adapt-properly-execution-typhoon</guid>
<pubDate>Sat, 27 Sep 2025 13:29:01 +0000</pubDate>
</item>
<item>
<title>Unexpected Model Behavior with Induction Motor Parameters</title>
<link>https://typhoon-hil.com/forum/?qa=428/unexpected-model-behavior-with-induction-motor-parameters</link>
<description>&lt;p&gt;While working on controlling a three-phase squirrel cage induction machine in Typhoon HIL, I encountered an unusual issue.&lt;/p&gt;&lt;p&gt;Initially, I copied the induction machine block from one of the example models and started testing my MPC-based control algorithm. I forgot to update the motor parameters in the machine block to match those used in the MPC model. Despite this mismatch, the system worked to give outputs- speed was tracked and all that&amp;nbsp;&lt;/p&gt;&lt;p&gt;However, when I later updated the induction machine block with the &lt;strong&gt;correct motor parameters&lt;/strong&gt; to match those used in the MPC control model (Rs, Ls, Lm, etc.), the control performance &lt;strong&gt;drastically degraded&lt;/strong&gt; — torque dropped, and overall behavior became unstable.&lt;/p&gt;&lt;p&gt;This led me to realize that the control algorithm &lt;strong&gt;only works when there&#039;s a large mismatch&lt;/strong&gt; between the motor parameters in the MPC and those in the machine block. I’m unsure whether this is due to a modeling assumption, numerical issue, or internal handling of the motor block.&lt;/p&gt;&lt;p&gt;I’d appreciate any insight into why this might be happening or if there’s something I’ve missed&amp;nbsp;&lt;br&gt;&lt;br&gt;Below are the major equations used in the mpc algorithm which conforms with theory&lt;br&gt;&lt;br&gt;sigma=(1.0-(Lm*Lm)/(Ls*Lr));&lt;br&gt;kr=(Lm/Lr);&lt;br&gt;ks=(Lm/Ls);&lt;br&gt;r_sigma=Rs+Rr*(kr*kr);&lt;br&gt;t_sigma=(sigma*Ls)/(r_sigma);&lt;br&gt;&lt;br&gt;temp1 = t_sigma / (Ts + t_sigma);&lt;br&gt;temp2 = Ts / (Ts + t_sigma) * (1.0 / r_sigma);&lt;br&gt;&lt;br&gt;Fr_real = (Lr / Lm) * (Fs_real + ik_real) * (Lm - (Lr * Ls / Lm));&lt;br&gt;Fr_imag = (Lr / Lm) * (Fs_imag + ik_imag) * (Lm - (Lr * Ls / Lm));&lt;br&gt;&lt;br&gt;Fs_real = Fs_real + Ts * (v_real[x_opt] - Rs * ik_real);&lt;br&gt;Fs_imag = Fs_imag + Ts * (v_imag[x_opt] - Rs * ik_imag);&lt;br&gt;&lt;br&gt;&amp;nbsp;Tp = (3.0 / 2.0) * P * (Fsp_real * Isp_imag - Fsp_imag * Isp_real);&lt;br&gt;&lt;br&gt;&amp;nbsp;Fsp_mag = sqrt(Fsp_real * Fsp_real + Fsp_imag * Fsp_imag);&lt;br&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;br&gt;&amp;nbsp;Fsp_real = Fs_real + (Ts * v_o1_real) - Rs * Ts * Isp_real;&lt;br&gt;&amp;nbsp; &amp;nbsp; Fsp_imag = Fs_imag + (Ts * v_o1_imag) - Rs * Ts * Isp_imag;&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp;&lt;/p&gt;</description>
<category>Helper</category>
<guid isPermaLink="true">https://typhoon-hil.com/forum/?qa=428/unexpected-model-behavior-with-induction-motor-parameters</guid>
<pubDate>Wed, 23 Jul 2025 08:29:14 +0000</pubDate>
</item>
<item>
<title>Create a single-phase microgrid</title>
<link>https://typhoon-hil.com/forum/?qa=409/create-a-single-phase-microgrid</link>
<description>&lt;p&gt;Hello! I&#039;m new to this software and I don&#039;t know how to use it.&lt;/p&gt;&lt;p&gt;I need to develop a single-phase microgrid that includes the following elements: the utility distribution grid (Grid), a household - consumer (Variable Load), a photovoltaic system (PV Power Plant), and an energy storage system for the electricity produced by the PV system (Battery ESS). In Typhoon HIL, I must demonstrate that the photovoltaic panels on the house generate electricity when solar irradiance is present, and the surplus energy that the house does not consume should be stored in the battery system. When the PV panels stop generating electricity, the house should be powered from the stored battery energy. The idea is that I need to replicate these processes in Typhoon HIL for an exam. Please help me with detailed guidance on how to implement these processes. I do not understand how to use the Python code as shown here: &lt;a target=&quot;_new&quot; rel=&quot;nofollow&quot; href=&quot;https://ticket.typhoon-hil.com/kb/faq.php?id=110&quot;&gt;https://ticket.typhoon-hil.com/kb/faq.php?id=110&lt;/a&gt;. I also don&#039;t understand what my professor wants with the Modbus client in HIL SCADA; why is it necessary?&lt;/p&gt;&lt;p&gt;Could you help me, please? I tried to watch all the videos from HIL&amp;nbsp;for Microgrids and Communication Protocols courses, but they are to general.&lt;/p&gt;&lt;p&gt;Thank you!&lt;/p&gt;</description>
<category>Helper</category>
<guid isPermaLink="true">https://typhoon-hil.com/forum/?qa=409/create-a-single-phase-microgrid</guid>
<pubDate>Mon, 02 Jun 2025 05:40:11 +0000</pubDate>
</item>
<item>
<title>DC microgrid</title>
<link>https://typhoon-hil.com/forum/?qa=399/dc-microgrid</link>
<description>&lt;p&gt;&lt;span style=&quot;background-color:#e90c17; color:#ffffff; font-family:Inter,Arial,sans-serif&quot;&gt;Please, i am going to design low voltage DC microgrid with PV battery storage system with wind and diesel in main grid connected mode and islanded mode i need some support. i made this system by mtalab but here look more hard&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Can you make some help for me ?do you have any model example for low voltage DC microgrid&lt;/p&gt;</description>
<category>Helper</category>
<guid isPermaLink="true">https://typhoon-hil.com/forum/?qa=399/dc-microgrid</guid>
<pubDate>Wed, 21 May 2025 10:19:51 +0000</pubDate>
</item>
<item>
<title>Issue with PV Panels Generic not responding to Irradiation profile</title>
<link>https://typhoon-hil.com/forum/?qa=373/issue-with-panels-generic-responding-irradiation-profile</link>
<description>Hi everyone,&lt;br /&gt;
&lt;br /&gt;
I am trying to implement an irradiation profile from a .txt file for the PV Panels Generic block using the macro variable in HIL SCADA. I followed the exact same approach as in the WindSpeed example, using the same code structure but with my own references. I am not getting any errors, and in the SCADA input, I can see that the irradiation variable changes according to my text file. However, the output power of the panel does not change. It seems like the input is not being received.&lt;br /&gt;
&lt;br /&gt;
Has anyone encountered this issue before? Any suggestions on what might be going wrong?&lt;br /&gt;
&lt;br /&gt;
Thanks in advance!</description>
<category>Helper</category>
<guid isPermaLink="true">https://typhoon-hil.com/forum/?qa=373/issue-with-panels-generic-responding-irradiation-profile</guid>
<pubDate>Wed, 02 Apr 2025 10:58:54 +0000</pubDate>
</item>
<item>
<title>IEC61850 MMS server: stop simulation not disconnecting/stopping iec61850 mms server</title>
<link>https://typhoon-hil.com/forum/?qa=372/iec61850-server-simulation-disconnecting-stopping-iec61850</link>
<description>I&amp;#039;m using example schematic of IEC61850 MMS server &amp;amp; with following script im able to connect the server &amp;amp; client &amp;amp; communicate points data but even after stopping the simulation the server &amp;amp; client are connected &amp;amp; communicating&lt;br /&gt;
&lt;br /&gt;
here is a few line of code that connect client &amp;amp; server but does not disconnect them&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;hil.load_model(file=cpd, vhil_device=False) &amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;hil.start_simulation() # client &amp;amp; server are connected here&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;hil.wait_sec(30)&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;hil.stop_simulation() # even after stopping simulation client &amp;amp; server are connected here&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print(is_simulation_running()) #prints False i.e simulation is not running&lt;br /&gt;
&lt;br /&gt;
am I missing out on something which might close the server?</description>
<category>Helper</category>
<guid isPermaLink="true">https://typhoon-hil.com/forum/?qa=372/iec61850-server-simulation-disconnecting-stopping-iec61850</guid>
<pubDate>Thu, 27 Mar 2025 07:12:40 +0000</pubDate>
</item>
<item>
<title>Symbolic Calculation in C funtion</title>
<link>https://typhoon-hil.com/forum/?qa=333/symbolic-calculation-in-c-funtion</link>
<description>Hello everyone&lt;br /&gt;
How to perform symbolic calculation using C-funtion in typhoon?</description>
<category>Helper</category>
<guid isPermaLink="true">https://typhoon-hil.com/forum/?qa=333/symbolic-calculation-in-c-funtion</guid>
<pubDate>Fri, 07 Feb 2025 08:58:22 +0000</pubDate>
</item>
<item>
<title>Solving a system of quadratic equation</title>
<link>https://typhoon-hil.com/forum/?qa=324/solving-a-system-of-quadratic-equation</link>
<description>&lt;p&gt;Hello every overyone&lt;br&gt;&lt;br&gt;I am trying to solve this system of quadratic equations in typhoon hil&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color:#008013; font-family:Menlo,Monaco,Consolas,&amp;quot;Courier New&amp;quot;,monospace; font-size:13.3333px&quot;&gt;% Va = 3, Vb = 2, Vc = 3&lt;/span&gt;&lt;/p&gt;&lt;p&gt;syms &lt;span style=&quot;color:#a709f5&quot;&gt;xb yb xc yc real&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color:#008013&quot;&gt;% Mise en equations&lt;/span&gt;&lt;/p&gt;&lt;p&gt;eq1 = (xb - Va)^2 + yb^2 == (Va - xc)^2 + yc^2; &lt;span style=&quot;color:#008013&quot;&gt;% Vab = Vac&lt;/span&gt;&lt;/p&gt;&lt;p&gt;eq2 = (xb - Va)^2 + yb^2 == (xb - xc)^2 + (yc - yb)^2; &lt;span style=&quot;color:#008013&quot;&gt;% Vab = Vbc&lt;/span&gt;&lt;/p&gt;&lt;p&gt;eq3 = xb^2 + yb^2 == Vb_mot^2;&lt;/p&gt;&lt;p&gt;eq4 = xc^2 + yc^2 == Vc^2;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color:#008013&quot;&gt;% resolution&lt;/span&gt;&lt;/p&gt;&lt;p&gt;eqns = [eq1,eq2,eq3,eq4]; &lt;span style=&quot;color:#008013&quot;&gt;% regroupement des equations&lt;/span&gt;&lt;/p&gt;&lt;p&gt;vars = [xb yb xc yc]; &lt;span style=&quot;color:#008013&quot;&gt;% variables &lt;/span&gt;&lt;/p&gt;&lt;p&gt;sol = solve(eqns,vars); &lt;span style=&quot;color:#008013&quot;&gt;% resolution des equations&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color:#008013&quot;&gt;% % % % calcul des angles requis pour reequilibrer les tensions&lt;/span&gt;&lt;/p&gt;&lt;p&gt;theta_ab = double(max((atan2d(sol.yb,sol.xb)))); &lt;span style=&quot;color:#008013&quot;&gt;% angle entre a et b&lt;/span&gt;&lt;/p&gt;&lt;p&gt;theta_ac = double(max((atan2d(sol.yc,sol.xc)))); &lt;span style=&quot;color:#008013&quot;&gt;% angle entre a et c&lt;/span&gt;&lt;/p&gt;&lt;p&gt;theta_bc = 360-(theta_ab + theta_ac); &lt;span style=&quot;color:#008013&quot;&gt;% angle entew b et c&lt;/span&gt;&lt;/p&gt;</description>
<category>Helper</category>
<guid isPermaLink="true">https://typhoon-hil.com/forum/?qa=324/solving-a-system-of-quadratic-equation</guid>
<pubDate>Thu, 06 Feb 2025 06:23:02 +0000</pubDate>
</item>
<item>
<title>Unable to Initialize Analog Signals VHIL</title>
<link>https://typhoon-hil.com/forum/?qa=264/unable-to-initialize-analog-signals-vhil</link>
<description>Hello,&lt;br /&gt;
&lt;br /&gt;
I am currently trying to run on the VHIL a model containing a FMU imported from a third party modelling environment.&lt;br /&gt;
&lt;br /&gt;
When compiling and reloading the .tse model from the schematic editor into the HIL SCADA, the following error is reported in the message log: &amp;quot;Unable to initialize Analog Signals!&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Inside the model I am trying to compile, only SCADA input/output are present besides the FMU.&lt;br /&gt;
&lt;br /&gt;
What could be the issue?&lt;br /&gt;
&lt;br /&gt;
Thank you,&lt;br /&gt;
&lt;br /&gt;
Luca</description>
<category>Helper</category>
<guid isPermaLink="true">https://typhoon-hil.com/forum/?qa=264/unable-to-initialize-analog-signals-vhil</guid>
<pubDate>Wed, 04 Dec 2024 17:51:18 +0000</pubDate>
</item>
<item>
<title>What will I be helping with?</title>
<link>https://typhoon-hil.com/forum/?qa=211/what-will-i-be-helping-with</link>
<description></description>
<category>Helper</category>
<guid isPermaLink="true">https://typhoon-hil.com/forum/?qa=211/what-will-i-be-helping-with</guid>
<pubDate>Mon, 04 Nov 2024 16:36:40 +0000</pubDate>
</item>
</channel>
</rss>