Connecting PID Controller with matlab

I want to tune the PID controller. For that how can i connect my simulink model to .m file?
Thank you

3 Comments

Why do you need to connect your simulink model to a .m file to tune the PID controller ?
I want to tune the PI parameters using neural network. So I want to get values of Kp, Ki after every cycle.
Thank you
So does your .m file contain the PI parameters or the neural network?

Sign in to comment.

Answers (1)

use this C(:,:,i) = pid(Kp,Ki,Kd);

Asked:

on 13 Feb 2019

Answered:

on 28 May 2020

Community Treasure Hunt

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

Start Hunting!