230 likes | 237 Views
Chapter 12 Case Studies Part B. Control System Design. Control System Design. Two case studies combined - use both neural network and fuzzy logic approaches Single-axis cart positioning system Initial position x(0) and velocity v(0) arbitrary within limits
E N D
Control System Design • Two case studies combined - use both neural network and • fuzzy logic approaches • Single-axis cart positioning system • Initial position x(0) and velocity v(0) arbitrary within limits • Mass of cart is m, force F is applied (positive from right) • Object is to move cart to target location xt in minimum time • Objective is met when velocity < vmin and
System Equations * System equations are known and are given on next slide * Choice of discretized time increment is very important (.02 sec. here) * Maximum number of time steps (perhaps 450-500) * Select mass of cart (2 kg. here)
System Equations Optimal “bang-bang” solution using force F (Bryson 1975); apply F if: otherwise, apply –F Note that system equations often are not available.
Neural Network Approach * Two main uses are made of neural networks: > modeling system to be controlled and overall system with controller > design of controller * First step is to model the nonlinear system without the controller
System Modeling Take data with a sufficient variety of input combinations.
System Model * NLS model predicts system state at next time increment given present state and inputs (including controller output) * Can use system equations or direct measurement * Take data under typical operational conditions * Start out with an appropriate set of initial conditions * Train neural net using data at time t for input and for output
Controller Design (Preview) This is what the controller should look like. xt is the target value.
Controller Design • The first step is to model overall system with controller • Use overall model to generate (obtain) training pattern pairs • Can use system equations, system performance curves, • neural net model, or trained operator to operate system • while data are taken • System operation under typical operating conditions is important
Develop Controller • Combine nonlinear model (weights frozen) with untrained • controller network • Use patterns from overall system model to train controller • Output PE of controller can be input PE of trained system • model • Replace system model with system; controller is now online
Fuzzy Logic Approach • Now use fuzzy logic and evolutionary computation to solve • same problem • Assume same basic groundwork has been done; same • parameters as before • First step is to partition domains of input variables (x and v) • and the output variable F into fuzzy sets • Value of x appearing in fuzzy sets, etc. is really xt – x • Objective is to move cart to target position in minimum time
Fuzzy Rule Evolution • Defining fuzzy membership functions can be difficult • In example, we define 5 membership functions over domain • of each input • Therefore, we have a 5 x 5 matrix • Don’t make system evolve more than it must–fill in “obvious” • matrix locations
Fuzzy Rule Evolution Each matrix position represents a rule consequent.
Representation and Operators • Decide on representation; example is {0,1,2,3,4,5}, • corresponding to 5 fuzzy membership functions and • “no entry” • Crossover can be standard 1-point or 2-point • Mutation possibilities include: • * increment/decrement by one • * mutate to any value • One GA approach used 31 individuals, crossover rate of .7, • mutation rate of .01, and elitist strategy
Fitness • Fitness is inversely proportional to number of time steps (other • metrics could be added) • One form of fitness is (max_steps_allowed – steps_required) • Average over wide variety of initial conditions representative • of operating environment
Evolution of Membership Functions * Evolve “better” locations for peak points and end points of membership functions * Evolve optimal mix of membership function types (linear, nonlinear) * Probably use same initial conditions and fitness function as previously * Perhaps iterate process
Other Approaches * Genetic programming used by Koza Used Lisp S-expressions Only three functions used: *, ABS, and > Good solution evolved in just 5 generations * Could perhaps use approach of Chapter 8, clustering system state vectors Use equations or simulations to obtain state vectors Cluster vectors using LVQ Develop fuzzy rules using cluster centroids * Other approaches possible
Summary • There is usually more than one good way to solve a problem. • Computational intelligence tools often provide a good approach when dealing with complex systems in changing environments.