Computer Aided Instruction System with an Inverted Pendulum Equipment

Computer Aided Instruction System with an Inverted Pendulum Equipment

Copyright 4~ result Script " Interpreter ( calculation packeges y _----L---_ PC J OOS applications etc. digital control J Fig.3. The configu...

853KB Sizes 0 Downloads 33 Views

Copyright
COMPUTER AIDED INSTRUCTION SYSTEM WITH AN INVERTED PENDULUM EQUIPMENT Hiroyuki Okamoto* and Yasuhiro Ohyama** • JaptDI EM Co.Ltd. Tokyo Developmellt COIfer 2·17 TOIjill'Cho Hachioji. Tokyo. 1172 JAPAN •• Tokyo ElIgilleerillg UlliversityJ)epartmellt of MechalTolIic.f 1404-1 KraJcwa Hachioji.Tokyo.1V2 JAPAN

Abstract. The computer aided instruction system is presented. The developed systems composed of both an authoring system with CAD and a pendulum equipment. The student could study the details of control system's design. for elmlDple. modeling. analysis. design. simulation and digital control through the experiment using pendulum equipment according to the instruction based on the authoring system. Key Words. CAD; Computer-aided instruction; Education; Authoring system; Pendulum equipment

of teaching. to free the instructor from routine work by replacing him in the case of instructing normal problem solving. and to provide the student with freedom to choose the hours of instruction and to perform exercises as often as the student wishes. The developed CAI system with inverted pendulum equipment can free the instructor from routine work and the authoring system LEC is appeared to be useful to construct the instruction of control system experiments.

1 INfRODUcnON This paper presents the computer aided instruction system with inverted pendulum equipment. The inverted pendulum equipment is used in many laboratories in control engineering for investigating the advanced control theory or for studying the elemental feedback control theory. We developed the inverted pendulum equipment for sale several year ago and more than 100 sets are used in japan. Half of them are used for investigating the advanced control theory. for elmlDple. fuzzy control and adaptive control. and latter of them are used for elemental education of the control theory. In latter case. the problem is how to learn the theory by alone because of the lack of instructors and a proper text book. In many text book on control theory. the modeling of the controlled object. the analysis and the synthesis of the control system are written. however a lot of techniques which are not written in the book are necessary in implementing the controller. for example. the interfacing technique between computer and mechanism. the software technique for digital control and the usage of CAD for analysis and synthesis of control system. It is difficult to make a control experiment briefly by only using these books. The objectives of developing the computer-aided interactive instruction system are to improve the effectiveness

2 SYSTEM: CONFIGURATION The developed system is composed of an inverted pendulum equipment. the PC (including AID and P~ndulum

Potensiometer 8 Rail

o Potensiom~r

Carner A

belt

A B

PC9801

Fig. I. Tbe coofiguratioo of aD iovened peodulum

D/A converter interface board). the authoring system called LEC and a text book.

261

the students. The interface of the exercise application consists of Pushbutton, MatrixEditor. TextEditor and graphic object that placed on CRT. MatrixEditor handles matrix data. which is the some function or the usual CAD for control system.

The cart supporting pendulum is driven by timing belt and 25 W DC motor. The position of the cart can be measmed by Potentiometer A and the angle of the pendulum which rotates 360 degrees can be measured by Potentiometer B. These data are give to the PC through AID converter with accurately of 12 bits. The control law is calculated by the PC with NDP, and is put out through D/A cooverter (FlG.l). The operator can exercise the design technique of the control system by the instruction of Authoring system and by executing the control of the inverted pendulum system (FlG.2) The authoring system and the digital control are

COperator:> 4~

result

Script

"

Interpreter ( calculation packeges

y _----L---_ PC

J

OOS applications etc. digital control

J

Fig.3. The configuration of Authoring system

TextEditor handles the string, which edits the script describing the instruction. Pushbutton is used to instruct the handling to the interpreter by clicking. For example, the script for the exercise using bode diagram is shown below, which needs the calculation parameters given by the operator. E.g. start and end frequency and draw explanatory note. The screen that executed this script is shown Fig.4.

Fig.2. The configuration of system executed Wlder MS-ooS.

stage[ area[

3 AUnIORING SYSTEM

bar [{0.0.639 ,399} .bcolor->cyan] puts["BODE DIAGRAM" .orig->{200.1O} fcolor->white] puts ["Transfer Function" .orig->{350,30} fcolor->white] puts["G(s) = 1I2s"2+1.6s+2" .orig->{350.50} fcolor->white] puts["Gain = 20 * 10gI0(IG(jw)I)" .orig->{350.70} fcolor->white]

The authoring system, called lEC, consists of three parts: the script part in which the each exercise applications are written in script language of LEC, the interpreter part which interprets and executes the script, and the calculation part which are composed of many calculation packages ( HG3 ). There are many CAD system for control system, however it is difficult to customize them for authoring system because these are aimed mainly at tools for calculation and simulation for control system's design. LEC can use many calculation programs and digital control programs which are executable on OOS by calling from the interpreter part. Furthennore not only the calling sequence or the data handling but also the instruction buttons on CRT or the explanatory notes can be specified by the script Some basic data handlings. e.g .. plotting data. calculating the pole and zero, solving pole-placement and LQ problem and so on. are installed and executed in the interpreter part. By little change of script. the authoring procedure can be adjusted easily according to the requirements of

] pushbutton[quit. orig->{500.100} title->" Quit " fcolor->black bcolor->cyan] pushbutton[ w=logrange[ st.et,point]; {gain,phase}=bode[p.q.w]; semiplot[w .gain.gridline->{ 1. I} .orig->{2.2.1 } xlabel->"Omega[Hz]" ylabel->"Gain"] semiplot[ w .pah.gridline->{ 1. I} .orig->{2.2,3} xlabel-> "Omega[Hz]" ylabel-> "Phase"]

262

Digital control by using the PC and analysis about the difference between the experimental result and simulation

,0rig->{500.160} title->"BODE" fcolor->black bcoIor->cyan) matedit[ans=st;, st = ans; ,orig->{3SO,lOO} . title->"START FREQ[Hz)" fcolor->black bcoIor->cyan) matedit[ans=et;, et = ans ; ,orig->{3SO,lSO} title-> "END FREQ[Hz]" fcolor->black bcolor->cyan] matedit[ans=point;, point = ans; ,orig->{3SO,200}title->"POINf" fcolor->black bcoIor->cyan]

The following four experiments are available in this system.

E.l Introduction of the control The objectives of this step is to learn the meanings of the feedback control or the relation of the feedback parameters and the closed loop's step response. The control aim is moving the cart of the pendulum system to serve the step reference as fast as possible, which is rather ambiguous than practical use in order to understand the feedback control basis. At first. the feedback parameters are decided by trial and error and the cart is controlled by prepared digital control software. Next, the control phenomenon is explained by its dynamic equation and the stability can be studied by Laplace transformation technique . Lastly. after modelling the system by identifying the parameters. the response difference between the simulation and the experiment are investigated.

4 COURSE EXAMPLE The aim of the course example is to let the student study the structure of the systems and the effect of controller , by means of several theoretical and practical control problem approaches. The five items below have to be learned by the students. (1 )Modelling-l

derivation of the dynamic equation (2)Modelling-2 parameter identification (3)Analysis verification and analysis of the derived model (4)Syntbesis design of regulator or servo system by pole assignment or LQ technique

E.2 Design the control system by state space approach At flfSt the model represented by state space representation is derived from using the result of E 1. Next the controller is designed by pole assignment or LQ technique, and the digital control

(5)Control

Graphic object: in explanation of the transfer function " -

BOrE

Gain

:0

"" "'-

N

...

."

..:, t: !!!

"4

DI~

Transfer Function G(s) = 1~""2+1.6s+2 Gain = 20 • log10(:G(jw):) ISTART FREQ [Hz] I

'f'\.

I CD

I

fND FRE~ [Hz] 1.0000e+ t

I I BODE I

N

.. ~I

." 0.10

1.00

~I

. .., ....,

...

10.00

I)nega [Hz]

Phase

I CD

r--

~OINT

-

).0000e+02

J

r--...

d

I CD

11 I

~

~

.,~ 0.10 !::

[El

I 1. 0000e-01

"1.00

I

MatrixEditor: give frequency and calculation points

"-..

r-- '"10.00

()nega [Hz]

Fig.4 . Example of interface

263

1

V

Pushbutton : return to ooS

Pushbutton : calculate bode diagram

equipment can free the instructor from routine work and the authoring system LEC is appeared to be useful to construct the instruction of control system experiments. In this paper. one example of course is presented. however. several level of course. e.g .• classical control course or Phase compensator course. can be construct using this system. These course can be developed easily by describing the script in this system.

is executed by using the prepared program in which the designed feedback parameters are installed. The control aim is the same as before. The difference of the response between the experiment and the simulation is compared. E.3 Anti-swinging Control of pendulum The objectives of this step is to apply the state space approach to more complicated system. i.e. to stop swinging the hanging pendulum. The student has to exercise the modeling. analysis. synthesis and control by referring the E.2.

6 REFERENCES

(1 )FurutaK. .Ohyama. Y .•Okamoto.H .•Computer Aided Design and Real-Time Control system.IFAC Computer Aided Design in Control Systems.( 1988).415-420

E.4 Stabilizing Control ofpendulum The objectives of this step is to apply the state space approach to the more complicated and more difficult system to control. i.e. to stabilize the inverted pendulum. The student has to exercise the modeling. analysis. synthesis and control by referring the E.3.

(2)Ohyama. Y. (1993). Motor Control Teclmique. Interface. 196. pp. 80-119

The example of the exercise application with this system is shown in Fig.5. The feedback parameters for the state feedback control system can be calculated by clicking "Calc" bunon. The design parameters. matrix Q and R . are given through MatrixEditor. The digital control programs are already installed in the system and the student does not have to pay any anention to it. 5 CONCLUSION The developed CAI system with inverted pendulum

._1 rfO,llator

Des ign 'or Oot

Digital control program

~

I:lo1rix ~II.

r'~~~-~'~~~-~'~~~-!'~----

13

:I~.~t&~tm~:'~m::::

f:i~Dl:w

El

I

eEl

~~.- ; ~,.a l-!~ ..,m: ~.-I

,

I

I

l:-=t~:--c}.~----.-

I:j~~;---~~il~ --c"mr--hlilll -'~~~I

,

-:~'----~--r-~------

-----. E3-

-; ~~~-;i ~H

:-'-Jj~1iIilIIi

Prev bunon

.. \

r l&JO 0 .. 1

ID .. po

1

\

~~

SII'ULATI()Il

r



~

DDDDDD

\

I

I inverted pendulum I

hlysi5 of Chlrecter I~ t ics In thi~ step •• s orePlf.t ,on for .ct.ual ly Oesignirg the control 5yst_ the des i gner r indS out t,.., elWr,cte"s't.cs or the cont.rolled s\ol5l_.re . I so ....,.I ute; the approor l't.eness of the -=del obtalred in the oreviou5 steo. The runct ions reau . red for this step Inc l ude :

cl

0.""'

0.90

lV

!,

..

Next button

f;rtl

I.le

I.n!

-

• Structural anelys i, 0' the '\.I!!tem. Inclu(hng Check 0' the control lab . Ilty end Ob!!Iervllbi Ilty

~

Time[secl

Please press any key .

Simulation bunon

• Si ..1I It ion or steo resporee , oulse re:sOOf"Bll!ll,etc . • Checks of Bode Dlagr ... GerSl'lllOrln's benc! . e tc.

Flg.5. The example of applicauon

264

E!I

6iiiJ -fED

8