Category Archives: Uncategorized

The Cavity Magnetron

The operation of a cavity magnetron is comparable to a vacuum tube: a nonlinear device that was mostly replaced by the transistor. The vacuum tube operated using thermionic emission, when a material with a high melting point is heated and expels electrons. When the work function of a material is overcome through thermal energy transfer to electrons, these particles can escape the material.

Magnetrons are comprised of two main elements: the cathode and anode. The cathode is at the center and contains the filament which is heated to create the thermionic emission effect. The outside part of the anode acts as a one-turn inductor to provide a magnetic field to bend the movement of the electrons in a circular manner. If not for the magnetic field, the electrons would simple be expelled outward. The magnetic field sweeps the electrons around, exciting the resonant cavities of the anode block.

The resonant cavities behave much like a passive LC filter circuit which resonate a certain frequency. In fact, the tipped end of each resonant cavity looks much like a capacitor storing charge between two plates, and the back wall acts an inductor. It is well known that a parallel resonant circuit has a high voltage output at one particular frequency (the resonant frequency) depending on the reactance of the capacitor and inductor. This can be contrasted with a series resonant circuit, which has a current peak at the resonant frequency where the two devices act as a low impedance short circuit. The resonant cavities in question are parallel resonant.

Just like the soundhole of a guitar, the resonant cavity of the magnetron’s resonance frequency is determined by the size of the cavity. Therefore, the magnetron should be designed to have a resonant frequency that makes sense for the application. For a microwaves oven, the frequency should be around 2.4GHz for optimum cooking. For an X-band RADAR, this should be closer to 10GHz or around this level. An interesting aspect of the magnetron is when a cavity is excited, another sequential cavity is also excited out of phase by 180 degrees.

The magnetron generally produces wavelength around several centimeters (roughly 10 cm in a microwave oven). It is known as a “crossed field” device, because the electrons are under the influence of both electric and magnetic fields, which are in orthogonal directions. An antenna is attached to the dipole for the radiation to be expelled. In a microwaves oven, the microwaves are guided using a metallic waveguide into the cooking chamber.

unnamed

 

Quality Factor

Quality factor is an extremely important fundamental concept in electrical and mechanical engineering. An oscillator (active) or resonator (passive) can be described by its Q-factor, which is inversely proportional to bandwidth. For these devices, the Q factor describes the damping of the system. In some instances, it is better to have either a lower or higher quality factor. For instance, with a guitar you would want to have a lower quality factor. The reason is because a high Q guitar would not amplify frequencies very evenly. To lower the quality factor, complex or strange shapes are introduced for the instrument body. However, the soundhole of a guitar (a Helmholtz resonator) has a very high quality factors to increase its frequency selectivity.

A very important area of discussion is the Quality Factor of a filter. Higher Q filters have higher peaks in the frequency domain and are more selective. The Quality factor is really only valid for a second order filter, which is based off of a second order equation and contains both an inductor and a capacitor. At a certain frequency, the reactances of both the capacitor and inductor cancel, leading to a strong output of current (lower total impedance). For a tuned circuit, the Q must be very high and is considered a “Figure of Merit”.

In terms of equations, the quality factor can be thought of in many different ways. It can be thought of as the ratio of “reactive” or wasted power to average power. It can also be thought of as the ratio of center frequency to bandwidth (NOTE: This is the FWHM bandwidth in which only frequencies that are equal to or greater than half power are part of the band). Another common equation is 2π multiplied by the ratio of energy stored in a system to energy lost in one cycle. The energy dissipated is due to damping, which again shows that Q factor is inversely related to damping, in addition to bandwidth.

Q can also be expressed as a function of frequency:

1

The full relationship between Q factor and damping can be expressed as the following:

When Q = 1/2, the system is critically damped (such as with a door damper). The system does not oscillate. This is also when the damping ratio is equal to one. The main difference between critical damping and overdamping is that in critical damping, the system returns to equilibrium in the minimum amount of time.

When Q > 1/2 the system is underdamped and oscillatory. With a small Quality factor underdamped system, the system many only oscillate for a few cycles before dying out. Higher Q factors will oscillate longer.

When Q < 1/2 the system is overdamped. The system does not oscillate but takes longer to reach equilibrium than critical damping.

 

 

Bragg Gratings

Bragg gratings are commonly used in optical fibers. Generally, an optical fiber has a relatively constant refractive index throughout. With a FBG (Fiber Bragg Grading) the refractive index is varied periodically within the core of the fiber. This can allow certain wavelengths to be reflected while all others are transmitted.

spec

The typical spectral response is shown above. It is clear that only a specific wavelength is reflected, while all others are transmitted. Bragg Gratings are typically only used in short lengths of the optical fiber to create a sort of optical filter. The only wavelength to be reflected is the one that is in phase with the Bragg grating distribution.

A typical usage of a Bragg Grating is for optical communications as a “notch filter”, which is essentially a band stop filter with a very high Quality factor, giving it a very narrow range of attenuated frequencies. These fibers are generally single mode, which features a very narrow core that can only support one mode as opposed to a wider multimode fiber, which can suffer from greater modal distortion.

The “Bragg Wavelength” can be calculated by the equation:

λ = 2n∧

where n is the refractive index and ∧ is the period of the bragg grating. This wavelength can also be shifted by stretching the fiber or exposing it to varying temperature.

These fibers are typically made by exposing the core to a periodic pattern of intense laser light which permanently increases the refractive index periodically. This phenomenon is known as “self focusing” which is when refractive index can be permanently changed by extreme electromagnetic radiation.

 

Pseudomorphic HEMT

The Pseudomorphic HEMT makes up the majority of High Electron Mobility Transistors, so it is important to discuss this typology. The pHEMT differentiates itself in many ways including its increased mobility and distinct Quantum well shape. The basic idea is to create a lattice mismatch in the heterostructure.

A standard HEMT is a field effect transistor formed through a heterostructure rather than PN junctions. This means that the HEMT is made up of compound semiconductors instead of traditional silicon FETs (MOSFET). The heterojunction is formed when two different materials with different band gaps between valence and conduction bands are combined to form a heterojunction. GaAs (with a band gap of 1.42eV) and AlGaAs (with a band gap of 1.42 to 2.16eV) is a common combination. One advantage that this typology has is that the lattice constant is almost independent of the material composition (fractions of each element represented in the material). An important distinction between the MESFET and the HEMT is that for the HEMT, a triangular potential well is formed which reduces Coloumb Scattering effects. Also, the MESFET modulates the thickness of the inversion layer while keeping the density of charge carriers constant. With the HEMT, the opposite is true. Ideally, the two compound semiconductors grown together have the same or almost similar lattice constants to mitigate the effects of discontinuities. The lattice constant refers to the spacing between the atoms of the material.

However, the pseudomorphic HEMT purposely violates this rule by using an extremely thin layer of one material which stretches over the other. For example, InGaAs can be combined with AlGaAs to form a pseudomorphic HEMT. A huge advantage of the pseudomorphic typology is that there is much greater flexibility when choosing materials. This provides double the maximum density of the 2D electron gas (2DEG). As previously mentioned, the field mobility also increases. The image below illustrates the band diagram of this pHEMT. As shown, the discontinuity between the bandgaps of InGaAs and AlGaAs is greater than between AlGaAs and GaAs. This is what leads to the higher carrier density as well as increased output conductance. This provides the device with higher gain and high current for more power when compared to traditional HEMT.

1

The 2DEG is confined in the InGaAs channel, shown below. Pulse doping is generally utilized in place of uniform doping to reduce the effects of parasitic current. To increase the discontinuity Ec, higher Indium concentrations can be used which requires that the layer be thinner. The Indium content tends to be around 15-25% to increase the density of the 2DEG.

1

Object Oriented Programming and C#: Program to Determine Interrupt Levels

The following is a program designed to detect environmental interrupts based on data inputted by the user. The idea is to generate a certain threshold based on the standard deviation and twenty second average of the data set.

A bit of background first: The standard deviation, much like the variance of a data set, describes the “spread” of the data. The standard deviation is the square root of the variance, to be specific. This leaves the standard deviation with the same units as the mean, whereas the variance has squared units. In simple terms, the standard deviation describes how close the values are to the mean. A low standard deviation indicates a narrow spread with values closer to the mean.

std

Often, physical data which involves the averaging of many samples of a random experiment can be approximated as a Gaussian or Normal distribution curve, which is symmetrical about the mean. As a real world example, this approximation can be made for the height of adult men in the United States. The mean of this is about 5’10 with a standard deviation of three inches. This means that for a normal distribution, roughly 68% of adult men are within three inches of the mean, as shown in the following figure.

normal

In the first part of the program, the variables are initialized. The value “A” represents the multiple of standard deviations. Previous calculations deemed that the minimum threshold level would be roughly 4 times the standard deviation added to the twenty second average. Two arrays are defined: an array to calculate the two second average which was set to a length of 200 and also an array of length 10 for the twenty second average.

prog1

The next part of the program is the infinite “while(true)” loop. The current time is printed to the console for the user to be aware of. Then, the user is prompted to input a minimum and maximum value for a reasonable range of audible values, and these are parsed into integers. Next, the Random class is instantiated and a for loop is incremented 200 times to store a random value within the “inputdata_two[]” array for each iteration. The random value is constrained to the max and min values provided by the user. The “Average()” method built into the Random class gives an easy means to calculate the two second average.

prog2

Next, a foreach statement is used to iterate through every value (10 values) of the twenty second average array and print them to the console. An interrupt is triggered if two conditions are met: the time has incremented to a full 20 seconds and the two second average is greater than the calculated minimum threshold. “Alltime” is set to -2 to reset the value for the next set of data. Once the time has incremented to 20 seconds, a twenty second average is calculated and from this, the standard deviation is calculated and printed to the console.

prog3

The rest of code is pictured below. The time is incremented by two seconds until the time is at 18 seconds.

prog4

The code is shown in action:

resultprog

If a high max and min is inputted, an interrupt will be triggered and the clock will be reset:

inter

HFSS – Simulation of a Square Pillar

The following is an EM simulation of the backscatter of a golden square object. This is by no means a professional achievement, but rather provides a basic introduction to the HFSS program.

HFSS_sq_model

The model is generated using the “Draw -> Box” command. The model is placed a distance away from the origin, where the excitation is placed, shown below. The excitation is of spherical vector form in order to generate a monostatic plot.

excitation

The basic structure is a square model (10mm in all three coordinates) with an airbox surrounding it. The airbox is coated with PML radiation boundaries to simulate a perfectly matched layer. This is to emulate a reflection free region. This is necessary to simulate radiating structures in an unbounded, infinite domain. The PML absorbs all electromagnetic waves that interract with the boundary. The following image is the plot of the Monostatic RCS vs the Incident wave elevation angle.

Monostatic_HFSS

The subsequent figure was generated by using a “bistatic” configuration and is plotted against the elevation angle.

bistatic

Miller Effect

The Miller Effect is a generally negative consequence of broadband circuitry due to the fact that bandwidth is reduced when capacitance increases. The Miller effect is common to inverting amplifiers with negative gain. Miller capacitance can also limit the gain of a transistor due to transistors’ parasitic capacitance. A common way to mitigate the Miller Effect, which causes an increase in equivalent input capacitance, is to use cascode configuration. The cascode configuration features a two stage amplifier circuit consisting of a common emitter circuit feeding into a common base. Configuring transistors in a particular way to mitigate the Miller Effect can lead to much wider bandwidth. For FET devices, capacitance exists between the electrodes (conductors) which in turn leads to Miller Effect. The Miller capacitance is typically calculated at the input, but for high output impedance applications it is important to note the output capacitance as well.

cascode

Interesting note: the Miller effect can be used to create a larger capacitor from a smaller one. So in this way, it can be used for something productive. This can be important for designing integrated circuits, where having large bulky capacitors is not ideal as “real estate” must be conserved.

VHF and UHF

The RF and microwave spectrum can be subdivided into many bands of varying purpose, shown below.

radiospec

On the lower frequency end, VLF (Very Low Frequency) tends to be used in submarine communication while LF (Low Frequency) is generally used for navigation. The MF (Medium Frequency) band is noted for AM broadcast (see posts on Amplitude modulation). The HF (shortwave) band is famous for use by HAM radio enthusiasts. The reason for the widespread usage is that HF does not require line of sight to propagate, but instead can reflect from the ionosphere and the surface of the earth, allowing the waves to travel great distances. VHF tends to be used for FM radio and TV stations. UHF covers the cellphone band as well as most TV stations. Satellite communication is covered in the SHF (Super High Frequency) band.

Regarding UHF and VHF propagation, line of sight must be achieved in order for the signals to propagate uninhibited. With increasing frequency comes increasing attenuation. This is especially apparent when dealing with 5G nodes, which are easily attenuated by buildings, trees and weather conditions. 5G used bands within the UHF, SHF and EHF bands.

Speaking of line of sight, the curvature of the earth must be taken into account.

los

The receiving and transmitting antennas must be visible to each other. This is the most common form of RF propagation. Twenty five miles (sometimes 30 or 40) tends to be the max range of line of sight propagation (radio horizon). The higher the frequency of the wave, the less bending or diffraction occurs which means the wave will not propagate as far. Propagation distance is a strong function of antenna height. Increasing the height of an antenna by 10 feet is like doubling the output power of the antenna. Impedance matching should be employed at the antennas and feedlines as losses increase dramatically with frequency.

Despite small wavelengths, UHF signals can still propagate through buildings and foliage but NOT the surface of the earth. One huge advantage of using UHF propagation is reuse of frequencies. Because the waves only travel a short distance when compared to HF waves, the same frequency channels can be reused by repeaters to re-propagate the signal. VHF signals (which have lower frequency) can sometimes travel farther than what the radio horizon allows due to some (limited) reflection by the ionosphere.

Both VHF and UHF signals can travel long distances through the use of “tropospheric ducting”. This can only occur when the index of refraction of a part of the troposphere due to increased temperature is introduced. This causes these signals to be bent which allows them to propagate further than usual.

HEMT – High Electron Mobility Transistor

One of the main limitations of the MESFET is that although this device extends well into the mmWave range (30 to 300 GHz or the upper part of the microwave spectrum), it suffers from low field mobility due to the fact that free charge carriers and ionized dopants share the same space.

To demonstrate the need for HEMT transistors, let us first consider the mobility of GaAs compound semiconductor. As shown in the picture, with decreasing temperature, Coloumb scattering becomes prevalent as opposed to phonon lattice vibrations. For an n-channel MESFET, the main electrostatic Coloumb force is between positively ionized donor elements (Phosphorous) and electrons. As shown, the mobility is heavily dependent on doping concentration. Coloumb Scattering effectively limits mobility. In addition, decreasing the length of the gate in a MESFET will increase Coloumb scattering due to the need for a higher doping concentration in the channel. The means that for an effective device, the separation of free and fixed charge is needed.

mobility

A heterojunction consisting of n+ AlGaAs and p- GaAs material is used to combat this effect. A spacer layer of undoped AlGaAs is placed in between the materials. In a heterojunction, materials with different bandgaps are placed together (as opposed to a homojunction where they are the same).

hetero

This formation leads to the confinement of electrons from the n- layer in quantum wells which reduces Coloumb scattering. An important distinction between the HEMT and the MESFET is that the MESFET (like all FETs) modulates the channel thickness whereas with an HEMT, the density of charge carriers in the channel is changed but not the thickness. So in other words, applying a voltage to the gate of an HEMT will change the density of free electrons will increase (positive voltage) or decrease (negative voltage). The channel is composed of a 2D electron gas (2DEG). The electrons in the gas move freely without any obsctruction, leading to high electron mobility.

HEMTs are generally packed into MMIC chips and can be used for RADAR applications, amplifiers (small signal and PAs), oscillators and mixers. They offer low noise performance for high frequency applications.

The pHEMT (pseudomorphic) is an enhancement to the HEMT which feature structures with different lattice constants (HEMTs feature roughly the same lattice constant for both materials). This leads to materials with wider bandgap differences and generally better performance.

Object Oriented Programming and C#: Simple Program to add three numbers

The following is a simple program that takes a user input of three numbers and adds them but does not crash when an exception is thrown (eg. if a user inputs a non integer value). The “int?” variable is used to include the “null” value used to signify that a bad input was received. The user is notified instantly when an incorrect input is received by the program with a “Bad input” command prompt message.

c1

The code above shows that the GetNumber() method is called (shown below) three times, and as long as these are integers, they are summed and printed to the console after being converted to a string.

c2

The code shows that as long as the sum of the three integers is not equal to null (anything plus null is equal to null, so if at least one input is a non-integer this will be triggered) the Console will print the sum of the three numbers. The GetNumber() method uses the “TryParse” method to convert each string input to an integer. This will handle exceptions that are triggered by passing a non-integer to the command line. It also gives a convenient return of “null” which is used above.

The following shows the effect of both a summation and an incorrect input summation failure.

correct

incorrect

Power Factor and the Power Triangle

Power factor is very important concept for commercial and industrial applications which require higher current draw to operate than domestic buildings. For a passive load (only containing resistance, inductance or capacitance and no active components), the power factor range from 0 to 1. Power factor is only negative with active loads. Before delving into power factor, it is important to discuss different types of power. The type of power most are familiar with is in Watts. This is called active or useful power, as it represents actual energy or time dissipated or “used” by the load in question. Another type of power is reactive power, which is caused by inductance or capacitance, which leads to a phase shift between voltage and current. To demonstrate how a lagging power factor causes “wasted” power, it would be helpful to look at some waveforms. For a purely resistive load, the voltage and current are in phase, so no power is wasted (P=VI is never zero at any point).

eli

The above image captures the concept of leading and lagging power factor (leading and lagging is always in reference to the current waveform). For a purely inductive load, the current will lag because the inductor will create a “back EMF” or inertial voltage to oppose changes in current. This EMF leads to a current within the inductor, but only comes from the initial voltage. It can also be seen that this EMF is proportional to the rate of change of the current, so when the current is zero the voltage is maximum. For a capacitive load, the power factor is leading. A capacitor must charge up with current before establishing a voltage across the plates. This explains the PF “leading” or “lagging”. Most of the time, when power factor is decreased it is because the PF is lagging due to induction motors. To account for this, capacitors are used as part of power factor correction.

The third type of power is apparent power, which is the complex combination of real and reactive power.

triangle

The power factor is the cosine of the angle made in this triangle. Therefore, as the PF angle is increased the power factor decreases. The power factor is maximum when the reactive power is zero. Ideally, the PF would be between 0.95 and 1, but for many industrial buildings this can fall to even 0.7. This leads to higher electric bills for this buildings because having a lower power factor leads to increases current in the power lines leading to the building which causes higher losses in the lines. It also leads to voltage drops and wastage of energy. To conserve energy, power factor correction must be employed. Often capacitors are used in conjunction with contactors that are controlled by regulators that measure power factor. When necessary, the contactors will be switched on and allow the capacitors to improve the power factor.

For linear loads, power factor is called as displacement power factor, as it only accounts for the phase difference between the voltage and current. For nonlinear loads, harmonics are added to the output. This is because nonlinear loads cause distortion, which changes the shape of the output sinusoids. Nonlinear loads and power factor will be explored in a subsequent post.

RFID – Radio Frequency Identification

RFID is an important concept in the modern era. The basic principle of operation is simple: radio waves are sent out from an RF reader to an RFID tag in order to track or identify the object, whether it is a supermarket item, a car, or an Alzheimer patient.

RFID tags are subdivided into three main categories: Active, passive and semipassive. Active RFID tags employ a battery to power them whereas passive tags utilize the incoming radio wave as a power source. The semipassive tag also employs a battery source, but relies on the RFID reader signal as a return signal. For this reason, the active and semi passive tags have a greater range than the passive type. The passive types are more compact and also cheaper and for this reason are more common than the other two types. The RFID picks up the incoming radio waves with an antenna which then directs the electrical signal to a transponder. Transponders receive RF/Microwaves and transmit a signal of a different frequency. After the transponder is the rectifier circuit, which uses a DC current to charge a capacitor which (for the passive tag) is used to power the device.

The RFID reader consists of a microcontroller, an RF signal generator and a receiver. Both the transmitter and receiver have an antennas which convert radio waves to electrical currents and vice versa.

The following table shows frequencies and ranges for the various bands used in RFID

RFIDtable

As expected, lower frequencies travel further distances. The lower frequencies tend to be used for the passive type of RFID tags.

For LF and HF tags, the working principle is inductive coupling whereas with the UHF and Microwave, the principle is electromagnetic coupling. The following image shows inductive coupling.

inductive coupling

A transformer is formed between the two coils of the reader and tag. The transformer links the two circuits together through electromagnetic induction. This is also known as near field coupling.

Far field coupling/radiative coupling uses backscatter by reradiating from the tag to the reader. This depends on the load matching, so changing the load impedance will change the intensity of the return wave. The load condition can be changed according to the data in order for the data to be sent back to the reader. This is known as backscatter modulation.

Using GIT – Introduction

Git is essentially a version control system for tracking changes in computer files. This can be used in conjunction with Visual Studio to program in C#, for example. Git can be accessed through commands through the command window in windows. Git is generally to coordinate changes to code between multiple developers and is also used to work in a local repository which is then “pushed” to a remote depository such as Github.com

Git tracks changes to files by taking snapshots. This is done by the user by typing “git commit ….” in the command prompt. The files should be added to the staging area first by using the command “git add <filename>”. “Git push” and “git pull” are used to interact with the remote repository. “Git clone” will copy and download a repository to your local machine. Git saves every version that gets committed, so a previous version can always be accessed if necessary. The following image illustrates the concept of committing.

gitcommit

You can essentially “branch” your commits which can later be merged together by using “git commit” command with multiple parents. The master branch is the main/linear list of saves. This can be done in the remote repository or the local. A “pull request” essential means taking changes that were made in a certain branch and pulling them into another branch. This means multiple people can be editing multiple branches which can then be merged together.

Git is extremely useful for collaboration (as with websites such as google docs) where multiple authors can work on something at the same time. It also is excellent for keeping track of the history of projects.

Mobility and Saturation Velocity in Semiconductors

In solid state physics, mobility describes how quickly a charge carrier can move within a semiconductor device when in the presence of a force (electric field). When an electric field is applied, the particles begin to move at a certain drift velocity, given by the mobility of the carrier (electron or hole) and electric field. The equation can be written as: density

This is also related to Ohm’s law in point form, which is the conductivity multiplied by the Electric field. This shows that the conductivity of a material is related to the number of charge carriers as well as their mobility within the material. Mobility is heavily dependent on doping, which introduces defects to the material. This means that intrinsic semiconductor material (Si or Ge) has higher mobility, but this is a paradox due to the fact that intrinsic semiconductor has no charge carriers. In addition, mobility is inversely proportional to mass, so a heavier particles will move at a slower rate.

Phonons also contribute to a loss of mobility due to an effect known as “Lattice Scattering”. When the temperature of semiconductor material is raised above absolute zero, the atoms vibrate and create phonons. The higher the temperature, the more phonon particles which means greater collisions and lower mobility.

Saturation velocity refers to the maximum velocity a charge carrier can travel within a semiconductor in the presence of a strong electric field. As previously stated, the velocity is proportional to mobility, but with increasing electric field there reaches a point where the velocity saturates. From this point, increasing the field only leads to more collisions with the lattice structure and phonons, which does not help the drift speed. Different semiconductor materials have different saturation velocities and are strong functions of impurities.

Transistor IV curves and Modes of Operation/Biasing

In the field of electronics, the most important active device is without a doubt the transistor. A transistor acts as a ON/OFF switch or as an amplifier. It is important to understand the modes of operation for these devices, both voltage controlled (FET) and current controlled (BJT).

For the MOSFET, the cutoff region is where no current flows through the inversion channel and functions as an open switch. The “Ohmic” or linear region, the drain-source current increases linearly with the drain-source voltage. In this region, the FET is acting as a closed switch or “ON” state. The “Saturation” region is where the drain-source current stays roughly constant despite the drain source voltage increasing. This region has the FET functioning as an amplifier.

ivcurve

The image above illustrates that for an enhancement mode FET, the gate-source voltage must be higher than a certain threshold voltage for the device to conduct. Before that happens, there is no channel for charge to flow. From there, the device enters the linear region until the drain-source voltage is high enough to be in saturation.

DC biasing is an extremely important topic in electronics. For example, if a designer wishes for the transistor to operate as an amplifier, the FET must stay within the saturation region. To achieve this, a biasing circuit is implemented. Another condition which effects the operating point of the transistor is temperature, but this can be mitigated with a DC bias circuit as well (this is known as stabilization). “Stability factor” is a measure of how well the biasing circuit achieves this effect. Biasing a MOSFET changes its DC operating point or Q point and is usually implemented with a simple voltage divider circuit. This can be done with a single DC voltage supply.  The following voltage transfer curve shows that the MOSFET amplifies best in the saturation region with less distortion than the triode/ohmic region.

output