Non linear plant equation and design the PID controller
2 次查看(过去 30 天)
显示 更早的评论
I have a set of equation which is non linear equation and I want to design a non a PID controller for the the equation. The equation and the condition are in thre attachments. Please give me any hints that might help me with equation. Where u is the PID controller equation.
0 个评论
回答(1 个)
Sam Chak
2024-1-16
The motion dynamics of your Z-axis robot can be expressed through the following equation:
Here, the combined effects of friction and gravity are represented as a lumped disturbance. While the friction force exhibits nonlinear behavior, resembling a mathematically-saturated function (not easily visualized in If-Else or Piecewise forms), the motion system without disturbance can be characterized as linear:
Upon taking the Laplace transform, the transfer function of the plant is derived as:
,
This clearly represents a Double Integrator system. With this understanding, a classical PID controller can be designed with a specific focus on Disturbance Rejection.
From the simulation result, the amplitude (max) of the output response (red curve) resulting from a unit step disturbance is marginally below 0.0025 m. With a friction force of 50 Nm, this disturbance will induce a maximum change in height of less than 0.125 m, dissipating within the subsequent 5 seconds.
%% Plant
t = 0:0.01:8;
s = tf('s');
m = 20; % robot mass
P = 1/(m*s^2) % Plant transfer function
%% Classical PID Controller with a focus on Disturbance Rejection
wc = 6; % <-- Tune this parameter to make the response faster or slower
opt = pidtuneOptions('DesignFocus', 'Disturbance-Rejection');
[C, info] = pidtune(P, 'PID', wc, opt)
%% Closed-loop TF from Reference R(s) to Output Y(s)
Gcl = feedback(C*P, 1)
yc = step(Gcl, t);
%% Closed-loop TF from Disturbance D(s) to Output Y(s)
Gdl = feedback(P, C)
yd = step(Gdl, t);
%% Step responses
yyaxis left
plot(t, yc),
ylabel('Height, z (m)')
yyaxis right
plot(t, yd), grid on
xlabel('Time, t (s)')
legend('Response to a Step Reference', 'Response to a Step Disturbance', 'location', 'East')
title('Step Responses')
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 PID Controller Tuning 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!