Question: Write a function PI _ Cont that models the PI Controller. The function should take as input the current state of the system , calculate

Write a function PI_Contthat models the PI Controller. The function should take as input the current state of the system , calculate a control signal s, and return it as output.
Test your function at the initial conditions.
function s=PI_Cont(y)
% implement the PI controller function
Kb=0.0;
Kc=9.0;
KI=0.18;
Cb_SP=0.32;
Cb=y(2);
Ierr=y(4);
s=Kb+Kc*(Cb_SP-Cb)+KI*Ierr;
end
Part (b)
Write a function getfthat evaluates the right-hand side function of this ODE-IVP system at the current state and control signal s.
Test your funciton at the initial conditions.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!