# Where does this bidirectional DC-DC demo block come from?

**URL:** <https://forum.plexim.com/t/where-does-this-bidirectional-dc-dc-demo-block-come-from/966>\
**Category:** PLECS\
**Tags:** plecs, dc-dc, c2000\
**Created:** [February 19, 2021, 10:24am UTC](https://forum.plexim.com/t/where-does-this-bidirectional-dc-dc-demo-block-come-from/966 "2021-02-19T10:24:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shichenseu](https://avatars.discourse-cdn.com/v4/letter/s/43a26b/32.png) [@shichenseu](https://forum.plexim.com/u/shichenseu)\
**Post date:** [February 19, 2021, 10:24am UTC](https://forum.plexim.com/t/where-does-this-bidirectional-dc-dc-demo-block-come-from/966/1 "2021-02-19T10:24:52Z")

</div>

Dear specialist:

```
  I got this bidirectional DC-DC demo block from one of your demo, but unfortunately I cannot find where it comes from , and I really want to know the innital command of this block ,can you tell me which demo contains this block?

```

 ![191](https://europe1.discourse-cdn.com/flex006/uploads/plecs/original/1X/84ce3ea474b78731fde9a15b4ded54a070a04e10.jpeg)

%% current controller

C.f\_Iloop = C.fs; % sampling frequency

C.Tp\_Iloop = (1.0/C.fs)/2; % equivalent delay

C.Ti\_Iloop = 2/C.Rl\*C.Tp\_Iloop;

C.Tn\_Iloop = C.L/C.Rl;

C.Ra = C.Tn\_Iloop/C.Ti\_Iloop; % Kp

C.Rsa = 1/C.Ti\_Iloop; % Ki

%% voltage controller

C.f\_Vloop = C.fs/10; % sampling frequency

C.Tp\_Vloop = (1.0/C.f\_Vloop)/2; % equivalent delay

C.Ti\_Vloop = 8/C.Chi_C.Tp\_Vloop_C.Tp\_Vloop;

C.Tn\_Vloop = 4\*C.Tp\_Vloop;

C.Ga = C.Tn\_Vloop/C.Ti\_Vloop; % Kp

C.Gsa = 1/C.Ti\_Vloop; % Ki

[bidirectional demo block.plecs](https://forum.plexim.com/uploads/short-url/wb0Rxtprtjn880pR9ZWtWGIlyzB.plecs) (91.1 KB)

---

<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:** [February 19, 2021, 1:08pm UTC](https://forum.plexim.com/t/where-does-this-bidirectional-dc-dc-demo-block-come-from/966/2 "2021-02-19T13:08:42Z")

</div>

This appears to be an old or incomplete version of a power stage included in some of our demo models, but see, for example, the “Power Split Hybrid Vehicle System” model. Let me know if this helps.

---

<div class="post-metadata">

**Author:** ![shichenseu](https://avatars.discourse-cdn.com/v4/letter/s/43a26b/32.png) [@shichenseu](https://forum.plexim.com/u/shichenseu)\
**Post date:** [February 19, 2021, 7:42pm UTC](https://forum.plexim.com/t/where-does-this-bidirectional-dc-dc-demo-block-come-from/966/3 "2021-02-19T19:42:28Z")

</div>

Wow, my dear ,thank U so much!!!
