<<

COAXIAL CABLE MODELING AND VERIFICATION

by

Luyan Qian Zhengyu Shan

A Thesis for the Degree of

BACHELOR OF SCIENCE

in

ELECTRICAL

Blekinge Institute of Technology

Karlskrona, Sweden

2012

Supervisor: Anders Hultgren

Blekinge Institute of Technology, Sweden

2

ABSTRACT In this paper, analysis of cable is used to reveal how an electromagnetic propagates in an , and a new modeling language, MODELICA is introduced. Some properties, such as propagation delay, , attenuation, are all verified by comparing the results from MATLAB and MODELICA. The models we simulated are different types of coaxial cables, including lossless cables and lossy cables. It can be shown that MODELICA, a very powerful and convenient tool, can process complex physical systems.

3

4

NOTATION Inside diameter of the shield Outside diameter of the enter conductor

Relative constant Free space dielectric constant Dielectric constant of the

Relative permeability Permeability of free space Magnetic permeability of the insulator Resistance Length of the conductor Cross-section area of the conductor Electrical resistivity of the material Conductance Current Angular frequency

Function represents a wave traveling from left to right Function represents a wave traveling from right to left Position in transmission line Time Propagation speed The speed of State vector Output vector Input vector State Input matrix Output matrix Feedthrough matrix, The differential equation of Reflection coefficient strength of the reflected wave Electric field strength of the incident wave

Impedance toward the load Magnitude of reflection coefficient

Transmitted power Reflected power 5

The time enters cable The time signal exits cable Propagation time Voltage of incident wave Voltage of reflected wave Signal attenuation constant constant

ABBREVIATION PVC AC KCL Kirchhoff’s current law KVL Kirchhoff’s voltage law VSWR Voltage stand wave ratio RL RF frequency

6

TABLE OF CONTENTS

ABSTRACT ...... 3 NOTATION ...... 5 ABBREVIATION ...... 6 TABLE OF CONTENTS ...... 7 1 INTRODUCTION ...... 9 2 BACKGROUND ...... 13 2.1 Cable Background ...... 13 2.2 Technique Background ...... 14 3 THEORIES ...... 19 3.1 Transmission Line Theory ...... 19 3.1.1 The structure of cable ...... 19 3.1.2 Fundamental electrical parameters ...... 20 3.1.3 Telegrapher’s equation ...... 21 3.1.4 Characteristic impedance ...... 24 3.1.5 ...... 26 3.1.6 Attenuation in transmission line ...... 27 3.2 Methods Used to Solve Circuits ...... 30 3.2.1 Kirchhoff’s circuit laws ...... 30 3.2.2 State space form ...... 30 3.3 Reflection Theory...... 28 4 MODELING METHODS ...... 33 4.1 Simple Circuit Solution ...... 33 4.1.1 Lossless transmission line terminated in open-circuit ...... 34 4.1.2 Lossless transmission line terminated in short-circuit ...... 36 4.1.3 Lossless transmission line terminated in matched load ...... 38 4.1.4 Lossy transmission line ...... 40 4.1.5 Two different lossless cables connected ...... 41 4.2 MATLAB Modeling and Simulat1ion...... 45 4.3 MODELICA Modeling and ...... 47 5 VERIFICATION AND ANALYSIS ...... 53 5.1 Lossless ...... 53 5.1.1 Propagation Time ...... 53 5.1.2 Reflection Coefficient and Analysis ...... 58 5.2 Lossy Coaxial Cable ...... 65 5.2.1 Propagation constant ...... 65 5.2.2 Lossy coaxial cable verification for 2 conditions ...... 67 5.2.3 Analysis for lossy cable in other conditions ...... 71 6 CONCLUSION ...... 73 REFERENCE ...... 75 APPENDICES ...... 77

7

8

1 INTRODUCTION

How does signal propagates through a transmission line? Can we know it before doing the measurements? The answer is yes, and in this report, you could get the answer. Transmission line is widely used to transport and electric power so that the research on it is important, since it could help people to understand thoroughly characteristics of transmission lines and how they behave in the data and energy delivery. According to this, we can make the response measures in order to improve the transmission efficiency, which plays a significant role in modern technological and sustainable world.

Figure 1.1, Transmission Lines in some Applications

Our thesis is developed based on the coaxial cable project of course “Modeling and Verification”, which is an experiment performed on an to reveal how an electromagnetic wave travels in an electrical conductor. And in that project, we just need to use MATLAB to model one of several conditions. When we reviewed that course, we are interested in accomplishing all tasks of the cable connection situations in that project to see what will happen as the result. Additionally, as some neoteric modeling software come out such as MODELICA and Scilab, all of which are developing very quickly, we also desire to try one by ourselves which is totally new for us. Therefore, in this paper, we introduced the modeling language MODELICA, which can simulate the electrical circuits in a more convenient way. We built different models and analyzed the results from OpenModelica, comparing them with the results given by MATLAB.

9

Figure 1.2, The open windows of MATLAB(2009a) and OpenModelica

The following conditions of coaxial cable are made: 1) a RG58 coax cable and the terminator end is open 2) a RG58 coax cable with short end 3) a RG58 coax cable terminated in matched load 4) a RG58 coax cable with RG59 coax cable in the end 5) lossy coax cable terminated with open circuit. To verify the propagation delay and reflection coefficient for lossless cables and attenuation for lossy cables, we introduced some transmission line theories such as wave propagation, characteristics impedance, reflection coefficient…, applied some powerful method to model the system. In Chapter 2, we will tell BACKGROUND of the Cables and Techniques that are used in this project. The necessary THEORIES are discussed in Chapter 3 including Transmission Line Theory, Methods Used to Solve Circuits and Reflection Theory. In Chapter 4 MODELING METHODS, the detailed modelling solutions are shown in terms of Simple Circuit, MATLAB and MODELICA Modeling and Simulation separately which describes how we did this software computation. Then we lead the reader to Chapter 5 VERIFICATION AND ANALYSIS, in which part, the characteristics of Lossless Coaxial Cable and Lossy Coaxial Cable are analyzed and the results from MATLAB and MODELICA are compared using theories. After these, we will make discussion over all of this report in Chapter 6 CONLUSION.

10

Chapter 2

Background

Transmission

Line Chapter 3 Circuit Theories Calculation

Reflection

Matlab Chapter 3 Simple Modeling Circuit Methods

Modelica

Chapter 5 Lossless Lossy Verification Cable Cable Analysis

Chapter 6 Conclusion

Figure 1.3, Overview of the report’s structure

11

12

2 BACKGROUND

2.1 Cable Background There are several types of transmission lines whose losses are small: coaxial cable, , , , single- line, , . One advantage of coax over other types of radio transmission line is that in an ideal coaxial cable can be installed next to metal objects such as gutters without the power losses that occur in other types of transmission lines. It has a large frequency range which allows it to carry multiple signals. Coaxial cable also provides protection of the signal from external electromagnetic interference. However, coaxial cable is more expensive to install, and it uses a that is prone to congestion. [1] In recent years, coaxial cables have become an essential component of our information superhighway. They are applied in a wide variety of residential, commercial and industrial installations. Coaxial cables serve as transmission line for signals. They are applied in feedlines connecting radio and receivers with their antennas, connections, and distributing cable signals. Short lengths of coaxial cables are also used for connecting devices with test equipment, like signal generator. [1] Coaxial cable is perhaps the most commonly used transmission line type for RF and measurements and applications. In 1894 Heaviside, Tesla and others received patents for coaxial line and related structures. A development of coax theory is often provided as part of basic physics and engineering equation, which are generally used for transmission line and macroscopic electromagnetic analysis. Accordingly, the analysis, measurement and application of coax are usually considered to be quite mature and complete. [2] Coaxial cable is typically identified or classified based on its impedance or RG-type. Coaxial cables that conform to U.S. Government specifications are identified with an RG designation.

Figure 2.1, Meaning of some letters

The RG series was originally used to describe the types of coax cables for military use, and the specification took the form RG plus two numbers. The RG designation stands for Radio Guide, the U designation stands for Universal. The current military standard 13

is MIL-SPEC MIL-C-17.MIL-C-17 numbers. However, the RG-series designations were so common for generations that they are still used. [1] In this paper we emphasis on modeling coaxial cable RG-58 and RG-59. RG-58 is a coaxial cable that is used for wiring purpose. The insulation surrounding the RG-58 cable carries a low impedance of around 50 or 52 . It generally serves for generating signal connections that are of low power. The RG-58 cable is most often used for the Thin when the maximum length required is about 185 meters. The RG-58 cable frequency acts as a generic carrier of power signals. These signals are generated in physical laboratories. The RG-58 cable is specially designed to work with most two-way radio systems. This system is different from the usual broad cast receiver since the latter can receive data from one end only. In case of the two-way radio system, it can be generated by the RG-58 cable, where content travels in both directions. The radio can receive and transmit data at the same time. The RG-58 can also be used for higher frequencies. The range, however, remains fairly moderate. The Ethernet wiring for which the RG-58 cable is used is sometimes termed “cheapernet”, since it draws low-power signal connections. [3] The RG-59 cable is a type of coaxial cable that is used to generate low power connections. The RG-59 cable conducts video and radio frequency at an impedance of around 75 ohms. The RG-59 cable is used for generating short-distance communication. The cable can be applied in video frequencies, which are measured from the lowest count of zero and continue to the highest signal frequency. Baseband refers to a collection of signals and frequencies varying over a wide range. The RG-59 cable cannot be used over long distance due to its high-frequency power losses. The RG-59 cables are comparatively less expensive than other cables. One of the greatest uses of the RG-59 cable is synchronization between two devices. The coaxial cable coordinates between the digital signals that are responsible for producing . The digital audio devices are used for storage, conversion, and transmission of the auto signals. The RG-59 cable maintains a unique coordination between these devices. The RG-59 cable undergoes a small amount of signal reduction, which is owing to the shielding on the cable. The low cost of the RG-59 coaxial cable has made it easily accessible and usable. [4]

2.2 Technique Background MATLAB MATLAB is a programming language for technical computing. MATLAB is used for algorithm development, model prototyping, data analysis and exploration of data, visualization and numeric computation. MATLAB was first conceived as a teaching tool by Moler who was at the University of New Mexico in the late 1970s. Moler wanted his students to have access to Linpack and Eispack matrix software without having to use the Fortan programming language, which was complex; he came up with the MATLAB system to solve this 14

problem. [5] The original MATLAB was designed specifically to handle computations with matrices and mathematics. Little and Steve Bangert developed PC MATLAB by porting Moler’s code from FORTRAN to C, adding user-defined functions, improved graphics, and libraries of MATLAB routines, the toolboxes. There is general agreement in the technical computing community that the main reasons for MATLAB’s success are its intuitive, concise syntax, the use of complex matrices as the default numeric data object, the power of the built-in operators, easily used graphics, and its simple and friendly programming environment, allowing easy extension of the language. [6] It has been widely used by engineers, mathematicians and scientists. MATLAB boats more than 1 million users around the word. MATLAB now has been used in such varied areas as automobiles, airplanes, hearing aids, cellphones, financial derivative pricing and academics. [5]

Figure 2.2, MATLAB window environment

MODELICA Object-Oriented modeling is a fast-growing area of modeling and simulation that provides a structured, computer-supported way of doing mathematical and equation-based modeling. MODELICA is today the most promising modeling and simulation language in that it effectively unifies and generalized previous object-oriented modeling languages and provides a sound basis for the basic concepts. [7] 15

The MODELICA design effort was initiated in September 1996 by Hilding Elmqvist. The goal was to develop an object-oriented language for modeling of technical systems in order to reuse and exchange dynamic system models in a standardized format. [8] The four most important features of MODELICA are: [9]

 MODELICA is based on equation instead of assignment statements. This permits a causal modeling that gives better reuse of classes since equations do not specify a certain data flow direction. Thus a MODELICA class can adapt to more than one data flow context.

 MODELICA has multi-domain modeling capability, meaning that model components corresponding to physical objects from several different domains such as electrical, mechanical, thermodynamic, hydraulic, biological and control applications can be described and connected.

 MODELICA is an object-oriented language with a general class concept that unifies classes, generics―known as templates in C++, and subtyping into a single language construct. This facilitates reuse of components and evolution of models.

 MODELICA has a strong software component model, with constructs for creating and connecting components. Thus the language is ideally suited as an architectural description language for complex physical systems and to some extent for software systems.

OpenModelica The OpenModelica environment is an open-source environment for modeling, simulation, and development of MODELICA applications. The current version of the OpenModelica environment allows most of expression, algorithm and function parts of MODELICA to be executed interactively, as well as equation models and MODELICA functions to be compiled into efficient C code. The generated C code is combined with a library of utility functions, a run-time library, and a numerical DAE solver. An external function library interfacing a LAPACK subset and other basic algorithms is under development. [10] The OpenModelica environment has several goals: [10]

 Providing an efficient interactive computational environment for the MODELICA language.

 Development of a complete reference implementation of MODELICA in an extended version of MODELICA itself.

 Providing an environment for teaching modeling and simulation.

 Language design to improve abstract properties such as expressiveness, orthogonality, declarativity, reuse, configurability, architectural properties, etc.

16

 Improved implementation techniques, e.g. to enhance the performance of compiled MODELICA code by generating code for parallel hardware.

 Improved debugging support for equation based languages such as MODELICA, to make them even easier to use.

 Easy-to-use specialized high-level user interfaces for certain application domains.

 Visualization and animation techniques for interpretation and presentation of results.

 Application usage and model library development by researches in various application areas.

Figure 2.3, OpenModelica window environment

17

18

3 THEORIES

3.1 Transmission Line Theory In and , a transmission line is a specialized cable designed to transfer alternating current of radio frequency, that is, currents with a frequency high enough that their wave nature must be taken into account. Transmission lines are used for purposes such as connection radio transmitters and receivers with their antennas, distributing signals, and computer network connections. Transmission lines can be realized in number of ways. Common examples are the coaxial cable and the parallel-wire line. [11]

3.1.1 The structure of cable

Figure 3.1, Inner structure of the cable

Coaxial cables are the that transmit pulses from one end to another, protecting the information in the signal. A cable can be treated as a transmission line if the length is greater than 1/10 of the wave length. Coaxial cable has a core wire, surrounded by an insulation jacket which is a PVC material. Normally the shield is kept at ground potential. Then it is surrounded by a copper mesh which is often constituted by braided . The inner dielectric separates the core and the shielding apart. The central wire carries the RF signal and the outer shield is considered to prevent the RF signal from radiating to the atmosphere and to keep outside signals from interfering with the signal carried by the core. The electrical signal always travels along the outer layer of the central conductor, and as a result, the larger the central conductor, the better signal will flow. Coaxial cable is a good choice for carrying weak signals that cannot tolerate interference from the environment or for higher electrical signals that must not be allowed to radiate or couple into adjacent structures or circuits. [12]

19

Table 3.1, Physical parameters for typical cables

Dielectric Cable Type Core (mm) Shield (mm) Jacker(mm) (mm)

RG-58 0.9 2.95 3.8 4.95

RG-213 2.26 7.24 8.64 10.29

LMR-400 2.74 7.24 8.13 10.29

3/8” LDF 3.1 8.12 9.7 11

3.1.2 Fundamental electrical parameters Generally, a transmission line has these four parameters: capacitance, resistance, conductance and inductance. capacitance C per unit length, in per meter. [13]

Where: d is the outside diameter of the enter conductor (millimeters) D is the inside diameter of the shield (millimeters)

is the relative dielectric constant is the free space dielectric constant is the dielectric constant of the insulator, which equal to Series inductance L per unit length, in henrys per meter. [13]

Where: is the relative permeability, it almost always be 1 is the permeability of free space is the magnetic permeability of the insulator, which equal to Series resistance R per unit length, in ohms per meter. This parameter is the resistance of the inner conductor and the shield. Resistance primarily depends upon two factors: the material it is made of, and its shape. Another factor, which affects this parameter, is the , wherein the propagating microwave signal is intend to confine itself on the top layer or the 'skin' of the conductor, thus increasing the effective resistance. Assume the current density is totally uniform in the conductor, the resistance R can be computed as: [14]

20

Where: is the length of the conductor (meters) is the cross-section area of the conductor (square meters) is the electrical resistivity of the material (-meters) Shunt conductance G per unit length, in per meter. The shunt conductance happens due to the of the insulator used. An insulating material with good dielectric properties will have a low shunt conductance. Assume the current density is totally uniform in the conductor, the conductance G can be computed as: [14]

3.1.3 Telegrapher’s equation Telegrapher’s equations are a pair of linear differential equations which characterize the voltage and current on an electrical transmission line with distance and time. We can derive characteristic impedance and wave speed from the telegrapher’s equation.

Lossless transmission model

Figure 3.2, Equivalent circuit model of a lossless transmission line

In lossless transmission line, it possesses a certain series inductance . If is the current through the wire, the voltage across the inductance is ,

denotes the voltage at position and time . We have that the charge in voltage between the ends of the piece of wire is:

(3.1)

Further that current can escape from the wire to ground through the capacitance . Because the charge of is , the amount of the current escapes from the capacitor is . We have the charge in current is:

(3.2)

Both side of equation (3.1) and (3.2) are divided by , get the difference equation:

21

(3.3)

(3.4)

From and

(3.5)

(3.6)

Putting to equation (3.5)

(3.7)

To get similar equation for the current, using and

(3.8)

(3.9)

Putting to equation (3.9)

(3.10)

So, the telegraph’s equations for the lossless transmission line are:

(3.11)

(3.12)

Lossy transmission model

Figure 3.3, Equivalent circuit model of a lossy transmission line

The components for the model of a lossy transmission line are the series 22

inductance , shunt capacitance , series resistance , and shunt conductance . For a homogeneous transmission line, those parameters are distributed evenly along the length of the line. The change in voltage between the ends of the piece of wire is:

(3.13)

We have the charge in current is:

(3.14)

Both side of equation (3.13) and (3.14) are divided by , get the difference equation:

(3.15)

(3.16)

From and get:

(3.17)

(3.18)

Putting ,

to equation (3.17)

(3.19)

(3.20)

(3.21)

To get similar equation for the current, using and

(3.22)

(3.23)

Putting

23

to equation (3.23)

(3.24)

(3.25)

(3.26)

So, the telegraph’s equations for the lossless transmission line are:

(3.27)

(3.28)

3.1.4 Characteristic impedance Characteristic impedance refers to the equivalent resistance of a transmission line if it were infinitely long, it is due to distributed capacitance and inductance as the voltage and current flow along its length at a propagation velocity equal to some large fraction of light speed. The inductance increases with increasing spacing between the conductors, and the capacitance decreases with increasing spacing between the conductors. Hence a line with closely spaced large conductors has low characteristic impedance. [12] Characteristic impedance for lossless transmission line can be derived by lossless telegraph’s equation .

There are two solutions for the traveling wave: one forward and one reverse. The solution for the can be written as: [15]

Where: k is the wavenumber (/meter) is the angular frequency (radians/second)

and can be any function, represents a wave traveling from left to right in positive x direction, while represents a wave traveling from right to left Since the current is related to the voltage by the telegrapher’s equations, we can write:

[15]

The differential equation for

24

(3.29)

And the first order differential equation for :

(3.30)

Comparing telegraph’s equation with the result of equation (3.29) divided by equation (3.30), we can get the characteristic impedance:

(3.31)

We have calculated the relationship between and , putting to equation (3.31)

Thus, the expression of characteristic in lossless transmission line is:

To calculate the characteristic impedance for lossy transmission line, we replace each time derivative by a factor for lossy telegraph’s equation (3.27) and express them in frequency domain, the equations become:

(3.32)

(3.33)

Where , and Mathematically, we can solve the equations for a lossy transmission line in exact the same way as we did for lossless line. The characteristic impedance for lossy transmission line is:

Matched load A line terminated in a purely resistive load equal to the characteristic impedance is said to be matched. In a matched transmission line, all the power is transmitted over a transmission line. It minimizes signal in transmission lines, prevents wave from reflections and pulse. [12]

25

3.1.5 Wave propagation Propagation speed for lossless transmission line can be derived by lossless telegraph’s

equation .

We have mentioned the solution for the wave equation can be written as:

We can get the first differential equation by using

(3.34)

Using of equation (3.34) to get secondary differential equation

(3.35)

Using the same method to get secondary differential equation for

(3.36)

One can easily show by comparing telegraph’s equation with the result of equation (3.35) divided by equation (3.36), the velocity with which the electromagnetic energy propagates along this lossless line is given by:

The propagation speed for lossy cable can be calculated with the similar solution which used to solve the characteristic impedance for lossy cable by replacing and :

Velocity of propagation The velocity factor is the speed at which RF signal travels through a material compared to the speed the same signal travels through a vacuum. The higher the velocity factor, the lower the loss through a coaxial cable. Velocity factor is a parameter that characterizes the speed at which an electrical signal passes through a medium. It varies from 0 to 1. The velocity of light is the speed limit for electrical signals and is never reached in coaxial cable, the range of velocity factor is from 66 percent to 86 percent for typical flexible coaxial cable. The type of dielectric material, determines the dielectric constant, which is the primary determinant of the velocity of the cable. [16] 26

Where: is the velocity factor

Dielectric materials Dielectric material is the material between the center and outer conductors. There is a variety of materials that can be successfully used as in coax cables. Each has its own dielectric constant, and as a result, coax cables that use different dielectric materials will exhibit different velocity factors.

Table 3.2, Dielectric constants and velocity factors of some common dielectric materials used in coax cables

DIELECTRIC VELOCITY MATERIAL CONSTANT FACTOR

Polyethylene 2.3 0.659

Foam polyethylene 1.3 – 1.6 0.88 – 0.79

Solid PTFE 2.07 0.695

For a lossless transmission line: [17]

Where c is the (meters/second)

3.1.6 Attenuation in transmission line Every transmission has some losses, since the resistance of the conductors and power is consumed in the dielectric which used for insulating the conductors. Power lost in a transmission line is not directly proportional to the line length, but varies logarithmically with the length. And line losses are usually presented in terms of per unit length. Losses in transmission line arise from sources: , dielectric loss, skin effect loss. [18]

Skin effect loss Skin effect occurs in conductors carrying an AC current. As the frequency increases, the current tends to be concentrated near the surface of the conductor, and the skin effect becomes more pronounced and the loss in conductors increases dramatically. Skin effect loss is the resistance aggravated by the inhomogeneous current distribution that caused by the skin effect. For a perfect coaxial cable, the skin 27

resistance is proportional to the square root of the frequency. [18]

Dielectric loss Dielectric loss is due to the electric absorbing energy as it is polarized in each direction. It occurs when the conductance is non-zero. Dielectrics have losses increase when increasing the voltage on the conductors. Dielectric losses also increase with the frequency since the shunt conductance increase approximately linearly with frequency. [18]

Radiation loss Radiation loss occurs in two wire lines since the fields from one line do not completed cancel out those from the other line. If the conductors form a tight electromagnetic system with the outer conductor have a thickness greater than 5 times the skin depth then radiation is negligible. If outer conductor is a loose braid, it will result in radiation. Special types of coax with multiple braids, or a solid outer conductor have no measureable radiation losses. [18]

3.2 Reflection Theory A signal travelling along an electrical transmission line will be partly, or wholly, reflected back in the opposite direction when the travelling signal encounters a discontinuity in the transmission line, or when a transmission line is terminated with other than its characteristic impedance. [19]

Reflection Coefficient Reflection coefficient describes the ratio of reflected wave to incident wave at point of reflection, where circuit parameter has sudden change. This value varies from -1 (for short load) to +1 (for open load), and becomes 0 for matched impedance load. The reflection coefficient is defined as:

[20]

Where: is the electric field strength of the reflected wave is the electric field strength of the incident wave The reflection coefficient may also be established using circuit quantities:

Where: is the impedance toward the load is the impedance toward the source

28

Figure 3.4, Simple circuit configuration showing measurement location of reflection coefficient

Voltage Ratio (VSWR) Voltage is the ratio of maximum to minimum voltage in standing wave pattern. It varies from 1 to plus infinite. VSWR is used as an efficiency measure for transmission lines, electrical cables that conduct radio frequency signals, used for purposes such as connecting radio transmitters and receivers with their antennas, and distributing cable television signals. Impedance mismatches in the cable causes radio waves to reflect back toward the source end of the cable. VSWR measures the relative size of these reflections. An ideal transmission line would have a VSWR of 1:1, with all the power reaching the destination and no reflection. An infinite VSWR represents complete reflection, with all the power reflected back down the cable. [21] VSWR is related to the reflection by:

Where , the magnitude of reflection coefficient

Return Loss Return loss is the reflection of signal power resulting from the inserting of a device in a transmission line or optical fiber. Return loss is a convenient way to characterize the input and output of signal sources. Return loss is a measure of how well devices or lines are matched. A large positive return loss indicates the reflected power is small relative to the incident power, which indicates good impedance match from source to load. This loss value become 0 for 100% reflection and become infinite for ideal connection.

It is usually expressed as a ratio in dB relative to the transmitted signal power:

Where: is the power transmitted by the source is the power reflected by the source Return lose also is the negative of the magnitude of the reflection coefficient in dB.

29

Since power is proportional to the square of the voltage, it is given by: [22]

3.3 Methods Used to Solve Circuits In order to use Simulink in MATLAB to model the systems, we should at first calculate the ABC matrices using Kirchhoff’s Laws and State Space Form. 3.3.1 Kirchhoff’s circuit laws Kirchhoff’s circuit laws are two equations that deal with the conservation of charge and energy in electrical circuits. [23]

Kirchhoff’s current law (KCL) KCL: At any (junction) in an electrical circuit, the sum of currents introducing into that node is equal to the sum of currents extracted from that node, or the algebraic sum of currents in a network of conductors meeting at a point is zero. This principle can be stated as: [23]

Where n is the total number of branches with currents flowing towards or away from the node Normally, current is signed positive when its direction towards the node. Kirchhoff’s voltage law (KVL) KVL: The directed sum of the electrical potential differences around any closed loop is zero, in other words, the algebraic sum of the products of the resistances of the conductors and the currents in them in a closed loop is equal to the total emf available in that loop. [23]

3.3.2 State space form State space refers to the space whose axes are state variables. A state space form provide the dynamics as a set of first-order differential equations in a set of internal variables known as state variables, together with a set of algebraic equations that combine the state variables into physical output variables. To extract from the number of inputs, outputs and states, the variables are expressed as vectors. Additionally, if the dynamical system is linear and time invariant, the differential and algebraic equations may be presented in matrix form. The state space representation provides a convenient and compact way to model and analyze systems with multiple inputs and outputs. The state variables are an internal interpretation of the system which completely characterizes the system state at any time . [24] 30

The most general state-space representation of a linear system with inputs, outputs and state variables is written in the following form: [24]

Where: is called the state vector is called the output vector is called the input vector is the state matrix is the input matrix is the output matrix is the feedthrough matrix, in cases where the system model does not have a direct feedthrough, Is the zero matrix

is the differential equation of ,

31

32

4 MODELING METHODS

4.1 Simple Circuit Solution To find out the ABC-matrix which will be used in MATLAB, we need to apply state space form to solve the transmission line. Transmission line can be modeled based on state space method. It provides a method with the exact accuracy to effectively calculate the state space models. In this case, the number of state variables is equal to the number of independent energy storage elements in the system. In the following circuits, except the last one, there are two independent energy storages, the capacitor which stores energy in an electric field and the which stores energy in . The state variables are and . The energy storage elements of a system make the system dynamic. The flow of energy into or out of a storage element occurs at a finite rate and is presented by a differential equation. So the vector of the inductor’s current and capacitor’s voltage can be expressed as the state vector , denotes the vector of source voltage and is the vector of output voltage. The matrices and are properties of the system and determined by the system structure and elements. The matrices and are determined by the particular choice of output variables.

Damped harmonic oscillation phenomenon When we used MATLAB and OpenModelica to model the lossless cable, we applied the LC-circuit to these modeling languages. And there will be a special phenomenon appears in the results.

Figure 4.1, One section of lossless cable in model

In the results, electric charge oscillates back and forth just like the position of a mass on a spring oscillates, in other words, damped harmonic oscillation, the amplitude vibrates at its eigenfrequency.

33

Figure 4.2, Damped harmonic oscillation

Angular oscillation frequency can be calculated by: [37]

Where is the inductance in each section,

is the capacitance in each section,

The value of eigenfrequency will be influenced by the number of sections, the greater the number of sections, the greater the eigenfrequency will be. So we prefer to use a large set of sequences to achieve more precise results when making the models in MATLAB and OpenModelica.

4.1.1 Lossless transmission line terminated in open-circuit Suppose we have three sections in this circuit, and for convenience, we assumed the value of and are constant along the line.

Figure 4.3, Circuit of 3-section transmission line terminated in open

34

First, we applied Kirchhoff’s current law (KCL) to three nodes to get equations which are related to current. And assume the direction current flow toward the node is positive. KCL says that the net current outflow vanishes at any vertex of the graph.

The current of capacitor is equal to .

At node ①: (4.1)

At node ②: (4.2)

At node ③: (4.3)

Then we applied Kirchhoff’s voltage law (KVL) to three loops to get equations related to voltage. The voltage of capacitor is equal to .

In loop I: (4.4)

In loop II: (4.5)

In loop III: (4.6)

Rearrange equations (4.1), (4.2), (4.3), (4.4), (4.5), (4.6) to put the derivative of the state variables , on the left side. ,

(4.7)

(4.8)

(4.9)

(4.10)

(4.11)

(4.12)

We can also write as state space representation:

35

The results matrices A, B, C, D are:

From the above matrixes, it can be concluded that nth elements has:

A = B =

C = D = 0

4.1.2 Lossless transmission line terminated in short-circuit

Figure 4.4, Circuit of 3-section transmission line terminated in short

36

In this circuit, the current flow out will not pass , it will directly enter the short line. This circuit can be transforms to the following equivalent circuit.

Figure 4.5, Circuit of 3-section transmission line terminated in short

Then we used the same method to get A, B, C, D matrix.

At node ①: (4.13)

At node ②: (4.14)

In loop I: (4.15)

In loop II: (4.16)

In loop III: (4.17)

Rearrange equations (4.13), (4.14), (4.15), (4.16), (4.17) to put the derivative of the state variables , on the left side. ,

(4.18)

(4.19)

(4.20)

(4.21)

(4.22)

The results matrices A, B, C, D are:

37

From the above matrixes, it can be concluded that nth elements has:

A = B =

C = D = 0

4.1.3 Lossless transmission line terminated in matched load

Figure 4.6, Circuit of 3-section transmission line terminated in matched load

At node ①: (4.23)

At node ②: (4.24)

At node ③: (4.25)

In loop I: (4.26)

38

In loop II: (4.27)

In loop III: (4.28)

Rearrange equations (4.23), (4.24), (4.25), (4.26), (4.27), (4.28) to put the derivative of the state variables , on the left side. ,

(4.29)

(4.30)

(4.31)

(4.32)

(4.33)

(4.34)

The results matrices A, B, C, D are:

From the above matrixes, it can be concluded that nth elements has:

A = B =

C = D = 0

39

4.1.4 Lossy transmission line

Suppose the circuit consists of these components: source voltage V, inductance , , , resistance , , , , capacitance , , and conductance , , .

Figure 4.7, Circuit of 3-section lossy transmission line terminated in open

The total current at node ② is equal to the sum of current at node ①, and the direction of current are opposite:

(4.35)

The same situation for node ③ and ④

(4.36)

At node ⑤: (4.37)

In loop I: (4.38)

In loop II: (4.39)

In loop III: (4.40)

Rearrange equations (4.35), (4.36), (4.37), (4.38), (4.39), (4.40) to put the derivative of the state variables , on the left side. , , ,

(4.41)

(4.42)

(4.43)

(4.44)

40

(4.45)

(4.46)

The results matrices A, B, C, D are:

From the above matrixes, it can be concluded that nth elements has:

A = B =

C = D = 0

4.1.5 Two different lossless cables connected

Figure 4.8, Circuit of two 3-section lossless transmission lines connected

There are six sections in this circuit, the form three sections have the same elements

41

and they are different with the last three sections. Suppose ,

, , . The state variables are ,

, , .

At node ①: (4.47)

At node ②: (4.48)

At node ③: (4.49)

At node ④: (4.50)

At node ⑤: (4.51)

At node ⑥: (4.52)

In loop I: (4.53)

In loop II: (4.54)

In loop III: (4.55)

In loop IV: (4.56)

In loop V: (4.57)

In loop VI: (4.58)

Rearrange equations (4.51) (4.58) to put the derivative of the state variables , on the left side

(4.59)

(4.60)

(4.61)

(4.62)

(4.63)

(4.64)

(4.65)

(4.66)

42

(4.67)

(4.68)

(4.69)

(4.70)

We can also write as state space representation:

The results matrices A, B, C, D are:

43

When the output voltage is the voltage of the last capacitor of the first cable:

When the output voltage is the voltage of the last capacitor of the last cable:

From the above matrixes, it can be concluded that nth elements has:

A= B =

44

D = 0

4.2 MATLAB Modeling and Simulat1ion MATLAB MATLAB is a software package for high performance computation and visualization. The combination of analysis capabilities, flexibilities, reliability and powerful graphics makes MATLAB the premier software package for engineers and scientists. MATLAB provides an iterative environment with mathematical functions. These functions provide solution to a broad range of mathematical problems including: Matrix Algebra, Complex Arithmetic, Linear Systems, Differential Equations, , Optimization and other types of scientific computations. [23]

Simulink Simulink is an environment for multidomain simulation and Model-Based Design for dynamic and embedded systems. The system may be both linear and nonlinear; they can also be continuous or discrete. It provides an interactive graphical environment and a customizable set of block libraries that let you design, simulate, implement, and test a variety of time-varying systems, including communications, controls, signal processing, video processing, and image processing. [24] In this paper, we used Simulink® which is offered as a toolbox in the MATLAB to simulate different type of cables. And we modeled these transmission lines with the state space parameters which we have calculated.

Figure 4.9, Normal electrical circuit model

45

Figure 4.10, Parameters for step voltage

In this model, we assumed the input voltage as step-voltage and its final value is 1 . It connected with two state-space blocks which transfer the original signal to input signal and output signal with different value of C. Since C is decided according to which output voltage we choose. The Clock block outputs the current simulation time at each simulation step. It displays and provides the simulation time. Normally, the time period we use is between 0 and 2 10-6s. Then we combined this model with the MATLAB codes. We defined the representation of matrixes A, B, C, D and set stop time to make the specified Simulink model to be executed. Last, we plotted the figure with the signals transmitted with time in voltage amplitude.

For lossless cable RG58, the capacitance equals to 101 10-12 F/m and the inductance equals to 252 10-10 H/m. And for lossless cable RG59, capacitance is 67 10-12 F/m and inductance is 376 10-9 H/m.

For lossy cable in different conditions, values we set the same capacitance and inductance as cable RG58. In Heaviside condition, the value of resistance and conductance are 0.2Ω and respectively. In low loss condition, resistance and inductance are equal to 252 10-6Ω and 101 10-8 S. Furthermore, we run all the models with the number of sections 200.

Figure 4.11, Solver options in MATLAB 46

For numerical method in Simulink, MATLAB has several for different systems. As we did in course Modeling and Verification, ode45, the default solver in MATLAB, is good enough to calculate this system. Ode45 is automatic step size Runge-Kutta-Fehiberg integration methods, using a 4th and 5th order pair for higher accuracy. [38]

4.3 MODELICA Modeling and Simulation MODELICA MODELICA is a non-proprietary, object-oriented, equation based language to conveniently model complex physical systems containing, e.g., mechanical, electrical, electronic, hydraulic, thermal, control, electric power or process-oriented subcomponents. MODELICA is a modeling language rather than a conventional programming language. MODELICA is designed to be domain neutral and, as a result, is used in a wide variety of applications, such as fluid system, automotive applications and mechanical systems. [25]

OPENMODELICA OpenModelica is an open-source MODELICA-based modeling and simulation environment intended for industrial and academic usage. The goal of the OpenModelica project is to create a complete MODELICA modeling, compilation and simulation environment based on free software distributed in binary and source code form. [26] In OpenModelica, there exist many electrical components. We can connect them and form the circuit.

Figure 4.12, Oline in MODELICA

Figure 4.13, Inner components of Oline

47

As can be seen from Figure 4.13, the lossy transmission line Oline consists of series of resistances, , conductance and . To get a symmetric line model, there are and inductors in both beginning and end positions. Since the inside components of Oline are terminated with an inductance, we need to connect a capacitance to node p2 when connecting circuit for Lossless cable. So we can treat it as a cable by setting some parameters to it. Following are the circuits we connected for different cables in OpenModelica.

Figure 4.14, Circuit model for open-terminated coaxial cable

Figure 4.15, Circuit model for short-terminated cable

48

Figure 4.16, Circuit model for matched-load

Figure 4.17, Circuit model for two coaxial cables

As we want to compare the results from MATLAB and OpenModelica, we should make them in same situations. Therefore, the properties of step voltage are same as that in MATLAB. Here are the basic parameters of inductance and capacitance in Olines in MODELICA, which are also exactly the same as what we used in MATLAB. The first one is for RG58 and second is for RG59 cable.

Figure 4.18, Properties of the Olines in Model of MODELICA for Lossless Transmission Line 49

As an additional capacitor, which is also regarded as an element, is terminated at the end, we should use 199 elements in Oline to make the sections the same as MATLAB.

For Lossy Transmission Line, as to make it the same as the circuit model we used in MATLAB, we should add a capacitor and conductor parallel across the Oline and ground like the graph below.

Figure 4.19, Circuit model for lossy cable

The following two tables describe the properties of the components we used in two conditions. The left one is for Heaviside condition and the right is the one in Low loss condition, both of which we will explain in details in the Analysis part later.

Figure 4.20, properties for Lossly Cable modeling in Oline at MODELICA

In Simulation on OpenModelica, we tried different Integration Methods such as dassl, dassl2, rungekutta and euler. By comparing the results, we choose the differential algfebraic system solver, dassl, as the numerical method for OpenModelica modeling.

50

Because we think the figures got from this default method is good enough.

Figure 4.21, Simulation method in OpenModelica

In order to get model more smooth curve instead of zigzag ones, we changed the value of Tolarance to 0.000001, which can be seen in Figure 4.21. Besides, from the previous modeling, we know that time period 2 10-6s is sufficient and on the other hand it also should be same as that of MATLAB simulation.

51

52

5 VERIFICATION AND ANALYSIS

In this part, the verification and analysis on results from MATLAB and MODELICA will be discussed in terms of Lossless Coaxial Cable and Lossy Coaxial Cable separately via different perspectives.

5.1 Lossless Coaxial Cable For Lossless Cables, We analyze the simulation results on Propagation Time and Reflection Coefficient, which will be explained in detail within this section on the basis of theories and graphs.

5.1.1 Propagation Time Supposed a RG58 cable is connected by a RG59 cable in a circuit, MATLAB and MODELICA are used to model this circuit condition to plot the voltage figures corresponding to different capacitance, considered as the three specific nodes in the transmission process, to check the signal propagation time in these two types of cables. Theoretical Calculation of Propagation Time Coaxial cable serves as the transmission line to carry RF signals, the time it takes for a signal to travel from one end of the cable to the other is usually presented as smaller units such as milliseconds, microseconds, or nanoseconds, since RF signals travel so fast. The time delay can be considered as following:

Figure 5.1, Signal propagation time through a cable

The propagation time, in other words, the difference between and is:

Where: is the time signal enters cable (seconds)

is the time signal exits cable (seconds) is the length of cable (meters)

and is the velocity of factor (meters/second)

53

c is the speed of light (meters/second) v is the (meters/second), which we have mentioned in previous part.

These two tables below show the parameters and calculated velocities of RG58 and RG59, in whose light, the theoretical values of propagation time can be calculated with the formula given above.

Table 5.1, Parameters for lossless cable RG58

Length Inductance Capacitance Impedance ( ) (L) (C) ( )

100 m 252 10-9 H/m 101 10-12 F/m 50 Ω 1.98216 108 m/s

Time delay for this type of cable (RG58) can be regarded approximately as

504.5 ns

Table 5.2, Parameters for lossless cable RG59

Length Inductance Capacitance Impedance ( ) (L) (C) ( )

25 m 376 10-9 H/m 67 10-12 F/m 70 Ω 1.99236 108 m/s

According to the data in Table 5.2, we can get the propagation time of RG59 is

125.48 ns

Time Delay Analysis in MATLAB In MATLAB, we simulated a two connected cables model and obtained graphics of the voltage for the very beginning and the last capacitors of the first cable RG58 and that for the very last capacitor in the second cable RG59 in time direction. We can mark points where waves begin to flow into the corresponding capacitors so that the values of time for each line are easily to find. To show the wave propagation in different nodes of cables more clearly, we plotted the outcome figures respectively.

54

Figure 5.2, Simulation result of the input signal (x:Voltage, y:Time)

Figure 5.3, Simulation result of signal at middle point (x:Voltage, y:Time)

Figure 5.4, Simulation result of signal at the end (x:Voltage, y:Time)

The red line represents the signal passing the very first capacitor in RG58 cable, considered to be the input signal. And the green curve describes the voltage crossing

55

the terminator end of RG58, which is come out from the connection node between RG58 and RG59, while the blue wave shows signal in the last capacitor of RG59 cable, known as the signal output at the end. In the model, when two coaxial cables connect together, the incident wave (red line) will occur two times reflection, the green line reflects once, and the amplitude and time interval for reflection is similar to the second reflection of the red one. The red, green and blue lines will finally concentrate to 1V which is the value of source voltage.

Figure 5.5, Result for the voltage of capacitors in different positions (x:Voltage, y:Time)

We marked the first impulse points of these three curves to see the time (x-axis) when the signal arrives at them the first time. x1 = 3.797 ns, x2 = 515 ns, x3 = 640.7 ns,

Δt1 = 515 – 3.797 = 511.203 ns, Δt2 = 640.7 – 515 = 125.7 ns

Δt1 is the time delay for cable RG58 and Δt2 is the propagation time for cable RG59.

Time Delay Analysis in MODELICA In MODELICA, we cannot mark the point in the figure like what we did in MATLAB part. Although, since we knew the voltage values of the points we took from MATLAB, we can zoom in the area of these points to show more precise value of the voltage and time. The following curves gotten from MODELICA show input signal, signal come out from the connection node between RG58 and RG59 cables and the signal out of from end with the same colors as those in MATLAB.

56

Figure 5.6, Modeling result from MODELICA (x:Voltage, y:Time)

According to Figure 5.6, we estimated time values (x-axis) of the points: x1 = 6.87 ns, x2 = 518.28 ns, x3 = 649.1 ns,

Δt1 = 518.28 – 6.87 = 511.41ns, Δt2 = 649.1 – 518.28 = 130.82 ns, where Δt1 is the time delay for cable RG58 and Δt2 is the propagation time for cable RG59.

Comparison and Verification We made a form to compare the values of Propagation Time in Theoretical Calculation, MATLAB and MODELICA like this.

Table 5.3, Propagation time of different cable calculated by different methods

Cable Theoretical MATLAB MODELICA

Time

Delay RG58 504.5ns 511.203ns 511.41ns

RG59 125.48ns 125.7ns 130.82ns

In line with Table 5.3, we can see it is very clear that the values of time delay, given by Theoretical Calculations via cables’ parameters, simulation in MATLAB and modeling in MODELICA, are very close. Although there are some slight differences, generally they are so small that the errors can be neglected. Thus, validated, the results are proved to be correct.

57

5.1.2 Reflection Coefficient and Analysis We use RG58 as an example; consider that a RG58 cable is terminated in some typical conditions. With the aid of MATLAB and MODELICA, we can just plot the incident waves to verify their reflection coefficients and discuss the wave propagations. It is possible to find the amplitude of initial signal and voltage after reflection from the following figures.

RG58 cable in open circuit The graphs of the input signal at the very beginning of cable RG58, given by MATLAB and MODELICA, are brought forward.

Figure 5.7, Input signal in open-circuit condition simulated by MATLAB (x:Voltage, y:Time)

Figure 5.8, Input signal in open-circuit condition simulated by MODEILCA (x:Voltage, y:Time)

We have mentioned eigenfrequency in chapter 4.1. In RG58 cable, H/m, F/m, the length of cable 58

equal to 100m, and there are 200 elements inside the cable, then we can calculate the eigenfrequency:

rad/s

rad/s

In MATLAB and MODELICA, the incident waves float near 0.5V, and then they jump and fluctuate near 1V, which is caused by the reflection from end point. The reflection coefficient is:

Where represents the voltage of incident wave and is the voltage of reflected wave. In this condition, reflection coefficient equals to 1, VSWR is 0 and return loss is 0, which means all the energy is be reflected and it causes maximum losses. Then we took the time periods before the waves begin to reflect back towards in light of the figures above:

Table 5.4, Propagation time it takes before the wave reflected back

Reflection Starting MATLAB MODELICA Time

Δt 1016.954 ns 1019.935 ns

The time it takes before the reflection starting is equal to that for signal to travel round the cable, which is double of delay time. And in RG58, time delay is 504.5 ns, so as a result, the theoretical result is about 1009 ns, which is very close to both the results from MATLAB and MODELICA.

RG58 cable in short circuit Here shows the figures of the input signal coming into cable RG58, which is connected to a short end.

59

Figure 5.9, Input signal in short-circuit condition simulated by MATLAB (x:Voltage, y:Time)

Figure 5.10, Input signal in short-circuit condition simulated by MODELICA (x:Voltage, y:Time)

According to the graphics, incident wave floats near 0.5V, and then it diminishes to zero. The reflection coefficient is:

In this condition, reflection coefficient equals to -1, VSWR equals to 0 and return loss is 0. It is similar to the open-circuit condition, all the power is reflected and it has maximum losses. When the transmission line is terminated in open circuit or with a short end, the power reaching the end of the line is reflected back toward the source. In both of these two conditions, the reflected voltage are equal to 0.5 V. And in open circuit, the reflected voltage wave is in phase with the incident voltage wave at the plane of the load. Besides, in short-circuit condition, voltage at the end of the line goes to zero, and the incident voltage disappears at the short. The reflected voltage wave is equal in 60

magnitude to the incident voltage wave and be 180 degrees out of phase with it at the plane of the load.

RG58 cable with matched load Figure 5.11 and Figure 5.12 represent that signal waves at beginning of RG58 connected with a 50 Ohm load.

Figure 5.11, Input signal in matched load condition simulated by MATLAB (x:Voltage, y:Time)

Figure 5.12, Input signal in matched load condition in MODELICA (x:Voltage, y:Time)

In above figures, curves always float near 0.5V. It is very clear that the reflection coefficient is 0 and VSWR is 1, while return loss will be infinite. It indicates there is no reflection in matched load. All the power is transmitted. When the transmission line is linked to its characteristic impedance, no reflected signal occurs, as what we can see from the figure above, and the power is transferred outward from the source until it reaches the load at the end, where it is completely absorbed. As a result, although there is some impulse and , no standing waves will be developed along the line. The voltage through the line remains a constant, half of the source.

61

RG58 cable connected by RG59 The figures of this situation have already been showed in previous part 5.1.1. Now we just separate the input signal lines from both MATLAB and MODELICA.

Figure 5.13, Input signal simulated by MATLAB (x:Voltage, y:Time)

Figure 5.14, Input signal simulated by MODELICA (x:Voltage, y:Time)

As can be seen from the figures, in this case, the incident wave jumps twice. And the same as what we found before, the periods it takes before the reflections begin are double of these two cable’s delay time. In the course Modeling and Verification, we did the measurement on the two-cable-connected condition in laboratory. By using CSV format files to save the data from , we plot the result of input signal in the system in MATLAB as following. When we focus on the reflections, they increase smoothly instead of jumping immediately. So we mark the time points when they start to rise. The first point represents the step impulse time.

62

Figure 5.15, Input signal result from the experiment (x:Voltage, y:Time)

In the measurement result above, the curve is almost smooth any time even if it has some noises while there are severe vibrations at every impulse in the previous two graphs from MATLAB and OpenModelica . The reason is that we separate the circuit into many sections of inductor and capacitor which may lead to eigen frequency, which we have already explained in chapter 4.1 and chapter 5.2.1. When calculating the first reflection coefficient, we can regard the characteristic impedance of the second cable which is 75 Ω as a load. Then the reflection coefficient will be:

Since the last cable is terminated in open-condition, the second reflection coefficient equals to 1. Then we can process the data values and calculate time periods before the first reflections and second reflections, as well as the first and second reflection coefficients in Theoretical way, MATLAB and MODELICA.

Table 5.5, data calculated by different methods

Sencond First reflection Second reflection First reflection Method reflection interval interval coefficient coefficient

Theoretical 1009 ns 250.96 ns 0.2 1

MATLAB 1018.203 ns 250 ns 0.218 1.02

MODELICA 1022.37 ns 275.38 ns 0.218 1.02

Experiment 1033 ns 275 ns 0.15 0.67

63

It is obvious that all these values at the same line of first three rows are very similar to each other so that we can conclude that modeling results from MATLAB and OpenModelica are almost correct. Moreover, in Experiment results, the time periods are close to the Theoretical values although there are some disparities, since they are just about 20 ns (10-9s) which are such small. However, the first and second reflection coefficients of measurement results are both around 30% less than the theoretical answers respectively. We think this phenomenon may be caused by the loss in the real cables for they are not ideal as well as interferences around.

RG58 with different load Next, we want to study how the load the cable is terminated with affects on the reflection. We illustrate two conditions which the RG58 cable is end with 20 ohm resistor and 70 ohm resistor.

Figure 5.16, Input signal when RG58 cable terminated with 20 ohm resistor (x:Voltage, y:Time)

Figure 5.17, Input signal when RG58 cable terminated with 70 ohm resistor (x:Voltage, y:Time)

64

From these two curves, we can easily find that, when the terminating resistance is not equal to its characteristic impedance which is 50 Ohm here, the termination absorbs only part of the power reaching it. And the remainder goes back along the line toward the source. By comparing Figure 5.16 and Figure 5.17, we found the amplitude decreased more in Figure 5.16 than it jumped in Figure 5.17. It indicates that the more the terminating resistance differs from characteristic impedance, the larger the percentage of the incident power that is reflected. When the terminating resistance is less than the characteristic impedance, the reflected wave is 180 degrees out of phase with the incident wave at the plane of the load, and it is in phase with the incident voltage wave at the plane of the load in opposite way.

5.2 Lossy Coaxial Cable For the lossy cables, we will assume some parameters which are derived based on RG58 cable and analyze the propagation constant in some specific conditions. To simplify the modeling system, we assumed the values of both additional resistance and conductance are constant.

5.2.1 Propagation constant The propagation constant of an electromagnetic wave is a measure of the change undergone by the amplitude of the wave as it flows in a given direction. The quantity measured, such as voltage, is expressed as a sinusoidal . The phase of the sinusoid varies with distance which contributes the propagation constant being a , the imaginary part being caused by the phase change. [29] The general propagation constant of a lossy line is:

Where describes the signal attenuation, and describes the wave propagation along the line. From the definition of wavenumber [29]:

Where is wavelength Then the wave phase velocity can also be expressed as:

The propagation constant will have the following solutions when the values of resistance and conductance are under these two conditions.

Low loss transmission line In low loss transmission line, assume and and we can get the value of and in this condition.

65

(5.1)

(5.2)

(5.3)

(5.4)

(5.5)

Since and , then we can ignore the value of :

(5.6)

Then we can make a Taylor series expansion, which is:

(5.7)

When is tend to zero, then it can be expressed as

We set , and apply the Taylor series equation to equation (5.6):

(5.8)

(5.9)

(5.10)

(5.11)

Where is the characteristics impedance when

And equate real and imaginary parts in equation (5.11) to give:

(5.12)

(5.13)

The propagation velocity of the wave

Distortionless transmission line If the different frequencies that comprise a signal travel at different velocities, that signal will arrive at the end of a transmission line distorted. We call this phenomenon

66

signal . In an opposite way, if the phase velocity is independent of frequency, then no dispersion will occur. Heaviside found that a transmission line would be distortionless if the line parameters exhibited the following ratio [30]:

The complex propagation constant can be expressed as:

(5.14)

(5.15)

Since , propagation constant can be rewritten as:

(5.16)

Thus real and imaginary parts are:

(5.17)

(5.18)

The propagation velocity of the wave

The propagation velocity is independent of frequency, so this lossy transmission line is not dispersive.

Typically , and to make a line meet the Heaviside condition the four primary constants need to be adjusted. G could be increased, but this is highly undesirable since G will have significant influence in the loss. Decreasing R is sending the loss in right direction, but this is still not a satisfactory solution since it makes the cable much more bulky and cost much. Decreasing C also makes the cable more bulky but is not so costly as increasing the copper content. This leaves increasing L which is the usual solution adopted. It is achieved by adding series inductors periodically along the transmission line. [30]

5.2.2 Lossy coaxial cable verification for 2 conditions We use MATLAB and MODELICA to analyze lossy cable in 2 specific conditions: Heaviside condition and low loss approximation.

Heaviside condition Consider a cable has the following parameters.

67

Table 5.6, Parameters for a lossy cable which fulfill Heaviside condition

Length Inductance Capacitance Impedance Resistance Conductance Velocity ( ) (L) (C) ( ) (R) (G)

252 10-9 101 10-12 50 Ω 0.2 Ω C 100 m 1.98216 108 m/s H/m F/m

Propagation Time for this kind of cable can be calculated,

504.5 ns

Figure 5.18, Simulation result from MATLAB in Heaviside condition (x:Voltage, y:Time)

Figure 5.19, Modeling result from MODELICA in Heaviside condition (x:Voltage, y:Time)

The upper figures indicate there is no dispersion occurs when C, L, G, R has this

relation:

68

Unfortunately, this ideal property lossy cable does not exist since the R, L, G and C are sufficiently frequency dependent. The figures show that the speed of propagation is the same for all angular frequency. Time delay for this condition is equal to lossless condition which is 504.5ns. From the figure, we can see that the output signal arrive about 0.7V in the end and the final amplitude of the input signal is little higher than the output signal. There are some losses in this kind of cable. The shape of the signal with respect to position remains constant although it gradually gets smaller with the attenuation. And we can calculate attenuation through :

.

Further, we can calculate the value of gain and the number of dB loss of that cable over a length l00m:

In MATLAB and MODELICA, the source voltage is 1V. Then we put all the results that have been calculated above into the form to contrast outcomes in different method.

Table 5.7, Results concluded in Heaviside condition

Methods Theoretical MATLAB MODELICA

Time delay 504.5 ns 469.6 ns 469.3 ns

LossdB 3.474 dB 3.462 Db 3.533 dB

In the line with Table 5.7, the numbers in each rows are close to each other which can be considered as they are mostly correct.

Low loss coaxial cable ( and ) Consider a lossy cable has the following parameters:

69

Table 5.8, Parameters for a lossy cable which fulfill Low loss approximation

Length Inductance Capacitance Impedance Resistance Conductance Velocity ( ) (L) (C) ( ) (R) (G)

100 m 252 10-9 101 10-12 50 Ω 252 10-6 101 10-8 S 1.98216 108 m/s H/m F/m Ω

Time delay for this kind of cable can be calculated,

Figure 5.20, Simulation result from MATLAB in low loss condition (x:Voltage, y:Time)

Figure 5.21, Modeling result from MODELICA in low loss condition (x:Voltage, y:Time)

In upper two figures, the amplitude of the output signal almost arrives about 1V. The losses are so slight that we cannot find from the figures. Since the value of resistance and conductance are very small, the effect of these two components is very slight on the wave propagation and signal attenuation.

70

Under and condition, the attenuation coefficient:

.

The same as what we did before, we made a table to integrate the data.

Table 5.9, Results concluded for low loss condition

Methods Mathematics MATLAB MODELICA

Time delay 504.5 ns 465.6 ns 465.33 ns

0.024 dB 0 dB 0 dB

It is clear that every row has three similar values. Therefore, we can obtain the conclusion that according to verification, the results are almost correct.

5.2.3 Analysis for lossy cable in other conditions Following conditions are dispersion phenomenon, which signal arrives at the end of transmission line distorted. Dispersion can be a problem if the lines are very long and just a small difference in phase velocity can result in significant difference in propagation delay. The values of length, L and C we set to run MODELICA are the same as RG58 cable.

Figure 5.22, Result from MODELICA when R=0.5 and G is negligible (x:Voltage, y:Time)

When R is not very small and neglects the value of G, this kind of loss is result from the skin effect. This causes sharp edged pulses to become rounded and distorted. We

71

can find that the attenuation is very slight in this condition since the output signal finally arrive 1V in the end.

Figure 5.23, Simulation result from MODELICA when R=0.5 and G=0.00005 (x:Voltage, y:Time)

When conductance is added, the line has significant losses even the value of G is very small since it has both skin-effect losses and dielectric losses. The contribution of addition conductance to the losses is very obvious. The output signal does not overlap the input signal at the end. And it also has the dispersion phenomenon.

Figure 5.24, Simulation result from MODELICA when R=0.05 and G=0.0002 (x:Voltage, y:Time)

In this case, the cable has both resistor and conductor components, and the value of conductor is a little bigger than the former conditions, but the waves have a huge difference with the former conditions. The former condition waves increase gradually, then stop at some point and propagate smoothly. In this condition, the waves decrease gradually, then stop at some point and propagate smoothly. Even the value of resistance is less than the former conditions, it has more losses. It reveals that the dielectric losses influence the attenuation more easily.

72

6 CONCLUSION

At first, comparing the results from modeling simulation between MATLAB and OpenModelica we have shown in previous parts, they are very closed to each other separately. And we achieve our goals and requirements on studying on the propagation time of the voltage waves, the signal amplitudes and reflections in the coaxial cables. Thus, we can say the project has been finished properly as the behaviors shown by the modeling from two types of software and theoretical answers are essentially the same. Secondly, about convenience and time used. The way that MATLAB and Simulink model the cable is more complicated when compared with MODELICA. In MATLAB and Simulink, we need to first solve the transmission line circuit and find the matrix of ABC-model. But in MODELICA, we can connect the components to form the circuit and plot the figure which describe the performance of wave in different components, which is a more simple and convenient than MATLAB. Though the results MODELICA achieved is not exactly the same as the results from MATLAB, the difference between them is very tiny and normally we can neglect it. So the precision of MODELICA is reliable. For the time the software took to run the simulation, e.g. when we modeled the lossless cable terminated in open-circuit. MATLAB took 13.948832 seconds to run the program, while OpenModelica took 5 minutes and 34.7 seconds to process the model. It is very obvious that OpenModelica spent much more time on running the program than MATLAB. Even though, as what we discussed before, it also took much time for us on calculating the ABC matrices, making simulink and typing the code to build models when we applied MATLAB. So we can regard the time MATLAB and OPENMODELICA spend are similar. Since a cable consists of a high number of lumped elements, we need to set the number of element in these two kinds of software. We can set the number up to 1000 for MATLAB, while it will be hard for computer to run the program when the number is set beyond 250 for MODELICA. MODELICA is a very new modeling language and it is just developed recently, who still has a great room to improve. For the version “OpenModelica-1.8.0”, it can only run 12 elements as maximum, whereas for the latest version which was issued 6 months later, it can run up to 250 elements. We think the developers will make it more and more in the future. Price is also very important for users. For the official price of MATLAB & Simulink Student Version is 89 USD while OpenModelica is totally free and all things that we mentioned before, OpenModelica is a software that worthy looking forward to. In our thesis project, we only study on a special transmission line: coaxial cable with short length. But when the lines have long distance especially the structure and a higher frequency signal line with large intensity, may occur. In addition, 73

since there are various kinds of transmission line as what we have mentioned in Background part, all of which have distinct features to separate with each other, as well as some other common one which are also proverbially applied such as 3 -phase transmission lines.

74

REFERENCE

[1] Wikipedia, “Coaxial cable” http://en.wikipedia.org/wiki/Coaxial_cable [2] Glenn Elmore, “Introduction to the Propagation Wave on a Single Conductor”, Corridor System Inc., 20090727. [3] Tech-FAQ, “RG-58” http://www.tech-faq.com/rg-58.html [4] Tech-FAQ, “RG-59” http://www.tech-faq.com/rg-59.html [5] Tom Gresham, “History of Matlab”, eHow Contributor, June 29, 2011 http://www.ehow.com/info_8665330_history-matlab.html [6] Rob Schreiber, “MATLAB”, Scholarpedia, 2007 http://www.scholarpedia.org/article/MATLAB [7] Peter Fritzson, “Principles of object-Oriented Modeling and Simulation with Modelica 2.1”, ISBN-0-471-47163-1, February 2004, Wiley-IEEE Press [8] Wikipedia, “Modelica” http://en.wikipedia.org/wiki/Modelica [9] Peter Fritzson, “Introduction to Modelica”, September 3, 2001 [10] Peter Fritzson, Peter Aronsson, Håkan Lundvall, Kaj Nyström, Adrian Pop, Levon Saldamli, David Broman, “The OpenModelica Modeling, Simulation and Development Environment”, Linköing University, Computer Science Dept. [11] Wikipedia, “Transmission line” http://en.wikipedia.org/wiki/Transmission_line [12] Prof.Dr.Sandro M.Radicella, Pro.Dr.Ryszard Struzak, “Radio Laboratory Handbook 2004”, chapter 2: Transmission Line [13] “Transmission line analysis for a coaxial system” http://www.rfcables.org/articles/14.html [14] Wikipedia, “Electrical resistance and conductance” http://en.wikipedia.org/wiki/Electrical_resistance_and_conductance [15] Wikipedia, “Telegrapher’s equation” http://en.wikipedia.org/wiki/Telegrapher's_equations [16] P.Coiner, “Calculating the Propagation delay of coaxial cable”, S&M department, 20110125 [17] Wikipedia, “Wave propagation speed” http://en.wikipedia.org/wiki/Wave_propagation_speed [18] “Electrical Characteristics of Transmission lines”, 20060126 [19] Wikipedia, “Reflections of signals on conducting lines” http://en.wikipedia.org/wiki/State_space_(controls) [20] Wikipedia, “Reflection coefficient” http://en.wikipedia.org/wiki/Reflection_coefficient [21] Wikipedia, “Standing wave ratio” http://en.wikipedia.org/wiki/Standing_wave_ratio

75

[22] “VSWR, Reflection coefficient, Return loss, s11/s22”, Signal Processing Group Inc., Technical memorandumRF-0909 [23] Wikipedia, “Kirchhoff’s laws” http://en.wikipedia.org/wiki/Kirchhoff's_circuit_laws [24] Wikipedia, “State space (controls)” http://en.wikipedia.org/wiki/State_space_(controls) [25] “Matlab”, Mathworks http://www.mathworks.se/products/matlab/ [26] “Simulink”, Mathworks http://www.mathworks.se/products/simulink/ [27] Wikipedia, “Modelica” http://en.wikipedia.org/wiki/Modelica [28] “OpenModelica” http://www.openmodelica.org/ [29] Wikipedia, “Propagation constant” http://en.wikipedia.org/wiki/Propagation_constant [30] Wikipedia, “Heaviside condition http://en.wikipedia.org/wiki/Heaviside_condition [31] Murray Thompson, “Transmission Lines”, Physics 623, Sept. 1,1999. [32] H. Riege, “HIGH-FREQUENCY AND PULSE RESPONSE OF COAXIAL TRANSMISSION CABLES WITH CONDUCTOR, DIELECTRIC AND LOSSES”, European organization for nuclear research, Proton Synchrotron Department, 4 Feb, 1970 [33] P. Fonseca, A.C.F. Santos and E.C. Montenegro, “A very simple way to measure coaxial cable impedance”, Instituto de Fisica, Universidade Federal do Rio de Janeiro [34] “Transmission lines”, University of Liverpool, PHYS370- Advanced [35] Mohazzab JAVED, Hussain AFTAB, Muhammad QASIM, Mohsin SATTAR, “RLC Circuit Response and Analysis (Using State Space Method)”, IJCSNS International Journal of Computer Science and Network Security, VOL.8 NO.4, April 2008 [36] Eric Bogatin, Mike Resso, Steve Corey, “Practical Characterization and Analysis of Lossy Transmission Lines”, DesignCon 2001, 2002 Agilent Technologies, Inc. [37] Richard Fitzpatrick, “Oscillations and Waves”, Professor of Physics, The Univeristy of Texas at Austin [38] “MATLAB Reference Guide”, COPYRIGHT 1984-93 by The MathWorks, October 1992

76

APPENDICES

Matlab file to model lossless RG58 cable terminated in open-circuit clear all close all n=200; CC=(101e-12)*100/n; L=(252e-9)*100/n; R=50; A=zeros((2*n),(2*n)); B=zeros((2*n),1); C=zeros(1,(2*n)); B((n+1),1)=1/L; C(1,n)=1; D=0; for i=1:n; A(i,(i+n))=1/CC; A((i+n),i)=-1/L; end; for i=1:(n-1); A(i,(i+n+1))=-1/CC; A((i+n+1),i)=1/L; end; A((n+1),(n+1))=-R/L;

C0=zeros(1,2*n); C0(1,1)=1; sim('short',0.000002); figure(1) plot(time,u0,'r'); hold on plot(time,u1,'g'); grid on,title('open circuit'); xlabel('time(s)'); ylabel('voltage(V)'); legend('input signal','output signal');

Matlab file to model lossless RG58 cable terminated in matched load: clear all

77

close all n=200; CC=(101e-12)*100/n; L=(252e-9)*100/n; R=50; A=zeros((2*n),(2*n)); B=zeros((2*n),1); C=zeros(1,(2*n)); B((n+1),1)=1/L; C(1,n)=1; D=0; for i=1:n; A(i,(i+n))=1/CC; A((i+n),i)=-1/L; end; for i=1:(n-1); A(i,(i+n+1))=-1/CC; A((i+n+1),i)=1/L; end; A(n,n)=-1/(R*CC); A((n+1),(n+1))=-R/L;

C0=zeros(1,2*n); C0(1,1)=1; sim('short',0.000002); figure(1) plot(time,u0,'r'); hold on plot(time,u1,'g'); grid on,title('matched circuit'); xlabel('time(s)'); ylabel('voltage(V)'); legend('input signal','output signal');

Matlab file to model lossless RG58 cable terminated in short-circuit: clear all close all n=200;

78

CC=(101e-12)*100/n; L=(252e-9)*100/n; R=50; A=zeros((2*n+1),(2*n+1)); B=zeros((2*n+1),1); C=zeros(1,(2*n+1)); B((n+1),1)=1/L; C(1,n)=1; D=0; for i=1:n; A(i,i+n)=1/CC; A(i,i+n+1)=-1/CC; A(i+n,i)=-1/L; A(i+n+1,i)=1/L; end;

A((n+1),(n+1))=-R/L;

C0=zeros(1,2*n+1); C0(1,1)=1; sim('short',2e-6); figure(1) plot(time,u0,'r'); hold on plot(time,u1,'g'); grid on,title('short circuit'); xlabel('time(s)'); ylabel('voltage(V)'); legend('input signal','output signal');

Matlab file to model a RG58 cable terminated in matched load clear all close all n=200; CC=(101e-12)*100/n; L=(252e-9)*100/n; R=50; A=zeros((2*n),(2*n)); B=zeros((2*n),1); C=zeros(1,(2*n));

79

B((n+1),1)=1/L; C(1,n)=1; D=0; for i=1:n; A(i,(i+n))=1/CC; A((i+n),i)=-1/L; end; for i=1:(n-1); A(i,(i+n+1))=-1/CC; A((i+n+1),i)=1/L; end; A(n,n)=-1/(R*CC); A((n+1),(n+1))=-R/L;

C0=zeros(1,2*n); C0(1,1)=1; sim('short',0.000002); figure(1) plot(time,u0,'r'); hold on plot(time,u1,'g'); grid on,title('matched circuit'); xlabel('time(s)'); ylabel('voltage(V)'); legend('input signal','output signal');

Matlab file to model a circuit which RG58 cable connected with RG59 cable: clc clear all close all n=400; A=zeros(2*n,2*n);

CC1=(101e-12)*100/n*2; L1=(252e-9)*100/n*2; CC2=(67e-12)*25/n*2; L2=(376e-9)*25/n*2; R=50; for i=1:1:(n/2-1);

80

A(i,i+n/2+1)=-1/CC1; end; for i=1:1:n/2; A(i,i+n/2)=1/CC1; end; for i=(n/2+1):1:n; A(i,i-n/2)=-1/L1; end; for i=(n/2+2):1:n; A(i,i-n/2-1)=1/L1; end; for i=(n+1):1:(3*n/2-1); A(i,i+n/2+1)=-1/CC2; end; for i=(n+1):1:3*n/2; A(i,i+n/2)=1/CC2; end; for i=(3*n/2+1):1:2*n; A(i,i-n/2)=-1/L2; end; for i=(3*n/2+2):1:2*n; A(i,i-n/2-1)=1/L2; end; A((n/2+1),(n/2+1))=-R/L1; A(n/2,(3*n/2+1))=-1/CC1; A((3*n/2+1),n/2)=1/L2; B=zeros(2*n,1); B((n/2+1),1)=1/L1;

C0=zeros(1,2*n); C0(1,1)=1;

C1=zeros(1,2*n); C1(1,n/2)=1;

C2=zeros(1,2*n); C2(1,3*n/2)=1;

D=0; clear CC1 clear CC2 clear L1 clear L2

81

clear R clear i clear n sim('coax',2e-6); figure(1) plot(time,input,'r'); hold on plot(time,y1,'g'); plot(time,y2,'b'); grid on,title('two coaxial cable'); xlabel('time(s)'); ylabel('voltage(V)'); legend('input signal','signal at middele','output signal');

Matlab file to model a lossy cable: clear all close all n=100; CC=(101e-12)*100/n; L=(252e-9)*100/n; R=50; R1=252e-6*100/n; G=101e-8*100/n; A=zeros((2*n),(2*n)); B=zeros((2*n),1); C=zeros(1,(2*n)); B((n+1),1)=1/L; C(1,n)=1; D=0; for i=1:n; A(i,i)=-G/CC; A(i,(n+i))=1/CC; A((i+n),i)=-1/L; end; for i=1:(n-1); A(i,(i+n+1))=-1/CC; A((i+n+1),i)=1/L; end;

82

for i=(n+2):2*n; A(i,i)=-R1/L; end; A((n+1),(n+1))=-(R+R1)/L;

C0=zeros(1,2*n); C0(1,1)=1; sim('endwith',0.000006); figure(1) plot(time,u0,'r'); hold on plot(time,u1,'b'); grid on,title('lossy cable'); grid on,title('lossy cable'); xlabel('time(s)'); ylabel('voltage(V)'); legend('input signal','output signal');

MODELICA notebook to model lossless RG58 cable terminated in open-circuit

model coaxcable

Modelica.Electrical.Analog.Lines.OLine oline1(r = 0, l = 2.52e-007, g = 0, c = 1.01e-010, length = 100, N = 199) annotation(Placement(visible = true, transformation(origin = {13.0751,50.3632}, extent = {{-12,-12},{12,12}}, rotation = 0)));

Modelica.Electrical.Analog.Basic.Resistor resistor1(R = 50) annotation(Placement(visible = true, transformation(origin = {-38.2567,50.8475}, extent = {{-12,-12},{12,12}}, rotation = 0)));

Modelica.Electrical.Analog.Basic.Ground ground1 annotation(Placement(visible = true, transformation(origin = {-72.6392,-39.7094}, extent = {{-12,-12},{12,12}}, rotation = 0)));

83

Modelica.Electrical.Analog.Sources.StepVoltage stepvoltage1(V = 1) annotation(Placement(visible = true, transformation(origin = {-72.6392,11.6223}, extent = {{-12,12},{12,-12}}, rotation = -90)));

Modelica.Electrical.Analog.Basic.Capacitor capacitor1(C = 1.01e-010) annotation(Placement(visible = true, transformation(origin = {60.5327,11.138}, extent = {{-12,12},{12,-12}}, rotation = -90))); equation connect(oline1.p3,ground1.p) annotation(Line(points = {{13.0751,38.3632},{13.5593,38.3632},{13.5593,-28.5714},{-72.6392,-28.5714},{-72.6392, -27.7094}})); connect(capacitor1.n,ground1.p) annotation(Line(points = {{60.5327,-0.861985},{61.0169,-0.861985},{61.0169,-28.5714},{-72.6392,-28.5714},{-72.6 392,-27.7094}})); connect(oline1.p2,capacitor1.p) annotation(Line(points = {{25.0751,50.3632},{61.0169,50.3632},{61.0169,23.138},{60.5327,23.138}})); connect(resistor1.n,oline1.p1) annotation(Line(points = {{-26.2567,50.8475},{0.484262,50.8475},{0.484262,50.3632},{1.07506,50.3632}})); connect(stepvoltage1.n,ground1.p) annotation(Line(points = {{-72.6392,-0.377724},{-72.6392,-0.377724},{-72.6392,-27.7094},{-72.6392,-27.7094}})); connect(resistor1.p,stepvoltage1.p) annotation(Line(points = {{-50.2567,50.8475},{-73.1235,50.8475},{-73.1235,23.6223},{-72.6392,23.6223}})); end coaxcable;

MODELICA notebook to model lossless RG58 cable terminated in short-circuit:

model short

Modelica.Electrical.Analog.Basic.Ground ground1 annotation(Placement(visible = true, transformation(origin = {-84.058,-63.7681}, extent = {{-12,-12},{12,12}}, rotation = 0)));

Modelica.Electrical.Analog.Basic.Resistor resistor1(R = 50) annotation(Placement(visible = true, transformation(origin = {-52.657,36.715}, extent = {{-12,-12},{12,12}}, rotation = 0))); 84

Modelica.Electrical.Analog.Lines.OLine oline1(r = 0, l = 2.52e-007, g = 0, c = 1.01e-010, length = 100, N = 199) annotation(Placement(visible = true, transformation(origin = {-2.41546,36.715}, extent = {{-12,-12},{12,12}}, rotation = 0)));

Modelica.Electrical.Analog.Basic.Capacitor capacitor1(C = 1.01e-010) annotation(Placement(visible = true, transformation(origin = {28.9855,-8.21256}, extent = {{-12,12},{12,-12}}, rotation = -90)));

Modelica.Electrical.Analog.Sources.StepVoltage stepvoltage1(V = 1) annotation(Placement(visible = true, transformation(origin = {-84.058,-6.28019}, extent = {{-12,12},{12,-12}}, rotation = -90))); equation connect(stepvoltage1.p,resistor1.p) annotation(Line(points = {{-84.058,5.71981},{-84.058,5.71981},{-84.058,37.1981},{-64.657,37.1981},{-64.657,36.7 15}})); connect(stepvoltage1.n,ground1.p) annotation(Line(points = {{-84.058,-18.2802},{-84.058,-18.2802},{-84.058,-51.7681},{-84.058,-51.7681}})); connect(oline1.p2,ground1.p) annotation(Line(points = {{9.58454,36.715},{67.6329,36.715},{67.6329,-52.657},{-84.058,-52.657},{-84.058,-51.76 81},{-84.058,-51.7681}})); connect(capacitor1.n,ground1.p) annotation(Line(points = {{28.9855,-20.2126},{28.9855,-20.2126},{28.9855,-52.1739},{-84.058,-52.1739},{-84.058, -51.7681}})); connect(oline1.p2,capacitor1.p) annotation(Line(points = {{9.58454,36.715},{29.4686,36.715},{29.4686,3.78744},{28.9855,3.78744}})); connect(oline1.p3,ground1.p) annotation(Line(points = {{-2.41546,24.715},{-2.41546,24.715},{-2.41546,-51.6908},{-84.058,-51.6908},{-84.058,- 51.7681}})); connect(resistor1.n,oline1.p1) annotation(Line(points = {{-40.657,36.715},{-14.4928,36.715},{-14.4928,36.715},{-14.4155,36.715}})); end short;

MODELICA notebook to model a RG58 cable terminated in matched load

85

model matched

Modelica.Electrical.Analog.Basic.Ground ground1 annotation(Placement(visible = true, transformation(origin = {-81.6425,-59.4203}, extent = {{-12,-12},{12,12}}, rotation = 0)));

Modelica.Electrical.Analog.Basic.Resistor resistor1(R = 50) annotation(Placement(visible = true, transformation(origin = {-54.5894,28.5024}, extent = {{-12,-12},{12,12}}, rotation = 0)));

Modelica.Electrical.Analog.Lines.OLine oline1(r = 0, l = 2.52e-007, g = 0, c = 1.01e-010, length = 100, N = 199) annotation(Placement(visible = true, transformation(origin = {-16.9082,28.5024}, extent = {{-12,-12},{12,12}}, rotation = 0)));

Modelica.Electrical.Analog.Sources.StepVoltage stepvoltage1(V = 1) annotation(Placement(visible = true, transformation(origin = {-82.1256,-12.5604}, extent = {{-12,12},{12,-12}}, rotation = -90)));

Modelica.Electrical.Analog.Basic.Capacitor capacitor1(C = 1.01e-010) annotation(Placement(visible = true, transformation(origin = {12.0773,-7.24638}, extent = {{-12,12},{12,-12}}, rotation = -90)));

Modelica.Electrical.Analog.Basic.Resistor resistor2(R = 50) annotation(Placement(visible = true, transformation(origin = {46.8599,-4.34783}, extent = {{-12,12},{12,-12}}, rotation = -90))); equation connect(resistor2.n,ground1.p) annotation(Line(points = {{46.8599,-16.3478},{45.8937,-16.3478},{45.8937,-47.343},{-81.6425,-47.343},{-81.6425, -47.4203}})); connect(oline1.p2,resistor2.p) annotation(Line(points = {{-4.90821,28.5024},{47.343,28.5024},{47.343,7.65217},{46.8599,7.65217}})); connect(capacitor1.n,ground1.p) annotation(Line(points = {{12.0773,-19.2464},{12.0773,-19.2464},{12.0773,-46.8599},{-81.6425,-46.8599},{-81.642 5,-47.4203}})); connect(oline1.p2,capacitor1.p) annotation(Line(points = {{-4.90821,28.5024},{12.0773,28.5024},{12.0773,4.75362},{12.0773,4.75362}}));

86

connect(oline1.p3,ground1.p) annotation(Line(points = {{-16.9082,16.5024},{-16.4251,16.5024},{-16.4251,-47.343},{-81.6425,-47.343},{-81.6425 ,-47.4203}})); connect(resistor1.n,oline1.p1) annotation(Line(points = {{-42.5894,28.5024},{-30.4348,28.5024},{-30.4348,28.5024},{-28.9082,28.5024}})); connect(stepvoltage1.p,resistor1.p) annotation(Line(points = {{-82.1256,-0.560386},{-82.1256,-0.560386},{-82.1256,28.5024},{-66.5894,28.5024},{-66. 5894,28.5024}})); connect(stepvoltage1.n,ground1.p) annotation(Line(points = {{-82.1256,-24.5604},{-81.6425,-24.5604},{-81.6425,-47.4203},{-81.6425,-47.4203}})); end matched;

MODELICA notebook to model a circuit which RG58 cable connected with RG59 cable:

model bicoax

Modelica.Electrical.Analog.Basic.Resistor resistor1(R = 50) annotation(Placement(visible = true, transformation(origin = {-45.0363,36.3196}, extent = {{-12,-12},{12,12}}, rotation = 0)));

Modelica.Electrical.Analog.Lines.OLine oline1(r = 0, l = 2.52e-007, g = 0, c = 1.01e-010, length = 100, N = 199) annotation(Placement(visible = true, transformation(origin = {-5.32688,35.8354}, extent = {{-12,-12},{12,12}}, rotation = 0)));

Modelica.Electrical.Analog.Lines.OLine oline2(r = 0, l = 3.76e-007, g = 0, c = 6.7e-011, length = 25, N = 199) annotation(Placement(visible = true, transformation(origin = {53.2688,35.3511}, extent = {{-12,-12},{12,12}}, rotation = 0)));

87

Modelica.Electrical.Analog.Basic.Ground ground1 annotation(Placement(visible = true, transformation(origin = {-77.4818,-47.9419}, extent = {{-12,-12},{12,12}}, rotation = 0)));

Modelica.Electrical.Analog.Sources.StepVoltage stepvoltage1(V = 1) annotation(Placement(visible = true, transformation(origin = {-77.9661,-8.88178e-016}, extent = {{-12,12},{12,-12}}, rotation = -90)));

Modelica.Electrical.Analog.Basic.Capacitor capacitor2(C = 1.01e-010) annotation(Placement(visible = true, transformation(origin = {21.3075,-2.66454e-015}, extent = {{-12,12},{12,-12}}, rotation = -90)));

Modelica.Electrical.Analog.Basic.Capacitor capacitor1(C = 6.7e-011) annotation(Placement(visible = true, transformation(origin = {79.4189,0.968523}, extent = {{-12,12},{12,-12}}, rotation = -90))); equation connect(capacitor1.n,ground1.p) annotation(Line(points = {{79.4189,-11.0315},{78.9346,-11.0315},{78.9346,-35.8354},{-77.4818,-35.8354},{-77.481 8,-35.9419}})); connect(oline2.p3,ground1.p) annotation(Line(points = {{53.2688,23.3511},{53.753,23.3511},{53.753,-35.8354},{-77.4818,-35.8354},{-77.4818,-3 5.9419}})); connect(capacitor2.n,ground1.p) annotation(Line(points = {{21.3075,-12},{21.7918,-12},{21.7918,-35.8354},{-77.4818,-35.8354},{-77.4818,-35.9419 }})); connect(oline1.p3,ground1.p) annotation(Line(points = {{-5.32688,23.8354},{-4.84262,23.8354},{-4.84262,-35.8354},{-77.4818,-35.8354},{-77.48 18,-35.9419}})); connect(stepvoltage1.n,ground1.p) annotation(Line(points = {{-77.9661,-12},{-77.4818,-12},{-77.4818,-35.9419},{-77.4818,-35.9419}})); connect(oline2.p2,capacitor1.p) annotation(Line(points = {{65.2688,35.3511},{79.9031,35.3511},{79.9031,12.9685},{79.4189,12.9685}})); connect(oline1.p2,oline2.p1) annotation(Line(points = {{6.67312,35.8354},{41.1622,35.8354},{41.1622,35.3511},{41.2688,35.3511}})); connect(oline1.p2,capacitor2.p) annotation(Line(points = {{6.67312,35.8354},{21.3075,35.8354},{21.3075,12},{21.3075,12}})); connect(resistor1.n,oline1.p1) annotation(Line(points = {{-33.0363,36.3196},{-8.23245,36.3196},{-8.23245,35.8354},{-17.3269,35.8354}})); connect(resistor1.p,stepvoltage1.p) annotation(Line(points = {{-57.0363,36.3196},{-77.4818,36.3196},{-77.4818,12},{-77.9661,12}})); end bicoax;

MODELICA notebook to model a lossy cable:

88

model lossy

Modelica.Electrical.Analog.Basic.Ground ground1 annotation(Placement(visible = true, transformation(origin = {-73.6077,-43.0993}, extent = {{-12,-12},{12,12}}, rotation = 0)));

Modelica.Electrical.Analog.Basic.Resistor resistor1(R = 50) annotation(Placement(visible = true, transformation(origin = {-44.0678,49.8789}, extent = {{-12,-12},{12,12}}, rotation = 0)));

Modelica.Electrical.Analog.Lines.OLine oline1(r = 0.005, l = 2.52e-007, g = 2e-006, c = 1.01e-010, length = 100, N = 199) annotation(Placement(visible = true, transformation(origin = {2.90557,49.8789}, extent = {{-12,-12},{12,12}}, rotation = 0)));

Modelica.Electrical.Analog.Sources.StepVoltage stepvoltage1(V = 1) annotation(Placement(visible = true, transformation(origin = {-74.092,8.71671}, extent = {{-12,12},{12,-12}}, rotation = -90)));

Modelica.Electrical.Analog.Basic.Capacitor capacitor1(C = 1.01e-010) annotation(Placement(visible = true, transformation(origin = {44.0678,20.339}, extent = {{-12,12},{12,-12}}, rotation = -90)));

Modelica.Electrical.Analog.Basic.Conductor conductor1(G = 2e-006) annotation(Placement(visible = true, transformation(origin = {72.6392,20.339}, extent = {{-12,12},{12,-12}}, rotation = -90))); equation connect(conductor1.n,ground1.p) annotation(Line(points = {{72.6392,8.33898},{72.6392,8.33898},{72.6392,-31.477},{-73.6077,-31.477},{-73.6077,-3 1.0993}})); connect(capacitor1.n,ground1.p) annotation(Line(points = {{44.0678,8.33898},{44.0678,8.33898},{44.0678,-31.9613},{-73.6077,-31.9613},{-73.6077, -31.0993}})); connect(oline1.p2,conductor1.p) annotation(Line(points = {{14.9056,49.8789},{72.6392,49.8789},{72.6392,32.339},{72.6392,32.339}}));

89

connect(oline1.p3,ground1.p) annotation(Line(points = {{2.90557,37.8789},{3.38983,37.8789},{3.38983,-31.477},{-73.6077,-31.477},{-73.6077,-3 1.0993}})); connect(oline1.p2,capacitor1.p) annotation(Line(points = {{14.9056,49.8789},{44.0678,49.8789},{44.0678,32.339},{44.0678,32.339}})); connect(resistor1.n,oline1.p1) annotation(Line(points = {{-32.0678,49.8789},{-9.20097,49.8789},{-9.20097,49.8789},{-9.09443,49.8789}})); connect(resistor1.p,stepvoltage1.p) annotation(Line(points = {{-56.0678,49.8789},{-74.092,49.8789},{-74.092,20.7167},{-74.092,20.7167}})); connect(stepvoltage1.n,ground1.p) annotation(Line(points = {{-74.092,-3.28329},{-73.6077,-3.28329},{-73.6077,-31.0993},{-73.6077,-31.0993}})); end lossy;

90