Linking Simulink to Bladed

조회 수: 16 (최근 30일)
Gerrit
Gerrit 2011년 10월 11일
댓글: zhiyu 2024년 9월 20일
I have a wind turbine (WT) model in the Bladed package (v3.85). I need to link a controller, which is developed in Simulink (R2007b or newer), to this Bladed WT model. There seem to be two possible ways of doing this:
1. Generate C code from Simulink, and modify or 'wrap' that to create a DLL file, which can then be called from the Bladed program. This would (appear to) require Simulink Coder to generate the C code.
2. Write a C-based DLL that links Bladed and Simulink in co-simulation.
Does anyone have any experience with either form of link between Simulink and Bladed, and any recommendations about what the best (only?) way is? Option 1 seems the usual recommended way (by Bladed), but from what I have heard, C code generated by SL Coder still needs quite some manual modification before it can be used to create the DLL.
If you know of any commercial tools that perform option 1 and/or 2, it would help to have some (range of) prices.
  댓글 수: 1
zhiyu
zhiyu 2024년 9월 5일
Hello dear Gerrit, now I'm working on this project while running into this problem, I don't know if you can share this part of the experience, I would be very grateful

댓글을 달려면 로그인하십시오.

채택된 답변

Kaustubha Govind
Kaustubha Govind 2011년 10월 11일
I don't have experience with Bladed, but I do agree that option#1 is more straight-forward and likely to cause fewer issues (like worries about synchronizing the two softwares in case of option#2). It's fairly straightforward to create a DLL from a Simulink model if you have a license for Embedded Coder (formerly, Real-Time Workshop Embedded Coder): Generating a Shared Library Version of Your Model Code
  댓글 수: 4
Kaustubha Govind
Kaustubha Govind 2011년 10월 17일
Gerrit asks:
Are you able to say anything about how much we could do with Simulink Coder alone, relative to your suggestion of adding Embedded Coder?
In other words, would it help us (to create a DLL file for option 1 of my original question) to use Simulink Coder, without Embedded Coder? Or would the C code generated from Simulink Coder still need too much modification to be useful?
Kaustubha Govind
Kaustubha Govind 2011년 10월 17일
Gerrit: I think if you have a fair amount of experience with C/C++, it should not be very difficult to create a DLL wrapper around the code generated using Simulink Coder. The one thing to keep in mind is that the code generated for Simulink Coder is not as efficient as from Embedded Coder. So if performance is not of utmost importance, I think it's worth spending some time writing your own DLL wrapper for code from Simulink Coder.

댓글을 달려면 로그인하십시오.

추가 답변 (2개)

Ivo Houtzager
Ivo Houtzager 2020년 7월 7일
There is a Simulink controller design example for GH Bladed and OpenFAST in github, see
  댓글 수: 1
zhiyu
zhiyu 2024년 9월 20일
That only applies to lower versions of bladed

댓글을 달려면 로그인하십시오.


zhiyu
zhiyu 2024년 9월 5일
Hello dear Gerrit, now I'm working on this project while running into this problem, I don't know if you can share this part of the experience, I would be very grateful
  댓글 수: 1
Gerrit
Gerrit 2024년 9월 10일
Hello Zhiyu, it is 13 years ago now that I did this work (and haven't repeated it since then) and I cannot remember exactly what we did. The memory I have is that we partnered with another company who generated the DLL(s) for us, using their Simulink Coder (and maybe Embedded Coder) licence. It was quite cumbersome that way; if we made a mistake in our Simulink controller model, or it needed re-tuning, we wouldn't find out until the resulting DLL came back to us. We'd then have to make our modifications in our Simulink model and re-send it, etc. Not a procedure I can recommend, but we were limited by the project budget and the customer not wanting us to spend learning-curve time on Coder
Good luck with your work, Gerrit..

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Simulink Coder에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by