Controlling the actuator with 5,10 mm displacement input.

3 次查看(过去 30 天)
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 个评论
Pavl M.
Pavl M. 2024-10-11
编辑:Pavl M. 2024-10-11
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.
Fatih
Fatih 2024-10-11
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 ?

请先登录,再进行评论。

回答(1 个)

Sam Chak
Sam Chak 2024-10-12
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 个评论
Fatih
Fatih 2024-10-13
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.
Sam Chak
Sam Chak 2024-10-13
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.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 PID Controller Tuning 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by