2. SW2=1; SW1=SW3=0
Using KP=0.1, KI=4 and KD=0.3. Your program should display the transfer functions
M1(s),M2(s),M3(s) and M4(s)
you must use matlab and include the codes.
SOLUTION
Given That data is closed loop transfer function of requirement is
SW2=1; SW1=SW3=0
Using KP=0.1, KI=4 and KD=0.3
MATLAB code is given below in bold letters:
clc;
close all;
clear all;
s = tf('s');
K = 3;
a = 1/0.5;
G = K*a/(s+a);
KP = 0.1;
KI = 4;
KD = 0.3;
% closed loop transfer function for the given case
% switch 1 is closed switch 2 and switch 3 are closed as well
T = feedback(G,KP+KD*s+KI/s); % feedback loop transfer
function
T
figure; step(T); grid on;
title('Step response of closed loop system');
T =
6 s
--------------------
2.8 s^2 + 2.6 s + 24
Continuous-time transfer function.
2. SW2=1; SW1=SW3=0 Using KP=0.1, KI=4 and KD=0.3. Your program should display the transfer functions M1(s),M2(s),M3(s)...