What Is Fuzzy Logic? | Fuzzy Logic, Part 1

Sdílet
Vložit
  • čas přidán 24. 08. 2021
  • This video introduces fuzzy logic and explains how you can use it to design a fuzzy inference system (FIS), which is a powerful way to use human experience to design complex systems. Designing a FIS does not require a model, so it works well for complex systems with underlying mechanisms that are not fully known. If you have some experience and intuition about the system, then you can develop and implement the rules.
    Fuzzy Logic Toolbox: bit.ly/38xNy7E?s_eid=PSM_15028
    --------------------------------------------------------------------------------------------------------
    Get a free product trial: goo.gl/ZHFb5u
    Learn more about MATLAB: goo.gl/8QV7ZZ
    Learn more about Simulink: goo.gl/nqnbLe
    See what's new in MATLAB and Simulink: goo.gl/pgGtod
    © 2022 The MathWorks, Inc. MATLAB and Simulink are registered trademarks of The MathWorks, Inc.
    See www.mathworks.com/trademarks for a list of additional trademarks. Other product or brand names may be trademarks or registered trademarks of their respective holders.
  • Věda a technologie

Komentáře • 94

  • @trendyprimawijaya314
    @trendyprimawijaya314 Před 2 lety +31

    Sir, everytime you upload matlab tech talk video, it always relevant to my current studies. It's like you always hear my inner voice: "can someone explain about this and that to me, clearly and catchy?". Then, i became more confidence that I am in the rght learning path. Very big thanks, sir. 💙

  • @eumesmo5306
    @eumesmo5306 Před 2 lety +1

    every time i strumble upon a new video and see master douglas talking I know beforehand the video will be awesome!

  • @AnilTasdemirT
    @AnilTasdemirT Před 11 měsíci +9

    Wow, just wow! Outstanding explanation! I have just started watching your videos and they are both detailed and understandable. Thank you for all 🙏

  • @ruffianeo3418
    @ruffianeo3418 Před 3 dny

    Over the decades, I dabbled with fuzzy logic a couple of times. The base modus operandi of fuzzy logic aside, it is always interesting to think about the way, fuzzy logic is presented to a user within a programming language.
    Being currently in one of my iterations, thinking about fuzzy logic implementations, I came to the conclusion, that the "IF ... THEN ... " syntax is not really intuitive at all. The video uses the mandami approach, as opposed to the TKS approach. Both of which differ in the THEN term.
    One of the benefits of Common Lisp is its macro system. And while I started out with the "IF THEN" syntax, I finally converged on something I find more... true to what is actually happening:
    As an example (for your amusement and me getting some productive feedback, maybe), here the "bot" implementation for a silly and simple dice game, where the bot needs to choose between 2 actions, depending on the game state, which is a 4 tuple of values. The function uses my nifty "fuzzy" macro... lets see if people can intuit, how the function works...
    (defun ddg-fuzzy-bot-choose-action
    (opponent-score own-score turn-score last-roll)
    (let ((low-roll (define-f-var '(1 1.0) '(4 0.0)))
    (high-roll (define-f-var '(2 0.0) '(5 1.0)))
    (behind (define-f-var '(-20 1.0) '(0 0.0)))
    (ahead (define-f-var '(0 0.0) '(20 1.0)))
    (even (define-f-var '(-5 0.0) '(0 1.0) '(5 0.0)))
    (high-stake (define-f-var '(2 0.0) '(10 1.0)))
    (low-stake (define-f-var '(0 1.0) '(4 0.0))))
    (let ((score-diff (- (+ own-score turn-score)
    opponent-score)))
    (fuzzy
    ;; associate input-variables with membership functions
    ((turn-score (low-stake high-stake))
    (last-roll (low-roll high-roll))
    (score-diff (behind even ahead)))
    ;; define he fuzzy rules
    ((should-roll
    (or (and ahead low-stake low-roll)
    behind
    (and even low-roll)))
    (should-stop
    (and ahead
    (or high-stake high-roll))))
    ;; use the fuzzy output variables.
    (values
    (if (>= should-roll should-stop)
    (then :roll)
    (else :stop))
    (list :should-roll should-roll
    :should-stop should-stop))))))
    The FUZZY macro helps with associating membership-functions to input variables and to define the rules for its output variables "should-roll" "should-stop" in a lispy way. The third part in that macro is just the code, which uses the computed output variables for its decision making.
    Behind the scenes, the OR and AND operations are simply replaced with MAX and MIN, respectively.
    (should-stop
    (and ahead
    (or high-stake high-roll)))
    would be written traditionally with something like this:
    IF ahead AND (high-stake OR high-roll) THEN rather should-stop
    And I would also have to define a set of membership functions for the "should-stop" fuzzy variable. It adds a lot of complexity, which might not often be required. Also I find it difficult to come up with those membership functions for the outputs.

  • @ProfKofiPhD
    @ProfKofiPhD Před rokem +3

    Easy to understand. Great job, mate!

  • @sachinkumar-el5lf
    @sachinkumar-el5lf Před 2 lety +5

    Hi sir, big fan of your teaching. Fell in love with control systems after watching your videos. Thank you so much sir❤

  • @anisharaj4601
    @anisharaj4601 Před 4 měsíci

    explaining the steps with the example cleared most of my doubts. Thank you!

  • @abs80900
    @abs80900 Před 2 lety +2

    really clear and easy to follow explanation, thank you so much!

  • @isharaudayangawimalaweera3642

    Simply Marvelous job Mr. Brian. Thank you very much

  • @snktshrma
    @snktshrma Před 2 lety +1

    Was eagerly waiting for this! Great video

  • @hjcho8462
    @hjcho8462 Před 2 lety +1

    Always deeply appreciate ur series. Thank u so much

  • @wokguysrandomstuff5535

    The explanations are so clear!

  • @sarahdecker1
    @sarahdecker1 Před 2 lety +2

    Awesome video. Very effective teaching of the subject. Thank you!

  • @snowinnov
    @snowinnov Před 2 lety +3

    Very interesting talk, and easy to understand! Just to say the fuzzification process explained here is a little bit different from my understanding. The fuzzificaion is to convert a crisp number into a fuzzy set. It can be singleton or non-singleton. Your explanation is based on singleton, and taking one step further to get the compatibility (which is then used as rule firing strength) to rule antecedents. But, anyway, I would say your explanation is good enough as an illustration for beginners to get some ideas about how the whole fuzzy system works. Thanks for sharing these. It’s really useful!

  • @looper6394
    @looper6394 Před 2 lety +14

    take all of my data and tell me the theory of everything, thank you

  • @sadie1837
    @sadie1837 Před rokem

    Thanks for this video. It has given me a better understanding of fuzzy logic.

  • @panyachutisiriwong6200

    I truly love this clip. Inspire me a lot for work. - from Thailand

  • @tonnirvana
    @tonnirvana Před 2 lety +29

    Hello Mr.Douglas 😊

  • @user-qi9zo5ge8r
    @user-qi9zo5ge8r Před 6 měsíci +2

    I just started studying on this topic and saw your video. A great video to understand the logic. Thank you !

    • @BrianBDouglas
      @BrianBDouglas Před 6 měsíci

      I'm glad it was a good introduction for you

  • @jlleluc4s
    @jlleluc4s Před 2 lety

    A talent of control explanation!

  • @mukeshmann3008
    @mukeshmann3008 Před rokem +6

    Great Explanation ! One doubt is that when you you do defuzzification of fuzzy variables= [0 0.9 0.1] Don't we chop first graph at 0% , second graph ( Medium) at 90% and last one at 10 % . Why you have chopped the first graph( low membership) at 10 % it should be 0%. Require your expert comments on this .

  • @sigma_delta
    @sigma_delta Před rokem +3

    fuzzy here, fuzzy there, my brain goes fuzzy fuzzy. hahaha

  • @enginufuk
    @enginufuk Před 3 měsíci

    It's extremely easy to follow you. Please keep it that way. 🙏

  • @GiovanniBR1234
    @GiovanniBR1234 Před 2 lety +53

    One of my favorite subject explained by one of my favorite Controls teacher. Amazing! Wonder if you're going to introduce more advanced topics on the series, especially type-2 fuzzy logic

    • @BrianBDouglas
      @BrianBDouglas Před 2 lety +10

      I'm not sure yet. I'm working on the last video right now and I want to cover fuzzy trees, type-2, and training a fuzzy inference system using data. It's turning out to be too much information for a single video so I'm going to start cutting things out. I don't yet what will stay. Thanks for the comment!

    • @GiovanniBR1234
      @GiovanniBR1234 Před 2 lety +2

      @@BrianBDouglas All of these topics seem very interesting either way. Really looking forward to it!

  • @mohamadalikhani2665
    @mohamadalikhani2665 Před 2 lety +1

    Man, You really ROCK!!!
    It is very easy to understand, despite reading books😊

  • @eddiemetalblood1
    @eddiemetalblood1 Před 2 lety +1

    Great video!

  • @surflaweb
    @surflaweb Před 2 lety

    Great explanation.

  • @r3dat29e
    @r3dat29e Před 2 lety

    Comprehensive and simple.

  • @maxzim-dude
    @maxzim-dude Před 3 měsíci

    good job Brian

  • @MALEKBAFADHLAKE
    @MALEKBAFADHLAKE Před 2 lety

    great explanation

  • @ahmedabdelkader31
    @ahmedabdelkader31 Před rokem

    Great work

  • @bonfaceosuka
    @bonfaceosuka Před rokem

    Amazing tutorial

  • @SungBySaheba
    @SungBySaheba Před 3 měsíci

    Amazing video

  • @user-me9jw8zc3g
    @user-me9jw8zc3g Před 2 lety

    Fuzzy logic = Daily way of thinking! ♡♧◇☆♡

  • @charlesokoh3373
    @charlesokoh3373 Před 2 lety +3

    Waiting for Part 2

  • @DerHansDaselbst
    @DerHansDaselbst Před 2 lety

    Tanks a lot!

  • @khristianss
    @khristianss Před 2 lety +1

    gracias!

  • @jasonkim1642
    @jasonkim1642 Před 2 lety +1

    Thanks a lot! Quite sad that fuzzy logic application do not get much credits industry-wise nowadays.

  • @dr.alikhudhair9414
    @dr.alikhudhair9414 Před 12 dny

    Thank you

  • @yeachanchoi449
    @yeachanchoi449 Před měsícem

    Fantastico!

  • @Yogeeswar_Thumati
    @Yogeeswar_Thumati Před 7 měsíci

    A good video ❤

  • @vtoo_ir
    @vtoo_ir Před 2 lety

    Thanks

  • @josephcorleto1853
    @josephcorleto1853 Před rokem

    If you ever make a full video course on this for control engineering people, please take my money.

  • @mark-qi6di
    @mark-qi6di Před 2 lety +4

    13:40 Interesting that there is never 0 risk...

  • @nomanziad3314
    @nomanziad3314 Před rokem

    Nice!

  • @omarteffahi7048
    @omarteffahi7048 Před rokem

    Thanks for the explanation
    But how to know where the centroid of the shape should be ?

  • @gustavohenriquezeni350
    @gustavohenriquezeni350 Před 2 lety +2

    Hey, i'm a computer engineering student at UTFPR Curitiba and i've participated in extension courses in the past that were basically translating videos like these to portuguese, submitting the subtitles to the platform and then having it available in multiple languages. We'd then receive a certain amount of hours in complementary activities that we require to graduate.
    Is there an e-mail or form that one could use to get in contact with matlab or the teacher responsible for these videos to formalize an extension course inside UTFPR to subtitle these four videos to portuguese? I'm sure this material would help a ton of students all across Brazil and many more countries!

  • @abims01
    @abims01 Před rokem

    Well done Mr. Douglas. Please, I require serious help with my project. I am working on intelligent traffic light system using a fuzzy inference engine. Please, how will a fuzzy logic program be written and connected to a traffic light system?

  • @richardbleriot7613
    @richardbleriot7613 Před 2 lety +1

    Thanks For the video. Can I apply it on online gambling games😅😅?

  • @Aryan-dq1ll
    @Aryan-dq1ll Před rokem

    Brian Douglas is a boon for people who want to learn Control Systems

  • @andreseajc
    @andreseajc Před rokem

    here! take my like!

  • @mohamedhabas7391
    @mohamedhabas7391 Před rokem

    I failed fuzzy logic in Uni :)
    Still best course i took ;)

  • @zapatazapata6414
    @zapatazapata6414 Před 2 lety

    Brain is the OG

  • @cogofknowledge6142
    @cogofknowledge6142 Před rokem +1

    THE BATLOGIC CONTROLLER

  • @abousamidjziri724
    @abousamidjziri724 Před 2 lety

    Thank you
    And what about Neuro fuzzy

  • @iramkumar78
    @iramkumar78 Před 2 lety

    Fuzzy Logic is multi valued language with membership functions. Red Pill. Matrix Crew. Topology.

  • @georgyurumov8095
    @georgyurumov8095 Před 10 měsíci

    Really great explanations of a very fuzzy topic!!! Is there a link to the matlab banking example in the video and to the second part of this series?

    • @BrianBDouglas
      @BrianBDouglas Před 9 měsíci +1

      Here's the 2nd part: czcams.com/video/CBTEVFphv-E/video.htmlsi=U1kGZXK5ScJ2cZJS. And I wrote up the banking example script but didn't share it. Here is the tipping example though! www.mathworks.com/help/fuzzy/working-from-the-command-line.html. Hope that helps!

    • @georgyurumov8095
      @georgyurumov8095 Před 9 měsíci

      thank you. have you tried coding it in python?@@BrianBDouglas

  • @drbonesshow1
    @drbonesshow1 Před 2 lety

    When fuzzy becomes less fuzzy: Consider the Twilight Zone episode where the banker is ready to grant a loan, but doesn't know that the borrower wants to bet the loan on several horse races. That is, until Hector B. Poole who can read minds overhears the borrower's thoughts in A Penny For Your Thoughts.

  • @answerman9933
    @answerman9933 Před rokem

    Is this like PID: proportional, integral, differential?

  • @heliamoosavi1825
    @heliamoosavi1825 Před rokem

    Can anyone tell me what Abbreviation NDS stands for ?

  • @arrow4redemption
    @arrow4redemption Před 2 lety

    pls how can i resolve this
    fuzzy
    Error using FuzzyInferenceSystem (line 288)
    min is a script.
    Error in mamfis (line 165)
    fis = fis@FuzzyInferenceSystem(varargin{:});
    Error in fuzzy (line 30)
    action = mamfis('Name','Untitled');

  • @power-max
    @power-max Před 2 lety

    How is this different from point systems (like XP, health, etc) in videogames or analog control systems? Are those both examples of 'fuzzy logic'?

  • @drbonesshow1
    @drbonesshow1 Před 2 lety

    The world is full of fuzzy logic people.

  • @AliHosseiniLaqa
    @AliHosseiniLaqa Před 7 měsíci

    Awsome , thank u , could u plz give us these presentation pdfs or powerpoints ?

    • @BrianBDouglas
      @BrianBDouglas Před 7 měsíci

      I didn't create a pdf or slides of the video. Sorry.

    • @AliHosseiniLaqa
      @AliHosseiniLaqa Před 6 měsíci

      Ok , i thought there is a powepoint or sth you are presenting . ​@@BrianBDouglas

    • @AliHosseiniLaqa
      @AliHosseiniLaqa Před 6 měsíci

      ​@@BrianBDouglasby the way is there any way that i can talk to you ?

  • @1.4142
    @1.4142 Před 2 lety +1

    Fuzzy logic was a bear. Fuzzy logic had 0.2 hairiness.

  • @akshaydarekar5863
    @akshaydarekar5863 Před 2 lety

    Sow how convert the 46% to binary again

  • @orunoawhie5695
    @orunoawhie5695 Před 10 měsíci

    Just give good tips men..

  • @oldcowbb
    @oldcowbb Před rokem

    can we say fuzzy logic is a kind of machine learning?

  • @NBScienceGuy
    @NBScienceGuy Před 2 lety +1

    This was still too fuzzy for us!

  • @edvanderschuit
    @edvanderschuit Před 5 měsíci

    Ok

  • @EngGear
    @EngGear Před 2 lety

    Does fuzzy logic deny the law of non excluded middle?

  • @basertech5222
    @basertech5222 Před 2 lety

    Lütfü Aliasker Zade

  • @drbonesshow1
    @drbonesshow1 Před 2 lety

    You are Brian? Or are your really Brian?

  • @StefanBrock_PL
    @StefanBrock_PL Před 2 lety

    Nice introduction without mathematics :-)

  • @hieudotrung8616
    @hieudotrung8616 Před 10 měsíci

    How are you caculated 46 percent% ?

    • @sethmobit
      @sethmobit Před 7 měsíci

      Finally I got it!
      How as him said, 46 is the X axis of centroid of the form that represents 10% of the trapezium of low membership and 90% of medium membership, right?
      The X axis of the centroid can be obtained by the formula: x = x1 + (x2-x1) * (A2/(A1+A2))
      where:
      - x1 is the x-axis of centroid of trapezium slice;
      - x2 is the x-axis of centroid of triangle slice;
      - A1 is the area of trapezium slice;
      - A2 is the area of triangle slice;
      The x-axis of centroid of the forms can be obtained adding the bigger x point with the smaller x point and dividing by 2. The trapezium starts at 0 and goes to 50, so (50+0)/2 = 25. The triangle starts at 25 and goes to 75, so (75+25)/2 = 50.
      We have x1=25 and x2=50.
      Now we calculate the whole area of trapezium by adding the bases and multiplying by the height/2. The smaller base have 25 width, the bigger have 50 width and the height is 100. So (50+25)*(100/2) = 3750. As we need only 10% of this area, we got A1 = 375.
      The whole area of the triangle is base times height divided by 2. So, (50*100)/2 = 2500. As we need only 90%, we got A2 = 2250.
      Now, we replace the formula:
      x = x1+(x2-x1)*(A2/(A1+A2))
      x = 25+(50-25)*(2250/(375+2250))
      x = 25+25*(2250/2625)
      x = 25+25*0.8571
      x = 25+21.42
      x = 46.42

  • @dantero_
    @dantero_ Před rokem

    i do not understand why %46 for this example: 12:01

    • @dantero_
      @dantero_ Před rokem

      How can we calculate the centroid of an shape?

    • @sethmobit
      @sethmobit Před 7 měsíci

      me neither, I was trying to find if someone said about

    • @sethmobit
      @sethmobit Před 7 měsíci +1

      Finally I got it!
      How as him said, 46 is the X axis of centroid of the form that represents 10% of the trapezium of low membership and 90% of medium membership, right?
      The X axis of the centroid can be obtained by the formula: x = x1 + (x2-x1) * (A2/(A1+A2))
      where:
      - x1 is the x-axis of centroid of trapezium slice;
      - x2 is the x-axis of centroid of triangle slice;
      - A1 is the area of trapezium slice;
      - A2 is the area of triangle slice;
      The x-axis of centroid of the forms can be obtained adding the bigger x point with the smaller x point and dividing by 2. The trapezium starts at 0 and goes to 50, so (50+0)/2 = 25. The triangle starts at 25 and goes to 75, so (75+25)/2 = 50.
      We have x1=25 and x2=50.
      Now we calculate the whole area of trapezium by adding the bases and multiplying by the height/2. The smaller base have 25 width, the bigger have 50 width and the height is 100. So (50+25)*(100/2) = 3750. As we need only 10% of this area, we got A1 = 375.
      The whole area of the triangle is base times height divided by 2. So, (50*100)/2 = 2500. As we need only 90%, we got A2 = 2250.
      Now, we replace the formula:
      x = x1+(x2-x1)*(A2/(A1+A2))
      x = 25+(50-25)*(2250/(375+2250))
      x = 25+25*(2250/2625)
      x = 25+25*0.8571
      x = 25+21.42
      x = 46.42

    • @dantero_
      @dantero_ Před 7 měsíci +1

      @@sethmobit 👍🏻👏🏻👏🏻

  • @JasonTubeOffical
    @JasonTubeOffical Před rokem

    Thanks