Home

Development software for stabilization platform

image

Contents

1. 23 As VEU 300 rar tens dh ke ite eru S 24 3 3 Architecture Texas Instruments 54 DSP 25 3 4 Architecture Zilog Serial Controller 28 5 0 USB CO MEM a RS BIR GS eg 29 2 5 Motor Parts far dd erect ca Mec 30 3 7 LabVIEW block 92 3 8 Code Composer 33 4 1 structure 37 2 2 5 TD PUL SY ANOS E oa eoa Rea bg enda s 38 4 3 Nsoll Limiter 41 4 4 Principle of NLIMITER 41 4 5 Primitiv Limiter And Limiter 50 42 4 6 PRIMILIM and LOWER SPEED principle 43 4 7 Buffer actual and demanded values 45 4 8 Current 1 46 4 9 Output values with disturbance 46 4 10 PC DRUi Communication 47 4 11 Current disturbances vie ak EHE e es 48 AAD OBIE active g aretoa erste Bee a ele LER BS Sle NE 48 LIST OF FIGURES 7 4 13 4 14 4 15 4 16 4 17 4 18 4 19 4 20 4 21 4 22 4 23 BITF 49 DACSView measurement 50 Primili setup i genia 51 p a Bo Sa mna sd 52 FFT window 53 FFT Measurement
2. Fehler 2 5457 1 5000 Except 2 100 values step Stop Simulation standby P 100 valueststep 22192154 HI m TIME COMPLETE TIMING LOOP 0 TO Samplitude SU TIMING LOOP 0 TO 8 TIMING LOOPOTOS 349 EEG TIMINGLOOPoTO 393 Poo timnctoopotos 393 Peto 6 80 4 TIME COMPLETE eos Poo Nd lt _ 0 75 l 14 2 C2 3 Q Gp FAN E Simulation vi 16 00 Figure 4 21 Square wave input The simulation windows show the square wave input signal The square wave signal is used to act as a sort of a step response signal The result shows clearly that the regulators not are working proper and a heavy disturbance appears around zero Different disturbance The system has different disturbances in different positions 100 values step Figure 4 22 Sinus input CHAPTER 4 DEVELOPMENT SOFTWARE 58 figure 4 22 shows the system running with a sinus input The signal with the peak to the left are the input signal 100 values step Figure 4 23 Sinus with disturbance By manually moving the test stand to another start position these dis turbances in figure 4 23 appears in the system Moving the system back to its original start position makes it running again without any disturbances 4 8 Debugging at the test stand Debugging the system connected to the test stand appeared to b
3. 54 Notch filter 1 4 urs Ru a aes gees ER S 55 Notehzhlte t 2 1 sc EE 55 Sq re WAVedHp l e ses gente 57 Sin s Input X ceo den den 57 Sinus with disturbance 58 LIST OF FIGURES Abbreviations BPS Bytes Per Second BLDC Bruchless DC Motor CIF Customer User Interface CPU Central Processing Unit DC Direct Current DMA Direct Memory Access DSP Digital Signal Processor Drive Unit Intelligent FFT Fast Fourier Transform FIFO First In First Out IST Actual PI Proportional Integral PMC Programmable Motion Control PMSM Permanent Magnet Synchronous Motor SOLL Demanded RPM Revolutions Per Minute TDM Time Division Multiplexed USC Universal Serial Controller Chapter 1 INTRODUCTION 1 1 Purpose This thesis primary object is to adapt and configure already existing software for the DRUi 360 Normally the DRUi communicates with an AXCON The AXCON is a hardware controlled communication unit containing a CIF card Customer User Interface In this project the DRUi communicates directly with the PC over a serial port with full duplex RS485 communication The DRUi is the controller unit that will be used to regulate the test platform By sending a signal to the DRUi it regulates the platform to move similar as the given input signal The signal could be either an recorded road characteristic signal f
4. Figure 4 3 Nsoll Limiter Figure 4 2 shows the limited NSOLL value The input is a ordinary sinus curve The limiter response on the input to the set maximum and minimum NSOLL value It also save the previous demanded value for comparison with the received demanded value Se appendix B for assembler code of the NLIMITER file Figure 4 4 Principle of NLIMITER CHAPTER 4 DEVELOPMENT SOFTWARE 42 4 4 2 Primilim and lower speed The primilim is primitive limiter that sets the speed to zero when the motor passes a given value The primilim is useful to prevent metal to metal stops it means that the weapon or rod not should have impact with the end stops The given restricted value is stored in the encoder mounted on the motor When the given limit is reached the encoder sets the speed command to zero Also here the input signal is a simple sinus wave the other is the actual restricted value of the motor Se figure 4 5 100 values step Figure 4 5 Primitiv Limiter And Limiter 5096 The limiters are implemented in two versions one that sets the speed command to zero and one that reduce the speed to 5096 when a given limit are passed The graph shows the speed reduction to 5096 before it is set to zero speed The reduction to 50 speed is just an extra precaution for the test stand Figure 4 6 shows the principle of the valid areas of speed reduction The figure are not scaled and therefore only shows the principle of the
5. LD 407fffh B Ueberlaeufe beseitigen MIN A CMPL STL PROPIQ Proportionalanteil zwischenspeichern SSEX FRCT INTEGRALTEIL 5 LD IN T IN z MPYU NSUML A IN NSUML OHNE 16 ACCU A 72716 NSUMM A IN NSUMM MIT VORZ INWNSUML OHNE VORZ 2 16 Rc or SUMME VON PROP UND INTEGR TEIL ADD PROPIQ 7 A 8 aos ASM ak 9 REGLERAUSGANG xx ST 47FFFh HILFMi Bola se LD HILFM1 16 B begrenzen auf max Ausgang L a MIN A D File View Bookmarks 7 ae n Latest AUW pjt Debug Build Complete 0 Errors 0 Warnings 0 Remarks OM E 1 HALTED For Help press Fi Ln Col S NUM Figure 3 8 Code Composer Studio 3 8 3 Programming the DSP The DRUi 360 is as earlier described programmed in Assembly language or more often called Assembler Assembler is a language that requires more knowledge about the hardware when you program compared to high level programming languages like C and Java In programming there are three major levels of programming high level assembler and machine code High level could also be divided into separate groups itself In high level program ming the code could either be compiled into assembler code or directly to machine code Machine code is a series of ones and zeros there fore it s difficult to p
6. frame cover plate UN Encoder Resolver connectors motor shaft with permanent magnet Figure 3 6 Motor parts 8Digital Motor Control 1 day workshop CHAPTER 3 SYSTEM SETUP 31 3 8 Softwares The main softwares used in this project are LabVIEW 7 0 from National Instruments and Code Composer Studio 2 0 from Texas Instruments 3 8 1 LabVIEW LabVIEW Laboratory Virtual Instrument Engineering Workbench is a graph ical programming language that is widely used for data acquisition and con trol systems both in academic and industrial areas for simulation and re search LabVIEW is multi platform software that runs on various platforms as Windows Mac OS Linux and Solaris By creating a VI Virtual Instru ment the PC could be used as a standard instrument with high flexibility for data acquisition Instead of writing code you normally use the standard toolboxes to create block diagrams and then compile it into machine code LabVIEW is the software that is used to program the Ground Profile Gen erator The generator was already programmed as an earlier thesis work by a student during 2002 and therefore needed some measures when it should be utilized together with the whole system LabVIEW User Manual April 2003 Edition CHAPTER 3 SYSTEM SETUP 32 Simulation vi Block Diagram File Edit Operate Tools Browse Window Help ot 2 Button
7. Debug value stl A ld FUNCP2 DP add 1 B stl B DEBUG_BUF_1 Buffer erh hen erh hen increment increase sub ZZDEBUG BUFLENGTH 1 B bc WRITE BUFEND 1 BLT st 0 DEBUG BUF 1 Ringbuffer schliessen WRITE DEBUG 1 ssbx 1 sxm 14 0 A APPENDIX B ASSEMBLER CODE 83 popm STO popm ST1 popm AL popm AH popm AG popm BL popm BH popm RET DEBUG BUFFER 2 DEBUG_BUFFER_2 pshm BG pshm BH pshm BL pshm ST1 pshm STO STO abspeichern nop nop ld FUNCP2 DP rsbx 1 sxm SXM abschalten da Adr gt 16 Bit nop ld DEBUG_BUF_2 A Id A B add ZDEBUG START 2 Bufferstartadresse 1C00h ld BOOTPAGE DP stlm A AR5 nop nop ld DEBUG TEMP 2 Debug value stl A ld FUNCP2 DP add 1 B stl B DEBUG_BUF_2 Buffer erh hen erh hen increment increase sub ZZDEBUG BUFLENGTH 2 B bc WRITE DEBUG BUFEND 2 BLT st 0 DEBUG BUF 2 Ringbuffer schliessen WRITE DEBUG BUFEND 2 ssbx 1 sxm 14 0 A APPENDIX B ASSEMBLER CODE popm STO popm ST1 popm BL pop
8. The USB COMi M connector is a USB device that transforms the USB port into a serial communication port in other words a Virtual Com port The advantage of this serial device is the easy plug and play features that come with this device It is self powered though the USB connection and the converter is easily changed between RS 232 RS 422 or RS 485 serial communication by the 4 pin DIP switches on the box The box is connect able by one DB 9 male serial connector or one terminal block USB COMi M Data sheet October 2005 CHAPTER 3 SYSTEM SETUP 29 Figure 3 5 USB COMi M 3 5 1 Features of USB COMi M 384 byte receive buffer 128 byte transmit buffer Requires no IRQ DMA I O port Data rates from 300bps to 921 6Kbps Monitor LEDs of TxD RxD Power output of 5V 3 6 XDS510 USB Emulator For downloading the software into the CPU the 5510 Emulator from spec trum digital are used The Emulator is connected to the board by a JTAG connector The Emulator supports the ability to on board programming and testing the configuration based upon the boundary scan IEEE 1149 1 JTAG technology with the possibility to debug and diagnosticate on a sys tem through a number of dedicated test pins The connection through the USB port delivers fast downloads and the benefits of the plug and play han dling from windows 3 7 AC DC servo motor The motor used for test and verification of the program behaviour is a 140 A Br
9. timnctoopotos 42 Peto TIME COMPLETE 200 180 160 gie 2120 100 80 60 40 7 1122 Figure 2 5 LabVIEW simulation window 2 7 Communication The ground profile generator samples the signal and store the values in pack ages containing 100 values each Every value contains 20bit 16 2 start 2 stop bit Every data package contains 20bit Command 16 2start 2stop bit and 20bit Lifesign 16 2start 2stop bit The lifesign is a counter for every new data package That gives that every data package contains 20 20 100 20 2040 bit per send cycle With a send cycle of 500ms the PC sends two packages every second which result in a transfer rate of 4080bit s The generator is not sending a new package until it receives an answer from the DRUi So if the communications fail the DRUi halts In the initialization phase The DRUi answer directly with 100 zeros to get a new data package of 100 values CHAPTER 2 THEORY 20 2 7 1 RS 485 The communication between PC and DRUi are 4 wire point to point se rial communication with full duplex RS485 at 115 2k bps With full duplex means communication of data in both directions simultaneously RS 485 is not a standard in ordinary home PC s though it using the COM port that every standard PC has Normally the comport uses the standard 2 wire RS 232 interface The RS 485 is more suitable for data acquisition then RS 232 and do not have that many limitatio
10. In the beginning the code were difficult to read and understand The code contained both old and new communication and it was not clear which were active code or not Many functions were disabled without any comments the 35 CHAPTER 4 DEVELOPMENT SOFTWARE 36 reason for these disabled functions were the former programmer worked on debugging some parts of the system when he leaved the company By read the code and translate them into flow diagrams it were more easy to se the dependency between different parts 4 2 1 Flow diagram The assembler code is like small building blocks that are put together to one piece with branches and calls between different modules This project contains more than 130 different assembler files Therefore it was necessary to attain a structure of what is affecting the processing and communication of data values To get this structure more clear flow diagrams were drawn over the different files for processing and communication of data values By drawing these diagrams it became obvious that many files didn t affect this project or were not affecting the actual processing of input and output data See appendix A for flow diagrams of different parts of the code The dia grams do not cover the whole part of the project they are only presented as a rough guide line of the code structure 4 3 Code structure SYSCON is the main system controller It contains the code of every function module and subroutine us
11. STEGP DP LD POSIST_HI A LD FUNCP DP STL A HILFF1 TEST OB POSIST_HI gt POSMAX LD POSMX1 SUB HILFF1 LD MAINP DP BC NXT1 AGT LD NSOLL A RC ALEQ ORM VMAXbit STATUS ST 0 NSOLL RET TEST OB POSIST_HI lt POSMIN APPENDIX B ASSEMBLER CODE 81 NXT1 LD MIN LD HILFF1 SUB POSMX2 A LD MAINP DP RC AGT LD NSOLL A RC AGEQ ORM VMAXbit STATUS ST 0 NSOLL RET mmregs APPENDIX B ASSEMBLER CODE 82 Debug asm Memory ring Buffer for debug 2006 02 06 j n usage CALL DEBUG_BUFFER input ACCA output ACCA 3k 2k 2K 3k 3k DEBUG_BUFFER_1 pshm BG pshm BH pshm BL pshm AG pshm AH pshm AL pshm ST1 pshm STO STO abspeichern nop nop ld FUNCP2 DP rsbx 1 sxm SXM abschalten da Adr gt 16 Bit nop DEBUG_BUF_1 A ld A B add ZDEBUG START 1 Bufferstartadresse ACCA 1800h ld BOOTPAGE DP stlm A AR5 nop nop ld DEBUG TEMP 1
12. 3 Structure A normal micro controlled system has some input sensor devices and a system feedback controlling either a linear or a rotary motion The input signal comes from a host or some kind of interface for example a connection from a PC The amplifier receives its signals from the controller and boosts the signals to a level adjusted for the actuator In this project the actuator is a DC servo motor it is the DC servo motor that gives the system its physical motion The behaviour of the motor is close connected to the physical design of the amplifier which is the speed position driver of the actuator A motion controlled system has in many ways the purpose to control either one or a combination of different parameters such as Torque Acceleration Position and Speed A normal micro controlled system has some input sensor devices and a system feedback controlling either a linear or a rotary motion The input signal comes from a host or some kind of interface for example a connection from a PC The amplifier receives its signals from the controller and boosts the signals to a level adjusted for the actuator In this project the actuator is a DC servo motor it is the DC servo motor that gives the system its physical motion The behavior of the motor is close connected to the physical design of the amplifier which is the speed position driver of the actuator A motion controlled system has in many ways the purpose to control either one or
13. Werte Senden und Empfangen While Schleife bis keine Werte mehr sind im Empfanasstring teilen und in ein Array von Werten schreiben Empfangstring SendeArray Sollwerte und Empfangsarray Istwerte zusammenf gen f r Visualisierung Anzahl Zeichen eines Wertes 4 Soll und Istwert 100Werte Anzahl Werte pro Empfangsstrin Zietspatte oJ Anzeige Sol Sende Array 100Werte iue mpfangstring L Soll und Istwert 100Werte array mit Empfangswerten TIMING LOOP 0 TO 8 Stop Simulation E Button 5 Anzahl Werte Solwert Array Index Entlastung CPU Figure 3 7 LabVIEW block diagram 3 8 2 Code Composer Studio 2 0 The Code Composer Studio is a full featured development environment to build and debug DSP software applications from Texas Instruments Code Composer supports both C C and assembler programming language In this thesis Code Composer Studio are used as an assembler programming environment and assembles the code into run able machine code for the tar get CPU The target CPU is a Texas Instrument TMS320LC54x DSP Code Composer Studio is an integrated development environment It provides mod
14. a combination of different parameters such as Torque Acceleration Position and Speed The system feedback depends on the actual measurements and which type of control elements that are used Common feedback signals are the same as described above and other signals as Temperature Current and Voltage This type of structure with feedback is a closed loop system Motion Control Handbook 3Motion Control Handbook CHAPTER 2 THEORY 15 INPUT REGULATOR FEEDBACK Figure 2 1 Closed loop system 2 4 PI Regulator The closed loop system is controlled by PI regulators To decouple the torque current or speed it is necessary to engage several mathematical transforms and this is where the DSP adds the most value The processing capability provided by the DSP can enable these mathematical transformations to be carried out very quick almost in real time This in turn means that the entire algorithm controlling the motor can be executed at a very high rate PI stands for Proportional and Integrational This is the two distinctive el ements of a PI controller The proportional term of the controller reacts on changes in the reference signal and therefore reacts more rapidly than the Integrational part If the proportional part in the regulator is given to large value the system could easily start to self oscillate Kp Proportionalterm K e t K Integrationalterm AG Jo u t K e t T Jo
15. be changed so it s not dependent of sending new data when it receives a data package from the DRUi An alternative to that is to let the DRUi send packages with zeros as it does in the first sequence for two or three data package cycles References 1 6 7 8 9 Digital Motor Control 1 day workshop Student Guide Revision 4 0 February 2004 Texas Instruments LabVIEW User Manual April 2003 Edition Part number 320999E 01 Mikrodatorer bit for bit Rune K rnefors student litteratur Lund 1996 2 a upplagan ISBN 9144308620 Motion Control Handbook by Dr Stephen J O Neil Vice Precident Advanced Research and Planning Micro Mo Electronics Inc micromo www micromo com Rs 422 and 485 Standars Overview and System Configurations Texas Instruments Application Report SLLAO70B June 2001 5320 54 DSP CPU and Peripherals Volume 1 Literature Number SPRU13F April 1999 TMS320c54X DSP Mnemonic Instruction Set Volume 2 Literature Num ber SPRU172C March 2001 TMS320c54X DSP Programmer s Guide Literature Number SPRU538 July 2001 Code Composer Studio IDE v2 White Acsessed Paper November 2005 http focus ti com lit an spra004 spra004 pdf 10 Proportional and Integral Controllers January 2006 http www ele auckland ac nz covic sctrl db PDF 11 USB COMi M Datasheet October 2005 http www coolgear com USBGEAR USB COMi M Datasheet pdf 12 What is a Notch Filter January 2006 http www k ex
16. discusses what could be done differ ent and possible improvements for future work Chapter 2 THEORY For better understanding of this thesis the next chapter will describe the basic concepts of motion control It describes the theory behind the regulators and explains the structure of the complete system It also describes the programming language and the main used software s for this project 2 1 Motion Control There are many different types of motion controls In centuries back the control of position and speed where done mechanical by changing gears us ing series of cams or hydraulic or pneumatic cylinders to control processes in the textile and other various industries The early automated system where highly dedicated for one specific solution and demanded lots of effort for retooling even though small changes in the process Therefore early au tomation started in the textile industry were same operation are repeated over and over again 2 2 Programmable Motion Control Today almost every process were motion control are needed the system are realized through Programmable Motion Control PMC which is defined by a programmable hardware and software in a micro controlled system Often the system is based on a DSP or a PIC processor within a controller box The system is than easily reconfigured through small changes in the program code and its peripheral components I Motion Control Handbook 13 CHAPTER 2 THEORY 14 2
17. its WWW home page http www ep liu se Jonas Nilsson Development Software for Stabilization Platform In cooperation with Curtiss Wright Antriebstechnik GmbH Neuhausen am Rheinfall Switzerland Jonas Nilsson May 2006 Abstract This Master thesis describes the development and modification of already ex isting assembler software for the DRUi 360 The DRUi is a controller unit for stabilization tasks mostly used in the military industry The DRUi controls the stabilization platform which has the purpose to simulate a moving vehi cle The aim with this platform is for internal development of new hardware and software evaluate new ideas and components for stabilization systems The platform is also an internal education system for the engineers The DRUi receives the input reference signal from the Ground Profile Generator which is a graphical interface running on a PC were the user has the ability to create or send already recorded road signals from a moving vehicle to the driver unit In this case the DRUi The main used software s for this project are Code Composer Studio for programming the DRUi software and LabVIEW which is a graphical programming language used to program the Ground Profile Generator A theoretical study of motion control is performed together with getting familiar of al the equipment The new software for the DRUi is adapted and implemented Filter design for the regulator unit and necessary measurements on
18. more reliable It could be insecure if the system has a very high input signal still stored in the output buffer when a user starts the system The DRUi still knows the position of the motor when it is started again The value is stored in the encoder mounted on the engine and not in the DRUi itself CHAPTER 4 DEVELOPMENT SOFTWARE 44 4 4 5 Brake The motor and gearbox are connected to a handle crank When the system are in active mode the brake bit are set and the brake are released from the handle crank and it s not possible to move the motor and gearbox by hand When the brake bit are reset the brake are clutched and it is possible to move the rod or armoury part by hand 4 4 6 Zurrcon The Zurrcon is a controller to check if the drive is blocked If the system is blocked zurrcon shuts the system down when the current reach the limit 50 and the rod still not is moving Without this security the electronics could easily over heat and suffer from damage 4 5 Debugging the software This is the part of the project that has consumed most time during the whole project together with the on going work of understanding the structure and behaviour of the software The difficulties to debug this system appear from the cause there is no connection to a serial terminal window or similar which is very useful and common on other DSP systems Also the lack of experience of this type of system makes the debugging difficult But there is still some way
19. the test stand are presented together with the results of the production run of the stabilization platform The stabilization platform is not fully running when this thesis ended When the production test was performed disturbances appeared in the sys tem The reasons for these disturbances are not yet discovered Al safety routines needed for running the platform secure and prevent system damage are implemented to the system software Preface This report is a result of a six months long thesis work made in cooper ation with the company Curtiss Wright Antriebstechnik GmbH located in Neuhausen am Rheinfall Switzerland The thesis describes the programming and adaptation of already existing software for a stabilization platform with aiming tasks The platforms main function is to work as an internal test system for software and hardware development as well as internal education Jonas Nilsson Neuhausen am Rheinfall March 2006 Thank you I would like to thank Mr Harry Zai for answering my email and letting me come for an interview and giving me this opportunity and great experience during my six months at Curtiss Wright I am very grateful for that Many thanks to my instructor Christian Walsh your skills are a great Thanks for the support you all gave me when you had so much to do Klaus Hofacker Reto G tcher and Roman Rainer And thanks allot to the rest of the staff at engineering department and every one which I been in contact wi
20. 44 4 5 Debugging the software o C soo rr rr rr rr rr 44 4 5 1 Timing debug 44 4 5 2 Debug buffer ud dod tI peu rr ss 44 Mage ROE OG e uice tasti ue E A dd d A ege dud Gig Xe ed E 45 4 5 4 Braking the current loop 6 2 rr rr rr rr es 45 4 5 5 Flag for last processed value 46 4 5 6 DRUi Sending Data 47 200 Disabled BETE s iue EB ek D 48 4 6 Test stand measurements 49 4 6 1 Teaching the system 50 4 6 2 Measuring the unbalance smo EUR 52 4 6 3 Setting up the 53 Sas eat a E Pa 54 4 7 Running the test Stand rr rr re rr 56 CONTENTS 4 7 1 New boot software 4 7 2 Disturbance 4 8 Debugging at the test stand 5 Results 5 1 Conclusions and discussion 5 2 Further work A Code flow diagram B Assembler code 56 56 58 59 59 60 63 77 List of Figures 1 1 System structure 9 1 2 Drawing test stand 12 2 1 Closed loop system 15 2 2 PI regulator structure 16 2 3 Development system 17 2 4 Ground profile 18 2 5 LabVIEW simulation window 19 2 6 Regulator structure DRUI 20 3 1 Stabilization
21. Examensarbete LITH ITN ED EX 06 018 SE Development software for Stabilization platform Jonas Nilsson 2006 05 17 Link pings universitet TEKNISKA HOGSKOLAN Department of Science and Technology Institutionen for teknik och naturvetenskap Link pings Universitet Link pings Universitet SE 601 74 Norrk ping Sweden 601 74 Norrk ping LITH ITN ED EX 06 018 SE Development software for stabilization platform Examensarbete utf rt i elektronikdesign vid Link pings Tekniska H gskola Campus Norrk ping Jonas Nilsson Handledare Christian Walsh Examinator Ole Pedersen Norrk ping 2006 05 17 Avdelning Institution Division Department 2006 05 17 Institutionen f r teknik och naturvetenskap Department of Science and Technology Rapporttyp ISBN Language Report category Svenska Swedish Examensarbete ISRN LITH ITN ED EX 06 018 SE Engelska English B uppsats C uppsats Serietitel och serienummer ISSN D uppsats Title of series numbering URL f r elektronisk version Development software for stabilization platform F rfattare 2 Author Jonas Nilsson Sammanfattning Abstract detta examensarbete beskrivs modifikationen av redan befintlig mjukvara f r att passa den stabiliserande plattformen Den stabiliserande plattformen har som syfte att simulera ett fordon i r relse Med hj lp av fordons simulatorn uppn r f retaget m jligheter att idag utf ra interna realistiska t
22. IAGRAM 68 A B gt WORDTEMP gt AR4 VAR IN POS 1 LENGTH ADRESS gt HILF1 HILF1 gt CALL SENDHXWERT APPENDIX A CODE FLOW DIAGRAM 69 NIST_NSOLL VAR IN POS 101 YES CC RECEIVED_VALUES VALUEVALID 0 NO VALUEVALID 1 0 gt NSOLL 0 gt LIFESIGNDRU SAMEV ALUECOUNT 0 RETURN YES NEXTV ALUE VALID_VAL gt SAMEV ALUECOUNT NIST_P_ADR gt B NIST_P_COUNT 1 gt A gt NIST_ADRESS SAMEVALUE COUNT 0 NO RETUEN APPENDIX A CODE FLOW DIAGRAM 70 NIST_ADRESS gt AR6 100 VALUES PROCESSED 1 gt ALL100PROC NIST gt AR6 NSOLL_P_COUNT 1 NSOLL_P_ADR gt NSOLL_P_COUNT gt A gt NSOLL_ADRESS NSOLL ADRESS gt AR gt NSOLL APPENDIX A CODE FLOW DIAGRAM 71 RECEIVED_VALUES ror om NO LIFEV ALEND 1 gt DATADIR VALID_VALUES gt VALUEVALID CALL PAGE_SWITCH 102 gt ANSWERPOS LIFESIGNDRU 1 0 gt ALL100PROC RESET 0 gt VAR IN POS 0 gt VALLOCK APPENDIX A CODE FLOW DIAGRAM OUTLIFEVAL YES ANSWERPOS 102 COMMANDOUT ANSWERPOS 101 LIFESIGNOUT ANSWERPOS 1007 No ANSWERPOS 0 0 gt DATADIR VALUEOUT NIST_OUT_ADRESS 1 CALL SENDHEXWRT gt ASCII ASCI VALUE gt SENDTEMP SENDTEMP g
23. Nlimiter asm KKK KKK K K K K OK K K K K K OK K IER K K K OK OK K KK K K OK K K OK K K OK OK OK OK OK OK OK OK OK OK OK OK KKK 2K 2K KKK KKKKK MODUL NLIMITER ASM 19 12 05 adapted from LIMITER ASM j n This module regulates the MAX MIN NSOLL Value INPUTS 1 NEW NSOLL INPUT VALUE AR2 LAST NSOLL OUTPUT VALUE AR3 MAX ALLOWED NSOLL INCREMENT ARA UPPER NSOLL LIMIT AR5 LOWER NSOLL LIMIT OUTPUTS ACCU NEW NSOLL OUTPUT VALUE NOTE in out s are in lower 16 bits ROK 2K OK K OK OK OK OK OK OK OK OK OK OK K OK OK OK ROK OK OK OK OK OK KK OK OK OK OK OK OK OK KK KK K OK INCLUDE CONSTANT DEFINITIONS include KONSTANT ASM Definition of all System constants sect COMMON P NLIMITER SSBX OVM TT APPENDIX B ASSEMBLER CODE 78 NOP SSBX SXM NOP save input parameters LD COMMONP DP LDM ARI A STL A HILFCO Limiter input gt HILFCO1 LDM AR2 A STL A HILFCO previous limiter output gt HILFCO2 LDM AR3 A STL A HILFCO3 max step size gt HILFCO3 positive value LDM ARA A STL A HILFCO5 upper Limit LDM AR5 A STL A HILFCO6 lower Limit build difference LD HILFCO2 16 A SUB HILFCO1 16 A STH A HILFCO4 AltOut NeuIn HILFC02 HILFCO1 check if limitation necessary ABS A SUB HILFCO3 16 A BC HANDLIMO09 ALT jump if change
24. The theory behind the filter and system optimization are complex and automatically calculated from the program In the graphical interface there CHAPTER 4 DEVELOPMENT SOFTWARE 54 is possible to view the input stimulus system response coherence the mag nitude dB of the transfer function and the phase degree of the transfer function After the measurement the computation of the FFT Fast Fourier Transform analysis are presented in a Bode plot at the center of the screen The computation of the filter are done in a Matlab menu which is started from the Matlab button seen in fig 4 17 The result of the measurement around 3Hz and a phase shift of over 100dB are rejected because of an error in the measurement and not a part of the filter design seen in figure 4 18 Measured transfer function NSOLL5000_Nistfein_IQsoll_Resol 12 8messungen FFT T T TTTTT T T TTTTT poi ii 0 10 10 frequency Hz phase deg Figure 4 18 FET Measurement Figure 4 18 presents the FFT analysis in a bode plot diagram The scaling of the logarithmic frequency axis is synchronized for the amplitude phase and coherence 4 6 4 Filters The filters designed for the system is two notch filters A Notch filter is a filter that passes all frequencies except those in a stop band centred on a center frequency The phase response of the notch filter has its greatest rate of
25. VALID VALUES are important for the number of values that will be processed If it not is given enough values in the initialization it will reset too early and some values will be missed in the processing The counter is now changed by setting the processing time of every value in milliseconds instead MILLISEC 4 VALIDVAL 2 MILLISEC 1 VALIDV ALUES VALIDV AL 1 100 2 MILLISEC is the wanted time between every new data value to be pro cessed VALID VAL is the counter for each cycle to process a new value CHAPTER 4 DEVELOPMENT SOFTWARE 40 VALID VALUES are the counter for how many cycles it should count to process 100 data values in the command file The extra 2 are just for getting the statement jump out of its routine 4 3 6 Processing the values The file NIST_NSOLL contains the counters for actual and demanded values IST actual and SOLL demanded See appendix A for the flow diagram of NIST_NSOLL The demanded value and actual value are stored in the auxiliary registers for communication The demanded value is stored in AR7 and actual value is stored in register AR6 The demanded value are than read out from its registry and than processed in the regulator and compared with the actual value In speed mode the regulator NREG_A is used and in position mode the regulator NREG_S are used The regulator structure is the same as in other project and therefore not needed any particular changes The NREG_S needed only mino
26. When the BITF function was disabled the data communication working well for a couple of cycles than other disturbances start to appear The cause was the earlier described flags that were set after the last processed values and after the processing of the Command and Lifesign The time gap become to short between the processing of the different data packages By writing a temporary counter routine to give the buffer some extra time to empty itself the system are working By doing that it s working but there is not a good solution to have it like that It could happen that the buffer is not empty when a value are stored in the send buffer if there is no routine that assures that the buffer is empty before next value are stored in the send buffer 4 6 Test stand measurements When the system running correct and all the safety routines were imple mented measurements at the test stand took part To do the measurements another system were connected to the test stand A same type of DRUi was used together with AXCON AXCON is a hardware interface for commu nication between DRUi and PC described earlier in the report To do the necessary measurements the AXCON has to be used Otherwise it is not possible to measure the unbalance of the system do a frequency analysis and CHAPTER 4 DEVELOPMENT SOFTWARE 50 setting the right filters for the regulator structure The PC runs the graphical interface DACSView which is an interface for analyze and downloa
27. Where e t is the regulator error input feedback which gives the p part and the integral part The integral part is changing as long as the actual value differs from the demanded value 4Motion Control Handbook gt Proportional amp Integral Controllers CHAPTER 2 THEORY 16 Figure 2 2 PI regulator structure 2 5 System overview The control system can be divided into three important parts e The PC containing the ground profile generator e The communication between PC and e The DRUi itself connected to the DC servo motor within the closed loop system The PC sends speed or position commands to the DRUi The DRUi regulates the DC servo motor by sending demanded position speed and current The DC servo motor present its feedback from the encoder mounted on the back of the DC servo motor The encoder gives information of position current and the actual speed of the servo motor The actual value from the DC servo motor is then presented in the graphical window together with the demanded value in simulation menu of the Ground Profile Generator The system control loop of the speed and position regulators has an update rate of 2 kHz The update rate of the control loop is much faster than the processing of input data values It is necessary for the accuracy and speed which means time to compensate within the PI regulator This is the control and communication part of the system that regulates the tes
28. ad Octal 1 5 DC amp At 11 8 ps 84 8 kHz 2 2 V DCX 5 MS s 1 V DC 1 DC 2 0 Vv 4 5 Vv DC NORMAL Figure 4 10 PC DRUi Communication 1 DRUi sending data to PC 2 PC sending data to DRUi CHAPTER 4 DEVELOPMENT SOFTWARE 48 3 XF flag set to present the cycles for writing values out of the send buffer from DRUi By writing the current out into the debug buffer and monitor it during the send phase is it obvious that the disturbance somehow has to do with the sending of data amp Graphical Display Lin Auto Scale Figure 4 11 Current disturbance 4 5 7 Disabled BITF When the disturbance at least were isolated to the send part it was easy to follow the code and flow diagrams to the sending part The problem in the sending part is a BITF function The BITF function compares two values and set a flag if the statement is true or false In this case it checks if the send port is empty or not If not empty it will loop until the port is empty and than write out the value on the port 1 2000 3000 100 values step Figure 4 12 BITF active CHAPTER 4 DEVELOPMENT SOFTWARE 49 Figure 4 12 shows clearly the disturbance when the BITF function are comparing if the send port is empty or not FT 1 14000 15000 100 values step Figure 4 13 BITF disabled Graph in figure 4 13 with the BITF function disabled The Regulators are not proper adjusted and therefore the actual value is not that smooth
29. am and data spaces allow simultaneous read and write of program instructions and data which provide a higher degree of parallelism into the system It means the opportunity to read data from two memory operands at the same time over two different data buses in one single clock cycle To read data from two single operands at the same time are under no circumstances possible with only one distinct data bus System control Program address generation Data address generation nterface logic PAGEN logic DAGEN ARAUO ARAU1 ARO AR7 ARP BK DP SP anc externa interface Peripheral interface Bare shifter Accumulator A Accumulator B CB data bus DB data bus EB data bus MAC unit PB program bus Barrel shifter T register ALU Adder 40 C 4ouzmooumr Figure 3 3 Architecture Texas Instruments c54x DSP 2TMS320C54x DSP CPU and Peripherals Volume 1 CHAPTER 3 SYSTEM SETUP 26 The c54x DSP are arranged with three 64K 16 bit memory spaces for program data and I O The on chip memories have the advantages of higher performance lower costs and lower power consumption than an external memory The higher performance of on chip operations is a result from that no wait states are required so it reaches a higher flow within the pipeline of ALU 3 3 2 Features of c54x DSP 40 bit ALU Two 40 bit accumulators A and B 17 17 bit multiplier 40 bit adder Data address generation unit Program address gen
30. boten m Re mers SA reu DE GU EY ES 3 5 1 Features of 05 CONTENTS 4 3 6 XDS510 USB Emulator 29 3 7 AC DC servo 29 3 7 1 Motor 30 BO WO WOTCS BEERS 31 Od Lab VIEW tk Oh opos EB o Pedo 31 3 8 2 Code Composer Studio 2 0 Lu o rgo px 32 3 8 3 Programming the DSP stooor rs ss 33 4 DEVELOPMENT SOFTWARE 35 4 1 Setting up the 35 4 2 Understanding the software 35 4 2 1 Flow diagram ooo rr rr rs ss 36 420 Code ree do p RS a SUE B se ds 36 4 3 1 Communication 2 37 4 3 2 Ground profile generator communication 38 4 3 3 Input and output buffer 39 4 3 4 Timing received and processed values 39 4 3 5 Counting the input values 39 4 3 6 Processing the Values i su su rr rr FB rr Pe 40 4 3 7 Speed and position mod sor ee ne rr 40 DOCU routines EGRE 40 Poth ANUMIT uou ed Bote 41 4 4 2 Primilim and lower speed 42 4 4 3 Aimbit and stdbybit Oat eee reser re ss 43 4 4 4 Stop command soo io EI eu Gia mE Ok OO OS 43 doni Braket uad A f r Bl oe ge un pis 44 J40 LUO ur uou AR hok
31. change at the center frequency In this case with the disturbances and the oscillating behaviour around 10 40Hz a damping filter is recommendable That s why a Notch filters with it characteristic damping factor inn the centre frequency a suitable What is a Notch filter January 2006 CHAPTER 4 DEVELOPMENT SOFTWARE 55 Figure 4 19 Notch filter 1 In figure 4 19 the center point of the notch filter are placed at 20Hz with an amplitude of 10dB and damping of 0 5 Figure 4 20 Notch filter 2 In figure 4 20 the center point of notch filter 2 are set at 40Hz with an CHAPTER 4 DEVELOPMENT SOFTWARE 56 amplitude of 5dB and a damping of 1 The filter settings and regulator settings are then imported to the software developed for the test stand 4 7 Running the test stand When the measured parameters were imported to the new software the ground profile generator and all needed software were installed on a Lap top for running the system at the test stand To connect the system new power supply cables were mounted from the power supply in the workshop 4 7 1 New boot software To let the system run without the emulator connected to the system new booth software with auto start are stored in the DRUi memory The finalized software are converted through the Code Composer Studio into an ASCII file and downloaded with DACSView over AXCON to the DRUi The reason for running without the emulator is the instability of the syst
32. d software into AXCON and DRUi With the DACSView there is possible to measure all the important system parameters It is also possible to do a FFT analyze of the closed loop and set up the filters for the drive system gt Main Measurement vi File Edit Operate Tools Window Help CIF NO SIGNAL D HE e 34 000 JOO OOO OOOO 7 FwedPont Pito CIF DEBUGOUTA Figure 4 14 DACSView measurement menu Figure 4 14 shows the measurement menu of the DACSView interface 4 6 1 Teaching the system Before running the system it has to be teached With teaching the system means to set up the zero position and measure the end stops to prevent the system running to forbidden areas end stop The zero point is found by setting the rod of the test stand horizontal 0 and read out the POSIST_HI value from the servo motor encoder The end positions are measured at the same way by turning the system by hand into the metal end stops and read out the encoder value from the servo motor encoder The primilim are than CHAPTER 4 DEVELOPMENT SOFTWARE 51 set approximately degree before the end stop Metal end stop Primilim 09 Primilim Metal end stop 14 22 Figure 4 15 Primilim setup Figure 4 16 shows the metal to metal stop position and the primili
33. e torque needed to raise the platform from neg ative angle to positive angle In the negative angle front down the torque needed to raise the system are over 2000N m In positive angle the torque are negative instead A high unbalance causes greater stress on the material and requires more careful filter design for the accuracy With this type of CHAPTER 4 DEVELOPMENT SOFTWARE 53 unbalance it will be challenge for even experienced engineer to find good controller filter setup The filter has the purpose to reduce disturbances in which appear in curtain frequency areas The X axis shows the elevation in degrees and Y axis shows the torque to keep the position in zero speed The friction of the rod is almost the same over the interval The torque to move the rod shows that the test stand has most weight in the front and need higher current to produce more torque in negative elevation positions To reduce the unbalance it s possible to move back the tower of the stand to equals the weight in front and back 4 6 3 Setting up the filters To set up the filters for the control loops a frequency response measurement were done With DACSView the system cutoff frequency the system reso nance and filter characteristics can be determined gt Main FFT new vi File Edit Operate Tools Window Help iria Figure 4 17 FFT window
34. e very dif ficult Breaking the current loop or the speed loop down at the test stand is dangerous The system falls to its end position uncontrolled and with full speed if the user not is precautious with the values that is send in to the system The solution is to disconnect everything and take the system back to the engineering department and proceed the debugging with only the DC servo motor connected to the control system Connected to the DC servo motor the system running without any disturbance and braking the current loop and monitor the current do not show any failure in the system Chapter 5 Results 5 1 Conclusions and discussion Not all the requirements are achieved at the end of this project The test stand is not running that smooth as it ought to do The system runs correct in the development environment but do not work satisfactory mounted to gether with the test stand During the project the emulator which is used to download the compiled software into the DRUi has malfunctioned The new code is not always proper downloaded into the software and therefore the debugging of the system has taken long time to accomplish The changes in the program code hasn t always affected the system and correct been trans ferred to the system by the emulator By braking the power and reset the system the behaviour was sometimes totally different than before When all the disturbances have been corrected at the system caused by the earlier
35. ed for the controller It calls all needed functions Every software module has to jump back to the system controller module at the end of its execution SYSINIT is the module where all the constants and variables that are needed are initialized CONTINIT serves the initialization of the automatic con trollers FINIT This module contains all initializations needed for us ing the digital filters CONTROL is a controller module that initializes important functions like AD conversation system mode selection SYSMODE temperature limiter module and other important system func tions IN OR_OUT is the read and write module that handles the communication of processed and received values CHAPTER 4 DEVELOPMENT SOFTWARE 37 STARTUSER CALL SYSINIT CALL CONTINIT CALL FINT SYSCON CALL CONTROL 20kHz CALL IN OR OUT RET HHH Figure 4 1 Syscon structure CONTROL and OUT area runs under the 20 kHz system clock are called both on positive and negative clock flank which result in a clock rate of 40 kHz The first time IN are called the bit are set to read mode DATADIR 0 and the input buffer are read out When hundred values are received and processed the flag are set to one high and the system runs through the write mode sends the value and shifting the memory buffers Appendix A flow diagrams gives an explanation of IN OR OUT structure The different system m
36. em with the emulator connected 4 7 2 Disturbance The new software has a different behavior down at the test stand With the test system on the engineering department no disturbances appears when the system is running The design of the filters seems to not have the same effect in the new software as the reference system were the actual measurements was done CHAPTER 4 DEVELOPMENT SOFTWARE 57 B Simulation vi E 8 ini x File Edit Operate Tools Browse Window Help n Drehzahlsollwert C Anzeige Sollsignal Anzahl Werte 4000 Zykluszeit Sollwert Array Anzahl zu lesende Bytes pan je fu Positionssolfwert o 1 Anzahl Werte 2000 Sendestring Index Bytes im Read Buffer 1000 5200 404 Status Simulation o d AREA ssageba fangstri Lifesign Sim Befehlscode Sim ss loma du 0022 Simulation nicht Bereit 2000 DRUI synchronisieren Ee Sollwert DRUi Befehlscode DRUI Stop System Reset and standby 4000 Dire DRUI Synchronisieren z Stop System Reset and standby Anzeige Soll Ist s 5592 1 5000 DRUI Synchronisieren 4000 Befehl existiert nicht Stop System Reset and standby 3000 Drehzahlmode J 2000 Positionsmode Vj 1000 Falscher Mode 2 0 Timeout Befehiscode 2 1000 Timeout Lifesign und Werte 2 2000 Pos Rechts 8 30004 Max Pos Links emis Lifesign Error
37. eration unit The ALU performs 2s complement arithmetic with a 40 bit ALU and two 40 bit accumulators A and B The ALU supports Boolean operators and use these operators 16 bit immediate value 16 bit word from data memory 16 bit in temporary register T Two 16 bit words from data memory 32 bit word from data memory 40 bit word from accumulator or B 3 3 3 Addressing modes The c54x has seven different addressing modes which are Immediate addressing Absolute addressing Accumulator addressing Direct addressing 3TMS320C54x DSP Programmers Guide CHAPTER 3 SYSTEM SETUP 24 Indirect addressing Memory mapped register addressing Stack addressing 3 3 4 Serial ports The TMS320LC548 CPU has two buffered serial ports BSP and one time division multiplexed TDM port The BSP is a synchronous serial port with an auto buffering unit that is clocked at full CLKOUT rate The BSP is full duplexed and double buffered The TDM port allows data to be time division multiplexed It can be configured to handle either synchronous operations or TDM operations The serial port is often used to communicate with other processors in a multiprocessor system for example a serial communication device like a Universal Serial Controller from Zilog 3 4 Zilog comunication unit The Zilog Z16C30 USC Universal Serial Controller is a dual channel multi protocol communications peripheral device for data communication with two independent f
38. ern project management with editor integrated assembler compiler and powerful debug and profiling functions In addition to the standard debug functions it is possible to visualize the information stored in RAM Flash in graphical windows even in frequency domain FFT Due to improved JTAG technology this data can be updated to these windows without stopping the 10 Composer Studio IDE v2 White Paper CHAPTER 3 SYSTEM SETUP 33 DSP To download the software into the target CPU the Spectrum Digital XD 510 Emulator is used which is described later in this report 1 549 XDS510 USB CPU 1 54 Code Composer Studio NREG_A ASM File Edt Project Debug Profiler GEL Option Tools DSP BIOS Window HH aA cca EE 4 5 Latest AUW pk OR A 2 BOBA Files 2 LD AMAINP DP Projects E dij Latest_AUWOR LD NSOLL A E DSP BIOS Config 4 DS casera LD SNA T T REG SNA MPY NSOLL A CU SOLL 2 LD NISTA T MAS NIST A DLL 2 NISTA NIST 2 SFIA 1 STH DELNM MIDDLE WORD ABLEGEN STL A DELNL LOW WORD ABLEGEN BERECHNUNG DES PROVISORISCHEN REGLERAUSGANGS PROPORTIONALTEIL RSBX LD PN T TREG MPYU DELNL TREG RDIFF 10 2 ACCA OHNE VORZ Bum A 16 ACCA 2 16 ACCA MPY DELNM B TREG RDIFF HI gt ACCB gus ADD ACCA ACCB
39. ester vid utveckling av ny h rd och mjukvara f r stabiliserande system Plattformen erh ller sina indata fr n v gprofilgeneratorn som r ett PC baserat simulationsprogram programmerad i LabVIEW I v gprofilgeneratorn finns m jligheten att skapa egna v gprofilsignaler eller anv nda redan tidigare inspelade signaler fr n verkliga tester Examensarbetet utf rdes i samarbete med Curtiss Wright Antriebstechnik GmbH i Neuhausen am Rheinfall Schweiz Nyckelord Keyword DRUIi 360 RS 485 Communication DSP Closed loop PI Regulator Filter USB Ground Profile Generator Software LabVIEW Code Composer Studio 2 0 Simulation software TMS320LC54x LINK PING UNIVERSITY A ELECTRONIC PRESS A De sane Upphovsr tt Detta dokument h lls tillg ngligt p Internet eller dess framtida ers ttare under en l ngre tid fr n publiceringsdatum under f ruts ttning att inga extra ordin ra omst ndigheter uppst r Tillg ng till dokumentet inneb r tillst nd f r var och en att l sa ladda ner skriva ut enstaka kopior f r enskilt bruk och att anv nda det of r ndrat f r ickekommersiell forskning och f r undervisning verf ring av upphovsr tten vid en senare tidpunkt kan inte upph va detta tillst nd All annan anv ndning av dokumentet kr ver upphovsmannens medgivande F r att garantera ktheten s kerheten och tillg ngligheten finns det l sningar av teknisk och administrativ art Upphovsmannens ideella r tt
40. hanics and electro hydraulic products The markets are mainly in Europe but also in North America Asia and South Africa Curtiss Wright Corporation has a long history with its roots dating back to the Wright brother s first flight in 1903 The company is since 1929 listed at the NYSE New York Stock Exchange The number of employees is today more than 5900 around the world 1 5 Limitations This project only cover the lover part of the test stand with the purpose of simulate a moving vehicle The upper part of the test stand has stabilization tasks with feedback from gyro That part is not included in this thesis work The lower circle shows the lower part of the system The upper circle show the tower which will be stabilized due to its reference signal from a gyro lwww cwat com CHAPTER 1 INTRODUCTION 12 Figure 1 2 Drawing test stand 1 6 Thesis structure The first chapter THEORY describes the concept for motion control ex plaining the closed loops and regulator structures In this chapter the used software and the assembler programming language are also in brief described The chapter SYSTEM SETUP describes the system hardware the pro gramming structure and the mechanical test stand itself with its features The third chapter DEVELOPMENT SOFTWARE describes the work made on the system and all the measurements The thesis ends with the chapter RESULT that describes the result and problems during the thesis work It also
41. ign It was a mistake to do that it actually gave a better result and reduced the disturbance but the cause of the disturbance didn t belong from missing values or time gaps between the processing and output pages any more Graphical Display Lin Auto Scale Figure 4 9 Output values with disturbance Figure 4 9 shows that the first number of data values are correct in the output buffer and the disturbance starts to appear later in the buffer The CHAPTER 4 DEVELOPMENT SOFTWARE 47 conclusion is that the processing of new data values and the switching of data pages works correct and the disturbance has nothing to do with the time gap between the processing of the data packages So the gap between the data package are now correct A disturbance from errors of the data values between the packages would appear from value one if it were a problem Any regulator problem or other problem would be constant and have the same effect over the whole processed data package 4 5 6 DRUi Sending Data By measuring the time length of the send and received data it was obvious when counting the number of values which contains disturbance in the output buffer it corresponded some how to the time of sending out a data package from the DRUi to the PC 18 8 CHANNEL 3 16 27 17 1 18 ms 7 DEF 5 0 V 0 16 V 18 ms 2 00 V 0 00 v Gain variable Divisions Grids Dual 18 ms Qu
42. innefattar r tt att bli n mnd som upphovsman i den omfattning som god sed kr ver vid anv ndning av dokumentet p ovan beskrivna s tt samt skydd mot att dokumentet ndras eller presenteras i s dan form eller i s dant sammanhang som r kr nkande f r upphovsmannens litter ra eller konstn rliga anseende eller egenart F r ytterligare information om Link ping University Electronic Press se f rlagets hemsida http www ep liu se Copyright The publishers will keep this document online on the Internet or its possible replacement for a considerable time from the date of publication barring exceptional circumstances The online availability of the document implies a permanent permission for anyone to read to download to print out single copies for your own use and to use it unchanged for any non commercial research and educational purpose Subsequent transfers of copyright cannot revoke this permission All other uses of the document are conditional on the consent of the copyright owner The publisher has taken technical and administrative measures to assure authenticity security and accessibility According to intellectual property law the author has the right to be mentioned when his her work is accessed as described above and to be protected against infringement For additional information about the Link ping University Electronic Press and its procedures for publication and for assurance of document integrity please refer to
43. limiter CHAPTER 4 DEVELOPMENT SOFTWARE 43 PRIMILIM LOWER_SPEED Nmax Position Position Position Position Figure 4 6 PRIMILIM and LOWER_SPEED principle 4 4 3 Aimbit and stdbybit The system was from the beginning only set to standby mode by overwriting the command codes improve the control of the system the different SYSMODES had to be activated again When the system are reset the command for standby are loaded in to the accumulator When the DRUi receives a new data package with a valid command code the aimbit are set and the system goes into active mode If the communication fails and no new values are received the system goes automatically to standby mode again 4 4 4 Stop command The simulation menu in the ground profile generator stopped sending values when the stop button was activated and nothing more To receive more control over the system an extra true case were added in the Ground Profile Generator When stop button are latched the generator sends a stop code to the DRUi code 0024h The stop code then activates the standby mode and the system goes into system reset then it is resetting the initialization values and empty the input receive and output send buffer No old values are allowed to be in the send buffer when the system starts again To reset the memory a loop is storing zeros to all the memory positions were speed and position commands are stored The reason is to make the system
44. m BH popm BG RET 84
45. m set ting The angels in the figure are not scaled and therefore not actual 16 2 and 14 2 degree s Position Degree POSIST_HI Decimal Max 16 2 116h 278 Zero 0 0 0 Min 14 2 FF09h 247 Through the measurements from position and the values from the encoder there is possible to count the gear ratio and the scaling factor SNA for the speed loop feedback 2mmotorrad 16 Encoder value round Umaz 0 7rad s Maximum elevation speed KNISTgrob 640 KNISTgrob are a constant feedback scaling factor in the speed loop given by 3495 rpm at 50dB CHAPTER 4 DEVELOPMENT SOFTWARE 52 Gear Ratio 278 2 180 27 16 23 x 16 385 39 SNA Gear Ratio xwmar 60 5 27 6000 385 39 0 7 60 x 640 27 6000 275 All the uncommented constants are system specific constants for the partic ular system and has not been changed 4 6 2 Measuring the unbalance Before measuring and setting up the filters the unbalance of the test stand were measured PosistHiW2_IqistW2 CHT 2500 T T Friction Unbalance 2000 Fes e N 1500 5 E o H 1 NG 4 m 2 1000 3 ss o 500 Lr E NC N 0 a N 500 i i 1 1 i i 15 10 5 0 5 10 15 20 PosE Figure 4 16 Unbalance The measurement shows the test stands large unbalance due to its heavy front Figure 4 16 shows th
46. mmands are done through the CPU The CPU is a DSP Digital Signal Processor from Texas instruments The Communication part that receives it information from the PC are handled by the Universal Serial Controller Z16C30 from Zilog The containing parts of this chapter is the complete system which regulates and gives the system its physical motion 3 1 Test stand The test stand can be divided into two parts upper and lower The lower part is the vehicle part with the purpose to simulate a moving vehicle The upper part is the armoury part for the weapon stabilization task By send ing the road signals from the Ground Profile Generator the DRUi process and controls the stand It compensates the actual position compared to the demanded position from the input signal The DRUi then regulates the cur rent so the stand starts to move and following the input signal as close as the regulator structure manage to regulate the system The stand has only the possibility to move around one centre axis It could not lurch sideways as a vehicle would move in the reality 22 CHAPTER 3 SYSTEM SETUP 23 Figure 3 1 Stabilization platform Each part are driven by one 280 A AC DC motor over gear segment with planet mechanisms The vehicle lower part of the platform receives it feedback from the encoder mounted back on the motor regarding its speed position and current The upper part which will be stabilized due to the test stands movement will recei
47. ns as the standard RS 232 serial com munication have The RS 485 supports more drivers and receivers up to 32 each The RS 485 communication is widely used in industrial applications 2 8 DRUi regulator structure The regulator structure of the DRUi consists of three major closed loops which is the Current loop Speed loop and Position loop The PI regulators of the Speed and Position loop runs with a clock frequency of 2k Hz The reg ulator of the Current loop runs with the system clock of 20kHz To run the system in speed mode the position loop are disconnected and the input offset values are connected to NSOLL SOLL Demanded IST Actual The in formation about speed and position are transfered from the encoder mounted on the back of the AC DC motor Se figure 3 6 for encoder emplacement IQUNLIM POS NSOLL IOUNLIM POSS SOLL LO 1 POSIST CURRENT LOOP SPEED LOOP POSITION LOOP Figure 2 6 Regulator structure DRUi RS 422 and 485 Standards CHAPTER 2 THEORY 21 SNS and SNA is scaling factors NISTA NISTS and DRUFA are the system feedback factors Chapter 3 SYSTEM SETUP In this chapter the system hardware will be described and explained First the test stand will be introduced to get the reader familiar with the platform and how the detailed componets are placed in the system The heart of the system is the DRUi It is there the processing and regulation of speed co
48. odes SYSMODES runs with a clock rate of 2 kHz Possible system modes are Aiming Standby and Exception mode Exception mode appears only if a system error is detected Aiming mode is the active mode for the test stand During aiming mode the system could run either in speed mode or position mode 4 3 1 Communication As a first step it was necessary to measure and assure that the commu nication between the PC and DRUi were correct Earlier documentation described that 10 of the send values were not received by the DRUi The problem was to se and know if every data value really were received and CHAPTER 4 DEVELOPMENT SOFTWARE 38 stored in the DRUi To se if the communication actually worked the commu nication were measured with an oscilloscope The data which were send from the PC were recorded and converted in a EXCEL file and than plotted But the result didn t really match what were expected that the PC would send EXCEL are limited to plot fairly few values and the recording of the file didn t seem to be reliable The solution of this problem were weary simple Code Composer Studio has a graphical capability to present what is stored in the memory z Graphical Display SEA Lin Fixed Scale Figure 4 2 Input values Figure 4 2 shows the circular input buffer The buffer consists of six data pages with length 80hex which equals 128 in decimal that s why there is a gap between every 100 input values The conclusion were tha
49. om the PC By structuration and analyses of the software suitable reconfigurations of the Ground Profile Generator and the software for programming the are done e At least the whole system was mounted at the stabilization platform and measurements on the platform take part The system had to be teached were the platforms end position are to prevent the system of running in to the metal end stops Measuring of the system unbalance was performed together with a frequency analysis of the regulator unit By the frequency response of the measurements suitable filters are designed to get an acceptable performance by the system Then at least a production run of the system were performed when all the functions were implemented CHAPTER 1 INTRODUCTION 11 1 4 Company presentation January the first 1999 SIG Antriebstechnik AG were taken over by Curtiss Wright Corporation and renamed to Curtiss Wright Antriebstechnik GmbH CWAT CWAT belongs to the Business Unit Curtis Wright Controls Engineered Systems Curtiss Wright is divided into the three different areas Motion Control Flow Control and Metal Treatment The facilities in Neuhausen has approximately 80 employees were 50 are engineers Electronics and Mechanics and belongs to the area Motion Control The main developments in Neuhausen are drive systems for indus try defence applications and vehicles in the area of electronics software and system integration electro mec
50. page Otherwise next instruction may not find the correct value In high level programming like C you don t need to think about the data pointer and stack manipulation Mikrodatorer bit f r bit page 191 Chapter 4 DEVELOPMENT SOFTWARE The software in this project are adapted from other projects within the com pany This chapter describes the following adaptation of the DRUi The major part of the adaptation were already made before this project There where weary less documentation about what was done and how it was done The fact that the person which worked on the system before no longer worked at the company That resulted in a difficult start of understanding the soft ware and what the ide s of the structure the former programmer had 4 1 Setting up the software The software adaptation was started December 2002 And since October 2003 no further work has been done on the software The import of the code resulted in lots of compiler error due to different versions and setting from the old software The start pointer were not found and had to easily be re programmed with a few lines of code All the search paths needed to manually be set again for each folder and put in right order In the new version of Code Composer this is done when the code is moved between two different computers which makes it very easy to import and export project files But it doesn t work 100 correct all the time 4 2 Understanding the software
51. r changes for the feedback of the position loop Normally the file is used for stabilization with an input from Gyro Now it gets it feedback POSIST from the position encoder of the motor 4 3 7 Speed and position mode To activate the different modes the LabVIEW program need some work The program was programmed in a previous version of LabVIEW The statement of the command code didn t pass all the cases and therefore only worked in speed mode In speed mode command 0022h are sending In position mode command code 0023h are sent To separate them a flag are set for running the system in speed or position mode In position mode the flag closes the position loop of the DRUi and activate NREG S which is the regulator structure for position mode 4 4 Safety routines For system safety additional features were implemented into the system The safety routines are implemented to preserve the system from damages and saving the material from substantial stress Appendix B contains the as sembler codes of Primilim and Nlimiter CHAPTER 4 DEVELOPMENT SOFTWARE 41 4 4 1 Nlimiter The Nlimiter has the purpose to prevent the system from to high accelera tions A high acceleration causes weary high tension and stress on the gear and planet mechanisms The current could also reach very high values which increase the stress on the electronics The limiter is a dy dt limiter and measures the step size and step height 100 values step
52. rogram and read machine code In assembler programming you don t put together cases or structural meanings that you would do in high level programming The assembler language also differs from which type CHAPTER 3 SYSTEM SETUP 34 of processor and manufacturer that are used but the basics and structural behaviour are almost the same The commands in assembler are so called mnemonics which are written first in the instruction and before all argu ments An example of mnemonics for the Texas c54x DSP is a simple load instruction where the data from a variable is copied to the accumulator LD VARIABLE_X A The data in variable_x is the source and A is the destination The old value in accumulator A is over written by the new value from the source In assembler programming all the variables are stored either in the memory or in the processor registries In the registries the available space are more restricted than it is in the memory Read and write instructions through the registry is more rapid than a read and write from the memory because the internal registries at the processor When programming in assembler it is very important to always keep in mind the data pointer DP so it points on correct data page otherwise there is a possibility that data may be overwritten in the memory pages It is also important that the data pointer points on correct page for push and pop of the data stack and that the instructions write it values on correct
53. rom a moving vehicle a sinus wave pure offset or what the user needs AXCON E Figure 1 1 System structure CHAPTER 1 INTRODUCTION 10 1 2 Background The new platform has the purpose for the company to reach a more rapid and accurate development phase of new hardware and software New ideas and components could easily be implemented and evaluated at the test rig Similar components from different manufacturers could easily and accurate be compared and evaluated due to performance and costs The platform gives a great opportunity for new engineers to practise and obtain knowledge about stabilization systems In the end the platform hopefully decrease the research and evaluation costs of developing new stabilization systems 1 3 Method e First an orientation about the area motion control was done Not so deep and theoretical just only a brief orientation about the subject How different regulators were used and how a closed loop system per forms What types of different system feedbacks normally are used in a regulator system To get a better understanding of the complete sys tem some small tests were done to see what happens and what type of effects different adjustments has on the system That helped also to get familiar with the programming software s Code Composer Studio 2 0 and LabVIEW e Next step were to analyse the hardware and especially the software for the DRUi that processes the given commands fr
54. s of debugging the system which is described further in this chapter 4 5 1 Timing debug As a first step of debugging the system break points were set and the system were stepped through That give a god insight how all the counters and rou tines were connected together The problem with stepping the system is that the behaviour could be different when the system runs with full clock speed By stepping the system it was possible to see that the VALID VALUES counter were set to low and therefore reset to early It also caused that the output buffers contained less than 100 values 4 5 2 Debug buffer To get even more insight in the system two debug buffers were programmed Both buffers are circular ring buffers that overwrite its own values when it s full The length of the buffer is only 400hex so the number of values is very limited in the buffer especially when you measure counters with an CHAPTER 4 DEVELOPMENT SOFTWARE 45 update rate of 2 kHz To write the both input and output counter into the buffers showed that they were resetting at the same time and therefore are synchronized Graphical Display 101 69 Lin Auto Scale Graphical Display lin Auto Scale Figure 4 7 Buffer actual and demanded values The upper graph in figure 4 7 shows the counter for actual values and the lower one shows the counter of demanded values 4 5 3 XF flag Another way to debug the system is to solder a wire at pin 27 on
55. six memory pages with size of 80hex each shown in earlier picture The processed values are stored in the output buffer The output buffer is a switched two pages buffer page with each memory space 80 The reason for this switching is to have the ability to write values to one buffer and read out from the other The input buffer starts on memory address 1400h and the output buffers start on address 1700h Se the switching of memory pages in flow diagram appendix A Input file PAGE NSOLL SWITCH Output file PAGE SWITCH 4 3 4 Timing received and processed values The structure of the data processing in the DRUi is receive process and send Receive and processing part of code was independent and separated from each other To make these routines dependent a flag are set when 100 values are received and 100 values are processed When the statement is fulfilled the process of sending data will be initialized The result becomes better timing and fewer disturbances between the data packets The timing and reading of the input values are important if some value is missing read out to early or not processed the speed command are set to zero if there is not enough values left to process The reason for 100 values was already chosen by the earlier programmer which worked on the system first 4 3 5 Counting the input values As earlier described the VALID_VAL counter are important for the number of values to be processed Also the counter
56. smaller then maxStep upper or lower limit LD HILFCO4 16 A difference gt ACCU BC HANDLIMOI ALT jump to upper limit handling lower limit handling LD HILFCO2 16 A SUB HILFCO3 16 NeuOut AltOut maxStep 02 03 LD A 16 A shift to lower accu LD HILFCO6 B MAX A HANDLIMEND upper limit handling HANDLIMOI LD HILFCO2 16 A ADD 16 NeuOut AltOut maxStep LD A 16 A shift to lower accu LD HILFCO5 B MIN A HANDLIMEND APPENDIX B ASSEMBLER CODE HANDLIMO09 LD NeuOut gt ACCU No change of NSOLL HANDLIMEND RET 79 APPENDIX B ASSEMBLER CODE 80 Primilim asm R o o AE AAA SEK Af MODUL PRIMILIM ASM 07 06 99 R Aregger Version 1 0 DAS MODUL PRIMILIM ENTHAELT DIE PRIMITIVE POSITION SGRENZUNG VORAUSSETZUNGEN INPUT KEIN INPUT OUTPUT KEIN OUTPUT UEBERGABE INSOLL VERZWEIGUNGEN KEINE ANDERUNGEN NEUES Adapted for stabilo project 2005 12 15 j n sect MAIN PRIMILIM1 KKK KKK K K KK K K KEK KK K K K 2K OK K K K K KK K K KK KK KK K ROK OK OK I K K OK KROK OK K K OK KK K K OK OK OK OK OK K OK OK OK OK K K OK OK OK KK OK KKK POSIST_HI gt HILFF1 LD 4 FUNCP DP LD POSMX3 A POSMX3 0000h gt Primilim disabled RC AEQ LD
57. t USC A D RITE RETURN SYSCON APPENDIX A CODE FLOW DIAGRAM 13 PAGE SWITCH 0 gt NIST_P_COUNT GEN NIST YES GEN NIST OUT2 1700h gt NIST OUT ADRESS 1780h gt NIST OUT ADRESS APPENDIX A CODE FLOW DIAGRAM 74 PAGE NSOLL SWITCH 0h gt NSOLL P COUNT PAGE NSOLL 1 PAGE NSOLL 1 PAGE NSOLL 2 5 SWIICH NSOLLxPAGE SWIICH NSOLLIPAGE PAGE NSOLL 6 1400h gt NSOLL P ADR SWITCH NSOLL6PAGE NSOLL P ADR 80h 1680h gt NSOLL P 0h gt PAGE NSOLL APPENDIX A CODE FLOW DIAGRAM NLIMITER AR gt HILFCO1 AR2 gt HILFCO2 AR2 gt HILFCO3 ARA gt 5 5 gt HILFCO6 HILFCO2 HILFCO1 gt A A gt HILFCO4 HILFCO2 HILFCO3 gt A HILFCO2 HILFCO3 gt A HILFCO5 gt B MIN AOR B HILFCO6 gt B MAX A OR B HILFCO1 gt A 75 APPENDIX A CODE FLOW DIAGRAM PRIMILIM POSMX3 0 POSIST_HI gt HILFF1 POSMXI HILFF1 gt HILFF 1 gt NSOLL gt NSOLL gt 0 gt NSOLL 0 gt NSOLL 76 Appendix B Assembler code As with the flow diagram only a few assembler code files will be presented in this appendix The codes are a part of the company production secret and therefore only some basic files will be presented in appendix
58. t stand CHAPTER 2 THEORY 17 Figure 2 3 Development system Figure 2 3 shows the development system with PC DRUi and DC servo motor 2 6 Ground profile generator The ground profile generator is a graphical user interface programmed in the development tool LabVIEW from National Instruments The ground profile generator is a interface for create and send simulated signals or recorded road signals to the DRUi The ground profile generator has three essential menus e Road Characteristics e Simulation e Communication CHAPTER 2 THEORY 18 Figure 2 4 Ground profile generator The road characteristics Fahrweg Egenschaften are the menu for loading an already recorded signal from a moving vehicle or create your own signal for example a sinus or a saw tooth signal The simulation menu is where the actual simulation appears the signal is loaded and the system is ready to proceed the simulation There are also functions to let the user change period time of send cycle number of values to be sent The sampled input signal is presented graphically together with the signal from the DRUi presenting the actual speed feedback from the DC servo motor Figure 2 5 shows the simulation window with its reference signal and the actual position of the motor The Communication menu is just for testing and synchronizes the com munication between PC and DRUi and let the user to change communication port The DRUi sends back an ans
59. t the communication is working correct every value are correct and no values are missing The earlier problem of 1096 loss of data values probably belonged to the older and slower computer with less recourses than todays computer 4 3 2 Ground profile generator communication Documentation of the project described that the problem with the commu nication was a problem from the Ground Profile Generator The cause was it could not send a new data package every 200ms the rate it reached were only a new data package every 400ms So effort was put on how to make the LabVIEW program sending the data with a higher rate The genera tor structure is relative complex and to do any major changes the whole structure needs to be changed Fortunately there was a much simpler way to solve the communication issue The processing of data values in the DRUi are easily changed by the counter VALID VAL It takes a new data value every 1 2000 X Were 2000 is the clock frequency and X is number of cycles before next value is processed A new package with 100 values is sending every 400ms That gives the time to process a new data value every 1 2000 8 4ms per value and CHAPTER 4 DEVELOPMENT SOFTWARE 39 frequency of 250Hz To change the LabVIEW program were not necessary for keeping the data rate of the DRUi 4 3 3 Input and output buffer The received values are read out in a circular ring buffer The values are than stored in a circular buffer with
60. t ti com SRVS Data ti KnowledgeBases analog document faqs notch htm 61 CHAPTER 5 RESULTS 62 13 Zilog Z16C30 Datasheet November 2005 http www zilog com docs serial z16c30 pdf Appendix A Code flow diagram In this appendix the flow diagrams over the code structure are presented The flow diagrams do not cover the whole code structure it is just a part and should be considered as a guide line for how the code is structured 63 APPENDIX A CODE FLOW DIAGRAM AIMING Cycle 1 Cycle 3 Position mode Cycle 4 64 APPENDIX A CODE FLOW DIAGRAM Cycle 5 Aiming mode Cycle 6 Cycle 7 Cycle 8 Cycle 9 Cycle 10 CALL ZURRCON CALL NCALC CALL LOWER_SPEED CALL PRIMILIM1 CALL NREG_A CALL MAIN2 CALL FILTER CALL FILTER CALL FILTER CALL DRUON1 RET RET RET RET APPENDIX A CODE FLOW DIAGRAM 66 17 WRITE_DATA_CHECK F WRITE DATA 0 gt SLEEPCOUNTER CALL OUTLIFEV AL SLEEPCOUNTER 1 READ DATA CALL COMMANDER APPENDIX A CODE FLOW DIAGRAM 67 COMMANDR CALL VALUEREAD NO H YES HIGHBYTESTORE CALL ASC2HEX HEX gt A LOWVALUE gt B B 256 4 gt WORDTEMP 00h gt HIGHBYTE WORDTEMP gt B E tn ADR COUNT 1 gt COMMAND VAR IN POS gt APPENDIX A CODE FLOW D
61. th You all have been very friendly Contents 1 INTRODUCTION 1 1 1 2 1 3 1 4 1 5 1 6 2 1 2 2 2 3 2 4 2 5 2 6 2 7 2 8 3 1 3 2 3 3 3 4 3 5 PUTPOSE ec ut er a aoe aE qeu RR d Background dea Be ele Big ele Method Bik BTR eue Mite Oe Ae Company presentation uou anh ae Op Vg PO Limitations duce eae whe gt WA aS e RUE E es Thesis structure ss THEORY Motion Control rr Programmable Motion Control sosse sr rr rs sr or TOL s k SS MeV nag AN quB EU D Rex Bowes hee M So Gk unk Gee EB oS System overview Ground profile Communication ee PEE DU USE T DRUi regulator structure viec woke E ror rr rr REX SYSTEM SETUP TOS ION 922 uo ausu ue zo arum we Bote fede eG SOO Soothe ie Aa nh ang eo Bep Bee Be ames CET ee eee te nado te cta Ce 3 3 1 Architecture 3 3 2 Features Of CO4X DSP uo mor rr rr rr be BM 3 3 3 Addressing modes WCPO MOTUS s Y uu dS J UE SN Zilog comunication unit e cd m oe rr Ee OE 3 4 1 Features of the USC c else Perque Q9 Xe USB COMET tax
62. the DSP That pin is the external output of the XF flag The XF flag is easy to measure when it goes high and low To set the xf flag the commando SSBX 1 XF are written and resetting the flag with SSBX 1 XF By setting the flag in front of a routine and reset it after the routine it s easily possible to measure the clock rate through that particularly routine or a whole file 4 5 4 Braking the current loop By feeding the current loop with a constant value and break the speed and position loop is it possible to see if the problem is isolated into the current loop By breaking the loop and write the values into the debug buffer it was CHAPTER 4 DEVELOPMENT SOFTWARE 46 possible to see that the current loop were working correct and its regulator By closing the speed loop and monitor the current it was obvious that the problem appears when the speed loop are closed Therefore the problem was limited to the position and speed loop Graphical Display Lin Auto Scale Figure 4 8 Current loop The current loop figure 4 8 shows the disturbance when the system coun ters drifts away and get wrong values or missing some values 4 5 5 Flag for last processed value To get the gap even shorter between every send data package from the DRUi a flag were set for start processing the new values next cycle when the last value were processed Also a flag were set for reduce the number of cycles after processing the Command code and The Lifes
63. timing problems new errors has been found in the system The disturbance which appears in the system when DRUi sending its data to the PC is not solved yet The temporary solution of comment out the comparing BITF function from the software is not engineering manner It should be there to assure that the send buffer is empty before a new value is placed at the port When the system is connected together with the test stand new distur bances appears in the system again There could be many reasons for these disturbances Down at the test stand much higher current and torque are affecting the system With high currents there is possible to receive induc tive disturbances in the signal cables If there is a communication problem many different errors could appear in the system There is a possibility that underflow or overflow of data appear some where in the system All the important security functions are implemented in the system and 59 CHAPTER 5 RESULTS 60 working correct The different system modes are also working and the system switches from standby to active mode on given speed position commands from the Ground Profile Generator Also the Brake is working so the system is possible to move with the handle crank in standby mode not in active mode The system is easy to use and implement for further test together with the test stand Also the Ground Profile Generator has been minor improved from the previous version The code was not doc
64. ull duplex data channels It could be used for serial to parallel or parallel to serial controller or converter The communication protocol is software configurable and could therefore be used for a variety of different serial communication applications Each receiver and transmitter channel has a FIFO buffer and it supports both asynchronous and synchronous data transfer with two baud rate generators per channel The communication unit has the task to realise and take care of the serial communication between PC and DRUi TMS320c54X DSP CPU and Peripherals Volume 1 5Zilog Z16C30 Data sheet November 2005 CHAPTER 3 SYSTEM SETUP 28 To Other Channel Recelve DMA fm FIFO Recelver Clock MUX DPLL Receive Data 2 a T TA Interrupt and Control De 1 vice Status 2 Counters gt 3 BRGO 4 BRG1 Channel Control 32 byte Transmit FIFO Transmitter D p D Recelve Transmit Clocks 16 Bit Internal Data bus MA Control Transmit Data Figure 3 4 Architecture Zilog Serial Controller 3 4 1 Features of the USC Two independent full duplex data channels 0 10Mbps 32 Byte data transfer FIFO for each transmitter and receiver channel 16 Bit data bus bandwidth 110 ns bus cycle time DMA interface for each transmit end receive channel The USC is the hardware interface that handles the serial communication 3 5 USB COMi M
65. umented by the earlier programmer so the start and proceeding in the beginning of the project were very difficult That experience shows how important proper documentation is for the next person who should proceed with a project To proceed on an already started project or take over a project from another engineer is a big part of engineering and therefore it has been a very god experience 5 2 Further work Still many improvements are possible to do on the system On the Ground Profile Generator further work could be accomplished by synchronize the actual value with the demanded value to prevent the shifting by 100 values in the graphical window The routine for sending the stop code are not always working satisfied the stop code are not send and the user interface hangs up sometimes When shifting between the different menus windows the system freezes for a short period The rate of sending data package could further be investigated to achieve a higher data rate On the DRUi software there is still a minor problem with the upward communication in the WRITE function There is this disturbance with the BITF function that needs further investigation The input values of the DRUi could increase instead of filling up the buffer and process the values The input memory buffer could be filled with two or even three data packages before it start to process and sending data back to the PC To achieve that the Ground profile generators start sequence must
66. ushless DC servo Motor BLDC with 28 VDC working voltage The mo TMS320c54X DSP CPU and Peripherals Volume 1 Page 435 CHAPTER 3 SYSTEM SETUP 30 tor is synchronous and could not directly start with AC current A syn chronous servo motor has a rotor that carries a magnetic field produced by a current excitation from a rotating rotor As the brushless motor doesn t have any brushes that physically rotate inside the motor its movement are low sounded and no sparks appears from the rotating rotor The BLDC motor could also be called Permanent Magnet Synchronous Motor PMSM The deferens between them is the back EMF it s trapezoidal from brushless and sinusoidal from PMSM motor The torque that are delivered from the servo motor is linear and gives maximum torque from zero speed To run the servo motors with DC current a more simple structure of the hardware and software is achieved because of fewer sensors for current control 3 7 1 Motor feedback The motor contains a multiturn encoder for data feedback The encoder is both a position and speed sensor that is used for closing the speed and position loops and controlling the motor torque The amplitude of the current is corresponding to the desired torque The phase of the current is mounted to the position of the rotor The encoder gives absolute information up to 4096 motor turns with a resolution of 15bit 219 and the maximum speed of 6000rpm frame motor mounting M
67. ve its reference signal from a gyro Figure 3 1 shows the stand with the motors and gearboxes The motor and gearbox are white coloured placed low center and up to the right 3 2 DRUi 360 DRUi 360 is a controller unit for stabilization tasks it is used both in military and civil industrial applications In the military it is used for turret rotation weapon stabilization and elevation In civil it is used as a stabilizer by the Swiss railway in their ICN trains for the tilting control in curves It runs with 28VDC and a maximum current of 360 A CHAPTER 3 SYSTEM SETUP 24 Figure 3 2 DRUi 360 3 3 CPU The system CPU is a DSP from Texas instruments TMS 320LC54x which is a fixed point DSP with a modified Harvard architecture that features low power consumption and a high degree of parallelism in the DSP core The architecture is particularly designed for real time signal processing The real time capabilities make it suitable for applications that cannot tolerate delays A DSP is a kind of specialized CPU for specific digital signal processing which means that it is not built for so general and various purposes as a microprocessor 3 3 1 Architecture The modified Harvard architecture is designed with one program memory bus three data memory buses and four address buses total eight 16 bit TMS320C54x DSP Programmer s Guide CHAPTER 3 SYSTEM SETUP 25 buses with on chip memory and on chip peripherals The separate progr
68. wer code if the synchronization is okay otherwise an error code appears in the graphical window Figure 7 shows the simulation window with its demanded and actual speed The output signal CHAPTER 2 THEORY 19 is shifted by 100 values and therefore making the delay between the signals presented in the graphical window File Edit Operate Tools Browse Window Help id gt enu 2 SIMULATION L String Drehzahlsollwert Q m 2 Eme BRANES methine 60000 408 Posi 15501 4 Anzahl Werte itionssollwert Sendesting Index Bytes im Read Buffer 2000 Jon fzo je 00 Status Simulation B Messagebox baked Lifesign Sim Befehlscode Sim 2000 100 24 0022 Simulation nicht Berelt synchronisieren 4000 Sollwert T Lifesign DRUI Befehlscode DRUI System Reset end standby Se DRUI Synchronisieren 25 System Reset and standby Anzeige Soll Ist onis System Reset and standby prehzahimode Positionsmode Falscher Mode Vj Timeout Befehlscode Timeout Lifesign und Werte Mj Max Pos Rechts Pos Links Vj Lifesign Error Fehler Qi Except 2 100 values step 9 100 iue TIME COMPLETE TIMING LOOP 0 TO SAmplitude IMING LOOP 0 TO 6 TIMING LOOP 0 TO 8 397 00 lo TIMINGLOOPOTOS 1347 Poo TIMING LOOP D TO 6 400

Download Pdf Manuals

image

Related Search

Related Contents

E-mu Systems Emulator User Guide  電磁錠制御盤 設置/取扱説明書    Micro casque C420 AKG - Francis MERCK sur le NET  IP A  Omnitron Systems Technology MAH 200 Barcode Reader User Manual  FMUSER FUTH804B Telephone Hybrid User Manual  ADVANCED USER MANUAL v1.1.2    CTS HAC Tester User Manual - Crescendo Tech Services (CTS)  

Copyright © All rights reserved.
Failed to retrieve file