**Meet the editor**

Dr Vasilios N. Katsikis received his Diploma of Mathematics from the University of Athens, his M.Sc. in Applied Mathematics and his Ph. D. in Mathematics from the National Technical University of Athens. He also worked as a post-doc researcher in Applied and Computational Mathematics under the financial support of the State Scholarship Foundation (IKY). During the

years 1999-2009 he worked in several Greek universities and Technological Education Institutes and from September 2009 he belongs to the teaching and research stuff of the Department of Mathematics at the Technological Education Institute of Piraeus as an assistant professor of Mathematics. His research interests lie in the areas of Computational Mathematics, Functional Analysis, Computational Finance, Matrix Analysis and Applied Linear Algebra, Image and Signal Processing. He has published several articles in high quality journals concerning the above areas and he serves as a reviewer for many journals and congresses while he belongs to the editorial board of three journals.

Contents

**Preface IX** 

**Section 1 Electronic Engineering and Computer Science 1** 

Chapter 2 **Mobile Radio Propagation Prediction for** 

Farhad E. Mahmood

**A User Interface 91** 

Chapter 1 **MATLAB COM Integration for Engineering Applications 3**  Mariano Raboso, María I. Jiménez, Lara del Val, Alberto Izquierdo, Juan J. Villacorta and Myriam Codes

**Two Different Districts in Mosul-City 19** 

Chapter 3 **Two Novel Implementations of the Remez Multiple** 

**Section 2 MATLAB/SIMULINK and Its Engineering Applications 67** 

Chapter 5 **On Finite-Dimensional Transformations of Anisochronic Controllers Designed by Algebraic Means:** 

Libor Pekař, Eva Kurečková and Roman Prokop

Chapter 7 **Matlab Simulink as Simulation Tool for Wind Generation** 

Moulay Tahar Lamchich and Nora Lachguer

**Systems Based on Doubly Fed Induction Machines 139** 

Chapter 6 **Matlab/SystemC for the New Co-Simulation Environment by JPEG Algorithm 119**  Walid Hassairi, Moncef Bousselmi, Mohamed Abid and Carlos Valderrama

Muhammad Ahsan and Tapio Saramäki

Chapter 4 **A Virtual Laboratory: Teaching and Research Tool in Control Engineering Education 69**  Prashant M. Menghal and A. Jaya Laxmi

**Exchange Algorithm for Optimum FIR Filter Design 37** 

## Contents

#### **Preface** XI


X Contents



## Preface

" *Δως μοι πα στω και τάν γαν κινάσω (Give me a place to stand on, and I will move the Earth).*" **Archimedes** 

This excellent book represents the second part of three-volumes regarding MATLABbased applications in almost every branch of science. The present textbook contains a collection of 13 exceptional articles. In particular, the book consists of three sections, the first one is devoted to electronic engineering and computer science, the second is devoted to MATLAB/SIMULINK as a tool for engineering applications, the third one is about Telecommunication and communication systems and the last one discusses MATLAB toolboxes. In what follows, we present a short summary focusing on the key concepts of each chapter.

**Section 1:** Electronic Engineering and Computer Science

In **chapter 1**, the authors show how MATLAB can be accessed using Component Object Model (COM) interfaces. As other software applications, COM components from MATLAB are accessible to developers, allowing to be invoked from other programming languages. This feature makes MATLAB components available from other specific languages, in order to build more complex programs or integrate MATLAB on CASE development frameworks. Besides a general description for Microsoft COM technology and MATLAB COM interface, an example of code written in TCL/TK is shown in order to describe how MATLAB COM components can be accessed from TCL/TK to implement a CASE framework developed by the authors, called XBDK (XML-Based Beam forming Development Kit). This framework integrates several tools to perform analysis and simulation of beam forming systems, a complex solution to develop high performance systems using sensor arrays.

**Chapter 2**, discusses two theoretical models for the prediction of path loss for two different districts in Mosul city, using MATLAB. The Walfisch-Ikegami (W-I) model for uniform heights and similar buildings in the Karama district and the Okumura-Hata (OH) model applied for irregular and dissimilar buildings in the Almajmoa'a district.

#### XII Preface

In **chapter 3,** the authors describe two novel MATLAB based implementations of the Remez multiple exchange algorithm within the MPR algorithm. The first implementation is an extremely fast and compact translation of the RME algorithm part of the original Fortran code to the corresponding MATLAB code and is valid for general purpose linear-phase FIR filters design. The second implementation is based on the fundamental notion of the Remez multiple exchange algorithm and provides significant improvements in designing the multiband FIR filters. The quality of the filters designed with the proposed implementations is analogous to that of the PM algorithm with an added advantage of less number of iterations and CPU execution time.

Preface XI

environment. The integration of SystemC within MATLAB/SIMULINK and the

In **chapter 7**, an overview of MATLAB/SIMULINK, particularly the blocks concerned by the study of wind turbine generators based on Doubly Fed Induction Generator (DFIG) are presented. In order to analyze the dynamic and/or steady state behaviour of the control of DFIG for wind generation, the basic components of a wind turbine is developed based on the libraries: Mechanical Components, Electrical Machinery, Power Converters, Common Models, Transformations, Measurements and Control. This chapter focuses on how we can use these libraries to develop a model of electrical

**Chapter 8,** discusses a co-simulation tool for analysis and design of electrical machines. Two different case studies have been reported. In the first one, cosimulations between the system simulator software and the FEM software are presented for the iron losses calculation under arbitrary voltages. A particular procedure is described to carry out current driven co-simulations in order to reduce as much as possible the computation load and the time consumption of the calculus. In the second case the performance of the electric machine in an elevator is evaluated. Thus, the vibrations caused by the motor in the elevator cage are studied applying the proposed co-simulation. It has been demonstrated that the torque ripple of the motor can affect negatively on the elevator comfort. As a conclusion of this work one gets that these co-simulations are helpful tools for accurate and relatively easy analysis of

**Chapter 9,** proposes a generic design approach and then provides a practical case study corresponding to an actual experience related to the implementation of a realtime Multiple Input Multiple Output (MIMO) mobile WiMAX (i.e., IEEE 802.16e) system. Moreover, the present chapter aims at describing how MATLAB can be used as a design and verification tool in the different phases composing the time-consuming and complex process of migrating from a high-level model to a real-time hardware prototype, using as a case study the implementation of a real-life wireless

**In chapter 10,** the main objective is to use MATLAB simulator for study issues and impairments of Digital Video Broadcasting - Second generation (DVB-S2) standard in Geostationary (GEO) satellite as a broad casting media. In this chapter a Digital Video Broadcasting - Second generation (DVB-S2) model using MATLAB simulator is described to study Bit Error Rate (BER) performance of different ModCods. Considering simulation results the authors draw a new threshold offset for physical layer selector with a reduced set of ModCods to avoid extra switching in ACM algorithm which will introduce oscillations resulting in system instability. Furthermore, they show how the offset thresholds in ACM LUT and hysteresis can

resulting verification flow is tested on the JPEG compression algorithm.

generation based wind systems in step by step.

multi-domain systems in a relatively short development time.

**Section 3:** Telecommunication-Communication Systems

communication system.

**Section 2:** MATLAB/SIMULINK and its Engineering Applications

**Chapter 4**, investigates a virtual laboratory (VLab) that has been developed for control Engineering by using MATLAB/SIMULINK. The chapter also emphasis on the use of Mathematical Modeling and simulation of Feedback Servo trainer (33-100) and study their behavior by using the MATLAB/SIMULINK models and Graphical User Interface (GUI). A virtual laboratory for Automatic Control Engineering can provide to university students an easy access to engineering applications at anytime and from any computing environment. This interactive learning environment, consisting of simulations, demonstrations and exercises, can fulfill the role of a bridge from passive learning to active engagement and thus stimulate deeper thinking; grounding a problem based-learning environment. The applications are also very important for relating theory to practice, so that the students can develop engineering judgment and understand how process behavior can be captured using mathematical models.

In **chapter 5,** the aim is to test and benchmark by simulations, how rational approximations for exponential elements in transfer functions of linear time-invariant time-delay systems (LTI-TDS) work. In particular, this chapter provides a methodology for algebraic controller design for systems with internal delays, followed by a comparison of several easy-handling techniques for rational (i.e. finitedimensional) approximation of anisochronic (i.e. infinite-dimensional) controllers - or their transfer functions. Also, a MATLAB/SIMULINK user-interface application has been programmed to make a benchmark of approximations easier.

**Chapter 6,** attempts to give a guide for the implementation of real-time control systems, using the S-function of MATLAB/SIMULINK, as a practical tool for students in control engineering. The MATLAB/SIMULINK to SystemC interface and the advanced version of transactors are combined in a scalable multi-abstraction level verification platform. The proposed refined co-simulation platform enables cosimulation with hardware models written in SystemC. On that platform, application software and hardware modules are directly executed on a host computer, which leads to a high co-simulation speed. The MATLAB/SystemC interface is mainly used for the verification of the lower abstraction levels with a high level model of their execution environment. The integration of SystemC within MATLAB/SIMULINK and the resulting verification flow is tested on the JPEG compression algorithm.

In **chapter 7**, an overview of MATLAB/SIMULINK, particularly the blocks concerned by the study of wind turbine generators based on Doubly Fed Induction Generator (DFIG) are presented. In order to analyze the dynamic and/or steady state behaviour of the control of DFIG for wind generation, the basic components of a wind turbine is developed based on the libraries: Mechanical Components, Electrical Machinery, Power Converters, Common Models, Transformations, Measurements and Control. This chapter focuses on how we can use these libraries to develop a model of electrical generation based wind systems in step by step.

**Chapter 8,** discusses a co-simulation tool for analysis and design of electrical machines. Two different case studies have been reported. In the first one, cosimulations between the system simulator software and the FEM software are presented for the iron losses calculation under arbitrary voltages. A particular procedure is described to carry out current driven co-simulations in order to reduce as much as possible the computation load and the time consumption of the calculus. In the second case the performance of the electric machine in an elevator is evaluated. Thus, the vibrations caused by the motor in the elevator cage are studied applying the proposed co-simulation. It has been demonstrated that the torque ripple of the motor can affect negatively on the elevator comfort. As a conclusion of this work one gets that these co-simulations are helpful tools for accurate and relatively easy analysis of multi-domain systems in a relatively short development time.

**Section 3:** Telecommunication-Communication Systems

X Preface

time.

In **chapter 3,** the authors describe two novel MATLAB based implementations of the Remez multiple exchange algorithm within the MPR algorithm. The first implementation is an extremely fast and compact translation of the RME algorithm part of the original Fortran code to the corresponding MATLAB code and is valid for general purpose linear-phase FIR filters design. The second implementation is based on the fundamental notion of the Remez multiple exchange algorithm and provides significant improvements in designing the multiband FIR filters. The quality of the filters designed with the proposed implementations is analogous to that of the PM algorithm with an added advantage of less number of iterations and CPU execution

**Chapter 4**, investigates a virtual laboratory (VLab) that has been developed for control Engineering by using MATLAB/SIMULINK. The chapter also emphasis on the use of Mathematical Modeling and simulation of Feedback Servo trainer (33-100) and study their behavior by using the MATLAB/SIMULINK models and Graphical User Interface (GUI). A virtual laboratory for Automatic Control Engineering can provide to university students an easy access to engineering applications at anytime and from any computing environment. This interactive learning environment, consisting of simulations, demonstrations and exercises, can fulfill the role of a bridge from passive learning to active engagement and thus stimulate deeper thinking; grounding a problem based-learning environment. The applications are also very important for relating theory to practice, so that the students can develop engineering judgment and

understand how process behavior can be captured using mathematical models.

been programmed to make a benchmark of approximations easier.

In **chapter 5,** the aim is to test and benchmark by simulations, how rational approximations for exponential elements in transfer functions of linear time-invariant time-delay systems (LTI-TDS) work. In particular, this chapter provides a methodology for algebraic controller design for systems with internal delays, followed by a comparison of several easy-handling techniques for rational (i.e. finitedimensional) approximation of anisochronic (i.e. infinite-dimensional) controllers - or their transfer functions. Also, a MATLAB/SIMULINK user-interface application has

**Chapter 6,** attempts to give a guide for the implementation of real-time control systems, using the S-function of MATLAB/SIMULINK, as a practical tool for students in control engineering. The MATLAB/SIMULINK to SystemC interface and the advanced version of transactors are combined in a scalable multi-abstraction level verification platform. The proposed refined co-simulation platform enables cosimulation with hardware models written in SystemC. On that platform, application software and hardware modules are directly executed on a host computer, which leads to a high co-simulation speed. The MATLAB/SystemC interface is mainly used for the verification of the lower abstraction levels with a high level model of their execution

**Section 2:** MATLAB/SIMULINK and its Engineering Applications

**Chapter 9,** proposes a generic design approach and then provides a practical case study corresponding to an actual experience related to the implementation of a realtime Multiple Input Multiple Output (MIMO) mobile WiMAX (i.e., IEEE 802.16e) system. Moreover, the present chapter aims at describing how MATLAB can be used as a design and verification tool in the different phases composing the time-consuming and complex process of migrating from a high-level model to a real-time hardware prototype, using as a case study the implementation of a real-life wireless communication system.

**In chapter 10,** the main objective is to use MATLAB simulator for study issues and impairments of Digital Video Broadcasting - Second generation (DVB-S2) standard in Geostationary (GEO) satellite as a broad casting media. In this chapter a Digital Video Broadcasting - Second generation (DVB-S2) model using MATLAB simulator is described to study Bit Error Rate (BER) performance of different ModCods. Considering simulation results the authors draw a new threshold offset for physical layer selector with a reduced set of ModCods to avoid extra switching in ACM algorithm which will introduce oscillations resulting in system instability. Furthermore, they show how the offset thresholds in ACM LUT and hysteresis can affect BER performance of the system and the broadcasted video quality consequently. In conclusion, the spectrum efficiency against different ModCods and different ModCod subsets is analyzed by using different ACM LUT designed for various attenuation patterns.

**Chapter 11,** describes carefully the steps of the methodology and give the bases to create a MATLAB script to simulate a Markovian channel and the communication system with this model. As a result the interested reader can have the bases to create a more complex channel based on Markovian chains.

In **chapter 12,** a new simulation methodology of wireless sensor networks (WSN) is presented. MATLAB/SIMULINK is used as the tool to build the simulation environment. The strength of this simulation method falls in the ability to study the effect of different physical layer parameters (channel noise and interference, signal to noise ratio etc.) on the system behavior. The other advantage of this method is its flexibility in building the end nodes and sensors. This simulation methodology could be used to build different WSN types and opens the doors to use MATLAB in this new field.

**Chapter 13,** provides a general overview of semi-analytic techniques for the simulation of complex communications systems. Specific emphasis is given to their implementation in MATLAB and two examples from the communications context are analyzed in detail. Although semi-analytic techniques have been considered in textbooks on simulations, limited attention has been provided to their analysis and implementation. This chapter focuses on these two aspects with specific emphasis on the potential of the MATLAB environment for their implementation.

At this point, I would like to thank the authors for their great contribution in this series of scientific books regarding MATLAB applications in Sciences. Also, I thank the InTech team for their significant support during the preparation of this book.

> **Vasilios N. Katsikis**  Department of Mathematics, Technological Education Institute of Piraeus, Greece

**Electronic Engineering and Computer Science** 

**Chapter 1** 

© 2012 Raboso et al., licensee InTech. This is an open access chapter distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/3.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

© 2012 Raboso et al., licensee InTech. This is a paper distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/3.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

**MATLAB COM** 

http://dx.doi.org/10.5772/46471

has shown through the last years.

(Commercial Off-The-Shelf).

object code.

prototyping software developments.

**1. Introduction** 

**Integration for Engineering Applications** 

COM (Component Object Model) is a Microsoft framework designed for Windows platforms for developing and integrating software components. Software components and reusability techniques have interesting advantages, as component base software engineering

The most powerful idea around component-based software, is that components can be implemented by a programmer and reused by others without having knowledge of the source code. Components are binary packages that can be deployed and further integrated with others written on different programming languages. As component selection and integration is usually an easy and well-known process, components are also called COTS

Software components are also very useful for evaluating several implementations for different vendors. Engineers can analyse and compare them in terms of cost, performance and security. Furthermore, component software integration is a key tool for rapid-

A component may be implemented with a high specialized language suitable for specific tasks and used by clients written on more general languages. For example, we could be interested on implementing a specialized component in Matlab, and integrating it into a GUI written on Visual Basic or Tcl/Tk. This situation may be comparable to software written on assembly language (specific and low-level) and linked into C programs using libraries or

On the other hand, using software components also involves some risks. Software development must follow its own methodologies, standards and rules that must be taken into account when

Mariano Raboso, María I. Jiménez, Lara del Val,

Additional information is available at the end of the chapter

Alberto Izquierdo, Juan J. Villacorta and Myriam Codes
