You are on page 1of 37

A control system is a device or set of devices to manage, command, direct or regulate the behavior of other devices or systems.

There are two common classes of control systems, with many variations and combinations: logic or sequential controls, and feedback or linearcontrols. There is also fuzzy logic, which attempts to combine some of the design simplicity of logic with the utility of linear control. Some devices or systems are inherently not controllable. The term "control system" may be applied to the essentially manual controls that allow an operator to, for example, close and open a hydraulic press, where the logic requires that it cannot be moved unless safety guards are in place. An automatic sequential control system may trigger a series of mechanical actuators in the correct sequence to perform a task. For example various electric and pneumatic transducers may fold and glue a cardboard box, fill it with product and then seal it in an automatic packaging machine. In the case of linear feedback systems, a control loop, including sensors, control algorithms and actuators, is arranged in such a fashion as to try to regulate a variable at a setpoint or reference value. An example of this may increase the fuel supply to a furnace when a measured temperature drops. PID controllers are common and effective in cases such as this. Control systems that include some sensing of the results they are trying to achieve are making use of feedback and so can, to some extent, adapt to varying circumstances. Open-loop control systemsdo not directly make use of feedback, but run only in pre-arranged ways. Logic control Pure logic control systems were historically implemented by electricians with networks of relays, and designed with a notation called ladder logic. Today, most such systems are constructed with programmable logic devices. Logic controllers may respond to switches, light sensors, pressure switches etc and cause the machinery to perform some operation. Logic systems are used to sequence mechanical operations in many applications. Examples include elevators, washing machines and other systems with interrelated stop-go operations.

Logic systems are quite easy to design, and can handle very complex operations. Some aspects of logic system design make use of Boolean logic. Onoff control For example, a thermostat is a simple negative-feedback control: when the temperature (the "measured variable" or MV) goes below a set point (SP), the heater is switched on. Another example could be a pressure switch on an air compressor: when the pressure (MV) drops below the threshold (SP), the pump is powered. Refrigerators and vacuum pumps contain similar mechanisms operating in reverse, but still providing negative feedback to correct errors. Simple onoff feedback control systems like these are cheap and effective. In some cases, like the simple compressor example, they may represent a good design choice. In most applications of onoff feedback control, some consideration needs to be given to other costs, such as wear and tear of control valvesand maybe other start-up costs when power is reapplied each time the MV drops. Therefore, practical onoff control systems are designed to include hysteresis, usually in the form of a deadband, a region around the setpoint value in which no control action occurs. The width of deadband may be adjustable or programmable. [edit]Linear control Linear control systems use linear negative feedback to produce a control

signal mathematically based on other variables, with a view to maintaining the controlled process within an acceptable operating range. The output from a linear control system into the controlled process may be in the form of a directly variable signal, such as a valve that may be 0 or 100% open or anywhere in between. Sometimes this is not feasible and so, after calculating the current required corrective signal, a linear control system may repeatedly switch an actuator, such as a pump, motor or heater, fully on and then fully off again, regulating the duty cycleusing pulse-width modulation.

[edit]Proportional control When controlling the temperature of an industrial furnace, it is usually better to control the opening of the fuel valve in proportion to the current needs of the furnace. This helps avoid thermal shocks and applies heat more effectively. Proportional negative-feedback systems are based on the difference between the required set point (SP) and measured value (MV) of the controlled variable. This difference is called the error. Power is applied in direct proportion to the current measured error, in the correct sense so as to tend to reduce the error (and so avoid positive feedback). The amount of corrective action that is applied for a given error is set by the gainor sensitivity of the control system. At low gains, only a small corrective action is applied when errors are detected: the system may be safe and stable, but may be sluggish in response to changing conditions; errors will remain uncorrected for relatively long periods of time: it is overdamped. If the proportional gain is increased, such systems become more responsive and errors are dealt with more quickly. There is an optimal value for the gain setting when the overall system is said to be critically damped. Increases in loop gain beyond this point will lead to oscillations in the MV; such a system isunder-damped. [edit]Under-damped furnace example In the furnace example, suppose the temperature is increasing towards a set point at which, say, 50% of the available power will be required for steady-state. At low temperatures, 100% of available power is applied. When the MV is within, say 10 of the SP the heat input begins to be reduced by the proportional controller. (Note that this implies a 20 "proportional band" (PB) from full to no power input, evenly spread around the setpoint value). At the setpoint the controller will be applying 50% power as required, but stray stored heat within the heater sub-system and in the walls of the furnace will keep the measured temperature rising beyond what is required. At 10 above SP, we reach the top of the proportional band (PB) and no power is applied, but the temperature may continue to rise even further before beginning to fall back. Eventually as the MV falls back into the PB, heat is applied again, but now the heater

and the furnace walls are too cool and the temperature falls too low before its fall is arrested, so that the oscillations continue. [edit]Over-damped furnace example The temperature oscillations that an under-damped furnace control system produces are unacceptable for many reasons, including the waste of fuel and time (each oscillation cycle may take many minutes), as well as the likelihood of seriously overheating both the furnace and its contents. Suppose that the gain of the control system is reduced drastically and it is restarted. As the temperature approaches, say 30 below SP (60 proportional band or PB now), the heat input begins to be reduced, the rate of heating of the furnace has time to slow and, as the heat is still further reduced, it eventually is brought up to set point, just as 50% power input is reached and the furnace is operating as required. There was some wasted time while the furnace crept to its final temperature using only 52% then 51% of available power, but at least no harm was done. By carefully increasing the gain (i.e. reducing the width of the PB) this over-damped and sluggish behavior can be improved until the system is critically damped for this SP temperature. Doing this is known as 'tuning' the control system. A well-tuned proportional furnace temperature control system will usually be more effective than on-off control, but will still respond slower than the furnace could under skillful manual control. [edit]PID control Main article: PID controller Apart from sluggish performance to avoid oscillations, another problem with proportional-only control is that power application is always in direct proportion to the error. In the example above we assumed that the set temperature could be maintained with 50% power. What happens if the furnace is required in a different application where a higher set temperature will require 80% power to maintain it? If the gain was finally set to a 50 PB, then 80% power will not be applied unless the furnace is 15 below setpoint, so for this other application the operators will have to remember always to set the setpoint temperature 15 higher than actually needed. This 15 figure is not

completely constant either: it will depend on the surrounding ambient temperature, as well as other factors that affect heat loss from or absorption within the furnace. To resolve these two problems, many feedback control schemes include mathematical extensions to improve performance. The most common extensions lead to proportionalintegral-derivative control, or PID control (pronounced pee-eye-dee). [edit]Derivative action The derivative part is concerned with the rate-of-change of the error with time: If the measured variable approaches the setpoint rapidly, then the actuator is backed off early to allow it to coast to the required level; conversely if the measured value begins to move rapidly away from the setpoint, extra effort is applied in proportion to that rapidity to try to maintain it. Derivative action makes a control system behave much more intelligently. On systems like the temperature of a furnace, or perhaps the motion-control of a heavy item like a gun or camera on a moving vehicle, the derivative action of a well-tuned PID controller can allow it to reach and maintain a setpoint better than most skilled human operators could. If derivative action is over-applied, it can lead to oscillations too. An example would be a temperature that increased rapidly towards SP, then halted early and seemed to "shy away" from the setpoint before rising towards it again. [edit]Integral action The integral term magnifies the effect of long-term steady-state errors, applying everincreasing effort until they reduce to zero. In the example of the furnace above working at various temperatures, if the heat being applied does not bring the furnace up to setpoint, for whatever reason, integral action increasingly moves the proportional band relative to the setpoint until the time-integral of the MV error is reduced to zero and the setpoint is achieved. [edit]Other techniques Another common technique is to filter the MV or error signal. Such a filter can reduce the response of the system to undesirable frequencies, to help eliminate instability or

oscillations. Some feedback systems will oscillate at just one frequency. By filtering out that frequency, one can use very "stiff" feedback and the system can be very responsive without shaking itself apart. The most complex linear control systems developed to date are in oil refineries [citation
needed]

(model predictive control). The chemical reaction paths and control systems are

normally designed together using specialized computer-aided-design software. Feedback systems can be combined in many ways. One example is cascade control in which one control loop applies control algorithms to a measured variable against a setpoint, but then actually outputs a setpoint to another controller, rather than affecting power input directly. Usually if a system has several measurements to be controlled, feedback systems will be present for each of them. [edit]Fuzzy logic Fuzzy logic is an attempt to get the easy design of logic controllers and yet control continuously-varying systems. Basically, a measurement in a fuzzy logic system can be partly true, that is if yes is 1 and no is 0, a fuzzy measurement can be between 0 and 1. The rules of the system are written in natural language and translated into fuzzy logic. For example, the design for a furnace would start with: "If the temperature is too high, reduce the fuel to the furnace. If the temperature is too low, increase the fuel to the furnace." Measurements from the real world (such as the temperature of a furnace) are converted to values between 0 and 1 by seeing where they fall on a triangle. Usually the tip of the triangle is the maximum possible value which translates to "1." Fuzzy logic then modifies Boolean logic to be arithmetical. Usually the "not" operation is "output = 1 - input," the "and" operation is "output = input.1 multiplied by input.2," and "or" is "output = 1 - ((1 - input.1) multiplied by (1 - input.2))." The last step is to "defuzzify" an output. Basically, the fuzzy calculations make a value between zero and one. That number is used to select a value on a line whose slope and

height converts the fuzzy value to a real-world output number. The number then controls real machinery. If the triangles are defined correctly and rules are right the result can be a good control system. When a robust fuzzy design is reduced into a single, quick calculation, it begins to resemble a conventional feedback loop solution. For this reason, many control engineers think one should not bother with it. However, the fuzzy logic paradigm may provide scalability for large control systems where conventional methods become unwieldy or costly to derive. Fuzzy electronics is an electronic technology that uses fuzzy logic instead of the twovalue logic more commonly used in digital electronics. [edit]Physical implementations Since modern small microcontrollers are so cheap (often less than $1 US), it's very common to implement control systems, including feedback loops, with computers, often in an embedded system. The feedback controls are simulated by having the computer make periodic measurements and then calculating from this stream of measurements (see digital signal processing, sampled data systems). Computers emulate logic devices by making measurements of switch inputs, calculating a logic function from these measurements and then sending the results out to electronically-controlled switches. Logic systems and feedback controllers are usually implemented with programmable logic controllers which are devices available from electrical supply houses. They include a little computer and a simplified system for programming. Most often they are programmed with personal computers. Logic controllers have also been constructed

from relays, hydraulic and pneumatic devices,

and electronics using

both transistors and vacuum tubes (feedback controllers can also be constructed in this manner).

[edit]See also

Control theory Perceptual control theory Distributed control system Programmable logic controller Programmable automation controller PID controller HVAC control system Control engineering Sampled data systems Building automation VisSim EPICS SCADA Coefficient diagram method Education and training of electrical and electronics engineers Process control Process optimization Networked control system Hierarchical control system Motion control

A microcontroller (also MCU or C) is a small computer on a single integrated circuit consisting of a relatively simple CPU combined with support functions such as a crystal oscillator, timers, watchdog, serial and analog I/O etc. Program memory in the form of NOR flash or OTP ROM is also often included on chip, as well as a, typically small, read/write memory.[1]

Thus, in contrast to the microprocessors used in personal computers and other high perfomance applications, simplicity is emphasized. Some microcontrollers may operate at clock frequencies as low as 32KHz, as this is adequate for many

typical applications, enabling low power consumption (milliwatts or microwatts). They will generally have the ability to retain functionality while waiting for an event such as a button press or other interrupt; power consumption while sleeping (CPU clock and most peripherals off) may be just nanowatts, making many of them well suited for long lasting battery applications.

Microcontrollers are used in automatically controlled products and devices, such as automobile engine control systems, remote controls, office machines, appliances, power tools, and toys. By reducing the size and cost compared to a design that uses a separate microprocessor, memory, and input/output devices, microcontrollers make it economical to digitally control even more devices and processes.

Embedded design The majority of computer systems in use today are embedded in other machinery, such as automobiles, telephones, appliances, and peripherals for computer systems. These are called embedded systems. While some embedded systems are very sophisticated, many have minimal requirements for memory and program length, with no operating system, and low software complexity. Typical input and output devices include switches, relays, solenoids, LEDs, small or custom LCD displays, radio frequency devices, and sensors for data such as temperature, humidity, light level etc. Embedded systems usually have no keyboard, screen, disks, printers, or other recognizable I/O devices of a personal computer, and may lack human interaction devices of any kind. [edit]Interrupts It is mandatory that microcontrollers provide real time response to events in the embedded system they are controlling. When certain events occur, an interrupt system can signal the processor to suspend processing the current instruction sequence and to begin an interrupt service routine (ISR). The ISR will perform any processing required based on the source of the interrupt before returning to the original instruction sequence. Possible interrupt sources are device dependent, and often include events such as an internal timer overflow, completing an analog to digital conversion, a logic level change on an input such as from a button being pressed, and data received on a

communication link. Where power consumption is important as in battery operated devices, interrupts may also wake a microcontroller from a low power sleep state where the processor is halted until required to do something by a peripheral event. [edit]Programs Microcontroller programs must fit in the available on-chip program memory, since it would be costly to provide a system with external, expandable, memory. Compilers and assembly language are used to turn high-level language programs into a compact machine code for storage in the microcontroller's memory. Depending on the device, the program memory may be permanent, read-only memory that can only be programmed at the factory, or program memory may be field-alterable flash or erasable read-only memory. [edit]Other microcontroller features Since embedded processors are usually used to control devices, they sometimes need to accept input from the device they are controlling. This is the purpose of the analog to digital converter. Since processors are built to interpret and process digital data, i.e. 1s and 0s, they won't be able to do anything with the analog signals that may be being sent to it by a device. So the analog to digital converter is used to convert the incoming data into a form that the processor can recognize. There is also a digital to analog converter that allows the processor to send data to the device it is controlling. In addition to the converters, many embedded microprocessors include a variety of timers as well. One of the most common types of timers is the Programmable Interval Timer, or PIT for short. A PIT just counts down from some value to zero. Once it reaches zero, it sends an interrupt to the processor indicating that it has finished counting. This is useful for devices such as thermostats, which periodically test the temperature around them to see if they need to turn the air conditioner on, the heater on, etc. Time Processing Unit or TPU for short. Is essentially just another timer, but more sophisticated. In addition to counting down, the TPU can detect input events, generate output events, and other useful operations.

Dedicated Pulse Width Modulation (PWM) block makes it possible for the CPU to control power converters, resistive loads, motors, etc., without using lots of CPU resources in tight timer loops. Universal Asynchronous Receiver/Transmitter (UART) block makes it possible to receive and transmit data over a serial line with very little load on the CPU. For those wanting ethernet one can use an external chip like Crystal Semiconductor CS8900A, Realtek RTL8019, or Microchip ENC 28J60. All of them allow easy interfacing with low pin count. Higher integration In contrast to general-purpose CPUs, microcontrollers may not implement an external address or data bus as they integrate RAM and non-volatile memory on the same chip as the CPU. Using fewer pins, the chip can be placed in a much smaller, cheaper package. Integrating the memory and other peripherals on a single chip and testing them as a unit increases the cost of that chip, but often results in decreased net cost of the embedded system as a whole. Even if the cost of a CPU that has integrated peripherals is slightly more than the cost of a CPU + external peripherals, having fewer chips typically allows a smaller and cheaper circuit board, and reduces the labor required to assemble and test the circuit board. A microcontroller is a single integrated circuit, commonly with the following features:

central processing unit - ranging from small and simple 4-bit processors to complex 32- or 64-bit processors

discrete input and output bits, allowing control or detection of the logic state of an individual package pin

serial input/output such as serial ports (UARTs) other serial communications interfaces like IC, Serial Peripheral

Interface and Controller Area Network for system interconnect

peripherals such as timers, event counters, PWM generators, and watchdog

volatile memory (RAM) for data storage ROM, EPROM, EEPROM or Flash memory for program and operating parameter storage

clock generator - often an oscillator for a quartz timing crystal, resonator or RC circuit

many include analog-to-digital converters in-circuit programming and debugging support

This integration drastically reduces the number of chips and the amount of wiring and circuit board space that would be needed to produce equivalent systems using separate chips. Furthermore, and on low pin count devices in particular, each pin may interface to several internal peripherals, with the pin function selected by software. This allows a part to be used in a wider variety of applications than if pins had dedicated functions. Microcontrollers have proved to be highly popular in embedded

systems since their introduction in the 1970s. Some microcontrollers use a Harvard architecture: separate memory buses for instructions and data, allowing accesses to take place concurrently. Where a Harvard architecture is used, instruction words for the processor may be a different bit size than the length of internal memory and registers; for example: 12-bit instructions used with 8bit data registers. The decision of which peripheral to integrate is often difficult. The microcontroller vendors often trade operating frequencies and system design flexibility against time-tomarket requirements from their customers and overall lower system cost. Manufacturers have to balance the need to minimize the chip size against additional functionality. Microcontroller architectures vary widely. Some designs include general-purpose microprocessor cores, with one or more ROM, RAM, or I/O functions integrated onto the package. Other designs are purpose built for control applications. A microcontroller instruction set usually has many instructions intended for bit-wise operations to make control programs more compact.[2] For example, a general purpose processor might require several instructions to test a bit in a register and branch if the bit is set, where a

microcontroller could have a single instruction to provide that commonly-required function. Microcontrollers typically do not have a math coprocessor, so fixed point or floating point arithmetic are performed by program code. [edit]Volumes About 55% of all CPUs sold in the world are 8-bit microcontrollers and microprocessors. According to Semico, Over 4 billion 8-bit microcontrollers were sold in 2006.[3] A typical home in a developed country is likely to have only four general-purpose microprocessors but around three dozen microcontrollers. A typical mid

range automobile has as many as 30 or more microcontrollers. They can also be found in any electrical device: washing machines,microwave ovens, telephones etc. Manufacturers have often produced special versions of their microcontrollers in order to help the hardware and software development of the target system. Originally these included EPROM versions that have a "window" on the top of the device through which program memory can be erased by ultra violet light, ready for reprogramming after a programming ("burn") and test cycle. Since 1998, EPROM versions are rare and have been replaced by EEPROM and flash, which are easier to use (can be erased electronically) and cheaper to manufacture. Other versions may be available where the ROM is accessed as an external device rather than as internal memory, however these are becoming increasingly rare due to the widespread availability of cheap microcontroller programmers. The use of field-programmable devices on a microcontroller may allow field update of the firmware or permit late factory revisions to products that have been assembled but not yet shipped. Programmable memory also reduces the lead time required for deployment of a new product. Where hundreds of thousands of identical devices are required, using parts programmed at the time of manufacture can be an economical option. These 'Mask Programmed' parts have the program laid down in the same way as the logic of the chip, at the same time.

Programming environments Microcontrollers were originally programmed only in assembly language, but

various high-level programming languages are now also in common use to target microcontrollers. These languages are either designed specially for the purpose, or versions of general purpose languages such as the C programming

language. Compilers for general purpose languages will typically have some restrictions as well as enhancements to better support the unique characteristics of

microcontrollers. Some microcontrollers have environments to aid developing certain types of applications. Microcontroller vendors often make tools freely available to make it easier to adopt their hardware. Many microcontrollers are so quirky that they effectively require their own non-standard dialects of C, such as SDCC for the 8051, which prevent using standard tools (such as code libraries or static analysis tools) even for code unrelated to hardware features. Interpreters are often used to hide such low level quirks. Interpreter firmware is also available for some microcontrollers. For example, BASIC on the early microcontrollers Intel 8052[4]; BASIC andFORTH on the Zilog Z8[5] as well as some modern devices. Typically these interpreters support interactive programming. Simulators are available for some microcontrollers, such as in

Microchip's MPLAB environment. These allow a developer to analyse what the behaviour of the microcontroller and their program should be if they were using the actual part. A simulator will show the internal processor state and also that of the outputs, as well as allowing input signals to be generated. While on the one hand most simulators will be limited from being unable to simulate much other hardware in a system, they can exercise conditions that may otherwise be hard to reproduce at will in the physical implementation, and can be the quickest way to debug and analyse problems. Recent microcontrollers are often integrated with on-chip debug circuitry that when accessed by an In-circuit emulator via JTAG, allow debugging of the firmware with a debugger.

[edit] As of 2008 there are several common architectures:


MSP430 (16-bit) CF (32-bit) ARM MIPS (32-bit PIC32) S08 AVR PIC (8-bit PIC16, PIC18, 16-bit dsPIC33 / PIC24) V850 PowerPC ISE PSoC (Programmable System-on-Chip)

Others typically are used in very narrow range of applications or are more like processors than microcontrollers. [edit]Interrupt latency In contrast to general-purpose computers, microcontrollers used in embedded systems often seek to minimize interrupt latency over instruction throughput. When an electronic device causes an interrupt, the intermediate results, the registers, have to be saved before the software responsible for handling the interrupt can run, and then must be put back after it is finished. If there are more registers, this saving and restoring process takes more time, increasing the latency. Low-latency MCUs generally have relatively few registers in their central processing units, or they have "shadow registers", a duplicate register set that is only used by the interrupt software. atmel e AVR is a Modified Harvard architecture 8-bit RISC single

chip microcontroller (C) which was developed by Atmel in 1996. The AVR was one of

the first microcontroller families to use on-chip flash memory for program storage, as opposed to One-Time Programmable ROM, EPROM, or EEPROM used by other microcontrollers at the time. [edit] Brief History It is believed the AVR basic architecture was conceived by two students at the Norwegian Institute of Technology (NTH) Alf-Egil Bogen andVegard Wollan.[1][2] The original AVR MCU was developed at a local ASIC house in Trondheim, Norway, where the two founders of Atmel Norway were working as students. It was known as a RISC (Micro RISC). When the technology was sold to Atmel, the internal architecture was further developed by Alf and Vegard at Atmel Norway, a subsidiary of Atmel founded by the two architects. Atmel says that the name AVR is not an acronym and does not stand for anything in particular. The creators of the AVR give no definitive answer as to what the term "AVR" stands for. [3] Note that the use of "AVR" in this article generally refers to the 8-bit RISC line of Atmel AVR Microcontrollers. Among the first of the AVR line was the AT90S8515, which in a 40-pin DIP package has the same pinout as an 8051 microcontroller, including the external multiplexed address and data bus. The polarity of the RESET line was opposite (8051's having an activehigh RESET, while the AVR has an active-low RESET), but other than that, the pinout was identical. [edit]Device Overview The AVR is a Modified Harvard architecture machine with program and data stored in separate physical memory systems that appear in different address spaces, but having the ability to read data items from program memory using special instructions. [edit]Basic Families AVRs are generally classified into four broad groups:

tinyAVR the ATtiny series


18 kB program memory 832-pin package Limited peripheral set

megaAVR the ATmega series


4256 kB program memory 28100-pin package Extended instruction set (Multiply instructions and instructions for handling larger program memories)

Extensive peripheral set

XMEGA the ATxmega series


16384 kB program memory 4464100-pin package (A4, A3, A1) Extended performance features, such as DMA, "Event System", and

cryptography support.

Extensive peripheral set with DACs

Application specific AVR

megaAVRs with special features not found on the other members of the AVR family, such as LCD controller, USB controller, advanced PWM, CAN etc.

FPSLIC (Field Programmable System Level Integrated Circuit), an AVR core ondie with an FPGA. The FPSLIC uses SRAM for the AVR program code, unlike all other AVRs. Partly due to the relative speed difference between SRAM and flash, the AVR core in the FPSLIC can run at up to 50MHz.

[edit]Device Architecture [edit]Data RAM Flash, EEPROM, and SRAM are all integrated onto a single chip, removing the need for external memory. Some devices have an external bus to allow adding additional data memory or memory-mapped devices.

[edit]Program Memory (Flash) Program instructions are stored in non-volatile Flash memory. Although they are 8-bit MCUs, each instruction takes one or two 16-bit words. The size of the program memory is occasionally indicated in the naming of the device itself (e.g., the ATmega64x line has 64 kB of Flash). There is no provision for off-chip program memory; all code executed by the AVR core must reside in the on-chip flash. [edit]Internal Data Memory The data address space consists of the register file, I/O registers, and SRAM. [edit]Internal Registers The AVRs have 32 single-byte registers and are classified as 8-bit RISC devices. In most variants of the AVR architecture, the working registers are mapped in as the first 32 memory addresses (000016-001F16) followed by the 64 I/O registers (002016005F16). Actual SRAM starts after these register sections (address 0060 16). (Note that the I/O register space may be larger on some more extensive devices, in which case the memory mapped I/O registers will occupy a portion of the SRAM address space.) Even though there are separate addressing schemes and optimized opcodes for register file and I/O register access, all can still be addressed and manipulated as if they were in SRAM. In the XMEGA variant, the working register file is not mapped into the data address space; as such, it is not possible to treat any of the XMEGA's working registers as though they were SRAM. Instead, the I/O registers are mapped into the data address space starting at the very beginning of the address space. Additionally, the amount of data address space dedicated to I/O registers has grown substantially to 4096 bytes (000016-0FFF16). As with previous generations, however, the fast I/O manipulation instructions can only reach the first 64 I/O register locations (the first 32 locations for bitwise instructions). Following the I/O registers, the XMEGA series sets aside a 4096

byte range of the data address space which can be used optionally for mapping the internal EEPROM to the data address space (1000 16-1FFF16). The actual SRAM is located after these ranges, starting at 200016. [edit]EEPROM Almost all AVR microcontrollers have internal Electrically Erasable Programmable Read Only Memory (EEPROM) for semi-permanent data storage. Like Flash memory, EEPROM can maintain its contents when electrical power is removed. In most variants of the AVR architecture, this internal EEPROM memory is not mapped into the MCU's addressable memory space. It can only be accessed the same way an external peripheral device is, using special pointer registers and read/write instructions which makes EEPROM access much slower than other internal RAM. However, some devices in the SecureAVR (AT90SC) family [4] uses a special EEPROM mapping to the data or program memory depending on the configuration. The XMEGA family also allows the EEPROM to be mapped into the data address space. Since the number of writes to EEPROM is not unlimited Atmel specifies 100,000 write cycles in their datasheets a well designed EEPROM write routine should compare the contents of an EEPROM address with desired contents and only perform an actual write if contents need to be changed. [edit]Program Execution Atmel's AVRs have a three stage, single level pipeline design. This means the next machine instruction is fetched as the current one is executing. Most instructions take just one or two clock cycles, making AVRs relatively fast among the eight-bit microcontrollers. The AVR family of processors were designed with the efficient execution of compiled C code in mind and has several built-in pointers for the task. [edit]Instruction Set Main article: Atmel AVR instruction set

The AVR Instruction Set is more orthogonal than most eight-bit microcontrollers, in particular the PIC microcontrollers with which AVR competes today. However, it is not completely regular:

Pointer registers X, Y, and Z have addressing capabilities that are different from each other.

Register locations R0 to R15 have different addressing capabilities than register locations R16 to R31.

I/O ports 0 to 31 have different addressing capabilities than I/O ports 32 to 63. CLR affects flags, while SER does not, even though they are complementary instructions. CLR set all bits to zero and SER sets them to one. (Note that CLR is pseudo-op for EOR R, R; and SER is short for LDI R,$FF. Math operations such as EOR modify flags while moves/loads/stores/branches such as LDI do not.)

The mostly-regular instruction set makes programming it using C (or even Ada) compilers fairly straightforward. In fact, Atmel solicited input from major developers of compilers for small microcontrollers, to determine the instruction set features that were most useful in a compiler for high-level languages. [edit]MCU Speed The AVR line can normally support clock speeds from 0-20 MHz, with some devices reaching 32 MHz. Lower powered operation usually requires a reduced clock speed. All recent (Tiny and Mega, but not 90S) AVRs feature an on-chip oscillator, removing the need for external clocks or resonator circuitry. Some AVRs also have a system clock prescaler that can divide down the system clock by up to 256. This prescaler can be reconfigured by software during run-time, allowing to optimize clock speed. Since all operations (excluding literals) on registers R0 - R31 are single cycle, the AVR can achieve up to 1MIPS per MHz. Loads and stores to/from memory take 2 cycles, branching takes 3 cycles. [edit]Development AVRs have a large following due to the free and inexpensive development tools available, including reasonably priced development boards and free development

software. The AVRs are sold under various names that share the same basic core but with different peripheral and memory combinations. Compatibility amongst chips is fairly good. See external links for sites relating to AVR development. [edit]Features Current AVRs offer a wide range of features:

Multifunction, Bi-directional General Purpose I/O ports with configurable, built-in pullup resistors

Multiple Internal Oscillators Internal, Self-Programmable Instruction Flash Memory up to 256 K


In-System Programmable using ISP, JTAG, or High Voltage methods Optional Boot Code Section with Independent Lock Bits for Protection

On chip debugging (OCD) support through JTAG or debugWIRE on most devices

The JTAG signals (TMS, TDI, TDO, and TCK) are multiplexed on GPIOs. These pins can be configured to function as JTAG or GPIO depending on the setting of a fuse bit, which can be programmed via ISP or HVSP. By default, AVRs with JTAG come with the JTAG interface enabled.

debugWIRE uses the /RESET pin as a bi-directional communication channel to access on-chip debug circuitry. It is present on devices with lower pin counts, as it only requires one pin. debugWIRE can only be enabled using ISP or HVSP. Once enabled, it can only be disabled via the debugWIRE interface.

Internal Data EEPROM up to 4 kB Internal SRAM up to 8 K External 64KB little endian data space on certain models, including the Mega8515 and Mega162.

The external data space is overlaid with the internal data space, such that the full 64KB address space does not appear on the external bus. An accesses to e.g. address 010016 will access internal RAM, not the external bus.

In certain members of the XMEGA series, the external data space has been enhanced to support both SRAM and SDRAM. As well, the data addressing modes have been expanded to allow up to 16MB of data memory to be directly addressed.

AVR's generally do not support executing code from external memory. Some ASSP's using the AVR code do support external program memory.

8-Bit and 16-Bit Timers


PWM output (Dead time generator on some devices) Input capture

Analog Comparators 10 or 12-Bit A/D Converters, with multiplex of up to 16 channels 12-bit D/A Converters A variety of serial interfaces, including

IC Compatible Two-Wire Interface (TWI) Synchronous/Asynchronous Serial Peripherals (UART/USART) (used with RS232, RS-485, and more)

Serial Peripheral Interface Bus (SPI) Universal Serial Interface (USI) for Two or Three-Wire Synchronous Data Transfer

Brownout Detection Watchdog Timer (WDT) Multiple Power-Saving Sleep Modes Lighting and motor control (PWM Specific) Controller models CAN Controller Support USB Controller Support

Proper Full-speed (12 Mbit/s) hardware & Hub controller with embedded AVR. Also freely available Low-speed (1.5 Mbit/s) (HID) bitbanging software emulations

Ethernet Controller Support LCD Controller Support

Low-voltage Devices Operating Down to 1.8v picoPower Devices DMA controllers and "Event System" peripheral communication. Fast Cryptography support for AES and DES

[edit]Development Tools and Evaluation Kits Official Atmel AVR development tools and evaluation kits consists of a small number of starter kits and debugging tools with support for most AVR devices: [edit]STK500 Starter Kit The STK500 starter kit and development system features ISP and high voltage programming (HVP) for all AVR devices, either directly or through extension boards. The board is fitted with DIP sockets for all AVRs available in DIP packages. STK500 Expansion Modules: Several expansion modules are available for the STK500 board:

STK501 - Adds support for microcontrollers in 64-pin TQFP packages. STK502 - Adds support for LCD AVRs in 64-pin TQFP packages. STK503 - Adds support for microcontrollers in 100-pin TQFP packages. STK504 - Adds support for LCD AVRs in 100-pin TQFP packages. STK505 - Adds support for 14 and 20-pin AVRs. STK520 - Adds support for 14 and 20-pin microcontrollers from the AT90PWM family.

STK524 - Adds support for the ATmega32M1/C1 32-pin CAN/LIN/Motor Control family.

STK525 - Adds support for the AT90USB microcontrollers in 64-pin TQFP packages. STK526 - Adds support for the AT90USB microcontrollers in 32-pin TQFP packages

[edit]AVR ISP and AVR ISP mkII The AVR ISP and AVR ISP mkII are inexpensive tools allowing all AVRs to be programmed via ICSP.

The AVR ISP connects to a PC via a serial port, and draws power from the target system. The AVR ISP allows using either of the "standard" ICSP pinouts, either the 10pin or 6-pin connector. The AVR ISP has been discontinued, replaced by the AVR ISP mkII. The AVR ISP mkII connects to a PC via USB, and draws power from USB. LEDs visible through the translucent case indicate the state of target power. [edit]AVR Dragon (USB) The Dragon is an inexpensive tool allowing all AVRs to be programmed via JTAG, HVP or ICSP. The Dragon allows debugging of AVRs with 32KB or less of program memory, via JTAG or DebugWire. The Dragon has a small prototype area which can accommodate an 8, 28, or 40-pin AVR, including connections to power and programming pins. There is no area for any additional circuitry. [edit]JTAG (IEEE 1149.1) The Joint Test Action Group, In Circuit Emulator (JTAGICE) debugging tool supports on-chip debugging (OCD) of AVRs with a JTAG boundary-scan interface. The original JTAGICE is no longer in production, however it has been replaced by the JTAGICE mkII. [edit]JTAGICE mkI The JTAGICE mkI debugging tool supports on-chip debugging (OCD) of older AVRs with JTAG interface. Newer devices using the debugWire interface cannot be debugged. JTAGICE mkII The JTAGICE mkII debugging tool supports on-chip debugging (OCD) of AVRs with JTAG or debugWIRE interface. The debugWire interface enables debugging using only one pin (the Reset pin), allowing debugging of applications running on low pin-count microcontrollers. [The Butterfly Demo Board Main article: AVR Butterfly

The very popular AVR Butterfly demonstration board is a self-contained, batterypowered computer running the Atmel AVR ATmega169V microcontroller. It was built to show-off the AVR family especially a new built-in LCD interface. The board includes the LCD screen, joystick, speaker, serial port, real time clock (RTC), flash memory chip, and both temperature and voltage sensors. Earlier versions of the AVR Butterfly also contained a CdS photoresistor; it is not present on Butterfly boards produced after June 2006 to allow RoHS compliance[5]. The small board has a shirt pin on its back so it can be worn as a name badge. The AVR Butterfly comes preloaded with software to demonstrate the capabilities of the microcontroller. Factory firmware can scroll your name, display the sensor readings, and show the time. The AVR Butterfly also has a piezo speaker that can be used to reproduce sounds and music. The AVR Butterfly demonstrates LCD driving by running a 14-segment, six alphanumeric character display. However, the LCD interface consumes many of the I/O pins. The Butterfly's ATmega169 CPU is capable of speeds up to 8 MHz, however it is factory set by software to 2 MHz to preserve the button battery life. A pre-installed bootloader program allows the board to be re-programmed via a standard RS-232 serial plug with new programs that users can write with the free Atmel IDE tools. [edit]AT90USBKey This small board, about half the size of a business card, is priced at slightly more than an AVR Butterfly. It includes an at90usb1287 with USB-OTG support, 16 MB of DataFlash, LEDs, a small joystick, and a temperature sensor. It's clocked at 8 MHz, and comes with software which lets it act as a USB Mass Storage device (its documentation is shipped on the DataFlash), a USB joystick, and more. To support the USB host capability, it must be operated from a battery; but when running as a USB peripheral, it only needs the power provided over USB. Only the JTAG port uses conventional 2.54mm pinout. All the other AVR I/O ports require more compact 1.27mm headers, which are not widely supported.

Since it has 128 KB of flash memory, a JTAGICE mkII is the best debug solution; a Dragon can program it, but can't examine its status. You can also program it through USB from a Windows or Linux host, using the USB "Device Firmware Update" protocols. Atmel ships proprietary (source code included but distribution restricted) example programs and a USB protocol stack with the device. MyUSB is a third party free software (MIT license) USB protocol stack for the USBKey. [edit]Raven Wireless Kit The RAVEN kit supports wireless development using Atmel's IEEE 802.15.4 chipsets, for ZigBee and other wireless stacks. It resembles a pair of wireless more-powerful Butterfly cards, plus a wireless USBKey; and costing about that much (under $US100). All these boards support JTAG based development. The kit includes two AVR Raven boards, each with 2.4 GHz transceiver supporting IEEE 802.15.4 (and a freely licensed ZigBee stack). The radios are driven with ATmega1284p processors, which are supported by a custom segmented LCD display driven by an ATmega3290p processor. Raven peripherals resemble the Butterfly: piezo speaker, DataFlash (bigger), external EEPROM, sensors, 32K crystal for RTC, and so on. These are intended for use developing remote sensor nodes, to control relays, or whatever is needed. The USB stick uses an AT90usb1287 for connections to a USB host and to the 2.4 GHz wireless links. These are intended to monitor and control the remote nodes, relying on host power rather than local batteries. [edit]Third-Party Programmers A wide variety of third-party programming and debugging tools are available for the AVR. These devices use various interfaces, including RS-232, PC parallel port, and USB. AVR Freaks has a comprehensive list. [edit]Atmel AVR Usage AVRs have been used in various automotive applications such as security, safety, powertrain and entertainment systems. Atmel has recently launched a new publication

"Atmel Automotive Compilation" to help developers with automotive applications. Some current usages are in BMW, Daimler-Chrysler and TRW. The Arduino physical computing platform is based on an ATMega168 (or ATmega8 in older versions) processor. USB-based AVRs have been used in the Microsoft Xbox hand controllers. The link between the controllers and Xbox is USB. Lego has recently released the firmware source code files for 8-bit AVRs to aid in the development of open-source alternatives to its popular robotics NXT "brick" operating system. Several companies produce AVR-based microcontrollers intended for use by hobbyists, robot builders, experimenters and small system developers (many of which are pin compatible with the PIC-based Basic Stamp) including Cubloc, BasicX, Oak Micros, and ZX Microcontrollers. System Semiconductor,Inc recently released the "System on a Chip", which is a Motor and Motion Control Chip, the M3000 with an Atmel AVR Core married to an Advanced Motion Controller for use in a variety of motion applications. [edit]The New 32-Bit AVRs Main article: AVR32 In 2006 Atmel released microcontrollers based on the new, 32-bit, AVR32 architecture. They include SIMD and DSP instructions, along with other audio and video processing features. This 32-bit family of devices is intended to compete with the ARM based processors. The instruction set is similar to other RISC cores, but is not compatible with the original AVR or any of the various ARM cores. fuzzy Fuzzy logic is a form of multi-valued logic derived from fuzzy set theory to deal with reasoning that is approximate rather than precise. In binary sets with binary logic, in contrast to fuzzy logic named also crisp logic, the variables may have a membership value of only 0 or 1. Just as in fuzzy set theory with fuzzy logic the set membership

values can range (inclusively) between 0 and 1, in fuzzy logic the degree of truth of a statement can range between 0 and 1 and is not constrained to the two truth values {true (1), false (0)} as in classic predicate logic.[1] And when linguistic variables are used, these degrees may be managed by specific functions, as discussed below. The term "fuzzy logic" emerged as a consequence of the development of the theory of fuzzy sets by Lotfi Zadeh[2]. A paper introducing the concept without using the term was published by R.H. Wilkinson in 1963[3] and thus preceded fuzzy set theory. Wilkinson was the first one to redefine and generalize the earlier multivalued logics in terms of set theory. The main purpose of his paper, following his first proposals in his 1961 Electrical Engineering master thesis, was to show how any mathematical function could be simulated using hardwired analog electronic circuits. He did this by first creating various linear voltage ramps which were then selected in a "logic block" using diodes and resistor circuits which implemented the maximum and minimum Fuzzy Logic rules of the INCLUSIVE OR and the AND operations respectively. He called his logic "analog logic". In 1965 Lotfi Zadeh axiomatized fuzzy set theory, thereby creating the set-theoretical equivalent of the "analog logic" of Wilkinson (without recourse to electrical circuits), not giving Wilkinson any credit.[4] Fuzzy logic has been applied to diverse fields, from control theory to artificial intelligence, yet still remains controversial among most statisticians, who prefer Bayesian logic,[citation who prefer traditional two-valued logic.[citation needed] Degrees of truth Both degrees of truth and probabilities range between 0 and 1 and hence may seem similar at first. However, they are distinct conceptually; truth represents membership in vaguely defined sets, not likelihood of some event or condition as in probability theory. For example, let a 100-ml glass contain 30 ml of water. Then we may consider two concepts: Empty and Full. The meaning of each of them can be represented by a certain fuzzy set. Then one might define the glass as being 0.7 empty and 0.3 full. Note that the concept of emptiness would be subjective and thus would depend on the observer or designer. Another designer might equally well design a set membership function where the glass would be considered full for all values down to 50 ml. It is
needed]

and some control engineers,

essential to realize that fuzzy logic uses truth degrees as a mathematical model of the vagueness phenomenon while probability is a mathematical model of randomness. A probabilistic setting would first define a scalar variable for the fullness of the glass, and second, conditional distributions describing the probability that someone would call the glass full given a specific fullness level. This model, however, has no sense without accepting occurrence of some event, e.g. that after a few minutes, the glass will be half empty. Note that the conditioning can be achieved by having a specific observer that randomly selects the label for the glass, a distribution over deterministic observers, or both. Consequently, probability has nothing in common with fuzziness, these are simply different concepts which superficially seem similar because of using the same interval of real numbers [0, 1]. Still, since theorems such as De Morgan's have dual applicability and properties of random variables are analogous to properties of binary logic states, one can see where the confusion might arise. [edit]Applying truth values A basic application might characterize subranges of a continuous variable. For instance, a temperature measurement for anti-lock brakes might have several separate membership functions defining particular temperature ranges needed to control the brakes properly. Each function maps the same temperature value to a truth value in the 0 to 1 range. These truth values can then be used to determine how the brakes should be controlled. An example of fuzzy reasoning Fuzzy Set Theory defines Fuzzy Operators on Fuzzy Sets. The problem in applying this is that the appropriate Fuzzy Operator may not be known. For this reason, Fuzzy logic usually uses IF-THEN rules, or constructs that are equivalent, such as fuzzy associative matrices. Rules are usually expressed in the form:

IF variable IS property THEN action For example, an extremely simple temperature regulator that uses a fan might look like this:

IF IF IF

temperature temperature temperature

IS IS IS

very cold normal

cold THEN THEN

THEN turn

stop down maintain

fan fan level

IF temperature IS hot THEN speed up fan Notice there is no "ELSE". All of the rules are evaluated, because the temperature might be "cold" and "normal" at the same time to different degrees. The AND, OR, and NOT operators of boolean logic exist in fuzzy logic, usually defined as the minimum, maximum, and complement; when they are defined this way, they are called the Zadeh operators, because they were first defined as such in Zadeh's original papers. So for the fuzzy variables x and y: NOT x = (1 - truth(x)) x AND y = minimum(truth(x), truth(y)) x OR y = maximum(truth(x), truth(y)) There are also other operators, more linguistic in nature, called hedges that can be applied. These are generally adverbs such as "very", or "somewhat", which modify the meaning of a set using a mathematical formula. In application, the programming language Prolog is well geared to implementing fuzzy logic with its facilities to set up a database of "rules" which are queried to deduct logic. This sort of programming is known as logic programming. Once fuzzy relations are defined, it is possible to develop fuzzy relational databases. The first fuzzy relational database, FRDB, appeared inMaria Zemankova's dissertation. Later, some other models arose like the Buckles-Petry model, the Prade-Testemale Model, the Umano-Fukami model or the GEFRED model by J.M. Medina, M.A. Vila et al. In the context of fuzzy databases, some fuzzy querying languages have been defined, highlighting the SQLf by P. Bosc et al. and the FSQL by J. Galindo et al. These languages define some structures in order to include fuzzy aspects in

the SQL statements, like fuzzy conditions, fuzzy comparators, fuzzy constants, fuzzy constraints, fuzzy thresholds, linguistic labels and so on.

[edit]Other examples

If a male is 1.8 meters, consider him as tall:

IF male IS true AND height >= 1.8 THEN is_tall IS true; is_short IS false

The fuzzy rules do not make sharp distinction between tall and short, that is not so realistic:

IF

height

<=

medium

male

THEN

is_short

IS

agree

somewhat

IF height >= medium male THEN is_tall IS agree somewhat In the fuzzy case, there are no such heights like 1.83 meters, but there are fuzzy values, like the following assignments: dwarf short medium tall male male male male = = = = [0, [1.3, [1.5, [1.8, 1.3] 1.5] 1.8] 2.0] m m m m

giant male > 2.0 m For the consequent, there are also not only two values, but five, say: agree agree agree agree agree fully = 4 In the binary, or "crisp", case, a person of 1.79 meters of height is considered medium. If another person is 1.8 meters or 2.25 meters, these persons are considered tall. The crisp example differs deliberately from the fuzzy one. We did not put in the antecedent IF male >= agree somewhat AND ... as gender is often considered as a binary information. So, it is not so complex as being tall. a not little somewhat lot = = = = 0 1 2 3

Application areas

Automobile

and

other

vehicle

subsystems,

such

as automatic

transmissions, ABS and cruise control (e.g. Tokyo monorail)


Air conditioners The Massive engine used in the Lord of the Rings films, which helped huge scale armies create random, yet orderly movements

Cameras Digital image processing, such as edge detection Rice cookers Dishwashers Elevators Washing machines and other home appliances Video game artificial intelligence Language filters on message boards and chat rooms for filtering out offensive text Pattern recognition in Remote Sensing Fuzzy logic has also been incorporated into

some microcontrollers and microprocessors, for instance, the Freescale 68HC12. [edit]

Controversies Fuzzy logic is the same as "imprecise logic". Fuzzy logic is not any less precise than any other form of logic: it is an organized and mathematical method of handling inherentlyimprecise concepts. The concept of "coldness" cannot be expressed in an equation, because although temperature is a quantity, "coldness" is not. However, people have an idea of what "cold" is, and agree that there is no sharp cutoff between "cold" and "not cold", where something is "cold" at N degrees but "not cold" at N+1 degrees a concept classical logic cannot easily handle due to theprinciple of bivalence. The

result has no set answer so it is believed to be a 'fuzzy' answer. Fuzzy logic simply provides a mathematical model of the vagueness which is manifested in the above example. Fuzzy logic is a new way of expressing probability. Fuzzy logic and probability are different ways of expressing uncertainty. While both fuzzy logic and probability theory can be used to represent subjective belief, fuzzy set theory uses the concept of fuzzy set membership (i.e. how much a variable is in a set), probability theory uses the concept of subjective probability (i.e. how probable do I think that a variable is in a set). While this distinction is mostly philosophical, the fuzzy-logic-derived possibility measure is inherently different from the probability measure, hence they are

not directlyequivalent. However, many statisticians are persuaded by the work of Bruno de Finetti that only one kind of mathematical uncertainty is needed and thus fuzzy logic is unnecessary. On the other hand, Bart Kosko argues that probability is a subtheory of fuzzy logic, as probability only handles one kind of uncertainty. He also claims to have proven a derivation of Bayes' theorem from the concept of fuzzy subsethood. Lotfi Zadeh argues that fuzzy logic is different in character from probability, and is not a replacement for it. He fuzzified probability to fuzzy probability and also generalized it to what is called possibility theory. Other approaches to uncertainty includeDempster-Shafer

theory and rough sets. Note, however, that fuzzy logic is not controversial to probability but rather complementary (cf. [9]) Fuzzy logic will be difficult to scale to larger problems. This criticism is mainly because there exist problems with conditional possibility, the fuzzy set theory equivalent of conditional probability (see Halpern (2003), Section 3.8). This makes it difficult to perform inference. However there have not been many studies comparing fuzzy-based systems with probabilistic ones.

Overview

Fuzzy logic is widely used in machine control. The term itself inspires a certain skepticism, sounding equivalent to "half-baked logic" or "bogus logic", but the "fuzzy" part does not refer to a lack of rigour in the method, rather to the fact that the logic involved can deal with fuzzy concepts - concepts that cannot be expressed as "true" or "false" but rather as "partially true". Although genetic algorithms and neural

networks can perform just as well as fuzzy logic in many cases (in fact, certain neural networks can be shown to be mathematically equivalent to certain fuzzy logic systems[1]), fuzzy logic has the advantage that the solution to the problem can be cast in terms that human operators can understand, so that their experience can be used in the design of the controller. This makes it easier to mechanize tasks that are already successfully performed by humans. zzy logic was first proposed by Lotfi A. Zadeh of the University of California at Berkeley in a 1965 paper. He elaborated on his ideas in a 1973 paper that introduced the concept of "linguistic variables", which in this article equates to a variable defined as a fuzzy set. Other research followed, with the first industrial application, a cement kiln built in Denmark, coming on line in 1975. Fuzzy systems were largely ignored in the U.S. because they were associated with artificial intelligence, a field that periodically oversells itself, especially in the mid1980s, resulting in a lack of credibility within the commercial domain. The Japanese did not have this prejudice. Interest in fuzzy systems was sparked by Seiji Yasunobu and Soji Miyamoto of Hitachi, who in 1985 provided simulations that demonstrated the superiority of fuzzy control systems for the Sendai railway. Their ideas were adopted, and fuzzy systems were used to control accelerating, braking, and stopping when the line opened in 1987. Another event in 1987 helped promote interest in fuzzy systems. During an international meeting of fuzzy researchers in Tokyo that year, Takeshi Yamakawa demonstrated the use of fuzzy control, through a set of simple dedicated fuzzy logic chips, in an "inverted pendulum" experiment. This is a classic control problem, in which a vehicle tries to keep a pole mounted on its top by a hinge upright by moving back and forth.

Observers were impressed with this demonstration, as well as later experiments by Yamakawa in which he mounted a wine glass containing water or even a live mouse to the top of the pendulum. The system maintained stability in both cases. Yamakawa eventually went on to organize his own fuzzy-systems research lab to help exploit his patents in the field. Following such demonstrations, Japanese engineers developed a wide range of fuzzy systems for both industrial and consumer applications. In 1988 Japan established the Laboratory for International Fuzzy Engineering (LIFE), a cooperative arrangement between 48 companies to pursue fuzzy research. Japanese consumer goods often incorporate fuzzy systems. Matsushita vacuum cleaners use microcontrollers running fuzzy algorithms to interrogate dust sensors and adjust suction power accordingly. Hitachi washing machines use fuzzy controllers to load-weight, fabric-mix, and dirt sensors and automatically set the wash cycle for the best use of power, water, and detergent. As a more specific example, Canon developed an autofocusing camera that uses a charge-coupled device (CCD) to measure the clarity of the image in six regions of its field of view and use the information provided to determine if the image is in focus. It also tracks the rate of change of lens movement during focusing, and controls its speed to prevent overshoot. The camera's fuzzy control system uses 12 inputs: 6 to obtain the current clarity data provided by the CCD and 6 to measure the rate of change of lens movement. The output is the position of the lens. The fuzzy control system uses 13 rules and requires 1.1 kilobytes of memory. As another example of a practical system, an industrial air conditioner designed by Mitsubishi uses 25 heating rules and 25 cooling rules. A temperature sensor provides input, with control outputs fed to an inverter, a compressor valve, and a fan motor. Compared to the previous design, the fuzzy controller heats and cools five times faster, reduces power consumption by 24%, increases temperature stability by a factor of two, and uses fewer sensors.

The enthusiasm of the Japanese for fuzzy logic is reflected in the wide range of other applications they have investigated or implemented: character and handwriting recognition; optical fuzzy systems; robots, including one for making Japanese flower arrangements; voice-controlledrobot helicopters, this being no mean feat, as hovering is a "balancing act" rather similar to the inverted pendulum problem; control of flow of powders in film manufacture; elevator systems; and so on. Work on fuzzy systems is also proceeding in the US and Europe, though not with the same enthusiasm shown in Japan. The US Environmental Protection Agency has investigated fuzzy control for energy-efficient motors, and NASA has studied fuzzy control for automated space docking: simulations show that a fuzzy control system can greatly reduce fuel consumption. Firms such as Boeing, General Motors, Allen-Bradley, Chrysler, Eaton, and Whirlpool have worked on fuzzy logic for use in low-power refrigerators, improved automotive transmissions, and energy-efficient electric motors. In 1995 Maytag introduced an "intelligent" dishwasher based on a fuzzy controller and a "one-stop sensing module" that combines a thermistor, for temperature measurement; a conductivity sensor, to measure detergent level from the ions present in the wash; a turbidity sensor that measures scattered and transmitted light to measure the soiling of the wash; and a magnetostrictive sensor to read spin rate. The system determines the optimum wash cycle for any load to obtain the best results with the least amount of energy, detergent, and water. It even adjusts for dried-on foods by tracking the last time the door was opened, and estimates the number of dishes by the number of times the door was opened. Research and development is also continuing on fuzzy applications in software, as opposed to firmware, design, including fuzzy expert systems and integration of fuzzy logic with neural-network and so-called adaptive "genetic" software systems, with the ultimate goal of building "self-learning" fuzzy control systems. [edit]Fuzzy sets The input variables in a fuzzy control system are in general mapped into by sets of membership functions similar to this, known as "fuzzy sets". The process of converting a crisp input value to a fuzzy value is called "fuzzification".

A control system may also have various types of switch, or "ON-OFF", inputs along with its analog inputs, and such switch inputs of course will always have a truth value equal to either 1 or 0, but the scheme can deal with them as simplified fuzzy functions that are either one value or another.

You might also like