Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Power Manager

Author:
Christian Neukom

Overview

The PowerManagerComponent simulates the process of charging/discharging a single electrical battery. The battery parameters are read from a user specified XML robot description file.

Model Description

The PowerManagerComponent subscribes to the electrical attributes of items belonging to the robot that contains the battery and computes the total load on the battery. At each time step, the remaining battery charge is computed. The battery discharges linearly (e.g. no voltage drop) until its charge is zero. The battery charge can be set through the user interface.

Usage

PowerManagerComponent RobotDescriptionFile RobotName

Parameters

RobotDescriptionFile: The XML description file of the robot that contains the battery information.

RobotName: The robot's ID.

GUI

The GUI of this component displays the battery charge, the nominal voltage (does not change during simulation) and the current load on the battery. The user can set the battery charge at any time during the simulation. If the user tries to set the battery to a value above its capacity or below zero, the value will be clamped to the minimum or maximum value.

PowerManagerGui.jpg

Power Manager GUI panel

Test Program

The test program creates three ElectricInstance's and sets their values. The program stays alive for 30 seconds or for the time the user specifies on the command line.

To run the test program, start an RTI and the following two components:

~MSF/components/power/PowerManagerComponent/*Platform*/MotorCycleWithBattery.xml MotoRob
~MSF/components/manager/*Platform*/SimManager  2
Wait until the above two programs are running, then start advancing the simulation (RUN). Notice the load displaying the value 0.0 and the battery charge stays steady.

Now start the third component:

MSF/components/power/*Platform*/test_PowerManagerComponent [seconds_alive]

Notice that the load is now 6.0 and the battery charge is decreasing.

Files

Code and data of the PowerManagerComponent model reside in the MSF/component/power directory and include the following files:

BatteryParser.[h, cpp]        	// Parses the battery params from the robot description file.
PowerManager.[h, cpp]       	// Power manager model
I_PowerManager.h       	// Power manager interface class.
PowerManagerComponent.cpp	// main program
test_PowerManagerComponent.cpp	// test program
PowerManagerpanel.fl	// Fluid GUI definition 
PowerManagerPanel.h	// GUI interface
MotorCycleWithBatteryt.txt	// Robot description file for testing
PowerManagerComponentDoc.doc	// component documentation in MS-Word format
PowerManagerComponentDoc.pdf	// component documentation in Adobe PDF format

Generated on Thu Apr 7 18:21:15 2005 for MST API by  doxygen 1.4.1