# ControlSystems - MIMO inverse / MIMO feedback loops

**URL:** https://discourse.julialang.org/t/controlsystems-mimo-inverse-mimo-feedback-loops/17784
**Category:** Modelling & Simulations
**Tags:** control
**Created:** [November 20, 2018, 5:16pm UTC](https://discourse.julialang.org/t/controlsystems-mimo-inverse-mimo-feedback-loops/17784 "2018-11-20T17:16:13Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![silch12](https://avatars.discourse-cdn.com/v4/letter/s/a88e4f/32.png) [@silch12](https://discourse.julialang.org/u/silch12)
#### Post date: [November 20, 2018, 5:16pm UTC](https://discourse.julialang.org/t/controlsystems-mimo-inverse-mimo-feedback-loops/17784/1 "2018-11-20T17:16:13Z")

</div>

Hi there.

I’m currently studying Electrical Engineering and we have now a lecture Control Systems.  
Since we (should) use Matlab at school, but I can’t come to terms with proprietary software, I came across Julia as an alternative. Now I noticed that MIMO feedback and MIMO inverse are not implemented yet. Since this would be an important feature for me, I wanted to ask for a time forecast.

Best,  
silch12

---

<div class="post-metadata">

### Author: ![mfalt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mfalt/32/12467_2.png) [@mfalt](https://discourse.julialang.org/u/mfalt)
#### Post date: [November 20, 2018, 6:57pm UTC](https://discourse.julialang.org/t/controlsystems-mimo-inverse-mimo-feedback-loops/17784/2 "2018-11-20T18:57:56Z")

</div>

This is partly implemented, but the error message should probably be improved.  
StateSpace:  
If you represent your system as a state space (`ss(sys)`), then the toolbox will support feedback.  
The inverse also works (in the case where the inverse can be represented as a state-space, i.e D invertable).  
TransferFunction:  
In this case, we seem to have no implementation for inverses and feedback, I will look into this tomorrow, and see if it is possible to implement in a simple way.

---

<div class="post-metadata">

### Author: ![silch12](https://avatars.discourse-cdn.com/v4/letter/s/a88e4f/32.png) [@silch12](https://discourse.julialang.org/u/silch12)
#### Post date: [November 21, 2018, 2:48pm UTC](https://discourse.julialang.org/t/controlsystems-mimo-inverse-mimo-feedback-loops/17784/3 "2018-11-21T14:48:54Z")

</div>

Thats perfect 🙂 I’m new to Julia, and therefore I’m not yet able to produce good code by myself, so I’m really excited about the Julia-Community to help with such problems.

---

<div class="post-metadata">

### Author: ![baggepinnen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/baggepinnen/32/693_2.png) [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)
#### Post date: [November 21, 2018, 4:58pm UTC](https://discourse.julialang.org/t/controlsystems-mimo-inverse-mimo-feedback-loops/17784/4 "2018-11-21T16:58:26Z")

</div>

As a workaround, you can always convert to a `StateSpace` system, reduce it, call feedback and convert the result back to a `transferFunction`  
See

- `sys = ss(G)` to convert TF to SS
- `sysm = minreal(sys)` to reduce the system to a minimal representation
- `sysfb = fedback(...)`
- `Gfb = tf(sysfb)` to convert back to TF
