1. Trang chủ
  2. » Giáo Dục - Đào Tạo

Underactuated single wheeled mobile robot mimicking a human ridden unicycle 2

84 365 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 84
Dung lượng 22,01 MB

Nội dung

Chapter Structure & Mechanism of ALP Cycle In the development of any small robotic system, the structure of the robot plays a very important role especially in robots which exhibit inherently unstable behaviours such as single-wheeled mobile robots. As mentioned in Chapter 1, Subsection 1.4.2, the preliminary work shows excessive structural vibration, structural bending and loosening of fasteners, which affect the stability and performance of the robotic system. Therefore, considerable effort and time are allocated in this research to properly design and construct a robust physical platform for ALP Cycle. In this chapter, the process of developing the structure of ALP Cycle is presented in great detail. In Section 3.1, the objective is clearly stated and the requirements that must be met to fulfill that objective are defined. It is followed by the detailed 3-D structural design in SolidWorks presented in Section 3.2. Issues such as placement of components, selection of material, wheel, etc., and designs of the chassis and pendulum are also discussed in this section. In Section 3.3, the finished structural parts after 102 fabrication and the assembled prototype are shown. 3.1 Objective & Requirements of Prototype Development In this research, the main purpose of constructing the prototype is to experimentally verify the posture-balancing capability of lateral-pendulum mechanism under feedback control. Theoretical analysis of the proposed autonomous unicycle mechanism is carried out using the mathematical model of the structure. To achieve experimental success, it is apparent that the prototype must be constructed in a way such that its dynamics is as close as possible to the dynamic model derived based on several ideal assumptions. Therefore, the objective is to develop a prototype which possesses dynamics that is represented by its theoretical dynamic model while keeping an eye on issues of practical importance. The relevant practicality issues include ease of experimentation, cost and appearance. The following seven design requirements are defined in order to meet the design objective stated above. 1. Low structural vibration: Excessive structural vibration is undesirable because ALP Cycle is an inherently unstable system which maintains its balance at only its upright posture. It acts as a disturbance which perturbs the stability of the system and also introduces noise into sensor outputs. Furthermore, it may excite the unmodelled high-frequency dynamics of the system. Definitely, it is not possible 103 and feasible to totally eliminate the structural vibration. However, if the structure is designed properly, its vibration can, at least, be kept at low level, so that it will not considerably affect the system stability and performance. 2. Low structural bending: For elastic materials, including most metals, structural failure is normally preceded by structural bending. The static and dynamic characteristics of a structure are also altered by the presence of structural bending. Therefore, structural bending has to be kept low in order to avoid structural failure and keep the dynamics of a system close to its theoretical model. 3. Low inertia: The mass and moment of inertia of a robotic structure are important considering the following three aspects. Firstly, a robotic structure having low mass and moment of inertia requires less force and torque to actuate it and, therefore, can be actuated by smaller, lighter and lower-cost actuator. Secondly, with the same actuator, a robotic structure with lower mass and moment of inertia has less reaction time during its motion as compared to that with higher mass and moment of inertia. Lastly, since we deal with an inherently unstable system, it is easier and requires less effort to handle a robot having lower mass and moment of inertia during experiments. Therefore, it is desirable to keep the mass and moment of inertia of the robotic structure low. 4. Balanced centre-of-gravity placement: Since the theoretical unforced equilibrium point of ALP Cycle is its upright posture, the ALP Cycle’s centre of gravity must be 104 placed above its contact point with the ground as precisely as possible. Otherwise, the posture balancing will not be easily achieved or it may even be impossible to be achieved. 5. High integrity of structural joints: Based on the preliminary work presented in Chapter 1, Subsection 1.4.2, weak structural joints result in retightening of fasteners after several experiments, which is unnecessarily time consuming. Therefore, the structural joints of the robot must be highly robust so that it is able to withstand multiple experiments. 6. Low cost: To keep the cost of the prototype within the limited budget, we not have the luxury of getting the best possible choice for each component. Besides, trial-and-error approach for performing experiments is to be avoided as failure is very expensive. Therefore, some trade-off is allowed in selecting components and more time is invested to design and evaluate the system before performing experiments. 7. Aesthetic appearance: In the case where the other design requirements above have been fulfilled, the aesthetic aspect of the design is considered to make the ALP Cycle more presentable. The prototype development process presented in this chapter is iterative in nature and it is summarised in the flow diagram shown in Fig. 3.1. For the brevety of presentation, only the final result is shown in this chapter and not all stages of iteration. It must be 105 noted that, at no point in this thesis, a claim, that the design of the prototype is optimal, is made. Instead, the main focus is on developing a prototype which is sufficiently good to serve the purposes of concept verification and control validation. Figure 3.1: Prototype Development Process of ALP Cycle 3.2 3.2.1 Computer-Aided Structural Design Mechanism & Component Placement The structure of ALP Cycle consists of a wheel, a chassis and a pendulum. The wheel and the chassis are connected by a rotary joint with a rotary actuator installed rigidly at the bottom of the chassis providing torque for the wheel. The pendulum is attached to the chassis through a rotary joint and a second rotary actuator rigidly mounted on top of 106 the chassis to provide torque for the pendulum actuation. Two brushless direct-current (BLDC) motors are used as these actuators. Two motor amplifiers are needed to power up the two BLDC motors. One microcontroller is needed to function as the robot’s computer system. Two incremental rotary encoders and two inertial measurement units (IMUs) are used as sensors in this system. The encoders come together with the BLDC motors, so they are considered as parts of the motors. The two IMUs are mounted on two separate printed circuit boards (PCBs). The two PCBs are also used for mounting the required circuits for power distribution from two Lithium Polymer (Li-Po) batteries used to power up the entire system. A microcontroller board is used to read the sensor outputs and control the motors accordingly. While designing the structure of ALP Cycle, it must be kept in mind that these seven components, i.e. two BLDC motors, two motor amplifiers, two PCBs and one microcontroller board, are to be securely mounted on the mechanical structure. The microcontroller chosen (RSK2+ for SH7216) has the dimensions of 175 mm × 130 mm × 10 mm. A semi-closed space is allocated on top of the chassis for the microcontroller. This central arrangement is better for routing the wires to the other components and for providing a convenient access to the user to give manual input and to read the LCD output of the microcontroller. The approximate dimensions of the motor amplifiers (DEC 70/10 4-Q-EC Amplifier) are 120 mm × 103 mm × 27 mm. Due to space constraints, motor amplifiers are placed on two appendage structures attached to two sides of the chassis. 107 For the placement of the Li-Po batteries as the portable power source, a hanger is designed which is rigidly below the chassis to securely contain the Li-Po batteries. The custom-made PCBs are placed on top of the chassis and are exposed to the outside environment. The overall arrangement is shown in Fig. 3.2. This design serves the purpose as a robust platform for this research. Figure 3.2: Mechanism & Component Placement 3.2.2 Material Selection The material for the structures of chassis and pendulum is chosen to be 6061 aluminium alloy. This is due to its following desirable properties. 1. Low mass density: The mass density of 6061 aluminium alloy is 2700 kg/m3 which 108 is considerably lower than the mass densities of other common metals such as plain carbon steel (7800 kg/m3 ) and titanium Ti-8Mn, annealed (4730 kg/m3 ) [40]. Therefore, it can make the structure lightweight. 2. High strength: The elastic modulus and tensile strength of 6061 aluminium alloy is 69 GN/m2 and 124,084,000 N/m2 respectively [40]. Compared to other metals, these parameters are lower, but they are much higher than other non-metallic materials. 3. Low cost and wide availability: 6061 aluminium alloy is readily supplied by professional mechanical contractors and workshops in Singapore. Therefore, its price is relatively low. 4. Good manufacturability: Several manufacturing techniques can be applied to form, shape and join 6061 aluminium alloy. Therefore, there are fewer manufacturing constraints and the fabrication cost can be kept low. Other materials such as wood, steel, titanium and acrylic are also given some consideration before choosing this particular alloy. Wood has low mass density, but it has low strength and durability [17]. Steel has very good strength and durability, but this comes at the cost of high mass density. Titanium has remarkable strength and moderate mass density, but its price is extremely expensive. In addition, titanium is rarely supplied by local mechanical contractors and workshops in Singapore. Acrylic is lightweight, but its strength and durability are not very good. In conclusion, aluminium alloy provides 109 the best trade-off in terms of mass density, strength, cost and manufacturability, and, therefore, it is the material of choice for the ALP Cycle’s structure. In the fabrication process, the structure is black anodised to give three benefits. Firstly, black anodised aluminium alloy has higher corrosion resistance. Secondly, the surface of black anodised aluminium alloy is non-conductive, so it provides some protection from accidental short circuit. Lastly, the structure made of black anodised aluminium alloy has more professional and aesthetic appearance, so it is more presentable for presentation and exhibition. 3.2.3 Selection of Wheel The wheel diameter is determined from the chosen wheel motor set which has a total length of 173.3 mm. In order to allow ALP Cycle to lean sidewards at maximum of 450 without the wheel motor set touching the ground, the wheel must have a radius of 173.3 mm. Therefore, the wheel diameter is designed to be 346.6 mm. As the wheel with the specified diameter is unavailable in Singapore, a 300 mm-diameter pneumatic wheel is chosen instead. With this diameter, the maximum lateral lean angle α before the wheel actuator touches the ground is calculated as followed. max(|α|) = 900 − arc tan( 346.6 mm ) = 40.880 300 mm The maximum lateral lean angle is deemed acceptable. A bicycle wheel consisting of steel hub and pneumatic rubber tyre is used. It has an axle attached with two ball bearings, one on each side. The wheel is shown in Fig. 3.3. 110 Figure 3.3: Selected Wheel for ALP Cycle 3.2.4 Design of Chassis The chassis and pendulum are carefully designed in detail in SolidWorks. SolidWorks is an advanced computer-aided design software which provides a powerful virtual environment for the design, evaluation and animation of mechanical structure. Therefore, it is adopted in this research for designing and analysing the structure of ALP Cycle. The chassis design follows the modular-design concept, in which, it is designed to be an assembly of several simpler parts which can be easily replaced if some improvement is to be made. Therefore, should the need arise, future improvement and modification can be done by redesigning and refabricating a particular part, instead of refabricating the whole structure. 111 tions namely user-interface (UI) function, incremental-rotary-encoder (IRE) function, feedback-control (FC) function and actuation-system (AS) function, and two subroutines namely hardware-setting (HS) subroutine and inertial-measurement-unit (IMU) subroutine. The structure of the software execution is shown in Algorithm 1. Include all header files; Declare all variables and constants; Set all pins to the required functions by executing HS subroutine; Get user input by executing UI function; Execute main loop; Algorithm 1: Software Execution Structure IRE function, AS function and IMU subroutine interact with IR encoders, motor amplifiers and IMUs through the peripheral functions of RSK2+ for SH7216, which are Multi-Function Timer Pulse Unit (MTU2) and Serical Communication Interface (SCI). MTU2 has six 16-bit timer channels denoted by MTU20, MTU21, MTU22, MTU23, MTU24 and MTU25, the operation modes of which can be configured according to the user’s need. MTU20, configured to normal operation, is used as the system’s main timer. IRE function makes use of MTU21 and MTU22 which are set to phase-counting modes. In this mode, the phase difference of IR encoder’s A-phase and B-phase signals are detected and timer counter is incremented or decremented accordingly. Hence, the angular displacement is detected. AS function uses MTU23 and MTU24, configured in PWM modes, in order to generate PWM signals for wheel and pendulum motor amplifiers respectively. In PWM mode, the desired dutycycle is written to Timer General Register B (TGRB) and the MTU23 or MTU24 will generate the PWM signal accordingly. SCI has 170 four channels denoted by SCI0, SCI1, SCI2 and SCI4. Each channel can be configured to work in either asynchronous mode or clock-synchronous mode. IMU subroutine utilises SCI2 and SCI0, configured in asynchronous mode, to establish serial communications with the chassis and pendulum IMUs respectively. The bit rates of SCI2 and SCI0 are set to 9600 bps. The interconnection between the actuation and sensing systems with RSK2+ for SH7216 is shown in Fig. 5.3. Figure 5.3: Interconnection of RSK2+ for SH7216 with IR Encoders, Motor Amplifiers and IMUs 5.2.1 Inclusion of File Classes At the very beginning of the program, all file classes which are to be used are included. Some of these classes are related to the hardware functioning such as pin addressing, reset function and LCD display, while the others are related to the libraries containing useful functions. In total, there are nine header files which are machine.h, math.h, 171 mathf.h, string.h, iodefine.h, rsksh7216def.h, vect.h, lcd.h and main.h. 5.2.2 Declaration of Variables & Constants After all file classes are included, all variables and constants used in the software are declared and initialised. In total, there are seventeen main variables which are described below with their definitions. Other variables are dummy and used for loop operation and data transfer, so describing them here serves no purpose. • dt: sampling period of the main loop. • time: time reading of the current iteration. • time old: time reading of the previous iteration. • omega: wheel angular position of the current iteration. • omega old: wheel angular position of the previous iteration. • gamma: pendulum angular position of the current iteration. • gamma old: pendulum angular position of the previous iteration. • alpha: lateral lean angular position. • beta: longitudinal lean angular position. • delta: turning angular position. • omegadot: wheel angular speed. 172 • gammadot: pendulum angular speed. • alphadot: lateral lean angular speed. • betadot: longitudinal lean angular speed. • deltadot: turning angular speed. • dutycycle w: dutycycle of the wheel-actuation subsystem. • dutycycle p: dutycycle of the pendulum-actuation subsystem. All of the variables above are of float type and initialised to 0.0. Besides the variables above, the following constants and symbols are defined for ease of software development. • direction w: rotational direction of the wheel-actuation subsystem. • direction p: rotational direction of the pendulum-actuation subsystem. • SW1: user switch 1. • SW2: user switch 2. • SW3: user switch 3. • Kt w: wheel BLDC motor’s torque constant. • Kt p: pendulum BLDC motor’s torque constant. • R w: wheel planetary gearhead’s gear ratio. • R p: pendulum planetary gearhead’s gear ratio. 173 • pi: 3.142. 5.2.3 Hardware-Setting (HS) Subroutine After all variables, constants and symbols are defined and before RSK2+ for SH7216 can be utilised to its fullest capability, all pins which are to be used must be set to the correct functions and all related registers must also be initialised to the correct settings. These actions are performed by the HS subroutine. Settings and initialisations are performed for main-timer operation, PWM signal generation, digital-output generation, phase-counting operation and serial communication. The setting of MTU2 are described below followed by that of SCI. The first step in setting MTU2 is to enable the clock supply to MTU2 by writing 0x58 to CR3 of STB. Next, before the MTU2 setting is changed, MTU2 operation must first be stopped and this is accomplished by the zeroing the Timer Start Register (TSTR). MTU20 is configured as the main timer by the sequential execution of the following steps. • Set the MTU20 to be cleared by TGRA compare match/input capture and set the internal clock to Pφ/64 by writing 0x23 to the Timer Control Register (TCR). • Clear the Timer Counter (TCNT) of MTU20. • Set the registers A, B, C and D of MTU20 to function as output compare registers by clearing the higher byte and lower byte of the Timer I/O Control Register (TIOR). 174 • Initialise the Timer General Register A (TGRA) of MTU20 to 0xFFFF: • Set the operation mode of MTU20 to normal operation by clearing the Timer Mode Register (TMDR). The settings of MTU23 and MTU24 as the PWM generators are elaborated step by step below. • Set the MTU23 and MTU24 to be cleared by TGRA compare match/input capture and set the internal clock to Pφ/4 by writing 0x21 to the corresponding TCR. • Clear the TCNT of MTU23 and MTU24. • Set the registers A, B, C and D of MTU23 and MTU24 to function as output compare registers writing 0x21 and 0x00 respectively to the higher byte and lower byte of the corresponding TIOR. • Initialise the TGRA and Timer General Register B (TGRB) of MTU23 and MTU24 to 0xFFFF. • Set the modes of MTU23 and MTU24 to normal operations by writing 0x02 to the respective TMDR. The settings of the MTU21 and MTU22 as the phase counters are done by the execution the following step-by-step commands. • Set the Timer Output Master Enable Register (TOER) to 0xC2. 175 • Set the modes of the MTU21 and MTU22 to normal operation by setting the respective TMDR to 0x07. • Initialise MTU21’s and MTU22’s TCNTs to 0x0000. • Initialise the TGRAs and TGRBs of MTU21 and MTU22 to 0x0000. • Configure MTU21 and MTU22 to count at rising edge and use the internal clock of Pφ/1 by clearing the respective TCR. • Enable the interrupts for MTU21 and MTU22 by writing 0x33 to the respective TIER. • Set the TGRAs and TGRBs of MTU21 and MTU22 to function as input capture registers by setting the corresponding TIOR to 0x88. The settings of SCI0 and SCI2 for serial communications are performed by first clearing the TE and RE bits of the corresponding SCSCR, then writing 0x5F to the CR5 byte of STB, clearing the corresponding SCTDR and SCSMR bytes, setting the SCSCR bytes to 0x01, followed by writing 0xA2 and 0x31 to the corresponding SCBRR and SCSCR bytes respectively. With the MTU2 and SCI properly configured, the next step is to configure the pins acting as inputs and outputs. The configuration is accomplished by the following steps. • Enable pin of port A (PA6) as input/output and TCLKA as input by writing 0x0040 to PACRL2 and PAIORL. 176 • Enable TCLKD as input by writing 0x0400 to PACRL1. • Enable pin 19 of port A (PA19) as input/ouput by clearing PACRH1 and writing 0x0008 to PAIORH. • Enable TCLKB by setting PBCRL3 to 0x0004. • Enable TCLKC by setting PBCRL2 to 0x4000. • Set pin 12 of port E (PE12) as TIOC4A by writing 0x0004 to PECRL4. • Set pin of port E (PE8) as TIOC3A by writing 0x0004 to PECRL3. • Set pin of port E (PE4) as TIOC1A and pin of port E (PE6) as TIOC2A) by writing 0x4404 to PECRL2. • Set pins and 12 of port E (PE8 and PE12) as outputs and pins and of port E (PE4 and PE6) as inputs by writing 0xFF8F to PEIORL. • Configure SCI0 by writing 0x6 to PC9MD and PC8MD of PCCRL3, and PA9MD of PACRL3. • Configure SCI2 by writing 0x6 to PD3MD and PD2MD of PDCRL1, and PD4MD of PDCRL2. Upon the execution of all commands contained in HS subroutine, the RSK2+ for SH7216 is ready to be used. The registers with their set values are summarised in Table 5.2. 177 Table 5.2: Values of Registers Set by Hardware-Setting Subroutine No. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. Register STB.CR3.BYTE MTU2.TSTR.BYTE MTU20.TCR.BYTE MTU20.TCNT MTU20.TIOR.BYTE.H MTU20.TIOR.BYTE.L MTU20.TGRA MTU20.TMDR.BYTE MTU23.TCR.BYTE MTU24.TCR.BYTE MTU23.TCNT MTU24.TCNT MTU23.TIOR.BYTE.H MTU23.TIOR.BYTE.L MTU24.TIOR.BYTE.H MTU24.TIOR.BYTE.L MTU23.TGRA MTU23.TGRB MTU24.TGRA MTU24.TGRB MTU23.TMDR.BYTE MTU24.TMDR.BYTE MTU2.TOER.BYTE MTU21.TMDR.BYTE MTU22.TMDR.BYTE MTU21.TCNT MTU22.TCNT MTU21.TGRA MTU21.TGRB MTU22.TGRA MTU22.TGRB MTU21.TCR.BYTE MTU22.TCR.BYTE MTU21.TIER.BYTE MTU22.TIER.BYTE Value 0x58 0x00 0x23 0x0000 0x00 0x00 0xFFFF 0x00 0x21 0x21 0x0000 0x0000 0x21 0x00 0x21 0x00 0xFFFF 0xFFFF 0xFFFF 0xFFFF 0x02 0x02 0xC2 0x07 0x07 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x00 0x00 0x33 0x33 No. 36. 37. 38. 39. 40. 41. 42. 43. 44. 45. 46. 47. 48. 49. 50. 51. 52. 53. 54. 55. 56. 57. 58. 59. 60. 61. 62. 63. 64. 65. 66. 67. 68. 69. 178 Register MTU21.TIOR.BYTE MTU22.TIOR.BYTE SCI0.SCSCR.BIT.TE SCI0.SCSCR.BIT.RE SCI2.SCSCR.BIT.TE SCI2.SCSCR.BIT.RE STB.CR5.BYTE SCI0.SCTDR SCI2.SCTDR SCI0.SCSCR.BYTE SCI2.SCSCR.BYTE SCI0.SCSMR.BYTE SCI2.SCSMR.BYTE SCI0.SCBRR SCI2.SCBRR SCI0.SCSCR.BYTE SCI2.SCSCR.BYTE PFC.PACRL2.WORD PFC.PAIORL.WORD PFC.PACRL1.WORD PFC.PACRH1.WORD PFC.PAIORH.WORD PFC.PBCRL3.WORD PFC.PBCRL2.WORD PFC.PECRL4.WORD PFC.PECRL3.WORD PFC.PECRL2.WORD PFC.PEIORL.WORD PFC.PCCRL3.BIT.PC9MD PFC.PCCRL3.BIT.PC8MD PFC.PACRL3.BIT.PA9MD PFC.PDCRL1.BIT.PD3MD PFC.PDCRL1.BIT.PD2MD PFC.PDCRL2.BIT.PD4MD Value 0x88 0x88 0 0 0x5F 0x00 0x00 0x01 0x01 0x00 0x00 0xA2 0xA2 0x31 0x31 0x0040 0x0040 0x0400 0x0000 0x0008 0x0004 0x4000 0x0004 0x0004 0x4404 0xFF8F 0x6 0x6 0x6 0x6 0x6 0x6 5.2.4 User-Interface (UI) Functions The user-interface functions take inputs from the user through the three available switches denoted by SW1, SW2 and SW3. The switches are used for starting the ALP Cycle’s operation, the selection of the controller to be activated and stopping the ALP Cycle’s operation. In the current prototype, there is only one implemented controller at the moment, but more controllers can be added in the future development. For starting the ALP Cycle’s operation and selecting the controller, an algorithm implementing a single while loop which requests an input from SW1 is implemented. For stopping the ALP Cycle’s operation, an algorithm with an if condition requesting input from SW2 is embedded in the main loop which will be described next. 5.2.5 Main Loop The main loop is essentially an infinite loop within which IMU subroutine, IRE function, FC function and AS function are executed. The executions of the all functions and subroutines in the main loop are given by Algorithm 2. while if SW2 is pressed then Display ”Stop Robot” on LCD; else Read IMU data by executing IMU subroutine; Read incremental-rotary-encoder data by executing IRE function; Calculate control torques by executing FC function; Calculate PWM dutycycles and directions by executing AS function; Wait until time = dt; end end Algorithm 2: Main Loop Pseudocode 179 The if-then-else conditional statement is a UI function designed for the ease of experiment handling in case ALP Cycle goes unstable. If SW2 is pressed by the user, the conditional statement will trap the program in an infinite loop which sets the control signals to zero and, hence, ALP Cycle will stop operating. The sampling period is set to 0.04 s and therefore, the control loop runs at this rate. Further reduction of sampling period will cause inconsistent rate at which the control loop runs. This issue is mainly caused by the serial transmissions of data between the computer system and the IMUs. The use of higher-grade IMUs can possibly eliminate this limitation and, hence, improve the overall system performance. This improvement will be considered in the future. 5.2.6 Incremental-Rotary-Encoder (IRE) Functions The IRE functions determine the rotational displacements and speeds of the wheel and pendulum actuation subsystems. The information on the number of pulse read for an interval with one sampling-period duration is used. For the wheel actuation subsystem, the wheel angular position is given by: ω(k)[rad] = × π × M T U 21.T CN T (k) Nw where M T U 21.T CN T (k) is the MTU21 TCNT value at the current iteration (iteration k) and Nw is the counts per turn (CPT) of the wheel IR encoder. The wheel angular speed is calculated by Euler approximation: ω(k)[rad/s] ˙ = [ω(k) − ω(k − 1)] . dt 180 For the pendulum actuation subsystem, the pendulum angular position is given as: γ(k)[rad] = × π × M T U 22.T CN T (k) + γ0 Np where M T U 22.T CN T (k) is the MTU22 TCNT value at the current iteration (iteration k), Np is the counts per turn of the pendulum IR encoder and γ0 is the initial pendulum angular position as measured by the pendulum IMU. The pendulum angular speed is calculated by Euler approximation: γ(k)[rad/s] ˙ = 5.2.7 [γ(k) − γ(k − 1)] . dt Inertial-Measurement-Unit (IMU) Subroutines The IMU subroutines make use of the serial communication ports of the RSK2+ for SH7216 to communicate with the chassis and pendulum IMUs. By sending specific command signals to the IMUs, information on the orientation and orientation rate of the chassis and pendulum can be read. For the chassis IMU, the following data are read and recorded: ˙ • EKF-calibrated longitudinal angular position (β) and angular speed (β), • EKF-calibrated lateral lean angular position (α) and angular speed (α), ˙ ˙ • EKF-calibrated turning angular position (δ) and angular speed (δ). There are three IMU subroutines namely send, receive and wait subroutines. The send subroutine trasmits a series of command packets from the RSK2+ for SH7216 to the IMUs to request for a specific data. The receive subroutine reads a series of data 181 Table 5.3: UART Serial Packet Structure of UM6-LT Orientation Sensor ’s’ ’n’ ’p’ Packet Type (PT) Address Data Bytes (D0 , ., DN −1 ) Checksum Checksum Table 5.4: Packet Type Byte Bit(s) 5-2 Description If the packet contains data, this bit is set. Otherwise, this bit is cleared. If the packet is a batch operation, this bit is set. Otherwise, this bit is cleared. The four bits specify the batch length. They are unused if bit is cleared. Reserved. If the command fails, this bit is set. Otherwise, this bit is cleared. packets coming from the IMUs. The wait subroutine is called from receive subroutine and its function is to keep waiting for all incoming packets to arrive. The packets used in the serial communcation has the structure shown in Table 5.3 [1]. The PT byte specifies whether the operation is a read or write operation and whether it is a batch operation. The function of each bit in PT byte is explained in Table 5.4. For send and receive subroutines, the Address byte specifies the location of the data register to be read. Four addresses which are 0x62, 0x63, 0x5c and 0x5d are read. The two-byte register 0x62 contains the information on the longitudinal lean angular position and the lateral lean angular position as the higher byte and lower byte repsectively. The turning angle is the higher byte of the two-byte register 0x63. The longitudinal lean angular speed and lateral lean angular speed are the higher and lower bytes of the two-byte reigster 0x5c. The turning angle is the higher byte of the two-byte register 0x5d. 182 After the data from the four registers are read, they are multiplied by some constants given in the datasheet to give the values in degree for angular position and degree per second for angular speed. The formula for angular position is: angular position(deg) = 0.0109863 × received data while, for the angular speed, the formula is: angular speed(deg/s) = 0.0610352 × received data. For the pendulum IMU, only the higher bytes of the registers 0x62 and 0x5c are read which correspond to the absolute angular position and speed of the pendulum. This information is used only to complement the pendulum IR encoder in order to enable the accurate determination of the pendulum angular position (γ). 5.2.8 Feedback-Control (FC) Function The FC function takes the readings of the IMUs and IR encoders and use the information to execute the implemented control law, which will be discussed further in Chapter 6. The implementation function for the wheel actuation is given as: ˙ ω). τw = fw (β, β, ˙ The implementation function for the pendulum actuation is given as: τp = fp (α, γ, α, ˙ γ). ˙ 183 5.2.9 Actuation-System (AS) Function The AS function processes the outputs of the FC function to produce the required dutycycles of the PWM signals which are then sent to the motor amplifiers. This function takes into account the gains of the motor amplifiers and BLDC motors. The outputs of the FC function specify the control torques, so they are converted by the AS function into dutycycle information which is used by the MTU2 to produce the required PWM signals. The function for calculating the wheel PWM dutycycle is: dutycycle w = | τw − Qw | × 100% 3.308 V × Gw where Gw and Qw are the gain and offset of the wheel actuation subsystem, and the maximum voltage of the MTU2 PWM is 3.308 V. Based on the experimental results in the previous chapter, Gw = −0.8049 N · m/V and Qw = −0.0985 N · m. Similar function for calculating the pendulum PWM dutycycle is: dutycycle p = | τp − Qp | × 100% 3.308 V × Gp where Gp and Qp are the gain and offset of the pendulum actuation subsystem, and the maximum voltage of the MTU2 PWM is 3.308 V. Based on the experimental results in the previous chapter, Gp = −0.4179 N · m/V and Qp = −0.0508 N · m. 5.3 Conclusions A high-performance computer system which meets the requirements of ALP Cycle is presented in this chapter. The computing hardware is selected according to the consid184 erations of the required features, channel numbers, sampling rate, dimensions and cost. The software of the computer system is written in C language and various algorithms for user interfacing, sensor interfacing, actuator compensating and control are designed and implemented based on the results from the previous chapter. The computer system is the last of all stages that make the development of ALP Cycle prototype complete. The prototype is the first of its kind in National University of Singapore and, to the best of our knowledge, is only the second so far in the world. This prototype is used to test the control scheme developed for ALP Cycle. Implementation results are presented in Chapter 6. 185 [...]... 393 023 and planetary gearhead GP 42 C 20 3 125 The specifications of the selected planetary gearhead and BLDC motor are shown in Tables 4.1 and 4 .2 respectively The chosen BLDC motor, planetary gearhead and incremental rotary encoder are delivered as an assembled set as shown in Fig 4.4 The selection 134 Table 4.1: Data of Wheel Planetary Gearhead (Maxon Gear Planetary Gearhead GP 42 C, Order Number: 20 3 125 )... to actuators, sensors and computer are designed and fabricated 4.1 Actuation System The ALP Cycle’s actuation system comprises two subsystems: (1) wheel-actuation subsystem and (2) pendulum-actuation subsystem Each subsystem is made up of a planetary gearhead, a BLDC motor, a four-quadrant motor amplifier and two ball bearings As shown in Fig 4.1, the wheel-actuation subsystem controls the rotational... Step 7: Calculate the maximum gear ratio as followed 8000 rpm ˆ Rw = = 96.35 83.03 rpm ˆ Select a planetary gearhead with a lower gear ratio which is the closest to Rw The selection falls on planetary gearhead 20 3 125 with the gear ratio (Rw ) of 91 1 32 • Step 8: Check the actual input speed and backlash of the selected gearhead If the maximum input speed is exceeded or the maximum tolerable backlash is... motors and gear trains depend heavily on the intended applications In this particular case, a combination of BLDC motors and planetary gearheads is required to provide sufficient torque at a relatively low speed while having relatively low inertias and dimensions In addition, since ALP Cycle’s 128 motion is harmonic or pendulum-like, it is important that the planetary gearheads used have low backlashes... = 1 .25 × 66. 42 rpm = 83.03 rpm ˆ max max 4 Continuous speed: nw = δw × nw = 1 .25 × 63.67 rpm = 79.59 rpm ˆ con con • Step 5: Based on Maxon Motor catalog [4], find a set of planetary gearheads having maximum torque of 5.15 N · m or more Selection falls on planetary gearhead set GP 42 C • Step 6: Check the maximum input speed of the selected gearhead All GP 42 C planetary gearheads have the same maximum... the Left and Right Axles Attached 3 .2. 4 .2 Placement of Motor Amplifiers and Batteries Due to the limited space available on the main platform, two motor-amplifier holders are designed and attached to the left and right sides of the main platform with M4 screws and nuts On each of these structures, a motor amplifier can be rigidly attached with M3 screws and nuts The two motor-amplifier holders are shown... Maximum torque: τmax = 4. 12 N · m w 2 Continuous torque: τcon = 2. 0 N · m 3 Maximum speed: nw = 66. 42 rpm max 4 Continuous speed: nw = 63.67 rpm con 5 Maximum tolerable backlash: 20 • Step 3: Based on the structural design and logistics, state the maximum total 131 mass, maximum total length and preferred nominal voltage 1 Maximum total mass (gearhead, motor and encoder): mw = 1.5 kg ˆ total ˆ 2 Maximum... 3 .20 122 Figure 3.17: Fabricated Parts of the Chassis - Part 1 Figure 3.18: Fabricated Parts of the Chassis - Part 2 123 Figure 3.19: Fabricated Parts of the Pendulum Figure 3 .20 : Assembled ALP Cycle’s Structure 124 3.4 Conclusions In this chapter, the design and construction of the structural platform of ALP Cycle are presented A lot of attention is given at the design stage to ensure (1) balanced... first and second cases are shown in Figs 4.5 and 4.6 respectively These two simulation cases are used because in the practical experiment, the robot will be released from a nearly upright posture and it will not be expected to lean 136 sidewards at large angle, so the initial condition of α = 50 and the set point of 50 are deemed to be the reasonable values at which the initial lateral lean angle and... BLDC motors and planetary gearheads is based on approximate torque and speed requirements estimated from numerical simulations Because the ALP Cycle is inherently unstable, stabilising controllers are needed to first stabilise the closed-loop system We apply linear quadratic regulators (LQRs) and linear quadratic integral (LQI) controllers, all with identity weighting matrices, as the stabilising controllers . join 6061 aluminium alloy. Therefore, there are fewer manufacturing constraints and the fabrication cost can be kept low. Other materials such as wood, steel, titanium and acrylic are also given. lateral lean angle α before the wheel actuator touches the ground is calculated as followed. max(|α|) = 90 0 − arc tan( 346.6 mm 300 mm ) = 40.88 0 The maximum lateral lean angle is deemed acceptable Two axles, connecting the main platform to the wheel, are anchored to the main platform with M4 screws and 1 12 nuts. Figure 3.5: Main Platform with the Left and Right Axles Attached 3 .2. 4 .2 Placement

Ngày đăng: 09/09/2015, 11:29