One of the systems I want to control with PID is the state space equation with disturbances. Can someone help me to design matlab function of the system? Please

13 views (last 30 days)
I have given the space state parameters I want to use below. Can you help design and control this matlab function with PID?
  3 Comments
veysel burçak
veysel burçak on 9 Aug 2023
Thank you for your answer. I designed a controller by converting space state equaition to transfer function. However, since the transfer function gets initial condition 0, the graph does not give the correct result, the graph value does not start from 300, even though I set the step input, so I have to write this function. @Paul @Sam Chak
function [y,x_out] = fcn(x,u,d)
ny=1;
nx=2;
y = zeros(ny,1);
x = zeros(nx,1);
A=[-0.00446566 0.00445684; 0.00515227 -5.15227];
B=[0.00316315;0];
E=[0.00292761 0;0 -2.0315.10^(-8)]
C=[1;0];
x_out = A*x+B*u+E*d;
y = C*x;
veysel burçak
veysel burçak on 9 Aug 2023
Before attempting to solve the identification problem, we first performed sensitivity estimations with respect to the unknown model parameters (CpW and KW ) and the disturbance variables TI and Wloss by using the known and roughly estimated model parameters as nominal values.
During the measurements, the disturbance variable TI was measurable and constant and the cold water inlet flow rate m was constant. Furthermore, it was assumed that the environmental heat loss Wloss of the system was constant (which is an acceptable approximation of reality, since the outside temperature during the measurements was approximately constant and the temperature variation within the pressurizer was small).
Can you check disturbances vector from this paper please; https://www.sciencedirect.com/science/article/pii/S1474667015353416 @Sam Chak @Paul

Sign in to comment.

Accepted Answer

Sam Chak
Sam Chak on 9 Aug 2023
I have fixed the code in the MATLAB Function block. The initial condition is assigned in the Integrator block. It should be working correctly now.
function dx = fcn(w, u, x)
A = [-4.46566e-3 4.45684e-3;
5.15227e-3 -5.15227e-3];
B = [ 3.16315e-3;
0];
E = [ 2.92761e-3 0;
0 -2.03150e-8];
dx = A*x + B*u + E*w;
  5 Comments
veysel burçak
veysel burçak on 10 Aug 2023
Even though I change the parameters, the result does not change. I want the value to remain constant until the 20th second. From 20 to 25 it should be 305. I want to produce a better result than PID control. Thank you. An Bn En are mutable values. I need to produce a better result by changing the KSC and lambda @Sam Chak
Sam Chak
Sam Chak on 10 Aug 2023
I have examined the .slx file and identified some issues with the design methodology. However, I'm not familiar with handling mismatched disturbances. Moreover, no stability proof is provided to demonstrate that the proposed sliding mode controller can effectively track the reference input. If the existing PI controller can solve the tracking problem, perhaps you can apply some modifications to it.
Currently, I don't have a solution for the control design. Therefore, I recommend that you post a new question, and hopefully, experts in the field can offer guidance.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!