220 likes | 463 Views
Motivations : To copy or imitate the control actions of an experienced human operator. S mooth interpolation between working point optimized controllers. 1: The Mamdani approach. 2: The Takagi- Sugeno approach. Fuzzy control. The Mamdani controller.
E N D
Motivations : • To copy or imitate the control actions of an experienced human operator. • Smooth interpolation between working point optimized controllers. • 1: The Mamdani approach. • 2: The Takagi-Sugenoapproach. Fuzzy control
Ri: IF x1is Ai1 . . . AND xnis An1THEN u is Bifor i= 1,,2,….K The Mamdanicontroller The input
Ri: IF x1is Ai1 . . . AND xnis An1THEN u is Bifor i= 1,,2,….K The MamdanicontrollerThe output
Error The Mamdanicontroller Scheme based rule base. Error rate
The Takagi-Sugenocontroller Ri: IF x1is Ai1 . . . AND xnis An1THEN u = PIDi (e) for i= 1,,2,….K
Rule of thumb • Each membership function should overlaps only with the closest neighboring membership functions; • For any possible input, its membership values in all relevant fuzzy sets should sum to 1 (or nearly) • It is often a good idea to have 5 membership functions for each input. • Two MF far away form steady state to govern a big +/- control signal. • Two MF in the stabile controlling area to govern the smooth and stabile approach to steady state. • One trapezoidal or triangular centered in steady state.
Rule of thumb Output : u
Simple Neuron-Fuzzy Tool for Small Control Devices (FUNNY) • A compiler: FuNNylanguage to C. Beside the Fuzzy system, the compilergenerate a simple test program thatcanbeused as a proto-type for interfacing. • A C library contains the learning algorithm: A gradient descend method based on a numerical calculation of the gradient. A random search method.
The Shower FuNNy The Shower model The Shower controler
FuNNy • The Fuzzymethode: • Zero-orderSugeno • or • Mamdaniwith singleton output Rule 1: if In1 is high and In2 is low then Out = 5.7; Rule 2: if In1 is high and In2 is high then Out = 2.1;
FuNNyGrammar • program-> mflist RULES rulelist • mflist-> memvar | mflistmemvar • memvar-> ...... • rulelist-> rule | rulelistrule • rule-> IF statement THEN VARID IS VARID • statement-> statement AND statement • | statement OR statement • | ( statement ) • | simplestatement • simplestatement-> VARID IS sentence • sentence-> NOT hedge_prim | hedge_prim • hedge_prim-> VARID | fuzzy_number | hedge • fuzzy_number-> ABOUT REAL TO ABOUT REAL | ABOUT REAL • hedge-> VERY VARID | MORE_OR_LESS VARID | EXTREMELY VARID
---- A small example: The showercontroller. ---- • tout: input; vout: input; dtcold: input; dthot: input; • cold tout: sigmoid( 25.0,a, 33.0,a, 1.0,c); • middle tout: triangle(28.0,a, 33.0,c, 38.0,a, 1.0,c); • hot tout: sigmoid( 40.0,a, 33.0,a, 1.0,c);
The Sigmoid and trianglemembershipfunction sigmoid(a,A,b,A,c,A) triangle(a,A,b,A,c,A, d,A)
---- A small example: The showercontroller. ---- • tout: input; vout: input; dtcold: input; dthot: input; • cold tout: sigmoid( 25.0,a, 33.0,a, 1.0,c); • middle tout: triangle(28.0,a, 33.0,c, 38.0,a, 1.0,c); • hot tout: sigmoid( 40.0,a, 33.0,a, 1.0,c); • to_littlevout: sigmoid( 1.0,c, 5.0,c, 1.0,c); • to_muchvout: sigmoid( 5.0,c, 1.0,c, 1.0,c); • down dtcold: sigmoid(-5.0,a, 0.0,a, 1.0,c); • up dtcold: sigmoid( 5.0,a, 0.0,a, 1.0,c); • down dthot: sigmoid(-5.0,a, 0.0,a, 1.0,c); • up dthot: sigmoid( 5.0,a, 0.0,a, 1.0,c); • big_downdvc: output(-0.5,a); • small_downdvc: output(-0.2,a); • no_changedvc: output( 0.0,c); • small_updvc: output( 0.2,a); • big_updvc: output( 0.5,a);
---- A small example: The showercontroller. ---- • if tout is hot and vout is to_little then dvh is small_down • if tout is hot and vout is to_little then dvc is big_up • if tout is cold and vout is to_little then dvh is big_up • if tout is cold and vout is to_little then dvc is no_change • if tout is hot and vout is to_much then dvh is big_down • if tout is hot and vout is to_much then dvc is small_up • if tout is cold and vout is to_much then dvh is no_change • if tout is cold and vout is to_much then dvc is big_down • if tout is middle then dvh is no_change • if tout is middle then dvc is no_change • if vout is to_little then dvc is small_up • if vout is to_much then dvc is small_down • if vout is to_little then dvh is small_up • if vout is to_much then dvh is small_down
---- A small example: The showercontroller. ---- • if dtcold is up then dvh is small_down • if dtcold is up then dvc is small_up • if dtcold is down then dvh is small_up • if dtcold is down then dvc is small_down • if dthot is up then dvh is small_down • if dthot is up then dvc is small_up • if dthot is down then dvh is small_up • if dthot is down then dvc is small_down
FCL IEC 61131-7 standard http://ffll.sourceforge.net/fcl.htm