Home

Pendulum

image

Contents

1. 1 should be linearized around a quiescent point of operation In the case of the suspended pendulum a k a gantry the operating range corresponds to small departure angles a from the vertical position with the pendulum pointing downwards Answer the following questions 1 Using the small angle approximation linearize the two EOM found in Assignment 1 Hint For small angles a you can use the second order generalized series expansions as shown in the following cos a 1 O a and sin 0 o O a 2 Document Number 509 Revision 03 Page 6 Single Pendulum Gantry Control Laboratory Student Handout 2 Determine from the previously obtained system s linear equations of motion the state space representation of our SPG plus IP02 system That is to say determine the state space matrices A and B verifying the following relationship 0 X AX BU ot 3 where X is the system s state vector In practice X is often chosen to include the generalized coordinates as well as their first order time derivatives In our case X is defined such that its transpose is as follows d d XT x0 alt TA 10 4 Also in Equation 3 the input U is set in a first time to be F the linear cart driving force Thus we have 3 From the system s state space representation previously found evaluate the matrices A and B in case the system s input U is equal to the cart s DC motor voltage as expressed below U V 6
2. 509 Revision 03 Page 21 Single Pendulum Gantry Control Laboratory Student Handout OM Scope q_spg_pp_mqpci_ipl2 Scopes Pend Tip Pos mm U EE lol x File Edit Update Axis Window Background Colour Text Colour Text Font Figure 13 Actual and Simulated Pendulum End Effector 1 e xi Position Response Step 7 Analyze your system response at this point as shown on your Pend Tip Pos mm scope in terms of PO ts and steady state error You can support your theory by also observing the Scopes xc mm and Scopes Pend Angle deg scopes showing Do not forget to mention the corresponding control effort spent by monitoring the V Command V scope Does your system meet all the design specifications Include the values of your system s performances in your lab report as well as a plot of your Scopes Pend Tip Pos mm scope Step 8 Try to achieve the design specifications as closely as possible by refining your two real poles positions p and p4 Make sure to re calculate using the Matlab place function your gain vector K and to apply it to your real time code Step 9 Do you notice a steady state error on your actual cart position response Does that surprise you If so find some of the possible reasons Can you think of any improvement on the closed loop scheme in order to reduce or eliminate that steady state error Step 10 As you might have already figured out to meet the zero steady state error requirement
3. Page 12 Single Pendulum Gantry Control Laboratory Student Handout Step8 Does your simulated response match the design specifications with regard to PO and t If it does not re iterate your design by modifying the location assignment for ps and pa After a few iterations is your response closer to the design requirements If your system still does not meet them can you find a possible explanation for it Moreover how can you explain the undershoot as illustrated in Figure 5 at the begin ning of the response Hint To obtain the response characteristics from the Matlab plot generated by the step function you can right click on the figure and open from the pop up menu the Characteristics selection list You can then select the Peak Re sponse and Settling Time submenu items 7 3 Simulink Simulation and Design of the Pole Placement Based Controller 7 3 1 Objectives E To implement in a Simulink diagram the open loop model of the SPG plus IP02 system with a full state feedback G To investigate by means of the model simulation the closed loop performance and corresponding control effort as a result from the chosen assignment for the poles EJ Refine tune the chosen locations of the two remaining closed loop poles ps and pa meeting the design specifications as well as respecting the system s physical limitations e g saturation limits EJ To infer and comprehend the basic principles involved in the pole placement des
4. To convert the previously found force equation state space representation into voltage input you can use the following hints Hint 1 In order to transform the previous matrices A and B it is reminded that the driving force F generated by the DC motor and acting on the cart through the motor pinion has already been determined in previous laboratories As shown for example in Equation B 9 of Reference 7 it can be expressed as 2 d p N E Np K An a n K n K V C 2 R r Rp 4 m mp 7 mp Hint 2 The single suspended pendulum s moment of inertia about its centre of gravity is characterized by l 2 E 8 Hint 3 Evaluate matrices A and B by using the model parameter values given in References 2 Document Number 509 Revision 03 Page 7 Single Pendulum Gantry Control Laboratory Student Handout and 3 Ask your laboratory instructor what system configuration is going to be set up in your in lab session In case no additional information is provided assume that your system is made of the 24 inch i e long single pendulum mounted on the IP02 cart with the additional weight placed on top 4 Calculate the open loop poles from the system s state space representation as previously evaluated in question 3 What can you infer regarding the system s dynamic behaviour Is it stable What about the damping present in the system Do you see the need for a closed loop controller in order to minimize the
5. and B 18 represent the Equations Of Motion EOM of the system Document Number 509 Revision 03 Page 33
6. as calculated in Assignment 3 p and p may be on the real axis since the desired damping require ment should already be achieved by the designed p and po Step4 Use Matlab s place function to calculate the state feedback gain vector K re guired to obtain the four closed loop pole locations that you determined and chose Step5 To check your result calculate the closed loop poles of the obtained state feed back system Do the closed loop eigenvalues match their pre assign locations Review your design procedure if they do not Hint 1 Use the Matlab function eig to determine the eigenvalues of the closed loop state space matrix Hint 2 The closed loop state space matrix can be expressed as follows A B K Step6 Obtain from Matlab the closed loop pole zero location of the SISO system in the s plane What conclusion can you draw Hint You can use the Matlab s pzmap function Step7 Simulate with Matlab the closed loop response of the SISO system to a unit step Plot the pendulum tip response along the x coordinate 1 e xj Include this plot to your lab report You should obtain a plot similar to the one shown in Figure 5 below Hint You can use Matlab s step function E 10 x lt Figure No 3 Closed Loop System SPG IP02 PP File Edit View Insert Tools Window Help Step Response From Ym Figure 5 Simulated Step Response of the SISO Closed Loop System x Document Number 509 Revision 03
7. as shown in Figure 4 can be expressed by the following equations p o ib ang a Ai 13 where P is defined as B 11 P 14 since G cos and D sin 6 15 Question Determine the locations of the dominating pair of complex and conjugate poles p and p2 that satisfy the percent overshoot and settling time design requirements as previously stated Document Number 509 Revision 03 Page 9 Single Pendulum Gantry Control Laboratory Student Handout Figure 4 Closed Loop Pole Locations in the S Plane The following hint formulae are provided Hint formula 1 Ej _ 16 PO 100e e Hint formula 2 24 ie 17 Document Number 509 Revision 03 Page 10 Single Pendulum Gantry Control Laboratory Student Handout T In Lab Procedure 7 1 Experimental Setup Check Wiring and Connections Even if you don t configure the experimental setup entirely yourself you should be at least completely familiar with it and understand it If in doubt refer to References 1 2 3 4 5 and or 6 The first task upon entering the lab is to ensure that the complete system is wired as fully described in Reference 2 You should have become familiar with the complete wiring and connections of your IP02 system during the preparatory session described in Reference 1 If you are still unsure of the wiring please ask for assistance from the Teaching Assistant assigned to the lab When you
8. Gantry Control Laboratory Student Handout 6 3 Assignment 3 Pole Placement Design In order to meet the design specifications previously stated our system s closed loop poles need to be placed judiciously This section shows one methodology to do so From here on let us name the system s closed loop poles a k a eigenvalues as follows pi p p3 and pa Answer the following questions The feedback control theory states that any arbitrary set of closed loop poles can be achieved by a constant state feedback gain vector K if and only if the pair A B is controllable First calculate numerically your SPG plus IP02 system s controllability matrix Co based on the A and B matrices evaluated in Assignment 2 Determine then if your system is controllable Hint For a system to be controllable its controllability matrix Co must have full rank which is to say that its determinant must be different from zero For our system the controllability matrix Co can be expressed as shown below Co B A B A B A B 12 2 The pole placement method used in this laboratory consists of locating a dominating pair of complex and conjugate poles p and p as illustrated in Figure 4 below that satisfy the desired damping i e PO and bandwidth 1 e t requirements The remaining closed loop poles here p and p4 are then assigned on the real axis to the left of this pair as seen in Figure 4 The dominating pair of poles p and p2
9. are confident with your connections you can power up the UPM You are now ready to begin the laboratory 7 2 Matlab Simulation of the Pole Placement Based Controller 7 2 1 Objectives To investigate the properties of the SPG plus IPO2 open loop model like for example its pole zero structure To set the locations of the two remaining closed loop poles ps and p4 in order to meet the design specifications To investigate the properties of the SPG plus IPO2 closed loop model More specifically the pole zero structure and step response will be looked at 7 2 2 Procedure In this first in lab section you will use some of the Matlab s Control System Toolbox func tions to simulate your SPG plus IPO2 system and obtain more information and a deeper in sight about your model Follow the procedure described below Stepl Use Matlab to find the pole zero locations of the SISO system previously deter mined in Assignment Z2 question 5 Hint You can use Matlab s ss2zp function Document Number 509 Revision 03 Page 11 Single Pendulum Gantry Control Laboratory Student Handout Step2 What is the open loop pole zero location of the SISO system in the s plane What are your observations What conclusion can you draw Hint You can use Matlab s pzmap function Step3 As illustrated in Figure 4 above assign the two remaining closed loop poles p and p4 to arbitrary locations to the left of the dominating pair p and p
10. d QS F O B gD ama 010 8 4 08 B 14 is the generalized force applied on the generalized coordinate x It should be noted that the nonlinear Coulomb friction applied to the linear cart has been neglected Moreover the force on the linear cart due to the pendulum s action has also been neglected in the presently developed model Calculating Equation B 11 results in a more explicit expression for the first Lagrange s equation such that Document Number 509 Revision 03 Page 32 Single Pendulum Gantry Control Laboratory Student Handout 2 2 a eM Sexo eu cost gat M I sia 4 at F B a 20 Likewise calculating Equation B 12 also results in a more explicit form for the second Lagrange s equation as shown below d d M costat 75 x Jd M 1 1 san gl sin o t d B F aco Finally solving the set of the two Lagrange s equations as previously expressed in Equations B 15 and B 16 for the second order time derivative of the two Lagrangian coordinates results in the following two non linear equations B 15 B 16 x 1 40 Ox l L M pikat an d 2 2 9 B 17 M I cos o t B 4 0 JG M F M eos a sino M M 1 M M l M l sin o t and 4 an m M M gl sin o t M M_ B FLO d c p pep c P Plat M1 sin a costat an M coat Ba 7x0 B 18 F M L cosa CM M L M M n M I sin 0 Equations B 17
11. Closed Loop Step 2 Ensure that your feedback gain vector K satisfying the system specifications as determined in the previous section s simulations is still set in the Matlab workspace Otherwise re initialize it to the vector you found Hint K can be re calculated in the Matlab workspace using the following command line gt gt K place A B pl p2p3p4 Step 3 You are now ready to build the real time code corresponding to your diagram by using the WinCon Build option from the Simulink menu bar After successful compilation and download to the WinCon Client you should be able to use WinCon Server to run in real time your actual system However before starting the real time code follow the SPG starting procedure described in the following Step Step 4 Single Pendulum Gantry starting procedure the real time code should only be started when the suspended pendulum is hanging at rest in its equilibrium position and pointing straight down The pendulum starting procedure is important in order to properly initialize the encoder counts to zero this is automatically done at real time code start up only when the perfectly vertical position with pendulum pointing downwards is reached Document Number 509 Revision 03 Page 20 Single Pendulum Gantry Control Laboratory Student Handout Step 5 Position the IPO2 cart around the mid track position and wait for the suspended pendulum to come to complete rest Ensure that the sys
12. Linear Model alpha dot rd s alpha dot rd s Eff_g Kg Eff_m kKt r_mp UPM Current Cart Pendulum Angle Saturation Current Current alpha rd Cart Position ENS Acceleration Velocity to to Velocity Position xc dot m s Back EMF Figure 7 Simulink Subsystem Representing the IP02 Model Document Number 509 Revision 03 Page 14 Single Pendulum Gantry Control Laboratory Student Handout 7 s spg pp SPG IP02 Non Linear EOM xc ddot EOM File Edit view Simulation Format Tools Help WinCon MctMpYIpt Mc Mp Ip 2 SPG Non Linear Dynamic Model xc ddot EOM Pendulum Angle xc ddot m s 2 z lt signal3 gt sd ihe x d dt lt signal4 gt sin lt signal2 gt z X alpha ddot EOM cos Mp 2 Ip 2 g alpha dot radis Mp 2 Ip 3 Ip Mp l signal Mp 2 Ip 3 Ip Mp lp E x d dt lt signal4 gt i Rola Beq Mp Ip 2 Ip lt signal2 gt Figure 8 Simulink Subsystem Representing the First EOM Tah s_spg_pp xc_ddot EOM alpha_ddot EOM File Edit View Simulation Format Tools Help WinCon SPG Non Linear Dynamic Model alpha_ddot EOM lt signal3 gt lt signal2 gt lt signal1 gt lt signal2 gt lt signal3 gt lt signal4 gt lt signal2 gt COS signal M lt signal4 gt Figure 9 Simulink Subsystem Representing the Second EOM Document Number 509 Revision 03 Page 15 Single Pendulum Gantry Control Laboratory Student Handout Figure 8 above represents t
13. Linear Motion Servo Plant P02 Linear Experiment 4 n Pole Placement IMI VA TE EDUCATIE Single Pendulum Gantry SPG Student Handout Single Pendulum Gantry Control Laboratory Student Handout Table of Contents Ve DIS CIV CS RERO T arsa 2 MPT STEQUISIVES ala pad decat sada anilor De RETTE NCES TEE T EL 2 A Experimental Sean es A 2 Sa san C OHDOBC INS outcome utu Sut emanate troop aia eul taia tatea ati ui 2 SUE ur 2 5 Controller Desig SP Se AON ee e a BBB Bur eines 4 0 Pre LIDAS OM Oi ee EN tans T aa 5 6 1 Assignment 1 Non Linear Equations Of Motion EOM eene 5 6 1 1 System Representation and Notations oocaaa 5 6 1 2 Assignment 1 Determination of the System s Equations Of Motion 6 6 2 Assignment 2 EOM Linearization and State Space Representation 6 6 3 Assignment 3 Pole Placement Design ooooooooco WWW 9 Penebar el ace ae ae teet a aia aa a a iata a Lea Sima la a A at 11 7 1 Experimental Setup Check Wiring and Connections esses 11 7 2 Matlab Simulation of the Pole Placement Based Controller 11 TDN gO DIC CHV ES TT T aa 11 1 22 DrOCOOHEIE eoe oia UU ERES oU DE EDU MD CM A SUM EP d sa 11 7 3 Simulink Simulation and Design of the Pole Placement Based Controller 13 AR Ee TE 13 7 3 2 Presentatio
14. at you evaluated in Assignment 2 question 3 Step2 If you have not done so yet open the Simulink diagram titled s spg pp mdl You should obtain a diagram similar to the one shown in Figure 6 Take some time to fa miliarize yourself with this model it will be used for the our pole placement tuning simulation For a plant simulation valid over the full angular range the SPG plus IP02 model has been implemented without linear approximation through its two Document Number 509 Revision 03 Page 16 Single Pendulum Gantry Control Laboratory Student Handout equations of motion B 17 and B 18 as previously discussed This model is repre sented in s spg pp mdl by the subsystem block titled SPG IP02 Non Linear EOM You should also check that the signal generator block properties are properly set to output a square wave signal of amplitude 1 and of frequency 0 1 Hz As a remark it should be noted that the reference input a k a setpoint should be small enough so that our system remains in the region where our linearization 1s valid since we are us ing a linear controller It can also be noticed in s spg pp mdi that the setpoint needs to be scaled in order to accommodate for the feedback vector located in the feedback loop By definition it 1s reminded that the feedback vector named K has four ele ments corresponding to the four system s states defined in Equation 4 Step3 In the Matlab workspace set the vector K to t
15. ate of the pendulum s centre of gravity 1s expressed by d d 40 7 sinat F000 B 8 In addition the pendulum s rotational kinetic energy 7 can be characterized by 2 l d L 51 E aco B 9 Thus the total kinetic energy of the system is the sum of the four individual kinetic energies as previously characterized in Equations B 5 B 6 B 7 B 8 and B 9 By expanding collecting terms and rearranging the system s total kinetic energy 77 results to be such as Document Number 509 Revision 03 Page 31 Single Pendulum Gantry Control Laboratory Student Handout 1 d d d T M M E M 1 cos ot t E aco 2 J 2 B 10 T 2 7 M I E aco It can be seen from Equation B 10 that the total kinetic energy can be expressed in terms of both the generalized coordinates and of their first time derivatives Let us now consider the Lagrange s equations for our system By definition the two Lagrange s equations resulting from the previously defined two generalized coordinates x and a have the following formal formulations i eren B 11 LO x t and J i i 0 4 0 B 12 to Ot In Equations B 11 and B 12 L is called the Lagrangian and is defined to be such that L 1 V B 13 In Equation B 11 9 Likewise in Equation B 12 Qa is the generalized force applied on the generalized coordinate a Our system s generalized forces can be defined as follows d
16. d pendulum one the side towards one end of the track Do not apply a tap of more than plus or minus 20 degrees from its equilibrium 1 e vertical position Visually observe the response of the linear cart and its effect on the pendulum angle Plot these two outputs in two WinCon Scopes Additionally also open a WinCon Scope to plot the resulting pendulum end position and another one for the corresponding motor input voltage Vm Hint 1 You can use the WinCon Scope s Update Freeze All Plots menu item to capture simultaneously in all the scopes the response sweep resulting from the tap disturbance Hint 2 Not to plot the simulated data open up the selection list from the Scope s File Variables menu item and uncheck the data coming from the simulation closed loop e g 0 and 2 for the Pend Tip Pos mm Scope or 1 for the Pend Angle deg Scope Step 3 How do the four responses behave as a result to the tap in the dampening of the suspended pendulum s swing How does the cart catch the pendulum Describe the system s response from both your visual observations and the obtained response plots Include in your lab report your plots of x X a and V4 to support your answers Step 4 You can now move on to writing your lab report Ensure to properly document all your results and observations before leaving the laboratory session Document Number 509 Revision 03 Page 26 Single Pendulum Gantry Control Laboratory Student Ha
17. d your power amplifier e g UPM as described in References 2 4 and 5 11 To be familiar with your Single Pendulum module as described in Reference 3 11 To have successfully completed the pre laboratory described in Reference 1 students are therefore expected to be familiar in using WinCon to control and monitor the plant in real time and in designing their controller through Simulink WinCon is Document Number 509 Revision 03 Page 1 Single Pendulum Gantry Control Laboratory Student Handout fully documented in Reference 6 iv To be familiar with the complete wiring of your IPO1 or IP02 servo plant as per dictated in Reference 2 and carried out in pre laboratory 1 v To be familiar with the pole placement design theory with regard to state feedback controllers 3 References 1 ZPOI and IP02 Linear Experiment 0 Integration with WinCon Student Handout 2 IP0I and IP02 User Manual 3 P02 Single Pendulum Gantry SPG User Manual 4 MultiO User Manual 5 Universal Power Module User Manual 6 WinCon User Manual 7 1P01 and IP02 Linear Experiment 1 PV Position Control Student Handout 4 Experimental Setup 4 1 Main Components To setup this experiment the following hardware and software are required E Power Module Quanser UPM 1503 2405 or equivalent EJ Data Acquisition Board Quanser MultiQ PCI MQ3 or equivalent D Linear Motion Servo Plant Quan
18. ent 41 Determination of the System s Equations Of Motion The determination of the SPG plus IPO2 system s equations of motion is derived in Appendix B If Appendix B has not been supplied with this handout derive the system s equations of motion following the system s schematic and notations previously defined and illustrated in Figure 3 Also put the resulting EOM under the following format 2 2 2 2 9 x f Jo o F and f Je F 1 d ESI o ot lor ot ot Hint 1 The mass of the single suspended pendulum is assumed concentrated at its Centre Of Gravity COG Hint 2 You can use the method of your choice to model the system s dynamics However the modelling developed in Appendix B uses the energy based Lagrangian approach In this case since the system has two Degrees Of Freedom DOF there should be two Lagrangian coordinates a k a generalized coordinates The chosen two coordinates are namely x and a Also the input to the system is defined to be F the linear force applied by the motorized cart 6 2 Assignment 2 EOM Linearization and State Space Representation In order to design and implement a state feedback controller for our system a state space representation of that system needs to be derived Moreover it is reminded that state space matrices by definition represent a set of linear differential equations that describes the system s dynamics Therefore the EOM found in Assignment
19. ge s method is used to obtain the dynamic model of the system In this approach the single input to the system is considered to be F To carry out the Lagrange s approach the Lagrangian of the system needs to be determined This is done through the calculation of the system s total potential and kinetic energies According to the reference frame definition illustrated in Figure 3 on page 5 the absolute Cartesian coordinates of the pendulum s centre of gravity are characterized by X t x t sin a t and y 4 5 cos a t B 1 Let us first calculate the system s total potential energy Vr The potential energy in a system is the amount of energy that that system or system element has due to some kind of work being or having been done to it It is usually caused by its vertical displacement from normality gravitational potential energy or by a spring related sort of displacement elastic potential energy Here there is no elastic potential energy in the system The system s potential energy is only due to gravity The cart linear motion is horizontal and as such never has vertical displacement Therefore the total potential energy is fully expressed by the pendulum s gravitational potential energy as characterized below V M g I cos o t B 2 It can be seen from Equation B 2 that the total potential energy can be expressed in terms of the generalized coordinate s alone Let us now determine the system s to
20. gure 17 below Comment IN Scope q spg pp I mgpci ip 2Scopes Pend Tip Pos mm 0 File Edit Update Axis Window Background Colour Text Colour Text Font Figure 17 Actual and Simulated x Responses Partial State Feedback Document Number 509 Revision 03 Page 25 Single Pendulum Gantry Control Laboratory Student Handout 7 5 Assessment of the System s Disturbance Rejection This part of the experiment is provided to give you some basic insights on the regulation problem through a few disturbance rejection considerations 7 5 1 Objectives EJ To observe and investigate the disturbance response of the stabilized suspended pendulum linear cart system in response to a tap to the pendulum EJ To study the full state feedback effectiveness in stabilizing the swing of the suspended pendulum 7 5 2 Experimental Procedure Follow the experimental procedure described below Step I Start and run your suspended pendulum linear cart system around the mid stroke position make sure to let the pendulum come to rest before starting the real time code Use the same full state feedback with integral loop controller as the one previously developed However this time set the cart position setpoint amplitude to zero so that the controller now regulates both cart position and pendulum angle around zero This is the regulation configuration 1 e there is no tracking Step 2 Once the system has stabilized gently tap the suspende
21. he desired design specifications What values do you obtain for PO ts es Vm minimum and maximum and PU Include the corresponding plots in your lab report to support your observations Does your system perform better or worse than expected Ensure to properly document all your results and observations before moving on to the next section Step 16 Outline the most prominent differences between the theoretical 1 e simulated and actual response Remember that there is no such thing as a perfect model Document Number 509 Revision 03 Page 24 Single Pendulum Gantry Control Laboratory Student Handout Scope q_spg_pp_I_mapci_ip02 SPG IP02 Actual Planti IP02 MOPCI Command Y i File Edit Update Axis Window Background Colour Text Colour Text Font ini x Figure 16 Actual Command Voltage State Feedback with Integrator Step 17 On a side note double click on the manual switch located around the centre of your diagram This should move the switch from the up to the down position In the down position some of the fed back state vector elements i e states are multiplied by zero therefore canceling their feedback your closed loop becomes then with partial state feedback Start the real time controller again and observe the effect of canceling the two states position and velocity characterizing the pendulum angle a Your pendulum end position response should look similar to the one displayed in Fi
22. he first EOM as expressed in Equation B 17 and of the fol lowing form 0 0 3057 x Je Ol F 18 Likewise Figure 9 above represents the second EOM as expressed in Equation B 18 and of the following form 9 9 oo E as a F 19 Of interest in Figure 9 it should be noted that the initial condition on a ao 1s contained in side the Simulink integration block located between the time derivative of a and a That ini tial angle is referred in the Matlab workspace as the variable X0 2 Optionally by carrying out block diagram reduction you can check that the two EOM that you determined in Assignment 1 correspond to the Simulink representations shown in Figures 8 and 9 As a remark an alternative and replacement to Figures 8 and 9 above could have been to build two Matlab S functions corresponding to the system s EOM as expressed in Equation B 17 and B 18 7 3 3 Experimental Procedure Please follow the steps described below Stepl Before beginning the simulation you must run the Matlab script called setup lab ip02 spg m The setup lab ip02 spg m file initializes all the SPG plus IP02 model parameters and user defined configuration variables needed and used by the Simulink diagrams Lastly it also calculates the state space matrices 4 B C and D corresponding to the SPG plus IP02 system configuration that you defined Check that the A and B matrices set in the Matlab workspace correspond to the ones th
23. he values determined in Step 4 of the previous Matlab simulation section Alternatively you can use the following Mat lab command line to set it up gt gt K place A B pl p2 p3 p4 Step4 Set the Stop Time in the Simulink Simulation parameters Ctrl E to 10 sec onds You can now Start Ctrl T the simulation of your diagram Step5 After the simulation run open the four Scopes titled Scopes Tip Horizontal Pos mm Scopes xc mm Scopes alpha deg and especially Control Effort Vm V What do you observe Does your system response meet all the design requirements Acceptable responses are shown in Figure 10 and Figure 11 below Hint In order to satisfy the design requirement on the control effort produced i e specification 5 the commanded motor input voltage Vm should always be between 10V In such a case the actual system e g power amplifier will not go into saturation rizontal Pos mm lt Tip Horiz s n i Control Effort Vm V je amp gB os adu I68 92 2 ABB Sas Time offset 0 Figure 10 Tip Horizontal Pos mm Simulink Scope Figure 11 Control Effort Vm V Simulink Scope Step6 Infer the relationship between the locations of ps and pu and the resulting gain vector K the achieved system performance and the resulting control effort supplied Document Number 509 Revision 03 Page 17 Single Pendulum Gantry Control Laboratory Student Handout by the input 1 e
24. ign technique 7 3 2 Presentation of the Simulation Diagram In this section the Simulink model file named s spg pp mdl is used to assess the performance of your pole placement based feedback vector K The model s spg pp mdl is represented in Figure 6 It also forms in a first time the basis for refining tuning your the pole locations of p and pu After obtaining of the system s two EOM in Assignment l these equations can be represented by a series of block diagrams as illustrated in Figures 7 8 and 9 below Opening the subsystem block named SPG IP02 Non Linear EOM in the file s spg pp mdi should show something similar to Figure 7 This mostly corresponds to the now familiar IP02 open loop transfer function representation as previously discussed in for example Reference 7 Document Number 509 Revision 03 Page 13 Single Pendulum Gantry Control Laboratory Student Handout o xl File Edit view Simulation Format Tools Help Winton SPG plus IPO2 System Simulation Pole Assignment Position Setpoint m OR ENE U Ym Position Setpoint UP ti voltage Setpoint Amplitude mj Saturation SFPG IFO2 Non Linear EO bi y A 3c alpha xc dot alpha dot State Feedback Gain Figure 6 Simulation Diagram of the SPG plus IP02 System with State Feedback Controller 3s spg pp SPG IP02 Non Linear EOM E E loj x File Edit view Simulation Format Tools Help WinCon SPG plus IP02 System Non
25. in our crane we could introduce integral action on the linear cart s position state x Our goal is to eliminate the steady state error seen in Figure 13 above Such an integrator on x has already been implemented for you in a new controller diagram Depending on your system configuration open the Simulink model file of name type q spg pp I ZZ ip02 where ZZ stands for either for mg3 nqpci g8 or nie Ask the TA assigned to this lab if you are unsure which Document Number 509 Revision 03 Page 22 Single Pendulum Gantry Control Laboratory Student Handout Simulink model is to be used in the lab You should obtain a diagram similar to the one shown in Figure 14 below Apart from the added integrator loop this model should be the same in every aspect including the I O connections as the one you previously used E q spg pp I mqpci ip02 File Edit View Simulation Format Tools Help WinCon DISS tpe C Amt S gt iens SPG plus IPO2 System State Feedback plus Integrator Experiment vs State Space Simulation Figure 14 Actual State Feedback Closed Loop with Integral Action Step 11 The integral gain is named Ki First set K to zero in your Matlab workspace Then compile and run your state feedback controller with integral action on x Re open the previous Scopes of interest Finally by monitoring your system actual response plotted in the Scopes Pend Tip Pos mm Scope tune K to eliminate the stead
26. int The corresponding control effort should also be looked at and minimized Please refer to your in class notes as needed regarding the pole placement a k a pole assignment design theory and the corresponding implementation aspects of it Generally speaking the purpose of pole placement is to place the system s closed loop eigenvalues 1 e poles at user specified locations It can be shown that for single input systems the design that assigns all closed loop poles to arbitrary locations 1f it exists 1s unique For our application the suspended pendulum response performance will be assessed in terms of speed of response minimum oscillation and position accuracy Consequently the suspended pendulum plus cart closed loop system should satisfy the following design per formance requirements 1 The Percent Overshoot PO of the pendulum tip response along the x coordinate x should be less than 5 1 e PO lt 5 2 The 2 settling time of the pendulum tip response along the x coordinate x should be less than 2 2 seconds 1 e f 2 2 s 3 Zero steady state error on the pendulum tip response x 1 e e 0 SS 4 The Percent Undershoot i e PU of the pendulum tip response along the x coordinate x should be less than 10 of the step size 1 e PU lt 10 As it will be seen later in the in lab session the undershoot 1 e an initial decrease in the response is due to the presence of zero s in the Right Half P
27. lane such a system is qualified as non minimum phase 5 The commanded motor input voltage Vm proportional to the control effort produced should not make the power amplifier e g UPM go into saturation The previous specifications are given in response to a 30 mm square wave cart position setpoint PO and PU are defined to limit the relative endpoint position of the gantry Document Number 509 Revision 03 Page 4 Single Pendulum Gantry Control Laboratory Student Handout 6 Pre Lab Assignments 6 1 Assignment 41 Non Linear Equations Of Motion EOM 6 1 1 System Representation and Notations A schematic of the Single Pendulum Gantry SPG mounted on an IP02 linear cart is represented in Figure 3 The SPG plus IPO2 system s nomenclature is provided in Appendix A As illustrated in Figure 3 the positive sense of rotation is defined to be counter clockwise CCW when facing the linear cart Also the zero angle modulus 27 i e a 0 rad 2n corresponds to a suspended pendulum perfectly vertical and pointing straight down Lastly the positive direction of linear displacement is to the right when facing the cart as indicated by the global Cartesian frame of coordinates represented in Figure 3 y OCT M F 50 C SS Figure 3 Schematic of the SPG Mounted in Front of the IP02 Servo Plant Document Number 509 Revision 03 Page 5 Single Pendulum Gantry Control Laboratory Student Handout 6 1 2 Assignm
28. loops one runs a pure simulation of the state feedback controller plus SPG plus IPO2 system using the plant s state space representation Since full state feedback 1s used ensure that the C state space matrix is a 4 by 4 identity matrix enter C eye 4 at the Matlab prompt if necessary The other loop directly interfaces with your hardware and runs your actual suspended pendulum mounted in front of your IPO2 linear servo plant To familiarize yourself with the diagram it is suggested that you open both subsystems to get a better idea of their composing blocks as well as take note of the I O connections You should check that the position setpoint generated for the cart and pendulum tip x coordinate to follow is a square wave of amplitude 30 mm and frequency 0 1 Hz Lastly your Document Number 509 Revision 03 Page 19 Single Pendulum Gantry Control Laboratory Student Handout model sampling time should be set to 1 ms i e T 10 s 2 a_spg_pp_mapci_ip02 E o x File Edit View Simulation Format Tools Help WinCon SPG plus IP02 System State Feedback Experiment vs State Space Simulation Position Setpoint m UPM Voltage Setpoint Limit Amplitude m SPG IP02 Actual Plant X meas xc alpha xc dot alpha dot Full State Feedback Partial State Feedback SPG IP02 UPM Voltage Saturati aturation State Space Model Figure 12 Diagram used for the Real Time Implementation of the State Feedback
29. n of the Simulation Diagram cce eee eee eee eeeeeaae 13 Kode experimental PLOCECIILC eo iute ad a Sl dota a Dite oT En Ia ege 16 7 4 Real Time Implementation of the State Feedback Controller 19 Pa MOD ee ea hn ata sai aia i aa ied 19 154 2 Bxperimaental Procedure ee ee tie a alti ia tai ie ul A tan 19 7 5 Assessment of the System s Disturbance Rejection oooo 26 TDs DIC CUY S ama aaa aa al rane ncn e tona datei 26 7 922 ExpDettiielital PEOCOQUE cec eii edes rix lat ate a aid aia Aa e aa lite a 26 Appendix o Nome nc LA na 2 Appendix B Non Linear Equations Of Motion EOM oooooomoomco 30 Document Number 509 Revision 03 Page i Single Pendulum Gantry Control Laboratory Student Handout 1 Objectives The Single Pendulum Gantry SPG experiment presents a single pendulum rod which is suspended in front of an IPO2 linear cart The challenge of the present laboratory is to design a control system that makes the pendulum tip follow a commanded position on a swift and accurate manner In other words such a controller tracks the linear cart to a commanded position while minimizing the swing of the suspended pendulum A few real world applica tions of the gantry problem include for example a crane lifting and moving a heavy pay load or a pick and place gantry robot of an assembly line or again the nozzle head of an inkjet printer Therefore the gantry response pe
30. ndout Appendix A Nomenclature Table A 1 below provides a complete listing of the symbols and notations used in the IP02 mathematical modelling as presented in this laboratory The numerical values of the system parameters can be found in Reference 2 Description Matlab Simulink Notation Motor Armature Voltage Motor Armature Current Motor Armature Resistance Motor Torque Constant Motor Efficiency Back ElectroMotive Force EMF Constant Back EMF Voltage Rotor Moment of Inertia Planetary Gearbox Gear Ratio Planetary Gearbox Efficiency IPO2 Cart Mass Cart Alone IPO2 Cart Weight Mass IPO2 Cart Mass including the Possible Extra Weight Lumped Mass of the Cart System including the Rotor Inertia Motor Pinion Radius Equivalent Viscous Damping Coefficient as seen at the Motor Pinion Cart Driving Force Produced by the Motor Cart Linear Position Cart Linear Velocity Table A 1 IPO2 Model Nomenclature Table A 2 below provides a complete listing of the symbols and notations used in the Document Number 509 Revision 03 Page 27 Single Pendulum Gantry Control Laboratory Student Handout mathematical modelling of the single suspended pendulum as presented in this laboratory The numerical values of the pendulum system parameters can be found in Reference 3 Description Matlab Simulink Notation Pendulum Angle From the Hanging Down Position alpha Pendulum Angular Velocity alpha dot I
31. nitial Pendulum Angle at t 0 IC ALPHAO Pendulum Mass with T fitting Mp Pendulum Full Length from Pivot to Tip Lp Pendulum Length from Pivot to Center Of Gravity Ip Pendulum Moment of Inertia Ip Absolute x coordinate of the Pendulum Centre Of Gravity Absolute y coordinate of the Pendulum Centre Of Gravity Absolute x coordinate of the Pendulum Tip Table A 2 Single Suspended Pendulum Model Nomenclature Table A 3 below provides a complete listing of the symbols and notations used in the pole placement plus integrator design as presented in this laboratory Description Matlab Simulink Notation A B C D State Space Matrices of the SPG plus IPO2 System A B C D X state Vector X Xo Initial State Vector X0 Y System Output Vector PO Percent Overshoot PO i 2 Settling Time ts G Damping Ratio zeta On Undamped Natural Frequency wn Document Number 509 Revision 03 Page 28 Single Pendulum Gantry Control Laboratory Student Handout Description Matlab Simulink Notation State Feedback Gain Vector Integral Gain Control Signal a k a System Input Continuous Time Table A 3 State Feedback Nomenclature Document Number 509 Revision 03 Page 29 Single Pendulum Gantry Control Laboratory Student Handout Appendix B Non Linear Equations Of Motion EOM This Appendix derives the general dynamic equations of the Single Pendulum Gantry SPG module mounted on the IP02 linear cart The Lagran
32. rformance is assessed in terms of speed of response minimum oscillation and position accuracy During the course of this experiment you will also become familiar with the design of a full state feedback controller using pole placement At the end of the session you should know the following EJ How to mathematically model the SPG mounted on the IP02 linear servo plant using for example Lagrangian mechanics or force analysis on free body diagrams E How to linearize the obtained non linear equations of motion about the quiescent point of operation E How to obtain a state space representation of the open loop system EJ How to design simulate and tune a pole placement based state feedback controller satisfying the closed loop system s desired design specifications m How to implement your state feedback controller in real time and evaluate its actual performance M How to use integral action to eliminate steady state error EJ How to tune on line and in real time your pole locations so that the actual suspended pendulum linear cart system meets the controller design requirements EJ How to observe and investigate the disturbance response of the stabilized suspended pendulum linear cart system 1n response to a tap to the pendulum 2 Prerequisites To successfully carry out this laboratory the prerequisites are 1 To be familiar with your IP02 main components e g actuator sensors your data acquisition card e g MultiQ an
33. ser IP02 as represented in Figures 1 and 2 D Single Pendulum Quanser 12 inch Single Pendulum seen in Figure 1 and or 24 inch Single Pendulum as shown in Figure 2 E Real Time Control Software The WinCon Simulink RTX configuration as detailed in Reference 6 or equivalent For a complete and detailed description of the main components comprising this setup please refer to the manuals corresponding to your configuration 4 2 Wiring To wire up the system please follow the default wiring procedure for your IPO2 as fully described in Reference 2 When you are confident with your connections you can power up the UPM Document Number 509 Revision 03 Page 2 Single Pendulum Gantry Control Laboratory Student Handout EN Me r i te Figure Medium Pendulum Suspended in Front of the IP02 Figure 2 Long Pendulum Suspended in Front of the IP02 Document Number 509 Revision 03 Page 3 Single Pendulum Gantry Control Laboratory Student Handout 5 Controller Design Specifications In the present laboratory i e the pre lab and in lab sessions you will design and implement a control strategy based on full state feedback and pole placement As a primary objective the obtained feedback gain vector K should allow you to minimize the swing of your single suspended pendulum At the same time your IP02 linear cart will be asked to track a desired square wave position setpo
34. suspended pendulum swing Explain Hint The characteristic equation of the open loop system can be expressed as shown below det s J A 0 9 where det is the determinant function s is the Laplace operator and the identity matrix Therefore the system s open loop poles can be seen as the eigenvalues of the state space matrix A 5 The SPG plus IPO2 system can be seen as a Single Input Multiple Output SIMO system with the two following outputs x and a However in the gantry configuration the main variable to be controlled is x the displacement of the pendulum tip along the x axis This control objective is expressed by the fact that the design specifications only bear on the response characteristics with regard to xi Therefore to evaluate the performance of our system it will be more adequate in the following to consider a Single Input Single Output SISO system instead As a consequence the system s output can be set to be x as expressed by the following relationship 1 x 10 Question Determine the state space matrices C and D in agreement with Equation 10 Hint 1 By convention of the state space representation the matrices C and D are defined by the following relationship Y CX DU 11 Hint 2 Just like for the determination of the A and B matrices linearization using the small angle approximation can be performed in order to obtain C and D Document Number 509 Revision 03 Page 8 Single Pendulum
35. tal kinetic energy 77 The kinetic energy measures the amount of energy in a system due to its motion Here the total kinetic energy is the sum of the translational and rotational kinetic energies arising from both the cart since the cart s direction of translation 1s orthogonal to that of the rotor s rotation and its mounted gantry pendulum since the SPG s translation is orthogonal to its rotation First the translational kinetic energy of the motorized cart T is expressed as follows 2 d Mt B 3 T s4 7740 B 3 Second the rotational kinetic energy due to the cart s DC motor Ta can be characterized by Document Number 509 Revision 03 Page 30 Single Pendulum Gantry Control Laboratory Student Handout 2 d IK x t m e dt B 4 L 2 2 l r mp Therefore as a result of Equations B 3 and B 4 T the cart s total kinetic energy can be written as shown below d i Im Bg T gt M E 20 where M Mt B 5 c 2 Hint 1 says that the mass of the single pendulum is assumed concentrated at its Centre Of Gravity COG Therefore the pendulum s translational kinetic energy T can be expressed as a function of its centre of gravity s linear velocity as shown by the following equation 2 2 d d aa a0 o B 6 where the linear velocity s x coordinate of the pendulum s centre of gravity is determined by d d d a Om a0 costat 4 09 8 7 and the linear velocity s y coordin
36. tem is free to move over its workspace You can now start your real time controller by clicking on the START STOP button of the WinCon Server window Your IP02 cart position should now be tracking the desired sguare wave setpoint while minimizing the swing of the suspended pendulum Step 6 In a WinCon Scope open the Scopes Pend Tip Pos mm sink For more insight on your actual system s behaviour also open the two sinks named Scopes xc mm and Scopes Pend Angle deg in two other separate WinCon Scopes Finally you should also check the system s control effort with regard to saturation as mentioned in the design specifications Do so by opening the V Command V scope located for example in the following subsystem path SPG IP02 Actual Plant IP02 MOPCI Plant On the Pend Tip Pos mm scope you should now be able to monitor on line as the cart and pendulum move the actual pendulum end position as it tracks your pre defined reference input and compare it to the simulation result produced by the SPG plus IPO2 state space model Such a response is shown in Figure 13 below Hint 1 To open a WinCon Scope click on the Scope button of the WinCon Server window and choose the display that you want to open e g Pend Tip Pos mm from the selection list Hint 2 For a better signal visualization you can set the WinCon scope buffer to 10 seconds To do so use the Update Buffer menu item from the desired WinCon scope Document Number
37. the power spent Step7 If your responses do not meet all the desired design specifications of Section Controller Design Specifications on page 4 you should re iterate your location assignment of ps and p4 re calculate the corresponding K and re run the simulation until the achieved performance and cost of control are satisfactory A trade off 1s probably to be found between the response performance of x and the cost of control Step8 Once you found acceptable values for ps and p satisfying the design requirements save them for the following of this in lab session as well as the obtained value of the feedback gain vector K Have your T A check your values and simulation plots Include in your lab report your final ps ps and K as well as the resulting response plots of x X a and Vm Step9 Once you feel comfortable regarding the design principles involved in the pole placement technique and you found acceptable values for p and p satisfying the design requirements you can proceed to the next section That section deals with the implementation in real time of your pole placement obtained state feedback controller on your actual SPG plus IP02 system Document Number 509 Revision 03 Page 18 Single Pendulum Gantry Control Laboratory Student Handout 7 4 Real Time Implementation of the State Feedback Controller 7 4 1 Objectives E To implement with WinCon a real time state feedback controller for your actual SPG pl
38. us IP02 plant EJ To refine the chosen placements of closed loop poles so that the actual system meets the desired design specifications Ej To run the state feedback closed loop system simulation in parallel and simultaneously at every sampling period in order to compare the actual and simulated responses EJ To eliminate any steady state error present in the actual responses by introducing an integral control action EJ To tune on the fly the integral gain K EJ To investigate the effect of partial state feedback on the closed loop responses 7 4 2 Experimental Procedure After having gained insights through the previous closed loop simulation on the placement procedure of closed loop poles for your SPG plus IPO2 plant and checked the type of responses obtained from the system s main output x 1 e the pendulum tip horizontal position you are now ready to implement your pole placement designed controller in real time and observe its effect on your actual linear cart suspended pendulum system To achieve this please follow the steps described below Step 1 Depending on your system configuration open the Simulink model file of name type q spg pp ZZ ip02 where ZZ stands for either for mg3 mgpci g8 or nie Ask the TA assigned to this lab if you are unsure which Simulink model is to be used in the lab You should obtain a diagram similar to the one shown in Figure 12 The model has 2 parallel and independent control
39. y state error Hint You can use the wc update WinCon script to update your real time code with the new Ki Step 12 Did you achieve zero steady state error Include your value of K in your lab report Your pendulum end position response should look similar to the one displayed in Figure 15 Document Number 509 Revision 03 Page 23 Single Pendulum Gantry Control Laboratory Student Handout U scope q_spg_pp_I _mapci_ipl2 Scopes Pend Tip Pos mm U 2 E H m x File Edit Update Axis Window Background Colour Text Colour Text Font Figure 15 Actual and Simulated x Response State Feedback with Integrator Step 13 Also ensure that the actual commanded motor input voltage Vm which is proportional to the actual control effort produced does not go into saturation As an example an acceptable command voltage V is illustrated in Figure 16 below Hint No sign of saturation should be seen on the V Command V scope Step 14 Refine your two real poles positions ps and pa as necessary so that your actual suspended pendulum linear cart closed loop system implementation meets the set design specifications as closely as possible Iterate your manual tuning as many times as necessary so that your actual system s performances meet the desired design requirements If you are still unable to achieve the required performance level ask your T A for advice Step 15 Does your final actual closed loop implementation meet t

Download Pdf Manuals

image

Related Search

Pendulum pendulum pendulum probiotic pendulum squat pendulum swing pendulum glucose control pendulum glp-1 probiotic pendulum exercises pendulum squat machine pendulum clock pendulum akkermansia pendulum hausse pendulum definition pendulum therapeutics pendulum exercises for shoulder pendulum metabolic daily pendulum hub pendulum test pendulum music pendulum hub script pendulum of doom pendulum live pendulum-v1 pendulum yugioh pendulum-v0 pendulum movement

Related Contents

  at-3000 preamp user`s manual  Télécharger - Observatoire du Sahara et du Sahel    コニカミノルタ株式会社製機器でBMLinkSを使用するための設定について  CH Tech VX415C User's Manual  MZK-W300NHPU_QIG    gazette n°60 - Foyers Ruraux du Centre  powerline turbo ethernet adapter user manual  

Copyright © All rights reserved.
Failed to retrieve file