Embedded Systems, Control System.
in ‘y’. clear; close all; clc; StepTime = 10.05; K = 44.3222; Tau = 0.8689; Kp = 0.2; Ki = 0; % Simulation Operation t = 0:0.01:20; u(1:1000) = 126; u(1001:2001) = 215; C = tf([Kp Ki],[1 0]); G = tf([K],[Tau 1]); Gc = feedback(G*C,1) % Gc = G*C/(1+G*C) y = lsim(Gc,u,t); %Plot plot(t, u, 'b'); hold