Sunday 29 December 2013

CCTV CAMERA

CCTV is the abbreviation of closed circuit television camera. 
 is the use of video camera to transmit a signal to a specific place, on a limited set of monitors. It differs from broadcast television in that the signal is not openly transmitted, though it may employ point to point (P2P), point to multipoint, or mesh wireless links. Though almost all video cameras fit this definition, the term is most often applied to those used for surveillance in areas that may need monitoring such as banks, casinos, airports, military installations, and convenience stores video telephony is seldom called "CCTV" but the use of video in distance education, where it is an important tool, is often so called.
INSTALLATION:

Planning:
First step of any camera installation is to plan camera and monitoring equipment locations. When planning for camera locations please take in consideration light condition, never install cameras in low light room pointing straight into the sunny area it will add glare to the picture, even if your camera has back light compensation it will not be enough. Use infrared cameras for very dark conditions and/or B/W cameras with as low LUX number as possible. I am not going to discuss proper equipment selection, as this was subject of my previous article. You can read it at www.amazingcameras.com or www.dvrexperts.com .
Selecting the best possible camera locations is not easy, and will directly impact the camera views. Besides light conditions, the distance to the monitoring object is equally important. There are many different types and focal lengths of lenses; your selection will depend on light condition and distance from the camera to the monitoring object. In small rooms around 500sq. ft. cameras with standard 3.6mm lens should be OK. Keep in mind that most bullet and board type of cameras come with 3.6mm lens, the greater the distance to the monitoring object the longer focal length of the lens will be needed. There is no ease way of judging lens selection, you can either guess or buy professional lens selector tool available at www.dvrexperts.com. Alternatively you can start with your lens selection and if needed get longer or shorter focal length lens later. Other option as far as lens selection goes, is to use varifocal lens, which is very versatile approach and takes the guess out of the lens selection process. For those who do not know what varifocal lens is, it’s basically adjustable focal length lens that will allow to change the focal length within specified range, fore example: 2.6mm – 8mm or 5mm - 50mm etc.
To maximize cameras coverage and get the most out of the CCTV system for least amount of money minimize number of cameras by placing cameras in strategic places, unless complete area coverage is needed. Avoid overlapping camera views, do not install cameras with source of light directly in front of it and do not place infrared cameras pointing at each other to eliminate risk of overexposure. These are the most common mistakes that need to be avoided.
After the initial camera locations are predetermined, lets look at cable placement. Make sure that it is actually possible and practical to run cable to each camera location, if running the cable to any camera location is for some reason impossible opt out for alternate camera location.
Wiring:
The most time consuming and important part of any camera installation is wiring.
Plan your installation carefully to minimize cable lengths and insure good quality video signal.
Never run cables alongside high power electrical lines, at least 12” spacing between video cable and power lines are recommended.
Keep the cable lengths below 400ft and use good quality cable, most people take the cable for granted, but it is actually very important aspect of any installation. 
The CCTV system is only as good as its weakest component.
I usually stick with RG59U with power Coleman cable (YES it is US made) sometimes called Siamese type cable. It is combo cable and will transmit video and power, as an alternative it is sometimes possible to use less expensive RG6 standard coax cable with separate run of 18/2AWG for power. The Siamese cable is less bulky and easer to run, distribution power supply is recommended with this type of cable as power will be supplied from common place right next to monitor and recording equipment. Using Siamese cable makes for more clean and neat installation, as only one line is required for each camera. Running RG6 cable with separate run for power is the likely solution if power outlets are available near each camera locations. In this case individual plug in power supplies are used to power the cameras with power cable running as separate and independent line to the camera. Both types of cables are available at www.dvrexperts.com. 
When running the cable it is good practice to leave couple of loops of extra cable at both camera and monitoring locations. This extra length of cable is needed if in the future monitoring or camera location will have to be moved slightly. 
After the cable is in place, the labor-intensive part of installation is over, now we can get to the fun part of installation.
Camera mounting:
Most cameras come with mounting screws and bracket included, attach the bracket firmly and remember that in some cases different brackets than the ones supplied with the cameras mite be needed, for example drop sealing installation will require T-Rail camera bracket like the one available at www.dvrexperts.com.
Attach the camera to the bracket and adjust the camera position approximately at this time, we will come back to it later. Typical security camera is powered by 12VDC or 24VAC and power input type is screw or push terminals or 2.1mm plug. Power connection will differ for each type of power supply and input style. Most cameras are 12VDC, in this case it is important to observe polarity or you may damage the camera. The power cable has two conductors and in most cases it will be red or white and black cable. Use the red or white for positive and black for negative terminals. If your camera has screw or push terminals power input connect the cable directly observing polarity, if it is 2.1mm plug, a special 2.1MM Female DC Plug with Flying Leads have to be connected to the cable again keep attention to polarity. You may get the power plug from www.dvrexperts.com. The 24VAC connection is very similar, with one major difference - polarity is not important.
Next step will involve some special tools and accessories.
We will attempt to go over installation process of BNC crimp-on video connector, I will post video demonstration of BNC crimping techniques shortly so please check the web sites mentioned in this article often. 
Steps:
1. Remove about 1/2-inch long outer jacket from the end of video cable exposing braid.
2. Slide the crimping barrel onto the cable with the larger diameter facing end of the cable.
3. Pull the braid backwards exposing the inner isolator material and remove 3/8-inch of it so you have now core conductor exposed.
4. The main part of BNC connector has a small hole on one side; push the exposed core conductor of the cable into that hole as far as it will go.
5. Push all the braid folded backwards in step 3 onto the BNC connector and spread the braid evenly around connector.
6. Push the crimping barrel onto the BNC connector all the way.
7. Using crimping tool, squeeze the crimping barrel onto the BNC connector, now the cable braid is compressed in between crimping barrel and BNC connector assuring secure connection.
BNC connector is on, lets hook it up now and repeat the steps for each camera, if you have purchased 16 camera system you may want to get some coffee first.

Monitor and recorder connection:

Cameras are on, its time to make final connections. I will focused on standard CCTV monitor, standalone DVR recorder and distribution power supply, as this is the most popular and likely solution for most CCTV installations.
First we have to install BNC connectors on this side as well - its time for that coffee again.
It is good idea to make room for monitor and recorder now and setup some type of desk, shelf or rack to place all the equipment on.
We need the monitor and recorder in place so we can determine proper power supply location. 
Power supply should be mounted within couple of feet from the DVR video inputs.
After power supply is secured separate the power conductors from the Siamese cable, and run it to power supply. Like we did with the cameras if 12VDC power is used, we need to watch the polarity, each terminal on the power supply is marked, so there should not be any doubt. Make sure the power supply is not plugged in to the power outlet yet.
Connect video cables to the DVR video in ports. We need one video cable to connect the DVR with the monitor, if you do not have one you may cut piece of Siamese cable separate the power conductors from it and install BNC connectors on both ends, you now have the cable.
Connect the DVR monitor out port to monitor video in.
We are almost ready to power up everything; there is only one more thing to take care before we do that.
We need to protect the equipment from power spikes by plugging it into power conditioner or better yet buttery backup unit. If the installation location is experiencing frequent power outages, the backup unit is strongly recommended. To extend the backup time only plug the DVR and camera power supply to the backup unit and the monitor to regular power strip, this way if we do loose power for some time the DVR and cameras are still functioning as normal while monitor is off. Turning off monitor will not affect DVR and cameras in any way; it is actually good habit to turn the monitor of if not used to extend its life.
Power on and final adjustment:
Yes… we are now ready to power it up for the first time, if this is your first installation it may be nerve-racking experience.
Start with turning the cameras power supply on; turn the monitor on as well followed by DVR system. The stand-alone DVR after self-test will show cameras or setup menu on first power up depending on your model.
To setup the DVR refer to the manual for proper settings.
Go over each camera view to determine if the camera view is actually what you want,
very rarely it will be the first time. To properly and easily adjust camera positions the test monitor will be very handy if not essential tool. Go to each camera location and connect the test monitor to adjust camera position to your preferences, if satisfied secure camera bracket adjustment screws - we will not go back to this camera anymore.

Thursday 31 October 2013

Basic Electronics Defination

According to oxford dictionary Electronics is


"The branch of physics and technology concerned with the design of circuits using transistors and microchips, and with the behaviour and movement of electrons in a semiconductor, conductor, vacuum, or gas:"

The basic electronics covers following topics
1. Atoms
2. Electrical Charges
3. Current
4. Voltage
5. Resistance
6. Inductance
7. Capacitance
8. Magnetism
9. Capacitor
10. Power
11. Ohm law
12. resistors


ATOMS
usually Atom is considered as smallest particle of an element. It consist on 
1. electron
2. proton
3. neutron

Electronics had negative charge on them which is equal to 1.6*10^-19 coulomb.
Proton had positive charge which is equal to the value of the charge as it is on electron.
Neutron are electrically neutral and does not pretend any electrical behaviour.

Number of electronics and protons in an atom is always equal which is also called the Atomic number.
While the number of proton decide the Atomic mass of atom in combination with protons. Means the number of protons+neutrans are known as Atomic Mass.


The protons and neutrons are present in the center of atoms forming what is called the nucleus and the electrons revolve around them.


Electronics-data




ELECTRICAL CHARGES

It is important to remember that particles, which have same charge repel while unlike charges attract each other. Therefore a proton and electron will attract while a proton and proton will repel each other. In other words they will move away from each other. Electricity is the flow of electrons so it is necessary to measure the charge. The basic unit for measuring charge is the coulomb or the letter C.
Electronics-data-charges








1 columb charge is equal to the amount of 6.25*10^18 electrons.


 CURRENT

Current is caused due to motion of electrical charge - the flow of electrons in a circuit is called current.  Current is measured in AMPERES (AMPS, A or I).


 Electric current is the amount of electrons, or charge, moving past a point every second.
Therefore amount of flow of current depends upon flow (speed) of electrons

I=Q/T
 or
1 ampere = 1 coloumb / 1 sec

 Therefore for every amp, there are 6.25x10^18 electrons moving through a point every second or A flow of electrons forced into motion by voltage is known as current.


 VOLTAGE

Voltage is the electrical force or "pressure" that causes current to flow in a circuit. It is measured in VOLTS (V or E).
In other words, current can only flow only if voltage is applied between two terminals.
The difference between these two terminals is called the potential difference. The larger the potential difference, the larger the voltage.
Therefore, Voltage can be thought of as the measure of the pressure pushing the electrons.

One volt will cause 1 amp of current through 1 ohm of  resistance.


RESISTANCE

The opposition in the way of flow of current is called Resistance. This is the property of every material whether it is conductor, semiconductor or insulator. This property classify the materials in three groups because in conductor resistance is very low while in semiconductor it is inbetween of conductor and insulator, while in insulator this resistance is too high.

Resistance is denoted by R
its unit is ohm and represent as sign of omega

different values resistances are available in different forms of resistors to get the right potential difference across each of them.


INDUCTANCE

Inductance can be defined as ability of the coil of wire to resist any change in electric current passing through the coil.
According to faradays law, the inductance L may be defined in terms of the emf generated to oppose a given change in the current.
The value of an inductance is directly proportional to the number of turns wound or used.
The Value of an Inductance







CAPACITANCE


The number of electrons that can be stored under a given electrical pressure (voltage) is called its capacitance or capacity. The property of capacitance is exhibited by capacitor. Basically, a capacitor consists of two metallic plates separated by a non-conducting substance between them.
Capacitor Schematic in a Circuit
In the circuit shown left when the switch is open the capacitor is not charged i.e. it does not contain any charges but when the switch is closed current starts to flow and capacitor gets charged. This process of charging takes place because the emf forces electrons into the top plate of the capacitor from the negative end of the battery and pulls others out of the bottom plate toward the positive end of the battery.
The unit uF stands for microfarad (one millionth) and pF stands for Pico-farad (one million, millionths). These are the two common values of capacitance you will encounter in electronics.
Time constant of capacitanceThe time required for a capacitor to get completely charged depends upon two factors:
1. The capacitance value
2. The resistance value.
The time constant of a resistance - capacitance circuit is:
T = R X C
Where T = time in seconds
where R = resistance in ohms
where C = capacitance in farads


MAGNETISM

Magnetism is a phenomenon by which materials exert an attractive or repulsive force on other materials.
Unlike electric charges (such as those observed when amber is rubbed against cloth), magnetic objects possessed two poles of opposite effect, denoted "north" and "south" after their self-orientation to the earth.
Materials like iron, steel, and the mineral lodestone are influenced by the presence of a magnetic field.
Basically, a magnetic field arises due to the moving electric charges.

There are various types of magnets depending upon Orientation of Electric Charges.
Magnetic Poles 
  • When a magnet is suspended freely, one side points North. This is called the North Pole of the magnet. The other side points South, and is called the South Pole of the magnet.

    A magnetic compass is used for finding north and South Pole.

Magnetic Fields
  •  A magnet is surrounded by an invisible force field. Electric coils, currents in wires, and permanent magnets are all sources of magnetic field. Moving charged particles produces magnetic fields. In case of electromagnets, electron flow through a coil of wire connected to a battery; in permanent magnets, spinning electrons within the atoms produces the field. Lines of magnetic force can be seen around a magnet by sprinkling iron filings on to a sheet above it and tapping the sheet. The strength of the magnetic force is strongest close to the poles and gets weaker as you move away from the poles.

Magnetic Domains
  • Electronics-magneticNormally the electrons are paired up and they cancel each others field; but in iron, some of the electrons are unpaired. Their spins tend to line up together, creating tiny pockets of magnetism called magnetic In the atoms of magnetic metals, the electrons spinning around the nucleus create a small magnetic field. domains.
Therefore, in magnetized material, magnetic domains are oriented towards one direction but in unmagnetised material, magnetic domains are randomly oriented in different directions.
Depending upon domains Magnets are classified in three categories, which are as follows

1. Permanent Magnets
2. Temporary Magnets
3. Electro Magnets

1. Permanent Magnets 

Permanent magnets are made from a ferromagnetic material, which at some point of time has been exposed, to a magnetic field. They are permanent in the sense that once they are magnetized, they retain a level of magnetism. Consider ferromagnetic material (one that can be magnetized without much effort), which can be made into a magnet by placing it in the centre of an electric coil or solenoid and passing a large current through the coil. If the material is magnetically `hard, it will retain its magnetism even when the current has been switched off. Permanent magnets are made from such hard materials as steel, nickel, and cobalt. Such magnetic alloys are used in electrical equipment and electronic devices

2. Temporary Magnets

Temporary magnets are those which act like a permanent magnet when they are within a strong magnetic field, but lose their magnetic property when the magnetic field disappears.
Examples: paperclips and nails and other soft iron items.

3. Electro Magnets

An electromagnet is a tightly wound helical coil of wire, usually with an iron core, which acts like a permanent magnet when current is flowing in the wire. The strength and polarity of the magnetic field produced by the electromagnet are adjustable by changing the magnitude of the current flowing through the wire and by changing the direction of the current flow.


CAPACITOR

A Capacitor is a passive electronic component that stores energy in the form of an electrostatic field.
Therefore Capacitors are used to store electric charge. Basically, a capacitor consists of two plates of a conducting material separated by a space filled by an insulator. The insulating layer is called the Dielectric of the capacitor.
Capacitance is directly proportional to the surface areas of the plates, and is inversely proportional to the plates separation.
The capacitor also functions as a filter, passing alternating current (AC), and blocking direct current (DC).
This symbol used to indicate a capacitor is -||-.
The fundamental property of a capacitor is that it can store charge and hence electric field energy. The capacitance C between two appropriate surfaces is defined by V=q\c where V is the potential difference between the surfaces and Q is the magnitude of the charge distributed on either surface
Capacitance is measured in units called
Farad: F
microfarad: µF (1 µF = 10-6 F)
nanofarad: nF (1 nF = 10-9 F)
picofarad: pF (1 pF = 10-12 F)

  • Time constant of capacitance The time required for a capacitor to get charged is proportional to the capacitance value and the resistance value.

    The time constant of a resistance - capacitance circuit is:
    T = R X C Where T = time in seconds
    Where R = resistance in ohms
    Where C = capacitance in farads

  • Electronics-capacitorCapacitors in series and parallel When Capacitors are connected in parallel say C1,C2,C3,…….
    Add capacitor values together as C1 + C2 + C3 + ..... to get net capacitor value

    When capacitors are connected in series.
    The net value is calculated in following manner
    1 / (1 / C1 + 1 / C2 + 1 / C3 + .....)



POWER

Power is defined as the amount of energy used or the amount of "work" done by a circuit.
Power is represented by the letter P.
The basic unit for measuring power is watts or the letter W.

P=EI


OHMS LAW 

ohms law define the basic relationship of current, voltage, and resistance.

ohms law states that

"The amount of current flowing in a circuit is directly proportional to the electromotive forces impressed on the circuit and inversely proportional to the total resistance of the circuit."

According to the Ohms law, voltage equals current times resistance which is expressed in the following equation:
V=IR
where 
V = voltage,
I = current
R = resistance


RESISTORS


Resistors
The resistors function is to oppose the flow of electric current.
The most common schematic symbol for a resistor is a zigzag line shown in above diagram.





Extra Symbol of ResistorAn alternative schematic symbol for a resistor is a small and rectangular in shape

Resistors are also classified according to the material from which they are made.
The typical resistor is made of either carbon film or metal film.

The value of resistor is determined by its colour.

Black 1
Brown 2
Red 3
Orange 4
Yellow 5
Green 6
Blue 7
Violet 8
Gray 9
White 10








While selecting a resistor it is important to take value of tolerance and electric power rating of the resistor into consideration along with resistance value of the resistor. The tolerance of a resistor denotes how close it is to the actual rated resistance value. For example, a ±1% tolerance would indicate a resistor that is within ±1% of the specified resistance value, and the power rating indicates how much power the resistor can safely tolerate.
The maximum rated power of the resistor is specified in Watts.
Colour tolerance
Brown (+or-)1%
Red (+or-)2%
Gold (+or-)5%
Silver (+or-)10%




There are two kinds of resistors namely fixed resistors and the variable resistors.
  • Fixed ResistorsA fixed resistor is one in which the value of its resistance cannot change.

  • Carbon film ResistorsThis is the most general purpose, cheap resistor. Usually the tolerance of the resistance value is ±5%. Power ratings of 1/8W, 1/4W and 1/2W are frequently used.
    Carbon film resistors have a disadvantage; they tend to be electrically noisy. Metal film resistors are recommended for use in analog circuits.

  • Metal film ResistorsMetal film resistors are used when a higher tolerance (more accurate value) is needed. They are much more accurate in value than carbon film resistors. They have about ±0.05% tolerance. They have about ±0.05% tolerance. Resistors that are about ±1% are more than sufficient. Ni-Cr (Nichrome) seems to be used for the material of resistor. The metal film resistor is used for bridge circuits, filter circuits, and low-noise analog signal circuits.

  • Variable ResistorsVariable ResistorsThere are two general ways in which variable resistors are used. Adjustment of one of the resistor is such that its value can be easily changed, like the volume adjustment of Radio while adjustment of Semi-fixed resistors are done to compensate for the inaccuracies in the resistors, and to fine-tune a circuit. The rotation angle of the variable resistor is usually about 300 degrees. At certain situation, variable resistors must be rotated according to get the whole range of resistance they offer. This allows for very precise adjustments of their value. These are called "Potentiometers" or "Trimmer Potentiometers."

  • Other ResistorsThere is another type of resistor besides the carbon-film type and the metal film resistors. It is called wirewound resistor.

    A wirewound resistor is made of metal resistance wire, which helps to give them precise values. Also, using a thick wire material can make high-wattage resistors. Wirewound resistors cannot be used for high-frequency circuits as Coils are used in high frequency circuits. Another type of resistor is the Ceramic resistor. These are wirewound resistors in a ceramic case, strengthened with special cement having very high power ratings, from 1 or 2 watts to dozens of watts. While designing or making these resistors, it is necessary to take its heat withstanding ability into account as these devices can easily get hot enough to burn.



Sunday 1 July 2012

microprocessor 8086 architecture


Intel 8086 microprocessor architecture

Memory

Program, data and stack memories occupy the same memory space. The total addressable memory size is 1MB KB. As the most of the processor instructions use 16-bit pointers the processor can effectively address only 64 KB of memory. To access memory outside of 64 KB the CPU uses special segment registers to specify where the code, stack and data 64 KB segments are positioned within 1 MB of memory (see the "Registers" section below).
16-bit pointers and data are stored as:
address: low-order byte
address+1: high-order byte
32-bit addresses are stored in "segment:offset" format as:
address: low-order byte of segment
address+1: high-order byte of segment
address+2: low-order byte of offset
address+3: high-order byte of offset
Physical memory address pointed by segment:offset pair is calculated as:
address = (<segment> * 16) + <offset>
Program memory - program can be located anywhere in memory. Jump and call instructions can be used for short jumps within currently selected 64 KB code segment, as well as for far jumps anywhere within 1 MB of memory. All conditional jump instructions can be used to jump within approximately +127 - -127 bytes from current instruction.
Data memory - the 8086 processor can access data in any one out of 4 available segments, which limits the size of accessible memory to 256 KB (if all four segments point to different 64 KB blocks). Accessing data from the Data, Code, Stack or Extra segments can be usually done by prefixing instructions with the DS:, CS:, SS: or ES: (some registers and instructions by default may use the ES or SS segments instead of DS segment).
Word data can be located at odd or even byte boundaries. The processor uses two memory accesses to read 16-bit word located at odd byte boundaries. Reading word data from even byte boundaries requires only one memory access.
Stack memory can be placed anywhere in memory. The stack can be located at odd memory addresses, but it is not recommended for performance reasons (see "Data Memory" above).
Reserved locations:
  • 0000h - 03FFh are reserved for interrupt vectors. Each interrupt vector is a 32-bit pointer in format segment:offset.
  • FFFF0h - FFFFFh - after RESET the processor always starts program execution at the FFFF0h address.

Interrupts

The processor has the following interrupts:
INTR is a maskable hardware interrupt. The interrupt can be enabled/disabled using STI/CLI instructions or using more complicated method of updating the FLAGS register with the help of the POPF instruction. When an interrupt occurs, the processor stores FLAGS register into stack, disables further interrupts, fetches from the bus one byte representing interrupt type, and jumps to interrupt processing routine address of which is stored in location 4 * <interrupt type>. Interrupt processing routine should return with the IRET instruction.
NMI is a non-maskable interrupt. Interrupt is processed in the same way as the INTR interrupt. Interrupt type of the NMI is 2, i.e. the address of the NMI processing routine is stored in location 0008h. This interrupt has higher priority then the maskable interrupt.
Software interrupts can be caused by:
  • INT instruction - breakpoint interrupt. This is a type 3 interrupt.
  • INT <interrupt number> instruction - any one interrupt from available 256 interrupts.
  • INTO instruction - interrupt on overflow
  • Single-step interrupt - generated if the TF flag is set. This is a type 1 interrupt. When the CPU processes this interrupt it clears TF flag before calling the interrupt processing routine.
  • Processor exceptions: divide error (type 0), unused opcode (type 6) and escape opcode (type 7).
Software interrupt processing is the same as for the hardware interrupts.

I/O ports

65536 8-bit I/O ports. These ports can be also addressed as 32768 16-bit I/O ports.

Registers

Most of the registers contain data/instruction offsets within 64 KB memory segment. There are four different 64 KB segments for instructions, stack, data and extra data. To specify where in 1 MB of processor memory these 4 segments are located the 8086 microprocessor uses four segment registers:
Code segment (CS) is a 16-bit register containing address of 64 KB segment with processor instructions. The processor uses CS segment for all accesses to instructions referenced by instruction pointer (IP) register. CS register cannot be changed directly. The CS register is automatically updated during far jump, far call and far return instructions.
Stack segment (SS) is a 16-bit register containing address of 64KB segment with program stack. By default, the processor assumes that all data referenced by the stack pointer (SP) and base pointer (BP) registers is located in the stack segment. SS register can be changed directly using POP instruction.
Data segment (DS) is a 16-bit register containing address of 64KB segment with program data. By default, the processor assumes that all data referenced by general registers (AX, BX, CX, DX) and index register (SI, DI) is located in the data segment. DS register can be changed directly using POP and LDS instructions.
Extra segment (ES) is a 16-bit register containing address of 64KB segment, usually with program data. By default, the processor assumes that the DI register references the ES segment in string manipulation instructions. ES register can be changed directly using POP and LES instructions.
It is possible to change default segments used by general and index registers by prefixing instructions with a CS, SS, DS or ES prefix.
All general registers of the 8086 microprocessor can be used for arithmetic and logic operations. The general registers are:
Accumulator register consists of 2 8-bit registers AL and AH, which can be combined together and used as a 16-bit register AX. AL in this case contains the low-order byte of the word, and AH contains the high-order byte. Accumulator can be used for I/O operations and string manipulation.
Base register consists of 2 8-bit registers BL and BH, which can be combined together and used as a 16-bit register BX. BL in this case contains the low-order byte of the word, and BH contains the high-order byte. BX register usually contains a data pointer used for based, based indexed or register indirect addressing.
Count register consists of 2 8-bit registers CL and CH, which can be combined together and used as a 16-bit register CX. When combined, CL register contains the low-order byte of the word, and CH contains the high-order byte. Count register can be used as a counter in string manipulation and shift/rotate instructions.
Data register consists of 2 8-bit registers DL and DH, which can be combined together and used as a 16-bit register DX. When combined, DL register contains the low-order byte of the word, and DH contains the high-order byte. Data register can be used as a port number in I/O operations. In integer 32-bit multiply and divide instruction the DX register contains high-order word of the initial or resulting number.
The following registers are both general and index registers:
Stack Pointer (SP) is a 16-bit register pointing to program stack.
Base Pointer (BP) is a 16-bit register pointing to data in stack segment. BP register is usually used for based, based indexed or register indirect addressing.
Source Index (SI) is a 16-bit register. SI is used for indexed, based indexed and register indirect addressing, as well as a source data address in string manipulation instructions.
Destination Index (DI) is a 16-bit register. DI is used for indexed, based indexed and register indirect addressing, as well as a destination data address in string manipulation instructions.
Other registers:
Instruction Pointer (IP) is a 16-bit register.
Flags is a 16-bit register containing 9 1-bit flags:
  • Overflow Flag (OF) - set if the result is too large positive number, or is too small negative number to fit into destination operand.
  • Direction Flag (DF) - if set then string manipulation instructions will auto-decrement index registers. If cleared then the index registers will be auto-incremented.
  • Interrupt-enable Flag (IF) - setting this bit enables maskable interrupts.
  • Single-step Flag (TF) - if set then single-step interrupt will occur after the next instruction.
  • Sign Flag (SF) - set if the most significant bit of the result is set.
  • Zero Flag (ZF) - set if the result is zero.
  • Auxiliary carry Flag (AF) - set if there was a carry from or borrow to bits 0-3 in the AL register.
  • Parity Flag (PF) - set if parity (the number of "1" bits) in the low-order byte of the result is even.
  • Carry Flag (CF) - set if there was a carry from or borrow to the most significant bit during last result calculation.

Instruction Set

Instruction set of Intel 8086 processor consists of the following instructions:
  • Data moving instructions.
  • Arithmetic - add, subtract, increment, decrement, convert byte/word and compare.
  • Logic - AND, OR, exclusive OR, shift/rotate and test.
  • String manipulation - load, store, move, compare and scan for byte/word.
  • Control transfer - conditional, unconditional, call subroutine and return from subroutine.
  • Input/Output instructions.
  • Other - setting/clearing flag bits, stack operations, software interrupts, etc.

Addressing modes

Implied - the data value/data address is implicitly associated with the instruction.
Register - references the data in a register or in a register pair.
Immediate - the data is provided in the instruction.
Direct - the instruction operand specifies the memory address where data is located.
Register indirect - instruction specifies a register containing an address, where data is located. This addressing mode works with SI, DI, BX and BP registers.
Based - 8-bit or 16-bit instruction operand is added to the contents of a base register (BX or BP), the resulting value is a pointer to location where data resides.
Indexed - 8-bit or 16-bit instruction operand is added to the contents of an index register (SI or DI), the resulting value is a pointer to location where data resides.
Based Indexed - the contents of a base register (BX or BP) is added to the contents of an index register (SI or DI), the resulting value is a pointer to location where data resides.
Based Indexed with displacement - 8-bit or 16-bit instruction operand is added to the contents of a base register (BX or BP) and index register (SI or DI), the resulting value is a pointer to location where data resides.

Comments: 2

architecture

2011-11-10 10:09:44
Posted by: tsekiri wesley ike
intel 8086 uses the von newmam achitecture and it is a 16-bit integer processor.

AF calculation

2012-03-07 14:59:56
Posted by: Nostrademous
Stepping through code using WinDbg I noticed that the adjustment flag (AF) was getting modified by a bunch of instructions even if the AL register was not involved on my Intel CPU. This also extended to instructions where the destination operand was a memory location.
Last modified: 10 May 2011

Wednesday 20 June 2012

The Inverse Z Transform


Given a Z domain function, there are several ways to perform an inverse Z Transform:
The only two of these that we will regularly use are direct computation and partial fraction expansion.

Inverse Z Transform by Long Division

To understand how an inverse Z Transform can be obtained by long division, consider the function
If we perform long division
we can see that
.
So the sequence f[k] is given by
Upon inspection
Note: We already knew this because the form of F(z) is one that we have worked with previously (i.e., the exponential function).

This technique is laborious to do by hand, but can be reduced to an algorithm that can be easily solved by computer.

Inverse Z Transform by Direct Computation

The need for this technique, as well as its implementation, will be made clear when we consider transfer functions in the Z domain.  We will present this method at that time.

Inverse Z Transform by Partial Fraction Expansion

This technique uses Partial Fraction Expansion to split up a complicated fraction into forms that are in the Z Transform table.  If you are unfamiliar with partial fractions, here is an explanation.
As an example consider the function
For reasons that will become obvious soon, we rewrite the fraction before expanding it by dividing the left side of the equation by "z."
Now we can perform a partial fraction expansion
These fractions are not in our table of Z Transforms.  However if we bring the "z" from the denominator of the left side of the equation into the numerator of the right side, we get forms that are in the table of Z Transforms; this is why we performed the first step of dividing the equation by "z."
So
or

Example
Verify the previous example by long division.
So
and the sequence f[k] is given by

Inverse Z Transform by Direct Inversion

This method requires the techniques of contour integration over a complex plane.  In particular
.
 The contour, G, must be in the functions region of convergence.  This technique makes use of Residue Theory and Complex Analysis and is beyond the scope of this document. 

Maxwell's equations


Maxwell's equations are a set of partial differential equations that, together with theLorentz force law, form the foundation of classical electrodynamics, classical optics, andelectric circuits. These fields in turn underlie modern electrical and communications technologies.
Maxwell's equations have two major variants. The "microscopic" set of Maxwell's equations uses total charge and total current including the difficult-to-calculate atomic level charges and currents in materials. The "macroscopic" set of Maxwell's equations defines two new auxiliary fields that can sidestep having to know these 'atomic' sized charges and currents.
Maxwell's equations are named after the Scottish physicist and mathematician James Clerk Maxwell, since in an early form they are all found in a four-part paper, "On Physical Lines of Force", which he published between 1861 and 1862. The mathematical form of the Lorentz force law also appeared in this paper.
It is often useful to write Maxwell's equations in other forms; these representations are still formally termed "Maxwell's equations". A relativistic formulation in terms of covariant field tensors is used in special relativity, while in quantum mechanics, a version based on theelectric and magnetic potentials is preferred.
While Maxwell's equations are consistent within special and general relativity, there are some quantum mechanical situations in which Maxwell's equations are significantly inaccurate: including extremely strong fields (see Euler–Heisenberg Lagrangian) and extremely short distances (see vacuum polarization). Moreover, various phenomena occur in the world even though Maxwell's equations predicts them to be impossible, such as "nonclassical light" and quantum entanglement of electromagnetic fields (see quantum optics). Finally, any phenomenon involving individual photons, such as the photoelectric effectPlanck's law, the Duane–Hunt lawsingle-photon light detectors, etc., would be difficult or impossible to explain if Maxwell's equations were exactly true, as Maxwell's equations do not involve photons. Maxwell's equations are usually an extremely accurate approximation to the more accurate theory of quantum electrodynamics.

[edit]Conceptual description

Conceptually, Maxwell's equations describe how electric charges and electric currents act as sources for the electric and magnetic fields. Further, it describes how a time varying electric field generates a time varying magnetic field and vice versa. (See below for a mathematical description of these laws.) Of the four equations, two of them, Gauss's law and Gauss's law for magnetism, describe how the fields emanate from charges. (For the magnetic field there is no magnetic charge and therefore magnetic fields lines neither begin nor end anywhere.) The other two equations describe how the fields 'circulate' around their respective sources; the magnetic field 'circulates' around electric currents and time varying electric field in Ampère's law with Maxwell's correction, while the electric field 'circulates' around time varying magnetic fields in Faraday's law.

[edit]Gauss's law

Gauss's law describes the relationship between an electric field and the electric charges that cause it: The electric field points away from positive charges and towards negative charges. In the field line description, electric field lines begin only at positive electric charges and end only at negative electric charges. 'Counting' the number of field lines in a closed surface, therefore, yields the total charge enclosed by that surface. More technically, it relates the electric flux through any hypothetical closed "Gaussian surface" to the enclosed electric charge.
Gauss's law for magnetism: magnetic field lines never begin nor end but form loops or extend to infinity as shown here with the magnetic field due to a ring of current.

[edit]Gauss's law for magnetism

Gauss's law for magnetism states that there are no "magnetic charges" (also calledmagnetic monopoles), analogous to electric charges.[1] Instead, the magnetic field due to materials is generated by a configuration called a dipole. Magnetic dipoles are best represented as loops of current but resemble positive and negative 'magnetic charges', inseparably bound together, having no net 'magnetic charge'. In terms of field lines, this equation states that magnetic field lines neither begin nor end but make loops or extend to infinity and back. In other words, any magnetic field line that enters a given volume must somewhere exit that volume. Equivalent technical statements are that the sum totalmagnetic flux through any Gaussian surface is zero, or that the magnetic field is a solenoidal vector field.

[edit]Faraday's law

In a geomagnetic storm, a surge in the flux of charged particles temporarily alters Earth's magnetic field, which induces electric fields in Earth's atmosphere, thus causing surges in our electrical power grids. Artist's rendition; sizes are not to scale.
Faraday's law describes how a time varyingmagnetic field creates ("induces") an electric field.[1] This aspect of electromagnetic induction is the operating principle behind many electric generators: for example, a rotatingbar magnet creates a changing magnetic field, which in turn generates an electric field in a nearby wire. (Note: there are two closely related equations which are called Faraday's law. The form used in Maxwell's equations is always valid but more restrictive than that originally formulated by Michael Faraday.)

[edit]Ampère's law with Maxwell's correction

An Wang's magnetic core memory (1954) is an application of Ampère's law. Each corestores one bit of data.
Ampère's law with Maxwell's correctionstates that magnetic fields can be generated in two ways: by electrical current (this was the original "Ampère's law") and by changing electric fields (this was "Maxwell's correction").
Maxwell's correction to Ampère's law is particularly important: it shows that not only does a changing magnetic field induce an electric field, but also a changing electric field induces a magnetic field.[1][2] Therefore, these equations allow self-sustaining "electromagnetic waves" to travel through empty space (see electromagnetic wave equation).
The speed calculated for electromagnetic waves, which could be predicted from experiments on charges and currents,[note 1] exactly matches the speed of light; indeed, light is one form of electromagnetic radiation (as are X-raysradio waves, and others). Maxwell understood the connection between electromagnetic waves and light in 1861, thereby unifying the theories ofelectromagnetism and optics.

[edit]Equations (SI units)

Maxwell's equations vary with the unit system used. Though the general form remains the same, various definitions become changed and different constants appear at different places. (This may seem strange at first, but this is because some unit systems, e.g. variants of cgs, define their units in such a way that certain physical constants are fixed, dimensionless constants, e.g. 1, so these constants disappear from the equations). The equations in this section are given in SI units. Other units commonly used are Gaussian units(based on the cgs system[3]), Lorentz–Heaviside units (used mainly in particle physics) and Planck units (used in theoretical physics). See below for CGS-Gaussian units.
For a detailed description of the differences between the microscopic (total charge and current)[note 2] and macroscopic (free charge and current) variants of Maxwell's equations, see below.
In the following equations, symbols in bold represent vector quantities, and symbols in italics represent scalar quantities. The definitions of terms used in the two tables of equations are given in another table immediately following.
Integral form
Name"Microscopic" equations"Macroscopic" equations
Gauss's law\oiint{\scriptstyle\partial \Omega }\mathbf{E}\cdot\mathrm{d}\mathbf{S} = \frac{Q(V)}{\varepsilon_0}\oiint{\scriptstyle \partial \Omega }\mathbf{D}\cdot\mathrm{d}\mathbf{S} = Q_{f}(V)
Gauss's law for magnetism\oiint{\scriptstyle \partial \Omega }\mathbf{B}\cdot\mathrm{d}\mathbf{S} = 0
Maxwell–Faraday equation
(Faraday's law of induction)
\oint_{\partial \Sigma} \mathbf{E} \cdot \mathrm{d}\boldsymbol{\ell}  = -\iint_{\Sigma} \frac{\partial \mathbf B}{\partial t} \cdot \mathrm{d}\mathbf{S}
Ampère's circuital law
(with Maxwell's correction)
\oint_{\partial \Sigma} \mathbf{B} \cdot \mathrm{d}\boldsymbol{\ell} = \mu_0 I + \mu_0 \varepsilon_0 \iint_{\Sigma} \frac{\partial \mathbf E}{\partial t} \cdot \mathrm{d}\mathbf{S}\oint_{\partial \Sigma} \mathbf{H} \cdot \mathrm{d}\boldsymbol{\ell} = I_f + \iint_{\Sigma} \frac{\partial \mathbf D}{\partial t} \cdot \mathrm{d}\mathbf{S}
Differential form
Name"Microscopic" equations"Macroscopic" equations
Gauss's law\nabla \cdot \mathbf{E} = \frac {\rho} {\varepsilon_0}\nabla \cdot \mathbf{D} = \rho_f
Gauss's law for magnetism\nabla \cdot \mathbf{B} = 0
Maxwell–Faraday equation
(Faraday's law of induction)
\nabla \times \mathbf{E} = -\frac{\partial \mathbf{B}} {\partial t}
Ampère's circuital law
(with Maxwell's correction)
\nabla \times \mathbf{B} = \mu_0\mathbf{J} + \mu_0 \varepsilon_0 \frac{\partial \mathbf{E}} {\partial t}\ \nabla \times \mathbf{H} = \mathbf{J}_f + \frac{\partial \mathbf{D}} {\partial t}

[edit]Table of terms used in Maxwell's equations

The following table provides the meaning of each symbol and the SI unit of measure:
Definitions and units
SymbolMeaning (first term is the most common)SI Unit of measure
Differential operators
\mathbf{\nabla \cdot}the divergence operatorper meter (factor contributed by applying either operator)
\mathbf{\nabla \times}the curl operator
\frac {\partial}{\partial t}partial derivative with respect to timeper second (factor contributed by applying the operator)
Fields
E
volt per meter or, equivalently,
newton per coulomb
B
  • magnetic field, also called:
  • the magnetic induction
  • the magnetic field density
  • the magnetic flux density
tesla, or equivalently,
D
H
  • magnetizing field, also called:
  • auxiliary magnetic field
  • magnetic field intensity
  • magnetic field
ampere per meter
 ε0permittivity of free space, also called the electric constant, a universal constantfarads per meter
 μ0permeability of free space, also called the magnetic constant, a universal constanthenries per meter, or newtons per ampere squared
Charges and currents
 Qf(V)net free electric charge within the three-dimensional volume V (not including bound charge)coulombs
Q(V)net electric charge within the three-dimensional volume V (including both free and bound charge)coulombs
 ρffree charge density (not including bound charge)coulombs per cubic meter
 ρtotal charge density (including both free and bound charge)coulombs per cubic meter
Jffree current density (not including bound current)amperes per square meter
Jtotal current density (including both free and bound current)amperes per square meter
Line and surface integrals
 Σ and ∂ΣΣ is any surface, and ∂Σ is its boundary curve. The surface is fixed (unchanging in time).
 ddifferential vector element of path length tangential to the path/curvemeters
\oint_{\partial \Sigma} \mathbf{E} \cdot \mathrm{d}\boldsymbol{\ell}line integral of the electric field along the boundary ∂Σ of a surface Σ (∂Σ is always a closed curve).joules per coulomb
  \oint_{\partial \Sigma} \mathbf{B} \cdot \mathrm{d}\boldsymbol{\ell}line integral of the magnetic field over the closed boundary ∂Σ of the surface Σtesla-meters
 Ω and ∂ΩΩ is any three-dimensional volume, and ∂Ω is its boundary surface. The volume is fixed (unchanging in time).
 dSdifferential vector element of surface area S, with infinitesimally small magnitude and direction normal to surface Σ (also denoted by Arather than S, but this conflicts with the magnetic potential)square meters
\oiint{\scriptstyle \partial \Omega } \mathbf{E}\cdot\mathrm{d}\mathbf{S} the electric flux (surface integral of the electric field) through the (closed) surface ∂Ω (the boundary of the volume Ω)joule-meter per coulomb
\oiint{\scriptstyle \partial \Omega } \mathbf{B}\cdot\mathrm{d}\mathbf{S} the magnetic flux (surface integral of the magnetic B-field) through the (closed) surface ∂Ω (the boundary of the volume Ω)tesla meters-squared or webers
\oiint{\scriptstyle \partial \Omega } \mathbf{D}\cdot\mathrm{d}\mathbf{S} flux of electric displacement field through the (closed) surface ∂Ω (the boundary of the volume Ω)coulombs
\iint_\Sigma \mathbf{J}_f \cdot \mathrm{d} \mathbf{S} = I_fnet free electrical current passing through the surface Σ (not including bound current)amperes
\iint_\Sigma \mathbf{J} \cdot \mathrm{d} \mathbf{S} = Inet electrical current passing through the surface Σ (including bothfree and bound current)amperes

[edit]Relationship between differential and integral forms

The differential and integral forms of the equations are mathematically equivalent, by the divergence theorem in the case of Gauss's law and Gauss's law for magnetism, and by the Kelvin–Stokes theorem in the case of Faraday's law and Ampère's law. In addition the following relations are used:
  • Definition of bound charge density ρb and bound current density Jb in terms of polarization P and magnetization M:
\rho_b = -\nabla\cdot\mathbf{P},
\mathbf{J}_b = \nabla\times\mathbf{M} + \frac{\partial\mathbf{P}}{\partial t}.
  • Relations between D and E and between B and H:
\mathbf{D} = \varepsilon_0\mathbf{E} + \mathbf{P},
\mathbf{B} = \mu_0(\mathbf{H} + \mathbf{M}),
  • Relations between free, bound, and total charge and current density:
\rho = \rho_b + \rho_f, \
\mathbf{J} = \mathbf{J}_b + \mathbf{J}_f,
Substituting all these equations into the "macroscopic" Maxwell's equations gives the "microscopic" equations. Both the differential and integral forms are useful. The integral forms can often be used to simply and directly calculate fields from symmetric distributions of charges and currents. On the other hand, the differential forms are a more natural starting point for calculating the fields in more complicated (less symmetric) situations, for example using finite element analysis.[4]

[edit]Maxwell's "microscopic" equations

The microscopic variant of Maxwell's equation expresses the electric E field and the magnetic B field in terms of the total charge and total current present including the charges and currents at the atomic level. It is sometimes called the general form of Maxwell's equations or "Maxwell's equations in a vacuum". Both variants of Maxwell's equations are equally general, though, as they are mathematically equivalent. The microscopic equations are most useful in waveguides for example, when there are no dielectric or magnetic materials nearby.

[edit]With neither charges nor currents

In a region with no charges (ρ = 0) and no currents (J = 0), such as in a vacuum, Maxwell's equations reduce to:
\nabla \cdot \mathbf{E} = 0
\nabla \cdot \mathbf{B} = 0
\nabla \times \mathbf{E} =  - \frac{\partial\mathbf{B}} {\partial t}
\nabla \times \mathbf{B} = \ \    \mu_0\varepsilon_0 \frac{\partial \mathbf{E}} {\partial t}.
These equations lead directly to E and B satisfying the wave equation for which the solutions are linear combinations of plane wavestraveling at the speed of light,
c = \frac{1}{\sqrt{\mu_0 \varepsilon_0}}. \
In addition, E and B are mutually perpendicular to each other and the direction of wave propagation, and are in phase with each other. Asinusoidal plane wave is one special solution of these equations.
In fact, Maxwell's equations explain how these waves can physically propagate through space. The changing magnetic field creates a changing electric field through Faraday's law. In turn, that electric field creates a changing magnetic field through Maxwell's correction to Ampère's law. This perpetual cycle allows these waves, now known as electromagnetic radiation, to move through space at velocity c.

[edit]Maxwell's "macroscopic" equations

Unlike the "microscopic" equations, "Maxwell's macroscopic equations", also known as Maxwell's equations in matter, factor out the bound charge and current to obtain equations that depend only on the free charges and currents. These equations are more similar to those that Maxwell himself introduced. The cost of this factorization is that additional fields need to be defined: the displacement field Dwhich is defined in terms of the electric field E and the polarization P of the material, and the magnetic-H field, which is defined in terms of the magnetic-B field and the magnetization M of the material.

[edit]Bound charge and current

Left: A schematic view of how an assembly of microscopic dipoles produces opposite surface charges as shown at top and bottom. Right: How an assembly of microscopic current loops add together to produce a macroscopically circulating current loop. Inside the boundaries, the individual contributions tend to cancel, but at the boundaries no cancelation occurs.
When an electric field is applied to a dielectric material its molecules respond by forming microscopic electric dipoles – their atomic nuclei move a tiny distance in the direction of the field, while their electrons move a tiny distance in the opposite direction. This produces a macroscopic bound charge in the material even though all of the charges involved are bound to individual molecules. For example, if every molecule responds the same, similar to that shown in the figure, these tiny movements of charge combine to produce a layer of positive bound charge on one side of the material and a layer of negative charge on the other side. The bound charge is most conveniently described in terms of a polarizationP, in the material. If P is uniform, a macroscopic separation of charge is produced only at the surfaces where Penter and leave the material. For non-uniform P, a charge is also produced in the bulk.[5]
Somewhat similarly, in all materials the constituent atoms exhibit magnetic moments that are intrinsically linked to the angular momentum of the components of the atoms, most notably their electrons. The connection to angular momentum suggests the picture of an assembly of microscopic current loops. Outside the material, an assembly of such microscopic current loops is not different from a macroscopic current circulating around the material's surface, despite the fact that no individual magnetic moment is traveling a large distance. These bound currents can be described using the magnetization M.[6]
The very complicated and granular bound charges and bound currents, therefore can be represented on the macroscopic scale in terms of P and M which average these charges and currents on a sufficiently large scale so as not to see the granularity of individual atoms, but also sufficiently small that they vary with location in the material. As such, the Maxwell's macroscopic equations ignores many details on a fine scale that can be unimportant to understanding matters on a gross scale by calculating fields that are averaged over some suitabe volume.

[edit]Constitutive relations

In order to apply 'Maxwell's macroscopic equations', it is necessary to specify the relations between displacement field D and E, and the magnetic H-field H and B. These equations specify the response of bound charge and current to the applied fields and are calledconstitutive relations. For real-world materials, the constitutive relations are rarely simple, except approximately, see the main article for a fuller description.
The definitions (not constitutive relations) of the auxiliary fields are:
\mathbf{D}(\mathbf{r}, t) = \varepsilon_0 \mathbf{E}(\mathbf{r}, t) + \mathbf{P}(\mathbf{r}, t)
\mathbf{H}(\mathbf{r}, t) = \frac{1}{\mu_0} \mathbf{B}(\mathbf{r}, t) - \mathbf{M}(\mathbf{r}, t),
where P is the polarization field and M is the magnetization field which are defined in terms of microscopic bound charges and bound current respectively.
The macroscopic forms of Maxwell's equations for different materials are presented below. In each case, Faraday's law of induction andGauss's law for magnetism are always the same (not for monopoles, see below).
No materials (vacuum)
The constitutive relations are
\mathbf{D} = \varepsilon_0\mathbf{E}, \quad \mathbf{H} = \mathbf{B}/\mu_0
The currents and charges are free, not total (expected since there are no bound charges nor currents);
Gauss's law:   \nabla\cdot\mathbf{D} = \rho_f
Ampère's circuital law:   \nabla\times\mathbf{H} = \mathbf{J}_f + \frac{\partial\mathbf{D}}{\partial t}
Linear materials
The constitutive relations are
\mathbf{D} = \varepsilon\mathbf{E}\,,\quad \mathbf{H} = \mathbf{B}/\mu
where ε is the permittivity and μ the permeability of the material.
  • For homogeneous materials, ε and μ are constant throughout the material, for inhomogeneous they depend on location within the material (and perhaps time).
  • For isotropic materials, ε and μ are independent of the directions of the applied fields to the material, for anisotropic they are tensors(incorporating directional dependence of the medium).
  • Materials are generally dispersive, so ε and μ depend on the frequency of any incident EM waves.
The vacuum permittivity and permeability are replaced by those of the material, the charges and currents are free (not total);
Gauss's law:   \nabla \cdot (\varepsilon \mathbf{E}) = \rho_f
Ampère's circuital law:   \nabla \times (\mathbf{B} / \mu) = \mathbf{J}_f + \varepsilon \frac{\partial \mathbf{E}} {\partial t}.
In the case of non-linear materials (see for example nonlinear optics), D and P are not proportional to E, similarly B is not proportional to H or M.

[edit]Equations (Gaussian units)

Gaussian units are a popular electromagnetism variant of the centimetre gram second system of units (cgs), in which case Maxwell's equations become:[7]
NameMicroscopic equationsMacroscopic equations
Gauss's law\nabla \cdot \mathbf{E} = 4\pi\rho_{\mathrm{tot}} \nabla \cdot \mathbf{D} = 4\pi\rho_\mathrm{f}
Gauss's law for magnetism\nabla \cdot \mathbf{B} = 0
Maxwell–Faraday equation
(Faraday's law of induction)
\nabla \times \mathbf{E} = -\frac{1}{c} \frac{\partial \mathbf{B}} {\partial t}
Ampère's law
(with Maxwell's extension)
\nabla \times \mathbf{B} = \frac{1}{c} \frac{\partial \mathbf{E}}{\partial t} + \frac{4\pi}{c}\mathbf{J}_{\mathrm{tot}}  \nabla \times \mathbf{H} = \frac{1}{c} \frac{\partial \mathbf{D}} {\partial t} + \frac{4\pi}{c} \mathbf{J}_\mathrm{f}
One result of Gaussian units is that the magnetic field B has the same units as the electric field E – in SI units this doesn't happen (since for EM waves in vacuum, |E| = c|B|), making dimensional analysis of the equations different. See SI and Gaussian units for how to convert between them.

[edit]History

[edit]Relation between electricity, magnetism, and the speed of light

The relation between electricity, magnetism, and the speed of light can be summarized by the modern equation:
c = \frac{1}{\sqrt{\mu_0 \varepsilon_0}} \ .
The left-hand side is the speed of light, and the right-hand side is a quantity related to the equations governing electricity and magnetism. Although the right-hand side has units of velocity, it can be inferred from measurements of electric and magnetic forces, which involve no physical velocities. Therefore, establishing this relationship provided convincing evidence that light is an electromagnetic phenomenon.
The discovery of this relationship started in 1855, when Wilhelm Eduard Weber and Rudolf Kohlrausch determined that there was a quantity related to electricity and magnetism, "the ratio of the absolute electromagnetic unit of charge to the absolute electrostatic unit of charge" (in modern language, the value 1/\sqrt{\mu_0 \varepsilon_0}), and determined that it should have units of velocity. They then measured this ratio by an experiment which involved charging and discharging a Leyden jar and measuring the magnetic force from the discharge current, and found a value 3.107×108 m/s,[8] remarkably close to the speed of light, which had recently been measured at3.14×108 m/s by Hippolyte Fizeau in 1848 and at 2.98×108 m/s by Léon Foucault in 1850.[8] However, Weber and Kohlrausch did not make the connection to the speed of light.[8] Towards the end of 1861 while working on part III of his paper On Physical Lines of Force, Maxwell travelled from Scotland to London and looked up Weber and Kohlrausch's results. He converted them into a format which was compatible with his own writings, and in doing so he established the connection to the speed of light and concluded that light is a form of electromagnetic radiation.[9]

[edit]The term Maxwell's equations

The four modern Maxwell's equations can be found individually throughout his 1861 paper, derived theoretically using a molecular vortex model of Michael Faraday's "lines of force" and in conjunction with the experimental result of Weber and Kohlrausch. But it wasn't until 1884 that Oliver Heaviside,[10] concurrently with similar work by Willard Gibbs and Heinrich Hertz,[11] grouped the four together into a distinct set. This group of four equations was known variously as the Hertz-Heaviside equations and the Maxwell-Hertz equations,[10]and are sometimes still known as the Maxwell–Heaviside equations.[12]
Maxwell's contribution to science in producing these equations lies in the correction he made to Ampère's circuital law in his 1861 paper On Physical Lines of Force. He added the displacement current term to Ampère's circuital law and this enabled him to derive theelectromagnetic wave equation in his later 1865 paper A Dynamical Theory of the Electromagnetic Field and demonstrate the fact that light is an electromagnetic wave. This fact was then later confirmed experimentally by Heinrich Hertz in 1887. The physicist Richard Feynman predicted that, "The American Civil War will pale into provincial insignificance in comparison with this important scientific event of the same decade."[13]
The concept of fields was introduced by, among others, Faraday. Albert Einstein wrote:
The precise formulation of the time-space laws was the work of Maxwell. Imagine his feelings when the differential equations he had formulated proved to him that electromagnetic fields spread in the form of polarised waves, and at the speed of light! To few men in the world has such an experience been vouchsafed ... it took physicists some decades to grasp the full significance of Maxwell's discovery, so bold was the leap that his genius forced upon the conceptions of his fellow-workers
—(Science, May 24, 1940)
Heaviside worked to eliminate the potentials (electric potential and magnetic potential) that Maxwell had used as the central concepts in his equations;[10] this effort was somewhat controversial,[14] though it was understood by 1884 that the potentials must propagate at the speed of light like the fields, unlike the concept of instantaneous action-at-a-distance like the then conception of gravitational potential.[11] Modern analysis of, for example, radio antennas, makes full use of Maxwell's vector and scalar potentials to separate the variables, a common technique used in formulating the solutions of differential equations. However, the potentials can be introduced by algebraic manipulation of the four fundamental equations.

[edit]On Physical Lines of Force

The four modern day Maxwell's equations appeared throughout Maxwell's 1861 paper On Physical Lines of Force:
  1. Equation (56) in Maxwell's 1861 paper is ∇ • B = 0.
  2. Equation (112) is Ampère's circuital law with Maxwell's displacement current added. It is the addition of displacement currentthat is the most significant aspect of Maxwell's work in electromagnetism, as it enabled him to later derive the electromagnetic wave equation in his 1865 paper A Dynamical Theory of the Electromagnetic Field, and hence show that light is an electromagnetic wave. It is therefore this aspect of Maxwell's work which gives the equations their full significance. (Interestingly, Kirchhoff derived the telegrapher's equations in 1857 without using displacement current. But he did use Poisson's equation and the equation of continuity which are the mathematical ingredients of the displacement current. Nevertheless, Kirchhoff believed his equations to be applicable only inside an electric wire and so he is not credited with having discovered that light is an electromagnetic wave).
  3. Equation (115) is Gauss's law.
  4. Equation (54) is an equation that Oliver Heaviside referred to as 'Faraday's law'. This equation caters for the time varying aspect of electromagnetic induction, but not for the motionally induced aspect, whereas Faraday's original flux law caters for both aspects.[15][16] Maxwell deals with the motionally dependent aspect of electromagnetic induction, v × B, at equation (77). Equation (77) which is the same as equation (D) in the original eight Maxwell's equations listed below, corresponds to all intents and purposes to the modern day force law F = qE + v × B ) which sits adjacent to Maxwell's equations and bears the nameLorentz force, even though Maxwell derived it when Lorentz was still a young boy.
The difference between the B and the H vectors can be traced back to Maxwell's 1855 paper entitled On Faraday's Lines of Force which was read to the Cambridge Philosophical Society. The paper presented a simplified model of Faraday's work, and how the two phenomena were related. He reduced all of the current knowledge into a linked set of differential equations.
Figure of Maxwell's molecular vortex model. For a uniform magnetic field, the field lines point outward from the display screen, as can be observed from the black dots in the middle of the hexagons. The vortex of each hexagonal molecule rotates counter-clockwise. The small green circles are clockwise rotating particles sandwiching between the molecular vortices.
It is later clarified in his concept of a sea of molecular vortices that appears in his 1861 paper On Physical Lines of Force. Within that context, H represented pure vorticity (spin), whereas B was a weighted vorticity that was weighted for the density of the vortex sea. Maxwell considered magnetic permeability µ to be a measure of the density of the vortex sea. Hence the relationship,
  1. Magnetic induction current causes a magnetic current density B = μH was essentially a rotational analogy to the linear electric current relationship,
  2. Electric convection current J = ρ v where ρ is electric charge density.B was seen as a kind of magnetic current of vortices aligned in their axial planes, with H being the circumferential velocity of the vortices. With µ representing vortex density, it follows that the product of µ with vorticity H leads to the magnetic field denoted as B.
The electric current equation can be viewed as a convective current of electric charge that involves linear motion. By analogy, the magnetic equation is an inductive current involving spin. There is no linear motion in the inductive current along the direction of the B vector. The magnetic inductive current represents lines of force. In particular, it represents lines of inverse square lawforce.
The extension of the above considerations confirms that where B is to H, and where J is to ρ, then it necessarily follows from Gauss's law and from the equation of continuity of charge that E is to D. i.e. B parallels with E, whereasH parallels with D.

[edit]A Dynamical Theory of the Electromagnetic Field

In 1864 Maxwell published A Dynamical Theory of the Electromagnetic Field in which he showed that light was an electromagnetic phenomenon. Confusion over the term "Maxwell's equations" sometimes arises because it has been used for a set of eight equations that appeared in Part III of Maxwell's 1864 paper A Dynamical Theory of the Electromagnetic Field, entitled "General Equations of the Electromagnetic Field",[17] and this confusion is compounded by the writing of six of those eight equations as three separate equations (one for each of the Cartesian axes), resulting in twenty equations and twenty unknowns. (As noted above, this terminology is not common: Modern references to the term "Maxwell's equations" refer to the Heaviside restatements.)
The eight original Maxwell's equations can be written in modern vector notation as follows:
(A) The law of total currents\mathbf{J}_\mathrm{tot} = \mathbf{J} + \frac{\partial\mathbf{D}}{\partial t}
(B) The equation of magnetic force\mu \mathbf{H} = \nabla \times \mathbf{A}
(C) Ampère's circuital law\nabla \times \mathbf{H} = \mathbf{J}_\mathrm{tot}
(D) Electromotive force created by convection, induction, and by static electricity. (This is in effect the Lorentz force)\mathbf{E} = \mu \mathbf{v} \times \mathbf{H} - \frac{\partial\mathbf{A}}{\partial t}-\nabla \phi
(E) The electric elasticity equation\mathbf{E} = \frac{1}{\varepsilon} \mathbf{D}
(F) Ohm's law\mathbf{E} = \frac{1}{\sigma} \mathbf{J}
(G) Gauss's law\nabla \cdot \mathbf{D} = \rho
(H) Equation of continuity\nabla \cdot \mathbf{J} = -\frac{\partial\rho}{\partial t}
or
\nabla \cdot \mathbf{J}_\mathrm{tot} = 0
Notation
H is the magnetizing field, which Maxwell called the magnetic intensity.
J is the current density (withJtot being the total current including displacement current).[note 3]
D is the displacement field (called the electric displacement by Maxwell).
ρ is the free charge density (called the quantity of free electricity by Maxwell).
A is the magnetic potential (called the angular impulse by Maxwell).
E is called the electromotive force by Maxwell. The term electromotive force is nowadays used for voltage, but it is clear from the context that Maxwell's meaning corresponded more to the modern term electric field.
φ is the electric potential (which Maxwell also called electric potential).
σ is the electrical conductivity (Maxwell called the inverse of conductivity the specific resistance, what is now called the resistivity).
It is interesting to note the μv × H term that appears in equation D. Equation D is therefore effectively the Lorentz force, similarly to equation (77) of his 1861 paper (see above).
When Maxwell derives the electromagnetic wave equation in his 1865 paper, he uses equation D to cater for electromagnetic inductionrather than Faraday's law of induction which is used in modern textbooks. (Faraday's law itself does not appear among his equations.) However, Maxwell drops the μv × H term from equation D when he is deriving the electromagnetic wave equation, as he considers the situation only from the rest frame.

[edit]A Treatise on Electricity and Magnetism

In A Treatise on Electricity and Magnetism, an 1873 treatise on electromagnetism written byJames Clerk Maxwell, eleven general equations of the electromagnetic field are listed and these include the eight that are listed in the 1865 paper.[18]

[edit]Maxwell's equations and relativity

Maxwell's original equations are based on the idea that light travels through a sea of molecular vortices known as the "luminiferous aether", and that the speed of light has to be respective to the reference frame of this aether. Measurements designed to measure the speed of the Earth through the aether conflicted with this notion, though. [19]
A more theoretical approach was suggested by Hendrik Lorentz along with George FitzGerald and Joseph Larmor. Both Larmor (1897) and Lorentz (1899, 1904) derived the Lorentz transformation (so named by Henri Poincaré) as one under which Maxwell's equations were invariant. Poincaré (1900) analyzed the coordination of moving clocks by exchanging light signals. He also established themathematical group property of the Lorentz transformation (Poincaré 1905). Sometimes this transformation is called the FitzGerald - Lorentz Transformation or even the FitzGerald - Lorentz - Einstein Transformation.
Albert Einstein dismissed the notion of the aether as an unnecessary one, and he concluded that Maxwell's equations predicted the existence of a fixed speed of light, independent of the velocity of the observer. Hence, he used the Maxwell's equations as the starting point for his Special Theory of Relativity. In doing so, he established that the FitzGerald - Lorentz Transformation is valid for all matter and space, and not just Maxwell's Equations. Maxwell's Equations played a key role in Einstein's groundbreaking scientific paper onSpecial Relativity (1905). For example, in the opening paragraph of his paper, he began his theory by noting that a description of anelectric conductor moving with respect to a magnet must generate a consistent set of fields regardless of whether the force is calculated in the rest frame of the magnet or that of the conductor.[20]
The General Theory of Relativity has also has a close relationship with Maxwell's equations. For example, Theodor Kaluza and Oskar Klein in the 1920s showed that Maxwell's equations could be derived by extending General Relativity into five physical dimensions. This strategy of using additional dimensions to unify different forces remains an active area of research in physics.

[edit]Modified to include magnetic monopoles

Maxwell's equations posit electric charge, but not magnetic charge, which has never been observed[21] and may not exist. Nevertheless, Maxwell's equations including magnetic charge (and magnetic current) are of some theoretical interest.[22]
For one reason, Maxwell's equations can be made fully symmetric under interchange of electric and magnetic fields by allowing for the possibility of magnetic charges with magnetic charge density ρm and currents with magnetic current density Jm.[23] The extended Maxwell's equations (in cgs-Gaussian units) are:
NameWithout magnetic monopolesWith magnetic monopoles (hypothetical)
Gauss's law\nabla \cdot \mathbf{E} = 4 \pi \rho_\mathrm{e}
Gauss's law for magnetism\nabla \cdot \mathbf{B} = 0 \nabla \cdot \mathbf{B} = 4 \pi \rho_\mathrm{m}
Maxwell–Faraday equation
(Faraday's law of induction)
-\nabla \times \mathbf{E} = \frac{1}{c}\frac{\partial \mathbf{B}} {\partial t}-\nabla \times \mathbf{E} = \frac{1}{c}\frac{\partial \mathbf{B}}{\partial t} +  \frac{4 \pi}{c} \mathbf{j}_\mathrm{m}
Ampère's law
(with Maxwell's extension)
\nabla \times \mathbf{B} = \frac{1}{c}\frac{\partial \mathbf{E}} {\partial t} + \frac{4 \pi}{c} \mathbf{j}_\mathrm{e}
If magnetic charges do not exist, or if they exist but not in the region studied, then the new variables are zero, and the symmetric equations reduce to the conventional equations of electromagnetism such as ∇ • B = 0. Further, if every particle has the same ratio of electric to magnetic charge, then an E and a B field can be defined that obeys the normal Maxwell's equation (having no magnetic charges or currents) with its own charge and current densities.[24]

[edit]Solving Maxwell's equations

Maxwell's equations are partial differential equations that relate the electric and magnetic fields to each other and to the electric charges and currents. Often, the charges and currents are themselves dependent on the electric and magnetic fields via the Lorentz force equation and the constitutive relations. These all form a set of coupled partial differential equations, which are often very difficult to solve. In fact, the solutions of these equations encompass all the diverse phenomena in the entire field of classical electromagnetism. A thorough discussion is far beyond the scope of the article, but some general notes follow:
  • Like any differential equation, boundary conditions[25][26][27] and initial conditions[28] are necessary for a unique solution. For example, even with no charges and no currents anywhere in spacetime, many solutions to Maxwell's equations are possible, not just the obvious solution E = B = 0. Another solution is E = constant, B = constant, while yet other solutions have electromagnetic waves filling spacetime. In some cases, Maxwell's equations are solved through infinite space, and boundary conditions are given as asymptotic limits at infinity.[29] In other cases, Maxwell's equations are solved in just a finite region of space, with appropriate boundary conditions on that region: For example, the boundary could be a artificial absorbing boundary representing the rest of the universe,[30][31] or periodic boundary conditions, or (as with a waveguide or cavity resonator) the boundary conditions may describe the walls that isolate a small region from the outside world.[32]
  • Jefimenko's equations (or the closely related Liénard–Wiechert potentials) are the explicit solution to Maxwell's equations for the electric and magnetic fields created by any given distribution of charges and currents. It assumes specific initial conditions to obtain the so-called "retarded solution", where the only fields present are the ones created by the charges. Jefimenko's equations are not so helpful in situations when the charges and currents are themselves affected by the fields they create.
  • Numerical methods for differential equations can be used to approximately solve Maxwell's equations when an exact solution is impossible. These methods usually require a computer, and include the finite element method and finite-difference time-domain method.[25][27][33][34][35] For more details, see Computational electromagnetics.
  • Maxwell's equations seem overdetermined, in that they involve six unknowns (the three components of E and B) but eight equations (one for each of the two Gauss's laws, three vector components each for Faraday's and Ampere's laws). (The currents and charges are not unknowns, being freely specifiable subject to charge conservation.) In fact, Maxwell's equations are somewhat redundant; it can be proven that any system satisfying Faraday's law and Ampere's law automatically also satisfies the two Gauss's laws, as long as the system's initial condition does. Therefore numerical algorithms often ignore the two Gauss's laws, although more accurate algorithms take them into account in order to minimize numerical inaccuracy.[36][37]

[edit]Alternative formulations of Maxwell's equations

Following is a summary of the numerous other ways to write the equations (in SI units, not Gaussian), showing they can be collected together in simpler and more unified formulae, though in terms of more complicated mathematics. See the main articles for the details of each formulation.
FormulationHomogeneous equationsNonhomogeneous equations
Vector calculus(fields)\nabla\cdot\mathbf{B}=0\nabla\times\mathbf{E}+\frac{\partial \mathbf{B}}{\partial t}=0\nabla\cdot\mathbf{E}=\frac{\rho}{\varepsilon_0}\nabla\times\mathbf{B}-\frac{1}{c^2}\frac{\partial \mathbf{E}}{\partial t}=\mu_0\mathbf{J}
Vector calculus (potentials, any gauge)identities\nabla^2 \varphi + \frac{\partial}{\partial t} \left ( \mathbf \nabla \cdot \mathbf A \right ) = - \frac{\rho}{\varepsilon_0}\Box\mathbf A+\mathbf \nabla \left ( \mathbf \nabla \cdot \mathbf A + \frac{1}{c^2} \frac{\partial \varphi}{\partial t} \right ) = \mu_0 \mathbf J
QED, vector calculus (potentials,Lorenz gauge)identities\Box \varphi = -\frac{1}{\varepsilon_0} e \psi^{\dagger} \psi \Box \mathbf A = -\mu_0 e \psi^{\dagger} \boldsymbol{\alpha} \psi
Tensor calculus(potentials, Lorenz gauge)identities\Box A^\mu = \mu_0 J^\mu
Tensor calculus (fields)\dfrac{\partial F_{\alpha\beta}}{\partial x^\gamma} + \dfrac{\partial F_{\gamma\alpha}}{\partial x^\beta} + \dfrac{\partial F_{\beta\gamma}}{\partial x^\alpha} = 0 \dfrac{\partial F^{\beta\alpha}}{\partial x^\alpha}=\mu_0 J^\beta
Differential forms(fields)\mathrm{d}\bold{F}=0\mathrm{d} \star \bold{F}=\bold{J}
Geometric algebra(fields) \nabla F = \mu_0 c J
Algebra of physical space(fields) \left(\frac{1}{c}\dfrac{\partial }{\partial t} + \boldsymbol{\nabla}\right)F = \mu_0 c J
where
\Box = \frac{1}{c^2} \frac{\partial^2} {\partial t^2}-\nabla^2
is the D'Alembert operator. Following are the reasons for using such formulations:
\mathbf E = - \mathbf \nabla \varphi - \frac{\partial \mathbf A}{\partial t}\,,\quad \mathbf B = \mathbf \nabla \times \mathbf A.
Many different choices of A and φ are consistent with a given E and B, making these choices physically equivalent – a flexibility known as gauge freedom. Suitable choice of A and φ can simplify these equations, or can adapt them to suit a particular situation.
  • Manifestly covariant (tensor) approach: Maxwell's equations are exactly consistent with special relativity—i.e., if they are valid in one inertial reference frame, then they are automatically valid in every other inertial reference frame. In fact, Maxwell's equations were crucial in the historical development of special relativity. However, in the usual formulation Maxwell's equations, their consistency with special relativity is not obvious; it can only be proven by a laborious calculation that involves a seemingly-miraculous cancellation of different terms.
For example, consider a conductor moving in the field of a magnet.[38] In the frame of the magnet, that conductor experiences amagnetic force. But in the frame of a conductor moving relative to the magnet, the conductor experiences a force due to an electricfield. The motion is exactly consistent in these two different reference frames, but it mathematically arises in quite different ways.
For this reason and others, it is often useful to rewrite Maxwell's equations in a way that is "manifestly covariant"—i.e. obviouslyconsistent with special relativity, even with just a glance at the equations—using covariant and contravariant four-vectors and tensors. This can be done using the EM tensor F, or the 4-potential A, with the 4-current J - see covariant formulation of classical electromagnetism.
  • Differential forms approach: Gauss's law for magnetism and the Faraday-Maxwell law can be grouped together since the equations are homogeneous, and be seen as geometric identities expressing the field F (a 2-form), which can be derived from the 4-potential A. Gauss's law for electricity and the Ampere-Maxwell law could be seen as the dynamical equations of motion of the fields, obtained via the Lagrangian principle of least action, from the "interaction term" A J (introduced through gauge covariant derivatives), coupling the field to matter. For the field formulation of Maxwell's equations in terms of a principle of extremal action, see electromagnetic tensor.
Often, the time derivative in the Faraday-Maxwell equation motivates calling this equation "dynamical", which is somewhat misleading in the sense of the preceding analysis. This is rather an artifact of breaking relativistic covariance by choosing a preferred time direction. To have physical degrees of freedom propagated by these field equations, one must include a kinetic term F *F for A; and take into account the non-physical degrees of freedom which can be removed by gauge transformation A → A' = A − dα. See also gauge fixing and Faddeev–Popov ghosts.