# ODrive Pro - Simulink Library

**URL:** <https://discourse.odriverobotics.com/t/odrive-pro-simulink-library/12877>\
**Category:** ODrive Pro Support\
**Created:** [April 6, 2025, 3:02pm UTC](https://discourse.odriverobotics.com/t/odrive-pro-simulink-library/12877 "2025-04-06T15:02:23Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![bil](https://discourse.odriverobotics.com/letter_avatar_proxy/v4/letter/b/f07891/32.png) [@bil](https://discourse.odriverobotics.com/u/bil)\
**Post date:** [April 6, 2025, 3:02pm UTC](https://discourse.odriverobotics.com/t/odrive-pro-simulink-library/12877/1 "2025-04-06T15:02:23Z")

</div>

Hello everyone!

I am a Simulink expert. I’ve looked for Simulink library of ODrive Pro, but I couldn’t find any. In addition, I couldn’t find the schematic diagram of the Pro. If anyone share technical drawings of the system (All pinouts) I can create simulink library of the ODrive Pro.

Sincerely.

Bill.

---

<div class="post-metadata">

**Author:** ![solomondg](https://discourse.odriverobotics.com/letter_avatar_proxy/v4/letter/s/bcef8e/32.png) [@solomondg](https://discourse.odriverobotics.com/u/solomondg)\
**Post date:** [April 8, 2025, 1:55am UTC](https://discourse.odriverobotics.com/t/odrive-pro-simulink-library/12877/2 "2025-04-08T01:55:35Z")

</div>

Hi! What specifically do you need to complete your library? Are you asking for an internal schematic of the ODrive, or just information on the output pins functions? I’m happy to provide more information regarding the internal control structure and control loops of the ODrive, if that helps!

---

<div class="post-metadata">

**Author:** ![bil](https://discourse.odriverobotics.com/letter_avatar_proxy/v4/letter/b/f07891/32.png) [@bil](https://discourse.odriverobotics.com/u/bil)\
**Post date:** [April 8, 2025, 6:55am UTC](https://discourse.odriverobotics.com/t/odrive-pro-simulink-library/12877/3 "2025-04-08T06:55:03Z")

</div>

Hello,

Thank you for your response. Actually, I didnt fully understand the Web GUI. For example, I just want to give PWM to the ODrive and calculate the velocity. But I couldnt realize. Therefore I wanted to create my block diagram in simulink.

As far as I understand, you’ve used STM32H7A3 board and DRV8301 driver in Pro system. Mathworks’s support is available for both. Thus, I thought that I can compose my algorithm.

You didnt upload all ODrive Pro documents to github, whatever you give me it is good for me. Or, if you give me just pin diagram it is good as well. I can compose in STM CubeMX and call it from Simulink.

I will share all Simulink diagram from Github. Your costumers will be happier than now :).

Sincerely,

---

<div class="post-metadata">

**Author:** ![solomondg](https://discourse.odriverobotics.com/letter_avatar_proxy/v4/letter/s/bcef8e/32.png) [@solomondg](https://discourse.odriverobotics.com/u/solomondg)\
**Post date:** [April 9, 2025, 10:29pm UTC](https://discourse.odriverobotics.com/t/odrive-pro-simulink-library/12877/4 "2025-04-09T22:29:51Z")

</div>

Hi Bil,

The ODrive uses the DRV8353, however our software runs all onboard FOC control algorithms, and I would strongly recommend against running custom firmware on the ODrive Pro, as we’ve developed some very high performance control algorithms, as opposed to using anything off the shelf. Note the ODrive Pro is closed source, however the ODrive v3.6 is open-source.

You can see the onboard controller’s block diagram [here](https://docs.odriverobotics.com/v/latest/manual/control.html#structure), it should be fairly straightforward to model the relationship between PWM input and torque/velocity output given the gains for the onboard PI controller (vel\_gain/vel\_integrator\_gain). For setting up PWM input, you can use the [web GUI](https://gui.odriverobotics.com/), or see instructions [here](https://docs.odriverobotics.com/v/latest/manual/pwm-input.html) for use with ODrivetool.

---

<div class="post-metadata">

**Author:** ![bil](https://discourse.odriverobotics.com/letter_avatar_proxy/v4/letter/b/f07891/32.png) [@bil](https://discourse.odriverobotics.com/u/bil)\
**Post date:** [April 10, 2025, 12:33am UTC](https://discourse.odriverobotics.com/t/odrive-pro-simulink-library/12877/5 "2025-04-10T00:33:51Z")

</div>

Hi!

I am very upset to hear thar Pro is closed-source… I buy it because this is open source.

My purpose is to use the Pro by designing different controllers such as sliding mode, MPC, Reinforcement Learning based controllers etc. in my university. Also, I guess that your controllers are not robust enough. Have you ever test your controllers’s robustness?

Sincerely yours,

---

<div class="post-metadata">

**Author:** ![solomondg](https://discourse.odriverobotics.com/letter_avatar_proxy/v4/letter/s/bcef8e/32.png) [@solomondg](https://discourse.odriverobotics.com/u/solomondg)\
**Post date:** [April 10, 2025, 5:57am UTC](https://discourse.odriverobotics.com/t/odrive-pro-simulink-library/12877/6 "2025-04-10T05:57:18Z")

</div>

Apologies for the disappointment – the decision to take the newer ODrive products closed source was not one we made lightly, and it was definitely a hard one. However, ODrive v3.6 will always remain open source.

In the future, we plan on a feature that’ll allow for executing custom user code alongside with the ODrive core firmware, which should allow for a high degree of customization and flexibility.

I’d note though that I think your application is possible on an ODrive Pro as-is. In torque control mode, you can command arbitrary torque setpoints. Over USB or CAN, this can be done at 1-2kHz, which should be more than fast enough for the vast majority of applications. Our internal current controller and encoder estimator are deterministic, and the behavior can be modeled quite easily in Simulink – happy to share additional details, if you desire.

We definitely have plenty of customers using an external control loop with an ODrive, with a lot of success – I’d recommend giving that a shot.

One question – when you ask about “robustness”, what specifically do you mean? Are you talking about the controls / mathematical robustness of the ODrive’s position/velocity controller? Or the current controller and encoder estimator (e.g. the core functionality for a torque loop)? Or do you mean the actual electrical/mechanical robustness of the ODrive itself – i.e. whether or not it’ll malfunction or fail? Happy to answer any questions you may have here!

---

<div class="post-metadata">

**Author:** ![bil](https://discourse.odriverobotics.com/letter_avatar_proxy/v4/letter/b/f07891/32.png) [@bil](https://discourse.odriverobotics.com/u/bil)\
**Post date:** [April 17, 2025, 7:10am UTC](https://discourse.odriverobotics.com/t/odrive-pro-simulink-library/12877/7 "2025-04-17T07:10:32Z")

</div>

Hi again, sorry for late response.

I give up to use ODrive because I hear that Pro will be closed-source :(. Give me my money back 😃 lol.

Anyway, My system has lots of nonlinearities, disturbances, and uncertainties. I need to design more robust controller that I mention above. PID and its combinations are not enough to handle these phenomenon. I believe, if you create its Simulink library your numbers of happy customer would definitely increase.

Sincerely.

---

<div class="post-metadata">

**Author:** ![solomondg](https://discourse.odriverobotics.com/letter_avatar_proxy/v4/letter/s/bcef8e/32.png) [@solomondg](https://discourse.odriverobotics.com/u/solomondg)\
**Post date:** [April 17, 2025, 4:45pm UTC](https://discourse.odriverobotics.com/t/odrive-pro-simulink-library/12877/8 "2025-04-17T16:45:45Z")

</div>

> I give up to use ODrive because I hear that Pro will be closed-source :(. Give me my money back 😃

Fully understood, apologies for the bad experience. Please feel free to email [info@odriverobotics.com](mailto:info@odriverobotics.com) with your order number, and we can arrange a return or an exchange for an ODrive v3 (which is open source).

> Anyway, My system has lots of nonlinearities, disturbances, and uncertainties. I need to design more robust controller that I mention above. PID and its combinations are not enough to handle these phenomenon.

I agree, it sounds like a robust controller is important for your application. I’d note that the output of these controllers are typically torque setpoints, which you would then be able to directly feed into the ODrive’s internal FOC loop (which has a known behavior and settling time, it’s proven robust). That way you can focus on designing the control algorithm, and the ODrive can handle the torque control of the motor.

You’re also welcome to get an ODrive v3 (which is fully open source), and use Simulink Coder to program that, but my experiences with Simulink generating embedded code in the past have been quite negative, that’s likely not the approach I would take.

Let me know if I can help in any other way – part of my background is in controls as well, so I’m happy to give more specific recommendations.
