Having problems with PID Control...

Hi, I'm designing an ideal robotic arm which is controlled by a PD. The functioning is very simple: The overshoot and stablishment time conditions are introduced and the dominant poles will be calculated. After that the Derivative control will act and control the system using the argument criterion, calculating the gain and where the Zero has to be introduced.
The problem comes that if I introduce certain conditions like 40% ovreshoot and 5 stab. time will not act as it is supposed to be even if the argument criterion can be satisfied.
If i increase the stablishment time the overshoot will be satisfied until 40% or even 50%, but not anymore... Anyone know why this can occur?
Thanks!

Answers (1)

Sam Chak
Sam Chak on 1 Nov 2023
Based on the provided information and without the mathematical model of the robotic arm and the PD controller gains, it's not clear what specific technical issue you are facing. However, one common reason for your difficulties in achieving the desired overshoot and settling time criteria is that the PD controller gains may not be appropriately tuned. (This could be the main reason).

6 Comments

The robotic arm model is:
And the PD controller model is:
With an overshoot of 30% and a stablish time of 10seconds, the system controlled looks like this:
Here, all the conditions are satisfied. The problem comes when the stablishing time is reduced, for example: 4 seconds:
It either looks like this or with no overshoot at all, maybe 10% even if 30% is asked.
To calculate the dominant poles I use:
and
When calculating the gain I follow the formula of : sqrt(Img part of dominant pole^2+ (Real part- Pole)^2) /sqrt(Img part of dominant pole^2+ (Real part- Zero of the transfer function)^2*Previous Gain).
If I insert any of the pre-made exercises it comes out without problems, but when asking anything that satisfies the argument criterion... sometimes it works, other times not(specailly when the stablishment time is low, even if the Root Places graph has the dominant poles in it)
My professor also said that the Gain should be wrong, but I can't really find the error.
Thank you for your clarification. Could you please provide the MATLAB code for the robot arm transfer function and the PD controller so that I can test it on my machine?
Here you go. You shall execute ControlPID.mlx
plot_brazo, BrazoCorregidoPD and BrazoCorregidoPID are responsible for plotting the robotic arm.
ControlPD is responsible for calculating the PD controller.
PolosDeseadosPID is the one that calculates de dominant poles that are required to satisfact the overshoot and stablishment time.
Comprueba just checks if they dominant poles are in place of the roots graph. If they are ControladorP calculates the required gain.
I'm not very familiar with digital control design; hence, I converted the system to continuous time to see if it can be controlled to achieve your desired settling time of 4 seconds. If successful, then the designed controller can be discretized.
Perhaps you can edit your question to update the title (regarding the Discrete System) as well as to attach the relevant MATLAB files. This can attract experts in discrete-time systems.
K = 1;
c = 0.8;
num = K;
den = [1 c-1 -c];
G = tf(num, den, 0.1);
Gp = d2c(G, 'tustin')
Gp = 2.5 s^2 - 100 s + 1000 ---------------------- s^2 + 180 s Continuous-time transfer function.
% step(Gp)
% c2d(Gp, 0.1,'tustin') % check if it returns the original discrete model G
Here is the update. I am unfamiliar with your dominant-pole-based design approach. Therefore, I used the tuning tool to attempt to design a PD controller that meets the desired settling time and overshoot requirements. If you can adjust the parameters in the dominant-pole technique to produce similar PD gain values, you should obtain similar performance as shown below.
% Discrete-time Plant
K = 1;
c = 0.8;
num = K;
den = [1 c-1 -c];
Gp = tf(num, den, 0.1)
Gp = 1 ----------------- z^2 - 0.2 z - 0.8 Sample time: 0.1 seconds Discrete-time transfer function.
% Discrete-time PD Controller
w = 1.25;
[Gc, info] = pidtune(Gp, 'pd', w)
Gc = z-1 Kp + Kd * ------ Ts with Kp = 0.225, Kd = 0.0112, Ts = 0.1 Sample time: 0.1 seconds Discrete-time PD controller in parallel form.
info = struct with fields:
Stable: 1 CrossoverFrequency: 1.2500 PhaseMargin: 86.0206
% Discrete-time Closed-loop control system
Gcl = feedback(Gc*Gp, 1)
Gcl = 0.1124 z + 0.1124 ------------------------ z^2 - 0.08757 z - 0.6876 Sample time: 0.1 seconds Discrete-time transfer function.
step(Gcl), grid on
S = stepinfo(Gcl);
S.SettlingTime
ans = 3
S.Overshoot
ans = 0

Sign in to comment.

Products

Release

R2023a

Asked:

on 1 Nov 2023

Commented:

on 4 Nov 2023

Community Treasure Hunt

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

Start Hunting!