Wednesday, 15 April 2020

EC8451 Electromagnetic Fields Unit- 1 ELECTROMAGNETIC Model

ELECTROMAGNETIC THEORY

INTRODUCTION

Electromagnetic theory is a discipline concerned with the study of charges at rest and in motion. Electromagnetic principles are fundamental to the study of electrical engineering and physics. Electromagnetic theory is also indispensable to the understanding, analysis and design of various electrical, electromechanical and electronic systems. Some of the branches of study where

Electromagnetic principles find applications are:



1.        RF communication

2.        Microwave Engineering

3.        Antennas

4.        Electrical Machines

5.        Satellite Communication

6.        Atomic and nuclear research

7.        Radar Technology

8.        Remote sensing

9.        EMI EMC

10.   Quantum Electronics

11.   VLSI

Electromagnetic theory is a prerequisite for a wide spectrum of studies in the field of Electrical Sciences and Physics. Electromagnetic theory can be thought of as generalization of circuit theory. There are certain situations that can be handled exclusively in terms of field theory. In electromagnetic theory, the quantities involved can be categorized as source quantities and field quantities. Source of electromagnetic field is electric charges: either at rest or in motion. However an electromagnetic field may cause a redistribution of charges that in turn change the field and hence the separation of cause and effect is not always visible.

Sources of EMF:

·           Current carrying conductors.

·           Mobile phones.

·           Microwave oven.

·           Computer and Television screen.

·           High voltage Power lines.

Effects of Electromagnetic fields:

·           Plants and Animals.

·           Humans.

·           Electrical components.

Fields are classified as
·           Scalar field

·           Vector field.

Electric charge is a fundamental property of matter. Charge exist only in positive or negative integral multiple of electronic charge, -e, e= 1.60 × 10-19 coulombs. [It may be noted here that in 1962, Murray Gell-Mann hypothesized Quarks as the basic building blocks of matters. Quarks were predicted to carry a fraction of electronic charge and the existence of Quarks have been experimentally verified.] Principle of conservation of charge states that the total charge (algebraic sum of positive and negative charges) of an isolated system remains unchanged, though the charges may redistribute under the influence of electric field. Kirchhoff's Current Law (KCL) is an assertion of the conservative property of charges under the implicit assumption that there is no accumulation of charge at the junction.

Electromagnetic theory deals directly with the electric and magnetic field vectors where as circuit theory deals with the voltages and currents. Voltages and currents are integrated effects of electric and magnetic fields respectively. Electromagnetic field problems involve three space variables along with the time variable and hence the solution tends to become correspondingly complex. Vector analysis is a mathematical tool with which electromagnetic concepts are more conveniently expressed and best comprehended. Since use of vector analysis in the study of electromagnetic field theory results in real economy of time and thought, we first introduce the concept of vector analysis.

Vector Analysis:

The quantities that we deal in electromagnetic theory may be either scalar or vectors [There are other class of physical quantities called Tensors: where magnitude and direction vary with co ordinate axes]. Scalars are quantities characterized by magnitude only and algebraic sign. A quantity that has direction as well as magnitude is called a vector. Both scalar and vector quantities are function of time and position . A field is a function that specifies a particular quantity everywhere in a region. Depending upon the nature of the quantity under consideration, the field may be a vector or a scalar field. Example of scalar field is the electric potential in a region while electric or magnetic fields at any point is the example of vector field.
Let us see the animations in the next pages for the addition of two vectors, which has two rules:

1: Parallelogram law and  2: Head & tail rule





Co-ordinate Systems

In order to describe the spatial variations of the quantities, we require using appropriate co-ordinate system. A point or vector can be represented in a curvilinear coordinate system that may be orthogonal or non-orthogonal .

An orthogonal system is one in which the co-ordinates are mutually perpendicular. Non-orthogonal co-ordinate systems are also possible, but their usage is very limited in practice .

Let u = constant, v = constant and w = constant represent surfaces in a coordinate system, the surfaces may be curved surfaces in general. Furthur, let
be the unit vectors in the three coordinate directions(base vectors). In a general right handed orthogonal curvilinear systems, the vectors satisfy the following relations :
These equations are not independent and specification of one will automatically imply the other two. Furthermore, the following relations hold
In general uv and w may not represent length. We multiply uv and w by conversion factors h1,h2 and h3 respectively to convert differential changes du, dv and dw to corresponding changes in length dl1, dl2, and dl3. Therefore
In the following sections we discuss three most commonly used orthogonal co-ordinate systems, viz:

1.        Cartesian (or rectangular) co-ordinate system

2.        Cylindrical co-ordinate system

3.        Spherical polar co-ordinate system

Cartesian Co-ordinate System :

In Cartesian co-ordinate system, we have, (u,v,w) = (x,y,z). A point P(x0, y0, z0) in Cartesian co-ordinate system is represented as intersection of three planes x = x0y = y0 and z = z0. The unit vectors satisfies the following relation:

Since xy and z all represent lengths, h1h2h3=1. The differential length, area and volume are defined respectively as

Cylindrical Co-ordinate System :
In cylindrical coordinate system, the unit vectors satisfy the following relations

Transformation between Cartesian and Cylindrical coordinates:

These relations can be put conveniently in the matrix form as:

Fig 1.10: Spherical Polar Coordinate System

Thus we see that a vector in one coordinate system is transformed to another coordinate system through two-step process: Finding the component vectors and then variable transformation.

Spherical Polar Coordinates:
The orientation of the unit vectors are shown in the figure 1.11.
 
Coordinate transformation between rectangular and spherical polar:
With reference to the Figure 1.12, the elemental areas are:





Using the variable transformation listed above, the vector components, which are functions of variables of one coordinate system, can be transformed to functions of variables of other coordinate system and a total transformation can be done.

Line, surface and volume integrals

In electromagnetic theory, we come across integrals, which contain vector functions. Some representative integrals are listed below:
respectively represent vector and scalar function of space coordinates. C,S and V represent path, surface and volume of integration. All these integrals are evaluated using extension of the usual one-dimensional integral as the limit of a sum, i.e., if a function f(x) is defined over arrange a to b of values of x, then the integral is given by

Surface Integral :
If the surface integral is carried out over a closed surface, then we write
Volume Integrals:
The Del Operator :

Gradient of a Scalar function:
Let us consider a scalar field V(u,v,w) , a function of space coordinates.
Gradient of the scalar field V is a vector that represents both the magnitude and direction of the maximum space rate of increase of this scalar field V.
Fig 1.17 : Gradient of a scalar function

As shown in figure 1.17, let us consider two surfaces S1and S2 where the function V has constant magnitude and the magnitude differs by a small amount dV. Now as one moves from S1 to S2, the magnitude of spatial rate of change of V i.e. dV/dl depends on the direction of elementary path length dl, the maximum occurs when one traverses from S1to S2along a path normal to the surfaces as in this case the distance is minimum.

By our definition of gradient we can write:

which represents the distance along the normal is the shortest distance between the two surfaces.

For a general curvilinear coordinate system

Hence for the Cartesian, cylindrical and spherical polar coordinate system, the expressions for gradient can be written as: In Cartesian coordinates:

Divergence of a Vector Field:

In study of vector fields, directed line segments, also called flux lines or streamlines, represent field variations graphically. The intensity of the field is proportional to the density of lines. For example, the number of flux lines passing through a unit surface S normal to the vector measures the vector field strength.



Net outward flux along u can be calculated considering the two elementary surfaces perpendicular to u .
 

Hence for the Cartesian, cylindrical and spherical polar coordinate system, the expressions for divergence written

In Cartesian coordinates:

Divergence theorem :
Divergence theorem states that the volume integral of the divergence of vector field is equal to the net outward flux of the vector through the closed surface that bounds the volume. Mathematically,
Proof:
Let us consider a volume V enclosed by a surface S . Let us subdivide the volume in large number of cells. Let the kth cell has a volume DVk and the corresponding surface is denoted by Sk. Interior to the volume, cells have common surfaces. Outward flux through these common surfaces from one cell becomes the inward flux for the neighboring cells. Therefore when the total flux from these cells are considered, we actually get the net outward flux through the surface surrounding the volume. Hence we can write:

Curl of a vector field:
is defined as a vector whose magnitude is maximum of the net circulation per unit area when the area tends to zero and its direction is the normal direction to the area when the area is oriented in such a way so as to make the circulation maximum.

Therefore, we can write:



The negative sign is because of the fact that the direction of traversal reverses. Similarly,


Stoke's theorem :
Proof: Let us consider an area S that is subdivided into large number of cells as shown in the figure 1.21.
Let kth cell has surface area DSk and is bounded path Lk while the total area is bounded by path L. As seen from the figure that if we evaluate the sum of the line integrals around the elementary areas, there is cancellation along every interior path and we are left the line integral along path L. Therefore we can write,




Sunday, 12 April 2020

Corona updates 13-4-2020 India


  1. The colour coding is likely to result in almost half the country being coloured either orange or red, after it emerged on Sunday that over 50 per cent of all districts have reported COVID-19 cases. 364 districts have been affected by the outbreak currently; this number was 284 on April 6 and 160 on March 29.
  2. During his meeting with the Chief Ministers, PM Modi had indicated that the nationwide lockdown would be extended by two weeks but that there will be relaxations in certain areas and cases to ensure the survival of the economy as well.
  3. States that have the most coronavirus cases are Maharashtra (1,985), Delhi (1,154), Tamil Nadu (1,075), Rajasthan (804) and Madhya Pradesh (532) ad Gujarat (516).
  4. In Delhi, 10 new coronavirus hotspots were announced on Sunday evening, taking the total number of hotspots in the national capital to 43.
  5. The move to resume work in ministries comes nearly a month after the centre issued work from home protocols and is in line with the centre's change in strategy to deal with the COVID-19 crisis - to one that emphasises both protection of lives and the economy.
  6. Senior officials entitled to official transports, i.e., from the rank of Joint Secretary and above, will report to work as usual from today, sources said, adding that a third of all essential staff had to be present. Junior officials will continue to work on rotation basis. Each ministry has also been told to plan for post-lockdown and come up with ideas to kick-start the economy.
  7. More than one-third of the total number of coronavirus cases in India is linked to a religious gathering in Delhi last month, which has been identified as a hotspot for the spread of the highly contagious coronavirus.
  8. The coronavirus pandemic and the nationwide lockdown has put a severe stress on the economy. The World Bank has predicted that India will see growth of just 1.5-2.8 per cent in its current financial year -- down from an expected 4.8-5.0 per cent for the year just ended. The International Monetary Fund, one of the world's biggest financial institutions, also warned of a global recession, and said the pandemic is causing an economic crisis unlike any in the past century and will require a massive response to ensure recovery.
  9. The United States recorded 1,514 deaths related to the coronavirus pandemic over the past 24 hours, according to a tally by Johns Hopkins University. The US also leads the world by far in the number of confirmed infections, with 5,55,313 cases by the Baltimore-based university's count.
  10. The virus which originated in central China's Wuhan last year has so far infected more than 1.5 million worldwide.

Saturday, 11 April 2020

Process scheduling algorithms in the Operating System

In a system, there are a number of processes that are present in different states at a particular time. Some processes may be in the waiting state, others may be in the running state and so on. Have you ever thought how CPU selects one process out of some many processes for execution? Yes, you got it right. CPU uses some kind of process scheduling algorithms to select one process for its execution amongst so many processes. The process scheduling algorithms are used to maximize CPU utilization by increasing throughput. In this blog, we will learn about various process scheduling algorithms used by CPU to schedule a process.

First Come First Serve (FCFS)

As the name suggests, the process coming first in the ready state will be executed first by the CPU irrespective of the burst time or the priority. This is implemented by using the First In First Out (FIFO) queue. So, what happens is that, when a process enters into the ready state, then the PCB of that process will be linked to the tail of the queue and the CPU starts executing the processes by taking the process from the head of the queue . If the CPU is allocated to a process then it can't be taken back until it finishes the execution of that process.
Example:
In the above example, you can see that we have three processes P1, P2, and P3, and they are coming in the ready state at 0ms, 2ms, and 2ms respectively. So, based on the arrival time, the process P1 will be executed for the first 18ms. After that, the process P2 will be executed for 7ms and finally, the process P3 will be executed for 10ms. One thing to be noted here is that if the arrival time of the processes is the same, then the CPU can select any process.
---------------------------------------------
| Process | Waiting Time | Turnaround Time  |
---------------------------------------------
|   P1    |     0ms      |      18ms        |
|   P2    |     16ms     |      23ms        |
|   P3    |     23ms     |      33ms        |
---------------------------------------------
Total waiting time: (0 + 16 + 23) = 39ms
Average waiting time: (39/3) = 13ms

Total turnaround time: (18 + 23 + 33) = 74ms
Average turnaround time: (74/3) = 24.66ms
Advantages of FCFS:
  • It is the most simple scheduling algorithm and is easy to implement.
Disadvantages of FCFS:
  • This algorithm is non-preemptive so you have to execute the process fully and after that other processes will be allowed to execute.
  • Throughput is not efficient.
  • FCFS suffers from the Convey effect i.e. if a process is having very high burst time and it is coming first, then it will be executed first irrespective of the fact that a process having very less time is there in the ready state.

Shortest Job First (Non-preemptive)

In the FCFS, we saw if a process is having a very high burst time and it comes first then the other process with a very low burst time have to wait for its turn. So, to remove this problem, we come with a new approach i.e. Shortest Job First or SJF.
In this technique, the process having the minimum burst time at a particular instant of time will be executed first. It is a non-preemptive approach i.e. if the process starts its execution then it will be fully executed and then some other process will come.
Example:
In the above example, at 0ms, we have only one process i.e. process P2, so the process P2 will be executed for 4ms. Now, after 4ms, there are two new processes i.e. process P1 and process P3. The burst time of P1 is 5ms and that of P3 is 2ms. So, amongst these two, the process P3 will be executed first because its burst time is less than P1. P3 will be executed for 2ms. Now, after 6ms, we have two processes with us i.e. P1 and P4 (because we are at 6ms and P4 comes at 5ms). Amongst these two, the process P4 is having a less burst time as compared to P1. So, P4 will be executed for 4ms and after that P1 will be executed for 5ms. So, the waiting time and turnaround time of these processes will be:
---------------------------------------------
| Process | Waiting Time | Turnaround Time  |
---------------------------------------------
|   P1    |     7ms      |      12ms        |
|   P2    |     0ms      |      4ms         |
|   P3    |     0ms      |      2ms         |
|   P4    |     1ms      |      5ms         |
---------------------------------------------
Total waiting time: (7 + 0 + 0 + 1) = 8ms
Average waiting time: (8/4) = 2ms

Total turnaround time: (12 + 4 + 2 + 5) = 23ms
Average turnaround time: (23/4) = 5.75ms
Advantages of SJF (non-preemptive):
  • Short processes will be executed first.
Disadvantages of SJF (non-preemptive):
  • It may lead to starvation if only short burst time processes are coming in the ready state

Shortest Job First (Preemptive)

This is the preemptive approach of the Shortest Job First algorithm. Here, at every instant of time, the CPU will check for some shortest job. For example, at time 0ms, we have P1 as the shortest process. So, P1 will execute for 1ms and then the CPU will check if some other process is shorter than P1 or not. If there is no such process, then P1 will keep on executing for the next 1ms and if there is some process shorter than P1 then that process will be executed. This will continue until the process gets executed.
This algorithm is also known as Shortest Remaining Time First i.e. we schedule the process based on the shortest remaining time of the processes.
Example:
In the above example, at time 1ms, there are two processes i.e. P1 and P2. Process P1 is having burst time as 6ms and the process P2 is having 8ms. So, P1 will be executed first. Since it is a preemptive approach, so we have to check at every time quantum. At 2ms, we have three processes i.e. P1(5ms remaining), P2(8ms), and P3(7ms). Out of these three, P1 is having the least burst time, so it will continue its execution. After 3ms, we have four processes i.e P1(4ms remaining), P2(8ms), P3(7ms), and P4(3ms). Out of these four, P4 is having the least burst time, so it will be executed. The process P4 keeps on executing for the next three ms because it is having the shortest burst time. After 6ms, we have 3 processes i.e. P1(4ms remaining), P2(8ms), and P3(7ms). So, P1 will be selected and executed. This process of time comparison will continue until we have all the processes executed. So, waiting and turnaround time of the processes will be:
---------------------------------------------
| Process | Waiting Time | Turnaround Time  |
---------------------------------------------
|   P1    |     3ms      |      9ms         |
|   P2    |     16ms     |      24ms        |
|   P3    |     8ms      |      15ms        |
|   P4    |     0ms      |      3ms         |
---------------------------------------------
Total waiting time: (3 + 16 + 8 + 0) = 27ms
Average waiting time: (27/4) = 6.75ms

Total turnaround time: (9 + 24 + 15 + 3) = 51ms
Average turnaround time: (51/4) = 12.75ms
Advantages of SJF (preemptive):
  • Short processes will be executed first.
Disadvantages of SJF (preemptive):
  • It may result in starvation if short processes keep on coming.

Round-Robin

In this approach of CPU scheduling, we have a fixed time quantum and the CPU will be allocated to a process for that amount of time only at a time. For example, if we are having three process P1, P2, and P3, and our time quantum is 2ms, then P1 will be given 2ms for its execution, then P2 will be given 2ms, then P3 will be given 2ms. After one cycle, again P1 will be given 2ms, then P2 will be given 2ms and so on until the processes complete its execution.
It is generally used in the time-sharing environments and there will be no starvation in case of the round-robin.
Example:
In the above example, every process will be given 2ms in one turn because we have taken the time quantum to be 2ms. So process P1 will be executed for 2ms, then process P2 will be executed for 2ms, then P3 will be executed for 2 ms. Again process P1 will be executed for 2ms, then P2, and so on. The waiting time and turnaround time of the processes will be:
---------------------------------------------
| Process | Waiting Time | Turnaround Time  |
---------------------------------------------
|   P1    |     13ms     |      23ms        |
|   P2    |     10ms     |      15ms        |
|   P3    |     13ms     |      21ms        |
---------------------------------------------
Total waiting time: (13 + 10 + 13) = 36ms
Average waiting time: (36/3) = 12ms

Total turnaround time: (23 + 15 + 21) = 59ms
Average turnaround time: (59/3) = 19.66ms
Advantages of round-robin:
  • No starvation will be there in round-robin because every process will get chance for its execution.
  • Used in time-sharing systems.
Disadvantages of round-robin:
We have to perform a lot of context switching here, which will keep the CPU idle

Priority Scheduling (Non-preemptive)
In this approach, we have a priority number associated with each process and based on that priority number the CPU selects one process from a list of processes. The priority number can be anything. It is just used to identify which process is having a higher priority and which process is having a lower priority. For example, you can denote 0 as the highest priority process and 100 as the lowest priority process. Also, the reverse can be true i.e. you can denote 100 as the highest priority and 0 as the lowest priority.
Example:
In the above example, at 0ms, we have only one process P1. So P1 will execute for 5ms because we are using non-preemption technique here. After 5ms, there are three processes in the ready state i.e. process P2, process P3, and process P4. Out to these three processes, the process P4 is having the highest priority so it will be executed for 6ms and after that, process P2 will be executed for 3ms followed by the process P1. The waiting and turnaround time of processes will be:
---------------------------------------------
| Process | Waiting Time | Turnaround Time  |
---------------------------------------------
|   P1    |     0ms      |       5ms        |
|   P2    |     10ms     |       13ms       |
|   P3    |     12ms     |       20ms       |
|   P4    |     2ms      |       8ms        |
---------------------------------------------
Total waiting time: (0 + 10 + 12 + 2) = 24ms
Average waiting time: (24/4) = 6ms

Total turnaround time: (5 + 13 + 20 + 8) = 46ms
Average turnaround time: (46/4) = 11.5ms
Advantages of priority scheduling (non-preemptive):
  • Higher priority processes like system processes are executed first.
Disadvantages of priority scheduling (non-preemptive):
  • It can lead to starvation if only higher priority process comes into the ready state.
  • If the priorities of more two processes are the same, then we have to use some other scheduling algorithm.

Multilevel Queue Scheduling

In multilevel queue scheduling, we divide the whole processes into some batches or queues and then each queue is given some priority number. For example, if there are four processes P1, P2, P3, and P4, then we can put process P1 and P4 in queue1 and process P2 and P3 in queue2. Now, we can assign some priority to each queue. So, we can take the queue1 as having the highest priority and queue2 as the lowest priority. So, all the processes of the queue1 will be executed first followed by queue2. Inside the queue1, we can apply some other scheduling algorithm for the execution of processes of queue1. Similar is with the case of queue2.
So, multiple queues for processes are maintained that are having common characteristics and each queue has its own priority and there is some scheduling algorithm used in each of the queues.
Example:
In the above example, we have two queues i.e. queue1 and queue2. Queue1 is having higher priority and queue1 is using the FCFS approach and queue2 is using the round-robin approach(time quantum = 2ms).
Since the priority of queue1 is higher, so queue1 will be executed first. In the queue1, we have two processes i.e. P1 and P4 and we are using FCFS. So, P1 will be executed followed by P4. Now, the job of the queue1 is finished. After this, the execution of the processes of queue2 will be started by using the round-robin approach.

Multilevel Feedback Queue Scheduling

Multilevel feedback queue scheduling is similar to multilevel queue scheduling but here the processes can change their queue also. For example, if a process is in queue1 initially then after partial execution of the process, it can go into some other queue.
In a multilevel feedback queue, we have a list of queues having some priority and the higher priority queue is always executed first. Let's assume that we have two queues i.e. queue1 and queue2 and we are using round-robin for these i.e. time quantum for queue1 is 2 ms and for queue2 is 3ms. Now, if a process starts executing in the queue1 then if it gets fully executed in 2ms then it is ok, its priority will not be changed. But if the execution of the process will not be completed in the time quantum of queue1, then the priority of that process will be reduced and it will be placed in the lower priority queue i.e. queue2 and this process will continue.
While executing a lower priority queue, if a process comes into the higher priority queue, then the execution of that lower priority queue will be stopped and the execution of the higher priority queue will be started. This can lead to starvation because if the process keeps on going into the higher priority queue then the lower priority queue keeps on waiting for its turn.