Controlling the actuator with 5,10 mm displacement input.

Hello,
I am working on a control project, basically a simulation of an actuator and I don`t have a control or electrical background, trying to figure out the thing step by step.
On this LINK you can see what kind of a simulation I am trying to create.
My current system has STEP INPUT---- PID --- DC MOTOR ---- MECHANICAL SYSTEM ---- OUTPUT. So my basic block diagram is looking like that.
Currently, I am giving random numbers as input to my Step input and PID cause I don`t know what are the realistic numbers for them, that random inputs making my system create a force and work. You can see the output I get according to these random number I made up.
My aim is getting correct numbers and being able to controlling the simulation on my simulink page. Like in this VIDEO. Also I want to have buttons on my simulink page to control the system like in the video, but my buttons are going to create different displacement like 10mm -10mm, 20mm -20mm.
Basically I am trying to achieve a displacement graph like that and force graph is going to be adjust itself according to that. It doesn`t have to be the same but I want to control the system with the button on my simulink page.
I am adding a Dummy Version of my Simulink model to this question. I have just change the Cad models on that system, didn`t changed anything else.
Your help is really important to me.
Thanks.

3 Comments

A fundamental understanding of basic control theory cannot be overlooked unless you plan to use a reinforcement learning (RL) control agent to assume the role of the control designer. If you choose to pursue RL, you must be very patient.
First and foremost, can you provide the "mathematical function" for the RED reference tracking signal? This is the initial step. Mathematical functions are typically covered in most pre-university courses, so I believe you should be able to handle it. The reason for this is that later you will need to instruct the PID controller to follow the RED reference tracking signal.
Hi. Confidential Solution Roadmap:
I have experience and skills in doing controller-regulators.
Following Occam's Razor phylosophical principle:
you just need basically to make your output to follow the step input (which is generally setpoint). The setpoint can be any sequence, the PID controller function is to adjust accordingly, you may need not know exact DC motor and mechanical system parameters (can be integrated-joined into 1 common block: Plant), in real world scenarios, which I also worked in, while control signal propogates through the plant parts, process model and sensor uncertaintities and noise(disturbance) can be added in you loop, so that is why they hire/employ engineers to tackle it and for it the Deep Learning Control ( basically based on utility function maximization/minimization) has became going on developing.
At which point in system do you measure Force?, where do you measure displacement,? which part is top part in you model?
It requires actual rewardable for both hiring via Skype/emai/mobile phone to do it.
Hello,
Yes, I can provide the transfer function but I just want to ask why do we need it ? According to my knowledge I can use it to tune the PID, is that why you are putting that as first step ?

Sign in to comment.

Answers (1)

The mathematical function for the reference signal (red curve) is necessary so that we can instruct the PID controller to produce the actuated signal for the plant output, enabling it to track the reference signal.
Here is a simple demonstration:
First, the reference signal is designed. Next, the step response of the uncontrolled plant is analyzed. With a settling time of 6 seconds, the plant cannot track the reference signal effectively.
Consequently, a PID controller is tuned to achieve a settling time of approximately 1 second. Now, the closed-loop system can track the reference signal accurately.
t = linspace(0, 40, 4001);
% Line 1
L1 = (20 - 0)/(15 - 8)*t + ( 0 - (20 - 0)/(15 - 8)* 8);
y1 = min(max(L1, 0), 20).*(heaviside(t - 0) - heaviside(t - 17));
% Line 2
L2 = (10 - 20)/(22 - 20)*t + (20 - (10 - 20)/(22 - 20)*20);
y2 = min(max(L2, 10), 20).*(heaviside(t - 17) - heaviside(t - 25));
% Line 3
L3 = (-10 -10)/(31 - 28)*t + (10 - (-10 -10)/(31 - 28)*28);
y3 = min(max(L3,-10), 10).*(heaviside(t - 25));
% Reference signal
ref = y1 + y2 + y3;
figure
plot(t, ref, 'color', '#D74967', 'linewidth', 3)
grid on, grid minor, ylim([-20, 20])
xlabel('t')
ylabel('R(t)')
title('Reference signal')
% Plant
Gp = tf(1, [1 2 1])
Gp = 1 ------------- s^2 + 2 s + 1 Continuous-time transfer function.
figure
step(Gp, 12), grid on, grid minor
title('Step response of the Plant')
% Plot result
figure
lsim(Gp, ref, t)
grid on, grid minor, ylim([-20, 20])
% PID Controller
Kp = 4.75;
Ki = 2.5;
Kd = 2.025;
Tf = 0.1;
Gc = pid(Kp, Ki, Kd, Tf)
Gc = 1 s Kp + Ki * --- + Kd * -------- s Tf*s+1 with Kp = 4.75, Ki = 2.5, Kd = 2.02, Tf = 0.1 Continuous-time PIDF controller in parallel form.
% Closed-loop system
Gcl = feedback(Gc*Gp, 1)
Gcl = 25 s^2 + 50 s + 25 --------------------------------- s^4 + 12 s^3 + 46 s^2 + 60 s + 25 Continuous-time transfer function.
figure
step(Gcl, 3), grid on, grid minor
title('Step response of the Closed-loop System')
% Plot result
figure
lsim(Gcl, ref, t)
grid on, grid minor, ylim([-20, 20])

4 Comments

Hello Sam,
Thanks for your help. As far as I understand the calculations you have done refers my PID Controller spesifications according to the Displacement Graph I want from the system, also thanks again for the calculations.
My current challenge is implementing this to the my system. I set my PID according to your calculation but I am not sure I am getting the correct results. My current diagram is looking like that.
I have two displacement Scope connected to my prismatic joint, one of them is in the Mechanical System Subsytem the other one is on the main page, both giving me different graph I couldn`t understand why ?
I feel like I am missing something while creating closed loop system, I will look deep into it. Also I am open for suggestions but my main questions to ask you is, do you think am I going to be able to create - mm displacement with only PID control tuning ?
When I am trying to give a (-) displacement to the system I am only able to do it when I set the PID to (-) settings.
Do you think is it the way to create that one axis displacement on this video ? Because I am only trying to do the same thing. https://www.youtube.com/watch?v=egThLwGQqlk&ab_channel=HamidCastillo
Do you think Setting PID correctly and creating the correct closed loop is going to create the displacement I want on the graphic or do I need to change something on my other elements ?
Thanks for your help.
The PID controller mentioned in my demo is tuned for the 2nd-order plant in my example. It should not be applied to your DC motor actuator and mechanical system, as there is no stability analysis to confirm its effectiveness in your case.
However, if you and your research team can provide the closed-loop transfer function for the segment outlined in RED, we can use pidtune() command to test whether a 2nd-order PID controller can deliver sufficient performance for the high-order actuated system.
Hello,
My Dc motor system is connected to Rack and Pinion, it is connected to Translational Multibody Interface and it is connected to a prismatic joint with Force input.
It might be challenging for me to calculate the transfer function of this but I will work on it.!
My mechanical system basically an actuator that moves in one axis with help of prismatic joint.
According to my research, basically on this video, https://www.youtube.com/watch?v=Iu4M3dD0kPQ&t=2115s&ab_channel=MATLAB they are creating desired input with different method. Is this a way to create this kind of displacement I want ?
I really appreciate your help.
The PID autotuner in Simulink (as shown in the YouTube video) can be used. In MATLAB, with the Control System Toolbox, we use the pidtune() command. If the auto-tuning does not yield satisfactory performance for your linear system, you should consider using a higher-order controller, as suggested by control theory.

Sign in to comment.

Products

Asked:

on 11 Oct 2024

Commented:

on 13 Oct 2024

Community Treasure Hunt

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

Start Hunting!