Wednesday, May 18, 2011

Noise in Electrical Circuits

Q1. What is meant by normal mode & common mode noise?

• Normal Mode -- an indication of a differential change at the inputs of the measuring instrument
• Common Mode -- an indication of an equal change on both inputs of the measuring instrument



• Normal-Mode Rejection Ratio (NMRR) -- describes the ability of the instrument to reject a normal (differential) signal, it is given by the following formula:
NMRR = 20 log (Vmeasured/Vin)

where Vin is applied differentially to the instrument inputs, and Vmeasured is the value indicated by the DMM. This specification is useful for measurement systems that have filters to eliminate signals at a given frequency or over a range of frequencies. For systems that do not have filters, the NMRR is 0 dB. This specification, which is often used to indicate the capability of the instrument to reject 50 or 60 Hz, is valid only at the specified frequency and useful only when making DC measurements.

For example, if you are measuring 1 mVDC with a DMM that specifies a NMRR of 130 dB at 60 Hz, and you have a normal-mode interference (noise) of 100 mVrms, then your resulting measurement error is 31.6nV

which is 0.003 percent of your measured signal instead of the 10,000 percent error that the 100 mV interference implies.
• Common-Mode Rejection Ratio (CMRR) -- a measure of the capability of an instrument to reject a signal that is common to both input leads. For instance, if you are measuring a thermocouple in a noisy environment, the noise from the environment appears on both input leads. Therefore, this noise is a common-mode signal that is rejected by the CMRR of the instrument. The CMRR is defined by the following equation:
CMRR = 20 log (Differential Gain/Common Mode Gain)

This specification is very important because it indicates how much of the common-mode signal will affect your measurement. CMRR is also frequency dependent.

Q2. What is quantisation error?

Quantization is defined as the process of converting an analog signal to a digital representation. Quantization is performed by an analog-to-digital converter (A/D converter or ADC).
The time resolution we have is limited by the maximum sampling rate of the ADC. Even if we were able to increase our sampling rate forever, it would still never be purely “continuous time” as is our input signal. For most real world applications, this is still very useful despite its limited nature. But obviously the usefulness of our digital representation increases as our time and amplitude resolution increases. The amplitude resolution is limited by the number of discrete output levels an ADC has.

For example, a 3-bit ADC divides the range into 23 or eight divisions. A binary or digital code between 000 and 111 represents each division. The ADC translates each measurement of the analog signal to one of the digital divisions. To increase the ADC number of divisions from eight (23) to 65,536 (216) allows the 16-bit ADC to obtain an extremely accurate representation of the analog signal. This inherent uncertainty in digitizing an analog value is referred to as the Quantization error. The quantization error depends on the number of bits in the converter, along with its errors, noise, and non-linearities.

Q3. What is dithering?

During Quantization, in the time domain, we could almost completely preserve the waveform information by sampling fast enough. In the amplitude domain we can preserve most of the waveform information by dithering.

Dithering involves the deliberate addition of noise to our input signal. It helps by smearing out the little differences in amplitude resolution. The key is to add random noise in a way that makes the signal bounce back and forth between successive levels. Of course, this in itself just makes the signal noisier. But, the signal smoothes out by averaging this noise digitally once the signal is acquired.




Q4. Name some common noise reduction strategies. What is noise floor?

1. Keep the source resistance and the amplifier input resistance as low as possible. Using high value resistances will increase thermal noise proportionally.
2. Total thermal noise is also a function of the bandwidth of the circuit. Therefore, reducing the bandwidth of the circuit to a minimum will also minimize noise. But this job must be done mindfully because signals have a Fourier spectrum that must be preserved for accurate measurement. The solution is to match the bandwidth to the frequency response required for the input signal.
3. Prevent external noise from affecting the performance of the system by appropriate use of grounding, shielding, cabling, careful physical placement of wires and filtering.
4. Use a low-noise amplifier in the input stage of the system.
5. For some semiconductor circuits, use the lowest DC power supply potential that will do the job.
The noise floor of a measurement device is the measured noise level with its inputs grounded.

Q5. What is electrical & safety isolation. What are ground loops, common mode voltage?

Isolation is a means of physically and electrically separating two parts of a measurement device, and can be categorized into electrical and safety isolation. Electrical isolation pertains to eliminating ground paths between two electrical systems. By providing electrical isolation, you can break ground loops, increase the common-mode range of the data acquisition system, and level shift the signal ground reference to a single system ground. Safety isolation references standards have specific requirements for isolating humans from contact with hazardous voltages. It also characterizes the ability of an electrical system to prevent high voltages and transient voltages from transmitting across its boundary to other electrical systems with which you can come in contact.

Incorporating isolation into a DAQ system has three primary functions: preventing ground loops, rejecting common-mode voltage, and providing safety.
Ground Loops
Ground loops are the most common source of noise in data acquisition applications. They occur when two connected terminals in a circuit are at different ground potentials, causing current to flow between the two points. To avoid ground loops, ensure that there is only one ground reference in the measurement system, or use isolated measurement hardware. Using isolated hardware eliminates the path between the ground of the signal source and the measurement device, therefore preventing any current from flowing between multiple ground points.
Common-Mode Voltage
An ideal differential measurement system responds only to the potential difference between its two terminals, the (+) and (-) inputs. The differential voltage across the circuit pair is the desired signal, yet an unwanted signal can exist that is common to both sides of a differential circuit pair. This voltage is known as common-mode voltage. An ideal differential measurement system completely rejects, rather than measures, the common-mode voltage. Practical devices, however, have several limitations described by parameters such as common-mode voltage range and common-mode rejection ratio (CMRR), which limit this ability to reject the common-mode voltage.
CMRR (dB) = 20 log (Differential Gain/Common-Mode Gain).

Q6. What types of isolation are used in Data Acquisition Systems?

There are three basic types of isolation that can be used in a data acquisition system:

Optical Isolation
Optical isolation is common in digital isolation systems. The media for transmitting the signal is light and the physical isolation barrier is typically an air gap. The light intensity is proportional to the measured signal. The light signal is transmitted across the isolation barrier and detected by a photoconductive element on the opposite side of the isolation barrier.


Electromagnetic Isolation
Electromagnetic isolation uses a transformer to couple a signal across an isolation barrier by generating an electromagnetic field proportional to the electrical signal. The field is created and detected by a pair of conductive coils. The physical barrier can be air or some other form of non-conductive barrier.


Capacitive Isolation
Capacitive coupling is another form of isolation. An electromagnetic field changes the level of charge on the capacitor. This charge is detected across the barrier and is proportional to the level of the measured signal.

Q6. What is the formula for signal to noise ratio?

It is expressed as SNR = 10 log 10 (Vs/Vn) where
Vs = RMS value of signal voltage
Vn = RMS value of noise voltage


Q7. How can the sensor ground loop problem occur?

Occasionally, you may get a ground loop problem. This happens when:
• The signal of the sensor is earthed locally.
• AND the acquisition system measures the sensor’s voltage with regard to the ground, its local ground

Ground loop
What one may not realise is that the electrical potential of the ground can vary significantly within the same building. This means there can be a potential difference (i.e. voltage) between the ground at the sensor’s end, and the ground at the acquisition end. It can easily by 1 Volt. Not a big value? Well, if it’s added to the few Volts representing the sensor’s measurement, it changes significantly the value read by the control system. The other consequence is the induced current. Ohm’s law says the current is voltage divided by the wire resistance, which for a long conductor may be 1 Ohm. Our 1 Volt turns into 1 Amp circulating in a loop through the sensor and the control system, potentially damaging the electronics.
Control systems are normally designed to avoid ground loops. Sensors themselves are either powered on the acquisition side or provide floating / non-referenced signals. But occasionally poor or damaged wiring can cause a ground loop. For instance if the cable shield is earthed at both ends: the current going though may not be in a signal wire, but still has the potential to do damage and to induce a voltage into the signal.
In practice, consider ground loops in the following cases. First if a sensor appears not to be working online, test it offline without the potential for ground loop. Second, if the sensor provides silly values intermittently, seemingly working fine the rest of the time, you may have a ground loop or another noise problem. Third, when checking independently the process, you may use a portable or PC-based signal logger. That’s where the greatest danger of ground loop is: the logging system, if not battery operated, is most likely earthed and you must make sure you use “differential input” as a form of signal conditioning (as opposed to ground-referenced single ended)

Sensor Selection

Q1. What is the difference between an incremental and absolute rotary encoder?

Incremental Encoder – measure change in position.
Absolute Encoder – determine absolute position of an object

Q2. How is the PPR of the encoder selected?

The minimum ppr should produce more than 25000Hz at rated speed & less than 300000Hz at 1.2 times rated speed. So if Rated RPM = 1000
PPRmin = 25000x 60/RatedRPM=1500ppr
PPRmax=300000x60/RatedRPMx1.2=15000ppr

Q3. What is the principle of Hall effect current sensor? How is the hall effect sensor different from the rotary encoder ?

The Hall effect sensor is based on the principle that a voltage (VH) is created when current (Ic) flows in a direction perpendicular to a magnetic field (B). Hall effect sensor is used to sense feedback from DC brushless motors. Encoders are used to sense feedback from ac brushless motors. If used to commutate a brushless DC motor an optical encoder must also be enhanced with supplementary commutation tracks.

Q4. State some important sensor characteristics

Sensitivity : Change in output signals to input signals
Span : Range of input physical signals that may be converted to electrical signals
Accuracy: Largest expected error between actual & ideal output signals
Hysteresis: Width of the expected error in terms of measured quantity
Nonlinearity: The max deviation from a linear TF over the specified dynamic range.
Resolution : Max detectable signal fluctuation.

Q5. Name the ways in which EMI/EMC is generated in circuits.

EMI/EMC can occur due to
1. Switching On/Off of currents in a circuit. V = Ldi/dt
2. Magnetic Fields : In AC circuits, currents flowing in & out of the conductor causes EMI in nearby conductors.
3. By conduction through the wires that the electronics uses.

Q6. In what ways can we shield from EMI/EMC?

Shielding – By grounding the conducting plates to the earth.
Metal plates shield against magnetic field. Nonferromagnetic metals have no effect on magnetic fields below 10MHz in frequency. Metals like Aluminium are transparent to these fields. The material must be ferromagnetic, i.e. with low magnetic reluctance, so it conducts the magnetic field.
Snubber networks –These are combinations of resistors & capacitors connected across the source of electrical noise or to be protected from the spikes.
It reduces the voltage generated across the MOSFET
It reduces the rate of voltage change.
Suppression : It is the process of adding components that dampen noise
To dampen high freq noise, inductance is added in series. Ferrite beads can be used.

Q7. What is the use of emissivity & susceptibility tests?

The emissions test (CE &RE) record any undesireable emissions from the test article.
The susceptibility test (CS &RS) record the article’s ability to operate in a typical operating environment.

Q8. What are the coupling mechanisms for EMI/EMC
They are
Conduction – Electric current
Radiation – Electromagnetic field
Capacitive coupling – By an Electric field
Inductive coupling – By Magnetic field
Electric Field coupling is caused by a voltage difference between conductors. The coupling may be modelled by a capacitor.
Magnetic Field coupling is caused by current flow in conductors. The coupling mechanism may be modelled by a transformer.
Most conducted coupling from external sources occurs through ac power lines.

Q9. Explain what are Differential mode interference & Common mode interference

Common mode interference occurs between all lines in a cable & reference potential , It occurs at high frequencies of 1MHz & up.
Differential mode interference occurs between 2 lines (L-L & L-N). It occurs at low frequencies upto several KHz.

Q10. What are optical fibres ? How much is the attenuation in OF? What is splicing?

They are wave guiding devices used to confine & guide light. They are made of silica glass cores surrounded by a cladding which is protected by a jacket. They work on the principle of total internal reflection. The composition of the cladding glass relative to the core glass determines the fibre’s ability to reflect light. The refractive index of the core is increased by doping it. The attenuation of signal strength is 0.35dB/Km at 1300nm wavelength of light. An optical signal can travel more than 100Km without regeneration or amplification. Attenuation is caused by scattering & absorption. Splicing objective is to match the core of one optical fibre with that of another in order to produce a smooth junction through which light signals can continue without alteration & interruption.

Q11. What are the advantages of OF over wired cable?

1) It has greater bandwidth & capacity
2) It provides electrical isolation
3) It has low error rate
4) Greater immunity to external influences
5) Greater immunity to interference & crosstalk
It is instructive to compare fiber to copper. Fiber has many advantages. To start with, it can handle much higher bandwidths than copper. This alone would require its use in high-end networks. Due to the low attenuation, repeaters are needed only about every 50 km on long lines, versus about every 5 km for copper, a substantial cost saving. Fiber also has the advantage of not being affected by power surges, electromagnetic interference, or power failures. Nor is it affected by corrosive chemicals in the air, making it ideal for harsh factory
environments. Oddly enough, telephone companies like fiber for a different reason: it is thin and lightweight.

Q12. Name some Optical detectors & Optical Sources used in FOC systems

2 types of photodiodes are used as optical detectors

a) P-I-N Photodiode
b) Avalanche Photodiode
Heterojunction LED’s and LASER’s are mostly used as optical sources in FOC communication. Heterojunction means that a p-n junction is formed by a single crystal such that the material on one side of the junction differs from that on the other side of the junction.

Q13. What is the use of multiplexing & name the techniques?

The info carrying capacity of a fibre is increased by multiplexing. There are 3 types of multiplexing techniques:
TDM –Time Division Multiplexing
FDM – Frequency Division Multiplexing
WDM – Wave Division Multiplexing


Q14. Explain the principle of operation of an optocoupler.

It protects the controller from high voltage transients, surge voltage or noise. It consists of an LED and a phototransistor (or darlington pair) in a single 8 pin dual in line package. The LED can be made to emit light by passing forward current. The collector base of the transistor can be used as a photodiode & it produces output current by detecting light.

Q15. What are relays? What are Solid State Relays?

A relay consists of a coil of electromagnet with 2 states – close & open. The current & voltage are higher than a TTL gate can provide. Transistor buffers may be used to drive the relay coils. The problems of electromechanical relays are corrosion of contacts, arcing , contact bounce & slow speed of operation.
A SSR (Solid State Relay) consists of a SCR triggered by infrared light source. They are capable of controlling only ac operated devices like motors or heaters.
IRED (Infra red emitting diode) is used to isolate the control circuit & to trigger the SBS(Silicon Bilateral Switch). IRED is activated by current of 1 -10mA. SBS controls current as high as 40A.

Q16. Name some devices used for isolation & advantages & disadvantages of each.

They are used to isolate a circuit from high voltages & to break ground loops
Exp – Transformer, High voltage capacitors & Opto Isolators
Transformers have analog accuracy of 12 to 16 bits, bandwidth of several KHz and max voltage upto 10KV
Capacitively coupled isolation amplifiers have lower accuracy of 12 bits, lower band width & voltage ratings, are cheap.
Optical isolators are fast & cheap 4-7KV but have poor analog linearity.



Q17. What is meant by resolution & digit count , sensitivity , accuracy & precision of an instrument?


Resolution -- the smallest amount of input signal change that the instrument can detect reliably. This term is determined by the instrument noise (either circuit or quantization noise). For example, if you have a noiseless voltmeter that has 5 1/2 digits displayed and is set to the 20 V input range, the resolution of this voltmeter is 100 µV. This can be determined by looking at the change associated with the least significant digit.
Digits Displayed and Overranging -- the number of digits displayed by the readout of a DMM. It is often specified as a certain number of full digits (i.e. digits that can display values from 0 to 9) and an additional overrange digit referred to as a 1/2 digit. That 1/2 digit typically shows only the values 0 or 1. For example, a 6 1/2 digit display has a 7-digit readout, but the most significant digit can read 0 or 1 while the other 6 digits can take any value from 0 to 9. Hence, the range of counts is ±1,999,999. This should not be confused with resolution; a DMM can have many more digits displayed than its effective resolution.
• Sensitivity -- a measure of the smallest signal the instrument can measure. Usually, this is defined at the lowest range setting of the instrument. For example, an AC meter with a lowest measurement range of 10 V may be able to measure signals with 1 mV resolution but the smallest detectable voltage it can measure may be 15 mV. In this case, the AC meter has a resolution of 1 mV but a sensitivity of 15 mV.
• Accuracy -- a measure of the capability of the instrument to faithfully indicate the value of the measured signal. This term is not related to resolution; however, it can never be better than the resolution of the instrument. The accuracy is often specified as:

• Accuracy -- a measure of the capability of the instrument to faithfully indicate the value of the measured signal. This term is not related to resolution; however, it can never be better than the resolution of the instrument. The accuracy is often specified as:

For example, a 5 1/2 digit voltmeter can have an accuracy of 0.0125% of reading + 24 µV on its 2.5 V range which results in an error of 149 µV when measuring a 1V signal. On the other hand, the resolution of this same voltmeter is 12 µV, 12 times better than the accuracy. Keep in mind that the accuracy of your measurement is affected by several factors and we will discuss these factors later in this paper.
• Precision -- a measure of the stability of the instrument and its capability of resulting in the same measurement over and over again for the same input signal. It is given by:

where Xn = the value of the nth measurement
and Av(Xn) = the average value of the set of n measurement.

Transmission Protocols

Q10. What are the basic differences between RS232, RS485 and RS422 serial transmission protocols?

Simplex can be viewed as a communications "one-way street". Data only flows in one direction. That is to say, a device can be a receiver or a transmitter exclusively. A simplex device is not a transceiver. A good example of simplex communications is an FM radio station and your car radio. Information flows only in one direction where the radio station is the transmitter and the receiver is your car radio. Simplex is not often used in computer communications because there is no way to verify when or if data is received. However, simplex communications is a very efficient way to distributed vast amounts of information to a large number of receivers.
Duplex communications overcome the limits of Simplex communications by allowing the devices to act as transceivers. Duplex communication data flow in both directions thereby allowing verification and control of data reception/transmission. Exactly when data flows bi-directionally further defines Duplex communications.
Full Duplex devices can transmit and receive data at the same time. RS232 is a fine example of Full Duplex communications. There are separate transmit and receive signal lines that allow data to flow in both directions simultaneously. RS422 devices also operate Full Duplex.
Half Duplex devices have the dubious honor of allowing both transmission and receiving, but not at the same time. Essentially only one device can transmit at a time while all other half duplex devices receive. Devices operate as transceivers, but not simultaneous transmit and receive. RS485 operates in a half duplex manner.


Here is the short version of the critical specifications. Unfortunately, these are subject to interpretation by individual manufacturers. That is why RS232 is often regarded as an incredibly un-standard communications protocol.
One important note. You will see that one of the major differences between RS232 and RS422/RS485 is the signaling mode. RS232 is unbalanced while RS422/RS485 is balanced. An unbalanced signal is represented by a single signal wire where a voltage level on that one wire is used to transmit/receive binary 1 and 0: the can be considered a push signal driver. On the other hand, a balanced signal is represented by a pair of wires where a voltage difference is used to transmit/receive binary information: sort of a push-pull signal driver. In short, unbalanced voltage level signal travels slower and shorter than a balanced voltage difference signal.

Q11. What is the difference between baud rate and data rate?

A data transfer rate (or often just data rate) is the amount of digital data that is moved from one place to another in a given time, usually in a second's time. The data transfer rate can be viewed as the speed of travel of a given amount of data from one place to another. In general, the greater the bandwidth of a given path, the higher the data transfer rate.

In telecommunications, data transfer is usually measured in bits per second. For example, a typical low-speed connection to the Internet may be 33.6 kilobits per second (Kbps). On Ethernet local area networks, data transfer can be as fast as 10 megabits per second. Network switches are planned that will transfer data in the terabit range. In earlier telecommunication systems, data transfer was sometimes measured in characters or blocks (of a certain size) per second. Data transfer time between the microprocessor or RAM and devices such as the hard disk and CD-ROM player is usually measured in milliseconds.

In computers, data transfer is often measured in bytes per second. The highest data transfer rate to date is 14 terabits per second over a single optical fiber, reported by Japan's Nippon Telegraph and Telephone (NTT DoComo) in 2006.

BAUD RATE: In telecommunications and electronics, baud (pronounced /bɔːd/ unit symbol "Bd"), is a measure of the symbol rate; that is, the number of distinct symbol changes (signalling events) made to the transmission medium per second in a digitally modulated signal. The term baud rate is also commonly used to refer to the symbol rate.

The baud rate (symbol rate) is distinct from the bit rate, because one symbol may carry more than one bit of information. For example, in modems, where bandwidth efficiency is important, it is commonly arranged for one symbol to carry 3 or more bits. So a 3000 bit per second modem, which is transmitting symbols that each carry 3 bits, should be described as operating at 1000 baud. Conversely, direct-sequencespread spectrum operation requires many symbols to carry only one bit.

Unfortunately, this distinction is not widely understood. Early modems operated only at one bit per symbol, and so baud rate and bit rate for those devices were equivalent. This has led many to believe the two terms to be synonymous, which they are not.

Conveying more than one bit per symbol has advantages. This reduces the time required to send a given quantity of data, and allows modern modems, FDDI and 100/1000 Mbit/s Ethernet LANs, and so on, to achieve high data rates. An optimal symbol set design must take into account channel bandwidth, desired information rate, noise characteristics of the channel and the receiver, and receiver and decoder complexity. A typical 2400 bit/s modem actually transmits at 600 baud (600 symbol/s), where each quadrature amplitude modulation symbol carries four bits of information. And further, 1000 Mbit/s Ethernet LAN cables use multiple wire pairs and multiple bits per symbol to encode their data payloads. Specifically, 1000BASE-T uses 4 wire pairs and 2 data bits per symbol to get a symbol rate of 125MBaud.

Conversely, representing one bit by many symbols has the advantage of overcoming signal noise, particularly radio jamming, hence is commonplace in military radio, despite the disadvantage of using more bandwidth to carry the same bit rate.
Baud is a measurement of transmission speed in asynchronous communication. Because of advances in modem communication technology, this term is frequently misused when describing the data rates in newer devices.
Traditionally, a Baud Rate represents the number of bits that are actually being sent over the media, not the amount of data that is actually moved from one DTE device to the other. The Baud count includes the overhead bits Start, Stop and Parity that are generated by the sending UART and removed by the receiving UART. This means that seven-bit words of data actually take 10 bits to be completely transmitted. Therefore, a modem capable of moving 300 bits per second from one place to another can normally only move 30 7-bit words if Parity is used and one Start and Stop bit are present.
If 8-bit data words are used and Parity bits are also used, the data rate falls to 27.27 words per second, because it now takes 11 bits to send the eight-bit words, and the modem still only sends 300 bits per second.
The formula for converting bytes per second into a baud rate and vice versa was simple until error-correcting modems came along. These modems receive the serial stream of bits from the UART in the host computer (even when internal modems are used the data is still frequently serialized) and converts the bits back into bytes. These bytes are then combined into packets and sent over the phone line using a Synchronous transmission method. This means that the Stop, Start, and Parity bits added by the UART in the DTE (the computer) were removed by the modem before transmission by the sending modem. When these bytes are received by the remote modem, the remote modem adds Start, Stop and Parity bits to the words, converts them to a serial format and then sends them to the receiving UART in the remote computer, who then strips the Start, Stop and Parity bits.
The reason all these extra conversions are done is so that the two modems can perform error correction, which means that the receiving modem is able to ask the sending modem to resend a block of data that was not received with the correct checksum. This checking is handled by the modems, and the DTE devices are usually unaware that the process is occurring.
By striping the Start, Stop and Parity bits, the additional bits of data that the two modems must share between themselves to perform error-correction are mostly concealed from the effective transmission rate seen by the sending and receiving DTE equipment. For example, if a modem sends ten 7-bit words to another modem without including the Start, Stop and Parity bits, the sending modem will be able to add 30 bits of its own information that the receiving modem can use to do error-correction without impacting the transmission speed of the real data.
The use of the term Baud is further confused by modems that perform compression. A single 8-bit word passed over the telephone line might represent a dozen words that were transmitted to the sending modem. The receiving modem will expand the data back to its original content and pass that data to the receiving DTE.
Modern modems also include buffers that allow the rate that bits move across the phone line (DCE to DCE) to be a different speed than the speed that the bits move between the DTE and DCE on both ends of the conversation. Normally the speed between the DTE and DCE is higher than the DCE to DCE speed because of the use of compression by the modems.
Because the number of bits needed to describe a byte varied during the trip between the two machines plus the differing bits-per-seconds speeds that are used present on the DTE-DCE and DCE-DCE links, the usage of the term Baud to describe the overall communication speed causes problems and can misrepresent the true transmission speed. So Bits Per Second (bps) is the correct term to use to describe the transmission rate seen at the DCE to DCE interface and Baud or Bits Per Second are acceptable terms to use when a connection is made between two systems with a wired connection, or if a modem is in use that is not performing error-correction or compression.
Modern high speed modems (2400, 9600, 14,400, and 19,200bps) in reality still operate at or below 2400 baud, or more accurately, 2400 Symbols per second. High speed modem are able to encode more bits of data into each Symbol using a technique called Constellation Stuffing, which is why the effective bits per second rate of the modem is higher, but the modem continues to operate within the limited audio bandwidth that the telephone system provides. Modems operating at 28,800 and higher speeds have variable Symbol rates, but the technique is the same.

Q12. What is asynchronous serial transmission?

Asynchronous transmission allows data to be transmitted without the sender having to send a clock signal to the receiver. Instead, the sender and receiver must agree on timing parameters in advance and special bits are added to each word which are used to synchronize the sending and receiving units.
When a word is given to the UART for Asynchronous transmissions, a bit called the "Start Bit" is added to the beginning of each word that is to be transmitted. The Start Bit is used to alert the receiver that a word of data is about to be sent, and to force the clock in the receiver into synchronization with the clock in the transmitter. These two clocks must be accurate enough to not have the frequency drift by more than 10% during the transmission of the remaining bits in the word. (This requirement was set in the days of mechanical teleprinters and is easily met by modern electronic equipment.)
After the Start Bit, the individual bits of the word of data are sent, with the Least Significant Bit (LSB) being sent first. Each bit in the transmission is transmitted for exactly the same amount of time as all of the other bits, and the receiver “looks” at the wire at approximately halfway through the period assigned to each bit to determine if the bit is a 1 or a 0. For example, if it takes two seconds to send each bit, the receiver will examine the signal to determine if it is a 1 or a 0 after one second has passed, then it will wait two seconds and then examine the value of the next bit, and so on.
The sender does not know when the receiver has “looked” at the value of the bit. The sender only knows when the clock says to begin transmitting the next bit of the word.
When the entire data word has been sent, the transmitter may add a Parity Bit that the transmitter generates. The Parity Bit may be used by the receiver to perform simple error checking. Then at least one Stop Bit is sent by the transmitter.
When the receiver has received all of the bits in the data word, it may check for the Parity Bits (both sender and receiver must agree on whether a Parity Bit is to be used), and then the receiver looks for a Stop Bit. If the Stop Bit does not appear when it is supposed to, the UART considers the entire word to be garbled and will report a Framing Error to the host processor when the data word is read. The usual cause of a Framing Error is that the sender and receiver clocks were not running at the same speed, or that the signal was interrupted.
Regardless of whether the data was received correctly or not, the UART automatically discards the Start, Parity and Stop bits. If the sender and receiver are configured identically, these bits are not passed to the host.
If another word is ready for transmission, the Start Bit for the new word can be sent as soon as the Stop Bit for the previous word has been sent.
Because asynchronous data is “self synchronizing”, if there is no data to transmit, the transmission line can be idle.

Microprocessor & Microcontroller based control systems

Q1. How is an 8 bit microprocessor different from a 32 or 64 bit one?

In a 8 bit up 8 bits of data are read at a time, in a 32 & 64 bit one 32 & 64 bits of data are read at a time.



Q2 What are the modes of data transfer in ups?
Types of data transfer modes are
1) Synchronous mode
2) Asynchronous mode
3) Interrupt driven mode
In Asynchronous mode the MPU initiates data transfer by requesting the device to get ready & then goes on checking its status. This is known as handshaking mode of data transfer.
Synchronous mode is used for devices whose timing characteristics are known. In a synchronous transmission, there are no START or STOP bits appended to the data stream, and there is no idle period. As with asynchronous transmission the data rates on receiving and transmitting have to be in sync. However, unlike the separate clocks used in an asynchronous transfer, the devices involved in a synchronous transmission are synchronizing off one common clock that does not start and stop with each new frame (and on some boards there may be an entirely separate clock line for the serial interface to coordinate the transfer of bits). In some synchronous serial interfaces, if there is no separate clock line, the clock signal may even be transmitted along with the data bits.

The universal asynchronous receiver-transmitter (UART) is an example of a serial interface that does asynchronous serial transmission, whereas serial peripheral interface (SPI) is an example of a synchronous serial interface.

In Interrupt driven mode an interrupt is generated on the Interrupt line. The Interrupt service subroutine saves the processor status on the stack, completes the data transfer with the IO responsible for interrupt, restores the processor status & returns to the original program.

Q3. What is the function of 8251 chip?

8251 is a serial interface chip. USART(Universal Synchronous Asynchronous Receiver Transmitter) . It accepts parallel data from the USART, converts it into serial form according to specified format. At the same time it receives serial data & converts it to parallel form for the MPU.

Q4. What are the features of RS232C?

It is a commonly used serial communication interface for binary data interchange. It is a single ended, bipolar voltage unterminated circuit. A single wire carries the signal
+3 to +25V – Logic 0
-3 to -25V – Logic 1
Voltage levels are not TTL compatible. This needs separate voltage supplies for level conversion from TTL to RS232C & vice versa. ±12V supplies are used to get a reasonable threshold between high & low logic levels. Single ended unterminated configuration is susceptible to all forms of EMI. RS232C allows data interchange over short distances upto 50 feet. In Controller chip for Rs232C to TTL & TTL to RS232C conversion are required (MC1488, MC1489)
The core of the RS-232 specification is called the RS-232 interface (see Figure 4.9). The RS-232 interface defines the details of the serial port and the signals, along with some additional circuitry that maps signals from a synchronous serial interface (such as SPI) or an asynchronous serial interface (such as UART) to the serial port and by extension to the I/O device itself. By defining the details of the serial port, RS-232 also defines the transmission medium, which is the serial cable. The same RS-232 interface must exist on both sides of a serial communication transmission (DTE and DCE or embedded board and I/O device), connected by an RS-232 serial cable, in order for this scheme to work.

Two DTE devices can interconnect to each other using an internal wiring variation on serial
cables called null modem serial cables. Since DTE devices transmit and receive data on the
same pins, these null modem pins are swapped so that the transmit and receive connections on each DTE device are coordinated.

Q5. What are the features of RS422 ? What is the 802.11 Wireless LAN Standard?

RS422 is a differential balanced voltage interface. It permits data rates upto 10 MBaud over 40 feet or 100 KBaud over 4000 feet.
Output voltage – 2 to 6V
The 802.11 standard was the first attempt to define the way Information Technology— wireless data from a network should be sent. The standard Telecommunications and defines operations and interfaces at the MAC (Media Access Information Exchange between Systems— Control) and PHY (physical interface) levels in a TCP/IP Local and Metropolitan Area Network— network. There are three PHY layer interfaces defined (one Specific Requirements—Part 11: Wireless IR and two radio: Frequency-Hopping Spread Spectrum LAN Medium Access Control (MAC) and [FHSS] and Direct Sequence Spread Spectrum [DSSS]), and Physical Layer (PHY) Specifications the three do not interoperate. Use CSMA/CA (carrier sense multiple access with collision avoidance) as the basic medium access scheme for link sharing, phase-shift keying (PSK) for modulation.

Q6. What are the 2 types of Microprocessor architectures ?

Van Neumann Architecture- Single data bus used to fetch data & instructions. Program instructions & data are stored in a common main memory. When the controller addresses main memory it first fetches instruction & then the data to support the instruction. 2 separate fetches slows up the controller operation.
Harvard Architecture : Separate data & addresses bus. This allows execution to occur in parallel. As an execution is being prefetched current instruction is executing on data bus. Allows for faster execution.

Q7. What is the function of watch dog timer?

This provides a means of graceful recovery from a system problem. This could be a program that goes into an endless loop, or a hardware problem that prevents the program from operating correctly. If the program fails to reset the watchdog at some predetermined interval , a hardware reset will be initiated , but at least the system has a way to recover. This is specially useful for unattended systems.

Q8. What is the difference between a microprocessor & a microcontroller?

Apart from ALU microcontroller also has inbuilt memory, timers, I/O ports which a microprocessor does not.

Control System

Q11. What is the difference between classical and state space control methods?

Classical control is suitable for single input single output systems whereas state space methods can be useful for linear and non linear time invariant and time varying , multi input multi output systems also.

Q12. In a PID Controller what is the role of P, I and D values ?
Kp is proportional gain which gives a large correction for a large error. Immediate response to errors. It does not affect gain or phase margin.
Ki is Integral Gain which allows the steady state error to be zero & reduces peak overshoot.
It is used to increase the open loop gain at low frequencies.
Kd is the derivative gain which reduces oscillation, makes the system more stable. It also introduces phase lag, increases speed of response, decreases gain margin & amplifies noise. It may result in instability.

Q13. What is sliding control ?
The basic idea is that the control signal changes abruptly on the basis of the state of the system. A control system of this type is also referred to as a variable structure system.

Q14. What is the difference between linear & nonlinear analysis?

One can obtain closed form solutions for linear systems. This is seldom the case for nonlinear systems.

Q15. How does the sampling time affect the response of a continuous time system ?

The D/A converter between the discrete & continuous time process implements holding of the calculated control signal during the time step (sampling interval). This holding implies that the control signal is time delayed by approx h/2. The delay influences the stability of the control loop. Suppose we have tuned a continuous time PID & apply these PID parameters on a discrete time PID Controller, then the control loop will get reduced stability because of the approx delay of h/s. As a rule of thumb the stability reduction is small & tolerable if the time delay is less than 1/10th of the response time of the control system as it would have been with a continuous time controller or a controller having small sampling time.
h/2 < Tr/10
h < Tr/5 ;
h < 1/ 5wb
The response time here is 63% rise time which can be read off from the setpoint step response. For a system having dominating time constant T, the response time is approx equal this time constant. If the bandwidth of the control system is wb ( assuming PID parameters have been found using continuous time PID controller) the response time of the control system can be estimated by
Tr  1/wb

Q16. How are poles and eigenvalues related?

Poles and eigenvalues are equal for most systems not having pole zero cancellation.

Q17. How to handle a nonlinear model ?

If the model is nonlinear it must be linearised before calculating the poles or eigenvalues.

Q18. What is the relation between the transfer function and state space model ?

When we convert the state space model to the transfer function, we observe that the denominator of the transfer function is the determinant of (sI-A).
d(s) = |sI-A|

Q19 What is the condition for stability of a continuous time system & for a discrete time system from its pole locations?

The system is stable if all poles are in the Left hand plane i.e. d(s) = 0 are with all negative real parts. A sampled or discrete time system is stable if all the poles of the closed loop transfer function lie within the unit circle of the z-plane.
In terms of linear systems, we recognize that the stability requirement may be defined in terms of the location of the poles of the closed-loop transfer function.

A necessary and sufficient condition that a feedback system be stable is that all the poles of the system transfer function have negative real parts.

Q19a. What is the Nyquist Criterion?

The Nyquist criterion is a graphical method and deals with the loop gain transfer function, i.e., the open-loop transfer function.

We can determine the stability of the closed-loop system by locating the zeros of 1 + G(s). This result is of prime importance in the following development. For the moment, let us assume that 1 + G(s) is known in factored form so that we have Obviously, if 1 + G(s) were known in factored form, there would be no need for the use of the Nyquist criterion, since we could simply observe whether any of the zeros of 1 + G(s) [which are the poles of Y( s ) /R( s ) ]l,i e in the right half of the s plane. In fact, the primary reason for using the Nyquist criterion is to avoid this factoring. Although it is convenient to think of 1 + G(s) in factored form at this time, no actual use is made of that form.
A c c o r d ing to Nyquist plot stability evaluation methods, a system with no open-loop right half-plane (RHP) poles should have no clockwise (CW) encirclements of the -1 point for stability, and a system with open-loop RHP poles should have as many counter-clockwise (CCW) encirclements as there are open-loop RHP poles

Q19b. What are the properties of Bode plots?

Any information that can be wrenched out of the Bode plots of the loop gain is critically important for two reasons. First, the Bode plots are a natural place to judge the properties of the feedback loop. When the magnitude of the loop gain is large, positive feedback properties such as good disturbance rejection and good sensitivity reduction are obtained. When the magnitude of the loop gain is small, these properties are not enhanced. The work of this chapter completes the missing information about transient response that can be read from the loop gain Bode plots.
Second, it is the Bode plot that we are able to manipulate directly using series compensation techniques. It is important to be able to establish the qualities of the Bode plots that produce positive qualities in a control system because only then can the Bode plots be manipulated to attain the desired qualities.

Q20. How do we map the s-plane to the z-plane

For s =  +jw , we have
z = esT = e +jw
For  < 0 we have |z| < 1 i.e. the left half of the s-plane corresponds to the area within the unit circle in z-plane.

Q21 What is meant by system observability and controllability?

A system is completely controllable if there exists a control input u(t) that can transfer any initial state x(0) to any other desired location x in a finite time. For
X’ = AX + Bu
Y = CX
The system is controllable if the rank of the controllability matrix is n
Pc = rank [ B AB ...... A n-1 B] = n
A system is completely observable if there exists a finite time T such that the initial state x(0) can be determined from the observation history y(t) given the control u(t).
The system is observable if the determinant of the observability matrix Po is non zero.


Po = C
CA
.
.
CA n-1

Q22. What is Optimal Control?

Optimal control is concerned with the design need to minimize a performance index. Exp
J = ∫▒[x^T Qxdt]dt
In Engg systems the bigger the control input, the bigger the energy consumed. To consider the input in the performance index we often define
J = ∫_0^∞▒〖[x^T 〗 Qx+u^T Ru]dt
Where R is a positive definite matrix. Consider full state feedback control
u = -Kx
The performance index can be written as
J = ∫_0^∞▒〖[x^T 〗 Qx+x^T K^T RKx]dt

Q23. What is meant by system transfer function?

The TF of a linear time-invariant system is defined to be the ratio of the Laplace Transform of the output variable to the LT of the input variable under the assumption that all initial conditions are zero.
G(s) = Y(s)/U(s)

Q24. What is meant by system bandwidth? What are the gain and phase margins obtained for the closed loop PID control?

It is a range of frequencies for which system gain is more than -3dB. 20 log(0.7) Such gain is considered adequate for good transmission of signal.

Q25. What is a time invariant system?

If the coefficients of the describing differential equations are constants then the system is time invariant else it is time varying.

Q25a. What are the different types of numerical solver routines available and which one was used here and why?

The numerical solver routine chosen depends on 3 factors
Nature of the model being simulated
Accuracy required in the simulated data
Computing effort available for the simulation study
Common solvers are Fixed step methods Euler’s Method where accuracy is poor, RK4 method and multistep methods like Adams Bashforth and Adam’s Moulton. With single step methods calculation can proceed from any known stage. State x(k) is calculated based on knowledge of state x(k-1).
Multistep methods use the stored values of 2 or more previously calculated states or derivatives in order to compute the derivative approximation for the current time step. They cannot be self starting since the computation cannot proceed from the initial state alone. They also have a strategy to increase or decrease the step size depending on the difference between the predicted and corrected x(k) value. Such variable time step methods are useful if the simulated system possesses local time constants that differ by several orders of magnitude or if there is little prior knowledge about the system response.
Q26. How does a rotary encoder function?
It uses a patterned spinning disc attached to the motor shaft marked with a large number of radial lines like the spokes of a wheel. There are opaque and transparent sectors. As the disk rotates transparent sectors allow light & form square wave pulses. An optical switch like a photodiode or LED generates an electrical pulse whenever one of these lines passes through its field of view. An electronic control circuit counts the pulses to determine the angle by which the shaft has turned. In its simplest form it can only measure change in angle relative to some base point. Another sensor can be added to determine when the shaft passes its 0 position.
Rotation direction is determined by adding a second sensor placed at a different angle around the shaft from the initial sensor. This is called quadrature encoder. Encoders have a 3rd output channel called 0 or reference signal which supplies a single pulse per revolution. This is used for determination of reference position called index pulse.
A quadrature encoder supports 2 output channels (A&B) to sense position, velocity & direction of rotation. Using 2 code tracks with sectors positioned 90 deg out of phase the 2 output channels of the quadrature encoder indicate both position & direction of rotation. If A leads B then it is rotating in one direction & if B leads A then in reverse.
In order to decode the o/p from the quadrature encoders, 2 sequential samples are used. Sample from Time n & n+1. These 2 sets of data points create a 4 bit word that is used for a 16 entry look up table. The table has 4 each gotos for count up, count down, no change, error(overspeed). The no of pulses in a fixed time interval are counted to estimate the velocity & acceleration of the encoder. Once the no of pulses in a fixed time interval is measured, the angular velocity can be calculated using
Velocity = Encoder Pulses x 60/Fixed time interval
Acceleration = Encoder pulses_n – Encoder Pulses_n-1/Pulses per Rev/(Fixed Time Interval )2
Inputs are affected by noise, so each input must be filtered
QEA ------------>Filter---------------
Index-------- Filter----------------
QEB--------Filter------------------
The filtered phase edges are counted by a position counter usually 16 bit up/down counter. To establish a reference point for position & speed measurements the counter can be reset by using an index signal.
Single ended incremental quadrature encodes – A & B signals are referenced to ground so there is 1 wire per signal.
Differential encoder – There are 2 lines per signal A &B – A, A’, B, B’. This is called push pull as all 4 lines supply a known voltage ( either 0 or Vcc). Differential encoders are used in noisy environment as taking differential measurements protects the integrity of the signal.
What is the purpose of the index signal?
The index signal provides the position of the motor & typically a single pulse is generated for every 360 degree of shaft rotation.

Q27. What are the advantages & disadvantages of hydraulic systems as compared to electrical systems.

Heat generated by internal losses is a basic limitation of any machine. Hydraulic components are superior in that the fluid carries away the heat generated.
Hydraulic fluid acts as a lubricant.
There is no phenomenon comparable to saturation & losses in magnetic materials of electrical machines. The torque developed in a electric motor is proportional to current & limited by magnetic saturation. The torque developed in hydraulic actuators is proportional to pressure difference & limited by safe stress levels.
Electric motors are simple lag device from applied voltage to speed. Hydraulic actuators are quadratic resonance from flow to speed with high natural frequency. Hydraulic actuators have high speed of response with fast start , stop & speed reversals.
Hydraulic actuators have high stiffness. This results in great positional stiffness and less position error.
High power to weight ratio
Disadvantages i) Hydraulic power is not so readily available as that of electrical power
ii) Contamination & leakage of hydraulic fluid

Q28. Define delay time, Rise Time & Settling Time

Delay Time : The time required for the response to reach half the final value the 1st time
Rise Time : Time taken for the response to rise from 10% to 90% of final value.
Settling Time : Time taken for the response to reach and stay within 2-5% of its final value.

Q29. What are the features of a servovalve & how is it different from proportional valves?

Single stage servovalves consist of a torque motor which is directly attached to & positions a spool valve. 2 Stage servovalves have a hydraulic preamplifier (first stage) which multiplies the force output of the torque motor to a level sufficient to overcome flow forces, stiction forces etc. Flapper, jet pipe & spool valves act as 1st stage valve while second stage is almost always spool type. 2 stage servovalves may be classified as spool position, load pressure & load flow feedback.

Q30. What is Update Rate?

When it comes to specmanship, the frequency with which the servo is updated ranks high among those specifications that are not well understood. Is 2 milliseconds OK? What advantage is there in going to 200 microseconds or 20 microseconds? First, we must be clear on what is being updated. Is it the position command, the position feedback, the position loop, the velocity loop or the current (which equates to torque) loop? Let’s start by talking about the position command. There are a variety of algorithms used within the control to generate a path for each axis. These algorithms can be linear/circular interpolation, leader/follower, cam following, registration, etc. The result of these calculations is that each axis command register gets a new number every time the calculation is made. If one were to plot the position of the command register for one of these axes as a function of time, it would look like a flight of stairs where the height of the step is the distance that axis must move in one update period. As an example, if the update time for that calculation is one millisecond and the axis is being commanded at 600 inches per minute (IPM), this becomes 10 inches per second or .01 inches every millisecond. The riser on the staircase will be .01 inches and the run will be one millisecond. The ideal servo command would be the straight line generated if the update time became infinitesimally small. The disturbance from the ideal servo command is a saw tooth wave with a height of .01 inches and a frequency of 1000 Hertz. How will the servo react to this command disturbance? For the majority of industrial machinery, the servo bandwidth will be in the range of 2 to 10 Hertz. The highest bandwidth would be most apt to respond to this disturbance, so let’s consider a 10 Hertz bandwidth. Once the bandwidth of a servo is exceeded, the output rolls off at a 40 DB per decade rate or a ratio of 100 to 1 for each decade increase in frequency. Since the 1000 Hertz disturbance is two decades from the bandwidth, the roll off will be 10,000 to 1. This would reduce a .01 inch disturbance to .000001 inches or 1 micro-inch. Hardly a problem. Unless you are dealing with some extremely high velocities and some pretty hot servos, it appears that a 1 millisecond update suffices for command generation. There is one caveat, however. If you are using the command register to trigger some event, be sure the 1 millisecond delay is not of consequence. It is usually advisable to trigger events off the actual feedback as will be discussed next. When using encoders as the feedback device, the position feedback register is updated every time a pulse comes along, so it stays in sync with the actual machine position. When using resolvers, most digitizing techniques update the feedback register once per carrier frequency cycle. Thus if the analog sine wave used to drive the resolver is 1 Kilohertz, the feedback register will be upgraded once per millisecond. This is why most suppliers are using carrier frequencies in the 2,000 to 10,000 Hertz range now days. This assures updates in the 500 to 100 microsecond arena. There are some resolver-to-digital (R/D) converters that employ techniques to overcome this problem. Also when triggering events off the position, don’t forget that there will be a servo error unless feedforward techniques or PID is used. Also, since these features are sometimes switched in and out, it is safer to simply trigger events off the feedback, rather than the command. How often the servo loop itself is updated is another concern. And, there are three loops to worry about. Updating a loop means subtracting the feedback from the command to generate the error and manipulating that error with digital or analog lead/lag filters, PID, notch filters, feedforward, or any other loop feature that may be available. There has been a rough rule of thumb that the update rate of a servo loop should be at least 10 times the bandwidth. For a position loop with a 10 Hertz bandwidth, this suggest an update frequency of 100/second or 10 milliseconds per update. For a velocity loop with a 100 Hertz bandwidth, the update would be every one millisecond. For a current loop bandwidth of 1,000 Hertz, the update time would be 100 microseconds. This helps explain why the PWM chopping frequencies are often in the 10 Kilohertz range for those who are doing the current loop digitally. It also explains why many are doing the current loop in an analog fashion due to the high burden on the computer time when the loop has to be served 10,000 times per second. Usually, in the specification, only one update time is given. That number usually means the time elapsed between position loop closure calculations. And, with today’s technology, it is not hard to achieve 1 millisecond, which most vendors are meeting or beating. With industrial machinery, this is adequate, especially if the current (torque) loop is analog. Those vendors who are in the 100 microsecond arena are either playing the specmanship game or are doing the current loop digitally (or maybe a bit of both). As computers continue to get faster, the update times will get shorter and shorter, but it will be hard to see any further significant changes in servo performance with industrial machines.

Tuesday, May 17, 2011

Digital Control System

Q1 What is a linear control system. In state space method what does the matrices A, B, C, D stand for?

Ans. A linear control system is that which satisfies the rules of homogeneity and superposition.
If y1(t)= x1(t);
Y2(t)= x2(t);
For a linear system ay1(t)+by2(t) = ax1(t) +bx2(t);
The state space equations are written as
X’ = Ax + Bu
Y = Cx + Du
Where x= state variable
A = State matrix
B = Input matrix
C = Output matrix
D = Disturbance Matrix

Q2 What is the sampling time which has been selected for the nonlinear control system & how?

Ans. Sampling time is the discrete time interval for which data is obtained for the system. It depends on the dynamics of the system, the required accuracy & hardware constraints.
The sampling time is generally selected according to the thumbrule
1/30Fc < T < 1/5Fc
Where Fc = system bandwidth
Here System Bandwidth < 5 Hz (3.88Hz) as Rise Time * BW = 0 .35
Sampling Time = 100Hz (10msec) (ST should be between 25Hz to 150 Hz)

1. Sampling times lower than 5 Fc are not selected because it may result in aliasing errors. (According to the Sampling Theorem the sampling frequency must be more than 2 times the highest frequency component in the signal.)

2. The sampling period must be compatible with the update rate specifications of the ADC & DAC used in system design.

3. The shorter the sampling period the more closely the discrete time system resembles a continuous time system. In the limit as the sampling period approaches zero, the responses of the discrete time & continuous time & continuous time systems become indistinguishable.

4. The sampling period must be long enough so that sufficient time is available for the execution of the controller algorithm & I/O operations during each discrete time step. This criterion decides the higher limit of the time step.

5. The time required for the control system to complete one loop of the algorithm is the sampling time T. It depends on the time required for the computer to calculate the control algorithm & the time required by the interfaces to convert data. The step size for the simulation must be less than the smallest local time constant of the model simulated. If the step size chosen is higher then the simulation will exhibit numerical instability.

Q3 What is the method for selecting a good controller sampling frequency?

Ans. 1. Develop a linear plant model & design a continuous time controller. Plot the step response & frequency response of the closed loop control system.
2. Choose a very short sampling period that provides a good discrete time system approximation to the continuous time system performance.

3. Discretize the controller algorithm using c2d command & an appropriate discretization method.

4. Plot the step response & frequency response of closed loop system using the discrete controller in place of the continuous time controller.
5. Increase the sampling period & repeat till the step & frequency response of the system vary unacceptably from the continuous time response.

Q4a. What is quantization error? Explain

It is the error due to the computer’s finite word size.


Q4b. What are the errors which can arise due to numerical solution of differential equations?

Ans. Many numerical methods are interative, that is they involve repeating the same calculation many times. In terms of error analysis, two types of error emerge, local and global errors. The local error is the error introduced during one operation of the iterative process. The global error is the accumulative error over many iterations. Note that the global error is not simply the sum of the local errors due to the nonlinear nature of many problems although often it is assumed to be so because of the difficulties in measuring the global error.

There are at least two sources of errors in numerical calculations:
1. Rounding Errors
2. Truncation Errors
Rounding errors originate from the fact that computers can only represent numbers using a fixed and limited number of significant figures. Thus, numbers such as or cannot be represented exactly in computer memory. The discrepancy introduced by this limitation is call round-off error. Even simple addition can result in round-off error.
Truncation errors in numerical analysis arise when approximations are used to estimate some quantity. Often a Taylor series is used to approximate a solution which is then truncated.
Errors enter the numerical solution of the initial value problem from two sources:
² discretization error,
² roundoff error.
Discretization error is a property of the differential equation and the numerical method. If all the arithmetic could be performed with infinite precision, discretization error would be the only error present. Roundoff error is a property of the computer hardware and the program. It is usually far less important than the discretization error, except when we try to achieve very high accuracy. Discretization error can be assessed from two points of view, local and global.
Local discretization error is the error that would be made in one step if the previous
values were exact and if there were no roundoff error. Let un(t) be the solution of
the differential equation determined not by the original initial condition at t0 but
by the value of the computed solution at tn. That is, un(t) is the function of t
defined by
u_n = f(t; un);
un(tn) = yn:
The local discretization error dn is the difference between this theoretical solution
and the computed solution (ignoring roundoff) determined by the same data at tn:
dn = yn+1 ¡ un(tn+1):
Global discretization error is the difference between the computed solution,
still ignoring roundoff, and the true solution determined by the original initial condition at t0, that is,
en = yn ¡ y(tn):
The distinction between local and global discretization error can be easily seen
in the special case where f(t; y) does not depend on y.

Q4c. How is the step size of the interval selected?

Ans. The accuracy of the solution will depend on how small we make the step size, h. If you look at the figure below you will see that the Euler method projects the slope forward and uses it to estimate the next solution point. However, because the exact solution may be nonlinear, the projection will inevitably yield some error, called the truncation error. In panel B), one can see that the smaller we make h, the smaller the truncation error. However, a small h means it will take longer to traverse the solution and if h is too small we can begin to run into round-off errors.


Q5. How was the feedback selected? Why is feedback used?

Ans. Feedback was selected based on the linear system transfer function root locus plot.
Feedback is used to
a) Modify the transient response of the system
b) Reduce the effects of disturbance on system response
c) Reduce steady state tracking errors
d) Decrease the sensitivity of the system to plant variations
e) Disadvantages of feedback are increased system complexity, reduction of closed loop gain, introduction of instabilities in the system

Q6. What are the different ways in which differential equations can be solved?
Ans Second order Differential equations with linear constant coefficients can be solved if they can be put in quadratic form by solving for the roots of the quadratic equation. First order differential equations can be solved by separation of the variables & then integration of both sides.
Numerical methods of solution are – Runge Kutta’s , Euler’s method, Rosenbrock’s method, etc.


Q7. Explain the Runge Kutta 4 method of solution of differential equations.

Ans.) Consider the differential eqn
Y’ = f(x,y)
With initial condition y(xo) = y0
If y(x) is the exact solution of the equation then the Taylor’s series for y(x) around x= xo is given by
Y(x) = yo + (x-xo)yo’ + (x-xo)2/2yo’ + .............
4th order Runge Kutta method
K1 = h f(xo,yo)
K2 = h f(xo+h/2, yo+k1/2)
K3 = h f(xo+h/2, yo+k2/2)
K4 = h f(xo+h,yo+k3)
Y1 = y0 + 1/6*(k1 + 2k2 + 2k3 + k4)
The RK4 method takes a series of slopes from which it constructs a weighted average.

Q8. What are stiff problems?

Ans. One class of problem, terms stiff problems, is characterized by widely separated time scales. For example one part of a model might be dominated by very fast reactions, while another by slow reactions. In such situations, a numerical integrator must ensure that the step size is small enough to capture the fast dynamics. This results in extremely slow integration times and often failure to integrate the solutions at all. As a result, numerical analysts have developed sophisticated methods to deal with stiff problems.

Q9. What are error estimates? How are they obtained for MATLAB ode solvers?

Ans Error estimates are errors in the solution of the differential equations.
Modern numerical methods automatically determine the step sizes
hn = tn+1 - tn
so that the estimated error in the numerical solution is controlled by a specified tolerance.
For example, ode45 obtains its error estimate by comparing a fourth-order and a fifth-order formula.
An estimate of the error that would occur with this step is provided by yet another
linear combination of the slopes:
en+1 = hXki=1±isi:
If this error is less than the specified tolerance, then the step is successful and yn+1 is accepted. If not, the step is a failure and yn+1 is rejected. In either case, the error estimate is used to compute the step size h for the next step.

Q10. What is a phase plane plot?
Ans. It is the plot of the free response of a 2nd order nonlinear system where a pair of state variables generally displacement and velocity are taken for plotting the system response.


Q11. What is limit cycle oscillation ?
'Limit cycle oscillations' can be thought of as in between decaying oscillations and flutter. After an initial displacement the oscillations grow for a short period. The oscillations then settle down to a constant magnitude, instead of continuing to grow.
Limit-cycle oscillations arise from physical systems that show large deviations from equilibrium;
In a limit-cycle oscillator, the amplitude tends to be more or less constant but the frequency can vary greatly.