# Is it possible to change block parameter during simulation?

**URL:** <https://forum.plexim.com/t/is-it-possible-to-change-block-parameter-during-simulation/453>\
**Category:** PLECS\
**Tags:** transformer, changeable-variable, tap-changer\
**Created:** [July 12, 2018, 9:59am UTC](https://forum.plexim.com/t/is-it-possible-to-change-block-parameter-during-simulation/453 "2018-07-12T09:59:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nikilito](https://avatars.discourse-cdn.com/v4/letter/n/dfb087/32.png) [@nikilito](https://forum.plexim.com/u/nikilito)\
**Post date:** [July 12, 2018, 9:59am UTC](https://forum.plexim.com/t/is-it-possible-to-change-block-parameter-during-simulation/453/1 "2018-07-12T09:59:26Z")

</div>

Hello all,

it might seem the usual question but it isn’t.

I have an ideal transformer and its parameters are written in the initialization commands.

I would like to change the number of turns during the simulation (like a tap changer) so I can change the value of the secondary voltage (or primary) and so the power.

I saw there are a lot of useful tips to change parameter during the simulation in the forum (1-D look table, step, ecc..) but I think that no one can be right for my purpose.

Any idea?

Thank you in advance!

---

<div class="post-metadata">

**Author:** ![Kris\_Eberle](https://dub1.discourse-cdn.com/flex006/user_avatar/forum.plexim.com/kris_eberle/32/6_2.png) [@Kris\_Eberle](https://forum.plexim.com/u/Kris_Eberle)\
**Post date:** [July 24, 2018, 9:18pm UTC](https://forum.plexim.com/t/is-it-possible-to-change-block-parameter-during-simulation/453/2 "2018-07-24T21:18:55Z")

</div>

Hello,

Unfortunately it is not possible in PLECS to tune the parameters of a non-signal during a simulation. One idea though is that you could try and build a tap-changing transformer from primitives. You would need to use a multi-winding transformer, physical on-off switches, and switching logic to control the electric connections determining which windings are used at any given time (and therefore controlling the tap ratios). I would suggest using a lookup table to define the switch state logic and start with a simple example before scaling up.

Best regards,

Kris

---

<div class="post-metadata">

**Author:** ![nikilito](https://avatars.discourse-cdn.com/v4/letter/n/dfb087/32.png) [@nikilito](https://forum.plexim.com/u/nikilito)\
**Post date:** [July 25, 2018, 5:03am UTC](https://forum.plexim.com/t/is-it-possible-to-change-block-parameter-during-simulation/453/3 "2018-07-25T05:03:40Z")

</div>

Hi Kris!

Thank you for your answer!

Then I will try this way…

Best regards!
