PID control algorithm is used in most advanced motion control application for increased accuracy and efficiency. There are three control loops that can be controlled using a PID controller which are torque, velocity and position respectively. In vehicles which do not have the electronic controls do not have the linear motion though same power is transferred independently to the wheels. The non-linear motion of the vehicle is caused mainly by the mechanical vibrations and the difference in the surfaces in which the vehicle operates.
Hence, for minimizing deviation of vehicle from straight direction a closed loop PID controller that changes the power input the motors of the vehicle based on the change in their rotation [1]. Basically, the PID controller minimizes the gap between the measured power and the desired power to the wheels to maintain linear motion by changing the control inputs of the system. In this assignment, the vehicle is a brick escalator which moves in an incline plane from base to about 10 meters of height in full loaded condition [1].
The angle of inclination of the plane is about 45 degrees and the cart is moved through the rails installed in the inclined plane. The PID controller is installed in an Arduino board and the controller settings as specified below is written in MATLAB environment as given in the later sections [2]. The Arduino board is installed in the brick cart and the total weight of the cart is 200 kgs.
Aim:
The aim of the assignment is to move the loaded brick cart from base through the rails in the inclined plane to the top of the plane which is 10 meters above the ground. PID control system must be employed to control the movement of the brick cart.
Method:
The PID controller is designed in the Arduino board installed in the brick cart that provides signals and supply voltage which drives the motors of the engine coupled with the cart wheels. Hence, at first the hardware design of the PID controller components are is installed in the Arduino board followed by electric motor with supply installations in the cart [2]. Then the MATLAB programming is done in some capable machine and the motion of the cart will be controlled remotely via some signal transmitter installed in the machine and signal sensors installed the cart and work with the hardware system in synchronism.
The inclined track followed by the brick cart is given by following schematic diagram.
The programming of the PID controller is done in the trainsim.m MATLAB file with the given environmental conditions and the initial conditions of the brick cart.
Hence, the force balancing equation of the brick is
Fnet(t) = Fd(t) – Ff(t) – Fg(t)
Here, Fd(t) = driving force of the cart engine = Kpe(t) + KI eI(t) + KD eD(t)
Where, e(t) = error in driving force in proportional control part at time t.
eI(t) = error in driving force in integral control part at time t.
eD(t) = error in driving force in derivative control part at time t.
Kp, KI and KD are the proportional, integral and derivative constants which are needed to be determined to move the cart at the top of inclined plane satisfying the conditions given above.
Ff(t) = the dynamic friction force acting on the cart opposite of its motion = bv(t) = 1000v(t).
v(t) = velocity of the cart at time t.
Fg(t) = force due to gravity acting opposite of the carts moving direction = m∗g∗sin(θ)
MATLAB code:
function [error,F_drive] = trainsim(Kp,Ki,Kd
%% PID controller coefficients
% Kp = proportional
% Ki = integral
% Kd = derivative
% 350 50 10 (chosen PID values)
%% physical parameters
m = 200; % mass of train in kgs
b = 1000; % coefficient of dynamic friction in N-s/m
d = 10; % distance between point A and B
alpha = 45; % incline angle (degrees)
g = 9.8; % acceleration due to gravity
F_reaction= m*g*sind(alpha);
%% simulation time
T = 50; % simulation time
dt = 0.01; % simulation resolution
N = T/dt +1;% number of samples
%% simulation variables
t=0:dt:T; % time vectors
v=zeros(1,N); % velocity
a=zeros(1,N); % acceleration
x=zeros(1,N); % distance traveled
F_net=zeros(1,N);% net force
e = d*ones(1,N); % error
eI=0;
for(n=2:N)
%% Process
a(n) = F_net(n-1)/m; % train acceleration
v(n) = v(n-1) + 0.5*(a(n-1)+a(n))*dt;% train velocity
x(n) = x(n-1) + 0.5*(v(n-1)+v(n))*dt;% distance traveled
%% Feedback error
e(n) = d-x(n); % end value indicates the amount by which the cart overshoots final height
%% Control
format short
eI = eI + 0.5*(e(n)+e(n-1))*dt; % integral
eD = (e(n)-e(n-1))/dt; % derivative
F_drive = Kp*e(n) + Ki*eI + Kd*eD; % driving force in Newton
F_friction = b*v(n-1); % friction force in Newton
F_net(n) = F_drive – F_friction – F_reaction;% net force in Newton
end
error = e(end);
figure
plot(t,a,’b-‘,t,v,’k-‘,t,x,’r-‘)
xlim([0,15])
ylabel(‘dynamic position of distance,velocity and acceleration’);
xlabel(‘time (s)’);
legend(‘acceleration in m/s^2′,’velocity in m/s’,’distance in m’)
title(‘Dynamic characteristics of brick cart at time t’)
grid on
The chosen values of the coefficients KP, KD and KI are calculated by trial error method such that it satisfies all the environmental and boundary conditions of carts velocity, position, acceleration.
Result and Discussion:
The modified trainsim.m file is executed in the MATLAB command window and the results are given below.
>> [error,F_drive] = trainsim(350,35,10)
error =
-0.0011
F_drive =
1.3857e+03
Hence, it is clearly visible that the cart attains its destination at about 15 seconds after the launch from the base point. During its runtime its velocity is always under 2 m/sec, acceleration goes below 0.2 m/s^2 in less than 0.4 seconds and the driving force to the cart in the first 10 seconds is approximately 1385.7 N. The cart do not overshoot the destination height of 10 m, whereas it undershoots by approximately 1.1 mm, the amount which can be neglected.
Conclusion:
Hence, the MATLAB programming of the PID controller settings is performed appropriately as most of the environmental and brick cart’s dynamic conditions are met and it is proved that the cart can be successfully delivered in its destination with the calculated coefficients of PID controller. Although, the acceleration exceeds its limitation of 0.2 m/s^2 for the first 0.4 sec (approx.), it can be assured that the time interval is much smaller to execute significant disturbance in the dynamics that can partially unload the brick cart. The initial acceleration for sufficiently small time interval is necessary to provide the driving force that will drive the cart in its later course. Therefore, it can be concluded that PID controllers can be used to control the motion of dynamic bodies for better performance and outcomes.
References:
[1] “Drive with PID Control – MATLAB & Simulink Example – MathWorks India”, In.mathworks.com, 2018
[2] P. Pal and R. Dey, “Optimal PID Controller Design for Speed Control of a Separately Excited DC Motor: A Firefly Based Optimization Approach”, The International Journal of Soft Computing, Mathematics and Control, vol. 4, no. 4, pp.
We provide professional writing services to help you score straight A’s by submitting custom written assignments that mirror your guidelines.
Get result-oriented writing and never worry about grades anymore. We follow the highest quality standards to make sure that you get perfect assignments.
Our writers have experience in dealing with papers of every educational level. You can surely rely on the expertise of our qualified professionals.
Your deadline is our threshold for success and we take it very seriously. We make sure you receive your papers before your predefined time.
Someone from our customer support team is always here to respond to your questions. So, hit us up if you have got any ambiguity or concern.
Sit back and relax while we help you out with writing your papers. We have an ultimate policy for keeping your personal and order-related details a secret.
We assure you that your document will be thoroughly checked for plagiarism and grammatical errors as we use highly authentic and licit sources.
Still reluctant about placing an order? Our 100% Moneyback Guarantee backs you up on rare occasions where you aren’t satisfied with the writing.
You don’t have to wait for an update for hours; you can track the progress of your order any time you want. We share the status after each step.
Although you can leverage our expertise for any writing task, we have a knack for creating flawless papers for the following document types.
Although you can leverage our expertise for any writing task, we have a knack for creating flawless papers for the following document types.
From brainstorming your paper's outline to perfecting its grammar, we perform every step carefully to make your paper worthy of A grade.
Hire your preferred writer anytime. Simply specify if you want your preferred expert to write your paper and we’ll make that happen.
Get an elaborate and authentic grammar check report with your work to have the grammar goodness sealed in your document.
You can purchase this feature if you want our writers to sum up your paper in the form of a concise and well-articulated summary.
You don’t have to worry about plagiarism anymore. Get a plagiarism report to certify the uniqueness of your work.
Join us for the best experience while seeking writing assistance in your college life. A good grade is all you need to boost up your academic excellence and we are all about it.
We create perfect papers according to the guidelines.
We seamlessly edit out errors from your papers.
We thoroughly read your final draft to identify errors.
Work with ultimate peace of mind because we ensure that your academic work is our responsibility and your grades are a top concern for us!
Dedication. Quality. Commitment. Punctuality
Here is what we have achieved so far. These numbers are evidence that we go the extra mile to make your college journey successful.
We have the most intuitive and minimalistic process so that you can easily place an order. Just follow a few steps to unlock success.
We understand your guidelines first before delivering any writing service. You can discuss your writing needs and we will have them evaluated by our dedicated team.
We write your papers in a standardized way. We complete your work in such a way that it turns out to be a perfect description of your guidelines.
We promise you excellent grades and academic excellence that you always longed for. Our writers stay in touch with you via email.