Genopt and trnopt programs

When simulation models are used to simulate and design a system, it is usually not easy to determine the parameter values that lead to optimal system performance. This is sometimes due to time constraints, since it is time consuming for a user to change the input values, run the simulation, interpret the new results, and guess how to change the input for the next trial. Sometimes time is not a problem, but due to the complexity of the system analyzed, the user is just not capable of understanding the nonlinear interactions of the various parameters. However, using genetic algorithms, it is possible to do automatic single- or multi-parameter optimization with search techniques that require only little effort. GenOpt is a generic optimization program developed for such system optimization. It was designed by the Lawrence Berkeley National Laboratory and is available free of charge (GenOpt, 2008). GenOpt is used for finding the values of user-selected design parameters that minimize a so-called objective function, such as annual energy use, peak electrical demand, or predicted percentage of dissatisfied people (PPD value), leading to best operation of a given system. The objective function is calculated by an external simulation program, such as TRNSYS (Wetter, 2001). GenOpt can also identify unknown parameters in a data fitting process. GenOpt allows coupling any simulation program (e.g., TRNSYS) with text-based input-output (I/O) by simply modifying a configuration file, without requiring code modification. Further, it has an open interface for easily adding custom minimization algorithms to its library. This allows using GenOpt as an environment for the development of optimization algorithms (Wetter, 2004).

Another tool that can be used is TRNopt, which is an interface program that allows TRNSYS users to quickly and easily utilize the GenOpt optimization tool to optimize combinations of continuous and discrete variables. GenOpt actually controls the simulation and the user sets up the optimization beforehand, using the TRNopt preprocessor program.

11.6.3 Fuzzy Logic

Fuzzy logic is a logical system, which is an extension of multi-valued logic. Additionally, fuzzy logic is almost synonymous with the theory of fuzzy sets, a theory that relates to classes of objects without sharp boundaries in which membership is a matter of degree. Fuzzy logic is all about the relative importance of precision, i.e., how important it is to be exactly right when a rough answer will work. Fuzzy inference systems have been successfully applied in fields such as automatic control, data classification, decision analysis, expert systems, and computer vision. Fuzzy logic is a convenient way to map an input space to an output space—as for example, according to hot water temperature required, to adjust the valve to the right setting, or according to the steam outlet temperature required, to adjust the fuel flow in a boiler. From these two examples, it can be understood that fuzzy logic mainly has to do with the design of controllers.

Conventional control is based on the derivation of a mathematical model of the plant from which a mathematical model of a controller can be obtained.

When a mathematical model cannot be created, there is no way to develop a controller through classical control. Other limitations of conventional control are (Reznik, 1997):

• Plant nonlinearity. Nonlinear models are computationally intensive and have complex stability problems.

• Plant uncertainty. Accurate models cannot be created due to uncertainty and lack of perfect knowledge.

• Multi-variables, multi-loops, and environmental constraints. Multi-variable and multi-loop systems have complex constraints and dependencies.

• Uncertainty in measurements due to noise.

• Temporal behavior. Plants, controllers, environments, and their constraints vary with time. Additionally, time delays are difficult to model.

The advantages of fuzzy control are (Reznik, 1997):

• Fuzzy controllers are more robust than PID controllers, as they can cover a much wider range of operating conditions and operate with noise and disturbances of different natures.

• Their development is cheaper than that of a model-based or other controller to do the same thing.

• They are customizable, since it is easier to understand and modify their rules, which are expressed in natural linguistic terms.

• It is easy to learn how these controllers operate and how to design and apply them in an application.

• They can model nonlinear functions of arbitrary complexity.

• They can be built on top of the experience of experts.

• They can be blended with conventional control techniques.

Fuzzy control should not be used when conventional control theory yields a satisfactory result and an adequate and solvable mathematical model already exists or can easily be created.

Fuzzy logic was initially developed in 1965 in the United States by Professor Lofti Zadeh (1973). In fact, Zadeh's theory not only offered a theoretical basis for fuzzy control but established a bridge connecting artificial intelligence to control engineering. Fuzzy logic has emerged as a tool for controlling industrial processes, as well as household and entertainment electronics, diagnosis systems, and other expert systems. Fuzzy logic is basically a multi-valued logic that allows intermediate values to be defined between conventional evaluations such as yes-no, true-false, black-white, large-small, etc. Notions such as "rather warm" or "pretty cold" can be formulated mathematically and processed in computers. Thus, an attempt is made to apply a more humanlike way of thinking to the programming of computers.

A fuzzy controller design process contains the same steps as any other design process. One needs initially to choose the structure and parameters of a fuzzy controller, test a model or the controller itself, and change the structure and/or

Actual inputs

Fuzzification

Membership functions of inputs:

Î/M ,

Fuzzy inputs

Fuzzy processing

Fuzzy rules:

If pressure is Neg Big, then time is long

If pressure is Pos Big, then time is short

Fuzzy output

Defuzzification

Membership functions of output (s):

\/M ,

Control output(s)

FiGURE ll.22 operation of a fuzzy controller.

FiGURE ll.22 operation of a fuzzy controller.

parameters based on the test results (Reznik, 1997). A basic requirement for implementing fuzzy control is the availability of a control expert who provides the necessary knowledge for the control problem (Nie and Linkens, 1995). More details on fuzzy control and practical applications can be found in the works by Zadeh (1973), Mamdani (1974; 1977), and Sugeno (1985).

The linguistic description of the dynamic characteristics of a controlled process can be interpreted as a fuzzy model of the process. In addition to the knowledge of a human expert, a set of fuzzy control rules can be derived by using experimental knowledge. A fuzzy controller avoids rigorous mathematical models and, consequently, is more robust than a classical approach in cases that cannot, or only with great difficulty, be precisely modeled mathematically. Fuzzy rules describe in linguistic terms a quantitative relationship between two or more variables. Processing the fuzzy rules provides a mechanism for using them to compute the response to a given fuzzy controller input.

The basis of a fuzzy or any fuzzy rule system is the inference engine responsible for the inputs' fuzzification, fuzzy processing, and defuzzification of the output. A schematic of the inference engine is shown in Figure 11.22. Fuzzification means that the actual inputs are fuzzified and fuzzy inputs are obtained. Fuzzy processing means that the inputs are processed according to the rules set and produces fuzzy outputs. Defuzzification means producing a crisp real value for fuzzy output, which is also the controller output.

The fuzzy logic controller's goal is to achieve satisfactory control of a process. Based on the input parameters, the operation of the controller (output) can be determined. The typical design scheme of a fuzzy logic controller is shown in Figure 11.23 (Zadeh, 1973). The design of such a controller contains the following steps:

1. Define the inputs and the control variables.

2. Define the condition interface. Inputs are expressed as fuzzy sets.

3. Design the rule base.

4. Design the computational unit. Many ready-made programs are available for this purpose.

5. Determine the rules for defuzzification, i.e., to transform fuzzy control output to crisp control action.

FIGURE 11.23 Basic configuration of fuzzy logic controller.

Very high High Okay Low Very low

500 750 1000 1250 1500 1750 2000

Input variable "input sensor' FIGURE 11.24 Membership functions for linguistic variables describing an input sensor.

Was this article helpful?

0 0
Getting Started With Solar

Getting Started With Solar

Do we really want the one thing that gives us its resources unconditionally to suffer even more than it is suffering now? Nature, is a part of our being from the earliest human days. We respect Nature and it gives us its bounty, but in the recent past greedy money hungry corporations have made us all so destructive, so wasteful.

Get My Free Ebook


Post a comment