Model and control state space with perturbation

12 visualizaciones (últimos 30 días)
CN.
CN. el 14 de Oct. de 2024
Comentada: Sam Chak el 16 de Oct. de 2024
Hi everybody,
I have a dynamic model with a perturbation such that:
I would like to know if it is possible to control both x and d ?
I would like the state x to follow a prescribed trajectory and reject the perturbation such that .
My problem is that I do not know the dynamics of d and I cannot include it into the state.
I have read the Matlab tutorials but I have not been able to model this problem correctly to solve it yet.
Thanks very much for your help
  2 comentarios
Sam Chak
Sam Chak el 15 de Oct. de 2024
Hi @CN.
Which MATLAB tutorial are you reading? Since your first-order system is linear, I believe this control problem is typically addressed in all undergraduate-level control textbooks, such as those covering the PI controller.
Conventional textbooks usually provide more technical details and explanations but often lack coding examples. Typically, the reader is expected to code the equations and formulas based on their own interpretation.
CN.
CN. el 15 de Oct. de 2024
Editada: CN. el 15 de Oct. de 2024
Hi Sam, thank you for considering my problem.
To give you more details, let's say I have a system for which I would like to control two variables x and d but I do not know the dynamics of , only x of the form :
My objective is to drive both x and d towards 0.
I know the place commande can achieve this when there is no perturbation, but how can I deal with d ?
I have read this discussion but this does not seem appropriate in my case since d is not an input and not measured. I tried to include it into my state to use the place command "normally" with an extended state but I do not know the dynamics of d so I cannot write .
I hope this makes sense... Thanks again !

Iniciar sesión para comentar.

Respuestas (1)

Sam Chak
Sam Chak el 15 de Oct. de 2024
Hi @CN.
The discussion in the provided link does not address control design for disturbance rejection.
Regarding your inquiry, based on the given generic control problem, the state is controllable, and you can somewhat manage the effect of the disturbance on the time response of the state with a properly designed controller. However, it is not possible to make a non-zero disturbance become zero.
For example, when flying a drone, you can control the maneuverability of the drone. However, gusts of wind that change direction quickly and abruptly can make the drone difficult to operate. As you may know, you cannot make the speed of the wind gusts become zero because your controller does not directly affect wind speed.
I went to the library to refresh my knowledge of the PI control of 1st-order systems. Here is a simple demo, assuming that the disturbance is time-varying but changes slowly. The extended state can be used to estimate the disturbance and then to compensate for the disturbance.
%% Solving the ODE
tspan = [0 20]; % simulation time interval
initx = [1; 0]; % initial values of states
[t, x] = ode45(@system, tspan, initx);
%% Plot the results
x1 = x(:,1); % state 1 is the output of the system
x2 = x(:,2); % state 2 is the estimated disturbance
plot(t, [x1, x2]), grid on, grid minor
legend('state 1', 'state 2')
xlabel('t')
ylabel('\bf{x}')
%% The function for describing ODE
function dxdt = system(t, x)
% initialization
dxdt = zeros(2, 1);
% System parameters
A = 1; % state coefficient
B = 1; % control input coefficient
W = 1; % disturbance input coefficient
d = cos(pi/1000*t); % constant or slow time-varying disturbance
% Controller
Kp = 2; % Proportional gain
Ki = 1; % Integral gain
u = - Kp*x(1) - Ki*x(2);
% System dynamics
dxdt(1) = A*x(1) + B*u + W*d;
dxdt(2) = x(1); % extended state for estimating the disturbance
end
  4 comentarios
CN.
CN. el 16 de Oct. de 2024
Thanks very much, it is indeed interesting.
One last thing I am not sure to understand is that the last equation you provide, relating $x_1,x_2$ and are static equations. But I will need dynamic models to control the state, right ?

Iniciar sesión para comentar.

Productos


Versión

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by