You are on page 1of 7

B&R Reaction Wheel Pendulum

Operating Instructions
0DS:WHEEL.00

We reserve the right to change the contents of this document without notice. The information contained herein is believed to be accurate as of the date of publication; however, Bernecker + Rainer Industrie-Elektronik Ges.m.b.H makes no warranty, expressed or implied, with regard to the products contained herein. In addition, Bernecker + Rainer Industrie-Elektronik Ges.m.b.H. shall not be liable in the event of incidental or consequential damages in connection with or resulting from the furnishing, performance, or use of these products. The software names, hardware names, and trademarks used in this document are registered by the respective companies.
Copyright B&R Subject to modifications B&R Reaction Wheel Pendulum - Documentation.doc 13.07.09 1/7

0DS:WHEEL-00 Operating instructions

I Table of contents
1 Introduction ................................................................................................................ 3 2 Requirements ............................................................................................................. 4
2.1 Hardware (included in 0DS:WHEEL set) ..............................................................................................4 2.2 Software (specified version or higher) ..................................................................................................4

3 Commissioning .......................................................................................................... 4 4 Closed loop controller integration using Simulink ................................................. 5


4.1 Interface between Simulink and Automation Studio .............................................................................5

5 Wiring Connector Controller .................................................................................. 6 6 Maintenance................................................................................................................ 6 7 Literature..................................................................................................................... 6

Copyright B&R Subject to modifications B&R Reaction Wheel Pendulum - Documentation.doc

13.07.09 2/7

0DS:WHEEL-00 Operating instructions

1 Introduction
The inverse pendulum is one of the best-known demonstration models for model-based closed loop control technology. As an extended version of the inverse pendulum, the B&R Reaction Wheel Pendulum offers the possibility to practically implement model-based closed loop controllers. Additionally, a simulation model of the closed loop control system from B&R is provided in order to be able to test the functionality of your own closed loop controllers that are already in simulation. The closed loop control system created in Simulink can be implemented on the B&R controller using the B&R Automation Studio Target for Simulink tool with the push of a button.

Copyright B&R Subject to modifications B&R Reaction Wheel Pendulum - Documentation.doc

13.07.09 3/7

0DS:WHEEL-00 Operating instructions

2 Requirements
The following components are required for commissioning and modification of the Reaction Wheel Pendulum demo.

2.1 Hardware (included in 0DS:WHEEL set)


X20CP1484 X20MM2436 0DSWHEEL.00

2.2 Software (specified version or higher)


Pos. 1 2 3 Name B&R Automation Studio B&R Automation Studio Target for Simulink MATLAB R2008b Simulink
1

Version 3.0.71 2.1 7.7 7.2 7.2 5.2 4.1


Table 1: Software requirements

Real-Time Workshop 4

Real-Time Workshop Embedded Coder RealVNC Free Edition


2

3 Commissioning
The following steps must be done when commissioning the Reaction Wheel Pendulum demo: 1. Set up the Reaction Wheel Pendulum on solid ground with sufficient freedom of movement so that the pendulum hangs freely in the vertical direction. (initialization of the home position) 2. Make the connection between B&R controller and the Reaction Wheel Pendulum demo using the cabling that is included 3. Connect power to the controller 4. Establish the network connection with the B&R controller IP address of the controller: 192.168.0.100 5. Make a VNC connection with the B&R using the RealVNC viewer As default, leave the password field blank when making the connection

1 2

http://www.mathworks.com http://www.realvnc.com

Copyright B&R Subject to modifications B&R Reaction Wheel Pendulum - Documentation.doc

13.07.09 4/7

0DS:WHEEL-00 Operating instructions

4 Closed-loop controller integration using Simulink


Knowledge of the training module B&R Automation Studio Target for Simulink (TM140) is required to integrate your own closed loop controller. Additionally, the following Configuration parameters must be set in Simulink for code generation:
1. 2. 3. 4. 5. 6. 7. 8. 9. Solver -> Fixed step size: 0.001 Real-Time Workshop -> B&R Basic Settings -> Automation Studio Project Path: Absolute path to the project Real-Time Workshop -> B&R Basic Settings -> Automation Studio Task Name: Control Real-Time Workshop -> B&R Basic Settings -> Add task to hardware configuration: Checkbox Enable Real-Time Workshop -> B&R Basic Settings -> Automation Studio Configuration Name: Config1484 Real-Time Workshop -> B&R Basic Settings -> Automation Studio PLC Name: PLC1 Real-Time Workshop -> B&R Advanced Settings -> Automation Studio Package Name: Matlab Real-Time Workshop -> B&R Advanced Settings -> Enable continuous time support: Checkbox Enable Real-Time Workshop -> B&R Advanced Settings -> Enable expert mode: Checkbox Disable

10. Real-Time Workshop -> Interface -> absolute time: Checkbox Enable 11. Real-Time Workshop -> Interface -> non-finite numbers: Checkbox Enable

4.1 Interface between Simulink and Automation Studio


The interfaces between the generated closed loop controller and the Automation Studio project are described in the following table:
Name psiIncr phiIncr u Data type Simulink Block LREAL LREAL INT B&R Input B&R Input B&R Output Function Actual position of the pendulum Actual position of the motor (catches counter overflows) Controller output (scaled PWM ratio)
Table 2: Simulink Automation Studio

Scope Global Global Global

Copyright B&R Subject to modifications B&R Reaction Wheel Pendulum - Documentation.doc

13.07.09 5/7

0DS:WHEEL-00 Operating instructions

5 Wiring Connector Controller


The Reaction Wheel Pendulum demo is wired starting with the connection plug. It represents the interface between the mechanical structure and the controller. The wiring of the connection plug and the cable for the Reaction Wheel Pendulum demo is described in the following table.
Plug pin A B C D E F G H J K L M Color Black Red Yellow Green Pink T ur quoise W hite Brown Blue Purple Gray Orange PW M Signal PW M Signal + X 20M M2436 X 20M M2436 23 13 Function Ground 0V Vcc 24V M otor e ncoder A M otor e ncoder B Pend ulum encoder A Pend ulum encoder B Pend ulum encoder R X 20 IO m od ule X 20M M2436 X 20M M2436 X 20M M2436 X 20M M2436 X 20M M2436 X 20M M2436 N ot co nnected T e rm inal (pin no.) 26 25 11 21 12 22

Table 3: Plug pin assignments

6 Maintenance
The mounting screws for the rotor on the motor shaft should be tightened at regular intervals (as needed). These 5 screws are marked with arrows in the following image.

7 Literature
[1] Horn, M. und Dourdoumas, N.: Regelungstechnik - Rechneruntersttzter Entwurf zeitkontinuierlicher und zeitdiskreter Regelkreise, Band 1. Pearson Studium Verlag, Mnchen, Oktober 2003.

Copyright B&R Subject to modifications B&R Reaction Wheel Pendulum - Documentation.doc

13.07.09 6/7

0DS:WHEEL-00 Operating instructions

[2] Obersamer, L..: Mechatronic Systems Control utilizing the Automatic Code Generation for B&R Systems, B&R / FH Salzburg, Salzburg, Juni 2009.

Copyright B&R Subject to modifications B&R Reaction Wheel Pendulum - Documentation.doc

13.07.09 7/7

You might also like