Professional Documents
Culture Documents
ZN Final - Andini Vira
ZN Final - Andini Vira
P
5023201065
Biocybernetics Q
For two different plants of certain control systems with following differentian equations in
equation (1) and equation (2)
end;
//Plant 2
if RadioButton4.Checked then
begin
k1 := DT * Derivative3(T, ProcessVariable, Output, 0, xdot2);
k2 := DT * Derivative3(T + 0.5 * DT, ProcessVariable + 0.5 *
k1, 0, Output, xdot2);
k3 := DT * Derivative3(T + 0.5 * DT, ProcessVariable + 0.5 *
k2, 0, Output, xdot2);
k4 := DT * Derivative3(T + DT, ProcessVariable + k3, 0,
Output, xdot2);
ScrollBar1.Min := 1;
K := ScrollBar1.Position / 10.0;
Tau := strtofloat(Edit2.Text);
L := strtofloat(Edit1.Text);
Ku := ScrollBar5.Position / 10.0;
Pu := strtofloat(Edit3.Text);
R := K/Tau;
if RadioButton1.Checked then
begin
Kp := 1.2 / (R * L);
Ki := 0.6 / (R * L * L);
Kd := 0.6 / R;
Memo1.Clear;
Memo1.Lines.Add(Format('Kp := %.2f', [Kp]));
Memo1.Lines.Add(Format('Ki := %.2f', [Ki]));
Memo1.Lines.Add(Format('Kd := %.2f', [Kd]));
if RadioButton2.Checked then
begin
Kp := 0.6 * Ku;
Ki := 1.2 * Ku / Pu;
Kd := 0.075 * Ku * Pu;
Memo1.Clear;
Memo1.Lines.Add(Format('Kp := %.2f', [Kp]));
Memo1.Lines.Add(Format('Ki := %.2f', [Ki]));
Memo1.Lines.Add(Format('Kd := %.2f', [Kd]));
while T <= 10 do
Plant A (Step Response)