Home
Guideline
Contents
1. 0 1 1 The origin is said to be a reachable because there is an input that can steer the state from 1 1 to 0 0 in a finite time of ti In precise terms v 0 0 is a reachable vector because there exists a control input u such that x 0 1 1 can be driven to x t 0 0 05 evsescee set secoeetese st esis estes toes se den E ma en amanah tse os 4 i 9 Gi na E E E coches sees Figure 5 Phase Plot of a System If every state is reachable then A B is said to be a controllable pair or the system is controllable A system is controllable if an only if rank B AB A B A B n 20 where n is the order of the system i e the number of states For example applying the controllability check on system 19 gives 0 1 Z This implies that the system is controllable because the rank is equivalent to the number of states Therefore a controller entering input u can be designed such that a given initial state converges to any target state The linear quadratic regulator or LQR is one control design method that can be used to accomplish this and will now be introduced Revision 01 Page 24 QNET Gantry Laboratory Manual 4 4 2 Linear Quadratic Regulator The linear quadratic regulator problem is given a plant model d ae A x t Bu t 21 find a control input u that minimizes the cost function s x t Q x t u t R u t dt 22 0 where Q is an nxn positive semidefinite weighing
2. 2 for some guidance on tuning an LQR controller 9 a t S t S OS t s Table 12 LQR Control Design Re stating the LQR specifications given in Section 4 4 3 1 Tracking O t track commanded angle 0a t with tp lt 1 2 s and t lt 2 3 s 2 Dampening la t l lt 7 5 and t lt 6 s 3 Control input limit Va lt 5 V where t is the peak time t is time for the 1 settling time and Vm is the motor input voltage Find the gi q2 q3 and q4 elements that results in specifications Revision 01 Page 32 QNET Gantry Laboratory Manual Step 11 Step 12 1 and 2 being satisfied When the response meets requiremetns 1 and 2 move on to the next step to test the third specification Although the specifications are met there is guarantee that the control input the motor voltage Vm is not going out of its range Control design is often limited by the actuator Through simulation it can be checked whether the control signal is going beyond 5 Volts Select the Control Simulation tab and the front panel illustrated in Figure 10 should load ONET ROTPEN Gantry LOR Design Sim vi File Edit Operate Tools Browse Window Help Q BANS Ir Gantry Command Signal Figure 10 Closed Loop Gantry Simulation VI The Gantry Command Signal panel enables the user to vary the amplitude and frequency of the smoothed square signal The position command signal denoted u t is plotted on the top left g
3. can be calculated using Lam x 17 m where x is the known center of mass of body i and m is the mass of body i If the ROTPEN is considered a single rigid body its CM would be as shown in Figure 4 and not as two separate bodies in Figure 3 The total mass of the pendulum assembly is M and the total length is L both are quantified in Table 2 Figure 4 Free body diagram of pendulum considered a single rigid body 1 Express the center of mass of the pendulum assembly in terms of the CM of the pendulum link Xemi and the CM of the pendulum mass Xem using expression 17 2 Calculate the numerical answer using the mass and length parameters given in Table 10 and enter the resulting center of mass in Table 10 Record the answer for later use in QNET Laboratory 4 ROTPEN Inverted Pendulum Revision 01 Page 21 QNET Gantry Laboratory Manual 4 3 2 Exercise Calculating Moment of Inertia The moment of inertia J of a rigid body is expressed as J fe dm 18 where r is the perpendicular distance between the element mass dm and the axis of rotation The moment of inertia at the pivot axis of the pendulum is an important parameter for the gantry experiment because it indicates the tendency of the pendulum which represents a crane to continue swinging Thus a pendulum with more inertia is more difficult to control then one with less tendency to continue rotating when the arm ceases to move
4. clicking on the Control Simulation tab with the re tuned controller and confirm that the control input does not exceed 5V At this point a control has been found that satisfies specifications 1 2 and 3 Enter Q matrix elements q q2 q3 and q4 in the last row of Table 12 along with the resulting peak time settling time and overshoot for O as well as the settling time for a The control is now ready to be implemented on the actual gantry device Click on the Control Implementation tab and the VI shown in Figure 11 should open Revision 01 Page 34 QNET Gantry Laboratory Manual Ip ONET ROTPEN Gantry Controller vi File Edit Operate Tools Browse Window Help E E theta ref deg v theta deg wa Figure 11 Gantry Control Implementation VI Given that the QNET ROTPEN system has been powered properly the arm should be rotating back and forth Similarly to the control simulation VI the command position is a smoothed square signal that can be controlled through the Gantry Command Signal panel on the top left of the VI shown in Figure 11 The reference signal is plotted in the top graph along with the actual angle of the arm measured by encoder The bottom scope plots the pendulum angle By default when the VI opens the GANTRY control is turned OFF down position and the Integrator control which will be explained later is also turned OFF Below the control gains is an LED that warns the user i
5. matrix and R is an rxr positive definite symmetric matrix That is find a control gain K in the state feedback control law u Kx 23 such that the quadratic cost function J is minimized The control law in 23 is known as the optimal control law because it finds a unique solution to the LQR problem Note that LQR control assumes the state is fully known i e no observers can be used implying that there would be a sensor for each state Figure 6 gives a typical closed loop control system The Q and R matrices are set by the user and that effects the optimal control gain that is generated to minimize J The closed loop control performance is effected by changing the Q and R weighing matrices Control Law Plant t e t x xa au u t K e t a x_dot A x t B u t x t Figure 6 Closed Loop Control System For example assume the plant model in 19 represents the movement of a linear cart where state x is the position of the cart and x2 is the speed of the cart For the reference command state T x x p 9 the controller takes the form u k x x D k x Revision 01 Page 25 QNET Gantry Laboratory Manual where the optimal control gain is K Ik k This is a PV controller with a proportional gain kp and a velocity gain k that makes the cart track a commanded position Xai t Table 11 lists the resulting PV gains generated using the linear quadratic regular method from different w
6. r cos O t Ja J M L Ja d 2 J M r coxO t sin 0 1 E oo Jz OR ai dis p output p p output 2 2 2 2 2 7 M r cog O t J J M l J M r cog O t J J M L Ja 1 2 2 Pn L M a g M r gcos t alt at M cos 0 1 I J M 1 I d 2 L M rin 0 00 O Mp 7 2 2 7 2 2 7 M r c048 1 J J M L Ja M r cog O t J J M L Ja where the torque generated at the arm pivot from the motor voltage Vm is K v K F oo t m m dt 2 output R The ROTPEN model parameters used in 1 and 2 are defined in Table 2 Symbol Description Value Unit M Mass of the pendulum assembly weight and link kg combined 0 027 lp Length of pendulum center of mass from pivot m E Total length of pendulum 0 191 m r Length of arm pivot to pendulum pivot 0 06668 m Jm Motor shaft moment of inertia 3 00E 005 kg m Mam Mass of arm 0 028 kg g Gravitational acceleration constant 9 810 m s Revision 01 Page 4 QNET Gantry Laboratory Manual Symbol Description Value Unit Jeq Equivalent moment of inertia about motor shaft kg m pivot axis 1 23E 004 Jp Pendulum moment of inertia about its pivot axis kg m Ba Arm viscous damping 0 000 N m rad s Bp Pendulum viscous damping 0 000 N m rad s Rm Motor armature resistance 3 30 Q K Motor torque constant 0 02797 N m A Kn Motor back electromotive force constant 0 02797 V rad s Table 2 ROTPEN Mo
7. space form Define the state T x x X xX x 14 as T d d x t Lao KO IOs TaD Recall the generalized coordinates definitions used for the Lagrange gi t 0 t and q t a t The state defined with respect to the rotary pendulum angles are eee mp ame 3 Ot aud 4 Ot Substitute the state defined in 14 into the Lagrange solution computed in 13 and place the answer in the single input linear state space representation d ae A x t Bu x 15 where A is a real 4x4 matrix B is a real 4x1 constant matrix and the control input is the torque being applied by the motor u X Toupu X Enter the resulting state space matrices in Table 8 Revision 01 Page 14 QNET Gantry Laboratory Manual State Space Matrix Expression A B 100 0 010 0 0010 0001 0 0 0 0 Table 8 Linear State Space Matrices The 4x4 matrix C and the 4x1 matrix D in the state model equation y t C x t Du x are given in Table 8 It is assumed from the rank of C that all states are being measured by sensors Although in actuality the position angles O and a are measured by encoders and the speed of these angles is calculated using an observer The observer differentiates the angle and removes any high frequency components using a low pass filter Thus from a controls Revision 01 Page 15 QNET Gantry Laboratory Manual point of view the output equation should be y x x2 and there should be a
8. 1 Express the moment of inertia of the pendulum J in terms of the pendulum link mass Mp and its length Lp along with the mass of the pendulum weight M 2 and the weight s length L 2 using general expression 18 and Figure 3 Hint Recall from Exercise 4 3 1 that the pendulum is a composite of two thin rods with the uniform densities p Mp Lp and p2 M L 2 The integral can be evaluated by changing the mass element to the distance differential dm p dr where p is the linear density 2 Compute the pendulum moment of inertia and enter the result in Table 10 The mass and length of the pendulum link and the pendulum weight are specified in Table 10 Record the answer for later use in QNET Laboratory 4 ROTPEN Inverted Pendulum Revision 01 Page 22 QNET Gantry Laboratory Manual 4 4 Control Design The goal of this section is to introduce the notion of controllability of a system and the idea behind the Linear Quadratic Regular or LQR control technique This is an introduction to designing a linear controller in the state space 4 4 1 Controllability Consider this arbitrary system d P7 X t x 19 d dew u Revision 01 Page 23 QNET Gantry Laboratory Manual If there exists a control input u that can drive a state x to a vector v in a finite time of t gt 0 then vector v is said to be reachable For example Figure 5 is a phase plot of system 19 when the system begins at an initial state x
9. Format the solution of L q into the following quadratic structure d d d d d 4 E 4 0 124 4 4 i ato i a60 4 4 P o V q 3 T output and enter the inertia terms dii gi di2 q and dz2 q2 and the potential energy term V q into Table 3 below Note that Toupu is the DC motor torque defined above in 2 Inertia Term Expression dii qi di2 q doo q2 V q2 Table 3 Lagrangian Inertia Terms Revision 01 Page 8 QNET Gantry Laboratory Manual 4 1 5 Exercise Euler Lagrange EOM The Euler Lagrange equations of motion are calculated from the Lagrangian of a system using 0 a Zadot r j az Q 5 where for an n degree of freedom structure i 1 n and Q is called generalized force In the rotary pendulum system the generalized forces are d Q T niput T B a oo Q B ao However since the viscous damping of the arm Beg and the pendulum Bp are regarded as being negligible the generalized forces become simply Q Toutpu and Qz 0 With that information applying 5 to the Lagrangian expression in 4 and performing some manipulation gives d e f d d a ato va ao tonga Heroin E a60 i ato 2 d sala a60 Hy T tput 6 2 d d d d 2 d Ke ao on G90 Hen te 5400 590 2 ATO 0 where for i 1 2 j 1 2 and k 1 2 dj is the inertia terms previously calculated ci are called Christoffel symbols and amp x is a funct
10. Quanser NI ELVIS Trainer QNET Series QNET Experiment 03 Gantry Control Rotary Pendulum ROTPEN Gantry Trainer Co 4 SS wean C MlM sewaan LABVIEW Student Manual QNET Gantry Laboratory Manual Table of Contents IL Labortatory Object Venna E watered eer we B3 nia 1 DAR Er erenees mean sean Tensi mu mana SENIN eee cei ae DELTA IN an 1 3 ROTPEN Plant Presentation bsa met ee ee Ten en laa 1 3 1 Component Nomendlatute osn aan BSA Bonia kan 1 3 2 ROTPEN Plant Desert PGRI abon ha AB E EE Nnna 2 BREA ASI IT MEN NO MBR EN KE Asad naan laden stat aad ca Satie una 3 4 1 Pre Lab Assignment 1 Open Loop Modeling oooooooooo oo 3 AJI Exerce KinematieS ae be BNN ae adele 5 A 1 2 Exercise Potential Energy soo on baka enakan demen akan 6 4 1 3 Bxercise Kinetic Ener SY oo oo omngksnuksan yana 7 4 1 4 Exercise Lagrangian of System 7 4 1 5 Exercise Euler Lagrange HOM s csc scescesetisvsietusesaacasivacespavacdsbenstavsaseanssaecessbasctenee 9 4 1 6 Exercise Euler Lagrange Matrix Form Wo 10 4 2 Pre Lab Assignment 2 Finding the Linear State Space Model o 11 421 Exercise Lineanizins OMG SN NIA NO a 12 4 2 2 Exercise Solving for EOM Acceleration Terms oooooooo 13 4 2 3 Exercise Finding State Space Model oooooWoomoo oo 14 4 2 4 Exercise Adding Actuator Dynamics oooWoooomoccoooW 16 4 3 Pre Lab Assig
11. atical model represents the motions of the real physical system only about the point where the angles were linearized Linearize each element of the D q and C q q_dot matrices as well as the vector g q about the operating point x 0 0 0 0 and record the results in Table 6 Matrix VETO D g 1 d efan gao 3940 Table 6 Linearized Lagrangian Matrices Revision 01 Page 12 QNET Gantry Laboratory Manual 4 2 2 Exercise Solving for EOM Acceleration Terms The system has now been linearized and is more easily manageable The linearized Euler Lagrange equations of motions in 11 must be solved for q_ddot such that d d d p Po cfa 0 a an D a NAD Te yang Calculate the solution of 12 from the answer found in Exercise 4 2 1 and structure the resulting vector in the following two eguation form 2 ppt ea output 131 2 ap a a output where aj a bi and b are all real number constants Record the parameters in Table 7 Solution Parameter Expression al a2 bl b2 Table 7 Linearized Lagrange Solution Parameters Revision 01 Page 13 QNET Gantry Laboratory Manual 4 2 3 Exercise Finding State Space Model At this point the nonlinear Euler Lagrange equations of motions have been linearized about the origin and solved for the acceleration of the angles g _ddot and q2_ddot It is now ready to be placed in the state
12. del Nomenclature Note that the pendulum center of mass I and the moment of inertia parameter J are not given because they will be calculated later in pre lab exercise Also viscous damping which is a friction that opposes the velocity at which the structure is moving is regarded as being negligible The following exercises build the rotary pendulum model incrementally The first step is finding the kinematics of the center of gravity of the pendulum In the second and third step these are used to compute the potential and kinetic energy of the system The fourth step introduces the principle of Lagrange and uses Euler Lagrange equations to calculate the nonlinear equations of motion or EOMs that are given in 1 4 1 1 Exercise Kinematics Consider the pendulum a point mass solid object Find the forward kinematics of the pendulum center of gravity COG with respect to the base frame ooxoyo That is express the position Xp and yp and the velocity xd and ydp of the pendulum COG in terms of the angles O and a The height between the pendulum pivot and the base of the arm is h 0 127 m Revision 01 Page 5 QNET Gantry Laboratory Manual 4 1 2 Exercise Potential Energy Express the total potential energy Vr a of the rotary pendulum system There is no elastic component in the system therefore the energy that can be stored for movement is from gravity The gravitational potential energy depends on the vertical pos
13. eighing matrices K 1 0000 1 7321 K 2 2361 2 3393 K 1 0000 2 6458 Table 11 Resulting LQR gain from different Q and R matrices The first case may not have resulted in overall suitable tracking therefore some weight is placed on the top left Q matrix element to place emphasis on the proportional control This translates to the LOR algorithm working harder on the xi term to minimize the J cost function and it generates a larger k However as shown in Table 11 it was necessary to increase both k and k gains to minimize J due to the inherent system dynamics Perhaps the k gain generated in case 1 provided suitable tracking performance except that the closed loop response tends to overshoot too much The overshoot can be dampened by augmenting the velocity gain The bottom right element of Q is increased in case 3 and results in a larger k while maintaining the proportional gain steady The R weighing matrix is kept at 1 in all cases for comparison purposes If R is decreased this forces the control input u to work harder to minimize J resulting in an overall higher gain K 4 4 3 Gantry Control Specifications The whole point of developing a linear model of the gantry and calculating its various parameters are so a gain can be generated that will control the gantry In the end it all comes down to tuning the Q weighing matrix as in the Section 4 4 2 such that a closed Revision 01 Page 26 QNET Gan
14. eing ran on the device Record the gain used in Table 13 along with the corresponding response properties If the Is Motor Saturated LED goes ON click on the Stop Controller button in the top panel immediately In this case reduce the K until the LED goes OFF because the gain is set too high and is saturating the motor Step 19 Click on Stop Controller and the Control Design tab should be selected If all the data necessary to fill the shaded regions of the tables is collected end the QNET ROTPEN Gantry laboratory by turning off the PROTOTYPING POWER BOARD switch and the SYSTEM POWER switch at the back of the ELVIS unit Unplug the module AC cord Finally end the laboratory session by selecting the Stop button on the VI Revision 01 Page 37
15. f the control voltage is saturating the motor A If the Is Motor Saturated LED goes ON click on the Stop Controller button in the top panel immediately The Stop Controller button stops the control and returns the user to the control design tab where adjustments to the control can be made or the session can be ended Also in the top panel shown in Figure 11 is the RT LED that indicates if real time is being held the simulation time readout and the sampling rate Revision 01 Page 35 A QNET Gantry Laboratory Manual Step 15 Step 16 Step 17 Slow down the sampling rate if the RT LED is either RED or flickering between GREEN and RED Also stop the control by clicking on the Stop Controller button return to the Control Implementation tab for the new sampling rate to take effect Set the command angle to 120 and the frequency of the reference signal to 0 1 Hz The pendulum should be swinging in excess of 10 as seen on the a t plot and visually on the actual device Keeping in mind the behaviour of the pendulum when there is no gantry control set the Gantry Control switch to ON to activate the full LQR control designed This should dampen the pendulum angle and meet specification 2 The pendulum should remain suspended in the downward vertical position as the arm swivels to track the commanded position Thus the arm should more or less track the reference signal and the pendulum should remain about its suspended 0 de
16. gree position Activated Arm Tracking Pendulum Controller Dampening Gantry K t S ts S s deg t s max Ia Control V rad s deg OFF 0 ON 0 ON Table 13 Closed loop time response characteristics As probably noticed the implemented gantry control does not perform as well as the simulated control Namely there is a large steady state error when 0 track O4 and small oscillations about a 0 are not being dampened Why are these phenomenon seen only when implementing the controller The steady state error can be significantly reduced by adding an integral component Thus adding an integrator with gain K to the LOR control loop shown in Figure 6 gives the closed loop system depicted in Figure 12 Thus the control becomes Dy AV ai DAA ANA Revision 01 Page 36 QNET Gantry Laboratory Manual Step 18 AG u t i UW t 27 where the LQR control and integral control are My EK KO 1 g K x t x 1 27 Un a S i The integrator control basically pumps more voltage into the DC motor to eliminate the offset between the actual arm position and the commanded arm position LQR I Controller Plant x_dot Ax Bu Uin t Ki s x4 t x1 a t E e aa us aa o a ee a ee et ed Figure 12 LQR I Closed Loop System The task now is to tune the integrator gain K until O t converges to a t Thus the control parameter will be tuned as the controller is b
17. he NI ELVIS system equipped with a QNET ROTPEN board and the Quanser Virtual Instrument VI controller file QNET_ROTPEN_Lab_03_Gantry_Control vi Please refer to Reference 2 for the setup and wiring information required to carry out the present control laboratory Reference 2 also provides the specifications and a description of the main components composing your system Before beginning the lab session ensure the system is configured as follows QNET Rotary Pendulum Control Trainer module is connected to the ELVIS ELVIS Communication Switch is set to BYPASS DC power supply is connected to the QNET Rotary Pendulum Control Trainer module The 4 LEDs B 15V 15V 5V on the QNET module should be ON Revision 01 Page 27 QNET Gantry Laboratory Manual 5 2 Experimental Procedure Please follow the steps described below Step 1 Read through Section 5 1 and go through the setup guide in Reference 2 Step 2 Run the VI controller ONET ROTPEN Lab 03 Gantry Control vi shown in Figure 7 Figure 7 ONET ROTPEN VI Step 3 Select the the Control Design tab shown in Figure 8 Revision 01 Page 28 QNET Gantry Laboratory Manual 8 ONET ROTPEN Lab_03_Gantry_Control vi ok File Edit Operate Tools Browse Window Help jejlojn Gantry Model Control Design Control Simulation Control Implementation Open Loop System Closed Loop System Model Pa
18. ion of the potential energy The Christoffel symbols are 1 0 1 8 1 0 Cie 2 lay dy E oz da 2 z i 7 4 A 8 and Revision 01 Page 9 QNET Gantry Laboratory Manual Complete the Table 4 below by finding the Christoffel symbols using 7 and amp x using 8 Parameter Value Parameter Value On 5 C112 AS C212 C212 C222 d bo Table 4 Lagrangian Christoffel symbols and amp x 4 1 6 Exercise Euler Lagrange Matrix Form The equations of motion of the rotary pendulum have now been found The matrix form of the Euler Lagrangian equations of motion in 6 is commonly seen as 2 d d d D q a9 sela 90 a a9 g T 9 where for a 2 DOF system ee d ga 4 9 d qa 4 4 sa Lo OAT oy and C q q_dot is the matrix that includes the Christoffel symbols in Table 4 Substitute the expression calculated from d in Table 3 along with cix and k in Table 4 into the Euler Lagrange expression in 6 and map it to the matrix form shown in 9 Fill out the matrices below in Table 5 T T output Revision 01 Page 10 QNET Gantry Laboratory Manual Matrix Value D q t d aw gao 2 q t Table 5 Euler Lagrangian Matrices 4 2 Pre Lab Assignment 2 Finding the Linear State Space Model The general state model of a time invariant linear continuous time dynamical system is d i x t A x t Bu x 10 y t C
19. ition of the pendulum COG Revision 01 Page 6 QNET Gantry Laboratory Manual 4 1 3 Exercise Kinetic Energy Find the total kinetic energy T of the ROTPEN system This includes the rotational kinetic energy of the arm and the pendulum as well as the translational kinetic energy of the pendulum COG It is reminded that the arm s equivalent moment of inertia at the pivot is Jeq and the inertia of the pendulum at its rotating pivot is J 4 1 4 Exercise Lagrangian of System The Lagrangian of a system is au 3 where T is the total kinetic energy of the system calculated in Exercise 4 1 3 and V is the total potential energy of the system calculated in Exercise 4 1 2 The Lagrangian of a system is the difference between the total kinetic energy of the system and its total potential energy The Euler Lagrange equations of motions is a set of differential equations that describe the motions of a system and it is generated from the Lagrangian The equations of Revision 01 Page 7 QNET Gantry Laboratory Manual motion is a mathematical model that represents an actual real world system Q1 Substitute the generalized coordinates qi 41 and 12 in the kinetic energy T and potential energy V expressions found in Exercise 4 1 3 and 4 1 2 Q2 Compute the Lagrangian L q T q Viq where T q 14 gt 4 That is calculate the Lagrangian of the rotary pendulum system in terms of the qi coordinates Q3
20. n observer that estimates the states x and x4 The controller designed later would then be in the form u Kx and not u Kx 4 2 4 Exercise Adding Actuator Dynamics The state equations developed in the last exercise are relative to the torque being applied at the motor shaft The torque however is not controlled by the computer directly and is instead a result of the voltage being given to the DC motor The torque generated at the arm pivot from the motor voltage Vm is d K 2 7 Ka ao output m Re define the state space equation 15 in terms of u x Vm and write the new matrices in Table 9 Revision 01 Page 16 QNET Gantry Laboratory Manual State Space Matrix Expression Table 9 State Space Matrices in terms of Vin 4 3 Pre Lab Assignment 3 Calculating the Inertia and Center of Mass of the Pendulum The free body diagram of the pendulum used in the QNET rotary pendulum system is shown in Figure 3 Revision 01 Page 17 QNET Gantry Laboratory Manual M 2 9 Figure 3 Pendulum Free Body Diagram The circle in the top right corner represents the axis of rotation that goes into the page The pendulum assembly is a rigid body that is composed of two bodies the pendulum link Mp1 and the pendulum weight M 2 located at the end of the link The mass and length parameters depicted in Figure 3 that are needed for this exercise are given below in Table 10 Symbol Desc
21. nment 3 Calculating the Inertia and Center of Mass of the Pendulum ana ss aE eo wale ea Oe 17 4 3 1 Exercise Calculating Center of Nass 5 an nenen eso aes 19 4 3 2 Exercise Calculating Moment of Inertia c oo oo ooo m Wo0oooooo 22 4 4 Control Dea 5 ci Se AAN ANIS NUN E 23 A Conan Ban 23 442 Linear Quadratic RESUlAtOT 4x sana ena kan asn ena 25 4 4 3 Gantry Control Specifications ooo onlen 26 5 In Lab SESSIO1L cb tan la sman enakan kk naga aan 21 5 1 System Hardware Configuration a n andnnaand nasa 21 3 2 Pepe mental Process EE EE E 28 Document Number 576 Revision 01 Page i QNET Gantry Laboratory Manual 1 Laboratory Objectives In industry the crane is often used to transport items from one place to another The gantry experiment involves developing a control system for a crane travelling on a moving platform In this case the crane is represented by the suspended pendulum and the rotary arm behaves as the moving platform that transports the crane at different locations The problem is to develop a controller that enables the platform or in this case the arm of the rotary pendulum system to track a commanded position while minimizing the motions of the crane or pendulum as it is being transported In this laboratory the equations representing the motions of the rotary pendulum will be derived using a technique known as Lagrange The resulting nonlinear dynamics are then then linea
22. otor shaft and pivots between 180 degrees At the end of the arm there is a suspended pendulum attached The pendulum angle is measured by an encoder Revision 01 Page 2 QNET Gantry Laboratory Manual 4 Pre Lab Assignments This section must be read understood and performed before you go to the laboratory session 4 1 Pre Lab Assignment 1 Open Loop Modeling The ROTPEN plant is free to move in two rotary directions That is it has two degrees of freedom or 2 DOF As described in Figure 2 the arm rotates about the YO axis and its angle is denoted by the while the pendulum attached to the arm rotates about another axis and its angle is called a The pendulum angle is defined as being positive a gt 0 when rotating clockwise Thus as the arm moves in the positive clockwise direction the pendulum moves in the positive clockwise direction The shaft of the DC motor is connected to the arm pivot and the input voltage of the motor is the control variable Figure 2 Rotary Pendulum System In this pre lab exercise the raw nonlinear mathematical model that represents the motions of the arm and the pendulum is developed Given nonetheless are the nonlinear dynamics Revision 01 Page 3 QNET Gantry Laboratory Manual between the angle of the arm O the angle of the pendulum a and the torque applied at the arm pivot Toutput Pe M gl rco0 1 a t F Q t ae P I r t M
23. rameters Linear State Space Model of Gantry Lae Ax Bu Imp 0 0270 kg A dt B I fo 200 1 m fo hi fo fo 0 0826 m 2 f 71 33 Jose fo 32 75 Tap 40 000200 kg m2 J 6 24 f o32 fo 11 41 feq 410 000230 kg m 2 Stability Analysis of Open Loop System Open loop Poles Open Loop Pole Zero Map Plot Tea 0 00 Nitm3 0 17 48 131 r fkt Yo 0280 uua 0 57 0 00 i fkm 10 0280 V sjrad Jo 00 0 00 Open loop Stability marginally stable Imaginary Axis Real Axis Controllability Matrix 152 75 J 30 f 786 65 REN 10 46 746 47 Is Controllable Tina J 10 46 746 47 543 72 B AT ACZ B Are Figure 8 Open Loop Stability Analysis Step 4 Update the model parameter values in the top right corner with the pendulum center of mass I and the pendulum s inertia Jp that both calculated in Exercise 4 3 and entered in Table 10 The linear state space model matrices A and B on the top right corner of the front panel as well as the open loop poles situated directly below the state matrices are automatically updated as the parameters are changed Vary the inertia of the pendulum Jp as indicated and observe the changes in the locations of the poles Jp kg m 1 00E 004 2 00E 004 Revision 01 Page 29 Jp kg m 4 00E 004 8 00E 004 Step 5 How does increasing the inertia effect the open loop poles and the stability of the gantry Shortly explain how a pendulum with more inertia results in
24. raph in Figure 10 The LOR gain generated by the LQR design in the previous step is shown below in the bottom left corner along with a switch that activates the gantry control The OFF or down position only enables the arm tracking but does nothing to dampen the pendulum For example as shown in Figure 10 the closed loop 0 t simulation on the top right is more or less tracking the reference signal shown in the top left plot However the bottom right plot shows the pendulum angle Revision 01 Page 33 QNET Gantry Laboratory Manual Step 13 Step 14 c t and it is swinging back and forth over 10 When the switch is activated the gantry control implemented previously is simulated and that dampens the swinging of the pendulum Lastly the DC motor input voltage is simulated on the bottom left scope Experiment by switching the GANTRY Control switch ON and OFF and changing the reference signal For an angle command of 120 degrees at 0 1 Hertz verify that the gantry control signal V does not exceed 5V specification Make sure the GANTRY control switch is ON when observing control signal If V satisfies requirement 3 click on the Acquire Data button to return to the Control Design VI and go to the next step If Vm does not meet specification 3 and went over the limit click on the Acquire Data button which bring you back to the control design VI and tune your controller such that gain K is decreased Return to the simulation by
25. ription Value Unit Mp1 Mass of the pendulum link 0 008 kg Mp2 Mass of the pendulum weight 0 019 kg Lpi Length of pendulum link 0 171 m Lp2 Length of pendulum weight 0 019 m lp Length of pendulum center of mass from pivot m Jp Pendulum moment of inertia about its pivot axis kg m Table 10 Pendulum Parameters for Exercise 4 3 Revision 01 Page 18 QNET Gantry Laboratory Manual The first exercise is calculating the center of mass of the pendulum assembly lp and the second exercise is computing the moment of inertia of the pendulum system J 4 3 1 Exercise Calculating Center of Mass The center of mass of a rigid body in the form of a beam can be calculated using pxax x 16 cm p Ay where p is the density of the body Express the center of mass of the pendulum link Xon and the pendulum weight Xem2 in terms of Lp Lp Mp and M 2 These variables are all shown in Figure 3 The uniform density of the link is or P pl and the uniform density of the pendulum weight is E i Py p2 Revision 01 Page 19 QNET Gantry Laboratory Manual The pendulum is composed of two different bodies each with their own CM The center of mass of the body as a whole can be calculated and is useful when the pendulum is to be considered as a single rigid object The center of mass of a composite object that contains n Revision 01 Page 20 QNET Gantry Laboratory Manual bodies
26. rized and converted to a state space model The linear state space representation of a system is different than Laplace and is used more prominently in the control research field The obtained model is then used to design a closed loop controller using the Linear Quadratic Regulator technique It is used to minimize or dampen the movements of the suspended pendulum while the rotary arm tracks the reference angle given Practically speaking the algorithm developed regulates the movements of the gantry and keeps the crane steady in the vertical down position such that items can be transported in a safely 2 References 1 NI ELVIS User Manual 2 ONET ROTPEN User Manual 3 ROTPEN Plant Presentation 3 1 Component Nomenclature As a quick nomenclature Table 1 below provides a list of the principal elements composing the Rotary Pendulum ROTPEN Trainer system Every element is located and identified through a unique identification ID number on the ROTPEN plant represented Revision 01 Page 1 QNET Gantry Laboratory Manual in Figure 1 below ID Description ID Description 1 DC Motor 3 Arm 2 Motor Arm Encoder 4 Pendulum Table 1 ROTPEN Component Nomenclature Figure 1 ROTPEN System 3 2 ROTPEN Plant Description The QNET ROTPEN Trainer system consists of a 24 Volt DC motor that is coupled with an encoder and is mounted vertically in the metal chamber The L shaped arm or hub is connected to the m
27. this trend Step 6 Under the open loop poles in this VI it indicates the stability of the gantry system as being marginally stable as shown in Figure 8 According to the poles why is the open loop gantry considered to be marginally stable and not stable Step 7 As depicted in Figure 8 the controllability matrix is shown in the bottom right area of the front panel along with an LED indicating whether the system is controllable or not The rank test of the controllability matrix verifies that the gantry is a controllable system that is rank B AB A B A3B 4 is equal to the number of states in the system Since the system is controllable a controller can be developed Click on the Closed Loop System tab shown in Figure 9 to begin the LQR control design QNET Gantry Laboratory Manual Step 8 Step 9 Eile Edit Operate Tools Browse Window Help gt Q GLANS ER 0 00 000 0 00 0 00 6 04E r E EDUCAT 0 00 0 00 0 00 0 00 a 0 00 0 00 0 00 0 00 0 00 0 00 0 00 0 00 3 16E 0 00 0 00i marginally stable EED ere mer co 0 57 40 001 117 8 13i 0 17 8 131 0 00 0 0010 5 00 gj Kal T Wot Figure 9 LQR Control Design Front Panel The Q and R weighing matrices and the resulting control gain K is in the top left corner of the panel Directly below the LOR Control Design section is a pole zero plot that shows the loca
28. tions of the closed loop poles The numerical value of the poles are given below the plot along with the resulting stability of the closed loop system The step response of the arm angle O t and the pendulum angle a t are plotted in the two graphs on the right side of the VI as shown in Figure 9 The rise time peak time settling time and overshoot of the arm response and the settling time of the pendulum angle response is given Further the start time duration and final time of these responses can be changed in the Time Info section located at the bottom right corner of the VI For the Q and R weighing matrices Revision 01 Page 31 QNET Gantry Laboratory Manual Step 10 q 0 0 0 0 4 0 0 Q 0 0 4 0 0 0 0 4 R 1 vary the gi q2 q3 and q4 elements as specified in Table 12 and enter the obtained time domain characteristics in the same table Referring to the feedback loop in Figure 6 for the LOR gain T K Ik 0 k a k 0 k a 25 the control input u t that enters the DC motor input voltage is as k 9 AT X a t k a 2 t k o Tt k a4 26 where k is the proportional gain acting on the arm kp is the proportional gain of the pendulum angle Kv is the velocity gain of the arm and k is the velocity gain of the pendulum Observe the effects that changing the weighing matrix Q has on the gain K generated and hence how that effects the properties of the closed loop step response See Section 4 4
29. try Laboratory Manual loop response meets certain requirements The LQR control design specifications are 1 Tracking O t track commanded angle 0 t with tp lt 1 2 s and t lt 2 3 s 2 Dampening la t l lt 7 5 and t lt 6 s 3 Control input limit Vm lt 5 V where t is the peak time t is time for the 1 settling time and Vm is the motor input voltage These are similar specifications to a crane moving boxes within a factory floor The pendulum link may be thought of as the actual crane and the weight at the end represents the box to be moved The arm is the device moving the crane Thus the arm must track a given commanded position and do that with reasonable speed for productivity purposes thus low peak time This task must be performed accurately as well to place the box in the correct location thus low steady state error with a reasonable settling time is a requirement However the arm control alone does not guarantee that the box will be delivered to the target location accurately or safely because the crane holding the box i e the pendulum and the pendulum weight at the end is prone to large swings The swings are minimized by having a control that takes into account the position and speed of the crane s angle Lastly the controller must meet the performance specifications within the voltage capability of the DC motor 5 In Lab Session 5 1 System Hardware Configuration This in lab session is performed using t
30. x t Du x where x t is the n dimensional state and for an r input and m output system Ae R BeR CeR and De are constant matrices The goal of this section is to find the linear state space model of the rotary pendulum system In particular the goal is to calculate the A and B matrices Before going through the actual exercise an overview of the process of attaining the model will be given The mathematical model of the rotary pendulum found in 9 is nonlinear Therefore 9 must be linearized about a operating point in order to fit the system into the state space from shown in 10 Revision 01 Page 11 QNET Gantry Laboratory Manual 4 2 1 Exercise Linearizing EOM Consider a continuous nonlinear two variable function f x y that is to be linearized about the operating point Xo yo The linearization is calculated as follows 0 0 Ha Et a f x x x gt f y y oO The linearized function f x y is an approximation of the nonlinear function f x y and this approximation only holds in a region about the operating point That is fi x y f x y when X Xo Y Yo C where C is a two dimensional region about the origin The linearized Euler Lagrange equation can be given by 2 d d d D a a9 sela ga aa jr 11 where Di g and C q q_dot are the linearized inertia and Christoffel matrices and gi q is the linearized g q In the case of the ROTPEN system the linearized mathem
Download Pdf Manuals
Related Search
Guideline guideline guideline 401k guideline 401k login guidelines synonym guideline login guideline guru guidelines definition guideline central guideline calculator child support guidelines for pap smears by age guideline directed medical therapy guidelines international network guidelines esc guidelines heart failure guidelines epo guidelines hypertension guidelines 2024 guidelines diabetes guidelines discord guidelines endocarditis guidelines hepatitis c guidelines for offshore marine operations
Related Contents
GE PP980 User's Manual Samsung SGH-M200 manual de utilizador OMRON - Documentation : Capteur de vision - F160 AL-AQF-5R SS-7811AP HeadsetUSA PAS 400 User's Manual AMIAD Automatic Filters UWB RTLS for Construction Equipment Localization Document 61.61Ko TABLE DES MATIÈRES CONTENTS Copyright © All rights reserved.
Failed to retrieve file