Programmatically changing the parameters of a LTI System Block in Simulink

M
Madalynn · Dec 18, 2020 · 2K views
Question
I am using an algorithm to iteratively optimize my controller during the simulation, so i need to update my controller parameters while the simulation is running, before i changed to using LTI System block I've used set_param function to programmatically change numerator and denominator parameters in a transfer function to update my controller during the simulation but now i need to be using the LTI System block and i can't seem to find out what the 'LTI system variable parameter' is called by. This is the function i am using right now: set_param('ES_Optimizer/LTI System', 'LTI system variable', [char('tf(['), num2str(K1), char(' '), num2str(K2), char(' '), num2str(K3), char('],[1 '), num2str(K4), char(' '), num2str(K5), char('])')]) Where K1 through K5 are my controller parameters for a 2nd order controller However it is giving me the error: An error occurred while running the simulation and the simulation was terminated Caused by: LTI Block block (mask) does not have a parameter named 'LTI system variable' I believe the "LTI system variable" parameter needs to be something else but i couldn't find what is the correct name for the parameter.
Expert Answer
Profile picture of Kshitij Singh
Kshitij Singh PhD Expert
Answered Aug 12, 2026

The parameter names are "sys" and "IC".

 

get_param('ES_Optimizer/LTI System','sys')
get_param('ES_Optimizer/LTI System','IC')
100% Run Guarantee 3-Hour Fast-Track Delivery

Need a Custom Version or Complete Simulation for This Problem?

Our 500+ PhD engineers build, debug, and optimize working MATLAB scripts and Simulink (.slx) models tailored to your exact assignment rubrics with zero plagiarism.

Tested on MATLAB R2024b / R2026a
Turnitin 0% Plagiarism Report
Free 7-Day Revisions Guarantee
Have a different question? Ask here

Get a Free Consultation or a Sample Assignment Review!