Model and control state space with perturbation

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 Comments

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. on 15 Oct 2024
Edited: CN. on 15 Oct 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 !

Sign in to comment.

Answers (1)

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 Comments

CN.
CN. on 15 Oct 2024
Edited: CN. on 15 Oct 2024
Thanks for the answer and the example.
It is interesting but not exactly what I am looking for.
Actually, in my case, d is not really a disturbance but a state whose dynamics is unknown and not measure. I do not the exact terminology, maybe disturbance was confusing.
My point is that I would like to include d as a state to control it but I do not know how to achieve this.
I only have a relationship between an output y and d and x such that . And the objective is to drive both x and d to 0.
Thanks again for your time !
Then, why not consider describing your system as the following?
where
is an unknown dynamical function.
The output vector equation is probably given by
.
If expanded, then
.
According to your description, since the output , the state and the control signal u are measurable, then
can be manipulated to determine the "unknown" state
.
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 ?

Sign in to comment.

Products

Release

R2024b

Asked:

CN.
on 14 Oct 2024

Commented:

on 16 Oct 2024

Community Treasure Hunt

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

Start Hunting!