This article explains how to control the movement of a brick cart using PID control system in MATLAB. It includes the aim, method, MATLAB code, result, and discussion. The article also provides a plot of the cart dynamics and a conclusion.
Contribute Materials
Your contribution can guide someoneβs learning journey. Share your
documents today.
Running head: BRICK ESCALATOR CONTROLLER ELE5PRB MATLAB ASSIGNMENT BRICK ESCALATOR CONTROLLER Name of the Student Student ID Date
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.
1BRICK ESCALATOR CONTROLLER Table of Contents Introduction:...............................................................................................................................3 Aim:............................................................................................................................................3 Method:......................................................................................................................................3 MATLAB code:......................................................................................................................6 Result and Discussion:...............................................................................................................8 Plot:.........................................................................................................................................9 Conclusion:................................................................................................................................9 References:...............................................................................................................................11
2BRICK ESCALATOR CONTROLLER Introduction: 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.
3BRICK ESCALATOR CONTROLLER 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. Fig 1: Inclined track and the brick cart 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.
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
4BRICK ESCALATOR CONTROLLER 1.The mass of the system in full loaded condition (with bricks) is m=200 kg and moved in full loaded condition. 2.Initially the cart has no motion and stationary at the base i.e. at height h = 0 m. 3.Destination height is h = 10 m. 4.Inclination angle is ΞΈ = 45 degrees. 5.No brakes are installed in the cart or the escalator, braking is done with the help of gravity and the controller installed in the engine. 6.After reaching the destination the cart should not go beyond 0.1 m of the ground. 7.The acceleration of the cart should be below 0.5 ms^(-2) and the velocity of the cart must not exceed 2 m/s second to avoid damage to the bricks. 8.The maximum driving force that can be delivered by the engine cart is 10 kN. 9.The dynamic friction coefficient of the rail is 1000 N-s/m 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) + KIeI(t) + KDeD(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, KIand KDare 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.
5BRICK ESCALATOR CONTROLLER Fg(t) = force due to gravity acting opposite of the carts moving direction = mβgβsin(ΞΈ)
6BRICK ESCALATOR CONTROLLER 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;
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.
7BRICK ESCALATOR CONTROLLER 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, KDand KIare calculated by trial error method such that it satisfies all the environmental and boundary conditions of carts velocity, position, acceleration.
8BRICK ESCALATOR CONTROLLER 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
9BRICK ESCALATOR CONTROLLER Plot: 051015 time (s) -2 0 2 4 6 8 10 12 dynamic position of distance,velocity and accelerationDynamic characteristics of brick cart at time t acceleration in m/s2 velocity in m/s distance in m Figure 2: The plot of cart dynamics 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.
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
10BRICK ESCALATOR CONTROLLER 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.
11BRICK ESCALATOR CONTROLLER References: [1]"Drive with PID Control - MATLAB & Simulink Example - MathWorks India", In.mathworks.com,2018.[Online].Available: https://in.mathworks.com/help/supportpkg/arduino/examples/drive-with-pid- control.html?prodcode=SL&?prodcode=SL. [Accessed: 04- Sep- 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. 39-48, 2015.