Home
User Manual - Sites at Lafayette
Contents
1. 1 2 6 tail filename This command shows the last 10 lines of the file specified by filename If you add the f option it continues to show the end of the file An example is shown below 1 2 7 apt get install packagename This command is used to install many packages in Ubuntu It normally requires sudo before the command For example if you were to type sudo apt get install randomPackage it would install randomPackage 16 2 Starting Stopping Compiling the Software 2 1 Starting and Stopping Kernel and the Operational State Manager Both Kernel and the Operational State Manager are supposed to automatically start when the FIT PC is turned on You can check if they are running using the ps aux grep Iprds command and looking for Iprdskernd and Iprdsoperd Manually Starting and stopping the Kernel or the Operational State Manager is done using scripts located in the dev init d directory on the FIT PC Always check to make sure they are not running before trying to start either Kernel or the Operational State Manager The command to start the kernel is sudo etc init d Iprdskernd start and the command to the start the Operational State Manager is sudo etc init d Iprdsoperd start Stopping the kernel or Operational State Manager is done through sudo etc init d Iprdskernd stop and sudo etc init d lprdsoperd stop Note Any application including the Operational State Manager must be started after Kernel and must be stop
2. Figure 1 IV Curves for GEPVp 200 MS Solar Panels What are the voltages of the various components of the system such as the PV Array and the batteries Each PV module is capable of providing over 30V in optimal conditions however in nominal conditions each panel will provide approximately 25V for a total series voltage of 250V 64 LiFePO4 are connected in series each having a charged voltage of 3 2V The batteries are connected in series in the ESS rack such that when maintenance is performed on them only four are connected for a maximum voltage of 12 8V per cell When operational and fully charged the entire ESS rack provides about 205V 10Ah or 2kW of power What is the power budget available to both the system and the load The LPRDS BMS provides approximately 75W for system power SC SIB etc and about 2kW for a load 10 4 1 Calibration The various voltage and current sensors used in the LPRDS BMS have been characterized and compensated for offsets and non linearities No additional calibration is required for the system These compensations can be found in the Hardware XML file which is used by SCADA For each sensor a scale and an offset is specified so that the actual voltage or current reading can be found from the equation Value Scale Sensor Reading Offset 5 Maintenance Refer to the Maintenance Manual for proper maintenance procedures not discussed in the User Manual 5 1 Battery Maintenance The b
3. Safety Loop Return Safety Loop HV Isolation Relay Figure 1 Safety Loop Block Diagram As shown in Figure 42 the main logic for the safety interface exists in the RPI but each subsystem is part of the safety loop The ground fault monitor in the RPI operates by monitoring the current on the high voltage lines and detecting a ground fault if the current entering and leaving do not match It opens the safety loop if a ground fault is detected Temperature sensors in each subsystem open automatically when overheated breaking the safety loop Also in each subsystem are controllable relays that can be opened via SW commands allowing SCADA to break the safety loop if it detects unfavorable conditions internal to a subsystem If there are no faults or failures and the safety loop is closed then the Safety 12V created in the RPI is provided to all subsystems Isolation relays are used wherever high voltage is present except in the SC which contains two switches that can also be used to isolate high voltage These high voltage isolation relays are normally open and require the 12V to stay closed Therefore if a fault occurs the safety loop opens stopping delivery of 12V to the high voltage isolation relays and breaking all high voltage connections On the RPI are two buttons one green and one red The red button is a shutdown button that provides a way to open the safety
4. 3 5 Installing MySQL and MySQL oe ceccceccceceseesseeceeseeceeeeecaeceeaaeceeaeeceaeessaaecseaeeceeeeesaeeeeaaeeenees 22 3 6 SUNNY DO A A I A Weather dec eee 23 3 6 1 Using the yasdi bra deste a eee ae ee a LAT ead 23 Sal A eta ee ee EA ee he ie ik ach a sea ea ae TN 23 3 7 1 Viewing the configuration file and the Contents oooonnccnnnccoccnoncnonnnononinnnonononononn nooo ncnnnccnnc ns 23 3 7 2 Starting and Stopping the configuration file ooconconnoninoninanocanoonconnconnocononnoconncnnncnnncnnnannos 24 4 Package A O RT OO 25 1 System Overview The Lafayette Photovoltaic Research and Development System Battery Management System LPRDS BMS is an experimental system that builds off of the work completed in 2009 It uses a photovoltaic array mounted on the roof of the Acopian Engineering Center to provide DC power for storage in a battery array and conversion to AC power by an inverter all housed in AEC 410 A row of outlets in room AEC 400 provides power from the inverter using battery storage or a combination of PV power and batteries depending on the amount of energy required by the load The system is monitored and controlled by the SCADA Interface Box SIB A safety system opens relays in the Raw Power Interface RPI and Switch Controller SC in the event of a system fault A system shutdown can be scheduled through the SCADA system DC power is converted into 120V 60Hz AC power through the Filter amp Inverter Box FIB
5. 5s Maintenance a e a a T a E bee te tena ee 11 5 1 Battery Maintenance vi A a e a a e data 11 6 Schematics Drawit gs 2s2 sist scsseteg ii 12 Appendix A Scada ReadMe rales ii eh a a ae E ER 14 P SCADA SOL Water lists ea lord 14 1 1 Cdi A ete hea eee 14 1 2 Basie Ub nt CommandSwne mmie it A aae de AAA o ATA ave AAA 15 1 2 1 LI ED RIA EE E ER NR 15 1 2 2 a ll e 15 1 2 3 PS 2UX STEP SCOPCHICTIN anrr ssscin ina tiritas 15 1 2 4 MY Jromboc OLLE did 16 1 2 5 s d COMIMONG aaien iee vhs eal aa e e aaa a oea tained eo EEE E kiei aS 16 1 2 6 tal filename nennen ainei a rae ine lee eae i ae 16 1 2 7 apt get install packagename seeeeeeeeeeeeresreeresressereesttssstestesresesttssesrtsstestestesesressestes 16 2 Starting Stopping Compiling the Software sssssssssssssssssesssersseessresstesstesseessesseessessesseesseesseessens 17 2 1 Starting and Stopping Kernel and the Operational State Manager coooconnnnnnnnnnoccnonconncnoncconaconacnno 17 2 2 Starting and Stopping Applications 20 0 0 eccceesceceeeceeseeceeaeceeaeeceeeecsaeceeaaeceeaeectaeeesaeeseaaeeeeees 17 2 3 Compiling the Sottwares Serieen rnei aeneon eE nE RE EE rE EE S TEER E EEES REEERE 17 24 Troubleshooting ii i ar EE EEA EAA EKE E EE AE ia 18 3 Using the Software erpe ti acs E E A E EE a A EE cette e 19 3 1 SoftWare Block Dit lia 19 32 RO E TE 20 3 3 Database ai saci ten ides uses an tte ee tana tea 20 3 4 SOL Commands AAA LE AEN EEE EET BR E L Pgh 21
6. Screenshots Fil Q 4 4 Crop An Ima 9 Icd4linux Iprds c EAS iG The exec expression executes a terminal command and prints the result on the LCD screen at a refresh rate specified by the second argument 3 7 2 Starting and Stopping the configuration file The configuration file mentioned above is currently set to be run on startup so when the fit pc is booted up the layout described in the file will be displayed The startup script led4linux located in the etc init d directory on the FIT PC is responsible for calling the correct commands to configure the layout It has a start and stop command which can be called manually from the terminal by sudo etc init d Icd4linux start and sudo etc init d lcd4linux stop These are useful if the configuration file has been changed and the changes are desired to be displayed immediately 24 4 Package List Here is a list of the packages that were installed on the FIT PC to run the SCADA software Many packages can be installed using the Synaptic Package Manager found in the System gt Administration menu GNUPLOT MySQL G php5 mysql mysql server mysql client 5 0 phpmyadmin mysql server core 5 0 mysql client mysql common mysql server 5 0 libmysqlclient15off libqt4 sql mysql libsoci mysql gcec libmysqlclient15 dev 25
7. ground fault detector RPI04 monitors the system for the presence of a fault It has two alarms Alarm 2 opens the isolation contactor RPIO2 and trips the safety circuit whenever a ground fault occurs Alarm 1 is a warning that comes on whenever the fault current reaches a percentage of the fault current level default 50 2 3 Switch Controller SC The SC controls the flow of power to or from the RPI the ESS and the FIB A basic block diagram of the SC is shown in Figure 1 Solar Panel High Voltage Full System Mode 205 Vac switch A and B closed Fit DAQ r lt gt Signals Raw Power Interface Filter Inverter Box DANGER HIGH VOLTAGE Energy Storage System ESS 64 3 2v LiFePOs batteries in series DAQ Figure 1 SC Block Diagram 2 4 Filter amp Inverter Box FIB The FIB converts DC power from the SC into 60Hz 120VAC using an H Bridge and a filter 2 5 Energy Storage System ESS The ESS stores power in batteries to use in powering the system and or the load It can supply a total of 2KW of power to the system and load with a maximum of 75W available for system power 2 5 1 Batteries The ESS uses 64 lithium iron phosphate LiFePO4 battery cells to store power The batteries have a nominal voltage of 205V They are 235V when fully charged and can be safely discharged as low as 160V 2 6 SCADA SCADA monitors voltages currents and temperatures at various locations in the system Thi
8. loop manually in case a fault is suspected or in case the system fails to automatically detect a fault The green button is a safety reset button which clears any faults and allows the safety logic to operate If a fault is detected the safety loop will be open and Safety 12V will not be delivered but the safety loop logic is still operating i e once the fault is cleared the system will continue to operate If the safety loop is broken manually with the red shutdown button however it must also be cleared manually with the green safety reset button for the system to continue operating On a fault the SCADA software should have entered the HV Unsafe state To leave this state the user needs to run the Clear HV Unsafe application For more information on starting and stopping this application please see the SCADA ReadMe document Appendix A 4 FAQ What solar panels are used and how are they installed The PV Array consists of 10 GEPVp 200 MS modules installed on the roof of Acopian Engineering Center These modules are connected in a series configuration and placed at a 5 degree angle facing south The IV curve for these panels is provided in Figure 1 Typical IV Curve for GEPVp 200 MS Module 8 7 6 5 un Ww S 4 a lt q 3 1000 W m 25 C T cell 2 800W m 45 C T cell ps 1000 W m 60 C T cell 0 T T T T T T T T T T T T T T T 0 5 10 15 20 25 30 VOLTS
9. lprds bin lprdsoperd fit 11138 0 0 0 1 3228 808 pts 3 S 15 45 0 00 grep lprds root 11139 0 0 0 0 1760 484 Ss 15 45 0 00 sh c usr local lprds bin getCurrentState root 11140 0 0 0 0 1760 488 S 15 45 0 00 bin sh usr local lprds bin getCurrentState fitefit 1 2 4 mv fromLoc toLoc This command moves a file or files from the fromLoc to the toLoc For example if you were in the Desktop scada directory and typed mv kern usr local lprds bin lprdskernd it would move the file Kern in the Desktop scada directory to the usr local Iprds bin directory and would rename it to Iprdskernd An example is shown in the sudo section below 1 2 5 sudo command Putting sudo before a command allows the command to be run with root access runs it as administrator For example if the directory you are trying to move a file to has restricted permissions the mv command might give you a permissions error However if you put sudo before it it won t give you an error about permissions Sudo often asks for a password before executing the command which on the FIT PC is 111111 An example is shown below ftoht Desktop scada File Edit View Terminal Help fitefit Desktop scada mv kern usr local lprds bin lprdskernd amp mv cannot move kern to usr local lprds bin lprdskernd Permission denied fitefit Desktop scada sudo mv kern usr local lprds bin lprdskernd sudo password for fit fitefit Desktop scada
10. read from it Writing to and reading from pipes is very similar to interacting with a file as pipes are essentially special files that are optimized for having multiple processes write to them In the interactions between the Kernel and the applications there are two kinds of pipes the kernel pipe and the Results pipes There is only 1 kernel pipe which is meant to be read by Kernel and written to by applications There is one Results pipe for each application which is created when the application calls the Connect function in the API and deleted when the application calls the Disconnect function in the API All pipes are created in the usr local lprds var directory 3 3 Database The LPRDS software has the ability to automatically log system information to a MySQL database This was accomplished by creating a MySQL database locally on the fitPC and using MySQL which is a commercial package that allows communication from C to MySQL The current database can be viewed on the fitPC with a graphical user interface within firefox A database link is available in the bookmark bar or you can type in the following address http localhost phpmyadmin Username root Database SCADAdata Password 111111 Server localhost The database is arranged into subsections known as tables with each entry in the table known as a row The SCADAdata database is arranged into 9 tables each with an auto incrementing index named id Table
11. screen Here is an example screenshot of how the widgets are put into the file G Applications Places System mer y O Qi Thu May 13 2 33PM ece492 A icd4linux Iprds conf usr local Iprds etc gedit File Edit View Search Tools Documents Help da 0 amp 9 Q amp New Open Save Print Undo Find Replace 5 Icd4linux Iprds conf amp 17 Widget TopTicker 4 im 18 class Text 19 expression Lafayette PhotoVoltaic R amp D System 20 prefix 21 width 42 22 align R 23 speed 0 24 update 0 25 style bold 26 27 28 Widget Logo 29 class Image 30 file usr local lprds pictures lafayette logo2 png 31 update 0 N 32 visible 1 33 inverted 0 34 35 36 37 Widget SysState 38 class Text 39 expression exec usr local lprds bin getCurrentState 1000 40 width 30 41 align L 42 prefix System State 43 update tick 44 45 46 Widget TotEnergy 7 class Text 48 expression exec usr local lprds bin getTotalEnergy 1000 494 width 30 50 align L 51 prefix Total Energy Delivered 52 update tick 53 54 55 Widget Time 56 class Text 57 expression strftime a d m H M time 58 width 20 59 align Left 60 update tick 61 62 63 A Saving file Jusr local Iprds etc Icd4linux Iprds conf Plain Text y Tab Width 8v Ln 66 Col 1 INS m Update Mana LPRDS BMS 201 E ece492 ubuntu ES fit fit Jusr local lxs
12. section to the Kernel Kernel then calls the appropriate function in IOMgr which formats the packet that needs to be sent to the Data Acquisition DAQ boards XCR is responsible for physically writing the packet to the USB port which gets sent to the SIB The SIB passes the packet along to the DAQ boards using RS 485 which have sensors that are controlled by a microcontroller The microcontroller sends a response back with the requested value which is passed through the SIB to the USB port XCR reads the packet and passes it to IOMgr which decodes the packet sending only the requested value back to Kernel Finally Kernel returns the requested value through Results pipe to the API and to the application The data flow for controlling the digital outputs on the DAQ boards is exactly the same as for requesting data Sunny Boy requests are also done in a similar fashion except that the Sunny Boy class is used instead of the IOMgr and XCR 19 Every time that data is received from the DAQ boards or Sunny Boy as well as when switches are set the data or switch position is recorded in the database This data is available to the website using PHP to access the database 3 2 Pipes The C API uses a UNIX feature called pipes to allow communication between the applications and the Kernel which is constantly running Pipes are essentially a FIFO between two running processes One application can write to the pipe and then another application can
13. 2 System Components This section describes all of the main components of the LPRDS BMS 2 1 DC Transfer Switch The DC Transfer Switch can supply power from the PV array to the Sunny Boy inverter the LPRDS ETS system or disconnect it completely When the switch is all the way up it provides power to the Sunny Boy when it is all the way down it provides power to the LPRDS ETS and when it is in the middle both are disconnected The switch should remain locked in position at all times and should follow standard Lock Out Tag Out LOTO procedures 2 2 Raw Power Interface RPI The RPI provides power from the PV array to Switch Controller It provides an isolation relay to disconnect the system from the array in the event of a fault or scheduled shutdown LEDs on the box inform the user of the power and fault status of the RPI 2 2 1 Indicator LEDs The RPI system has five LEDs visible from the outside A yellow high voltage indicator light RPI11 signifies that there are 30V or more present within the RPI The green system voltage indicator RPI10 is lit whenever the RPI is providing power to the rest of the system The red light RPI12 is a fault indicator and is lit whenever a fault has occurred and the system is in a fault state The small yellow light L1 is lit when 5V power is supplied to the PCB and the small blinking yellow light L2 blinks when the PIC is programmed and running 2 2 2 Isolation Contactor Ground Fault Detector The
14. 9 48 event_res h IWX 1 fit fit 34 2010 04 30 12 45 FAILS TWxk 1 fit fit 125 2010 04 15 16 52 fault h gt 1 fit fit 188 2010 04 15 14 20 fault_log h MX 1 fit fit 330 2010 04 15 19 09 fault_res h IWX 1 fit fit 292 2010 04 12 19 59 hw h TWX 1 fit fit 2055 2010 05 14 14 31 iomgr cpp Y ps aux grep searchterm 15 This command allows a user to search the list of all running processes for a specific term For example if the user wanted to see if any process with Iprds in the name was running the command would be ps aux grep Iprds The command to view all running process is ps aux and the command to search for a specific term is grep searchterm and the pipes the results of ps aux into grep searchterm An example is shown below a nant File Edit View Terminal Help fit fit ps aux grep lprds root 2612 17 1 0 5 7732 2736 S 11 50 40 24 home fit picolcd 256x64 lcd4linux f usr local lprds etc lcd4linux lprds conf q root 2710 0 0 0 4 7588 1996 S 11 50 0 11 exec 3cld f usr local lprds etc lcd4linux lprds conf q fit 4433 2 8 4 0 55332 19776 pts 2 S 15 06 1 06 gedit kernel cpp lprds cppapi cpp fit 7998 0 0 0 1 2980 640 pts 0 S 15 26 0 00 tail f usr local lprds log debug fit 8011 0 0 0 1 2980 640 pts 1 S 15 26 0 00 tail f usr local lprds log lprds root 8033 28 4 0 5 6272 2928 R 15 26 5 15 usr local lprds bin lprdskernd root 8346 26 6 0 2 2896 1104 R 15 28 4 24 usr local
15. DA software please see the SCADA ReadMe document Appendix A 3 1 2 Powering a Load Designated outlets in AEC400 and the outlet in the atrium of AEC attached to a steel I beam are powered by the LPRDS BMS If there is not enough energy in the system to power a load the system will disconnect itself from the load in order to recharge the batteries to a higher level The system will automatically reconnect to power a load when there is enough power in the batteries 3 1 3 Shutting Down To stop or shut down the SCADA software please see the SCADA ReadMe document Appendix A 3 2 Emergency Shutdown The emergency shutdown button located on the side of the high voltage cabinet immediately trips the safety circuit and shuts down the system into a safe state when pressed Resetting after an emergency shutdown consists of pressing the alarm acknowledge button and making sure the system is safe before pressing the Clear Fault button on the RPI 3 3 Clearing Faults Safety 12 Loop System 12V Safety Loop from ESS SCADA SIB Safety Reset REN Button Green Safety SC Relay F be HV from PV HV HV aie Switches solation to Safety 12 Relay Output Monitor Temperature Controlled Switch Safety 12 Manual Trip red
16. LPRDS BMS 2010 Lafayette Photovoltaic Research and Development System Battery Management System ECE492 Spring 2010 Lafayette College Electrical and Computer Engineering Department User Manual Final Draft Contents Py SNS ONES td A td id a alias Sache Gott eles 4 Z System Components ii 5 2 1 DCETranster Within id eur Rad bien iii 5 2 2 Raw Power Interface RPI sic ccccc seccctadecccsccsdeteasteseaeetesgeccedadandcsecggeldaaeageseetagseeeetadas deeegseewaathseaeens 5 2 2 1 Indicator LEDs vesienc ics ate ara 5 2 2 2 Isolation Contactor Ground Fault Detector cee ceccceesseceececeeeeeeaeceeaceceeeeeesaeeeeaeceeaeeeaes 5 2 3 Switi Controler SC Porras e amass inn Gaile inane lina 5 2 4 Filter amp Inverter Box FIB sccs lt cose caves i aa E EES SEEE E aN TETEA TEAT ATR 6 2 5 Energy Storage Systemi ESS si orien reena e ia a er Re ae and R Ras 6 2 5 1 B tterie Seance ari A a 6 2 6 SCADA Interface Box SIB iii ida 6 2 7 Transtor mer eseese e e A A A td dd 6 3 Getting Started ennen n a a E Seg ee E heh a MEU a iea 7 3 1 Normal Operatii recaian Senden ache ann ae a a rad 7 3 1 1 Starine Ubica ee A E a EEA EE EE A E a OEE EE E E E EEA AEE 7 3 1 2 Powerine a L0ad arsson n E Aaa 7 3 1 3 Shutting DO Wi tE AA RE A E E ea E EA ia Ea 7 Ze l Emersency QUO Wi rosoinen aie ee E e egal enc E E E E dd 7 3 3 Clearing Faults niingie eiaa sade e A E REE A A A 8 C RA S O T A E AE soe E ETETE ET 10 4 1 Calibrations A R A T E a 11
17. atteries used in the LPRDS BMS are Lithium Iron Phosphate Batteries LiFePO4 These batteries do not need periodic maintenance like Nickel Metal Hydride or Lead acid Their chemistry is not explosive and stable even under under over charge situations A typical service time for LiFePO4 is about 6 7 years or 3000 cycles depending which comes first If a battery is cycled once per day it would last for over 8 years not accounting for capacity loss due to just aging gt 3000 cycles Even if there are no specific maintenance instructions for LiFePO4 batteries there are a few good rules of thumb when it comes to battery conditioning and maintenance e Cycle the battery a few times before using for the first time e Store in a cool dry place e Ifthe memory effect is a problem cycle the battery a few times every few weeks to undo the effect e Ifthe batteries need to be stored for a long time unused then store them in a cool dry place and charge the batteries before their next use to account for their self discharge 11 6 Schematics Drawings Figure 1 RPI Module Key to designators in Figure 1 Al A lA RPI04 RPIO4A RPIO6A RPIO6B RPI10 Enclosure Thumb turn handle with key lock Ground fault monitor Trips the safety relay in the event of a ground fault Alarm 2 A12 goes off when the ground current exceeds the tripping point Alarm 1 All goes off at half this level Mounting frame for the ground f
18. ault monitor Safety circuit trip button Trips the safety circuit Safety circuit reset button Resets the safety circuit System power indicator Lights when the RPI relay is closed and power is being provided to the system 12 RPI 1 RPI2 L1 L2 J1 J2 J3 J4 HV 30V indicator Lights when 30V or more is being supplied by the PV array Fault indicator light Lights when there is a fault and the safety relay is tripped PCB Power light Lit when the PCB has 5V power supplied PIC light Blinks to show PIC is programmed and running High voltage output receptacle Supply voltage receptacle Safety receptacle RJ45 receptacle High voltage input 13 Appendix A Scada ReadMe 1 SCADA Software 1 1 Goal The purpose of the Supervisory Control and Data Acquisition SCADA software was to allow monitoring and control of the Lafayette Photovoltaic Research and Development System LPRDS The software would run on a computer called the FIT PC which is located in the LPRDS Tower One general requirement was that all monitoring and control interactions with the system from the applications would be through a defined Application Programming Interface API For monitoring the software had to provide the ability to poll Voltage Current and Temperature readings and store them in a Database which could be accessed by applications as well as by a website For control the software had to provide the ability to contr
19. di library The Sunny Boy communication protocol is implemented using the YASDI yet another SMA data implementation library which was provided by the Sunny Boy manufacturer The Sunny Boy must be connected to the FIT PC in order to be properly communicated with via an RS 485 connection The current Sunny Boy class utilizes only a few of the provided functions from the YASDI library however only a select few are required in order to poll data from it These methods and their definitions are located within the sunnyBoy cpp file Since these methods draw upon the YASDI library those libraries must be compiled along with the Sunny Boy code Consult the Sunny Boy Communication Manual to see how to use this code to communicate with the Sunny Boy 3 7 Pico LCD 3 7 1 Viewing the configuration file and the contents The file that determines the layout for the Pico LCD is located in usr local Iprds etc the file is named lcd4linux Iprds conf By modifying this file the displayed elements of the Pico LCD screen can be changed In the beginning of the file there are various widgets that are currently being displayed on the Pico LCD screen There are additional widgets available to add and a list of available widget is 23 located at http ss bulix org projects lcd4linux wiki Layout along with their respective fields and examples Near the bottom of the screen is the layout which describes where the widgets will be displayed on the Pico LCD
20. e doc copyright Ubuntu comes with ABSOLUTELY NO WARRANTY to the extent permitted by applicable law To access official Ubuntu documentation please visit 3 http help ubuntu com 58 packages can be updated 108 updates are security updates Last login Tue May 11 16 41 09 2010 from 139 147 103 6 fitefit Is This command lists all of the files in a directory Adding l switches it to a long listing format essentially putting in a list format 1 2 3 E fit ft Desktop scada e fon he File Edit View Terminal Help fitefit Desktop scada ls 1 al total 1564 rwxr xr x 1 fit fit 65398 2010 05 14 15 33 clear _hv_unsafe IWX 1 fit fit 1008 2010 05 07 18 29 clear_hv_unsafe cpp TWX 1 fit fit 22243 2010 05 11 14 29 database cpp TWX 1 fit fit 2854 2010 05 11 14 33 database h TWX 1 fit fit 187 2010 04 11 14 09 data h drwx 3 fit fit 4096 2010 05 05 11 39 demoApp TWX 1 fit fit 491 2010 04 26 17 02 device cpp TWX gt 1 fit fit 611 2010 04 26 17 03 device h drwxr xr x 2 fit fit 4096 2010 04 20 09 02 devices TWX 1 fit fit 1617 2010 05 03 13 05 devices xml 7 TWX 1 fit fit 10499 2010 05 03 13 14 die gt 1 fit fit 359 2010 04 23 10 43 dt h TWX 1 fit fit 1047 2010 05 12 13 16 error_codes TWX 1 fit fit 126 2010 04 15 14 19 event h WX 1 fit fit 192 2010 04 15 14 19 event_log h TWX 1 fit fit 225 2010 04 23 1
21. ess ID can be found using ps aux grep lt name gt it is the number in the second column To fully shutdown and restart all LPRDS software here are the steps to follow 1 Stop any applications that are running using the methods listed under Starting and Stopping Applications and Starting and Stopping Kernel and the Operational State Manager If these methods don t work then shutdown the processes using the kill command mentioned above Type sudo rm usr local Iprds var to ensure that all pipes have been removed 3 Start the Kernel then the Operational State Manager and then any applications that you want to run assuming they are allowed to run Note that the battery management application is only allowed to run in the Operational State 18 3 Using the Software 3 1 Software Block Diagram XML Parser parser h usb serial 1 0 Manager iomgr h Kernel kernel h Database database h sunnyBoy h L P R DS Software Architecture A Apps Hardware Commercial E XML Flle Product Display E API Interface 3 gt Data Signals C Code gt Control Signals Developed by SCADA team rev 6 09 05 2010 For a description of the individual blocks see the SCADA Software Architecture document When an application wants to get data from the Data Acquisition boards it calls the appropriate C API function This request goes through the Kernel pipe explained in a later
22. ield from the table FROM hw specifies the table to pull data from and WHERE is used to filter information by finding entries that match the following specifications SELECT data id data hw_id hw daq hw pin hw name data value hw units hw type hw active data time FROM hw data WHERE data hw_id hw id In this SELECT command information is gathered from two separate tables To do this each desired field must be prefixed with its table name ex data id for the id field in the data table and FROM is used to specify the tables In this case WHERE is used to match up each data entry with its detailed sensor information in the hw table by matching data hw_id to hw id INSERT INTO state_log state_id time values 3 NOW 21 The INSERT INTO command allows us to add a new entry to the database It is best to specify the fields you intent to populate after the table name within parenthesis leaving out id to avoid problems with the automatically incremented index field in each table Use NOW for the timestamp value to write the current time Any text must be enclosed in single quotes UPDATE hw SET active 1 WHERE name sensor_name To change the value of information already in the database use the UPDATE and SET command The values to be updated can be specified using WHERE as seen before Any text must be enclosed in single quotes ORDER BY event_
23. log time ASC The ORDER BY option can be added to the end of a SELECT command to arrange the results by their timestamp field Use ASC for ascending time and DESC for descending Tip When formulating a new SQL command it is convenient to use the phpmyadmin user interface in firefox You will find a tab near the top of the page labeled SQL where you can type in commands and get feedback if there is an error in the formatting 3 5 Installing MySQL and MySQL MySQL and MySQL are already configured on the fitPC and right most Ubuntu computer along the windows in AEC400 To install MySQL from scratch as well as PHP and Apache for the website follow this tutorial https help ubuntu com community ApacheMySQLPHP 22 To install MySQL run the following commands in terminal weet http www tangentsoft net mysql releases mysql 3 0 9 tar gz tar xvfz mysql 3 0 9 tar gz cd mysql 3 0 9 configure make make install Note New versions may be found at http www tangentsoft net mysql To use MySQL in a C program you first will need to modify the Makefile with the following lines CFLAGS I usr include mysql I usr local include mysql LDFLAGS L usr local lib Imysqlpp Imysqlclient Insl 1z Im CFLAGS LDFLAGS Then within the h file include include lt mysql h gt include lt stdlib h gt using namespace mysqlpp 3 6 Sunny Boy 3 6 1 Using the yas
24. ol the switches and relays in the system from applications Here is a simple block diagram of our initial view of the software to control the system API System Controls Apps Maintanence On Off Reset Batt Mgmt Operation Change i Safety Smart Charge Datahas Demo E System Sensors i E T Website Voltage Data Plots Current Current State Temperature System Controls State 14 1 2 Basic Ubuntu Commands The software is running on the FIT PC which has Ubuntu 9 04 installed For interacting with the software there are various useful terminal commands listed below 1 2 1 ssh Y address This command allows a user to connect to another computer using the Secure Shell protocol For example if the user wanted to connect to the FIT PC the command would be ssh Y fitO lprds aec lafayette edu This is essentially the same as opening a terminal on the FIT PC itself which can be useful for interacting with the software and the system from outside the project room The password for the FIT PC is 111111 An example is shown below 1 2 2 File Edit View Terminal Help ece492 ubuntu ssh Y fitelprds aec lafayette edu fit lprds aec lafayette edu s password Linux fit 2 6 28 18 generic 59 Ubuntu SMP Thu Jan 28 01 23 03 UTC 2010 i586 The programs included with the Ubuntu system are free software the exact distribution terms for each program are described in the individual files in usr shar
25. ped before Kernel for the software to work correctly E ftoht Desktop scada File Edit View Terminal Help fitefit Desktop scada sudo etc init d lprdskernd start A Starting LPRDS Kernel process lprdskernd fitefit Desktop scada sudo etc init d lprdsoperd start Starting LPRDS Operational State Manager lprdsoperd fitefit Desktop scada ftoht Desktop scada File Edit View Terminal Help fitefit Desktop scada sudo etc init d lprdsoperd stop A sudo password for fit Stopping LPRDS Operational State Manager lprdsoperd fitefit Desktop scada sudo etc init d lprdskernd stop Stopping LPRDS Kernel process lprdskernd fitefit Desktop scada 2 2 Starting and Stopping Applications All applications other than the Operational State Manager should be started from the Desktop scada directory on the FIT PC To start them you simply need to type AppName For example the commands to start the existing applications are maint mgmt clear_hv_unsafe Keep in mind all applications require Kernel to be started in order for them to work properly Stopping the applications varies slightly between the applications The maintenance application has an interface so that the user can simply type exit to close the application The battery management application has no interface so to stop it the user would need to hold Ctrl and press C to stop it The clear HV Unsafe application exi
26. s information is monitored for any potential faults and shuts the system down if necessary Information is stored for later viewing to monitor the performance of the system 2 7 Transformer The one to one transformer T1 provides 120VAC to the load and isolates it from the rest of the system It is connected to the outlet strip on the HV cabinet 3 Getting Started 3 1 Normal Operation 3 1 1 Starting Up Before powering the LPRDS BMS the system must be cleared of all faults and inspected As stated in the safety manual sections 2 7 4 and 3 1 if any high voltage seals are broken the ground fault system in the RPI must be retested before resuming operation If any seals are broken have a qualified person retest the ground fault monitor as outlined in the maintenance manual The DC transfer switch should be open or providing power to the Sunny Boy and no power should be provided to the system Make sure the emergency stop button is pulled into the out position and press the reset R button on the ground fault monitor to ensure it is reset Close the DC transfer switch by moving the switch to the lowest position to connect power to the RPI Only the person who has locked tagged out the system may power the system The 30V indicator RPI1 1 will light if there is 30V or more provided by the PV array no other LEDs will change With no load attached there may be enough residual voltage across the relay to turn on RPI10 To start up the SCA
27. s such as event_log fault_log state_log and data have additional fields ending in id event_id hw_id etc that correspond to the id number of the table named in the prefix For example the hw table stores detailed information about each sensor and assigns each a unique index id number When a sensor reading is stored in the data table it only needs to store the matching id number from the hw table in the hw_id field to identify the sensor This was done to minimize the amount of space used by the database 20 SCADAdata Database Layout int id int hw_id int id float value int daq timestamp time int pin event_log text name int id text units int event_id int id text detail text username int detail tinyint active timestamp time int id text username text password int id int fault_id state_log int id int hw_id int detail int id timestamp time int cleared int id int detail int state_id timestamp time 3 4 SQL Commands To manipulate data in the database we issue commands written in the Structured Query Language SQL In the LPRDS system SQL commands are commonly used to retrieve data write new data and update previous entries Below are a few SQL command examples SELECT FROM hw WHERE daq 4 AND pin 7 The SELECT command is used to retrieve information back from the database The means retrieve every f
28. the names Results_AppName So if the Maintenance application isn t starting correctly and typing ls l usr local lprds var reveals that the Results_Maint pipe still exists even though the Maintenance Application isn t running you should remove the pipe with sudo rm usr local lprds var Results_Maint If the programs are running correctly but the DAQ boards aren t responding one possible problem is that the SIB is using different USB ports than specified in the xcr h file For example the software may be set to use dev ttyUSBO for the DAQ boards and dev ttyUSB1 for the Sunny Boy while the SIB is set to use dev ttyUSB1 and dev ttyUSB2 To check the ports the SIB is set to use type tail f var log messages and then unplug the SIB from the USB port on the FIT PC and then plug it back in In the xcr h file the USB port should be set to the lower numbered USB port and in the yasdi ini file the Device should be set to the high numbered USB port If these numbers have changed the software will need to be stopped recompiled and started again If after using the scripts to stop the Operational State Manager or Kernel the program is still running you can still see Iprdsoperd or Iprdskernd using ps aux grep Iprds you can still shutdown the process using the kill command This can be used for any application which refuses to shut down The command to shut it down would be sudo kill 9 pid where pid is the Process ID The Proc
29. ts automatically after the user input request ftoht Desktop scada File Edit View Terminal Help fitefit Desktop scada maint 4 2 3 Compiling the Software 17 Compiling the software is done through a Makefile located in the Desktop scada directory Before compiling an application you should make sure that the application is not currently running Once in the directory simply type make app in order to compile the specific application The make kern command will compile the kernel and should be followed by sudo mv kern usr local Iprds bin lprdskernd The make Iprds command will compile the Operational State Manager and should be followed by sudo mv usr local Alprds bin lprdsoperd The make maint command will compile the maintenance application and does not need to be followed by a mv command The make mgmt command will compile the battery management application and does not need to be followed by a mv command Finally the make clear_hv_unsafe command will compile the clear HV Unsafe application and does not need to be followed by a mv command 2 4 Troubleshooting One possible problem with starting an application can arise from the application being shut down improperly When this happens the pipe which connects the application to the kernel will be left and can interfere with the application starting up correctly The pipes are located in the usr local lprds var directory and the application specific pipes have
Download Pdf Manuals
Related Search
Related Contents
Novra S300 Receiver User Manual Mercedes- Benz WIS EPC Lincoln Electric K289 User's Manual ARGUS 600 Infusion Pump Service Manual Sony ICF-CD7000WHT Operating Instructions Acclaim Lighting X-DRUM-HIP User's Manual ( ) split unit air conditioner installation manual for service personnel Dale Tiffany TH11194 Installation Guide Copyright © All rights reserved.
Failed to retrieve file