December 2009 Volume 100 No. 4 www.saiee.org.za

0 downloads 0 Views 1MB Size Report
Preferred submission is by e-mail in electronic MS Word and PDF formats. ... An additional copy of the issue in which articles appear, will be provided free of charge to authors. If the page charge is honoured the authors will also receive 10 free reprints without covers. ..... [8] H.M. Deitel and P.J. Deitel: “Java How to Program,.
Africa Research Journal ISSN 1991-1696

Research Journal of the South African Institute of Electrical Engineers Incorporating the SAIEE Transactions

SAIEE AFRICA RESEARCH JOURNAL Vol 100 No.4 pp 89-112

www.saiee.org.za

December 2009 Volume 100 No. 4

SAIEE AFRICA RESEARCH JOURNAL

SAIEE AFRICA RESEARCH JOURNAL – NOTES FOR AUTHORS

(SAIEE FOUNDED JUNE 1909 INCORPORATED DECEMBER 1909) AN OFFICIAL JOURNAL OF THE INSTITUTE

This journal publishes research, survey and expository contributions in the field of electrical, electronics, computer, information and communications engineering. Articles may be of a theoretical or applied nature, must be novel and must not have been published elsewhere.

ISSN 1991-1696

President Mr du Toit Grobler Vice-Presidents Mr Andries Tshabalala Mr Mike Cary

Immediate Past President Mr Ian McKechnie Deputy President Dr Angus Hay Honorary Treasurer Mr Les James

Secretary and Head Office Ms Gerda Geyer South African Institute for Electrical Engineers (SAIEE) PO Box 751253, Gardenview, 2047, South Africa Tel: (27-11) 487-3003 Fax: (27-11) 487-3002 E-mail: [email protected]

Editorial Board Chairperson Prof IK Craig ARJ Editor-in-Chief Prof BM Lacquet

EDITORS AND REVIEWERS EDITOR-IN-CHIEF Prof. B.M. Lacquet, Faculty of Engineering and the Built Environment, University of Witwatersrand, Johannesburg, South Africa [email protected]

General Topics / Editors-at-large: Dr P.J. Cilliers, Hermanus Magnetic Observatory, Hermanus, South Africa Prof. M.A. van Wyk, Dept. of Electrical and Information Engineering, University of Witwatersrand, Johannesburg, South Africa

MANAGING EDITOR Dr S. Sinha, Dept. of Electrical, Electronic & Computer Engineering, University of Pretoria, Pretoria, South Africa [email protected]

INTERNATIONAL PANEL OF REVIEWERS W. Boeck, Technical University of Munich, Munich, Germany W.A. Brading, Australia Prof. G. De Jager, Dept. of Electrical Engineering, University of Cape Town, Cape Town, South Africa Prof. B. Downing, Dept. of Electrical Engineering, University of Cape Town, Cape Town, South Africa Dr W. Drury, Control Techniques Ltd, United Kingdom PD Evans, Dept. of Electrical, Electronic & Computer Engineering, The University of Birmingham, Birmingham, UK Prof. J.A. Ferreira, Electrical Power Processing Unit, Delft University of Technology, Delft, The Netherlands O. Flower, University of Warwick, UK Prof. H.L. Hartnagel, Dept. of Electrical Engineering and Information Technology, Technical University of Darmstadt, Darmstadt, Germany C.F. Landy, Engineering Systems Inc., USA D.A. Marshall, ALSTOM T&D, France Dr M.D. McCulloch, Dept. of Engineering Science, Oxford, United Kingdom Prof. D.A. McNamara, University of Ottawa, Ottawa, Canada M. Milner, Hugh MacMillan Rehabilitation Centre, Canada Prof. A. Petroianu, Dept. of Electrical Engineering, University of Cape Town, Cape Town, South Africa Prof. K.F. Poole, Holcombe Dept. of Electrical and Computer Engineering, Clemson University, United States of America Prof. J.P. Reynders, Dept. of Electrical & Information Engineering, University of the Witwatersrand, Johannesburg, South Africa I.S. Shaw, University of Johannesburg, SA H.W. van der Broeck, Phillips Forschungslabor Aachen, Germany Prof. P.W. van der Walt, University of Stellenbosch, Stellenbosch, South Africa Prof. J.D. van Wyk, Dept. of Electrical and Computer Engineering, Virginia Tech, United States of America RT Waters, UK TJ Williams, Purdue University, USA

SPECIALIST EDITORS Communications, Signal Processing: Prof. L.P. Linde, Dept. of Electrical, Electronic & Computer Engineering, University of Pretoria, Pretoria, South Africa Prof. S. Maharaj, Dept. of Electrical, Electronic & Computer Engineering, University of Pretoria, Pretoria, South Africa Dr O. Holland, Centre for Telecommunications Research, London, United Kingdom Prof. F. Takawira, School of Electrical, Electronic and Computer Engineering, University of KwaZulu-Natal, Durban, South Africa Computer, Information Systems and Software Engineering: Prof. A. van der Merwe, Meraka Institute, CSIR, Pretoria, South Africa Prof. E. Barnard, Meraka Institute, CSIR, Pretoria, South Africa Prof. B. Dwolatzky, Joburg Centre for Software Engineering, University of the Witwatersrand, Johannesburg, South Africa Control and Automation: Dr B. Yuksel, University of Tokyo, Japan Electromagnetics and Antennas: Prof. J.H. Cloete, Dept. of Electrical and Electronic Engineering, University of Stellenbosch, South Africa Prof. T.J.O. Afullo, School of Electrical, Electronic and Computer Engineering, University of KwaZulu-Natal, Durban, South Africa Dr R. Geschke, Dept. of Electrical and Electronic Engineering, University of Stellenbosch, South Africa Electron Devices and Circuits: Prof. M. du Plessis, Dept. of Electrical, Electronic & Computer Engineering, Pretoria, University of Pretoria, South Africa Energy and Power Systems: Prof. M. Delimar, Faculty of Electrical Engineering and Computing, University of Zagreb, Zagreb, Croatia Engineering and Technology Management: Prof. J-H. Pretorius, Faculty of Engineering and the Built Environment, University of Johannesburg, Johannesburg, South Africa Prof. L. Pretorius, Graduate School of Technology Management (GSTM), University of Pretoria, Pretoria, South Africa

Additional reviewers are approached as necessary Published by SAIEE Publications (Pty) Ltd, PO Box 751253, Gardenview, 2047, Tel. (27-11) 487-3003, Fax. (27-11) 487-3002, E-mail: [email protected]

Additional reviewers are approached as necessary ARTICLES SUBMITTED TO THE SAIEE AFRICA RESEARCH JOURNAL ARE FULLY PEER REVIEWED PRIOR TO ACCEPTANCE FOR PUBLICATION The following organizations have listed SAIEE Africa Research Journal for abstraction purposes: INSPEC (The Institution of Electrical Engineers, London); “The Engineering Index” (Engineering Information Inc.) Unless otherwise stated on the first page of a published paper, copyright in all materials appearing in this publication vests in the SAIEE. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, magnetic tape, mechanical photocopying, recording or otherwise without permission in writing from the SAIEE. Notwithstanding the foregoing, permission is not required to make abstracts on condition that a full reference to the source is shown. Single copies of any material in which the Institute holds copyright may be made for research or private use purposes without reference to the SAIEE.

• •

Nature of Articles Two types of articles may be submitted: Papers: Presentation of significant research and development and/or novel applications in electrical, electronic, computer, information or communications engineering. Research and Development Notes: Brief technical contributions, technical comments on published papers or on electrical engineering topics.

All contributions are reviewed with the aid of appropriate reviewers. A slightly simplified review procedure is used in the case of Research and Development Notes, to minimize publication delays. No maximum length for a paper is prescribed. However, authors should keep in mind that a significant factor in the review of the manuscript will be its length relative to its content and clarity of writing. Membership of the SAIEE is not required. Process for initial submission of manuscript Preferred submission is by e-mail in electronic MS Word and PDF formats. PDF format files should be ‘press optimised’ and include all embedded fonts, diagrams etc. All diagrams to be in black and white (not colour). For printed submissions contact the Managing Editor. Submissions should be made to: The Managing Editor, SAIEE Africa Research Journal, PO Box 751253, Gardenview 2047, South Africa. E-mail: [email protected] These submissions will be used in the review process. Receipt will be acknowledged by the Editor-in-Chief and subsequently by the assigned Specialist Editor, who will further handle the paper and all correspondence pertaining to it. Once accepted for publication, you will be notified of acceptance and of any alterations necessary. You will then be requested to prepare and submit the final script. The initial paper should be structured as follows:

• • • • • • •

TITLE in capitals, not underlined. Author name(s): First name(s) or initials, surname (without academic title or preposition ‘by’) Abstract, in single spacing, not exceeding 20 lines. List of references (references to published literature should be cited in the text using Arabic numerals in square brackets and arranged in numerical order in the List of References). Author(s) affiliation and postal address(es), and email address(es). Footnotes, if unavoidable, should be typed in single spacing. Authors must refer to the website: http://www.saiee.org.za/arj where detailed guidelines, including templates, are provided.

Format of the final manuscript The final manuscript will be produced in a ‘direct to plate’ process. The assigned Specialist Editor will provide you with instructions for preparation of the final manuscript and required format, to be submitted directly to: The Managing Editor, SAIEE Africa Research Journal, PO Box 751253, Gardenview 2047, South Africa. E-mail: [email protected] Page charges A page charge of R200 per page will be charged to offset some of the expenses incurred in publishing the work. Detailed instructions will be sent to you once your manuscript has been accepted for publication. Additional copies An additional copy of the issue in which articles appear, will be provided free of charge to authors. If the page charge is honoured the authors will also receive 10 free reprints without covers. Copyright Unless otherwise stated on the first page of a published paper, copyright in all contributions accepted for publication is vested in the SAIEE, from whom permission should be obtained for the publication of whole or part of such material.

Vol.100(4) December 2009

SOUTH AFRICAN INSTITUTE OF ELECTRICAL ENGINEERS

89

VOL 100 No 4 December 2009

SAIEE Africa Research Journal SAIEE AFRICA RESEARCH JOURNAL EDITORIAL STAFF....................... IFC

Object-oriented embedded C

by M. Neser and G. van Schoor.................................................................. 90

Development of a spoken language identification system for South African languages

by M. Peché, M.H. Davel and E. Barnard ..................................................97

On the parametric curves for the design, performance optimization and characterization of the LPDA Antenna

by L.I. Onwuegbuna and A.A. Jimoh.........................................................104

NOTES FOR AUTHORS....................................................................................IBC

90

SOUTH AFRICAN INSTITUTE OF ELECTRICAL ENGINEERS

Vol.100(4) December 2009

OBJECT-ORIENTED EMBEDDED C M. Neser* and G. van Schoor* * School of Electrical, Electronic and Computer Engineering, North-West University, South Africa, Email: [email protected] / [email protected]

Abstract: This paper presents an object-oriented implementation of ANSI-C for embedded systems. It offers practical guidelines for producing generic software libraries and portable applications. While various object-oriented implementations of C is available, the aim is to impress a culture of producing safe, robust embedded software which can easily be shared and integrated amongst developers and systems. Starting from coding standards, a design philosophy is proposed for creating reusable drivers, services, applications and finally, a complete real-time operating system. Key words: modular design, coding standards, real-time, operating system

1.

INTRODUCTION

Effective software engineering requires the ability to rapidly produce and integrate robust and secure code. The key to good software development lies in modular design, testing and code reuse. This is strongly supported by the Unified Modelling Language (UML) design philosophy [1]. By encapsulating functionality with clear interfaces, modules can be identified which can be re-implemented within single applications or across projects. In the object-oriented environment, modules are typically defined as classes consisting of attributes and behaviours in the form of member variables and methods. In embedded systems, object-oriented design is frequently hampered by intensive platform dependent hardware interfacing and real-time performance requirements. In addition, C, which is still the most popular programming language for embedded applications, is not inherently object-oriented. An object-oriented implementation of ANSI-C is proposed in this paper, which follows the UML approach for embedded real-time applications. It promotes code reusability through the development of platform independent modules for high-level functionality, but also allows for object-oriented hardware drivers and interrupt handling. In addition it allows for seamless integration with legacy code and supplied software libraries. Another important aspect of code reusability is maintainability. While design documentation and code comments are of high importance, existing code is often discarded because it is poorly written and incomprehensible. Well-written code should be selfexplanatory. When code is shared among developers, code familiarity can be instilled through coding standards and design patterns ranging from commenting styles to driver interfacing protocols. This can drastically improve the understanding and reusability of code.

After a brief discussion of coding standards, the objectoriented implementation of C is presented. This is followed by design patterns for some common functionality in embedded application development. Note that a working knowledge of embedded software development in ANSI-C and object-oriented programming is required. 2.

MODULAR DESIGN

In accordance with the UML philosophy, good software follows a hierarchical architectural design [2]. Through hardware abstraction and good interface design, application software will never need to access hardware directly. Furthermore, through the implementation of services and protocol managers, a further layer of functional abstraction can be created, allowing application software to be completely portable between different hardware systems. Application Services Common drivers

Custom drivers

Hardware

Figure 1: Layered architecture. Drivers are task independent and can be shared among similar hardware with different applications. Common services and protocol managers can also be shared among different systems, independent of hardware and applications. This architecture is illustrated in Fig. 1. Together, the grey sections produce an operating system. Common drivers comprise the software that communicates directly with generic hardware. It includes code for setting and reading specific address registers and handling interrupts. Devices on-board micro-controllers also require drivers. While software libraries for such devices are usually available, it rarely uses a common interface and does not implement any object-oriented approach. Fortunately, this code can easily be wrapped in

Vol.100(4) December 2009

SOUTH AFRICAN INSTITUTE OF ELECTRICAL ENGINEERS

classes. The goal is to compile a library including all common drivers and services to be shared among systems. The aim is further to implement a common driver interface for various different devices. This allows for the swapping of hardware and drivers with minimal modification of application software, e.g. replacing EPROM with FLASH or an UART with LAN. In most embedded systems, some hardware is application specific, e.g. discrete hardware and interrupts or custom PLD configurations. Custom drivers are implemented here. In such cases, the value of separate application software and hardware interfaces lies in the ability to upgrade the components independently. The hardware independent, application specific code forms the application layer. Code in this layer should contain no direct interfacing with hardware. However, large parts of application specific software can often be reused. Typically, code used for communicating between processors may be duplicated on the two sides of the link, creating a communication protocol. This common code can be extracted from the application software and included in the library as a common service.

91

triggered threads should be kept as short as possible. Only time-critical processing, such as loading values to and from hardware interfaces, should be done in these routines. The main thread should handle all other noncritical housekeeping. Fig. 2 illustrates how the main thread could execute various tasks and different event triggered threads. This ensures that when the processor gets temporarily heavily loaded with concurrent interrupts, the non-critical tasks will get delayed to when processing is less congested. Furthermore, embedded systems usually have repetitive behaviour. After initialization, the main thread typically enters into an infinite loop. The loop produces the system behaviour, which may be required to change upon meeting certain conditions. These conditions could be detected through continuous polling or through interrupts. In either case, sections of code will need to be included or excluded from the loop. It is generally possible to identify different modes with distinct behaviour. Complex systems may require switching back and forth between modes based on internal or external conditions. In addition, mode changes often require special treatment like the starting and stopping of processes.

The required drivers and services from the library can be combined to form a hardware interface. The hardware will require custom configuration to create a hardware specific operating system. Through proper design, an application independent hardware interface can thus be constructed. By making use of common design patterns, this interface can be made generic. This allows the application software to be hardware independent. Depending on the purpose of the system, the applications will however have some minimum functional hardware requirements from the operating system. Embedded systems are often event driven. Certain tasks are only executed if specific events occur. External interrupts generate the non-deterministic events used to trigger the associated tasks. Interrupts are asynchronous and may originate from an internal or external source, and from hardware or software. These are all handled by the interrupt manager. A scheduler can be used to dispatch deterministic repetitive tasks. With the use of a single timer, the scheduler can generate multiple events at different frequencies, which can be used to trigger synchronous tasks. The notion of foreground vs. background processing is frequently used in embedded software design and distinguishes between the main execution loop and the various event triggered threads. Definition of these terminologies differs amongst users and therefore, this reference will not be used here. While it is possible that all processing can be done within event-triggered threads, this is not good practice. To manage time-critical tasks and task prioritization in systems with asynchronously occurring events, interrupt

Figure 2: Main and event triggered threads. The implementation of these requirements fits neatly into the modular design philosophy. Every mode can be defined by a class, which contains functions for normal behaviour as well as mode transitions. These functions can then be appropriately invoked as conditions change. In an object-oriented language, it is advantageous to let all the modes inherit from the same generic mode interface. Mode changes can then be managed centrally by a mode controller. Generally, there is a great deal of code that has to be executed independent of the current mode. The mode controller can execute this common code by default. Different instantiated modes can be registered at the mode controller. The main thread enters a loop, which executes mode behaviour and checks for conditions that may require mode changes. Upon detection, it calls the appropriate mode transition code and changes the current mode. Following this, it continues the loop, executing the new mode behaviour. Conditions, which are checked for

92

SOUTH AFRICAN INSTITUTE OF ELECTRICAL ENGINEERS

mode changes, may also depend on the current mode and should be derived from a mode diagram in the system design. In embedded applications, the main thread typically contains an unconditional loop. Any other loops should be deterministic. Tasks such as algorithm computation can utilise for loops. When processing serial input buffers where data can be processed faster than it can be received, completion is guaranteed and a while-loop may be used. Using open-ended loops are prohibited. When polling for non-deterministic conditions, the possibility exists that the processor can get trapped in the loop. One option is to implement a time-out counter, limiting the repetitions of the loop. Often deterministic idle loops are implemented to pause between consecutive condition testing. This is strongly discouraged and for extended time periods it is prohibited, wasting useful processing time. As an alternative, the start of a waiting state can be time stamped and the conditions (including a possible timeout) can be polled once on every pass of the loop in the main thread. This allows for processing of other tasks while waiting. 3.

CODING STANDARDS

An extremely effective way of improving code readability is by setting coding standards. This consists of cosmetic rules, token formats, common function prototypes and standard code structures [3]. Whereas code cosmetics give a familiar look-and-feel to the code, predefined types and variable name assignment formats can help readers anticipate compiler interpretations and processor actions. Finally, common function prototypes and interface rules like: “Size is always defined in bytes”, makes their usage much more intuitive. Table 1 contains a list of potential C coding standards. These rules can be customized to preferences. It is only important that developer alliances will share the same rules.

The use of common definitions can drastically improve code readability and standardization. However, they should be kept simple and limited in number to ensure that their definitions are well known to their users. Definitions, which are supposed to be shared by all code, are declared in a common header file in Sample 1.This should be included in other files by default. Sample 1: Generic header predef.h /* Default predefined types and prototypes /* Author: M. Neser Version 1.0

*/ */

#ifndef predef_h #define predef_h #define class typedef struct #define vol volatile unsigned char #define TASK void (*)(void*) #define INTERFACE int (*)(void*, int, int, void*) typedef enum boolean { FALSE = 0, TRUE = 1 } boolean; #endif

This file demonstrates a simple file header template in its first two lines. This is followed by a conditional block that ends at the last line. This block is included only if the file name is undefined. In this block, the first token defines the file name. This scheme prevents the compiler from attempting to re-include the definition. All header files should implement this scheme. This is followed by a set of common definitions which will be clarified on use in the next section. Finally, a new type ‘boolean’ is defined for general condition assignment. Using this type improves readability of arguments. By following basic naming conventions, tokens can bear additional information. The most widely used standard is Hungarian notation in which variable names are prefixed with key characters signifying their type [4]. A basic list of type keys is given in Table 2. This list can be freely extended to more types. Table 2: Hungarian notation.

Table 1: Coding standards. Issue Standard Reason predefined templates Ensure inclusion of File headers define header filenames author, use, date etc. Marcos highly discouraged Complicates single step debugging Tabs 4 bank spaces Prevent misalignment when changing editors Blocks for/if/else/while always Prevent assumption of followed by { in next code execution. line; code indented Readability Case code indented under Prevent unintended clause case, end with break code execution. Assign- space before & after =, Readability ment no nested assignments

Vol.100(4) December 2009

Key c i f d b v u p a

Interpretation char integer float double boolean (custom) volatile (custom) unsigned pointer array

Description 8 bit integer 16 bit integer 16 bit real value 32 bit real value TRUE = 1, FALSE = 0 volatile unsigned char modifier (prefix) modifier (prefix) modifier (prefix)

This notion can be extended beyond variable names and other token types can be distinguished through similar conventions. Examples of typical C token types and possible naming conventions are listed in Table 3.

Vol.100(4) December 2009

SOUTH AFRICAN INSTITUTE OF ELECTRICAL ENGINEERS

Table 3: Token identification. Type Token Predef values All caps, words separated by underscore Predef types Type appended with _t, _st etc. Class names Capital C followed by name, capitalized 1st letter for every word, no underscore Variables Hungarian notation followed by upper case 1st letter for every word, no underscore Methods Capitalized 1st letter for every word, no underscore Appending predefined types with an underscore and a postfix is in accordance with standard predefined C types like size_t, which is used to create code with target dependent variable types. 4.

IMPLEMENTING CLASSES

The importance of object-oriented programming has been stated repeatedly for advanced software design [5], as seen in the UML development paradigm. In embedded software design, object-oriented programming is especially useful for the instantiation of multiple drivers for duplicated devices and data channels [6]. Real-time embedded software, however, holds a unique set of challenges for hardware interfacing and interrupt handling. While standard C is the programming language of choice for embedded systems, it relies on global variables and lacks classes and inheritance [7], which hinders the object-oriented programming philosophy. The remainder of the paper describes how a company named Kreon Technology has successfully implemented the object-oriented philosophy for embedded software development with ANSI-C. As far as possible, newly introduced conventions attempt to emulate the JavaTM syntax and event model [8]. An object consists of data in a set of member variables as well as a set of methods, which is relevant to the data. Objects and classes are not a standard part of C, but they can be emulated with structures. Methods can be implemented with the use of function pointers. C classes are therefore defined as structures with member variables as well as function pointers to all the methods. Normally, a constructor function is used to initialise member variables after instantiation of an object. In this case, the constructor also assigns all other method addresses to the object’s function pointers. In effect, this results in dynamic method binding. The constructor function is named to emulate the JavaTM new operator. Neither C nor C++ allows common definition and declaration of classes in one file as is the case with JavaTM. As a result the :: operator for method declaration in C++ is emulated with an underscore [7].

93

Class definitions and declarations are done in separate respective header and C files. These files are named according to the class names. It is suggested that the file containing the main function be named ‘main.c’. This file could be made quite generic, instantiating and constructing an application class and calling its execution method. Since the methods of a class instance normally require access to its related member variables, a pointer to the class instance accompanies every function call. This pointer is referred to as the this pointer and can be accessed from within the method as such. By default every method call will pass the this pointer as its first parameter. A device driver provides an interface to hardware through input or output functions. Generally, data can be read from or written to a device. By standardizing this interface, changing hardware e.g. from UART to USB, can be done with minimal code changes. An illustrative device driver class that gives the driver interface definition is presented in Sample 2. The definition starts with the standard file header, default inclusions and header file definition check block. This is followed by the definition of two utility structures, the context and the device structure. Their functions are discussed below. Following these structures is the actual class definition. For every method of the class, a compatible function pointer is added to the class definition. This class contains one function pointer to a sample method and one member variable namely the device structure pointer. In practice, the class will contain various function pointers and member variables. The method shown in the sample follows a predefined prototype. Read and Write are reserved interfacing method names that follow a strict design pattern. It extends the conventional C read and write function prototypes with buffer pointer, data size and data count [7]. The parameter list is prefixed with the this pointer and appended with a context structure pointer. These two pointers’ types are class dependent. The context structure is used to pass any additional information to the methods. If no additional information is required, this is replaced with a void pointer to be consistent with the pattern. Following this design pattern, services can be made independent of the underlying drivers. Driver methods can be dynamically assigned to generic function pointers in the services. By passing the driver methods and context to the service from an external source, the services can interface with the drivers generically. The driver uses the device structure pointer to access the device hardware registers. By initializing it with the devices offset in memory, the structure forms a memory

94

SOUTH AFRICAN INSTITUTE OF ELECTRICAL ENGINEERS

map to all the devices’ mapped registers. Device structure members are defined as volatile. The class definition is followed by the constructor prototype. This is the only method of the class that is defined outside of the class definition and can be accessed directly. The device offset is passed to the driver as a parameter, making the driver independent of the system memory map. Sample 3 gives an implementation template of the driver. The standard file header is followed by inclusion of the header file. The methods defined in the class definition are then implemented. In this case, the function names emulate the C++ syntax [8]. Finally, the class constructor implements all once-off initialization. Most importantly, the function pointers need to be initialized to the appropriate methods. Any further object initialization is also done here. A parameter, which holds the memory

In the object-oriented paradigm, using device driver classes, event handler methods are implemented to handle associated interrupts. These method calls require passing the this pointer. This is especially important to distinguish between multiple driver instances, e.g. for duplicate UARTs, where the same method is called for different devices. To handle this requirement in a modular fashion, an interrupt manager is introduced, which forms part of the set of operating system services. 5.

*/ */

ADVANCED SERVICES

Four services are proposed in this section. The first is the interrupt manager mentioned in the previous paragraph. This service is processor specific and is of great importance for real-time systems. This is followed by two Sample 3: Implementation of driver.c

Sample 2: Header of device.h /* Demo device driver interface definition /* Author: M. Neser Version 1.0

Vol.100(4) December 2009

/* Demo device driver implementation /* Author: M. Neser Version 1.0

*/ */

#include “predef.h”

#include “driver.h”

#ifndef driver_h #define driver_h

/* Write method implementation */ size_t CDriver_Write( CDriver *this, void *pBuffer, size_t uiSize, size_t uiCount, ctx_st *pstContext) { /* implementation... */ return uiCount; }

/* additional info for read/write function calls */ typedef struct { unsigned int uiOffset; } ctx_st; /* map device with config byte and 8 data bytes */ typedef struct { vol vConfig; vol avData[8]; } dev_st; /* device driver class definition */ class CDriver { /* function pointer prototypes */ size_t (*Write)(struct CDriver *this, void *pBuffer, size_t uiSize, size_t uiCount, ctx_st *stContext); /* device hardware pointer */ dev_st *pstDev; } CDriver; /* class constructor prototype */ boolean new_CDriver(CDriver *this, dev_st *pstDev); #endif /* driver_h */

offset of the device, is typically passed. Anything that might be required to be reinitialized should rather be done in a separate setup method. Both internal and external devices are commonly used to generate interrupts, which are used to invoke associated interrupt service routines.

/* constructor implementation */ boolean new_CDriver(CDriver *this, dev_st *pstDev) { /* method binding */ this->Write = CDriver_write; /* member initialization */ this->pstDev = pstDev; }

return TRUE;

processor independent services, the scheduler and the mode controller, as mentioned in Section 2. Finally, a thread manager is proposed for creating a cooperative multi-threading operating system. The interrupt manager is responsible for calling the appropriate event handing methods on the occurrence of interrupts. The manager should contain interrupt driven service routines for all the interrupt vectors and must be able to uniquely distinguish between the sources of multiplexed interrupts. Borrowing from the JavaTM event model, event listeners can be registered in association with different interrupt sources [8]. Event listeners consist of pointers to the event handling objects and methods. On identification of an interrupt source, the interrupt manager calls the corresponding registered method. This allows for

Vol.100(4) December 2009

SOUTH AFRICAN INSTITUTE OF ELECTRICAL ENGINEERS

multiple instances of the same driver to be declared and used independently for duplicate devices. Services are built on the concept of registering event listeners and tasks. Objects and methods can be generally linked to services, creating an independent functional layer. As is the case with JavaTM, a registration method is used to pass the event listener parameters to the services. Event handling methods have to be cast to a predefined method pointer prototype, which can be used by the interrupt manager. One important function of an operating system is that of task scheduling. Often repetitive tasks such as status message generation and sampling need to be scheduled at fixed intervals. A scheduler can be used to dispatch tasks at different frequencies using a single timer. The scheduler is invoked at the maximum required frequency for scheduled events. Tasks are registered to the scheduler with their respective periods. A registration method is used to pass all the required parameters. Counters are assigned to the tasks and decremented every time the scheduler is invoked. When a counter reaches zero, the scheduler calls the associated task method. A mode controller can be implemented as an independent service in a similar way. By implementing every mode's methods in a separate class, each mode can be registered at the mode controller in a common manner. The mode controller typically enters an unconditional loop where it checks for mode change requests and accordingly, calls the mode’s processing method or the requested mode’s entry method. Incorporating pre-emptive multi-threading in an operating system is an ambitious task. Although it might simplify software design, it is not essential for producing efficient and well-written code. That said, it is possible to realise cooperative multi-threading in the object-oriented paradigm using thread objects. Each thread object contains its own software stack and a method to instigate a context switch. This method suspends the calling thread and resumes another. Threads are registered at a kernel class during construction, which is responsible for context switching. This typically involves intricate processor specific machine code, which is outside the scope of this paper. Pre-emptive multithreading can be made possible by invoking context switches from scheduled time-slicing events [9]. As depicted in Fig. 1, a final notion is to combine all the implemented services and drivers into a system class to create a complete operating system. The system class is responsible for the interconnected construction and initialization of all these components. Sample 4 demonstrates how a timer and different services are constructed and a task is set up.

95

Sample 4: Code from system.c void new_CSystem(CSystem *this) { new_CInterrupt(&this->interrupt); new_CScheduler(&this->scheduler); new_CTimer0(&this->aTimer[0], (timer_dev*),TIMER0); this->timer.Setup(&this->aTimer[0],1000); this->interrupt.RegTask(&this->interrupt, &this->scheduler, (TASK)(this->scheduler.Process), TIMER0_INT)

6.

CONCLUDING REMARKS

It is good object-oriented practice to restrict access to member variables from outside an object. This is especially true for changing values – only the object itself should be allowed to modify its variables. To update member variables of another object, new values should be passed via access methods of that object, allowing the object to handle any potential consequences of the change. GetVariable and SetVariable are common design pattern names for such access methods. For passing larger structures, the Read and Write design patterns can be utilised [8]. Various other regulations may also be implemented to improve determinism in the execution of software. These may range from enforcing single function exit points for improving traceability, to the prohibiting of dynamic memory allocation; depending on the implied burden on the CPU and RAM (dynamic memory allocation is considered a memory leakage risk and is therefore, not recommended in application specific systems). The paper shows that the object-oriented philosophy can be followed in ANSI-C for all levels of embedded software development. Furthermore, the overheads accompanying this approach involve limited machine instructions, one additional pointer per function call on the stack and one pointer in memory for every object method. The cost of software development for embedded systems often overshadows all other costs [2]. Since objectoriented programming can greatly reduce development time, the cost savings from implementing this approach usually outweighs the cost on resources, even if it implies the utilisation of more expensive hardware. 7.

ACKNOWLEDGEMENTS

The authors would like to thank Kreon Technology Ltd. for its support and in particular, Mr. L. van Tonder ([email protected]) for his contribution to the standards proposed in this paper.

96

SOUTH AFRICAN INSTITUTE OF ELECTRICAL ENGINEERS

8.

REFERENCES

[1] B.P. Douglass: “Real Time UML Workshop for Embedded Systems”, Newnes, 2006 [2] J.G. Ganssel: “The Art of Designing Embedded Systems, 2nd edition”, Newnes, 2008 [3] S.R. Schach: “Object-oriented and classical software engineering, 7th edition”, McGraw-Hill Companies, Inc., 2006 [4] F. Kuester and D. Wiley, “Software Development and Coding Standards”, vis.eng.uci.edu/standards/pdf/codingstandards.pdf, 23 October 2006

Vol.100(4) December 2009

[5] A.T. Schreiner: “Object-oriented Programming with ANSI-C”, Hollage, 1993 [6] S. Bhakthavatsalam and S.H. Edwards, “Applying object-oriented techniques in embedded software design”, Proceedings of the CPES 2002 Power Electronics Seminar and NSF/Industry Annual Review, 2002 [7] B. Bramer and S. Bramer: “C++ for Engineers”, Butterworth-Heinemann, 2001 [8] H.M. Deitel and P.J. Deitel: “Java How to Program, 7th edition”, Prentice Hall PTR, 2007 [9] J.J. Labrosse: “MicroC OS II: The Real-Time Kernel, 2nd edition”, Newnes, 2002

Vol.100(4) December 2009

SOUTH AFRICAN INSTITUTE OF ELECTRICAL ENGINEERS

97

DEVELOPMENT OF A SPOKEN LANGUAGE IDENTIFICATION SYSTEM FOR SOUTH AFRICAN LANGUAGES M. Pech´e∗ , M.H. Davel† and E. Barnard ‡ ∗ Department of Electrical, Electronic and Computer Engineering, University of Pretoria. E-mail: [email protected] † HLT Research Group, Meraka Institute, CSIR. E-mail: [email protected] ‡ HLT Research Group, Meraka Institute, CSIR. E-mail: [email protected]

Abstract: This article introduces the first Spoken Language Identification system developed to distinguish among all eleven of South Africa’s official languages. The PPR-LM (Parallel Phoneme Recognition followed by Language Modeling) architecture is implemented, and techniques such as phoneme frequency filtering, which aims to utilize the available training data to maximum efficiency, are utilized. The system performs reasonably well, achieving an overall accuracy of 71.72% on test samples of three to ten seconds in length. This accuracy improves when the predicted results are combined into language families, reaching an overall accuracy of 82.39% Key words: Spoken Language Identification, Parallel Phoneme Recognition followed by Language Modeling, South African languages.

1.

INTRODUCTION

Spoken Language Identification (S-LID) is a process whereby the most probable language of a segment of audio speech is determined. This choice is made from a set of possible target languages, be it a closed set where all possibilities are known or an open set with unknown languages included in the test corpora as well. S-LID is a difficult task since the process to identify and extract meaningful tokens (from the audio) upon which a decision can be made is itself prone to errors. This article describes the process followed to create an S-LID system that is able to distinguish among all eleven official languages of South Africa. The accuracy of the system, as well as techniques used to improve on initial baseline performance are reported. In addition, the effect of clearly defined language families on the accuracy of the system is investigated. The article is structured as follows: Section 2 provides an overview of the background to the S-LID task and the specific challenges encountered in the South African environment. A short description of the general system design and data sets used follows in Section 3. Section 4 discusses the research approach, Section 5 details the results obtained on a per language basis and Section 6 investigates the role of language families. The article is concluded in Section 7 with some suggestions for further optimization. 2.

BACKGROUND

In this section, the background to the S-LID task is discussed in greater detail, specifically focusing on the following areas: Section 2.1 provides a brief overview of the S-LID task; variables that influence the accuracy of S-LID systems is examined in Section 2.2 with the

formulas to measure the system performance given in Section 2.3; and Section 2.4 takes a more in-depth look at the Parallel Phoneme Recognition followed by Language Modeling (PPR-LM) approach to S-LID. Furthermore, background is also provided on the official languages of South Africa (in Section 2.5) and possibilities for a South African S-LID system are examined in Section 2.6. 2.1

S-LID task overview

A segment of audio speech has several features that can differ from language to language. These may be used in different S-LID system designs, each with varying complexities and results. Prosodic information, which includes factors such as rhythm and intonation, was an early focus of S-LID research [3], as was spectral information [11], which characterizes an utterance in terms of its spectral content. Other approaches include reference sounds [5] and other raw waveform features [4]. These features represent a low level of linguistic knowledge (limited or no language-specific information is required), and the systems utilizing these features are typically simple in design. In addition, systems that use language-specific information (such as syntax or semantics) have been developed, and it has been conjectured that there is a correlation with the level of knowledge presented within the extracted features and the results of the system utilizing those features [9]. However, systems with a higher linguistic knowledge representation have also proven more difficult to design, requiring a more complex architecture and greater computational power. This in turn implies that more accurate systems require more labeled training data. Therefore most researchers prefer to utilize acoustic resources [12], especially phonetic tokens, as is the case with the PPR-LM approach, which is discussed later. Variations of the PPR-LM approach provide

98

SOUTH AFRICAN INSTITUTE OF ELECTRICAL ENGINEERS

Vol.100(4) December 2009

state-of-the-art accuracies and require no additional linguistic knowledge apart from what can be deduced from large labeled audio corpora. 2.2

Variables that influence S-LID accuracy

Related work has identified a number of factors which play an important role in the classification of a complex syntax that has been constructed from a set of distinct tokens, such as natural language. These factors include the following: • The number of tokens available in a sample used for testing [12]. • The amount of available training data [8]. • The classification algorithm [7]. • The level of similarity of the target languages [2]. The composition of the target languages is of particular importance in this article, as it is much harder to distinguish between related languages such as isiZulu and isiXhosa than between two unrelated languages such as isiZulu and English [2]. The number of target languages also has a significant influence on overall system accuracy, as researchers have been able to achieve much better results using language-pair recognition than trying to recognize between several languages at once [11]. The use of an open test set instead of a closed test set also has a negative effect on system accuracy, and complicates the design of the system as a whole.

Figure 1: Historic scores for the 1996 - 2009 NIST LRE in the general language recognition task. Image has been reproduced from [12].

using both the phoneme recognition accuracy and phoneme correctness. Accuracy and correctness are defined as follows: accuracy

=

correctness

=

N −D−S−I ∗ 100% N N −D−S ∗ 100% N

(1) (2)

where N is the total number of labels, D is the number of deletion errors, S is the number of substitution errors, and I is the number of insertion errors.

Current benchmark results are established by the National Institute of Standards and Technology (NIST) Language Recognition Evaluation (LRE) [12]. Initially started in 1996, the next evaluation was in 2003, after which the evaluation has been repeated every two years. The NIST-LRE measures system achievements based on pair-wise language recognition performance. A score according to the probability that the system incorrectly classifies an audio segment is calculated for each target-non-target language pair. The average of these scores (CAV G ) then represents the final system performance.

As for the back-end classifiers, the overall accuracy of the S-LID system, as well as the precision and recall for each language is reported. The overall accuracy is simply the percentage of all utterances correctly identified by the classifier. Precision and recall scores of a specific language l are defined as follows:   lcorrect precision = ∗ 100% (3) lcorrect + lincorrect   lcorrect ∗ 100% (4) recall = lcorrect + Oincorrect

Figure 1 expresses the historic scores achieved across three different test sample lengths. Note how the longer segments outperform those of a much shorter length.

where lcorrect is the number of utterances correctly classified, and lincorrect and Oincorrect represents the number of false accepts and false rejects respectively.

2.3

2.4

Measuring the system performance

The system developed for this article does not function on a language-pair basis, and therefore this specific measurement will not be used for the remainder of the article. Instead, the performance of the system as a whole is measured by evaluating both the front-end and the back-end separately. The Automatic Speech Recognition (ASR) systems used for phoneme recognition in the front-end are evaluated

The PPR-LM approach to S-LID

PPR-LM is an S-LID system configuration whereby the audio data is first processed into a phoneme string before the actual classification is performed [8]. The first step (referred to as the front-end) extracts phonotactic information in the form of phonemic tokens from the audio signal. The resulting string of tokens is then passed to a back-end where some form of language modeling (for example n-grams) is used to determine the most probable language from the set of target languages [6].

Vol.100(4) December 2009

SOUTH AFRICAN INSTITUTE OF ELECTRICAL ENGINEERS

99

Figure 2: Visual representation of the PPR-LM architecture.

The front-end usually consists of the phonemic recognizer modules of a number of ASR systems, as the above-mentioned tokens are commonly language-dependent phonemes. Although PPR-LM systems can function with a tokenizer trained in only one of the target languages [11], tokenizers for several of the target languages that process the audio in parallel seem to be the most accurate system configuratio [7]. In such a case, the typical PPR-LM system usually utilizes one tokenizer for each of the target languages. Once the audio signal has been processed by the front-end, the resulting token strings are scored by a classifie in the back-end and the language with the highest probability score is returned. Language models are usually employed to distinguish among languages, although the use of a Support Vector Machine (SVM) [6] has proved to be more successful [7]. The SVM requires that n-gram frequencies are extracted from the phoneme strings and represented as a point in a high-dimensional vector-space. Languages are then represented as groups of vectors. Figure 2 provides a visual representation of the PPR-LM architecture. An utterance given as input to the system is passed to three ASR systems (English, French and Portuguese phoneme recognizers in the image) that together form the front-end of the system. These ASR systems produce phoneme strings which are then passed as a vector of biphone frequencies to the language model at the back-end (an SVM classifie in the image) which then predicts the language spoken in the utterance. 2.5

Languages of South Africa

Since 1994, South Africa has recognized eleven officia languages. These are listed in Table 1, along with each language’s international ISO language code, the number of native speakers (in millions) and the language family to which it belongs. As can be seen from Table 1, several of South Africa’s officia languages do not have a large speaker population, which makes the gathering of audio resources difficult Of particular importance to this article is the language families. These families represent languages which exhibit similarities with regard to grammar, vocabulary and pronunciation. The Germanic languages are of Indo-European origin, but both the other two major

Table 1: South Africa’s eleven officia languages [16]. Language isiZulu isiXhosa Afrikaans Sepedi Setswana Sesotho SA English Xitsonga Siswati Tshivenda isiNdebele

ISO code zul xho afr nso tsn sot eng tso ssw ven nbl

Native speakers 10.7 7.9 6.0 4.2 3.7 3.6 3.6 2.0 1.2 1.0 0.7

Language family Nguni Nguni Germanic Sotho-Tswana Sotho-Tswana Sotho-Tswana Germanic Tswa-Ronga Nguni Venda Nguni

families, the Nguni and the Sotho-Tswana families, represent two of the major branches of the Southern Bantu languages which originated in Central to Southern Africa. Tswa-Ronga and Venda are also classifie as being part of the Southern Bantu languages, though they fall into families of their own. [16] It should be noted that though Afrikaans and English are both Germanic languages, they are subdivided into Low Franconian and Anglo-Frisian respectively, and will be treated as different families later in the article. 2.6

S-LID for South African languages

Currently, there is no existing S-LID system that can distinguish among all eleven of South Africa’s officia languages. Prior work has been done in the related fiel of Textual Language Identificatio (T-LID) which has shown promise [2]. However, T-LID has already achieved impressive results on relative small test sets as early as 1994, and is therefore considered to be mostly a solved problem [13]. On the other hand, developing a S-LID system to distinguish among all South African languages will prove to be quite a challenge. Referring to Section 2.1, this environment poses the following two main difficulties • Eleven target languages, and • Closely related language families.

100

SOUTH AFRICAN INSTITUTE OF ELECTRICAL ENGINEERS

Another important obstacle which has to be overcome is the availability of high quality audio data. The linguistic resources available for South African languages (such as large annotated speech corpora) are extremely limited in comparison to the resources available for the major languages of the word. Section 3.2 gives more information on the corpus which is used for the development of the current system. Figure 3 should be given particular attention, as the very short lengths of the available utterances will also impact negatively on the system’s performance. 3.

Table 2: Number of speakers (Spkrs) and utterances (Utts) in the training and test set of each language, as well as the duration of each set in hours. Language Afrikaans SA English isiNdebele isiZulu

SYSTEM DESIGN

This section describes the design of the South African S-LID system. A more detailed description of the system architecture follows in Section 3.1 and the corpus used to develop the ASR recognizers and the S-LID back-end is described in Section 3.2.

isiXhosa

3.1

Setswana

Sepedi Sesotho

System architecture

The South African S-LID system implements the popular PPR-LM architecture, as described in Section 2.3. Here as well, the phoneme recognizers of ASR systems are used as tokenizers to extract language-dependent phonemes from the audio signal. These phoneme recognizers utilize context-dependent Hidden Markov Models (HMMs), which consist of three emitting states with Gaussian Mixture Models (GMMs) of seven mixtures within each state. The HMMs are trained using the Hidden Markov Model Toolkit (HTK) [10]. 13 Mel Frequency Cepstral Coefficients (MFCCs), their 13 delta and 13 acceleration values are used as features, resulting in a 39-dimensional feature vector. Cepstral Mean Normalization (CMN) as well as Cepstral Variance Normalization (CVN) are used as feature-domain channel normalization techniques. Semi-tied transforms are applied to the HMMs and a flat phone-based language model is employed for phone recognition [1]. Optimal insertion penalties are estimated by balancing insertions and deletions during recognition. Per training sample, biphone frequencies are extracted from the phoneme strings of each phoneme recognizer and formatted into a vector, with each unique biphone representing a term. (Most of these terms would be zero.) The resulting vectors (one per tokenizer) are then concatenated one after the other to form a single vector for each utterance. This vector is used as an input to the SVM that serves as back-end classifier for the system. A grid search is used to optimize the main SVM parameters (margin-error trade-off parameter and kernel width) prior to classification. 3.2

Corpus statistics

The South African S-LID system is trained and tested with the Lwazi corpus, which consists of telephonic audio data as well as transcriptions, collected in all eleven of South

Vol.100(4) December 2009

Siswati Tshivenda Xitsonga

Set Train Test Train Test Train Test Train Test Train Test Train Test Train Test Train Test Train Test Train Test Train Test

Spkrs 170 30 175 30 170 30 171 29 180 30 169 30 170 30 176 30 178 30 171 30 168 30

Utts 4382 787 4287 728 4878 846 4852 685 4458 669 3674 664 4642 815 4257 686 4778 811 4414 770 4230 755

Duration 3.32 0.60 3.25 0.55 3.69 0.64 3.23 0.52 3.38 0.51 2.78 0.50 3.52 0.62 3.10 0.54 3.62 0.62 3.34 0.58 3.21 0.57

Africa’s official languages [1]. For the development of the South African S-LID system, all eleven languages in the corpus are utilized. Table 2 provides statistics on the available data. The number of speakers per language is given, as well as the combined number of utterances and the length of the audio data in hours. Table 2 also provides the number of speakers and associated utterances in the training set, which is used to train both the ASR systems in the front-end and and the SVM at the back-end. As can be seen, a test set of about 15% the total size of a language’s data is kept aside for validation purposes. Care has been taken to ensure that a speaker is not represented in both the train and test sets. Figure 3 displays the distribution of the different utterance lengths across all eleven languages available in the corpus. Note that a large percentage of the utterances are extremely short (less than 6 seconds in duration). 4.

GENERAL DISCUSSION OF THE APPROACH

The first step in the development of the proposed system is to establish baseline performance. This is done by developing a system which implements the PPR-LM architecture, as described previously. The baseline system utilizes phoneme recognizers from all eleven official languages of South Africa. The system results are given in Section 5.1

Vol.100(4) December 2009

SOUTH AFRICAN INSTITUTE OF ELECTRICAL ENGINEERS

Figure 3: Distribution of utterance lengths in the Lwazi corpus. The number of training and test utterances are displayed separately.

Two improvements are then implemented: • The Lwazi corpus, as described in Section 3.2, consists of telephonic audio data which is not as clean as audio recorded under laboratory conditions. (Channel conditions, background noise and speaker disfluencies all affect the quality of the available audio.) Problematic utterances can have a negative influence on the overall accuracy of the system; therefore all utterances are automatically filtered in order to refine the system [14]. • Figure 3 displays the unbalanced nature of the Lwazi corpus when the lengths of the utterances are compared. This may also have a negative impact on the system as a whole, especially when it is considered that the length of the utterances is an important variable which influences the system accuracy (referring to Section 2.2). Therefore the training data is further refined, and all utterances shorter than three seconds are removed from the training set. Both the baseline system and the refined system are tested on two test sets, one with all utterances three seconds and shorter, and the other containing only utterances longer then three seconds. Results are discussed in Section 5.2 5. 5.1

INDIVIDUAL LANGUAGE CLASSIFICATION S-LID baseline results

Section 4 describes the system which provides the baseline results against which the experiments in the rest of the article are compared. Figure 4 shows that an increasing number of tokenizers results in an increase in performance, as have previously been shown [15]. Therefore, even though it utilizes significant computational resources, the

101

Figure 4: Overall SVM performance of all three configurations for the South African S-LID systems.

best performing system – with eleven tokenizers – serves as the baseline for the experiments in this article. As predicted in Section 2.2, the longer utterances perform better than the shorter samples, achieving an overall accuracy of 69.89%, compared to the 56.60% achieved on the shorter utterances. Figure 5 displays the results graphically, with the system performance achieved for the test samples shorter and longer than three seconds plotted separately. Table 3 summarizes the performance of the South African S-LID system on the test samples longer than three seconds in more detail. The accuracy and correctness of the phoneme recognizers as well as the precision and recall for each language are also given. Note that, since the length of the test sample does not influence the performance of the phoneme recognizers, the front-end results presented in Table 3 were generated on the entire test set. 5.2

Removing problematic utterances

In order to improve the South African S-LID system, the data used to train the SVM is filtered so that only utterances that have recorded a phoneme frequency of higher than three phonemes per second, and utterances longer than three seconds in length are selected. (The specific values of these variables were determined during prior experimentation.) Furthermore, the number of training utterances available from each language is limited to the same number in order to ensure that the SVM is not biased towards a particular language. A new, refined system is now developed, using this new subset of training data and the same training process as described above. The data set used for testing is also filtered in a similar fashion as described above, but then divided into two subsets: one containing utterances less than three seconds long, while the other contains all the utterances longer than three seconds. The performance of the refined system

102

SOUTH AFRICAN INSTITUTE OF ELECTRICAL ENGINEERS

Vol.100(4) December 2009

Table 3: The performance of the ASR systems in the front-end as well as the SVM classifier in the back-end of the initial South African S-LID (baseline) system. afr

eng

nbl

% Correctness % Accuracy

70.49 65.47

58.72 52.30

73.02 66.61

% Precision % Recall

75.90 81.86

82.59 85.18

64.47 70.24

nso

sot tsn ssw ven ASR Front-end 68.00 67.76 70.64 74.04 75.76 57.78 57.17 57.08 65.77 67.37 SVM Back-end 64.09 57.76 66.12 63.15 69.45 51.67 58.94 66.27 73.17 68.79 Overall system accuracy : 69.89%

tso

xho

zul

68.53 60.92

68.54 58.57

69.81 63.06

68.27 54.27

61.42 56.41

50.90 54.42

we are interested to know how well the system performs when those distinctions are not attempted. (For practical applications, this may be acceptable, since several of the languages are mutually intelligible.) This was investigated by combining the results according to language families, instead of representing the languages individually. Doing this reduces the number of target groups the recognizer has to distinguish between, and simplifies the underlying relationships. (The languages with their associated families are listed in Table 1.)

Figure 5: The results of both the baseline system and the refined system, with the overall system performance achieved for the test samples shorter and longer than three seconds plotted on separate graphs.

described above is then verified individually using both test sets. These new training and test sets are recognized by all eleven phoneme recognizers before the resulting phoneme strings are used to retrain and test the SVM classifier at the back-end. Both sets of samples used to test the system report an increase in performance, achieving 67.29% and 71.72% for the shorter and longer segments respectively. Figure 5 also displays these results graphically, with the system performance achieved for the test samples shorter and longer than three seconds plotted on separate graphs. Table 4 describes the performance of the South African S-LID system on the test samples longer than three seconds in more detail. The accuracy and correctness of the phoneme recognizers as well as the precision and recall for each language are given. The front-end results presented in Table 3 were again generated on the entire test set. 6.

INVESTIGATING THE EFFECT OF LANGUAGE FAMILIES

The S-LID system developed in Section 5 distinguishes between eleven languages, some of which are closely related. In the light of the discussion in Section 2.2,

When the ambiguity of closely related target languages is removed, the systems performance increases even more to an overall accuracy of 71.58% and 82.39% on test samples shorter and longer than three seconds respectively. Table 5 details the performance of the SVM classifier on the longer utterances for both the baseline system of Section 5.1 and the refined system of Section 5.2.

7.

CONCLUSION

The South African context provides a challenging environment for Spoken Language Identification, for two main reasons: the large number of closely related target languages that occur, as well as the restricted availability of high quality linguistic resources. This article has described the successful development of an S-LID system which performs reasonably well in differentiating among all the official languages of South Africa. Through the careful implementation of eleven different tokenizers, corpus filtering and corpus balancing a practically usable system was developed, The final system is capable of identifying the language family as well as the exact language spoken with an accuracy of 82% and 72%, respectively, for utterances of three seconds or longer. (With the longer utterances in the order of ten seconds in length.) Further optimization of the system is currently being considered. Interesting areas of research include analyzing the effect of language family-specific tokenizers, experimenting with longer utterances and chunking and recombining utterances during SVM classification.

Vol.100(4) December 2009

SOUTH AFRICAN INSTITUTE OF ELECTRICAL ENGINEERS

103

Table 4: The performance of the SVM classifier in the back-end of the refined South African S-LID system, when a test set containing only utterances longer than three seconds are used. % Precision % Recall

afr 73.15 85.80

eng 84.42 88.40

nbl 67.66 73.66

nso sot tsn ssw ven 63.74 64.37 68.76 62.63 73.28 66.35 54.45 69.20 73.96 71.22 Overall system accuracy : 71.72%

tso 63.17 57.75

xho 67.41 59.60

zul 58.58 53.37

Table 5: The performance of the SVM classifier in the back-end of both the baseline and refined South African S-LID systems, when only language families are considered. Afrikaans % Correctness % Accuracy

75.90 81.86

% Precision % Recall

73.15 85.80

English

Nguni Sotho-Tswana Tswa-Ronga Baseline SA S-LID 82.59 84.57 85.43 68.27 85.18 90.38 80.97 54.27 Overall system accuracy : 81.71% Refined SA S-LID 84.42 85.92 85.81 67.41 88.40 88,06 83.02 59.60 Overall system accuracy : 82.39%

REFERENCES 8. REFERENCES [1] Etienne Barnard, Marelie Davel, and Charl van [1] Heerden: Etienne Barnard, Marelie Davel, Charl van “ASR corpus design for and resource-scarce Heerden: “ASR corpus design resource-scarce languages”, Proceedings: Annualfor Conference of the languages”, Proceedings: Annual Conference of International Speech Communication Association the International Speech Communication Associa(Interspeech), Brighton, UK, pp. 2847-2850, Sep tion (Interspeech), Brighton, UK, pp. 2847-2850, 2009. September 2009. and Etienne Barnard: “Factors [2] Gerrit R. Botha that affect the accuracy of text-based language [2] identification”, Gerrit R. BothaProceedings: and Etienne Barnard: “Factors Annual Symposium of that affect the accuracy of text-based language the Pattern Recognition Association of South Africa identification”, Proceedings: Annual of (PRASA), Pietermaritzburg, SouthSymposium Africa, pp. the Pattern Recognition 7-10, December 2007. Association of South Africa (PRASA), South Africa, pp. 7-10, [3] J.T Foil: Pietermaritzburg, “Language identification using noisy DecemberProceedings: 2007. speech”, IEEE International Conference on Acoustics, Speech and Signal Processing [3] (ICASSP), J.T Foil: New “Language identification York, NY, pp.861-864,using April noisy 1986. speech”, Proceedings: IEEE International [4] S.C Kwasny, B.L. Kalman, W. Wu, and A.M.ConferEngeence on Acoustics, Speech and Signal Processing bretson: “Identifying language from speech: An (ICASSP),ofNew York, NY,statistically-based pp.861-864, April 1986. example high-level feature extraction”, Proceedings: Annual Conference of the [4] Cognitive S.C Kwasny, B.L.Society, Kalman, W. Wu,NJ, andVol. A.M. Science Hillsdale, 14, Engebretson: “Identifying language from speech: pp. 53-57, August 1992. An example high-level statistically-based feature [5] R.G Leonardofand G.R. Doddington: “Automatic language identification”, report RADCextraction”, Proceedings: Technical Annual Conference of the TR-74-200. AirForce Rome Air Development Cognitive Science Society, Hillsdale, NJ, Vol. 14,Cenpp. ter, AugAugust 1974. 1992. 53-57, [6] Haizhou Li and Bin Ma: “A Phonotactic Language for Spoken Identification”, Pro[5] Model R.G Leonard andLanguage G.R. Doddington: “Autoceedings: Meetingidentification”, of the Ass for Computational Linmatic language Technical report guistics, Vol. 43, pp.Air 515-522, June Air 2007. RADC-TR-74-200. Force Rome Development [7] Bin Ma August and Haizhou Center, 1974. Li: “A Comparative Study of Four Language Identification Systems”, ComputaLinguistics Language Processing, [6] tional Haizhou Li and and BinChinese Ma: “A Phonotactic LanVol. 11Model No. 2, for pp. Spoken 80-985, Language Jan 2006. Identification”, guage K. Muthusamy, Barnard, and [8] Yeshwant Proceedings: Meeting ofEthienne the Association for Ronald A. Cole: “Reviewing Automatic Computational Linguistics, Vol. 43, pp. Language 515-522, Identification”, IEEE Signal Processing Magazine, June 2007. October 1994.

Venda 69.45 68.79 73.28 71.22

[7] Bin Ma and Haizhou Li: “A Comparative Study of Four Tong, Language Computa[9] Rong Bin Identification Ma, DonglaiSystems”, Zhu, Haizhou Li, tional Linguistics and Chinese Language Processing, and Eng Siong Chng: “Integrating Acoustic, ProVol. 11 No.Phonotactic 2, pp. 80-985, Januaryfor 2006. sodic and Features Spoken Language Identification”, Proceedings: IEEE Interna[8] Yeshwant K. Muthusamy, Ethienne Barnard, and tional Conference on Acoustics, Speech and Signal Ronald A. (ICASSP), Cole: “Reviewing Automatic Processing Toulouse, France,Language pp. 205Identification”, IEEE Signal Processing Magazine, 208, May 2006. October 1994. Gunnar Evermann, Mark Gales, [10] Steve Young, Hain, Dan Kershaw, Moore,Li, Julian [9] Thomas Rong Tong, Bin Ma, DonglaiGareth Zhu, Haizhou and Odell, Dave Ollason, Dan Povey, Valtcho Valtchev, Eng Siong Chng: “Integrating Acoustic, Prosodic and Phil Woodland: “The HTK book. Revised and Phonotactic Features for Spoken Language for HTK version 3.3”, Online: http://htk.eng.cam. Identification”, Proceedings: IEEE International ac.uk/., 2005. Conference on Acoustics, Speechofand Signal Process[11] M.A. Zissman: “Comparison four approaches ing (ICASSP), Toulouse, France, pp. 205-208, May to automatic language identification of telephone 2006. speech”, IEEE Transactions on Speech and Audio Vol. 4Gunnar No. 1, pp. 31-44, January [10] Processing, Steve Young, Evermann, Mark 1996. Gales, [12] NIST Website: “The 2009 NIST language Thomas Hain, Dan Kershaw, Gareth recogniMoore, tion evaluation results”, Julian Odell, Dave Ollason, Dan Povey, Valtcho http://www.nist.gov/speech/tests/lre/2009/ Valtchev, and Phil Woodland: “The HTK lre09 eval results vFINAL/index.html, 2008. book. Revised for HTK version 3.3”, Online: [13] W. Cavnar and J. M. Trenkle: “N-gram based text http://htk.eng.cam.ac.uk/., 2005. categorization.”, Proceedings: Annual Symposium Document Analysis and Information Retrieval, [11] on M.A. Zissman: “Comparison of four approaches Las Vegas, NV, Vol. 3, pp. 161-169, April to automatic language identification of 1994. telephone [14] Marius Marelie Davel, Etienne Barspeech”,Pech´e, IEEE Transactions on and Speech and Audio nard: “Porting a spoken language identification Processing, Vol. 4 No. 1, pp. 31-44, January 1996. system to a new environment”, Proceedings: AnSymposium of the Pattern Recognition [12] nual NIST Website: “The 2009 AssociaNIST tion of South Africa (PRASA), Cape Town,results”, South language recognition evaluation Africa, pp. 58-62, December 2008. http://www.nist.gov/speech/tests/lre/2009/ . Peché, Davel, and E. Barnard: “Phonotactic [15] M lre09 evalM. results vFINAL/index.html, 2008. spoken language identification with limited trainAnnual“N-gram Conference of text the [13] ing W. data”, CavnarProceedings: and J. M. Trenkle: based International Speech Communication Association, categorization.”, Proceedings: Annual Symposium on Antwerp, Aug 2007. Las DocumentBelgium, Analysispp. and1537-1540, Information Retrieval, [16] PVegas, ali Lehohla: “Census 2001”, Census in brief, NV, Vol. 3, pp. 161-169, April 1994. Statistics South Africa, 2003.

104

SOUTH AFRICAN INSTITUTE OF ELECTRICAL ENGINEERS

Vol.100(4) December 2009

ON THE PARAMETRIC CURVES FOR THE DESIGN, PERFORMANCE OPTIMIZATION AND CHARACTERIZATION OF THE LPDA ANTENNA L. I. Onwuegbuna*, MIEEE and A. A. Jimoh**, MIEEE * Faculty of Engineering and the Built Environment, Tshwane University of Technology, Private bag X680, Pretoria South Africa E-mail: [email protected] ** Faculty of Engineering and the Built Environment, Tshwane University of Technology, Private bag X680 Pretoria South Africa E-mail: [email protected] Abstract: This paper attempts to overcome the limitations of the parametric curves that characterize the performance of the Log Periodic Dipole Array Antenna (here after referred to as the LPDA). For instance, the parametric curves in design handbooks e.g. ARRL antenna handbook and other relevant literature e.g. Peixeiro do not contain those giving the relationship between the boom-length 'L' and the number of dipole element 'N' for any given bandwidth, even when it is known that these two parameters are the main cost determinants of a LPDA Antenna. The concept of convergence is introduced to aid cost optimization of the LPDA Antenna in terms of number of dipole element 'N'. Although 'N' is used as the minimization criterion, the criteria for establishing convergence encompass all the main electrical characteristics of the LPDA antenna, such as VSWR, gain and radiation patterns. Key words: LPDA, convergence, sparse, optimization criterion.

1.

INTRODUCTION

The log periodic dipole antenna hereafter referred to as LPDA antenna was invented in 1958 by Isbell [1], of the University of Illinois, United States of America. This antenna is a system of driven elements designed to operate over a wide range of frequencies. The LPDA antenna exhibits constant electrical characteristics (i.e. fairly constant gain, pattern and VSWR etc), over the designed bandwidth [2], [3]. The basic concept guiding the operation of the LPDA antenna is that a gradually expanding periodic arrays, radiates most effectively when the array elements (dipoles) are near resonance, so that with frequency variation, the radiating or active region moves along the array. [4, 5]. Structurally speaking, the LPDA antenna consists of a sequence of dipoles with successively increasing lengths outwards from the feed point at apex as figure1 depicts. The feed lines cross over between adjacent elements, so as to give an 180º phase reversal between any two adjacent elements; this ensures that the radiated fields from the resonant elements are in phase at the far field (broadside radiation pattern) [6]. The active or radiating region moves along the structure with changing frequency. The active region is comprised of dipole elements whose wavelengths are /2 at the resonant frequency and most of the antenna currents are concentrated within this region. The remaining elements of the array are then considered as parasitic being comprised of directors and reflectors. Consequent to the actions of the directors and reflectors, the LPDA antenna is highly directional in its radiating and receiving patterns. In addition the phase reversal of currents in

adjacent elements, ultimately results in highly directive broadside beam pattern emerging from the direction of the smallest element in the array.

X

2

..

n

n

n

N

d D

2

L

..

1

Z

L Figure 1: The LPDA Antenna The behaviour of the LPDA antenna is fairly well modelled, mathematically speaking. The elements are shortened by a factor  (tau) as we move towards the source of excitation, where  is known as the scaling factor and is one of the key parameters of the LPDA antenna. The scale factor is defined by ,  = Ln+1/Ln = dn+1/dn = Dn+1/Dn = Xn+1/Xn. . . .

(1)

(Where Dn is the diameter of the nth dipole element and Ln is the length of the nth dipole element.) The scaling factor specifies the dimensional relationship between any two adjacent dipole elements. Another important

Vol.100(4) December 2009

SOUTH AFRICAN INSTITUTE OF ELECTRICAL ENGINEERS

parameter of the LPDA antenna is the space constant ''(sigma), which is given by  = dn /2Ln = (1- )/4cot  . .

(2)

Where  is the apex angle and dn is the distance of the nth dipole element from the preceding element. The number of dipole elements N, which is another parameter of the LPDA Antenna is specified in terms of both the scaling factor and spacing constant and is given by, N = 1 + log (L1/LN)/log (1/) ...

(3)

Zo in Ohms is the impedance of the Antenna boom and must be specified during design. The boom-length L in meters is given as; L = 2(L1 - LN)/ (1- ) ...

unacceptable. His design curves therefore contained LPDA antenna performance characteristics for values of length to diameter ratio and boom-impedance. Butson and Thompson [10], also considered the incorrect gain values as given by Carrel [2], but differed with Peixeiro [9] as to the origin of the error. These arguments are indications that the performance characteristics of the LPDA antenna are still incomplete. The aim of this paper is to take advantage of the immense computational capability inherent in the hybrid method of moments (mom)/geometric theory of diffraction (GTD) based Super-Nec [11], combined with the graphical capabilities of Matlab, to achieve the following: 

(4)

where L1 and LN are the longest and the shortest dipole elements respectively. Carrel [2] published a simple design procedure for designing LPDA antennas. The only draw back to his procedure is that it neglects the effects of the boomimpedance and length to diameter ratio on the gain performance characteristics of the LPDA antennas. This though does not detract from the elegance and simplicity of this design technique. Subsequent works by De vito and Stracca [7], [8], Peixeiro [9] and others have taken advantage of the availability of computers to numerically model the LPDA antenna, thereby introducing more accurate design curves (although still limiting in scope). Despite the attractiveness and popularity of the LPDA antenna, much information is still lacking regarding its performance characteristics, hence the justification for this research. The parametric curves giving the performance characteristics of the LPDA antennas, currently available in design books and other literature are those of Carrel [2], De vito and Stracca [7], [8], and Peixeiro [9]. Each of these researchers though having essentially the same objective, which is the design of a functional LPDA antenna, placed emphasis on different aspects of the design problems. Carrel [2], one of the many pioneer researchers of the LPDA antenna, though recognising the effects of the length to diameter ratio (Ln/Dn) and the boom-impedance (Zo) on the gain performance of the LPDA antenna, took the view that these effects are negligibly small. Carrel's design curves therefore did not incorporate these effects. De vito and Stracca [7], [8], on the other hand, considered Carrel's miscalculation of the gain a major problem and therefore sought to correct it. In looking at the problem, Peixeiro [9] was of the view that not only is carrel's gain prediction overly optimistic, his neglect of the effects of the length to diameter ratio and the boom-impedance on the performance characteristics of the LPDA antenna was

105





Extend the range of the parametric curves beyond those given by Peixeiro [9]. This is necessitated by the fact that the design curves as given by Peixeiro are limiting in scope as it does not cover the range of scale factor ‘’, below 0.7 and space ‘’, beyond the range of values between 0.05 and 0.22 . This limitation of the parametric curves was also investigated by Bantin and Balmain [12]. Their paper concentrated on different aspect of this problem though. Find a means of minimising the number of element 'N' as a means of cost optimising LPDA antenna. The justification for minimising "N' is propelled by the need to keep the cost down as the number of elements and the boom-length are the main cost determinants of the LPDA antenna, De vito and Stracca [7], [8]. This minimisation criterion is referred to in this paper as convergence and it will enable the Engineer to ascertain the minimum number of elements necessary for a LPDA antenna of given length and operating bandwidth, to yield acceptable performance. Give cognisance to the effects of boom-length (L in meters) and operating bandwidth (B) on the gain performance characteristics of LPDA antennas by presenting parametric curves in terms of these parameters.

The investigations in this paper were performed in three stages. Firstly, in order to perform computational investigation of the LPDA antenna, measured impedance and VSWR are compared with theoretical predictions of them. Favourable comparison between the two sets of values will serve as a validation of the numerical modelling tool (in this instance Super-Nec) used in obtaining the theoretical results. Secondly, once the numerical model is validated, the generalised performance characteristics of the LPDA antenna for various lengths and operating bandwidths are then presented without cognisance to whether the Antenna is convergent or not. Thirdly, trends in the variation patterns of the average and standard deviation of the gain are used, as the basis for optimising LPDA antennas in terms of the number of element (N). Thereafter, the

106

SOUTH AFRICAN INSTITUTE OF ELECTRICAL ENGINEERS

performance characteristics of converged LPDA antennas are presented. In all, four hundred and ten LPDA antennas were investigated and the total outcomes of this investigation are presented as ‘result’. The simulations were done such that, for any operating bandwidth, the number of frequency steps will be the same, to ensure same average values. In the same vain, for any boom-length and operating band-width, the number of element is doubled for each incremental step, starting with N = 4 where possible.

Vol.100(4) December 2009

order to simulate the large number of antennas investigated here, group of antennas with similar characteristics were run as batch files and their outputs combined and viewed in SuperNec output engine [11]. 2.2 Tests on Practical LPDA Antennas

This paper does not cover all varieties of Log Periodic Array Antennas, as there are an infinite number of such antennas. This paper investigates LPDA Antennas within the bandwidth of 300MHz – 3GHz, [except for one of the built models where validation of Super NEC was the main aim], with boom lengths ranging from 0,5max to 2max (where max is the wavelength at the lowest operating frequency). The variations of these parameters are limited to ranges, which are of practical interest. It is to be noted here that Super NEC [11] is not an infallible tool. It does have its own limitations and rules, which, if not well followed, can yield erroneous results. Finally, these investigations are limited to free space environment only.

Four pairs of antennas were built and measured for three antenna output parameters: impedance, voltage standing wave ratio and gain. Certain parameters of the antennas were varied such as length to diameter ratios, operating bandwidth and boom-length. Fixed boom impedance ‘Zo’ of 75 was used for all the four models. This is because the transmission line (stripe line) is lossy, resulting in average feed point resistance of about 50, which can easily be matched to a coaxial cable of the same characteristic impedance value. For each pair of antennas, dipole elements of fixed diameters were used. The antenna was fed directly using coaxial cables in all models. This involved passing 50, RG 58 coaxial cable through aluminium tubes to the smallest dipole elements of each model. The measurement was performed in a shielded anechoic chamber using HP8753C network analyser. Table 1 below, gives the simulated and measured values of the antenna models built. The simulated values are denoted with an extension ‘out’, while the measured values are denoted as ‘models’.

2. DESCRIPTION AND VALIDATION OF NUMERICAL MODELLING TOOL (SUPERNEC)

Table1: Measured and simulated results for the six models of antenna built

2.1 The modelling tool The numerical modelling tool used in these investigations is Super numeric electromagnetic code version2 (SuperNec). SuperNec [11] is an enhanced version of the numeric electromagnetic code 2 by G. Pogio et al [13]. It is an object oriented program with C++ at its core. It is a hybrid tool combining the methods of moment (MOM) [14] with optical theories such as geometric theory of diffraction (GTD) for simulation of antennas and structures. SuperNec requires Matlab to run, thus it combines the immense computational and graphical capabilities inherent in Matlab with the user friendliness of object oriented based c++ environment. SuperNec models wire antennas and large structures and have rules which if not strictly adhered to, can yield embarrassing results. The modelling platform is interactive and prompts the user for key parameters of the antenna like operating band widths, characteristic impedance of the boom, space, scaling constants and length to diameter ratio. The simulated output is weighed against known performance characteristic of the antenna and a decision is then required as to accept the output or make some adjustments and simulate again. These parameter adjustment and repeated simulations is part of what this paper seeks to overcome by presenting all probable performances in form of parametric curves. In

FILE NAME C1.out Model 1a Model 1b C2.out Model 2a Model 2b C3.out Model 3a Model 3b

REAL INPUT IMPEDANCE MEAN STD

IMAGINARY IMPEDANCE MEAN STD

G(dBi)av

52.78 51.29 54.19

8.87 7.83 9.32

-1.73 3.36 4.86

8.76 7.92 8.68

6.96 6.00 6.00

50.65 57.13 55.83

8.94 12.87 11.68

-2.34 6.13 5.73

8.37 12.26 11.49

6.96 5.82 5.82

49.50 58.69 60.00

8.81 14.43 18.05

-2.59 7.39 8.94

8.18 14.33 17.15

6.95 6.50 6.50

A fair agreement between the predicted values from simulations and measured values is evident as can be seen in table 1 (last page). In all instances, real, imaginary impedance (and VSWR are compared for simulated and measured results. The numerical means and standard deviations of input resistance, VSWR and gain were presented as opposed to parametric curve presentation of the same parameters. The reason for this format of presentation is justified on the basis that trends in the variation of numerical values of these parameters form the criteria for determining the convergence or otherwise of a LPDA Antenna which is introduced in the

Vol.100(4) December 2009

SOUTH AFRICAN INSTITUTE OF ELECTRICAL ENGINEERS

next section. In other to maintain a balanced presentation, one of the LPDA Antenna models designed to operate from 30MHz to 120 MHz with a boom-length of 1.5m and number of elements = 15 is presented in graphical format as can be seen in figures 2 & 3.

Imaginary impedance (Ohms)

10 8

Measured result

6

Simulation

4 2 0 -2 -4 -6 -8

3

4

5

6 7 8 Frequency (MHz)

9

10

11

12

Figure 2: Plot of real input impedance variation with frequency, L=1.5m, N=15 10

Imaginary impedance (Ohms)

8 6

Simulation

Measured result

4 2 0 -2 -4 -6 -8

3

4

5

Figure 3: Variation 15,L=1.5m

6 7 8 10 11 9 Frequency (MHz) of imaginary Zin with frequency

12

N=

The fair agreement between measured values and the theoretical prediction of the values by the modelling tool is enough validation of the modelling tool. Hence forth, it is to be assumed that the modelling tool has been validated and can then be used as the basis for extensive theoretical investigations. 3.

CONVERGENT AND SPARSE LPDA ANTENNAS

The need to classify LPDA antennas arose due to the following reasons: 

It has been observed that some values of scale and design constants (and by extension number of elements) for a given boom-length (L) and operating bandwidth (B), do not yield meaningful gain, VSWR and radiation pattern characteristics. That is, for these values of  and , (or N) the antenna gain,



107

VSWR and radiation pattern characteristics are often not so good. There is therefore the need to avoid these values when designing LPDA antennas. One of the main objectives of this paper is that the number of dipole element (N) should be the optimisation criteria. This is because, as pointed out by De Vito and Stracca [7], [8], the cost of the LPDA antenna is determined by the boom-length and the number of dipole elements. For this reason, it has become imperative to find a means of designating LPDA antennas, so that one can see at a glance, the minimum number of elements for any given Boom-length and operating bandwidth required for the antenna to yield acceptable performance characteristics. This delineation is therefore a means of minimising 'N' so as to produce a cost optimised LPDA antenna.

To achieve these objectives, LPDA antennas are designed such that every other parameter remains constant except the number of element, which are doubled in every step. Thus depending on the boom-length and operating bandwidth, the number of elements are given as N= [4 8 16 32 64 128]. The Boom-lengths are given as L = [0.5max, max, 1.5max 2max] where max is the wavelength at the lowest frequency of operation. The operating bandwidth is investigated in the range B= [1:2 1:5 1:10]. The boom-impedance Zo =75 and Ln/Dn =100. The antennas were simulated and the average and standard deviation of the gains are extracted from the simulated batch files. Trends in the patterns of variation of the average and standard deviations of the gain are used as the basis for deciding the element density, at which the antenna yields acceptable performance. Once this optimisation is done, the standard deviation of the gain has no further use and will not be referred to again. The justification for using the mean and standard deviation of the gain as the basis for determining the usefulness or otherwise of a LPDA antenna is that the mean (or average) value of a set of data (in this instance gain) is a measure of central tendency. It is a measure of the tendency of the gains of LPDA antenna to converge to a central value for variations of frequency within the operating bandwidth. The standard deviation of the gain on the other hand is a measure of dispersion of the gain values around the mean value. It gives an indication of how close a given gain value is to the mean. In looking at the trends in the variation in the standard deviation of the gain, a low standard deviation value is an indication of LPDA antenna convergence (or optimised performance). It is to be seen that once convergence is attained the STD values do not differ widely for doubling of 'N. It is also seen that for the mean gain, once convergence is attained, the mean values remain within a narrow band of values. As an example, consider a LPDA Antenna of length L = 1.5max, with operating bandwidth of 1:5. The number of

108

SOUTH AFRICAN INSTITUTE OF ELECTRICAL ENGINEERS

elements is doubled per step as 4, 8, 16, 32 and 64. Trends in the pattern of variations of the VSWR, gain and radiation patterns will be investigated with the aim of establishing the criteria for convergence or Sparse LPDA Antennas. As can be seen from figure 4 below, this antenna does not yield acceptable VSWR (1:2 or below) performance for all frequencies within the operating bandwidth until the number of dipole elements became at least greater than 16. The same conclusion can also be reached, when the variations of gain and radiation pattern with frequency for fixed values of number of elements is investigated. The azimuth radiation pattern was taken at a mid- frequency of 900MHz (figures not included due to size). It can be shown that, the variation of gain with frequency was not acceptable until the number of dipole element 'N' became greater than 16. The radiation pattern is not acceptably directive until the number of dipole element became greater than 16 and for N greater than 32, the radiation pattern does not show marked improvement (as would have been expected) to justify using more than 16 elements. The implication of this is that even though increasing the number of elements beyond the convergence point does sometimes increase the average gain, the pattern of variation of gain with frequency may render this increased gain useless. Since the aim here is minimisation of 'N', using values of N greater than N at convergence does not necessarily result in improved performance of the LPDA as to justify the cost implications.

Vol.100(4) December 2009

Figure 4 is a representative case of the graphical illustration of convergence and sparse LPDA antennas. In other to define LPDA Antenna convergence in detail, there is the need for numerical presentation of the trends in the variation patterns of VSWR and gain for fixed N as can be seen from table 2 below. The mean VSWR does not meet acceptable value until N greater than 16. This suggests a convergent value of N of about (16+32)/2 =24. The reason for this approach is based on the fact that the mean VSWR approaches 1:1 between N=16 and 32 and the mean gain appears to stabilize between these values. Also for N=16, the STD of gain =1.99 and for N=32, STD of gain =1.52. Now, if N exceeds 32, the STD of gain increases, suggesting that the point of convergence lies between N = 16 and 32, hence the justification for averaging. After convergence, doubling the number of elements does not result in any appreciable change in the VSWR. With respect to standard deviation of the VSWR, once the number of elements became greater than 16, the value of STD dropped drastically suggesting little dispersal from the central value. After convergence, the STD values do not vary greatly. Looking at the trends in the pattern of variation of the mean gain, it was also observed that for N greater than 16, the Antenna for the first time yields acceptable mean gain and doubling the number of elements does not result in appreciable change in gain values. The same is true for the STD of the gain.

Figure 4: SWR versus frequencies for values of N, L =1.5max

Vol.100(4) December 2009

SOUTH AFRICAN INSTITUTE OF ELECTRICAL ENGINEERS

Table 2 : Trends in pattern of variations of VSWR and gain for fixed values of N, L = 1.5λmax , B = 1:5. (Gain)avg dBi

(Gain)STD dBi

9.37

-0.39

3.75

3.06

4.12

-3.31

4.55

16

1.08

0.08

6.40

1.99

32

1.12

0.15

6.81

1.52

64

1.32

0.60

6.80

1.64

N

(VSWR)avg

4

5.29

8

(VSWR)STD

This was the procedure adopted for all four hundred and ten LPDA Antennas (410) and information gathered from this is used for setting the convergence criterion, which follows next.

109

It is necessary at this stage to point out that the convergent value is not absolute. It is however more sensitive at the lower values than at higher values. Thus, if for a given boom-length and operating bandwidth, a given LPDA Antenna converges for N = 8. If the elements were reduced by 2 elements, the convergence of that Antenna may no longer be guaranteed. On the other hand, if convergence was attained at N=12, reducing the number of elements by two might not affect the convergence drastically. Convergence provides a means of using the number of elements as the optimisation criteria while maintaining the electrical characteristics of the LPDA antenna. 4.

RESULTS

3.1 Convergence (Optimisation) Criteria for LPDA Antennas.

In this section, results of investigations are presented in the order in which they were carried out. First generalised (figures 5-16), extended parametric plots are presented for both convergent and sparse LPDA antennas (i.e. for both minimised and non-minimised LPDA Antennas). Next, minimised (or convergent) LPDA antennas are presented as in figures 17, 18 and 19.

A log periodic dipole array antenna shall be considered converged if it meets the following requirement:

4.1 Probable Gain Performance Characteristics of LPDA Antennas (Convergent/Sparse) 15

II.

III. IV.

A log periodic dipole array antenna that does not meet the requirements I to IV above is considered unconverged. Although the criteria for convergence have been stated in terms of the VSWR, radiation pattern and gain characteristics of the LPDA antenna, the latter will be used as the basis for establishing convergence. Any of the electrical characteristics can be used but I have chosen the gain for the sake of uniformity; also, the effect of boom-impedance 'Zo' and length to diameter ratio on the gain of LPDA antenna are the subject matters of a later paper. It is to be noted however, that a converged antenna must meet all of the requirements.

L=0.5m, B=1:2

10

Average Gain (dBi)

It must yield a mean gain of at least 5dBi for a pair of scale factor '' and spacing constant '' (and by extension for a given value of number of dipole elements 'N') and for any given boom-length 'L' and operating band-width 'B'. A gain of 5dBi indicates that the LPDA Antenna radiates at least, three times more in the direction of maximum field compared to that of an isotropic radiator. Doubling the number of dipole elements 'N' results in at most average increase in mean gain of about 1dBi and the STD averages 1.15dBi (deduced from observation). It must maintain a VSWR value of 2:1 and below within the designed operating bandwidth. Its electrical characteristics such as input impedance, radiation pattern and gain must vary periodically as the logarithm of the operating frequency. This Antenna must therefore yield acceptable radiation pattern within its operating bandwidth.

L=0.5m, B=1:10

L=1m, B=1:2

L=1m, B=1:10 5 L=0.5m, B=1:5

L=1m, B=1:5

0

-5

0

20

40

60 80 Number of elements (N)

100

120

140

Fig 5: G (dBi) versus N for L and varying B 12

L=1.5m,B=1:5

L=1.5m,

10

B=1:2

8 L=2m,B=1:10

6 4 Average Gain (dBi)

I.

L=2m,B=1:2

2 0 -2

L=2m,B=1:

-4

5

-6 -8

L=1.5m,B=1:10 0

20

40

60

80

100

120

Number of elements

Fig 6: G (dBi) versus N for L and varying B

140

110

SOUTH AFRICAN INSTITUTE OF ELECTRICAL ENGINEERS

70

140 L=0.5m,B=1:10

Number of elements (N)

Number of elements (N)

60 50 40

L=0.5m,B=1:5

30

L=0.5m,B=1:2

20 10 0 0.4

0.5

0.6 0.7 Scale factor (tau)

0.8

80

L=2m,B=1:5

60 L=2m,B=1:2 40

0

0.1

0.2

0.3 0.4 0.5 0.6 0.7 Space constants (sigma)

0.8

0.9

0.3 0.4 0.5 Space constant (Sigma)

0.6

1

Fig 11: N versus σ for L & varying B 140

120

120

100

Number of elements (N)

L=1m,B=1:10

80 L=1m,B=1:5

60

L=1m,B=1:2

40 20 0

0.5

0.6 0.7 Scale factor (tau)

0.8

0.9

L=1m,B=1:10

100 80

L=1m,B=1:5

60 40

L=1m,B=1:2

20 0

1

Fig 8: N versus τ for L & varying B

0

120 Space constant (sigma)

140

120 100 L=1m,B=1:10

80

L=1m,B=1:5

60 40

0.1

0.2

0.7

Fig 12: N versus σ for L & varying B

140

L=1m,B=1:2

20

L=1.5,B=1:10

100 80 L=1.5m,B=1:5

60

L=1.5m,B=1:2

40 20

0

0.4

0.5

0.6 0.7 Scale factor (tau)

0.8

0.9

0

1

Fig 9: N versus τ for L and varying B 140

70

120

60

100

L=2m,B=1:10

80 60

L=2m,B=1:5

40

L=2m,B=1:2

20 0 0.4

0

0.1

0.2

0.3 0.4 0.5 0.6 Number of elements (N)

0.7

0.8

0.9

Fig 13: N versus σ for L & varying B

Number of elements (N)

Number of elements (N)

Number of elements (N)

100

0

140

Number of elements (N)

L=2m,B=1:10

120

20

1

0.9

Fig 7: N versus τ for L and varying B

0

Vol.100(4) December 2009

L=0.5m,B=1:10

50

L=0.5m,B=1:5

40 L=0.5m,B=1:2

30 20 10

0.5

0.6 0.7 0.8 Scale factor (tau)

Fig 10: N versus τ for L and varying B

0.9

1

0

0

0.05

0.1 0.15 0.2 0.25 Space constants (Sigma)

Fig 14: N versus σ for L & varying B

0.3

0.35

Vol.100(4) December 2009

SOUTH AFRICAN INSTITUTE OF ELECTRICAL ENGINEERS

Table 3: Convergent LPDA Antennas

9.5



N

G(dBi)

L(METER)

B

0.90 0.86 0.85 0.936 0.93 0.928 0.97 0.93 0.928 0.978 0.948 0.952

0.095 0.086 0.082 0.125 0.086 0.08 0.09 0.128 0.119 0.089 0.129 0.107

8 12 16 12 24 32 24 24 32 32 32 48

7 5.6 6.7 8.23 6.61 8.03 8.87 8.30 8.00 9.45 9.25 8.72

0.5max 0.5max 0.5max max max max 1.5max 1.5max 1.5max 2max 2max 2max

1:2 1:5 1:10 1:2 1:5 1:10 1:2 1:5 1:10 1:2 1:5 1:10

8

7

6 5.5

10

L=1m,B=1.2

8 B=1:10

7.5

B=1:5

7

6 5.5 0.5

L=0.5, B=1:10 0.7 0.8 Space factor (tau)

0.9

1

1.5 2 Boom-Length in metes

50 Number of elements (N)

45

The convergence table 3 from figure 5 to 16 above by applying the convergent criteria. A look at the table clearly indicates that the values of tau and sigma are all within the optimum region. Therefore convergent antennas are somewhat also optimised LPDA antennas. In this region tau ranges from 0.85 to 0.98, while sigma ranges from 0.08 to 0.13.

B=1:10

40 35 30

B=1:5

25 20 B=1:2

15 10 5

0.5

1

L=2m,

0.9

B=1:1

0.8 0.7 0.6

L=1.5m,

0.5

B=1:10

0.4

L=2m,

L=2m,

B=1:5

B=1:2

B=1:5

0.2 0.5

0.6

2

It is to be noted that the convergent table given here is not absolute. The values are extendable to about 2 or 3 elements depending on boom-length and operating bandwidth. Figures 17 to 19 give the convergent curves. L=1.5m,

5.

B=1:2 0.4

1.5 Boom-Length in meters

Fig 19: Convergent pair of [N, L] for changing values of B

L=1.5m,

0.3

2.5

Fig 18: Convergent [G, L] for N & B

1

Convergent LPDA Antennas

1

50

6.5

L=0.5m ,B=1:2

0.6

45

8.5

L=0.5, B=1:5

0.5

40

B=1:2

9

Fig 15: σ versus τ for L and varying B

Space constant (Sigma)

20 25 30 35 Number of elements (N)

10

L=1m,B:1.5

0.1

0.1

15

Fig 17: Convergent pair of [N, G] for L & B

L=1m,B=1:10

0.2

4.2

5

9.5

0.3

0 0.4

B=1:10

7.5

6.5

Gain (dB)

Space constant (sigma)

0.4

B=1:5

8.5

0.7

0.5

B=1:2

9

Gain (dB)



0.6

111

0.7 0.8 Scale factor (tau)

Fig 16: σ versus τ for L & varying B

0.9

1

CONCLUSION

The main theme throughout this paper has been the design of a functional LPDA antenna. In other to do this, there is a need to know all the various trade-offs available to better optimise the probable performance characteristics of the antenna given a set of situations.

112

SOUTH AFRICAN INSTITUTE OF ELECTRICAL ENGINEERS

These include: (i) The need to be able to approximate the probable gain of a LPDA Antenna for a given length and operating bandwidth. (ii) Approximate the number of dipole elements which will result in a desired gain value. (iii) Determine what values of tau and sigma would result in that gain. (iv) Determine what effect(s) if any, a given antenna parameter have on the performance of the antenna. Attempt has been made in this paper to provide these answers. It is therefore anticipated that, the use of the parametric curves (listed as figures 5 to 19) in conjunction with traditional design curves such as Peixeiro [9], would provide an easy means of designing a functional and cost optimised LPDA antenna given any set of requirements. Parametric curves beyond the ranges provided by Peixeiro [9] have been provided. In addition, parametric curves in terms of boom-length (L) and number of elements (N) for any given operating bandwidth has been provided so as to keep the cost of producing any LPDA Antenna acceptable, as these two parameters determine the cost of the Antenna, De vito and Stracca [7], [8]. A means of optimising LPDA Antenna in terms of performance, using minimised number of dipole element (N) as the criterion was introduced. The interesting thing about this technique is that although the minimisation is based on N, The value of N at which the LPDA Antenna is considered converged, is based on trends in the pattern of variation of the gain, VSWR and radiation pattern. The implication of this is that although minimisation is given in terms of N, the methodology used in obtaining N includes every practically useful performance evaluating parameter of the LPDA Antenna. The minimisation process ultimately results in optimised performance of the LPDA Antenna [15].

[1] [2]

[3]

[4]

[5]

[6] [7]

[8]

[9] [10]

It is important to note here that all the parametric curves given in this paper are valid only for a transmission line of characteristic impedance 50Ω and length to diameter ratio of 100. A follow up paper attempts at studying the effects of boom impedance and length to diameter ratios on the gain performance of an LPDA antenna. It aims to model these effects numerically and if successful will present correction factors, which takes cognisance of the impact of these parameters on the gain performance of an LPDA antenna.

[11]

In conclusion, the paper met its aims of: (i) Extending the range of parametric curves beyond those of Peixeiro [9]. (ii) Finding means of minimising 'N', leading to cost optimisation of the LPDA Antenna. (iii) Presentation of the parametric curves in terms of the main cost determinants namely L and N for values of operating bandwidths 'B'.

[14]

[12]

[13]

[15]

Vol.100(4) December 2009

6. REFERENCES D.E.Isbell, ''Log periodic dipole arrays,'' IRE trans. Antennas and propagation, vol. AP-8, pp 260, May 1960. R.L.Carrel, ''Analysis and design of the logperiodic dipole antenna,'' Antenna Lab.., University of Illinois, Urban, tech. Rept.52, 1961. S. El-khamy et al.., “Design of Multiband Fractal Antenna arrays with wideband LPDA elements” International conference of computer theory and applications, 13th ICCTA, Alexander, Egypt, Aug. 2003. M. Hilbert, M. A. Tilston, and K. G. Balmain, “Resonance phenomena of log –periodic antenna characteristic- mode analysis,” IEEE Trans. Ant. Prop.., vol.37, no. 10, pp. 12241234, Oct. 1989. CISPR 16-1 specification for radio disturbance and immunity measuring apparatus and methods, part 1: Radio disturbance and immunity measuring apparatus, Intl. Electrotechnical commission, Geneva, Switzerland, 1993. ARRL Antenna hand book 4th edition, Mc-Graw Hill publishers, 1986. G. De. Vito and B. Stracca, “Comments on the design of log- periodic dipole array antennas,” IEEE. Trans. Ant. Prop.., AP-21, pp. 303-308, 1973. G. De. Vito and B. Stracca, “Further comments on the design of log-periodic dipole array antennas,” IEEE. Trans. Ant. Prop.., AP-22, pp. 714 – 718, 1974. C. Peixeiro, “Design of log-periodic dipole array antennas,” IEEE. Proc.., Vol. 135, pt. H, April 1988. P.C. Butson and G.T. Thompson, “A note on the calculation of the gain of log-periodic dipole array antennas,” IEEE. Trans. AP- 24, PP. 105 – 106, 1976 Super Numeric Electromagnetic code (SuperNec) version 2 user’s guide. C. C. Balntin and K.G. Balmain, “Study of compressed log-periodic dipole array antennas,” IEEE. Trans. Ant. Prop.., Vol. AP-18, PP. 195203, March 1970. G. Burke and A. Poggio, “Numerical electromagnetic code (NEC): “A user oriented computer code for analysis of electromagnetic response of Antennas and other structures,” Lawrence Livermore laboratory, Jan. 1981. R.F. Harrington, “Field computation by method of moments (MOM),” Macmillan Co. reissued edition 1996. Y.C. Chung and R. L. Haupt, “Log-periodic dipole array antennas optimization,” Journal of electromagnetic waves and application, Vol. 15, no. 9, pp. 1269-1280, 2001.