Plotting various K (gain) values for a transfer function to visually optimise control system?
Show older comments
I am trying to finish an anlysis of a system that I have made for the pitch control of a UAV... here is the code Ihave used so far to get the transfer function in matlab and at least get a response plot...
>> s=tf('s');
>> G1=0.2083/(s*(s+171));
>> G2=(1.151*s+0.1774)/(s^3+0.739*s^2+0.921*s);
>> T=(K1*K2*G1*G2)/(1+K1*K2*G1*G2*(1+(s/K1)+(s^2/K1*K2)))
I can then plot the response by applying values to K1 and K2 then running:
>> subplot(2,1,1)
step(T)
subplot(2,1,2)
impulse(T)
But i need to plot many different gain values for both K1 and K2 at the same time to see how they change the output... I have tried to apply a matrix to K1 and K2 but that doesnt let me because the systems are just 1x1tf.
Please help
Answers (0)
Categories
Find more on Tuning Goals in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!