Good morning.
I am trying to design a PD controller manually and i wanted to be able to have a plot with parameters on which i can change their values live and see their result on plot. I want to emphasize again that i want to do the design by manualy changing Pi and PD parameters and not automatically via matlab pid designer.(The question is more matlab affiliated).
Sorry for my bad English.
Thanks in advance (My code follows):
clear all;
clc;
syms s;
K=1;
num = 4500*K;
den = sym2poly(s^2+361.7*s);
G=tf(num,den);
H=1;
%%
Kp=2;
Ki=0;
Kd=0;
C=pid(Kp,Ki,Kd,0);
T=feedback(C*G,H);
step(T);
You can make a simple matlab GUI for that, with textboxes or sliders to representing your gains and an
axes
object to hold your plot. Than in the callback functions of the textboxes/sliders you just create your system and controller based on theValue
properties of the textbox/sliders, simulate the response and plot it in theaxes
object.Here you can find some tutorials for matlab guis