1 / 16

Solution: Homework 7

Fuzzy Logic. Fuzzy Control. Solution: Homework 7. Fuzzy Logic. Fuzzy Control. Solution: Homework 7 (Cont.). Fuzzy Logic. Fuzzy Control. LI. FV. Single Tank System. Desired liquid level: 5 cm ( 0.05 m ). Required inflow rate: ? 0.0119 m 3 /s ( 11.9 l /s ).

gyan
Download Presentation

Solution: Homework 7

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Fuzzy Logic Fuzzy Control Solution: Homework 7

  2. Fuzzy Logic Fuzzy Control Solution: Homework 7 (Cont.)

  3. Fuzzy Logic Fuzzy Control LI FV Single Tank System Desired liquid level: 5 cm (0.05 m) Required inflow rate: ? 0.0119 m3/s (11.9 l/s) A : cross-sectional area of the tank a : cross-sectional area of the pipe

  4. Fuzzy Logic Fuzzy Control high low okay close fast no change open fast 1 1 015 9 14 –30 –10 0 10 30 Single Tank System: 3 Rules Desired liquid level Liquid level [cm] Valve control signal [%/s] FC with 3 Rules • Rule 1:IF level is okay, THEN valve is no change. • Rule 2: IF level is low, THEN valve is open fast. • Rule 3: IF level is high, THEN valve is close fast.

  5. Fuzzy Logic Fuzzy Control Single Tank System: 3 Rules Simulation in Simulink Liquid level Valve control signal Valve opening

  6. Fuzzy Logic Fuzzy Control Single Tank System: 3 Rules Subsystem Valve Subsystem Single-Tank • Double-click a subsystem block to see the elements inside

  7. Fuzzy Logic Fuzzy Control Fuzzy Logic Controller in Simulink • In Matlab workspace, design the fuzzy controller using fuzzy inference system (FIS) editor. • Export the fuzzy logic controller to workspace, give name. • File > Export > To Workspace, (i.e. : STFC_3) • In Simulink, create a new model. • Open the Fuzzy Logic Toolbox and drag “Fuzzy Logic Controller” to the new model. • Double-click the “FLC” and insert the name given to the controller above.

  8. Fuzzy Logic Fuzzy Control Single Tank System: 3 Rules Evaluation “overshoot” too large slow response

  9. Fuzzy Logic Fuzzy Control no change close slow open slow close fast high low okay open fast 1 1 015 9 14 –30 –20 –10 0 10 20 30 negative zero positive 1 –4 –0.5 0 0.5 4 Single Tank System: 5 Rules Valve control signal [%/s] Liquid level [cm] Rate of liquid level [cm/s]

  10. Fuzzy Logic Fuzzy Control Single Tank System: 5 Rules no change close slow open slow close fast open fast negative high zero positive low okay 1 1 1 –4 –0.5 0 0.5 4 015 9 14 –30–20 –10 0 10 20 30 Rate of liquid level [cm/s] Valve control signal [%/s] Liquid level [cm] FC with 5 Rules • Rule 1:IF level is okay, THEN valve is no change. • Rule 2: IF level is low, THEN valve is open fast. • Rule 3: IF level is high, THEN valve is close fast. • Rule 4: IF level is okay AND rate is negative, THEN valve is open slow. • Rule 5: IF level is okay AND rate is positive, THEN valve is close slow.

  11. Fuzzy Logic Fuzzy Control Single Tank System: 5 Rules FIS Editor Simulink Low pass filter, to smooth the derivation result Derivation, to obtain the rate of liquid level

  12. Fuzzy Logic Fuzzy Control Single Tank System: 5 Rules • With all other factors stay the same, a better fuzzy control behavior and performance can be achieved by the combination of: • Redefining existing membership functions. • Refining existing rule. • Adding new membership functions and new rules. acceptable “overshoot” Liquid level faster response Valve control signal Valve opening

  13. Fuzzy Logic Fuzzy Control + – LI FV Single Tank System: Feedback Control • How if the desired liquid level should be changed to 10 cm? 7cm? 12cm? Set point r Error e Measured variable y • Practical solution: Error signal as the input to the fuzzy controller.

  14. Fuzzy Logic Fuzzy Control no change close slow open slow close fast open fast positive negative zero 1 1 –10 –2 0 210 –30 –20 –10 0 10 20 30 negative zero positive 1 –4 –0.5 0 0.5 4 Single Tank System: Feedback Control . . e < 0 e < 0 e > 0 e > 0 Error of liquid level [cm] Rate of error [cm/s] Valve control signal [%/s]

  15. Fuzzy Logic Fuzzy Control r [cm] 6 5 4 t [s] 0 40 80 120 Homework 8 • Implement the fuzzy logic controller as a feedback control for the single tank system in Matlab-Simulink. • Apply the 5 rule version with the corresponding membership functions. • Test the control loop to follow the reference trajectory as shown below. Reference trajectory Method Settings

More Related