Home
fulltext
Contents
1. Metal a SD WRITE EN DONE Delete Data Segnent_12 ATTRIB ERM FilsNamelir Write FILINO ERNG lfritel_erno SRG Pointer SD Writel Format FORMAT ED Pointer n NR m Write Elementi INVAR STATUS Save Array ADRVAR DidInputArray ReadSav eddut DidParaneter ReadSavedArray ead Button Pressed in Las Button Pressed in Em Lit ligit Box T Saving Done light box Save PID in Save Done licht outre Saving Done light D tirer Delete Data Segment 123 in Read Done light out Read Done Light Save Read tiner en Read close 12345 in Read Done Value out Road Done Value S read a Save done Save Done light Save Done SD REM Save Err Read Done light Read Done Read PID EN DONE Read done Save Err light Save Err Open Read close 12345 ATTRIB EN Read Err Read Err ligh i Bead Err Filellanelir Read FILED ERNO Readl erm Read Save out faving D fave Me m T Save Clear out Derim bazar 8 Read format FORMAT Close out uu H Saving light saver AR Read Elementir INVAR Read out Reading Save Button in putton ADRVAR Read Ne an When to read Reading light Read Button i
2. TPInst9 IN Num Pad 9 PT T 5ms Numpad Debounce 9 TPInst9 0 Button 9 pressed IF Numpad Debounce 9 THEN no of push no of push 1 Var array no of push 9 END IF Debounce button function TPInstO IN Num Pad 0 PT T 5ms Numpad Debounce 0 TPInst0 0 Button 0 pressed IF Numpad Debounce 0 THEN no of push no of push 1 Var array no of push 0 END IF Debounce button function TPInstDot IN Num Pad Dot PT T 5ms Numpad Debounce Dot TPInstDot Q Button pressed IF Numpad Debounce Dot THEN no of push no of push 1 Var array no of push END IF Putting the two arrays together in to a STRING Con 12 CONCAT Var array 1 Var array 2 Con 34 CONCAT Var array 3 Var array 4 Con 56 CONCAT Var array 5 Var array 6 Con 78 CONCAT Var array 7 Var array 8 Con 1234 CONCAT Con 12 Con 34 Con 5678 CONCAT Con 56 Con 78 The merge of arrays 1 8 becomes one neo Numpad Display CONCAT Con 1234 Con 5678 Button OK sends the numpad value out IF OK THEN Numpad out STRING TO REAL Numpad Display END IF 51 Mode Sequence 0001 The system can be in different modes which
3. 0026 THEN 0027 Kp_ Out Read Numpad Value 0028 END IF 0029 0030 IF Numpad Pointer 5 AND NumP OK Button Set desired terminal voltage value with numpad 0031 THEN 0032 Desired Terminal Voltage Read Numpad Value 0033 END IF 0034 0035 0036 0037 0038 0039 0040 0041 0042 0001 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 Kd_Out 0 0 for PI Controller StatusText PI Controller Mode Save PID FALSE IF Clear Button THEN Mode Delete Data Segment 123 Mode Save PID Clear Button END IF i m Delete old saved file IF Save Button THEN Mode Delete Data Segment 123 Mode Save PID TRUE END IF J N Save file IF Last_Button_Pressed OR Read_Button_Pressed THEN Kp_Out ReadSavedStatus_p Ki_Out ReadSavedStatus_i Kd_Out ReadSavedStatus_d END_IF IF Numpad Pointer 1 AND NumP OK Button Set Kp value with numpad THEN Kp Out Read Numpad Value END IF IF Numpad Pointer 2
4. A 128kB program memory Ethernet interface e 6 digital inputs e 2 analog inputs configurable as digital inputs e 1 analog output 3 2 Control panel CP620 web A user can gain access to the web interface provided by the PLC from the MicroBrowser application installed on the control panel see component 15 in Figure 1 The CP620 web is a color 4 3 touchscreen display that is running a Microsoft Windows embedded operating system The MicroBrowser installed is used to com municate with the PLC by accessing the web server Figure 12 The control panel Content from its ip address 12 CP630 web utilizes its pre installed web browser to access the user interface 16 16 3 3 Arduino Arduino is an open source electronic prototyping platform based on a programable microcontroller board with its own programming environment for writing software It can be used to control various objects like lights and motors or to sense the input ARDUINO from switches or sensors Figure 13 The Arduino logo 7 The company started out 2005 in Italy and their boards has since then become a popular choice for your everyday electronics hobbyist They supply numerous boards with a broad range of capabilities for a low cost With their exposed con nectors compatible shields can be used to enhance the capabilities even further 7 Arduino Uno Rev3 Two microcontroller boards one in the control cabinet and the other on the rotat ing shaf
5. H void Status void while blueToothSerial available 1 analogWrite SSrVoltage0ut SSrVoltage i FieldCurrentLocal mapCanalogRead RotorCurrent 0 1023 0 255 Store BTtransfer analogWrite SSrVoltageOut SSrVoltage Regualated output PWM Serial println ReceiveData PLCvoltage FieldCurrentLocal analogRead RotorCurrent Serial println FieldCurrentLocal void BTtransfer void earn nono ooo e BT transfer out ETout sendDataQ Send the data out SendData FieldCurrent FieldCurrentLocal SendData PLCvoltageconfirmation ReceiveData PLCvoltage Pearce BT transfer in for int 1 0 i 5 i ETin receiveData Read the incomming data delay 10 SSrVoltage ReceiveData PLCvoltage Store the incomming PLCvoltage in the varia ii hse LA LE eLA T Debbuging program 85 void Debugging void 1 int PLCvoltagecheck 0 int DebuggPLCvoltagecheck 1 float Volt ReceiveData PLCvoltage 5 0 255 0 float ConfirmationVoltage SendData PLCvoltageconfirmation 5 0 255 0 Serial Serial Serial Serial Serial Serial println Slave print Receiving PLCvoltage data Serial println SSrVoltage print Receiving PLCvoltage Serial print Volt Serial println V print Voltage confirmation Serial print ConfirmationVoltage Serial pr print Field current data Serial println Fi
6. 50 meecceo Figure 21 Jumper position of the UART multiplexer during configuration 3 Connect the Arduino and the stackable shield to a computer and run a terminal program to gain access to the HC 05 The BTshield is preset to work at a baud rate of 38400 which means that the terminal program must be configured to the same speed in order for communication with AT commands to be possible 4 Shiftthe mode switch to CMD and type in AT in the terminal window If the HC 05 responds with an OK message it means that it is responsive to programable AT commands 5 Acquire the device address with the command AT ADDR Once these steps are completed for both shields they are configured as master and slave and set to search for each other using their counterparts Bluetooth ad dress The configuration is made with other AT commands shown in Figure 22 and 23 23 Ok K AVERSION 20 20100601 A00R 12 6 71233 X ox ADOR 12 4 239266 NWE SvantePLC oK 0k NAME SvanteRotor HOLE Oc Oc 4ROLE 0 CLASS 0 ok X NE NR IAC 9e8b33 ok 41N04 1 1 48 INQ 1 1 48 Ok oc UART 9600 0 0 UART 9600 0 0 oK Oc 4810 12 4 239266 481N0 12 6 71233 OK Ok t L _ _ _ _ _ ttct4c Figure 23 AT Commands of the slave shield that connects to the rotational Arduino Figure 22 AT Commands of the master shield that connects to the stationary Arduino As seen in Figure 22 and Figure 23 the baud rate of both shields have b
7. 75 amp amp lightstep lt 101 delayC 10 if CC lightstep gt 50 88 lightstep 76 1 delay 14 if CC lightstep gt 25 amp amp lightstep 51 1 delay 18 if CC lightstep gt 1 88 lightstep lt 26 1 delay 19 void Debugging void int DebuggPLCvoltagecheck 1 float Voltage Q int PLCvoltagecheck 0 if CConnectionStatus HIGH if CPLCvoltagecheck gt SendData PLCvoltage DebuggPLCvoltagecheck PLCvoltagechec Voltage SendData PLCvoltage 5 0 255 0 float ConfirmationVoltage Confirmation 5 0 255 0 Serial println Master Serial print PLCvoltage data Serial println PLCvoltageLocal Serial print Sending PLCvoltage Serial print Voltage Serial println V Serial print Voltage confirmation Serial print ConfirmationVoltage Serial pr Serial print analogRead PLCvoltageIn Serial print Field current data Serial println FieldCurrentLocal Serial println 5 PLCvoltagecheck SendData PLCvoltage else 1 Serial print Connection not established Searching for Slave return Serial println val void loop i 82 digitalWriteCPower HIGH Send to PLC that Arduino is on StatusQ DebuggingO delay 110 100 83 Slave Program for Slave unit include lt SoftEasyTransfer h gt BT library incLlude lt SoftwareSerial h gt SoftwareSerial library to create a Serial c
8. BOOL 0036 SD writel SD WRITE 0037 SD readl SD READ 0038 0039 Writel erno WORD Error number 0040 Readl erno WORD Error number 0041 FileNameNr Write BYTE 0 Number of the storage file XX 0 to 99 USRDATXX DAT 0042 Saving 4 different files on memory 0 3 p pi pd pid 0043 FileNameNr Read BYTE 0 Number of the storage file XX 0 to 99 USRDATXX DAT 0044 Reading 4 different files on memory 0 3 p pi pd pid 0045 Writel Format BYTE 32 Data format 0046 00hex 0 BYTE 0047 01 hex 1 CHAR 0048 10 hex 16 WORD 0049 11 hex 17 INT 0050 20 hex 32 DWORD 0051 21 hex 33 DINT 0052 Write ElementNr WORD 13 Number of elements per data set 4 0053 Read format BYTE 32 Data format 0054 00hex 0 BYTE 0055 01 hex 1 CHAR 0056 10 hex 16 WORD 0057 11 hex 17 INT 0058 20 hex 32 DWORD 0059 21 hex 33 DINT 0060 0061 Read ElementNr WORD 13 Number of elements per data set 4 0062 ReadSavedValue ARRAY 1 13 OF DWORD Values fron the SD card 1 4 0063 0064 Light Box Saving Done light box 0065 Pointer SD SD Pointer 0066 SD timer Save Read timer 0067 Save Me When to save 0068 Read Me When to read 0069 END VAR STATUS IN PID array Read Button Pressed Last Button Pressed ReadSavedValue
9. REAL Read_savel SD_Save_Read Numpad_BoYo Numpad_B NumP_1 BOOL NumP_2 BOOL NumP_3 BOOL NumP_4 BOOL NumP_5 BOOL NumP_6 BOOL NumP_7 BOOL NumP_8 BOOL NumP_9 BOOL NumP_0 BOOL NumP_Dot BOOL NumP_Clear BOOL NumP_OK BOOL Load_Configuration BOOL Load_Last_Configuration BOOL Save_button BOOL Load_Last_timer TP Load_Last_time TIME T 500ms Conversion KiKd to TnTv StaticOrRotating Static or Rotating Static BOOL Rotating BOOL END VAR VAR INPUT END VAR 47 Read savel Load Last ti ED fave Read T PID array PidParanete Toad Last Configuratior i Last Button Pressed Savi Toad last tine pr E Read Button Pressed Cleari Mode Sequence Tave button eave Button in Closis Numpad Bolo Toad Configuration F Mread Button Pressed Read Button Out Read Button in Readis Tupad E Last Button Pressed Node Save PIL e PID Read Done Valu lor Numpad out Read Numpad Value Node Read PIN Read PID Saving Done light llum Pad 1 Nuspad OK Out llum Pad 2 lun Pad 3 lu Pad 4 llum Pad 5 lun Pad llum Pad 7 llum Pad 8 llum Pad 9 Nun Pad 0 lun Pad Clear llum Pad Dot llum OK Button Mode Delete Data Segment 123 Save Button Node Open Read close 12344 Clear Button STAT Close Button Desired Terminal Volta Read Button Tp Out read done Ki Out Saved light 1d Out ResdSavedStatue Status var Manual I ReadSavedEtatus p ResdBavedStatur i lesd
10. brushless exciter in order to supply the the two DC converters with a DC voltage see component 8 in Figure 1 F igure 20 The three phase bridge rectifier on the left and the two DC DC converters on the right supply the rotational custom made shield with 12V and 24V 20 4 Software An extensive amount of time have been spent programming the PLC and the two Arduinos included in the AVR system While Arduino uses their own software to program its different boards the PLC uses two separate ones one to setup its characteristics and the other for code generation 4 1 PS501 Control Builder Plus The ABB software PS501 Control Builder Plus combines the different tools necessary in order to configure your automation project When starting a new project the desired PLC is selected from an internal list which configures the characteristics of the project to fit the selected model After a PLC model is selected the user can edit several different settings like the I O configuration and the ip address Once a project is created with Control Builder Plus the CoDeSys software can be launched from the AC500 icon found in the sidebar 10 4 2 CoDeSys CoDeSys is a development environment based on the IEC standard it stands for Controlled Development System and is used for PLC code generation The first program organization unit POU automatically gets handed the name PLC_PRG which sets the process in motion much like the main function in a
11. 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 StatusText Choose a Controller Kp_Out 0 Ki_Out 0 Kd_Out 0 Status_Ready 0 Numpad_Pointer 0 Back FALSE Mode_Read_PID FALSE Read_Button_Out FALSE Read_Button_Pressed FALSE IF Read_Button THEN Mode_Open_Read_close_12345 2 Read saved file Mode_Read_PID Read_Button END_IF IF Close Button THEN Mode Open Read close 12345 5 Close saved file Mode Read PID Close Button END IF 55 0001 Kd_Out 0 0 for P Controller 0002 StatusText P Controller 0003 0004 Mode Save PID FALSE 0005 0006 IF Clear_Button 0007 THEN 0008 Mode Delete Data Segment 123 1 Delete old saved filer 0009 Mode_Save_PID TRUE 0010 END_IF 0011 0012 IF Save_Button 0013 THEN 0014 Mode Delete Data Segment 123 2 Save filer 0015 Mode_Save_PID TRUE 0016 END_IF 0017 0018 IF Last Button Pressed OR Read Button Pressed 0019 THEN 0020 Kp_Out ReadSavedStatus_p 0021 Ki_Out ReadSavedStatus_i 0022 Kd_Out ReadSavedStatus_d 0023 END IF 0024 0025 IF Numpad Pointer 1 AND NumP OK Button Set Kp value with numpad
12. 4 TPInst4 0 Button 4 pressed IF Numpad Debounce 4 THEN no of push no of push 1 Var array no of push 4 END IF Debounce button function TPInst5 IN Num Pad 5 PT T 5ms Numpad Debounce 5 TPInst5 0 Button 5 pressed IF Numpad Debounce 5 THEN no of push no of push 1 Var array no of push 5 END IF Debounce button function TPInst6 IN Num Pad 6 PT T 5ms Numpad Debounce 6 TPInst6 0 Button 6 pressed IF Numpad Debounce 6 THEN no of push no of push 1 Var array no of push 6 END IF Debounce button function TPInst7 IN Num Pad 7 PT T 5ms Numpad Debounce 7 TPInst7 0 Button 7 pressed IF Numpad Debounce 7 THEN no of push no of push 1 Var array no of push 2 7 END IF Debounce button function TPInst8 IN Num Pad 8 PT T 5ms Numpad Debounce 8 TPInst8 0 Button 8 pressed IF Numpad Debounce 8 THEN no of push no of push 1 Var array no of push 8 END IF Debounce button function 50 0097 0098 0099 0100 0101 0102 0103 0104 0105 0106 0107 0108 0109 0110 0111 0112 0113 0114 0115 0116 0117 0118 0119 0120 0121 0122 0123 0124 0125 0126 0127 0128 0129 0130 0131 0132 0133 0134 0135 0136 0137 0138 0139 0140 0141 0142 0143
13. AND NumP OK Button Set Ki value with numpad THEN Ki Out Read Numpad Value END IF IF Numpad Pointer 5 AND NumP OK Button Set desired terminal voltage value with numpad THEN Desired Terminal Voltage Read Numpad Value END IF 57 0001 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 StatusText PD Controller Mode Save PID FALSE IF Clear Button THEN Mode Delete Data Segment 123 1 Clear old saved file Mode Save PID TRUE END IF IF Save Button THEN Mode Delete Data Segment 123 2 Save file Mode Save PID TRUE END IF IF Last Button Pressed OR Read Button Pressed THEN Kp Out ReadSavedStatus p Ki Out ReadSavedStatus i Kd Out ReadSavedStatus d END IF IF Numpad Pointer 1 AND NumP OK Button Set Kp value with numpad THEN Kp Out Read Numpad Value END IF IF Numpad Pointer 3 AND NumP OK Button Set Kd value with numpad THEN Kd Out Read Numpad Value END IF IF Numpad Pointer 5 AND NumP OK Button Set desired terminal voltage value with numpad THEN
14. DtoReall 10000000 0037 SD i out 8 DtoReal2 10000000 0038 SD d out 9 DtoReal3 10000000 T Call Tree of PLC_PRG ES m mox BLUETOOTECHECK PID ON sD SAVE READ SAVING DONE LIGHT BOX SD WRITE CPUDEVITFCMD SD READ CPUDEVITFCMD STATIC OR ROTATIN MODE SEQUENCE 78 Arduino Master Program for Master unit include lt SoftEasyTransfer h gt BT library zinclude lt SoftwareSerial h gt SoftwareSerial library to create a Serial connectio define RxD 6 blueToothSerial receiving pin define TxD 7 blueToothSerial transmitting pin define PLCvoltageIn A0 Reads the analog out from the plc on analog in AQ define RotorCurrent 11 The meassured current to the plc through PWM and L Zdefine ConnectionStatus 8 Sets a digital LOW on pin8 when the bluetooth conne define PackageDeliverd 9 0utput pin for bt package status define Power 10 Master Arduino Power define Light 3 Light pin int PLCvoltageLocal 0 Store the output from the PLC in PLCvoltageLocal int Confirmation Stores confirmation voltage sent back from the slav int FieldCurrentLocal 0 Store the value of FieldCurrent sent from the slav int FieldCurrentConstrained float volttest int voltmax 255 int lightstep 0 SoftwareSerial blueToothSerialCRxD TxD blueToothSerial connected to RxD and Tx SoftEasyTransfer ETin ETout In out object Recs A Structures n Peron gt Sending 3 o 2 struct SEND
15. EY RESET F Nanual Mode p ADD E Yo P Manual Mode If 2 Manual If Reg variable Regulate PID PID ACTUAL Y ISET POINT LINITS_ACTIVE IKE OVERFLOW TN TV Y MANUAL Y OFFSET Y MIN Y MAX m J AD MANUAL j RESET 1 8 Manual Node pit LF Figure 38 The Regulator POU contains all the different controllers used for automatic control as well as the IF statement POU which handles the manual operation IF statement As previously stated the function block IF statement is utilized during manual operation It consists of a few rows of code written in ST that passes on the input Manual_If Reg from the Regulator POU to its output when activated The vari able Manual If Reg is directly connected to the Manual visualization and ad justable up to 5V with the help of the created numerical keyboard BluetoothCheck The PLCs digital inputO receives the status of the Bluetooth connection from the master Arduino While the connection is functioning the AVR will run as normal but if the connection is lost then the two outputs of the BluetoothCheck POU are assigned the same value in order to create e t 0 according to equation 2 SD Save Read This is a function block written in CFC that lets the user save and load controller parameters from the contro
16. SFC Mode Sequence is the program that keeps track of the projects position see Figure 37 The different steps are mainly occupied by the controllers Each transitions mode0 to model2 correspond to their own STATUS value For example if the pi controller is selected from the control panel STATUS will be assigned the value 2 which opens the transition Mode2 gaining the user access to its content after the system has finished reading the SD 29 card Mode0 and Mode7 to Mode12 all open when STATUS equals zero which occurs at every startup and every exit After an exit is performed the project position gets pushed to Init step before getting moved onwards to the off step where it resets important values and reads the SD card X Mode0 Init Mode10 Modell Figure 37 Each step of the Mode Sequence POU holds the information needed for its corresponding position Actions assigned to steps Init ST Checks if the user have pressed Back or Exit to determine if the system must read the SD card or not off ST Resets controller parameters and other internal variables Reads the SD card if the result of the Init step activates the action p ST pi ST pd ST pid ST A controller is activated after the STATUS value corresponding to its step is set Then a user can load the saved parameters from the SD card or manually enter new values by commanding the Numpad_B POU If the user opts to save a new value th
17. VAR_INPUT Current_Value REAL Current value of the controlled variable P_Part REAL Proportionality coefficient unity gain of the P part I_Part REAL Reset time reciprocal unity gain of the I part given in seconds e g 0 5 for 500 msec D_Part REAL Derivative action time unity gain of the D part in seconds e g 0 5 for 500 msec Desired Value REAL Desired value command variable Manual_If Reg REAL Manual Field Current value Manual_Mode_pd BOOL Controls if PD controller is used Manual Mode pid BOOL Controls if PID controller is used Manual_Mode_ If BOOL Controls if manual field current is used Manual Mode off BOOL Not in use just visual help OnOff BOOL On Off for the Controllers PD and PID END VAR VAR OUTPUT Y Out REAL Manipulated value calculated by the function block Y KPx D 1 TN Integral edt TVdD dt Y_OFFSET END_VAR VAR Regulate PID PID Used for PI and PID regulation Regulate_PD PD Used for P and PD regulation If_state IF_statement When variablel and 2 are TRUE then output varaible3 Y_Man REAL Defines output value Y in case of MANUAL TRUE Y_Off REAL Offset for the manipulated variable Y Y Min REAL 0 Minimum value for Y out Y Max REAL 13824 13824 5V 27648 10V Lower resp Y Min upper limit Y Max for the manipulated variable Y If Y exceeds these limits output LIMITS ACTIVE will be setto TRUE an
18. fi analogWrite RotorCurrent voltmax Send the field if Confirmation PLCvoltageLocal digitalWrite PackageDeliverd LOW else digitalWriteCPackageDeliverd HIGH void BTtransfer void ETout sendData Send the data out SendData PLCvoltage PLCvoltageLocal 80 for int 1 0 i 5 i ETin receiveData Read the incomming data delay 10 1 Confirmation ReceiveData PLCvoltageconfirmation FieldCurrentConstrained constrain ReceiveData FieldCurrent 0 1023 FieldCurrentLocal mapC FieldCurrentConstrained 0 1023 0 255 void Breathing void i for lightstep 0 lightstep lt 255 lightstep 1 analogWrite Light lightstep if Clightstep gt 150 delay 4 if Clightstep gt 125 88 Clightstep lt 151 delay 5 if CC lightstep gt 100 amp amp lightstep lt 126 1 delay 7 if CC lightstep gt 75 88 lightstep lt 101 I delay 10 if CC lightstep gt 50 88 lightstep lt 76 1 delay 14 if CC lightstep gt 25 amp amp lightstep lt 51 1 delay 18 if CC lightstep gt 1 88 lightstep lt 26 1 delay 19 forClightstep 255 lightstep gt 0 lightstep 1 analogWrite Light lightstep if Clightstep gt 150 delay 4 if CClightstep gt 125 88 lightstep lt 151 I delay 5 if CC lightstep gt 100 amp amp lightstep lt 126 I 81 delay 7 if CC lightstep gt
19. ht t sedute e 43 A OT 45 1 Introduction 1 1 Background The energy that exist in flowing water has been used as a power source for centuries From the old water wheels to the present hydroelectric power plants harnessing the energy out of running water plays an ever growing part in providing for our global electricity consumption In a day when topics involving environmental issues and climate change is on everyones mind substantial effort and money is put in to the research and development of renewable energy with hydroelectric alternatives and especially hydropower paving the way Most hydropower plants use synchronous generators SGs to provide power to the grid The grid connected SG must be able to maintain a constant terminal voltage and compensate for disturbances that may cause it to differ from its de sired voltage level The SGs voltage level is monitored and kept stable by regu lating the field current I applied to the rotor winding increasing or decreasing it until a desired terminal voltage is met An external automatic voltage regulator AVR handles the regulating procedure Together with an exciter they form what is known as the excitation system 1 2 Project description At Uppsala University the Division of Electricity has an experimental generator test setup for hydropower research There an excitation system including a six phase brushless exciter and a Bluetooth communicating AVR is being installed The pri
20. rotating on the same shaft as the main SG The voltage then gets rectified turning it into DC so that it can be used to magnetize the rotor poles The rectifying system can be setup in different variations all carrying their own pros and cons see examples bellow The stationary non controlled rectifying system can t directly control the field current of the SG thus the AVR output must directly control the strength of the exciters magnetic field to enable an adjustable terminal output on the SG Since it is a stationary system it connects to the SG with brushes and slip rings A stationary controllable rectifying system uses thyristors instead of stationary diodes and can therefore control the exciter output directly The AVR triggers the thyristor gates to make them conduct providing the system with a better re sponse time in comparison to systems that are non controllable Slip rings and brushes are used to apply the SG field current The rotating rectifying system often referred to as a brushless excitation system is mounted on the same shaft as the SG eliminating the need of slip rings and brushes by connecting its output directly to the SGs field winding Because the system is rotating the AVR controls the SGs terminal voltage by regulating the exciters magnetic field see Figure 5 Pilot exciter Rotating structure Main generator g g i 1 Armature AC exciter Field Armature Three CO i O Field ph
21. system when using a PID Controller shows a two seconds long settling time PID with no overshoot 239 191 143 95 47 0 RUNS el Ler AS Ol 13 27 38 13 27 40 13 27 42 13 27 44 13 27 46 13 27 48 Back Figure 50 Step response of the closed loop system using a PID with no overshoot PID with some overshoot 239 191 143 i MN 95 47 Do I 110 244 Pal l Wall 13 30 27 13 30 29 13 30 31 13 30 33 13 30 35 13 30 37 Back Figure 51 Step response of the closed loop system using a PID with some overshoot Pessen integral rule 239 191 143 E 47 Anal 2 1 Rl l 13 32 47 13 32 49 13 32 51 13 32 53 13 32 55 13 32 57 Back Figure 52 Step response of the closed loop system using the Pessen integral rule 6 3 Manual operation Figure 53 displays the behavior of the terminal voltage when a 3 05V control voltage is supplied to the SSRs during manual operation Because no controller is applied the settling time of the curve represents a time delay mainly caused by the rotor inductance Figure 53 Terminal voltage during manual operation 3 05V 6 4 SSRs Problems related to the two SSRs became clear during manual operation An in creased control voltage should result in an increased field current but as seen in the two figures bellow the behavior is exactly the opposite e Manual Field Current e Manual Field Current UPPSALA Controller UPSA
22. the output Figure 18 A Current transducer 21 3 7 SSR Crydom MCPC1250A Six different SSRs receive a control signal from the AVR to adjust the level of AC being fed to the rectifying circuit see component 13 in Figure 1 The SSR is an electronic switching relay that works without the need of moving parts The MCPC1250A is a proportional SSR with microprocessor driven phase angle control An analog DC input signal between 0 and 5 volts controls the power supplied to its load from 0 to 100 of an AC voltage Figure 19 Output behavior of SSR at 2 5V DC input 22 19 3 8 Other Operational amplifier OPA337 Part of the differential amplifying circuit on the rotating custom made shield that enhances the resolution of the current transducer see component3 in Figure 1 Router Netgear CG3100 Enables computers to wirelessly connect to the system through Wi Fi see component 16 in Figure 1 Rectifier diode modules Will form a six phase rectifying bridge on the rotating shaft to provide the rotor winding with a DC voltage see component 7 in Figure 1 Traco AC DC power supply Supplies 24V DC to the PLC see component 19 in Figure 1 Traco DC DC converter Two converters in series supply 12V and 24V to the custom made shield on the rotating Arduino see components 17 and 18 in Figure 1 Three phase bridge rectifier DB15 04 Rectifies the AC voltage from three of the phases belonging to the six phase
23. the rotor winding The results http AMww teknat Uu se student obtained complies with the assigned requirements set for this thesis and the AVR The primary focus of this thesis mainly lies in the construction of the control system which include the programming of both PLC and Bluetooth communicating devices Handledare Mattias Wallin Amnesgranskare Urban Lundin Examinator Nora Masszi ISSN 1654 7616 UPTEC E 13002 Sponsor ABB Acknowledgements I would like to thank my reviewer Urban Lundin and my supervisor Mattias Wallin for giving me the opportunity to perform my thesis in a field that I find extremely interesting Your help and support along the way has truly been more than I ever could have hoped for Also I would like to thank my co worker and friend Boris Ivanic for making the long hours pass with ease Sammanfattning Examensarbetet som utf rts omfattar 30hp och r ett avslutande moment inom civilingenj rsutbildningen i elektroteknik Arbetet gick ut p att praktiskt framst lla en automatiserad sp nningsregulator for reglering av terminalsp nningen hos synkrongeneratorn Svante vid Uppsala universitetets avdelning f r elektricitetl ra Sp nningsregulatorn anv nder Bluetoothteknik f r att verf ra en PLC producerad styrsignal till fasmonterade SSR er som styr hur stor andel av sp nningen fr n en sexfasig borstl s matare som skall anv ndas f r magnetiseringen av rotorn Testk rning av sp nningsregu
24. use interface that is pretty straight forward when it comes to writing and uploading There are however two settings that has to be correct in order to preform an upload Once the correct Arduino board and the correct serial port have been chosen from the tools menu the sketch will be ready provided that the code is compiled without errors 7 9 22 5 Method This chapter describes the construction of the AVR system It aims to provide the reader with the information necessary to understand the underlying structure of the sketches and programs that have been written for the two Arduinos and the PLC so that future changes may be easily implemented Aside from the pro grams this chapter includes the construction of two custom made shields and an overview of the excitation system used to preform the test runs 5 1 Bluetooth connection AT Commands The two BTshields need to be configured so that communication between them is possible By binding the addresses of the two shields they will connect to each other if they are within a 10m radius To program a shield is a step by step process 1 The shield is placed on an Arduino It is important that the Arduino itself isn t programed with any serial running code 2 The jumpers on the UART multiplexer are placed so that the transmit ting and receiving pins of the shield connect to the atmegal6U2 USB to serial converter on the Arduino see Figure 21 OOOO e Mle e e e
25. 01 IF num 0 0002 THEN 0003 SavingText Save 0004 Save_Done_light_out FALSE 0005 END_IF 0006 0007 IF Delete_Data_Segment_123_in 1 AND Save_PID_in 0008 THEN 0009 num 1 0010 SavingText Saving 0011 END_IF 0012 0013 IF Delete Data Segment 123 in 1 AND NOT Save PID in 0014 THEN 0015 SavingText Saving 0016 END_IF 0017 0018 IF Delete Data Segment 123 in 2 AND num 1 AND Save Done AND NOT Save Err 0019 THEN 0020 Save_Done_light_out TRUE 0021 SavingText Saved 0022 Read_Done_light_out FALSE We are able to read only if a new value is saved 0023 END IF 0024 0025 IF Delete Data Segment 123 in 2 AND num 1 AND Save Done AND Save Err 0026 THEN 0027 Save Done light out FALSE 0028 SavingText Error 0029 END IF 0030 0031 IF Open Read close 12345 in 2 0032 THEN 0033 Read Done light out FALSE 0034 Read Done Value out 0 0035 END IF 0036 0037 IF Open Read close 12345 in 5 AND Read Done AND NOT Read Err 0038 THEN 0039 Read Done light out TRUE 0040 Read Done Value out 1 0041 END IF 0042 0043 IF Open Read close 12345 in 5 AND Read Done AND Read Err 0044 THEN 0045 Read_Done_light_out FALSE 0046 Read_Done_Value_out 0 0047 ReadingText SD Error 0048 Read_Done_Value_out 1 0049 END_IF 0050 0051 Visualization of reading SD card 0052 IF Read_Done_light_out 0053 THEN 0054 ReadingText SD Done 0055 ELSE 0056 Readin
26. ATUS Mode5_IF 54 0007 EQ STATUS Mode6_auto 67 62 SD Save Read 0001 FUNCTION_BLOCK SD_Save_Read 0002 VAR_INPUT 0003 0004 PID_array ARRAY 1 4 OF DWORD Saving Status Kp Ki Kd values to SD Card 0005 Last_Button_Pressed BOOL 0006 Read_Button_Pressed BOOL 0007 Save_Button_in BOOL 0008 Read_Button_in BOOL 0009 Save_PID BOOL If true saving values 0010 Read_PID BOOL If true reading values 0011 0012 Delete Data Segment 123 BYTE 1 Delete file Delete 0013 2 Write data set Open create Write append Close 0014 3 Write segment label Open create Write append Close 0015 0016 Open Read close 12345 BYTE 1 Open file search sector read data set Open Seek Read 0017 2 Open file read data set Open Read 0018 3 Read next data set Read 0019 4 Read data set close file Read Close 0020 5 Close file Close 0021 0022 STATUS IN INT 0023 0024 END VAR 0025 VAR OUTPUT 0026 PidParameter ARRAY 1 4 OF DWORD 0027 Saving BOOL 0028 Clearing BOOL 0029 Closing BOOL 0030 Reading BOOL 0031 Read Done Value INT 0032 Saving Done light BOOL 0033 END VAR 0034 VAR 0035 Read Done Light
27. C program Now that the process has started other POUs like programs functions or function blocks can be written to the project while the PLC_PRG acts as an outer shell holding POUs together Every POU consists of two parts a declara tion area where variables IOs and imported elements are declared and a body where the writing of the actual program takes place 8 A body is written in one out of the six languages listed below The first five are part of an international electrotechnical commission IEC supported classifica tion while the sixth one is well suited for feedback applications Textual languages IL Instruction List IL is a primitive language not used by many today Low level languages An IL code consists of a series of instructions each on a new line The instruction lines are piled upon one another to resemble a list form hence the name IL ST Structured Text ST is a high level language much like C C and Java meaning it is built to look like a human language or a mathematical notation making it easy to both use and understand 21 Graphical languages e SFC Sequential Function Chart The graphical oriented language SFC makes it easy to graphically visu alize step sequences of running processes A POU written in SFC mainly consists of steps actions and transitions A step have the form of a block and are connected to each other with transition lines that become active once a transition condi
28. Desired Terminal Voltage Read Numpad Value END IF 58 pid 0001 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 StatusText PID Controller Mode Save PID FALSE IF Clear Button THEN Mode Delete Data Segment 123 Mode Save PID TRUE END IF i m IF Save Button THEN Mode Delete Data Segment 123 2 Save file Mode Save PID TRUE END IF IF Last Button Pressed OR Read Button Pressed THEN Kp Out ReadSavedStatus p Ki Out ReadSavedStatus i Kd Out ReadSavedStatus d END IF IF Numpad Pointer 1 AND NumP OK Button THEN Kp Out Read Numpad Value END IF IF Numpad Pointer 2 AND NumP OK Button THEN Ki Out Read Numpad Value END IF IF Numpad Pointer 3 AND NumP OK Button THEN Kd Out Read Numpad Value END IF IF Numpad Pointer 5 AND NumP OK Button THEN Desired Terminal Voltage Read Numpad Value END IF Clear old saved file Set Kp value with numpad Set Ki value with numpad Set Kd value with numpad Set
29. LA Controller UNIVERSITET UNIVERSITET Field Current 10 00A Terminal Voltage 119 50V SSR Vcc 2 75V Field Current 13 00A Terminal Voltage 150 75V SSR Vcc 2 62V Exit Visualization Stop Start Exit Visualization Stop Start Figure 55 150 75V at 2 62V control voltage Figure 54 119 5V at 2 75V control voltage during during manual operation manual operation 6 5 The Bluetooth connection The binding of the Bluetooth addresses made the devices connect to each other fairly rapidly seconds after a power up The data stream that follows runs smoothly and in the designated speed set by the baud rate However connection failures between the two BTshields have occurred during operation lasting for less than a second and seemingly occurring at random When or if a failure occurs the rotating Arduino will keep a constant control signal fed to the SSRs at the level in which connection was lost The protective code programmed in the 40 PLC for this scenario BluetoothCheck will also freeze the value of the control signal which prevents the rotating Arduino from dropping it down to zero once a connection is re established The safety measures put in to place have proven themselves to be sufficient enough to ensure a non fluctuating terminal voltage during a Bluetooth connection failure 41 7 Conclusions The work done during the course of this thesis have reached far beyond what had been initially in
30. Saved tatus d Delete Date Segment 123 open Read close 12345 pam 1w in 1 in 2 in I in 4 in 5 analog input 1 in 6 in 7 in d analog input Regulator p i d Conversion Tii to Tair fp in Kp cut ki Tht u h Regulator Current Value Y Out P Part T Part D Part Desired Value Manual If Beg Manual Mode p Manus Mode pid Manual Mode If Manual Mode off Danes Static rlotating Eratic or Rotating Run Run in Run out Beatie Static in Rotating Rotating in digital input 0 Bluetooth in figital Input Arduino Power out out H out A out out dj ED Status out ED p out 7 D i out D d out Terminal Voltage Regulator Output Voltage WNeansured Field Cuegant Var desired value analog output 48 Numpad_B 0001 FUNCTION_BLOCK Numpad_B 0002 VAR_INPUT 0003 OK BOOL 0004 Num_Pad_1 BOOL 0005 Num_Pad_2 BOOL 0006 Num_Pad_3 BOOL 0007 Num_Pad_4 BOOL 0008 Num_Pad_5 BOOL 0009 Num_Pad_6 BOOL 0010 Num_Pad_7 BOOL 0011 Num_Pad_8 BOOL 0012 Num_Pad_9 BOOL 0013 Num_Pad_0 BOOL 0014 Num_Pad_Clear BOOL 0015 Num_Pad_Dot BOOL 0016 END_VAR 0017 0018 VAR_OUTPUT 0019 Numpad out REAL Sending numpad values to Mode sequ
31. UPTEC E 13002 Examensarbete 30 hp Juni 2013 UNPIPSALA UNIVERSITET An automatic voltage regulating system with Bluetooth communicating devices for brushless excitation of a synchronous generator Eyuel Tibebu P byggnadsprogrammet till civilingenj rsexamen i elektroteknik Master Programme in Electrical Engineering Abstract An automatic voltage regulating system with Bluetooth communicating devices for brushless excitation of a synchronous generator UNIVERSITET Eyuel Tibebu y 8 Teknisk naturvetenskaplig fakultet UTH enheten This thesis has been performed in order to earn a master s degree in electrical engineering The task was Bes ksadress to implement an automatic voltage regulator AVR to Angstr mlaboratoriet th inal fth h L gerhyddsv gen 1 control the terminal vo tage o the sync ronous Hus 4 Plan 0 generator Svante at the Division of Electricity at Uppsala University The AVR uses Bluetooth oo technology to transfer a control signal produced by a 751 21 Uppsala programmable logical controller PLC to phase mounted SSRs that decides what proportion of the AC Telefon from a six phase brushless exciter that is to be used 0185413003 for the magnetization of the rotor Telefax Test runs of the AVR were preformed with a regulator 018 471 30 00 optimized according to the Ziegler Nichols method and a static exciter that uses brushes and slip rings to Hemsida apply voltage to
32. UTPUT 0012 Save Done light BOOL 0013 Read Done light BOOL 0014 Save Err light BOOL 0015 Read Err light BOOL 0016 Save out BOOL 0017 Clear out BOOL 0018 Close out BOOL 0019 Read out BOOL 0020 0021 0022 END VAR 0023 VAR 0024 0025 TON The function block Timer On Delay implements a turn on delay 0026 TP The function block is HIGH for a certain time and then returns to LOW 0027 0028 Close timerl TP 0029 0030 Read timer TP 0031 Save timerl TP 0032 Save timer2 TON 0033 Clear timer TP 0034 Save Err timer TP 0035 Read Err timer TP 0036 Save done timer TP 0037 Read done timer TP 0038 0039 Clear time TIME T 500ms 0040 Save timel TIME T 1500ms 0041 Save time2 TIME T 500ms 0042 Read time TIME T 50ms 0043 Close timel TIME T 1500ms 0044 0045 Light time TIME T 200ms 0046 0047 0048 0049 END VAR 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 Clear timer Save t imer2amm TON qd TP Save IN Q Clear_time PT ET Save timerl _ TP ob IN Q IN Save_done e Save timel PT ET PT Save time2 Read timer S TP Read IN Q Read_time PT T Read_done Close_time
33. _DATA_STRUCTURE int PLCvoltage Outgoing Voltage h SEND DATA STRUCTURE SendData Group name SendData Pi RARE Receiving e struct RECEIVE_DATA_STRUCTURE int PLCvoltageconfirmation Incomming confirmation int FieldCurrent Incomming Field current data RECEIVE_DATA_STRUCTURE ReceiveData Group name ReceiveData Ps A e End of structures 2 void setup i Serial begin 9600 Open serial blueToothSerial begin 9600 79 ETin beginCdetails ReceiveData amp blueToothSerial Start the b ETout begin details SendData amp blueToothSerial Input and outputs pinMode RxD INPUT pinMode TxD OUTPUT pinMode PLCvoltageIn INPUT pinModeCConnectionStatus OUTPUT pinMode RotorCurrent OUTPUT pinMode PackageDeliverd OUTPUT pinMode Light OUTPUT pinMode Power OUTPUT pinMode statusPin INPUT void Status void i while ClblueToothSerial available Stay insid i digitalWriteCConnectionStatus LOW Serial println NO BT BreathingO analogWrite Light 255 volttest C 5 ReceiveData FieldCurrent 1024 0000 3 91 52 Serial print ReceiveData FieldCurrent Serial print 95 Serial prin Serial printlnCanalogRead PLCvoltageIn digitalWrite ConnectionStatus HIGH PLCvoltageLocal mapCanalogRead PLCvoltageIn 0 1023 0 255 Read the o BTtransfer Start BT t analogWrite RotorCurrent FieldCurrentLocal Send the
34. andby Figure 10 A Scatternet consisting of two interlacing Piconets 14 Physical links The synchronous connection oriented SCO and the asynchronous connection less ACL are two different connections that Bluetooth utilizes to form the links between a master and a slave Each unit can have one ACL link and two SCO links three if the unit is of master character working at the same time SCO Channel that handles voice transfers with a link working at 64kb s in both directions ACL Uses the slots not occupied by the SCO to send and receive data between master and all slaves A master can broadcast to all slaves at once or talk to them separately through ACL Modes One of the greatest strengths of Bluetooth technology is the low power consump tion required during different operational modes Active When a module is in this mode it s actively taking part of a physical link consuming around 40mA to 50mA in the process The master polls the slave to enable them to send packages and re synchronize e Sniff A low consumption mode where the slave only listens to the Piconet during brief instants of time reducing the power consumption to this time window 14 Hold Another low consumption mode that consumes less power than the sniff mode An ACL comnection between two devices can be put in hold mode 1f there isn t any need for their transceivers to be active during a certain time period A counter in the Bluetooth m
35. are represented by the boxes below 0002 0003 Init is the initializing box at first startup 0004 off box is where the system is when not running anything 0005 p is the p control box 0006 pi is the pi control box 0007 pd is the pd control box 0008 pid is the pid control box 0009 i_f is the manual field current control box 0010 auto is the automnatic control box 0011 0012 0013 PROGRAM Mode Sequence 0014 VAR_INPUT 0015 Read_Button_Pressed BOOL 0016 Last_Button_Pressed BOOL 0017 0018 Read Numpad Value REAL 0019 NumP OK Button BOOL 0020 0021 Save Button BOOL 0022 Clear Button BOOL 0023 Close Button BOOL 0024 Read Button BOOL 0025 read done INT 0026 Saved light BOOL 0027 ReadSavedStatus Status INT 0028 ReadSavedStatus p REAL 0029 ReadSavedStatus i REAL 0030 ReadSavedStatus d REAL 0031 0032 END VAR 0033 0034 VAR OUTPUT 0035 0036 Read Button Out BOOL FALSE 0037 Mode Save PID BOOL 0038 Mode Read PID BOOL 0039 0040 Mode Delete Data Segment 123 BYTE 0041 Mode Open Read close 12345 BYTE 0042 0043 STATUS INT 0044 Desired Terminal Voltage REAL 156 0045 Kp Out REAL 0046 Ki Out REAL 0047 Kd Out REAL 0048 var Manual If REAL 0049 0050 0051 0052 0053 END VAR 0054 0055 VAR 0056 0057 StatusText STRING Text for visualizations 0058 Status Ready INT 0 0059 0060 0061 Numpad Poin
36. ase ac T gt Manual control Aux inputs Regulator Figure 5 A brushless excitation system 4 Static exciters A static exciter is a completely stationary exciter that doesn t include any moving parts The most commonly form of this type of exciter consists of a static three phase bridge rectifier that is fed power from the terminal output of the SG through a step down transformer meaning that unlike other types of exciters they don t feature an external generator The rectifier either controllable or non controllable supply field current to the SG with the help of brushes and slip rings Slip rings and brushes Veo AVR con From auxiliary source From SG terminals Figure 6 A static excitation system 2 2 2 2 Automatic voltage regulation The job of the AVR is to ensure a constant and stable terminal voltage on its connected generator If the load condition changes the AVR must regulate the excitation output to compensate for the new demand This is done by running the error between the terminal voltage and a reference value through a regulating al gorithm that is programmed in a logical controller PLC A brief introduction In the years before 1968 electromechanical processes especially used by car manufacturers were controlled by relay based equipment This equipment would consist of hundreds and sometimes thousands of parts that had to be updated yearly due to
37. ay to make the SSRs work as intended or come up with an alternative solution to control the voltage level One idea is to not have any SSRs before the bridge rectifier and only use one DC SSR to control the DC voltage instead Controller The parameters produced by the Ziegler Nichols tuning rule provide a solid foundation to start with However adjustments should be made in order to obtain even better results Another option is to mathematically calculate the transfer function of the entire system and use it to find the optimal controller PLC Arduino communication The communication that takes place between the PLC and the stationary Arduino is done by measuring DC voltages The PLC and the Arduino interpreters their received input voltages as a data type so that it may be used for its intended pur pose It would be preferable to use a serial communicating link between the two devices which would eliminate the need for the custom made shield on the Arduino It is possible to connect the USB port of the Arduino to the serial communication port on the PLC just like when connecting to a computer Not only would data be sent faster and more accurate but the 10 bit resolution of the analog input on the rotating Arduino would be used to its fullest Bluetooth communication The Bluetooth connection is fully functional but not optimized in any way An in depth study on how Bluetooth communicating devices work might provide an explanation t
38. car model upgrades An update of a control system was both costly and time consuming and had to be done manually on site The introduction of the minicomputer in the 1960s gave birth to the idea of auto mating electromechanical process with the use of programable computer based devices the Programable Logic Controller or the PLC as it is abbreviated had been born In the beginning the PLCs were programmed in Ladder Diagram to resemble the schematic outlining of relay logic so that it wouldn t demand a rich programming background in order to use it Since then its programming environment has evolved to include a variety of languages and the usability nowadays covers mo tion control sequential relay control process control networking and much more making it a very useful tool in the modern day industry 26 Reference Value Figure 7 The green boxes displays the role of the PLC within an excitation system 2 3 The PID controller A feedback controller makes adjustments to the input of a system with the pur pose of correcting any eventual errors that it might have on its output If a system output deviates from its target value the controller output either increases or de creases attempting to steer 1t back 2 5 The control error The control error e t is the difference between the reference value r which is the desired value of the system output and the actual value y t that the output produces e t
39. ceivedata PLCvoltage Figure 27 Data being assigned to structure variables 25 sendData and receiveData are functions incorpor ated in the SoftEasyTransfer library Each time they are called upon data either gets pushed out or re ceived BTtransfer loops inside the sketch assigning the incoming and outgoing data to its internal or structure associated variable Other parts of the Arduino sketches can be seen in the Arduino appendix and are considered self ex planatory Figure 28 Arduino and the stackble BTshield mounted together 5 3 Custom made shields Two custom made stackable shields one for the stationary Arduino and one for the Arduino on the rotating shaft had to be constructed to make them compatible with their connected devices Low pass filters transistor inverters and a differential amplifying circuit are all features of the two custom shields Figure 29 The stationary custom made shield left and the rotating custom made shield right 5 3 1 Low pass filter An analog output on the Arduino Uno delivers a R PWM signal that has to be converted to an analog DC signal in order to be compatible with the dif IUU c Won ferent devices used throughout this thesis PWM signal A low pass filter will function as a D A converter that transforms the PWM output to a DC voltage Figure 30 D A conversion with a low that is proportional to the duty cycle pass filter 23 5 3 2 Transistor inv
40. ctrical frequency f of an SG is determined by its num ber of poles P and the rotational speed of the rotor magnetic field n set by the prime mover see equation 1 n P 2 1 Fe 120 1 The frequency of the generator is set slightly higher than the grids to en sure that the generator will supply power instead of consuming it acting as a motor during connection Same phase angles Method After the frequency is set voltages in the interacting systems will change phase relative to each other in a slow manner A frequency meter observes the changes until the phase angles are equal A grid connection is possible once all conditions have been met Ze Figure 3 The twelve pole SG Svante must rotate at 500rpm to match the grid frequency 50Hz 2 2 Excitation systems Most generators need excitation systems to generate the magnetic field necessary to induce a voltage in the stator Excitation systems consists of an exciter and an AVR working to supply the SGs rotor winding with a field current Z that will magnetize its poles A voltage V coming from the exciter is applied to the rotor winding creating the current flow Z while the AVRs role is to control what voltage level the exciter should put out by reading various inputs from the excita tion system and passing on a control signal One can think of the AVR as the controlling device of an electrical valve between the exciter and field winding adjusting the amoun
41. d Y will be kept within the prescribed range This control will only work if Y MIN Y MAX Bluetooth BluetoothCheck END VAR 73 Bluetooth BluetoothCheck Current_Value Current_input Desired value Desired input Manual Mode pic Current outputj Manual Mode If Manual If Reg Regulate PD ACTUAL SET POINT Y MANUAL Y OFFSET Y MIN Y MAX MANUAL 74 BluetoothCheck 0001 FUNCTION_BLOCK BluetoothCheck 0002 VAR_INPUT 0003 Current_input REAL 0004 Desired_input REAL 0005 END_VAR 0006 VAR_OUTPUT 0007 Current_output REAL 0008 Desired_output REAL 0009 END_VAR 0010 VAR 0011 varl REAL 0012 END_VAR 0001 Bluetooth enabled 0002 IF digital input 0 FALSE 0003 THEN 0004 Current_output Current_input 0005 Desired output Desired input 0006 varl Desired input 0007 END IF 0008 0009 Bluetooth dissabled 0010 IF digital input 0 TRUE 0011 THEN 0012 Current_output varl 0013 Desired_output varl 0014 END IF 75 IF Statement 0001 IF_statement controlls the manual control of the field current 0002 0003 FUNCTION BLOCK IF statement 0004 VAR INPUT 0005 variablel BOOL OnOff 0006 variabl
42. desired terminal voltage value with numpad 59 0001 0002 0003 0004 0005 0006 0007 0008 0009 StatusText Manual Field Current Controller IF Numpad Pointer 4 AND NumP OK Button Set the If value with numpad THEN var Manual If Read Numpad Value END IF var Manual If var Manual If slider 54 60 auto 0001 0002 0003 0004 0005 0006 0007 Li un Mode Open Read close 12345 Mode Read PID TRUE Kp Out ReadSavedStatus p Ki Out ReadSavedStatus i Kd Out ReadSavedStatus d 61 Mode 0001 Mode checks the status and determines in which mode the system is in See Mode Sequence 0002 0003 FUNCTION_BLOCK Mode 0004 VAR_INPUT 0005 0006 0007 STATUS INT 0008 END_VAR 0009 VAR_OUTPUT 0010 Model_p BOOL 0011 Mode3_pd BOOL 0012 Mode6_auto BOOL 0013 0014 Mode2_pi BOOL 0015 Mode4_pid BOOL 0016 0017 Mode5_IF BOOL 0018 0019 Mode0_off BOOL 0020 END_VAR 0021 VAR 0022 0023 END VAR 0001 EQ STATUS Mode0 off 0 0002 EQ STATUS Model_p IH 0003 EQ STATUS Mode2_pi 2 0004 EQ STATUS Mode3_pd 34 0005 EQ STATUS Mode4 pid 4 0006 EQ ST
43. e 17 3 4 BTshield Vii hee levi cle ains 18 3 5 Tillquist voltage measuring transducer sene 18 3 6 Current transducer Honeywell CSLA1GD eee 19 3 7 SSR Crydom MCPCI2I QA nre a a a nennen 19 SOM E od NACER dE 20 A NN 21 4 1 PS501 Control Builder Plus essen 21 42 CoD6eSys cette saine hu ote ee es s 21 43 Ardumo T0 eee Regen dbi nde 22 SM Id mI ULT 23 5 1 Bluetooth connection AT Commands sse 23 5 2 Programming the Arduinos cccecccessseessesseeeseeceseeeseeenseceseeesseesseesseeeats 24 5 3 Custom made ShieldlS sssesssrserrsrrrsrrsrrsrrsrrnerrnrsrrernrerrrrrrsrrsnnerrrrnrrr rs nen nr nn 26 5 3 LOWSPASS lit ld iS diia 26 5 3 2 Transistor inverter eene nnne 26 5 3 3 Differential amplifying circuit essen 27 5 4 Programimmg the Plain 28 DA POU Sect EE a UU RE 29 5 42 Visuali Zati ons A ieee UB ai etes 34 5 5 The control cabinet essere 35 5 6 Th excitation System 36 6 Results eene ertt n tete ete etre tet 37 6 1 Applying the Ziegler Nichols tuning rule eese 37 6 2 Controller performances step TEeSPONSCS sssersrrserrerrsrrsrrerrrsnrerrsnnennrsn nn 38 6 3 Manual operation nnrir i nnns 40 0 4 S ee oi t ODER NR AA 40 6 5 The Bluetooth connection me msessesserrsrrsrrrsrrerrsrrrsrrsrrsrnrerrrrnesnrsrnern rn rr rn rerna 40 RN A teta t DO eee E 42 SSEUture WO etre
44. e and pur pose of the different devices 1 BTshield _ 4 BTshield 11 Current transducer NN B 12 Voltage transducer 3 Custom shield i 6 Custom shield Figure 1 The working principle of the finalized brushless excitation system being installed at the Division of Electricity Component walkthrough 1 ABluetooth module called BTshield is configured as a slave and moun ted on the rotating Arduino microcontroller board 2 The wireless con nection established with the other BTshield 4 makes it possible to control the solid state relays SSRs 13 from a stationary position 2 The rotating Arduino is programmed to handle the data received from the PLC and to provide feedback gathered from its inputs 3 A custom made shield mounted on the rotating Arduino 2 that connects to the current transducer and the SSRs The supply voltage needed to operate all rotating devices included in the excitation system is received from two DC DC converters 17 18 4 The master BTshield is mounted on the stationary Arduino 5 inside the control cabinet It exchanges data including the regulated control signal with the other BTshield 1 5 The stationary Arduino microcontroller board is programmed much like the rotating Arduino 2 It handles the data being exchanged with the PLC 14 and Arduino 2 A universal serial buss USB cable connec ted to the control panel 15 provides power a
45. e2 BOOL Manual Mode If 0007 variable3 REAL Manual If Reg 0008 END VAR 0009 VAR OUTPUT 0010 out REAL Output value 0011 END VAR 0012 VAR 0013 0014 END VAR 0001 out 0 0002 0003 IF variablel AND variable2 0004 THEN 0005 jout variable3 0006 0007 IF variable3 gt 13824 13824 5V Arduino maximum 0008 THEN 0009 jout 13824 0010 0011 END_IF 0012 END_IF 0013 76 Converter 0001 FUNCTION_BLOCK Converter 0002 VAR_INPUT 0003 0004 in_1 ARRAY 1 4 OF DWORD ReadSavedValue 0005 in_2 REAL analog_input_1 Measured field current 0006 in_3 DWORD Status 0007 in_4 REAL Desired Terimnal Voltage 0008 in_5 REAL var_P Kp 0009 in_6 REAL var I Ki 0010 in 7 REAL var D Kd 0011 in 8 REAL analog input 0 Current Value 0012 in 9 REAL Truncated value from PID controller 0013 0014 END VAR 0015 VAR OUTPUT 0016 out 5 ARRAY 1 4 OF DWORD PID Array 0017 out 1 REAL Tillquist VoltageTransducer meassured Voltage 0018 out 2 REAL Control Voltage to SSR Vcc 0019 out 3 REAL Meassured Field Current CurrentTransducer 0020 out 4 REAL Desired v
46. eSys 2 3 Version 2 0 3S Smart Software Solutions GmbH 9 Getting Started with Arduino Massimo Banzzi First Edition 2008 10 http www05 abb com global scot scot209 nsf veritydisplay a9d2e5d590304dc7c125799800336877 file 1sbc125003c0204 automation 20products_new br pdf 2013 06 10 11 Measurement and modelling of of unbalanced magnetic pull in hydropower generators Mattias Wallin Thesis Uppsala University 12 http wwwo05 abb com global scot scot209 nsf veritydisplay a9ce342e2d3cac8dc12579040035e777 f ile 2CDC159008M0201 pdf 2013 06 10 13 http www bluetooth com Pages Bluetooth Home aspx 2013 06 10 14 http www developer nokia com Community Wiki Bluetooth_Protocol 2013 06 10 15 http www abb com product seitp329 be2c616b9f2fc3e2c1256ff00047a812 aspx country 00 amp tabKey 2 amp cid 9AAC100147 amp gid ABB1TNE968900R1110 2013 06 12 16 http www abb com product seitp329 6b9c7e5f00fb4961c125790600299bbc aspx country 00 amp tabKey 2 amp cid 9AAC124505 amp gid ABB1ISAP520100R0001 2013 06 12 17 HC Serial Bluetooth Products User Instructional Manual http www mcu turkey com wp content uploads 2013 01 HC Serial Bluetooth Products 201104 pdf 2013 06 12 18 http imall iteadstudio com im120417010 html 2013 06 12 19 http www elecfreaks com store images product_images Wireless bluetooth bluetooth HC05 02 jpg_ 2013 06 12 20 http www tillquist com eng i
47. ed by a field current provided by the excitation system It induces a voltage in the stator armature windings converting the mechanical energy harnessed from the motion of water into electrical power Grid connecting All SGs that are grid connected are operating in parallel and rotating synchron ously this means that they all rotate with the same rotational speed Because of the pure strength of a power grid some conditions has to be met before an SG is able to connect and contribute to it Fixed synchronization conditions e A sinusoidal waveform Method A sinusoidal waveform on the output of the SG is the result of the construction itself e Matched phase sequence Method The phase sequence is matched by pairing the terminal output of the SG to the grid in the right order In addition to the two conditions previously stated there are three conditions that must be met at the time of synchronization These conditions are not fixed and therefore they have to be validated at each time of connection to avoid the risk of a large current flow in the junction due to voltage differences 1 Non fixed synchronization conditions e Same voltages Method By increasing the field current thus increasing the voltage in duced in the armature windings This is done until the terminal voltage measured after a step up transformer equals the line voltage of the grid Slightly higher frequency on the connecting generator Method The ele
48. edeliverd 9 Output pin for bt package status int FieldCurrentLocal iStore the value fron input pin RotorCurrent define Pover 10 Mster Arduino Pover float volttests define Light 3 Aight pin int PLvoltageLocal d t the output fron the PLC in PLCvoltageLooal SoftvoreSerial blueToothgerial RD TD blueToothSerial conected to b ond TO int Confirmation Stores confirmation voltage sent back from the slove SoftEnsylronster ETin ETouts Hlino object int Fleldlurrentlocal 9 Store the value of FieldCurrent sent fron the slave in int FieldCurrentConstrained float volttest int voltnars255 int lightstep d SoftvoreSerial blueTooth erial Rd T0 oluelcathsariol comected to BO ond TD SoftEosyTransfer ETin ETout Aout object Figure 24 Variable declaration of the two Arduino sketches Because Arduino is an open source platform there are many great libraries writ ten by skillful programmers available for download Two libraries are included in 24 both sketches used in this thesis 1 SoftwareSerial This library makes it possible to create a serial connec tion on any pin 2 SoftEasyTransfer A Bluetooth library that makes it easy to send data back and forth between the two Arduinos Note that the serial connec tion between Arduino and BTshield occurs on Pin6 and Pin therefore the jumpers on the UART multiplexer must be set accordingly see Fig ure 25 Figure 25 Jumper position of the UART multiplexe
49. een de creased to further reduce the risk of data being lost during wireless transfers The AT ROLE command decides which role a device should assume master or slave SvantePLC is located in the control cabinet of the AVR it holds the role of the master and uses AT BIND together with the address of the slave to setup the connection 5 2 Programming the Arduinos Master Progrow for Noster uniti Proqraw for Slave unitt Finclude SoftEosytransfer 81 Library include oftEnsylransfer ho 8T ibrary include Softwareserial ho SoftvareSerial Library to create a Serial connection on any pin dinclude SoftwareSerial t gt Softwareseriol Library to create a Seriol connection on any pin define Rid 6 blueToothSerin receiving pin define Rid 6 olueToothSerial receiving pin define 10 7 olueToothSerial transnitting pin define Ty 7 define PLOvoltageln Ad Reads the analog out fron the plc on malog in 40 define SSrVoltagedut 11 utput pin connected to LP filter due to PUN define RotorCurrent 14 The weassured current to the plo through PM ond LP filter 22 on pind define Rotorturrent 40 Ingut pin that rends the rotor current in voltage define Conmectionstatus 8 Sets a digital LOV on ping when the bluetooth connection is estoblished int SGrVoltage 0 olueToothSer iol transnitting pin e the regulated value in S3rVoltoge define Packog
50. eldCurrentLocal printin Fy Serial flush O PLCvoltagecheck ReceiveData PLCvoltage y void loop i Status Debugging delay 50 i 86
51. en a command will be sent to the SD_Save_Read POU overwriting the old one i f ST Can call the Numpad_B POU and lets the user manually adjust the field current auto ST Not in use 30 Numpad_B This POU written in ST was created so that it would be possible to manually use the control panel to change and edit different parameters of the AVR It is directly connected to the Numpad visualization where every button corresponds to a part in the code The value of the button being pushed gets added to a specific part of an array that gets merged into a string before being converted to a real type value after the OK button is pushed Timers from the CoDeSys library are used as debounce functions for the buttons to avoid typos Mode This is a function block written in FBD that checks the value of the variable STATUS to activate the correct mode of the system The output of this POU de cides what parts of the Regulator POU that should be active Static or Rotating A function block written in ST that acts as a safety measure to the system mak ing it impossible to run the AVR if the brushless exciter and the static exciter both are active KiKd to TnTv The controllers inside the CoDeSys library expects the integral action time 7 and the derivative action time 7 as inputs instead of k and ka This function block written in ST calculates the action times from the relations presented in equations 6 and 9 using the parame
52. ence 0020 0021 Numpad_OK_Out BOOL 0022 END_VAR 0023 0024 VAR 0025 Var_array ARRAY 1 8 OF STRING Maximum of 8 values 0026 no_of_push INT 0 Keeps track of the input value position 1 8 0027 Numpad_Display STRING String value for the numpad display 0028 0029 j TPInstX is a timer for debounce 0030 TPInstl TP 0031 Numpad Debounce 1 BOOL 0032 TPInst2 TP 0033 Numpad Debounce 2 BOOL 0034 TPInst3 TP 0035 Numpad Debounce 3 BOOL 0036 TPInst4 TP 0037 Numpad Debounce 4 BOOL 0038 TPInst5 TP 0039 Numpad Debounce 5 BOOL 0040 TPInst6 TP 0041 Numpad Debounce 6 BOOL 0042 TPInst7 TP 0043 Numpad Debounce 7 BOOL 0044 TPInst8 TP 0045 Numpad Debounce 8 BOOL 0046 TPInst9 TP 0047 Numpad Debounce 9 BOOL 0048 TPInst0 TP 0049 Numpad Debounce 0 BOOL 0050 TPInstDot TP 0051 Numpad Debounce Dot BOOL 0052 0053 Con 12 STRING 0054 Con 34 STRING 0055 Con 56 STRING 0056 Con 78 STRING 0057 0058 Con 1234 STRING 0059 Con 5678 STRING 0060 END VAR 0001 j Numpad OK Out OK 0002 Clearing the Numpad values 0003 IF Num_Pad_Clear 0004 THEN 0005 no_of_push 0 0006 Var_array 1 0007 Var_array 2 0008 Var_array 3 0009 Var_array 4 0010 Var_array 5 0011 Var_array 6 0012 Var_array 7 0013 Var_array 8 0014 END_IF 0015 0016 Debounce button function 0017 TPInst1 IN Num Pad 1 PT T 5ms 0018 Numpad Deb
53. erter The Arduino inside the control cabinet sends the status of its power connection and other information to the PLCs digital inputs The transistor inverters are used because the PLC demand a higher voltage than the Arduino is capable of 26 delivering Whenever the Arduino supplies a voltage on the input of the transistor inverter the output signal is equal to OV otherwise it s set to Vs A cable from the L terminal on the PLC delivers a Vs of 24V to all inverter circuits output signal input signal Figure 31 A transistor inverter 24 5 3 3 Differential amplifying circuit The rotating Arduinos custom shield includes a differential amplifying circuit that amplifies the current transducers output signal by a factor of two This is done to enhance the measuring resolution since the transducers output only fig ures in the interval between 2 5V and 5V The transducers output is fed to V while a constant 5V is supplied to V from the Arduino The difference between the two voltages times the factor two takes full advantage of the Arduinos cap abilities see equation 11 R 100k R 100k R 200k R 200k V 5V V 2 5 V 11 Figure 32 The differential amplifying Figure 33 The stationary Arduino with the stackble circuitry used on the custom made shield BTshield and the stationary custom made shield belonging to the rotational Arduino 27 mounted on top of it 27 5 4 Programming the PLC The c
54. exterior door to enable easy operational access as seen in Figure 45 Figure 44 displays the different stationary devices used by the control cabinet they are all illustrated in Figure 1 with their purpose presented in the System overview section of the Introduction chapter A more detailed description of the functionalities of some of them can be found in the Hardware chapter Figure 45 Exterior view of the control Figure 44 Interior view of the control cabinet The cabinet different components of the stationary AVR are highlighted in different colors Device Component Hardware walkthrough description On off switch 20 3 8 Control panel 15 3 22 Router 16 3 8 Arduino BTshield Custom made shield 5 4 6 SS Voltage transducer 12 3 5 PLC 14 3 1 AC DC converter 19 3 8 Safety switch 21 3 8 Table 6 The devices belonging to the control cabinet and references to them within this thesis 35 5 6 The excitation system The completed construction of the AVR system is implemented on the already existing experimental setup with the control cabinet welded to the bearing struc ture of the SGs stator Test runs are performed by using a static exciter that is controllable by the rotational parts of the AVR The exciter consists of a step down transformer with a 7 2 1 ratio meaning that a primary voltage of 400 VAC results in a 55 5VAC on its secondary winding Two of the three phases leading out from the tra
55. gText Reading SD 0057 END IF 68 When to save 0001 FUNCTION BLOCK When to save 0002 VAR INPUT 0003 Saving light BOOL 0004 button BOOL 0005 END VAR 0006 VAR OUTPUT 0007 save BOOL 0008 END VAR 0009 VAR 0010 END VAR 0001 IF Saving light 0002 THEN 0003 save FALSE 0004 ELSE 0005 save button 0006 END_IF 69 When_to_read 0001 FUNCTION_BLOCK When_to_read 0002 VAR_INPUT 0003 Reading_light BOOL 0004 button BOOL 0005 END_VAR 0006 VAR_OUTPUT 0007 read BOOL 0008 END_VAR 0009 VAR 0010 END_VAR 0001 IF Reading light 0002 THEN 0003 read FALSE 0004 ELSE 0005 read button 0006 END_IF 0007 70 Static_or_Rotating 0001 FUNCTION_BLOCK Static or Rotating 0002 VAR INPUT 0003 Run in BOOL 0004 Static in BOOL 0005 Rotating in BOOL 0006 Bluetooth in BOOL 0007 Arduino Power BOOL 0008 END_VAR 0009 VAR_OUTPUT 0010 Run out BOOL 0011 END_VAR 0012 VAR 0013 ExcitationText STRING 0014 ExcitationTextCollor BOOL 0015 END VAR 0001 j digita
56. hine Interface IDE Integrated Development Environment IEC International Electrotechnical Commission IL Instruction List ISM Industrial Scientific and Medical LD Ladder Diagram PLC Programmable Logic Controller POU Program Organization Unit PWM Pulse Width Modulated RPM Revolutions Per Minute SCO Synchronous Connection Oriented SFC Sequential Function Chart SG Synchronous Generator SIG Special Interest Group SSR Solid State Relay ST Structured Text UART Universal Asynchronous Receiver Transmitter USB Universal Serial Buss Contents LOTO UCI Ra e tt eee 1 Background e a ea Meets 1 1 2 ProJectdescpDptlomn etd te NU IDEO 1 13 System OVERVIEW e tas 2 1 4 The experimental SetUP oooonocononononncoonononnconncnonanonncon nono nonon nooo non nncnncannninos 3 DA etc Rn mea ed BU avt eR 5 2 1 Synchronous generatoTS ooconoccnonononnconnconnnconoconcnonnnnon oran nico n nc nn ran nn enne 5 222 EXCJtatlOn sy SMS Js usn deg e tete toe d e e ERR loa ta 7 2 2 1 A ee retten eee i e ees eae aes 7 2 2 2 Automatic voltage regUulatiOl ssssosssrssorsrrsrnrsrrsnrsrrsrnnsnrsrrsrrrnn enn 9 2 3 The PID controller uae di 10 2 4 The Ziegler Nichols tuning rule sese 11 2 5 Bluetooth communication essere enne 13 AO 16 34 PLC PM564 t eth beds eeepc e diee e 16 3 2 Control panel CP620 web sse eren 16 AO e O to roto ere ml edo d
57. ivative gain ka as seen in equation 7 uplt k SS 7 The three actions proportional integral and derivative are the building blocks of the PID feedback controller see equation 8 t Upplt keli k f e rjdr k UO 8 0 k k T 9 A different parametrization of the PID controller can be made using the integral action time 7 and the derivate action time 7 according to the relations presen ted by equations 6 and 9 1 I de t upp t E e t fe rjar 7 E 10 n 0 Equations 8 and 10 are both the same PID controller though they are para metrized in different ways All other controllers can be obtained from these two equations by changing the parameter values thus excluding any non desirable actions see Table 2 Equation 8 Equation 10 k k ka kp T T P value 0 0 value gt 00 0 PI value value 0 value value 0 PD value 0 value value gt value PID value value value value value value Table 2 Parameter values of different controllers 2 4 The Ziegler Nichols tuning rule There are different methods to produce the necessary parameters k k and k for the different controllers By using computer software mathematical models or 11 manual tuning the parameters can be solved with different degrees of efficiency The mathematical approach produces the most preferable results it is however a tough task to tackle due to the fact that the mode
58. l of a control system often is far to complex and time consuming to solve Not all methods are suitable for every system therefore by ascertaining whether the system has to be active in order to find the necessary parameters is a major key in deciding which method to apply 6 25 According to Ziegler Nichols the system is stable 1f the subsequent amplitudes of the waves generated by a step change of disturbance v have a ratio not great er than 4 after using their method see Figure 8 t Figure 8 Subsequent waves must not be greater than Y according to Ziegler Nichols 25 The method is performed by finding the ultimate sensitivity s and the ultimate period of oscillation p These two variables are acquired when increasing the k parameter of a P controller to the point of sustained oscillations at the output at which point s k and p pu Pui note that the oscillations must stay within the systems max imum and minimum range for the Ziegler Nichols method to be applicable Controller 0 5s I Controller 0 455 1 2kp pu ID Controller 0 65 2k pu kp Pu 8 Table 3 Ziegler Nichols From the basis of Ziegler Nichols tuning rule other methods have been de veloped to estimate the necessary parameters of a PID controller for certain pur poses when the shape of the output is vital for the system see Table 4 ID with no overshoot 0 25 2k Pu KkoPu 3 ID with some overshoot 0 335 2kp
59. l output 0 FALSE ON OFF controlling pin for the SSR s 0002 IF Run in FALSE 0003 THEN 0004 Run_out FALSE 0005 END_IF 0006 0007 Static Excitation 0008 IF Static in 0009 THEN 0010 0011 IF Arduino Power FALSE FALSE Arduino is ON TRUE Arduino is OFF 0012 THEN 0013 ExcitationText Turn off Arduino disconnect USB cable 0014 ExcitationTextCollor FALSE Red 0015 Run_out FALSE 0016 digital_output_0 FALSE ON OFF controlling pin for the SSR s 0017 END_IF 0018 0019 IF Arduino Power TRUE True OFF False 0N 0020 THEN 0021 ExcitationText Static Excitation ENABLED 0022 ExcitationTextCollor TRUE Green 0023 digital_output_0 TRUE ON OFF controlling pin for the SSR s 0024 Run_out Run_in 0025 END_IF 0026 0027 END_IF 0028 0029 Rotating Excitation 0030 IF Rotating in 0031 THEN 0032 digital_output_0 FALSE ON OFF controlling pin for the SSR s True ON False OFF 0033 0034 IF Bluetooth_in TRUE True OFF False ON 0035 THEN 0036 ExcitationText Rotating Excitation Bluetooth connection DISABLED 0037 ExcitationTextCollor FALSE Red 0038 Run_out Run_in If bluetooth connection is lost 0039 0040 IF Arduino Power if power is lost 0041 THEN 0042 ExcitationText Arduino is DISCONNECTED 0043 ExcitationTextCollor FALSE Red 0044 Run_out FALSE 0045 END IF 0046 0047 END IF 0048 0049 IF B
60. l panel SD WRITE and SD READ are both function blocks included in the CoDeSys library that connect directly to a SD card inser ted into the PLC The elements that are to be stored on the SD card can not be of a real data type this means that the controller parameters have to be configured before being saved A thirteen element long array is stored on the SD card with the altered parameters of all the optional controllers provided by the Converter POU see Table 5 This array gets overwritten every time a save is made limiting the data on the SD card to only one file 32 Figure 39 SD_Save_Read is used to save and load controller parameters Status P Controller PI Controller PD Controller PID Controller Last 0 0 A u oje 0 amp amp amp he Table 5 The array stored on the SD card containing the status value belonging to the last saved controller followed by the altered parameters of the different controllers SD Pointer This POU points the active parameters to their correct place in the array when saving The first element of the array belongs to the status value of the controller that was last saved by storing it the user may load the last saved controller quickly fr
61. latorn har utf rts med en regulator optimerad efter Ziegler Nichols metoden och en statisk matare som anv nder sig av borstar och sl pringar f r att f rse rotorlindningen med str m De erh llna resultaten verensst mmer med den ursprungliga kravbilden som var best md f r AVR en Fokus hos arbetet ligger huvudsakligen i konstruerandet av kontrollsystemet vilket innefattar programmering av b de PLC och Bluetoothkommunicerande enheter Arbetet ber r ven andra vergripande delar av magnetiseringen Thesis Scope The automatic voltage regulator AVR consists of several different parts includ ing programmable devices Bluetooth communication electrical connections rectifying circuitry and much more Even though the system as a whole was successful there s still a lot of work that can be done on each individual part to obtain better results This master s thesis is only of 30 credit thus limiting the time for any in depth study when building something of this magnitude Also the AVR is to be part of an excitation system that features a six phase brushless exciter which haven t yet been installed Therefore the results gained during test runs on the system can t be considered fully reliable Abbreviations ACL Asynchronous Connection Less AFH Adaptive Frequency Hopping AT Attention AVR Automatic Voltage Regulator BT Bluetooth CFC Continuous Function Chart FBD Function Block Diagram HMI Human Mac
62. luetooth in FALSE True OFF False ON 0050 THEN 0051 ExcitationText Rotating Excitation ENABLED 0052 ExcitationTextCollor TRUE Green 0053 Run out Run in 0054 END IF 0055 END IF 0056 0057 0058 7 KiKd to TnTv 0001 Converts the Ki and Kd parameters to Tn and Tv so that they are compatible with the regulators 0002 FUNCTION BLOCK KiKd to TnTv 0003 VAR INPUT 0004 Kp in REAL 0005 Ki REAL 0006 Kd REAL 0007 END VAR 0008 VAR OUTPUT 0009 Kp out REAL 0010 Tn REAL 0011 Tv REAL 0012 END VAR 0013 VAR 0014 END VAR 0001 Kp_out Kp_in 0002 Tn Kp_in Ki 0003 Tv Kd Kp in 0004 72 Regulator 0001 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0060 0061 0062 FUNCTION_BLOCK Regulator
63. mages stories datablad iu420 datasheet pdf 2013 06 12 21 http www seekic com uploadfile icdatasearch CSLA 10310858383296141 jpg 2013 06 12 22 http www crydom com en Tech Newsletters Solid 20Statements 20 20SSRs 20switching 20types pdf 2013 06 12 23 http sim okawa denshi jp en CRlowkeisan htm 2013 0612 45 24 http electronicsclub info images trinvert gif 2013 06 12 25 Ziegler Nichols Closed Loop Method Finn Haugen TechTeach 17 July 2010 26 The father of invention Dick Morley looks back on the 40 anniversary of the PLC Manufacturing Automation written by Alison Dunne 12 September 2008 27 https upload wikimedia org wikipedia commons a a2 Op Amp Differential Amplifier svg 2013 06 13 46 10 Appendices PLC code PLC PRG 0001 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 Main program PROGRAM PLC PRG VAR Conv Converter Regulator_p_i_d Regulator Mode_box Mode Terminal_Voltage REAL Regulator_Output_Voltage REAL Var_desired_value REAL Run BOOL Meassured Field Current
64. mary focus of this thesis lies in the practical implementation of an AVR system that will wirelessly control the excitation thus controlling the generator output voltage The AVR will regulate the voltage applied to the rotor winding of the SG Svante so that its terminal voltage is kept at a reference value of 156V This will be done by running a variable proportional to the measurement of the ter minal voltage through a regulating algorithm programmed in a programmable logic controller PLC The resulting control signal will then be transferred using Bluetooth technology to a receiving module on the rotating shaft that will distrib ute it as a control signal to six different switching relays The relays pass on a controlled proportion of the AC voltage produced by the brushless exciter to a bridge rectifier that applies the newly rectified DC voltage to the rotor winding causing a current flow that will magnetize the rotor poles Various programming environments and languages are used to program the PLC the two Arduinos and to set up the Bluetooth connection 1 3 System overview Figure 1 displays the different devices included in the excitation system and how they interconnect with one another Note that the figure displays the working principle of what is considered to be the finished product including the brushless exciter which haven t been tested in this thesis A complete component walkthrough is listed bellow explaining the rol
65. n each Arduino create a Bluetooth connection where information between them both can flow se components 1 and 4 in Figure 1 The BTshield v2 2 is an Arduino compatible master slave shield created by IteadStudios for wireless data transfers using UART and Bluetooth 2 0 The shield basically consists of the Bluetooth serial module HC 05 that directly con nects to the Arduino pins for power and communication The HC 05 module is programmed directly by serial communication via its TX and RX ports using attention AT commands from a terminal window on a computer The Bluetooth module can be configured in numerous ways depending on the conditions in which the module is to be used The option to make the shield into a master or a slave device to bind it to other specific devices or to make it listen for inquires from its surroundings are all settings that are configurable when programming the HC 05 17 Figure 15 The BTshield v2 2 18 Figure 16 The HC 05 Bluetooth chip 19 Aside from the all important HC 05 the shield consists of a mode switch a status LED a UART multiplexer a reset button and some free area to add extern al components if needed The mode switch is connected to the PIO11 input of the HC 05 which sets the Bluetooth module in either command mode where it listens and responds to AT commands or in data mode where it s non responsive to AT commands The UART multiplexer makes it possible to choose different pins on the A
66. nd must be disconnected whenever the stationary exciter is used 6 A custom made shield for the stationary Arduino 5 that connects to the PLCs 14 inputs 7 A six pulse bridge rectifier that converts the AC from the SSRs 13 to DC for the rotor field winding 8 A three phase bridge rectifier that provides DC to the DC DC 17 18 converters 9 The SG 10 The brushless exciter 11 A current transducer that measures the field current Z 12 A voltage transducer measuring the terminal voltage of the SG 9 to provide the PLCs 14 regulating controller with the actual value y t 13 Six SSRs one on each phase of the exciter 10 receives the control signal from the PLC 14 to adjust the proportion of AC being fed to the six pulse bridge rectifier 7 14 APLC with web server functionality handles the regulating process 15 A control panel to provide the user with human machine interface HMI functionality 16 A router that enables wireless access to the HMI from a computer 17 DC DC converter that provides the custom made shield on the rotating side 3 with 12V 12V 24V 18 DC DC converter that provides the custom made shield on the rotating side 3 with 12V 19 An AC DC converter that provides the PLC 14 with 24V supply voltage 20 On off switch of the control cabinet 21 An extra safety switch for the PLC 14 control panel 15 and the sta tionary Arduino 5 22 230V power supply from a wall socket 1 4 The experimen
67. nsformer and in to the three phase diode bridge rectifier have controllable SSRs connected to them while the third one is connected directly The control signal is received through the wireless Bluetooth connection and fed to the SSRs by the rotational Arduino and its associated shields that are placed in the blue box above the rectifying circuitry as seen in the figures bellow Transformer SSRs Figure 46 The experimental setup 36 6 Results This chapter provides a performance review of the constructed AVR system when connected to the static exciter The different controllers obtained by the Ziegler Nichols tuning rule are tested and problems relating to the SSRs and the Bluetooth connection are addressed 6 1 Applying the Ziegler Nichols tuning rule The Ziegler Nichols turning rule is used to find suitable parameter values for the PLC controllers when connected to the SG Svante The method is performed according to the instructions presented in section 2 4 of the Theory chapter using a computer to wirelessly control the system The visualization tool of the HMI provides the information needed to compute the first step of acquiring the s and p values see Figure 47 e 5 0 7 p 23 Back Figure 47 Sustained oscillations on the terminal output is reached at k 0 7 P Controller Now that the ultimate sensitivity s and the ultimate period p have been acquired the parameters belonging to the different con
68. o why the two BTshields tend to loose connection and how it can be prevented 43 Code Even though the code written for the PLC and the two Arduinos seem to work flawlessly It s still possible to optimize it to conserve memory and to make it run smoother Additional functionality With the structure of the PLC program in place it shouldn t be a problem to add new features that could be accessible from the HMI interface A new controller that can maintain a constant cos g should be implement to the PLC project as well as more use of the PLCs inputs to further support the regulating process 44 9 References 1 Power Generation Handbook Selection Applications Operation and Maintenance Philip Kiameh McGraw Hill Professional 1 edition Aug 28 2002 2 The Electric Generators Handbook Synchronous Generators lan Boldea Taylor amp Francis 12 dec 2010 3 Handbook of Electrical Power System Dynamics Modeling Stability and Control Mircea Eremia and Mohammad Shahidehpour Wiley IEEE Press April 2013 4 Power System Stability and Control Prabha Kundur McGraw Hill Professional January 1 1994 5 Feedback Systems An Introduction for Scientists and Engineers Karl Johan str m Richard M Murray Version v2 10b February 22 2009 6 Optimum Settings for Automatic Controllers J G ZIEGLER and N B NICHOLS ROCHESTER N Y 7 http www arduino cc 2013 06 10 8 User Manual for PLC Programming with CoD
69. odule is the only active part while hold mode is running The module resumes to active mode after the counter has reached its target time Park A module in park mode has given up its MAC address and is no longer an active participant of a Piconet network It is however still possible to both listen to broadcasts and to re synchronize to the master 15 3 Hardware As seen in Figure 1 an excitation system consists of several interacting compon ents most of which belonging to the AVR This chapter presents an introduction of all the major devices and components used to build the AVR system 3 1 PLC PM564 t eth The PLC is found at the heart of the AVR programmed with the necessary fea tures like controllers memory storage HMI visualizations and measurement in dicators see component 14 in Figure 1 The PM546 t eth is a PLC donated by ABB and belongs to the stand alone branch of their AC500 series that is easily programmable using ABBs CoDeSys based system PS501 Control Builder Plus It has a programming processing time of 0 8s in struction and like other PLCs it provides a reliable performance when dealing with automated pro cesses Aside from its processes handling it can be programmed using CoDeSys visualizations in order to enable HMI web server functionalities that will be accessible through web applications Main characteristics Figure 11 The PLC PM564 t eth e 24VDC or 100 240VAC power supply donated by ABB 15
70. oltage 0021 0022 j out 6 to 9 is the loaded status p i and d value 0023 SD Status out 6 INT 0024 SD p out 7 REAL 0025 SD i out 8 REAL 0026 SD d out 9 REAL 0027 END VAR 0028 0029 VAR 0030 Kp DWORD 0031 Ki DWORD 0032 Kd DWORD 0033 DtoReall REAL 0034 DtoReal2 REAL 0035 DtoReal3 REAL 0036 varl REAL 0037 var3 REAL 0038 END VAR 0001 Voltage Transducer reading real time AC terminal voltage 0002 j out 1 in 8 27648 250 0003 0004 Regulator output signal from PLC gt Arduino master gt Arduino slave gt control signal to the SSR s 0 5VDC 0005 jout_2 in 9 27648 10 0006 0007 Current Transducer 0008 IF in 2 96 calibration 0009 THEN 0010 jout_3 0 0011 ELSE 0012 varl REAL TO INT in 2 100 Rounding 1 5 gt 2 1 4 1 1A 221 0013 7 varl 2 Divided with 2 0014 3 var3 0015 END IF 0016 0017 Voltage Transducer 0018 lout 4 in 4 250 27648 0019 0020 REAL value multiplyer Truncate to limit the amount of decimals 0021 Kp TRUNC in 5 10000000 0022 Ki TRUNC in 6 10000000 0023 Kd TRUNC in_7 10000000 0024 0025 Different parts of the array Status Kp Ki Kd 0026 0027 0028 0029 0030 0031 Convert the Saved array to real constants 0032 DtoReall in 1 2 0033 DtoReal2 in_1 3 0034 DtoReal3 in_1 4 0035 SD Status out 6 TRUNC in 1 1 0036 SD p out 7
71. om the control panel Save_Read_ Timer A certain sequence of commands must be sent to SD_Write and SD_Read every time they are being used Save Read Timer utilizes the CoDeSys timers to ensure that the sequences follow the correct order The SD card must be erased before saving The file must be closed after a load process is completed ead tine rn block written in CFC that sets the sequential order of the inputs belonging to SD Read and SD write 33 Saving Done light box The main purpose of the Saving_Done light box function block is to provide visual aid of the save and load process When to save A safety function block to prevent the system from trying to save while a saving process is ongoing When to read A safety function block to prevent the system from trying to read while a reading process is ongoing Converter The converter fills an important role in the project Provides the SD Save Read with compatible values to be saved Converts the values back to controller parameters when loading e Calculates voltage and current equivalents of the PLCs inputs received from the voltage transducer and the Arduino The calculated values are used in visualizations and for debugging purposes 5 4 2 Visualizations The visualizations created in CoDeSys form the operating webpage interface of the PLCs web
72. oncept of the PLC program is easiest understood if thought of as the work flow of AVR sy Steps 1 Ze Exi Static the user interface Figure 34 displays the workflow when operating the stem from the control panel or any other java supported web browser The startup position of the project will let the user decide which one of the two exciters static or rotating that the excitation system should use Once the exciter is chosen the option to run the system manually or automatically is presented In the background parameters belonging to previously stored controllers are loaded from the SD card into a tempor ary array in the program Manual control Here the user can manually adjust the control voltage fed to the SSRs thereby controlling the amount of field current applied to the rotor winding The first step on the path of automatic control is choosing which con troller to use The user will choose between a P PI PD and PID controller The parameters that were previously gathered in step 2 are now called upon to enable a quick run option If the user decides to create new parameters for a controller then a nu merical visualization is provided for manual configuration New para meters can be stored on the SD card or used as temporary settings during the active cycle Automatic operation Provides manual start and stop functionality to the AVR as well as a graphical plot of the actual and reference value of the c
73. onnectio define RxD 6 blueToothSerial receiving pin define TxD 7 blueToothSerial transmitting pin define SSrVoltageOut 11 0utput pin connected to LP filter due to PWM define RotorCurrent A0 Input pin that reads the rotor current in voltage int SSrVoltage 0 Store the regulated value in SSrVoltage int FieldCurrentLocal 0 Store the value from input pin RotorCurrent float volttest SoftwareSerial blueToothSerial RxD TxD blueToothSerial connected to RxD and TxD SoftEasyTransfer ETin ETout In out object A eene Structures Bacnrscserec con nsacssssrcmcsrssscrstssssssrsssnas Sending 2 struct SEND DATA STRUCTURE int PLCvoltageconfirmation Outgoing confirmation int FieldCurrent Outgoing Field current data SEND_DATA_STRUCTURE SendData Group name SendData PE A a i n Receiving ooo struct RECEIVE_DATA_STRUCTURE int PLCvoltage Incomming voltage h RECEIVE DATA STRUCTURE ReceiveData Group name ReceiveData a SHE AeELaAL Sen Em Lu End of structures void setup Serial begin 96 0 Open serial communications an blueToothSerial begin 9600 ETin beginCdetails ReceiveData amp blueToothSerial Start the bt library data d 84 ETout begin details SendData amp blueToothSerial Input and outputs pinMode RxD INPUT pinMode TxD OUTPUT pinMode SSrVoltage0ut OUTPUT pinMode RotorCurrent INPUT pinMode 10 OUTPUT
74. ontroller The program returns to step 1 once an exit is made and the cycle has ended 3 Manual control A N 4 dd Masini Exit excitation control method method Automatic 4 SS Y EN u E 4 Select controller Rotating Create new controller 1 Select 2 Select _ 5 Edit parameters Save controller 16 Automatic controller Figure 34 Operational workflow of the user interface 28 5 4 1 POUs 16 different Program Organization Units completes the PLC project of the AVR POUs E BluetoothCheck FB Converter FB IF statement FB KiKd to TnT FB Mode FB Mode Sequence PRG Numpad B FB Regulator FB Save Head timer FB Saving Done light box FB SD Pointer FB SD Save Read FB Static or Rotating FB When to read FB When to save FB Figure 35 Screenshot of the different POUs created with CoDeSys PLC PRG This is the main program written in CFC and it is here all the other programs functions and function blocks joins together and get interconnected CFC pro duces a great graphical overview of the entire system making it easy to follow the values of the PLCs I Os as well as the paths of the internal signals during operation or simulation Figure 36 PLC PRG shows the interconnection between the different parts of the PLC project Mode Sequence Written in
75. ounce 1 TPInst1 Q 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 0090 0091 0092 0093 0094 0095 0096 Button 1 pressed IF Numpad_Debounce_1 THEN no of push no of push 1 Var array no of push 1 END IF Debounce button function TPInst2 IN Num Pad 2 PT T 5ms Numpad Debounce 2 TPInst2 0 Button 2 pressed IF Numpad Debounce 2 THEN no of push no of push 1 Var array no of push 2 END IF Debounce button function TPInst3 IN Num Pad 3 PT T 5ms Numpad Debounce 3 TPInst3 0 Button 3 pressed IF Numpad Debounce 3 THEN no of push no of push 1 Var array no of push 3 END IF Debounce button function TPInst4 IN Num Pad 4 PT T 5ms Numpad Debounce
76. pu ky Pu 3 ID with Pessen integral rule 0 75 25k p 0 15k pu Table 4 PID parameters of different tuning methods 12 2 5 Bluetooth communication The technology behind Bluetooth was invented in 1994 by engineers at the Swedish company Ericsson In 1998 they formed a collaboration with other com panies assigning a special interest group SIG to further develop the Bluetooth technology with the intent of creating a new way to interconnect their products without the need of wires Nowadays Bluetooth communicating devices can be found in almost all portable electronic equipment from your mobile phone to your laptop Six key functionalities of Bluetooth communication are spectrum frequency hopping packages networks physical links and energy conserving modes a short introduction is listed bellow 13 14 Spectrum Bluetooth uses the industrial scientific and medical ISM radio band which is unlicensed in most countries at 2 4 to 2 485 GHz when operating Frequency hopping The ISM band is widely used by many appliances therefore Bluetooth utilize adaptive frequency hopping AFH at 1600 hops sec to constantly search for available frequencies within the spectrum to work on thereby minimizing the risk of running in to interference Packages Each package contains three parts a 72 bit access code a 54 bit packet header and payload that can vary from 0 to 2745 bits The access code is used to pin point other devices
77. r button reai 64 SD Pointer 0001 FUNCTION BLOCK SD Pointer 0002 VAR INPUT 0003 STATUS INT 0004 PidInputArray ARRAY 1 4 OF DWORD 0005 ReadSavedArray ARRAY 1 13 OF DWORD Values from the SD card 0006 Read Button Pressed in BOOL 0007 Last Button Pressed in BOOL 0008 Save Light BOOL 0009 END VAR 0010 VAR OUTPUT 0011 SaveArray ARRAY 1 13 OF DWORD 0012 ReadSavedOut ARRAY 1 4 OF DWORD 0013 END VAR 0014 VAR 0015 END VAR 0001 ReadSavedOut 1 ReadSavedArray 1 0002 SaveArray 1 PidInputArray 1 0003 0004 IF STATUS 0 AND NOT Save Light 0005 THEN 0006 SaveArray ReadSavedArray 0007 END IF 0008 0009 IF STATUS 1 0010 THEN 0011 IF Read Button Pressed in OR Last Button Pressed in 0012 THEN 0013 ReadSavedOut 2 ReadSavedArray 2 0014 ReadSavedOut 3 ReadSavedArray 3 0015 ReadSavedOut 4 ReadSavedArray 4 0016 END IF 0017 SaveArray 2 PidInputArray 2 0018 SaveArray 3 PidInputArray 3 0019 SaveArray 4 PidInputArray 4 0020 END IF 0021 0022 IF STATUS 2 0023 THEN 0024 IF Read Button Pressed in OR Last Button Pressed in 0025 THEN 0026 ReadSavedOut 2 ReadSavedArra
78. r y t 2 Proportional action This action sends out a linear control signal u t that is proportional to the control error by a factor determined by the proportional gain k whilst in the proportional band The proportional band represents all control errors for which the controller is linear outside it the output gets unstable u p t k e t if CN S Ema 3 Integral action The proportional action is in many aspects limited due to deviations between the actual value and the reference value during steady state also known as the steady state error With an integral algorithm the output of the system is guaranteed to be equal to the reference during steady state it does however not guarantee a steady state in itself The integral action sums up all of the instantaneous errors over time and multiplies them with its integral gain k to create its present output u t kf e t dt 4 When combined with the proportional action they form the PI controller seen in equation 5 that can be parameterized differently using the integral action time T4 according to the relation presented by equation 6 t Ult k e t k f e r dr 5 0 _ ko k 7 6 10 Derivative action While the integral action compensates for the errors in the past the derivate action aims to compensate for the errors yet to occur 5 This is done by mathematical extrapolation using the tangents of the error curve multiplied with the der
79. r during operation struct SEND_DATA_STRUCTURE struct SEND DATA STRUCTURE int PLCvoltageconf irmations int PLCvoltage int Fieldturrent SEND DATA STRUCTURE SendData n i SEND DATA STRUCTURE SendData struct RECEIVE DATA STRUCTURE struct RECEIVE DATA STRUCTURE int PLCvoLtageconf irnation int PLCvoltage int FieldCurrent RECEIVE DATA STRUCTURE ReceiveData RECEIVE DATA STRUCTURE Receivedata Figure 26 Structures inside the two sketches A transmitting structure and a receiving structure exist in both sketches they contain the variables that are transferred by the Bluetooth connection All data in the masters transmitting structure is transferred to the slaves receiving structure at a baud rate of 9600 and vice versa This means that when a transmitting vari able is changed it almost instantaneously gets registered in the receiving struc ture of the interacting Arduino void BTtranster void void Bttronsfer void 4 ETout sendata s SendData PLOvoltage Role ETout sendata s Y SendData FieldCurrent FieldDurrentLocal SendData PLCvoltagecont tration Receivedata PLCvoltage for int 120 ids ik ETin receivedata coming do t delay 10 for int isb 16 if ETin receivedata Confirmation ReceiveData PLCvoltageconfirnation deloy 10 FieldCurrentConstrained constrain Receivedata FieldCurrent 0 4023 FieldCurrentLocal mp FieldCurrentConstrained 0 1023 0 255 SSrVoltage Re
80. r joy Close timel H z HO tu H H 3 t FALL Clear out Eb fp dl S t 1 E 167 Save done timer 7 TP IN Q Read out Close out Light time 78 3 Save Done light 10 PT ET Read Done light Save Err light 13 i Read done tim TP E IN Q e PT ET Save Err timer TP ES Save Err IN Q PE ET Read Err timeam TP E E Read Err IN Q PT Read Err light 67 Save Done light Box 0001 FUNCTION BLOCK Saving Done light box 0002 VAR INPUT 0003 Save PID in BOOL 0004 Delete Data Segment 123 in BYTE 0005 Open Read close 12345 in BYTE 0006 Save Done BOOL 0007 Read Done BOOL 0008 Save Err BOOL 0009 Read Err BOOL 0010 END VAR 0011 VAR OUTPUT 0012 Save Done light out BOOL 0013 Read Done light out BOOL 0014 Read Done Value out INT 0015 END VAR 0016 VAR 0017 SavingText STRING Text for visualizations 0018 num INT 0 0019 ReadingText STRING Text for visualizations 0020 END VAR 00
81. rduino aside from pin0 and pinl RX and TX to run serial communication with the BT shield By having this alternative the Arduino UART is kept isolated making it possible to utilize the USB for serial communication with a computer at the same time as the BTshield is communicating with the Arduino 3 5 Tillquist voltage measuring transducer The AC line voltage of the SG is measured by the voltage transducer which pro duces a proportional DC signal that is fed to the PLC see component 12 in Figure 1 The in and output of the transducer are galvanic separated due to a transformer at the input The scaled voltage on the secondary side of the transformer runs through the true rms to dc converter and the output amplifier resulting in a DC voltage proportional to the AC input 20 18 Power supply Figure 17 Block schematic of the working principle of the measuring transducer 20 3 6 Current transducer Honeywell CSLA1GD Measures the field current Z in the rotor winding and produces a proportional DC output to the rotating Arduino see component 11 in Figure 1 When current flows in a wire a magnetic field propor tional to it is created around its center The Honeywell current transducer CSLA1GD works according to this principle measuring the strength of the magnetic field produced by the wire that runs through its hole An analog DC representation between OV and the half of its supply voltage Vss 2 is then produced on
82. server application Buttons and sliders creates an HMI where the user can trigger different actions of the AVR and edit values associated with the Regulator POU UNIVERSITET 3 Visualizations Ba Aut i ES AUTO PID Controller e AUTO exit ATA s BB Desired Terminal Voltage TP 5 PD ae PI FB PID x BB Regulators Sea Xi 0 000000 Ka 0 000000 Terminal Des Terninal 156 00Y Field Current 0 0A Visualization C3 Functions Figure 42 Operational window during automatic BB Desired oltage_Confirm_or control TS P_Load_or a5 PD Load or 25 Pl Load or Manual Field Current Controller PID Load or UPPSALA Main UNIVERSITET Su Field Current 0 004 5 ple visu EXIT Terminal Voltage 0 00V Al Man SSR Vcc 0 00V am Manual if control TS Manual_if_control_exit About BB Auto or Manual d Exit Visualization Stop Start Figure 41 The name plc visu is pre assigned to the startup window of the Figure 43 Operational window during manual user interface like PLC PRG control 34 5 5 The control cabinet This thesis was performed with the aim of also building the complete AVR sys tem Once the programable devices and the Bluetooth connection had been final ized and established all parts of the AVR that were considered stationary got put into a control cabinet The cabinet has the control panel mounted on its
83. t are programmed to send and receive information from and to the PLC as well as between one another see components 2 and 5 in Figure 1 The Uno can be seen as the flagship of Arduino boards It comes based on the ATmega328 microcontroller and with the Atmegal6U2 preprogrammed as a USB to serial converter The ATmega328 makes it possible to communicate with the Arduino by universal asynchronous receiver transmitter UART serial com munication from a computer or other UART compatible computer hardware The UART breaks up bytes into bits before sending the data out in a serial stream on the transmitting pin pinl When serial data is being received pin0 the exact opposite procedure occurs and the UART reassembles the incoming bits back into bytes Because the Uno connects to the computer by USB the serial data flow is being converted by the ATmegal6U2 before reaching the UART of the ATmega328 7 EJ 5 Figure 14 The Arduino Uno 7 The Arduino Uno has 6 analog 10 bit inputs A0 to A5 and 14 digital I Os pin0 to 13 6 of which are capable of delivering an 8 bit pulse width modulated PWM signal The I Os are bound by a 5V upper limit and capable of delivering or receiving 40mA however the voltage range of the analog inputs can be adjus ted by a reference voltage on the AREF pin The Uno is powered by either the USB cord 5V the Vin pin 7 12V or the DC power jack 7 12V 17 3 4 BTshield v2 2 The two BTshields one o
84. t of current that is used to magnetize the rotor 2 3 4 sy Step up full power transformer Step down f transformer Figure 4 The blue ellipse encloses the excitation system of a power plant including a static exciter and an AVR 2 2 2 1 Exciters There are three different types of exciters e DC exciters e AC exciters e Static exciters DC exciters The DC type of exciters were a favorable choice during the years leading up to the mid 1960s before they successively got replaced by the AC exciters how ever they still exist for many SGs rated lower than 100 MVA They can be either self excited or separately excited and kept rotating by the same shaft as the SG or by an external motor The exciter uses DC generators to produce the DC voltage for the SGs rotor field winding One might think that a DC generator produces a DC voltage but in reality they produce AC DC exciters use commutators to reverses the flow of current periodically which means that the current that runs through an externally connected device only moves in one direction The excitation system supplies the SG with the DC voltage with the help of brushes and slip rings AC exciters AC exciters use SGs that more or less can be described as turned inside out to feed the main generator with its field current A magnetic field is generated by the stator while the output is collected off the rotor winding The generator pro duces an AC voltage while
85. tal setup The experimental setup available for conducting final tests of the AVR included a twelve pole synchronous generator named Svante with a 75kW induction motor working as the prime mover A 3 1 gearbox installed between the motor and the SG means that a rotational speed of 1500rpm is required from the motor in order for the SG to reach its synchronous speed Because the installment of the brushless exciter hadn t occurred at the time of this thesis tests were performed with a static exciter that uses brushes and slip rings to supply a DC voltage to the rotor winding The brushes and slip rings add to the resistance of the field winding meaning that a higher voltage is required in order to produce the same level of field current as a brushless exciter 11 Open circuit characteristics A voltage transformer rated 156 400 is connected to Svantes terminals so that a voltage of 400V can be reached to enable synchronization with the grid From the open circuit characteristics shown in Figure 2 it can be seen that the field current provided by the excitation system should be at approximately 13A in or der to produce a terminal voltage of 156V The open circuit characteristics of the SG is obtained by increasing the field cur rent during a no load operation of the SG while rotating at its rated speed Since no load is connected measured voltages at the output will be equal to the internal voltage of the SG The linear region of the plotted
86. tended Even so it has been greatly rewarding to be able to build the entire control system from start to finish Even though the AVR constructed preforms all tasks that it was required to do there is still plenty of room for im provements to be made see the chapter Future work Focus has mainly been directed towards the programming aspect of the AVR thus other parts haven t gotten the same coverage within this paper The program ming code that have been written is the results of several hours of trial and error compiling and simulation The final version of the written code have been tested numerous times without any errors therefore future work should focus on the AVRs other parts 42 8 Future work Listed bellow are a couple of suggestions on how to further develop the AVR system SSR The SSRs used in the AVR system didn t work as intended when connected on every phase therefore a fixing solution should be considered When three SSRs were placed on eace of the three phases that connects to the rectifying circuitry they kept blocking each other so that none of them were cap able of conducting The zero crossing SSRs became operational after one of them was removed from its belonging phase The removal of the SSR affected the quality of the DC voltage leading out from the bridge rectifier This method proved itself to be inadequate during manual operation as seen in section 6 4 of the Results chapter Someone must either find a w
87. ter INT Can have values 1 2 3 4 or 5 which determines where 0062 Kp Out Ki Out Kd Out var Manual If Desired Terminal Voltage 0063 the numpad value that is typed in should be saved 0064 0065 var Manual If slider INT 0066 Back BOOL FALSE 0067 END VAR 0068 0069 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 0080 0081 0082 0083 0084 Init off Mode0 Model Mode2 Mode3 Mode4 X Mode5 X Mode6 pi pd auto j Mode7 4 4 Mode8 4 j Mode9 Mode10 4 j Modell 4 j Mode12 4 Init 53 Init 0001 0002 0003 0004 0005 0006 0007 0008 0009 0010 Determinating if back button is used or exit button to read or not to read that is the question IF Back AND NOT Saved_light THEN Status 0 ELSE Read_Button_Out TRUE Status 0 digital_output_0 FALSE turn of static SSR s when YES button is used from AUTO_exit END_IF 54 Off 0001 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021
88. ters k and k submitted by the user Regulator Regulator is a function block written in CFC that handles the actual regulating of the AVR The two function blocks PD and PID are provided by the CoDeSys library the combination enables the AVR to produce all controllers necessary in cluding the P and PI controller The actual value needed by both controllers comes from the variable Current Value that is supplied by an integer correspond ing to the terminal voltage measured by the voltage transducer Both the regu lated outputs are constrained by the controllers so that they don t rise above the 5V maximum limit of the Arduino receiving pin Aside from the two controller function blocks there is the IF statement POU that is activated when manual operation is selected Inputs coming from the Mode POU decides which one out of the three units that is to be activated while the other two are kept offline The BluetoothCheck POU is another safety measure installed to ensure that the produced regulated output don t fluctuate if the Bluetooth connection were to be lost 31 Bluetooth E BluetoothCheck Regulate PD qi Current Value Current input Current output Dm i Desived value Desired input Desired output h ACTUAL Y P Part Le SET POINT LIMITS_ACTIVE T Part D D part mv Y Man Y MANDAL Y Off Y OPPSET ml TAN Y Max Y MAX D MANUAL
89. that share the same network and to grant them access to the package content The header holds the address of active recipients along with in formation of the package duration and the error correction scheme while the ac tual data that is to be transferred is carried by the payload LSB 72 54 0 2745 MSB Access code Header Payload Figure 9 Structure of a Bluetooth data package Networks When Bluetooth devices are connected they can communicate with each other through short range ad hoc networks called Piconets In every Piconet there is one device that holds the role of master The master device sets the conditions for the network by determining the access code and the clock for the frequency hop ping sequence A Piconet network can include up to seven different devices ex cluding the master These devices are known as slaves and they operate by the conditions set by the master A device belonging to a Piconet can coexist in an other Piconet network simultaneously independently of what role it plays mean ing that a slave in one Piconet can figure as a master in another When multiple Piconets interlace it is called a Scatternet see Figure 10 Beacause of the 13 frequency hopping a Scatternet can consist of up to ten completely full Piconets before the networks overload and saturation occurs slave 4 master B LJ Li 4 t L 1 1 i3 E master A active slave parked slave st
90. tion of boolean type is fulfilled Actions are placed inside the steps and contain instructions that can be written in IL ST FBD LD or SFC e FBD Function Block Diagram When using FBD signals are passed through function blocks from left to right The function blocks can either be self made with input and out puts or from the internal libraries like logical expressions and mathem atical operations Notice that to connect two function blocks the input and output of the interacting blocks must be of the same type LD Ladder Diagram The purpose of LD is to give a graphically representation similar to an electric circuit It is suitable when creating logical switches and calling other POUs e CFC The Continuous Function Chart Editor CFC is much like the FBD but with freely placable elements which means it can handle feedback 4 3 Arduino 1 0 The Arduino software has evolved from the software of another open source electronic prototyping platform called Wiring Wiring itself is based on the pro gramming language Processing and the Processing integrated development environment IDE Arduinos programming language is a simplification of the C language created to make the programming process easy for a beginner When a program or a sketch as it is called for Arduino gets uploaded the written code is translated into C meaning that any devices running an Arduino sketch actually is programmed in C The Arduino IDE provides an easy to
91. trollers listed in Table 3 and 4 are calculated and presented in Table 7 k ki ka P Controller 0 350 PI Controller 0 318 0 166 PID Controller 0 420 0 365 0 121 PID with no overshoot 0 140 0 122 0 107 PID with some overshoot 0 231 0 201 0 177 PID with Pessen integral rule 0 490 1 750 0 169 Table 7 Calculated parameter values for the different controllers provided by the tuning rules 6 2 Controller performances step responses A step response of the finalized closed loop system for each of the different con trollers calculated in Table 7 is obtained by monitoring the terminal voltage dur ing a stop start of the AVR The off on procedure sets the regulating process in motion by creating a step of the reference value going from OV to 156V The PID Controller determined by the Ziegler Nichols tuning rule complies the most with the requirements wanted from a solid step response with regards to settling time rise time and overshoot Furthest away from a desired output is the PID Controller belonging to the Pessen integral rule which produces an unstable oscillating terminal output on the SG Screenshots of the different step responses except P Controller are collected from the visualization tool of the HMI and displayed in the figures bellow PTE Controller Back Figure 48 Step response of the closed loop system using a PI Controller PID Controller Back Figure 49 The Step response of the closed loop
92. voltage current relation dis plays where the generator is operating unsaturated 1 Stator voltage 2 4 6 B 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 Field current Figure 2 Open circuit characteristics of the SG Svante Parameter Value Frequency 50Hz Number of pole pairs 6 Speed 500rpm Slots per pole and phase 3 Number of stator slots 108 Coil pitch 9 Stator inner diameter 725mm Stator length 303mm Air gap length 8 4mm Power of driving motor 75kW Rotor weight 900kg Stator weight 700kg Field winding resistance without brushes or slip rings 13 030 Field winding resistance with brushes and slip rings 13 370 Table 1 Parameter values of the SG Svante 2 Theory This chapter highlights the basic theory on which this thesis is based upon It covers the principles behind a grid connected SG and the different excitation al ternatives that can be chosen to provide its field current An automated regulating procedure of the field current is performed by an algorithm programmed into the AVRs PLC explained in the latter parts Finally an introduction to the Bluetooth technology is presented with a brief explanation of some of its most fundamental functionalities 2 1 Synchronous generators A hydropower plant uses SGs to supply the grid with electrical power An SG consists of two fundamental parts a rotor and a stator The rotor magnetic field is creat
93. y 5 0027 ReadSavedOut 3 ReadSavedArray 6 0028 ReadSavedOut 4 ReadSavedArray 7 0029 END IF 0030 SaveArray 5 PidInputArray 2 0031 SaveArray 6 idInputArray 3 0032 SaveArray 7 PidInputArray 4 0033 END IF 0034 0035 IF STATUS 3 0036 THEN 0037 IF Read Button Pressed in OR Last Button Pressed in 0038 THEN 0039 ReadSavedOut 2 ReadSavedArray 8 0040 ReadSavedOut 3 ReadSavedArray 9 0041 ReadSavedOut 4 ReadSavedArray 10 0042 END IF 0043 SaveArray 8 PidInputArray 2 0044 SaveArray 9 idInputArray 3 0045 SaveArray 10 PidInputArray 4 0046 END_IF 0047 0048 IF STATUS 4 0049 THEN 0050 IF Read Button Pressed in OR Last Button Pressed in 0051 THEN 0052 ReadSavedOut 2 ReadSavedArray 11 0053 ReadSavedOut 3 ReadSavedArray 12 0054 ReadSavedOut 4 ReadSavedArray 13 0055 END IF 0056 SaveArray 11 PidInputArray 2 0057 SaveArray 12 idInputArray 3 0058 SaveArray 13 idInputArray 4 0059 END_IF 65 Save Read timer 0001 FUNCTION BLOCK Save Read timer 0002 VAR INPUT 0003 Save done BOOL 0004 Save Err BOOL 0005 Read done BOOL 0006 Read Err BOOL 0007 Read BOOL 0008 Save BOOL 0009 0010 END VAR 0011 VAR O
Download Pdf Manuals
Related Search
fulltext full-text search fulltext01.pdf fulltext mysql full-text index fulltext sources online fulltext sql server full text index mysql fulltext initialization fulltext01.pdf diva-portal.org full text ntu full text search mysql
Related Contents
Ethernet Routing Switch 8300 取扱説明書 スライド扉付埋込収納 スライド鏡扉付埋込収納 RCA RCR311S User's Manual 取扱説明書 SO905iCS Bearing self study guide みどり号について ー オザキガス柵は業務用ですから、一般家庭ではご朝にならないで下さい。 Copyright © All rights reserved.
Failed to retrieve file