ha9u63a7
ha9u63a7

Reputation: 6862

SIMULINK - Effects of Tunable/Changable Parameters in a masked subsystem when using Embedded Coder

I have a masked subsystem (in SIMULINK) containing several tunable parameters. The masked subsystem is a physical model and the tunable parameters are mass, length, load factor, initial dynamics (velocity, position angle), etc. Obviously, they will vary depending on the variants. There is a stage where my model will have to be code-generated (using Embedded Coder in SIMULINK) and used for real-time testing and investigation.

What I am not sure about is the effect of using tunable parameters for a model that requires code generation. For exmaple, if I set my mass, length, velocity, position, init. condition, and other parameters to specific values, could I still manage to have a successful code generation? I know that people will now scream,"Why don't you just do it and see what happens?". I have been waiting for my Embedded Coder license and trying to derisk my models meanwhile. Without any expert suggestion, I have no way to determine this.

Could anyone please advise?

KR,

Upvotes: 4

Views: 2263

Answers (1)

Navan
Navan

Reputation: 4477

There should be no issues with tunable parameters in code generation. You will still be able to generate code. Tunable parameters give you more control both in simulation and generated code. You can turn on "Inline parameters" option and then tunable parameters will be treated same as any other parameter. Their values will be inlined in generated code. If not you will get storage created for them in the generated code. This storage is used to tune the parameters in the generated code.

Upvotes: 6

Related Questions