You are on page 1of 37

DOCUMENTATION FOR THE BYTRONIC PENDULUM CONTROL SYSTEM

(Version 2.1)

BYTRONIC INTERNATIONAL LTD. The Courtyard Reddicap Trading Estate Sutton Coldfield West Midlands B75 7BU ENGLAND

CONTENTS
PAGE 1. 2.
2.1 2.2

INTRODUCTION GETTING STARTED


Using the PCS1 as an Analogue Control System Using the PCS1 as a Digital Control System

1.1 2.1
2.1 2.3

3. 4. 5.
5.1

TECHNICAL SPECIFICATION CHECKLIST LABWORKS


Labwork 1 - Static and Dynamic Characteristics of the Pendulum Control System 5.1.1 5.1.2 5.1.3 5.1.4 5.1.5 5.1.6 5.1.7 5.1.8 Object Apparatus Carriage Servo Alone Effect of Servo Gain on Hysteresis Transient Response of the Servo Subsystem Modelling of the Carriage Servo Dynamic Model of the Pendulum References

3.1 4.1 5.1


5.3 5.3 5.3 5.3 5.3 5.4 5.4 5.4 5.5 5.7 5.7 5.7 5.7 5.8 5.10 5.11 5.12 5.12 5.12 5.13 5.13 5.14 5.15 5.16 5.16

5.2

Labwork 2 - Analogue Control of an Inverted Pendulum 5.2.1 5.2.2 5.2.3 5.2.4 5.2.5 5.2.6 Introduction - The Control Problem Measurement of the Mass Position Setting up the Pendulum Simulation Using CODAS Stabilisation Using Phase Lead Compensation The Effect of Hysteresis in the Servo Sub-System

5.3

Labwork 3 - Direct Digital Controller Design and Implementation : Inverted Pendulum 5.3.1 5.3.2 5.3.3 Apparatus Introduction Design of a DDC Controller Using a Simplified Model 5.3.3.1 5.3.3.2 5.3.4 5.3.5 5.3.6 Design Criteria and Sample Rate Selection Design of a DDC Controller by Pole Placement

Implementing the Controller Using VICTOR-II Further Work References

PAGE
5.4 Labwork 4 - Direct Digital Controller Design and Implementation : Swinging Crane 5.4.1 5.4.2 5.4.3 5.4.4 5.4.5 5.4.6 5.4.7 Apparatus Introduction Sample Time Selection and Design Objectives Dead-Beat Controller Design Using Simplified Plant Model Procedure Frequency Response of Plant and Compensator Dead-Beat Controller Design Using Plant Model with Damping 5.4.7.1 5.4.7.2 5.4.8 References Ringing Pole Problem Correct Design Approach to Avoid Ringing Pole Problem 5.17 5.17 5.17 5.17 5.19 5.19 5.19 5.20 5.20 5.20 5.20

APPENDICES
Appendix 1 Appendix 2 Appendix 3 Recalibrating the Angle Servo Potentiometer Resetting the "X" Position Potentiometer A1.1 A2.1 A3.1

DIAGRAMS
Figure 1 Figure 2.1 Figure 2.2 Figure 2.3 Figure 3.1 Figure 3.2 Figure 5.1 Figure L1.1 Figure L2.1 Figure L2.2 Figure A2.1 Basic Pendulum Control System Linear Position Controller Connections Inverted Pendulum Compensator MPIBM3 Analogue Channels Circuit Diagram The Header Pin-Out Details The Pendulum Unit Control Console Determination of Mass Position Inverted Pendulum Compensator The Mounting of the X Position Potentiometer 1.1 2.1 2.2 2.4 3.2 3.3 5.2 5.6 5.9 5.11 A2.1

INTRODUCTION
The Bytronic Pendulum Control System (PCS1) is the result of a project collaboration between Bytronic and The Department of Mechanical Engineering, Manchester Metropolitan University, England. The Pendulum Control System (PCS1) may be used in two different modes, either as an inverted pendulum or as an overhead crane. Each mode presents a different and challenging control predicament that requires a different approach and solution. In the first inverted pendulum mode users have the task of controlling an inherently unstable system. In order to balance the pendulum in the inverted position the pivot must be continuously moved to correct the falling pendulum. In simple language, such as trying to vertically balance a broom in your hand.This interesting control problem is fundamentally the same as those involved in rocket or missile propulsion. The rocket has to balance on its engine as it accelerates. As the rocket tends to fall over the engine, thrust must be deflected sideways to restore the rocket's course. In the second mode, the carriage module is turned upside down so that the pendulum acts as a crane. The pendulum swings naturally into an equilibrium position with the centre of mass below the pivot. The problem is now to control the linear position of the load which possesses very oscillatory dynamics. The Pendulum Control System may be used as a stand alone analogue control system or interfaced to an external controller such as a microcomputer. Both of these options are discussed in Section 2. A block diagram of the pendulum control system is shown in Figure 1.

Figure 1

Basic Pendulum Control System


Control Effort Compensator Servo Carriage position, x Pendulum Mass position, y

Reference +

Error

Page 1.1

GETTING STARTED
The PCS1 consists of two separate modules linked by a connecting cable: a Carriage Module and a Control Console. The Carriage Module consists of a carriage that carries a pivoted rod and mass which is driven along a 500mm track by a dc servo motor and toothed belt. The motor has an integral tachometer. In one mode the module behaves as an inverted pendulum but when it is turned upside down, the rod and mass represent the lifting block of an overhead crane. The carriage position and the attitude of the rod/mass assembly are measured by potentiometers. The entire carriage assembly is surrounded by a transparent safety screen and the unit contains its own power supply and servo power amplifier. The Control Console includes a clear mimic diagram of the overall system and connection to the control/measurement signals are via easily accessible 4mm colour coded sockets. The colour coding is as follows Red terminals are analogue inputs and outputs. Blue terminals are monitoring points for feedback signals. Yellow terminals are the compensator connection points. Green connectors are ground. The Pendulum Control System's two modes of operation, namely stand-alone in analogue mode or linked to a computer in digital mode, as discussed in Sections 2.1 and 2.2 respectively. To begin, we recommend that you start with the analogue mode so as to gain understanding of the control problem.

2.1

Using the PCS1 as an Analogue Control System

The following procedure will allow a quick set-up of the PCS1 as a linear position control system and a balancing inverted pendulum. 1. 2. 3. Position the equipment on a desk with the carriage module in the inverted pendulum position (the white plastic base to the bottom of the unit and the motor to your right). Position the set point potentiometer to the middle (0V). With a 4mm lead supplied, connect the set point to the servo amplifier input terminal as shown in Figure 2.1.

Figure 2.1

Linear Position Controller Connections

Page 2.1

4. 5. 6.

Turn on the power. The system is now configured as a linear position controller. The position of the set point potentiometer will determine the position of the carriage assembly along the x axis. To achieve optimum position control, the servo amplifier gain and velocity feedback must be calibrated on the control panel. This procedure is covered in detail in Labwork 1. However, to get the system working, approximate values are maximum for both the servo gain and half setting for velocity feedback. Note - At both ends of the track the carriage is electronically limited to prevent the carriage hitting the end stops.

7. 8.

Now the servo system is set-up we may begin to balance the pendulum. Disconnect the servo input from the set point and temporarily connect this to GND to prevent noise pick-up. To balance the pendulum the variables "a", "gain" and the compensator all need to be designed and calculated. The procedure to do so is discussed in Labwork 1. However, so that you may quickly get the unit operational, follow these approximate control panel settings below a) b) c) d) e) Mass positioned at the top of the rod. Set "a" to 2.7. Set "gain" to 1.2. Switch the gain to negative. To allow quick set-up, compensator components have been supplied with the PCS1. Carefully plug these modules into the compensator yellow 4mm terminals as shown in Figure 2.2.

Figure 2.2

Inverted Pendulum Compensator

9.

Hold the pendulum upright in the centre of the track. Connect the controller output to the servo input using the 4mm connecting lead. Now, gently let go of the pendulum, the pendulum should balance in the centre of the track.

Page 2.2

10.

a) b)

Nudge the balancing weight and see the controller compensate and regain balance. Try adjusting the gain value from zero to 3.0 and find out its effect on the balancing operation.

If the pendulum will not balance with the approximated values, gently move the weight to the upright position, the controller should take over! If not, check all connections and settings, especially the compensator as shown in Figure 2.2. This section has been a simple introduction into the operation of the PCS1 in its analogue control mode. To fully investigate the set-up values and compensator design, please refer to the Labworks.

2.2

Using the PCS1 as a Digital Control System

The PCS1 control module signals are available for use with any external controller via the 4mm connectors. However, the most popular use is likely to be with a PC/Compatible microcomputer. In order to facilitate PC digital control of the PCS1, a socket at the rear of the control module allows the measurement signals to be transmitted directly to a Bytronic AD/DA Interface Board (MPIBM3) located in a PC expansion slot. In addition, the control signal from the PC is also routed via this cable to drive the input of the carriage servo amplifier which, in turn, controls the motor. To achieve digital control of the PCS1 please follow the procedure outlined below 1. 2. 3. 4. Ensure the power to the microcomputer system and the PCS1 are both OFF. Install the IBM3 card into a spare PC expansion slot and set both the ADC and DAC channels to operate on +/-10V bipolar operation, as described in the IBM3 manual. Remove all 4mm cables that may be connected to the control panel. The MPIBM3 card may be connected to the pendulum unit by either a) b) Directly connect the MPIBM3 26 way ribbon cable into the rear of the control console. The MPIBM3 26 way cable may be connected to the MPIBM3A terminal PCB. This will allow more flexible connection of the analogue channels to the pendulum console 4mm terminals. Note - The MPIBM3A terminal PCB must be purchased separately. 5. Power-up the PCS1 and then the microcomputer system. The PCS carriage assembly should position itself in the centre of the track and the microcomputer power-up as normal. If not, power down immediately and check all connections. Run the VICTORII Software to achieve digital control of the pendulum system, following the instructions given in Labwork 3. When using the Bytronic IBM3 card the analogue connections made to the PCS1 are shown in Figure 2.3.

6.

Page 2.3

Figure 2.3

MPIBM3 Analogue Channels


MPIBM3 Analogue Input Channel 0 1 2 3 4 5 6 7 8 Analogue Output Channel DAC 1 DAC 2

Function Position Y Position X Set Point Angle Tachometer Feedback Not Connected Not Connected Not Connected Not Connected Function Carriage Servo Input Not Connected

The IBM3 card analogue input channels and the DAC O/P channels may be viewed using the MPIBM3 interactive program. Please follow the on-screen instructions.

Page 2.4

TECHNICAL SPECIFICATION
Mains Supply Fuses Internal PSU 110V ac or 220-240V ac, depending upon model purchased - see label on the rear of the PCS1. Mains fuses 2 off 5 Amp Control unit 2 off 250mA 20V dc Unregulated 15V dc Regulated 4% 10V dc Regulated Nominal Supply Voltage Maximum Continuous Torque Maximum Peal Torque Motor Voltage Constant Motor Torque Constant Mechanical Time Constant Rotor Inertia Motor Inductance Tacho Assembly Intertia 24V dc 14Ncm 36Ncm 10.3V/1000rpm 9 Ncm/A 20ms 214gcm 5mH 10.5gcm

Servo Motor with Integral Tachometer -

Servo Power Amplifier Belt Belt Tension -

Burr Brown OPA541AP with internal current limit set to 2.0 amps. 10mm wide 5 mm pitch - 1300mm long Kevlar braided timing belt. Adjusted by moving motor unit.

Angle measured using 5K Servo Potentiometer. Position X measured using 5K Multiturn Potentiometer.

Page 3.1

Figure 3.1

Circuit Diagram

Page 3.2

Figure 3.2

The Header Pin-Out Details Connector 1 : 26 Way IDC Microcomputer Header


Function GND Pin 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 Function Position X Position Y Set Point Angle Tacho Feedback

DAC o/p to Limiter as pin 22

Connector 2 : 26 way IDC Inside the Control Console


Function Not Connected -10V -15V GND GND GND Not Connected Set Point o/p IC2 : Amp4 GND GND Demand Output to "A" Pin 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 Function Not Connected +10V +15V GND Servo Input Tacho via 56K Tacho Feedback Angle 0 Position X Limiter Input o/p IC2 : Amp2 Position Y "A" Wiper

Connector 3 : 10 Way IDC Inside the Control Console


Function -10V +10V -20V +20V Servo Input via 47K Pin No. 1 2 3 4 5 6 7 8 9 10 Function Position X Angle 0 Tacho Feedback GND Tacho Input via 56K

Page 3.3

CHECKLIST
Fault
1. No power

Checklist
Is the PCS 1 mains switch illuminated? NO Check the mains fuses in the plug and the PCS1 mains input, replace as necessary. YES Turn the mains OFF and check the internal fuses on the power supply board and in the control module. Follow the stand-alone analogue controller procedure in Section 2.1 If the pendulum will still not balance then the feedback signals may be at error. Connect a DVM to the angle 4mm terminals on the control panel. Check the range is approximately +1.75V to -1.75V. It is most important that with the pendulum upright the voltage is 0V. If not, refer to Appendix 1 re-calibrating the angle servo potentiometer. Check your controller settings and compensator components are all correct. Gently move the pendulum from the corner, the carriage should move out to try and regain balance. Check the set-up of the servo amplifier. Is the "servo gain" and "velocity feedback" set correctly? Refer to Section 2.1 Check the "a" value make sure that the "gain" is not too large (range 1.0 to 2.0 approx.). Have you left a 4mm lead with one end connected to the servo input and the other end floating free? If so, connect this to GND to prevent noise pick-up. Turn the power OFF and slide the carriage assembly by hand. Check the assembly is easy running with no mechanical obstructions or tight spots. Connect a DVM to the control panel signal "x". With the system powered-up, connect the set-point to the servo input. Slide the set point to position the carriage assembly. The voltage at x should be 0V at the centre of the track, +ve to your right and -ve to your left. They should be approximately equal, say +/- 8V. If they are not approximately equal then the x multi-turn potentiometer may have slipped position. Please refer to Appendix 2.

2.

The unit is powered up but the pendulum will not balance

3.

The carriage assembly is locked at one end of the track by the servo motor. The pendulum is balancing but is very unstable.

4.

5. 6. 7.

The motor is humming. The carriage response is very slow, the motor seems as though it is stalling. The carriage assembly is hitting the end stops.

Page 4.1

8.

Digital control can not be achieved.

Check that the connection between the PCS1 and the MPIBM3 card is correct. Check all 4mm cables are removed from the control panel. Check that the VICTORII software is configured correctly. Check all of your control parameters, especially the gain polarity. Check that the interface MPIBM3 ADC and DAC channels are configured for +/- 10V Bipolar operation.

If a problem persists, please do not hesitate in contacting either Bytronics direct or one of our distributors.

Page 4.2

LABWORKS
The following labworks begin by familiarisation of the Pendulum Control Unit and its dynamic characteristics. As the labworks progress, the cover the control of the pendulum control unit by both analogue and direct digital control methods. As a part of the labworks' various monitoring, interconnections will need to be made on the control console. To ease the understanding, we have referred to the 4mm terminals and the control knobs as shown in Figure 5.1. The labworks do assume some control theory knowledge. We feel the labworks are best supported by the CODASII simulation software and the Control System Design and Simulation text book, bibliography ref. 1. When the Pendulum Control Unit is linked to an IBM.PC to achieve Direct Digital Control, the Virtual Instrument Control Software (VICTORII) package offers unequalled flexibility in the control of the PCS1. Both CODASII and VICTORII are available in single and multi-user licences from Bytronics.

Page 5.1

Figure 5.1 The Pendulum Unit Control Console

Page 5.2

5.1

Labwork 1 Static and Dynamic Characteristics of the Pendulum Control System (PCS1)

5.1.1 Object In this experiment you will 1. 2. 3. Familiarise yourself with the PCS1 rig Examine the characteristics of the carriage servo. Tune its gain and the degree of velocity feedback to optimise its performance. Obtain a dynamic model of the servo. Examine the dynamic characteristics of the pendulum and hence model it dynamically

5.1.2 Apparatus Two voltmeters, Signal Generator and an Oscilloscope 5.1.3 Carriage Servo Alone Place the rig in the inverted pendulum position and unscrew the pendulum rod. Disconnect all the links on the console. Connect the output of the set-point potentiometer (socket A) to the input of the carriage servo (socket H). Position the set-point potentiometer (P1) so that it is at its mid-range. Adjust the servo gain potentiometer (P3) and the velocity feedback potentiometer (P4) so that they are about mid-range. Switch on the power to the apparatus. Move the set-point potentiometer to and fro and observe the carriage change its position. Using the two voltmeters, measure the set-point voltage and the carriage position voltage, Vx, (socket J). Increase the set-point voltage uniformly from 0 to +10V and then back down to -10V and finally back to 0V in steps of 2V and plot a graph of the servo position against set-point voltage. Make sure that you always move the pot in the required sense. If you move it too far one way, move the set-point potentiometer back and then approach the required value slowly. a) b) c) What is the useful linear range of the carriage servo? What is the hysteresis of the carriage servo expressed in volts? What is the sensitivity of the carriage servo expressed in volts/volt?

The non-linear behaviour (clipping characteristic) has been introduced deliberately to prevent the carriage hitting the end stops too hard and so damaging the rig. 5.1.4 Effect of Servo Gain on Hysteresis Disconnect the servo input (socket H) from the set-point potentiometer and connect the servo input to ground. Push the carriage to the right with your hand and gently release it. Make a note of the carriage position voltage. Repeat, pushing the carriage in the opposite direction and letting it go again. Hence calculate the hysteresis of the carriage servo in volts. Compare this figure with that obtained above in 3b. Reduce the servo gain pot to about 25% of its range and repeat the test. Finally put the servo gain to maximum and measure the carriage hysteresis once more. What conclusion do you draw about the effect of servo gain on the amount of hysteresis present in the carriage servo? Can you explain the reason for your observation?

Page 5.3

5.1.5 Transient Response of the Servo Subsystem Reduce the velocity feedback to zero. Use a signal generator to apply a +1V square wave of frequency 1Hz to the input of the carriage servo. Observe the carriage position on an oscilloscope (socket J). Adjust the servo gain until the response shows a small overshoot of about 15% (damping ratio of about 0.7). Now increase the servo gain to a maximum and adjust the velocity feedback pot (P4) so that the response is similar to the one observed previously. Which of these modes of operation is preferable? Explain your reasons. From now on leave the gain of the carriage servo at a maximum and the amount of velocity feedback at the value that produced a step response with a slight overshoot. 5.1.6 Modelling of the Carriage Servo In this experiment we will obtain a transfer function of the carriage servo. To do this properly, you really needs a frequency response analyser, but the method described here is a simple method for obtaining an approximate second order model. First we are going to determine the bandwidth of the carriage servo. Apply a 1 Hz sinusoidal signal with a peak to peak amplitude of 1 volt to the input of the servo (socket H). Observe the carriage position voltage on an oscilloscope. You may see a slight distortion because of the hysteresis that is present, but the amplitude will be nearly the same as the applied signal, ie the servo-subsystem has unity low frequency gain which confirms the result obtained in 5.1.3c. Increase the frequency of the applied signal until the observed voltage has reduced to 0.7V, ie 1 2 of the low frequency value. The frequency at which this occurs is the bandwidth of the system b. For a system with a damping ratio of 0.7, the natural frequency, n, is equal to the bandwidth. Based on this approximation, calculate the natural frequency, n. (Don't forget to work in rad/s). Hence deduce the transfer function of the servo-subsystem assuming that the damping ratio is 0.7 As an example, a system whose bandwidth is 9.6Hz and a damping ratio of 0.7 has the approximate transfer function G( s ) = 1 1 + 0 . 023s + 0 . 00027s 2

5.1.7 Dynamic Model of the Pendulum In this part of the experiment we will model the dynamic behaviour of the "pendulum". We shall do this by observing the transient response of the system from an initial value. This really requires a storage 'scope or a pen-recorder, but if VICTOR-II* is available, it can be used like a storage oscilloscope with a digitising cursor. Before fitting the pendulum rod into the carriage, position the mass at the end of the rod. Estimate the position of the centre of mass of the rod/mass assembly by trying to balance it on your finger. (The centre of mass is located just below the bottom of the mass.) We shall call this length, the effective pendulum length, L. Screw the pendulum rod firmly into the carriage. Tip the rig upside down so that it is in the "crane" position. Connect the pendulum angle signal, V, to the oscilloscope. If VICTOR-II is being used to monitor the angle as the measured value, (analogue channel 3). Select a sample time of 0.0137s for maximum resolution (Controller menu <F3>).

Page 5.4

Displace the pendulum by about 30o, release it and record the transient response. After about 20 cycles freeze the display. Estimate the period of oscillation, T, and the logarithmic decrement using equation 1 (see ref 1, pg 73 and pg 80). The value of the period obtained can be calculated theoretically from the basic dynamics of a simple pendulum. The well known formula for the period is 2 L g , where L is the effective length of the pendulum (ie from the pivot to the centre of mass). Do this calculation using the effective centre of mass obtained earlier and compare the period obtained with that observed experimentally. The logarithmic decrement, , is defined as = ln(mk/mk+2) (1)

where mk is the magnitude of the kth overshoot. From the logarithmic decrement, , the damping ratio, may be calculated using the formula damping r atio = + 42
2

(2)

This system is very lightly damped, so in order to arrive at a figure for the damping ratio, it is best to plot a graph of ln(mk) versus k. Use the cursor to extract data from the frozen display in the VICTOR recorder window. The logarithmic decrement, , is twice the slope of the graph. Suppose for example the logarithmic decrement is 0.02, then the damping ratio figure works out to be 0.0033. You may need to modify the damping ratio figure slightly to obtain a better overall fit to the observed response. From the period, T, the natural frequency can be deduced assuming that the damping ratio is very small, ie n ~ 2/T. Suppose, T is 1.02s, then n is approximately 6.16 rad/s. Thus, with a natural frequency value of 6.16 rad/s and a damping ratio figure of 0.0033, the pendulum can be modelled approximately as a second order system G( s ) = 1 1 = 2 1 2 1 + 0. 0011s + 0 . 0264s 2 1+ s+ s n n2

Use CODAS to compare the response of the model with that of the actual system. To do this, enter the transfer function of the system, switch to open-loop, define an initial condition of unity (<Z>) and choose a user defined input of 0. Figure 1.1 shows the trace obtained. * VICTOR-II Virtual Instrument Controller software package. 5.1.8 References Ref 1 - Golten JW, Verwer AA, "Control System Design and Simulation", McGraw Hill, 1991

Page 5.5

Figure L1.1

Page 5.6

5.2

Labwork 2 Analogue Control of an Inverted Pendulum

5.2.1 Introduction - The Control Problem A simple pendulum swings naturally into an equilibrium position with the centre of mass below the pivot. In order to balance the pendulum in an inverted position the pivot must be continuously moved to correct the falling pendulum. This interesting control problem is fundamentally the same as that involved in rocket or missile propulsion. The rocket has to balance on its engine as it is accelerated. As the rocket tends to fall over the engine thrust must be deflected sideways to restore its course. This exercise is concerned with the stabilisation of the PCS1 apparatus when operating as an inverted pendulum. 5.2.2 Measurement of the Mass Position The controlled variable in this system is the position of the pendulum mass, y. Unfortunately y cannot be directly measured but it can be calculated simply from the measurements and x as y = x + L sin (see Figure L2.1). For small angles the above equation approximates to yx+L The voltage from the pendulum potentiometer, V is scaled by a factor 'a' (potentiometer P5), and added, by means of an operational amplifier circuit, to the voltage from the carriage potentiometer, Vx, to give Vy = Vx + aV The factor 'a' can be adjusted (potentiometer P5) to take account of various pendulum lengths, L. 5.2.3 Setting up the Pendulum Disconnect all the leads from the PCS1 console including the 25 way cable. Make sure that the carriage servo gain is at a maximum and the velocity feedback potentiometer is at the value determined in Labwork 1. Also ensure that the mass on the pendulum rod is in the same position as in Labwork 1. Connect the set-point pot to the carriage servo input and check that the servo is working. Position the carriage near the centre of the track and screw the pendulum rod into its pivot. Support the pendulum in an upright position by putting the threaded knob through the front panel and locating the end of the rod into the clearance hole machined in the pendulum weight. Tighten the wing nut onto the inside face of the front panel to remove any slackness. With the rod/mass assembly held steady at its centre of gravity gently move the carriage from side to side using the set-point potentiometer. Monitor the voltage Vy (socket L). As this voltage represents the position of the mass, it should not vary as the carriage moves. By trial and error find a value for 'a' which minimises the variation in the calculated value of y. Do this test with great care, make a note of the setting and lock the potentiometer in this position.

Page 5.7

5.2.4 Simulation Using CODAS Initially we will neglect the dynamics of the carriage servo, ie assume that its response time is very fast in comparison with the pendulum. The inverted pendulum can be linearised and modelled by the transfer function Y ( s) = X 1 1 s2 n2

where n is the natural frequency in rad/s determined experimentally in Labwork 1. See the case study no. 2 in ref 1 pgs 198 et seq. This equation is explained on pg 200. There we have Y 1 ( s) = X 1 d2 s 2 where d =l/g. The natural frequency of the pendulum is n, which is equal to 2/T, where T is the period of the pendulum. On Page 5.5 of this manual we state that the period is 2 l g , hence n = 2 2 l g = gl= 1 d2

Enter the transfer function into CODAS as Gp(s). For example, if n is 6.16 rad/s, the transfer function is entered into CODAS as Gp ( s ) = 1 1 0 . 0264s 2

Examine the s-plane pole/zero pattern and confirm that the open loop transfer function predicts instability. Plot the root locus diagram for both positive and negative gains (set K to any negative value to obtain the latter). Comment on the possibility of stabilisation using proportional control. Predict the form of closedloop step response with proportional gains of -0.5, -1.0 and -2.0. Check your predictions using the time domain environment of CODAS. Note the frequency of any oscillatory behaviour. We will now try out proportional control on the PCS1 unit with negative gain. Switch off the power amplifier and connect the set-point potentiometer as a reference voltage to the overall inverted pendulum control system (link sockets A and B). Set-up the compensator as a unity gain inverting amplifier, i.e. put a 100K resistor across terminals D and a 100K resistor across terminals F. Connect the output of the operational amplifier directly to the servo reference input (link sockets G and H). Make sure the gain switch is set to negative. Support the pendulum by hand and with the gain potentiometer, P2, set to zero, switch on the power amplifier. You may need to adjust the set-point pot to bring the carriage into the centre of the rig. Slowly increase the gain and observe the carriage action as you move the pendulum to one side. Do not release the pendulum completely because proportional control cannot stabilise this system. Compare the behaviour of the system with different gains with that predicted by CODAS. Note particularly the behaviour with the gain set at unity.

Page 5.8

Figure L2.1 Determination of Mass Position

y = x + L sin

Centre Line

Page 5.9

5.2.5

Stabilisation Using Phase Lead Compensation It suggests a

The choice and design of the compensator is disucussed in depth in ref 1 pg 201. compensator of the form Gc (s) = 1 + ds 1 + d 10 s

(see ref 1 figure 6.22). For the Bytronic Pendulum d =

0.2 = 0.14 9.81

The actual compensator recommended simply uses round numbers. It is not suggested that this compensator is in anyway "optimum". Better compensators may be designed using the methodology described in the case study. The operational amplifier on the console can be used to implement a phase lead compensator (Figure L2.2). We will use the compensator Gc ( s ) = 1 + 0 .1s 1 + 0. 01s

Add this compensator to the CODAS simulation and plot the new root locus. Can the system now be stabilised? What value of gain will result in a stable closed-loop system? Choose a gain which gives the closed-loop system dominant poles a reasonable damping ratio. Obtain a simulation of the system step response with this value of gain. "Link between Gc(s) and op amp circuit". In general for an op amp circuit V0 Z = f V1 Z1 Where Zf is the feedback impedance round op amp and Z1 is the impedance between the input voltage V1 and the summing junction. For a parallel circuit consisting of a resistance, R, and a capacitance, C 1 + RC1s 1 1 = + C1s = Z1 R R and 1 + RC f s 1 1 = + Cf s = Zf R R Vo 1 + RC1s = V1 1 + RC f s RC1 = 100 x 103 x 10-6 = 0.1 second RCf = 100 x 103 x 0.1 x 10-6 = 0.01 second Vo 1 + 0.1s = V1 1 + 0.01s

Thus Now

Hence

Page 5.10

Add the compensator components as shown in Figure L2.2.

Figure L2.2 Inverted Pendulum Compensator

Note - Ready-built compensator parts are supplied with the pendulum unit for this purpose. Once more support the pendulum by hand and with the gain 'K' set to zero switch on the power amplifier. Slowly increase the gain until the pendulum balances itself. Make a note of this critical value of gain. Increase the gain to the value determined from CODAS and observe the response. Try gently altering the set-point value to make the pendulum move along the track. Try gently tapping the pendulum to knock it over. Note - Very small adjustments in the value of 'a' (pot P5) can have a significant effect. If you have difficulty in balancing the pendulum, try adjusting the 'a' pot slightly. 5.2.6 The Effect of Hysteresis in the Servo Sub-System The CODAS simulation predicts a stable response for the compensated system, however you will no doubt have noticed the servo continuously hunting from side to side. This behaviour is due to hysteresis in the carriage servo. The effects of hysteresis will be covered in some detail in a later labwork.

Page 5.11

5.3
5.3.1

Labwork 3 Direct Digital Controller Design and Implementation: Inverted Pendulum


Apparatus

PCS1 apparatus, CODAS-II, Victor-II and Analogue I/O card 5.3.2 Introduction

Balancing the inverted pendulum using a direct digital controller is by no means a trivial exercise, either from the point of view of design or implementation. In order to do this labwork completely you will need access to the CODAS-II package and VICTOR-II software with an analogue I/O capability. It is possible, however, to do this experiment without CODAS-II and just accept the designs obtained. However some CACSD (Computer aided control system design) package is required if modifications are to be made to the controller design. VICTOR-II allows controllers to be implemented very simply by selecting the DDC mode of operation, defining the sample time and entering the z-domain transfer function of the compensator. VICTOR-II or another on-line control package facilitates the experiments that follow in this labwork. The alternative is to write a real-time program to implement difference equations. It is reasonably straightforward to write a simple program, in say PASCAL, that implements a control strategy defined in terms of difference equations. It should be pointed out that the controllers used in this labwork were designed using pole placement methods described in ref 1, chapter 9. However because of the complexity of the dynamics of the rig, hand methods are not really possible. However, one example of a design based on a simplified model ignoring servo dynamics and damping is included for interest. The inverted pendulum controller design is particularly difficult because the model obtained experimentally describes the large signal behaviour of the system. However, near the point of balance, it is the small signal behaviour that is significant. In this system factors such as friction and stiction are more pronounced when the pendulum is nearly balanced (ie stationary) than when it is swinging. Thus the model used for design is not the one that describes the behaviour well near the normal operating point. This is rather different from process control situations where the small signal behaviour is less affected by the type of non-linearities generally present in such systems. Thus in designing the controller a very conservative approach must be adopted and the rules derived for well behaved linear systems must be interpreted with a healthy scepticism and invariably some trial and error is necessary to arrive at a workable robust solution.

Page 5.12

5.3.3

Design of a DDC Controller Using a Simplified Model 5.3.3.1 Design Criteria and Sample Rate Selection. In this exercise we shall design a z-domain compensator using a simplified model of the inverted pendulum in order to show the approach. The servo dynamics and any damping in the pendulum pivot are neglected, ie the plant dynamics can adequately be described as Gp( s ) = 1 1 s2 n2

For the purpose of this exercise a natural frequency of 6.16 rad/s will be assumed, ie a period of just over 1 second. The key decisions that must be made are the desired closed-loop behaviour and the sample time. These two factors, however, are not wholly independent. Guidelines for sample selection are outlined in ref 1, chapter 6, pgs 318-319. As the open loop system is second order, it is not unreasonable to demand that the underlying dynamics of the closed-loop system should also be second order. However, experience shows that for this difficult problem, the requirement for the closed-loop dynamics should be relaxed further. The controller that results by demanding second order closed-loop dynamics produces a rather violent control action that is sensitive to modelling errors and may not achieve balance. In order to achieve a more robust control system, the target closed-loop dynamics will be specified as third order. For simplicity we will choose a characteristic equation with repeated roots. Now a third order system with three identical lags of 0.25s has a 5% settling time of 1.5s which is a reasonable specification for the system considering the underlying dynamics of the pendulum. As well as the dynamic design criterion, a target must be set for the steady-state performance of the control system. In the analogue design, a Type 0 phase advance compensator was employed. With this compensator a forward gain of -3 was just achievable, ie a steady-state closed-loop gain of 1.5, ie steady state gain = K 3 = = 1. 5 1+ K 1 3

For the DDC controller, however, we will specify steady-state set-point following, ie unity closedloop gain (F(1)=1). The guidelines for sample time selection for DDC controllers in ref 1 suggest that the sampling frequency, fs, should exceed about 20fb (where fb is the closed loop bandwidth). Now a system with three repeated lags of time constant, , has a -3dB bandwidth of about 0.08/ Hz. Thus the target closed-loop bandwidth is about 0.32Hz. Hence the sampling frequency should exceed 6.4Hz (150ms sample time). Too high a sampling rate causes real s-plane poles to be bunched very close to z=1 in the z-plane.

Page 5.13

Ref 1 recommends that the sampling frequency should be less than 50/o, where o is the dominant open-loop time constant of the system. Now the system we are dealing with has a pair of real poles at 6.16s-1. Thus fs should be less than 50 x 6.16Hz, ie the sampling frequency should not exceed 310Hz. A certain amount of trial and error is required, but a sampling time is 0.055s (18.2Hz) does produce a working controller and this figure is in agreement with the theoretical limits described above. In the z-domain a time constant of 0.25s maps to the point z = e T on the real axis of the zplane. Thus for a sample-time, T, of 0.055s and a time constant, , of 0.25s, the point on the zplane is z~+0.8. Thus the desired closed-loop characteristic equation is: (z-0.8)3=0 5.3.3.2 Design of a DDC Controller by Pole Placement. The assumed transfer function of the inverted pendulum is Gp( s ) = 1 1 0. 0264s 2

The z-transform of this system including the zero order hold is (ref 1, chapter 8, section 8.8 for theory) Gp (z) = Z

R 1 e | S s | T

sT

1 (1 s n
2 2

( z 1) 1 1 Z 2 z s (1 s ) n 2 0. 058 ( z + 1) ( z 1. 4 )( z 0. 7 )

R | S | T

U | V | W U | V | W

Gp( z ) =

You can get this result using CODAS-II by setting the hold time to 0.055s and pressing <F5>. Alternatively, the result may be obtained using partial fractions and the table of Z transforms on pg 379 of ref 1. See Appendix 3 for details. This open-loop system has an unstable pole at z=+1.4 and a zero on the unit circle. The design procedure described in ref 1, pgs 310-311 requires that (1-F(z)) has a zero of the same value as the unstable pole and also that F(z) incorporates the zero of the open-loop system that lies on the unit circle. Thus the form of the closed-loop transfer function, F(z), will thus be F ( z) = b 0 ( z + 1)( z + b1 ) z( z 0. 8 ) 3

The coefficients b0 and b1 are included to meet all the degrees of freedom required. The value b0 and b1 will be chosen to satisfy the steady-state closed-loop gain criterion (F(1)=1) and the requirement that (1-F(z)) has a zero at z=+1.4.

Page 5.14

The numerator, N(z), of (1-F(z)) is N(z) = z3 - 2.4z2 + 1.92z - 0.512 - b0 (z+1) (z+b1) For a zero at z = 1.4, we must have N(1.4)=0, hence substituting 2.4 b0 (1.4 + b1) = 0.216 The steady-state requirement (F(1)=1) gives the equation 1= 2b o (1+ b1) (1 0.8)3

Solving these two equations simultaneously, one finds that b0 = 0.215 and b1 = -0.9814. Thus F(z) 0.215(z + 1)(z 0.9814) = 1 F( z) (z 3 2.615 z 2 + 1.916 z 0.301) = 0.215(z + 1)( z 0.9814) ( z 1)( z 1.4)(z 0.215)

Since

Gc ( z) =

1 F(z) Gp ( z) 1 F( z) ( z 0.713)(z 0.981) (z 1)( z 0.215)

Gc (z) = 3.7

This controller gives good results, though a slight change in the controller gain, K, may improve matters because of modelling errors. 5.3.4 Implementing the Controller Using VICTOR-II

The above controller is not very robust because it used a simplified model of the pendulum and ignored the servo dynamics, but it should balance it. Connect the 26 way cable from the MPIBM3 card to the PCS1 control module. Unscrew the pendulum rod. Switch on power to the PCS1. Start up VICTOR-II. Switch to DDC mode (Controller menu <F3>). Set the sample time to 0.055s (also in the Controller menu <F3>) and clear the buffer. Select external plant (Plant menu <F4>). Press <U>, and set the manual output to 50%. The carriage should move to the middle. Enter the excitation signal as 5*sin(0.5*t) ie Press <X> and type in above function.

Page 5.15

Press <G>. You should see carriage move to and fro sinusoidally. Select the analogue input channel * using the I/O menu (<F5>). So that the 'y' value is displayed, and adjust 'a' to be the same value as in Labwork 2. (This value is very critical and you may have to tweak it later). You should see the easured value signal appear on display also as a sinewave. Press <G> again to remove excitation. Screw in the pendulum rod firmly with weight at the top. Connect the locating knob to the pendulum mass, this keeps the centre of mass of the rod/mass assembly at the same position irrespective of any movement of the carriage and press <G>. If you have adjusted the 'a' value correctly, the measured value trace should stay horizontal. If not adjust 'a' pot until measured value trace stays horizontal. If necessary you can change recorder vertical scale to increase resolution. Press <G> to remove the excitation signal. Change the set-point to 50% (Press <S> and type in value). Type in the compensator transfer function. Gc (z) = 3.7( z 0.713)(z 0.981) ( z 1)( z 0.215)

You do this in two stages, first press <N> and enter the Numerator, Then press <D> and type in the Denominator. At this stage save data set to file by pressing <F2>, followed by <S> and call it something like "INVP1". Remove the locating knob and hold the mass at the end of the pendulum rod lightly and centre the rod so that the deviation displayed on the VICTOR screen is nearly zero. Lightly hold the pendulum in this position, switch to Auto, ie press <A>, wait for a second or two and release the pendulum. Hopefully it should balance. Experiment gently with the adjustment of the 'a' pot to smooth behaviour. Press <G> to add in the excitation. You can remove it by pressing <G> again. However this is very traumatic because you can introduce a big kick. Try pressing <G> when the set-point displayed in the panel meter is close to 50%. If the thing goes berserk, switch to manual (<M>) and try again. 5.3.5 1. Further Work The above compensator did not take into account the slight damping in the pendulum and ignored the dynamics of the servo. Try the following compensator which was designed taking both factors into account. G c ( z) = 2. 5.3.6 8. 8z( z 0 .72 )( z 0. 94 ) ( z + 0.19 )( z + 0 . 32 )( z 0 . 97 )

Design a compensator neglecting damping and servo dynamics with a sample time of 0.11s. Try it out. References

Ref 1: Golten JW, Verwer AA, "Control System Design and Simulation", McGraw Hill, 1991

Page 5.16

5.4
5.4.1

Labwork 4 Direct Digital Controller Design and Implementation: Swinging Crane


Apparatus

PCS1 apparatus, CODAS-II, Victor-II and Analogue I/O card 5.4.2 Introduction

When the PCS1 carriage module is inverted, ie in the crane position, the apparatus mimics an overhead crane or a grab. In practice the grab is moved out over the material/goods to be raised, the grab is then lowered and then raise the material. The problem is that if the top of the grab is moved suddenly, the other end starts to swing violently and it takes a long time before the oscillations have died away and the material can be hoisted safely. The object of this labwork is to devise a control law that will allow the grab to reach a steady-state as fast as possible after a demand change in its horizontal position. The dynamics of the system are essentially those of a pendulum and because of the very low damping, the system shows a pronounced resonance at the natural frequency of the rod/mass combination. Conventional analogue control of such a system using lead or lag compensators is very difficult. The best approach is to use a 'notch' filter, ie a filter that has a anti-resonance. By placing the notch near the natural frequency of the 'crane', the overall frequency response characteristic is smoothed out and then a simple compensator can be employed to satisfy the design criteria. However this approach will not be pursued here and it is left for students to explore this method for themselves. Rather than attempt to control the system using analogue methods, discrete controllers will be designed and implemented. The nature of the system lends itself very well to such methods which result in simple, robust and effective control, for example - deadbeat controller. 5.4.3 Sample Time Selection and Design Objectives

Many of the arguments regarding sample time selection discussed in Labwork 3 for the inverted pendulum are not applicable for the apparatus in this position. Although the system is very oscillatory, it is stable, and even with a sluggish servo the system can be brought to rest. In the inverted pendulum mode, however, it would not be possible to "catch" the pendulum before it topples over completely if the servo behaviour were too slow or if the sample time were too long. In the case of the crane problem we can design an effective controller with a much slower sampling rate. For this system we can choose a more demanding design objective, ie dead-beat control with steady-state set-point following, ie a compensator with integral action. Dead-beat control brings the system to rest in a finite number of samples. As the system is second order, we can theoretically achieve dead-beat behaviour in two sample intervals. Now, as the system oscillates naturally with a period of 0.94s, it seems natural to try to bring it to rest in a half period. These arguments lead to a sample time of 0.94/4 = 0.235s. In VICTOR-II the nearest sample time one can choose is 0.22s.

Page 5.17

In this application we can neglect the dynamics of the servo as it is so much faster and better behaved than the crane. Furthermore as a first approximation we can neglect the damping in the pendulum. The transfer function relating the centre of mass of the rod/mass assembly to the carriage position is assumed to be Gp ( s ) = 1 1 + s 2 / n2 = 1 1 + 0. 0264s 2

Assuming that n is 6.16 rad/s. Enter this transfer function into CODAS-II and select a sample time of 0.22s. Transform the plant transfer function to the z-domain (<F5>). The resulting pulsed transfer function is approximately Gp (s) = n2 s2 + n2

This is transformed again using CODASII as explained. Alternatively, you can do this by analysis following similar lines to the example done for pg 5.13, ref 1. Gp (z) = Z

R 1 e | S s | T

sT 2

n2 s + n
2

U = z 1ZR 1 | V z |s s + S | | W T
n 2 2

U | V | W

Again a partial fraction is required of the term inside the curly brackets. 1 n2 1 s = 2 2 2 s s + n s s + n2 The Z

l q = z z 1 1z( z cos(+))z 2cos( )z

Gp (z) =

1 2cosz + z 2 ( z 1)( z cos ) 1 2cos( )z + z 2 1 cos + z zcos (1 cos )(z + 1) = 1 2cosz + z 2 1 2cosz + z 2 = T = 6.155 x 0.22 = 1.354 cos = 0.215

For the pendulum

Hence Gp ( z ) = 0.785 ( z +1) 1 0. 43 z + z 2

Select the root-locus domain and you will observe that there are a pair of poles present on the unit-circle. These poles represent the oscillatory dynamics of the pendulum. A sample rate of four times the natural frequency would make these poles on the unit circle pure imaginary.

Page 5.18

5.4.4

Dead-Beat Controller Design Using Simplified Plant Model

To design this compensator, we allow Gc(z) to cancel the two poles on the unit circle. This effectively produces a notch filter that cancels the pendulum resonance (see later). Cancelling the plant zero on the unit circle, would result in a marginally stable controller (pg 311, ref 1). For steady-state set point following, the closed-loop transfer function will be F ( z) = 0 . 5 ( z + 1) z2

The compensator, Gc(z) is given by G c ( z) = Hence G c ( z) = 0. 637 (1 0. 43 z + z2 ) ( z 1)( z + 0 . 5 ) 1 F ( z) Gp 1 F ( z )

Enter the plant and compensator transfer functions into CODAS-II and examine the closed-loop time response. Also examine the control effort (<U>). Save the CODAS model to file as "crane1". 5.4.5 Procedure

Place the PCS1 carriage module into the 'crane' position, ie where the pendulum is hanging down vertically. Connect the 26 way cable to the PCS1 control console. Switch on the power to the PCS1 unit and start up VICTOR-II Select the DDC mode with a sample time of 0.22s. Change the manual output to 40%, the set-point to 40% and the excitation to 20%. Enter the compensator transfer function. Save the settings to a file as "crane1". Before switching to Auto press <G> to remind yourself of how oscillatory this system is. Press <G> again and wait for the system to settle, or stop it swinging with your hand. Now switch VICTOR-II to Auto and repeat. Freeze the display and measure the settling time. Is it the same as the simulation? How does the observed response compare with the simulation? 5.4.6 Frequency Response of Plant and Compensator

Using CODAS-II load the file "crane1". Select the frequency domain <F8> and the Bode Gain View (<V>). Press <F3> to select compensator and the plant. Draw the frequency response of the overall open-loop system. Notice that the curve is smooth with no sharp resonances or anti resonances below the Nyquist frequency. Now press <F4> to look at the plant alone and draw its open-loop frequency response. Now change the plant denominator to unity, bring in the compensator (<F3>). This time when you press <G> you will see the frequency response of the compensator on its own. You will observe that the compensator has an anti-resonance that cancels the plant resonance.

Page 5.19

5.4.7

Dead-Beat Controller Design Using Plant Model with Damping

Modify the plant transfer function in CODAS-II to incorporate damping, ie Gp ( s ) = 1 1 + 0 . 0011s + 0. 0264s 2

In the next sections we shall design a controller that takes into account the damping in the actual system. 5.4.7.1 Ringing Pole Problem When damping is introduced in the plant transfer function, the poles and zeros all move inside the unit circle, ie Gp ( z ) = 0.76(z+0.97) z 0. 41z + 0 . 91
2

If a dead-beat controller is designed using the above model where the zero at z=-0.9 is cancelled, the compensator will have a pole at z=-0.9. The resulting compensator is G c ( z) = 1. 32( z 2 0. 41z + 0. 91) ( z 1)( z + 0. 97 )

Enter the above compensator into VICTOR, make sure the deviation is zero and switch to Auto. Do not at this stage press <G> to excite the system. You will already observe an oscillatory mode occurring even in this quiescent state. We will introduce a step change in the set-point, but be ready to switch back to manual if the oscillations in the rig become too violent. Press <G> now and observe the response. You probably are back in manual by now!. Clearly, cancelling a zero on the real negative axis is not advisable. In fact there is very little advantage to be gained by cancelling any plant zeros at all. 5.4.7.2 Correct Design Approach to Avoid Ringing Pole Problem This time the compensator is designed without cancelling the zero at z=-0.97. The resulting compensator is G c ( z) = 0 . 67 ( z 2 0 . 41z + 0 . 91) ( z 1)( z + 0. 5 )

Try the response with this compensator and compare the results with those obtained with the simpler plant model. Is the behaviour closer to the modelled response?. Try refining the plant model so that the correlation between the actual crane and the simulation is close. 5.4.8 References

Ref 1: Golten JW, Verwer AA, "Control System Design and Simulation", McGraw Hill, 1991

Page 5.20

APPENDICES
APPENDIX 1 RECALIBRATING THE ANGLE SERVO POTENTIOMETER

Connect a DVM to the angle 4mm terminal on the PCS1 control panel. Check that when the pendulum is upright, the voltage is 0V. If the voltage is not 0V then the servo potentiometer in the carriage assembly requires adjustment.

Adjusting the Servo Potentiometer


1. 2. 3. 4. 5. 6. Carefully remove the two M3 retaining screws holding the plastic cover onto the carriage assembly. Gently move the plastic cover off the assembly, exposing the servo potentiometer. Slacken the three servo potentiometer retaining screws. Adjust the servo potentiometer by rotating it so that when the pendulum is vertical, the voltage feedback is 0V. Tighten the three retaining screws and re-check angle . Reassemble the carriage module and test the operation of the unit.

If the problem re-occurs check the tightness of the M3 retaining grub screw which clamps the servo potentiometer shaft.

Page A1.1

APPENDIX 2

RESETTING THE "X" POSITION POTENTIOMETER

Connect a DVM to the control panel signal "x". With the system powered up, connect the set point to the servo input. Slide the set point to position the carriage assembly in the middle of the track (the track is 500mm long). If the voltage at "x" is not 0V then the x position potentiometer needs adjustment. The "x" position potentiometer is located at the non-driven end of the carriage module. The detailed assembly is shown in Figure A2.1.

Figure A2.1 The Mounting of the X Position Potentiometer.

1. 2. 3. 4. 5.

Position the carriage assembly accurately in the centre of the track by sliding the set point potentiometer. Unlock the two retaining grub screws in the flexible coupling Part A, refer to Figure A2.1. Rotate the flexible coupling by hand so as to turn the potentiometer shaft but not the timing gear and carriage assembly. Turn the coupling until 0V is achieved on the DVM. Add a little nut locker (loctite) to the grub screws 'A' and lock up tight. Re-check that the voltage at the centre position is 0V.

Page A2.1

6.

Use the set point potentiometer to move the carriage from one end to the other. The carriage should be electronically limited to stop approximately 15mm short of the end stops. If not, recalibrate the limiter as described below a) b) Remove the four retaining screws on the control panel. Slide the set point to +10V, the carriage should be at the motor end of the track. Trim the multiturn potentiometer on the control pendant PCB labelled 'positive limit', so that the carriage stops short of the end by approximately 15mm. Now repeat the same adjustment for the set point at -10V and trim the multiturn potentiometer labelled 'negative limit'. Re-assemble the control panel.

c) 7.

The carriage should now be correctly calibrated and meet the following criteria a) b) c) With the carriage assembly at the centre of the track, the "x" voltage is 0V. The carriage assembly should stop short of the end stops by approximately 15mm. The x voltage to your right should be +ve and the voltage to your left should be -ve, and both end limits should be approximately equal.

Page A2.2

APPENDIX 3
Consider 1 1 a2 1 s = = s (1 s 2 a2 ) s ( a2 s 2 ) s ( s 2 a2 ) s 2 a2 s 2 s(s a ) +s s a
2 2 2 2

Check

a2 s(s a )
2 2

1 s(1 s 2 a 2 )

Now

1 1 1 + 2 s+a sa

FG H

IJ K
( z 2 + z 1 ) z =z 2 z 2 z z( 1 + b 2 ) + 1 2

Check

1 (s a) + (s + a) s = 2 2 (s + a)(s a) s a2 Z

Consider Where

R 1 + 1 U= z Ss + a s aV z T W b g

+
1

1 = e aT , 2 = e + aT = 2z z ( 1 + 2 / 2) z z( 1 + 2 ) + 1
2

Thus Where

R Ss T

s
2

U = z( z 2) V z z+1 W
2

= 1 + 2 Z

R1 1 U = z | S s (1 s a ) | ( z 1) V | | T W
2 2 2

z( z 2) ( z 2 z + 1) = z 2 z + 1 (z 2 z(1 + 2) + 2 ) z2 z + 1

( z 1) Z z

l q = 1 (zz 1)(z z + 12) =

z + (1 + 2)z + 1 2 z2 z + 1 (1 2)(z + 1) z z+1


2

= Now for inverted pendulum

(z + 1)(1 2) (z 1 )( z 2 )

a = 6.1546, T = 0.055 second, Gp (z) = 0.0574(z + 1) (z 0.712)(z 1.403)

1 = 0.712, 2 = 1.403 = 2.115

Page A3.1

You might also like