How to make the gain of the Discrete Derivative block tunable?
Show older comments
Are the "Gain Values" of the "Discrete Derivative" and "Discrete Time Integrator" blocks tunable?
In my model these gains are in a structure MDLparam.ki and MDLparam.kd. where MDLparam is a Simulink.Parameter object. When I generate code or run the simulation I get the following warnings and as a result these two gain values do not appear tunable in the generated code:
Warning: Reducing expression 'MDLaram.kd' in parameter field 'gainval' of 'MDL/Discrete Derivative' to its numerical equivalent because this field is marked not tunable. This expression resolves to tunable variables (MDLparam (base workspace)). You will be unable to tune this expression during model execution
Warning: Parameter field 'gainval' of 'MDL/Discrete-Time Integrator' is non-tunable but refers to tunable variables (MDLparam (base workspace))
Accepted Answer
More Answers (0)
Categories
Find more on Simulink Coder in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!