Dear MATLAB community,
I have a SISO Laplace transform plant, with input u, output y. I am trying to control the plant using machine learning algorithm. My goal is to get the feed the machine learning agent with output y, and the machine learning agent will provide suitable u.
How can I simulate this using MATLAB function? I tried
[y, t] = lsim(sys,u,t),
Where sys is my Laplace transfer function plant. However, I cannot control input u with response to output y using lsim.
Is there a method to simulate Laplace plant sys with response to input u, while being able to read output y and adjust u accordingly in the middle of the execution?
Please help. Thank you.