How to simulate Laplace system with arbitrary input, while being able to change the input coresponding to the output?

2 views (last 30 days)
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.
Regards, Tan

Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!