What Is Fuzzy Logic? | Fuzzy Logic, Part 1

Поділитися
Вставка
  • Опубліковано 3 січ 2025

КОМЕНТАРІ • 104

  • @trendyprimawijaya314
    @trendyprimawijaya314 3 роки тому +40

    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. 💙

  • @AnilTasdemirT
    @AnilTasdemirT Рік тому +10

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

  • @aylinuçan-y6k
    @aylinuçan-y6k 11 місяців тому +4

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

    • @BrianBDouglas
      @BrianBDouglas 11 місяців тому

      I'm glad it was a good introduction for you

  • @GiovanniBR1234
    @GiovanniBR1234 3 роки тому +55

    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 3 роки тому +11

      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 3 роки тому +2

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

  • @eumesmo5306
    @eumesmo5306 2 роки тому +1

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

  • @IsaacAkomeaFrimpong
    @IsaacAkomeaFrimpong Рік тому +3

    Easy to understand. Great job, mate!

  • @sachinkumar-el5lf
    @sachinkumar-el5lf 3 роки тому +5

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

  • @juliansampedro
    @juliansampedro 4 місяці тому +1

    Thank you sir for such an excellent video, to the point and for once about fuzzy logic explained in a very clear way

  • @snowinnov
    @snowinnov 3 роки тому +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!

  • @isharaudayangawimalaweera3642
    @isharaudayangawimalaweera3642 3 роки тому +3

    Simply Marvelous job Mr. Brian. Thank you very much

  • @sigma_delta
    @sigma_delta Рік тому +3

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

  • @ruffianeo3418
    @ruffianeo3418 5 місяців тому

    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.

  • @tharindusathsara3414
    @tharindusathsara3414 Місяць тому

    Really useful video regarding the practical fuzzy logic. Thank you so much.

    • @MATLAB
      @MATLAB  Місяць тому

      Glad it was helpful!

  • @looper6394
    @looper6394 3 роки тому +15

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

  • @mukeshmann3008
    @mukeshmann3008 Рік тому +7

    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 .

    • @PUNITHANa
      @PUNITHANa 3 місяці тому

      Low risk is basically with high cred score , so the membership of high cred leaves us with low risk . That is why they have taken the low risk to be 10% (if u notice the x coordinates of the defuzzification graph it is risk ,low risk=high cred score)

  • @snktshrma
    @snktshrma 3 роки тому +1

    Was eagerly waiting for this! Great video

  • @mohamadalikhani2665
    @mohamadalikhani2665 2 роки тому +1

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

    • @MATLAB
      @MATLAB  2 роки тому +1

      Happy to help!

  • @abs80900
    @abs80900 3 роки тому +2

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

  • @tonnirvana
    @tonnirvana 3 роки тому +34

    Hello Mr.Douglas 😊

  • @josephcorleto1853
    @josephcorleto1853 Рік тому +1

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

  • @hjcho8462
    @hjcho8462 3 роки тому +1

    Always deeply appreciate ur series. Thank u so much

  • @sadie1837
    @sadie1837 Рік тому

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

  • @enginufuk
    @enginufuk 8 місяців тому

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

  • @anisharaj4601
    @anisharaj4601 9 місяців тому

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

  • @wokguysrandomstuff5535
    @wokguysrandomstuff5535 2 роки тому

    The explanations are so clear!

  • @sarahdecker1
    @sarahdecker1 2 роки тому +2

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

  • @panyachutisiriwong6200
    @panyachutisiriwong6200 3 роки тому

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

  • @mark-qi6di
    @mark-qi6di 3 роки тому +4

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

    • @AchiragChiragg
      @AchiragChiragg 3 місяці тому

      Did you ever figure out why that is the case?

  • @jlleluc4s
    @jlleluc4s 3 роки тому

    A talent of control explanation!

  • @user-me9jw8zc3g
    @user-me9jw8zc3g 2 роки тому

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

  • @gustavohenriquezeni350
    @gustavohenriquezeni350 3 роки тому +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!

  • @charlesokoh3373
    @charlesokoh3373 3 роки тому +3

    Waiting for Part 2

  • @maxzim-dude
    @maxzim-dude 8 місяців тому

    good job Brian

  • @eddiemetalblood1
    @eddiemetalblood1 3 роки тому +1

    Great video!

  • @omarteffahi7048
    @omarteffahi7048 Рік тому

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

  • @abims01
    @abims01 2 роки тому

    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?

  • @Aryan-dq1ll
    @Aryan-dq1ll Рік тому

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

  • @xxnotmuchxx
    @xxnotmuchxx 4 місяці тому

    is there a fuzzy logic playlist?

  • @georgyurumov8095
    @georgyurumov8095 Рік тому

    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 Рік тому +1

      Here's the 2nd part: ua-cam.com/video/CBTEVFphv-E/v-deo.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 Рік тому

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

  • @answerman9933
    @answerman9933 Рік тому

    Is this like PID: proportional, integral, differential?

  • @ahmedabdelkader31
    @ahmedabdelkader31 Рік тому

    Great work

  • @SungBySaheba
    @SungBySaheba 8 місяців тому

    Amazing video

  • @bonfaceosuka
    @bonfaceosuka Рік тому

    Amazing tutorial

  • @surflaweb
    @surflaweb 3 роки тому

    Great explanation.

  • @r3dat29e
    @r3dat29e 3 роки тому

    Comprehensive and simple.

  • @jasonkim1642
    @jasonkim1642 3 роки тому +1

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

  • @MALEKBAFADHLAKE
    @MALEKBAFADHLAKE 2 роки тому

    great explanation

  • @richardbleriot7613
    @richardbleriot7613 3 роки тому +1

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

  • @arrow4redemption
    @arrow4redemption 3 роки тому

    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');

  • @iramkumar78
    @iramkumar78 2 роки тому

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

  • @drbonesshow1
    @drbonesshow1 3 роки тому

    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.

  • @Yogeeswar_Thumati
    @Yogeeswar_Thumati Рік тому

    A good video ❤

  • @abousamidjziri724
    @abousamidjziri724 3 роки тому

    Thank you
    And what about Neuro fuzzy

  • @AliHosseiniLaqa
    @AliHosseiniLaqa Рік тому

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

    • @BrianBDouglas
      @BrianBDouglas Рік тому

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

    • @AliHosseiniLaqa
      @AliHosseiniLaqa Рік тому

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

    • @AliHosseiniLaqa
      @AliHosseiniLaqa Рік тому

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

  • @heliamoosavi1825
    @heliamoosavi1825 2 роки тому

    Can anyone tell me what Abbreviation NDS stands for ?

  • @mohamedhabas7391
    @mohamedhabas7391 2 роки тому

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

  • @dr.alikhudhair9414
    @dr.alikhudhair9414 5 місяців тому

    Thank you

  • @power-max
    @power-max 3 роки тому

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

  • @DerHansDaselbst
    @DerHansDaselbst 2 роки тому

    Tanks a lot!

  • @zapatazapata6414
    @zapatazapata6414 3 роки тому

    Brain is the OG

  • @globalturfwar
    @globalturfwar 2 місяці тому

    Beeeeaaaaauuuuuttttiiiiifffffuuuullll!

    • @MATLAB
      @MATLAB  2 місяці тому +1

      Hahaha, thanks, glad you liked it!

  • @cogofknowledge6142
    @cogofknowledge6142 Рік тому +1

    THE BATLOGIC CONTROLLER

  • @khristianss
    @khristianss 3 роки тому +1

    gracias!

  • @1.4142
    @1.4142 2 роки тому +2

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

  • @vtoo_ir
    @vtoo_ir 2 роки тому

    Thanks

  • @nomanziad3314
    @nomanziad3314 Рік тому

    Nice!

  • @andreseajc
    @andreseajc Рік тому

    here! take my like!

  • @drbonesshow1
    @drbonesshow1 3 роки тому

    The world is full of fuzzy logic people.

  • @akshaydarekar5863
    @akshaydarekar5863 3 роки тому

    Sow how convert the 46% to binary again

  • @oldcowbb
    @oldcowbb Рік тому

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

  • @hieudotrung8616
    @hieudotrung8616 Рік тому

    How are you caculated 46 percent% ?

    • @sethmobit
      @sethmobit Рік тому

      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

  • @EngGear
    @EngGear 3 роки тому

    Does fuzzy logic deny the law of non excluded middle?

    • @alexanderskusnov5119
      @alexanderskusnov5119 3 роки тому +2

      According to physics the particles are always probabilities.

  • @tusharmehrotra5158
    @tusharmehrotra5158 2 місяці тому

    goat video

    • @MATLAB
      @MATLAB  2 місяці тому

      Glad you liked it.

  • @orunoawhie5695
    @orunoawhie5695 Рік тому

    Just give good tips men..

  • @NBScienceGuy
    @NBScienceGuy 3 роки тому +1

    This was still too fuzzy for us!

  • @drbonesshow1
    @drbonesshow1 3 роки тому

    You are Brian? Or are your really Brian?

  • @StefanBrock_PL
    @StefanBrock_PL 3 роки тому

    Nice introduction without mathematics :-)

  • @edvanderschuit
    @edvanderschuit 10 місяців тому

    Ok

  • @basertech5222
    @basertech5222 2 роки тому

    Lütfü Aliasker Zade

  • @yogesh197322
    @yogesh197322 Місяць тому

    🙏🙏👍👍❤❤

  • @dantero_
    @dantero_ Рік тому

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

    • @dantero_
      @dantero_ Рік тому

      How can we calculate the centroid of an shape?

    • @sethmobit
      @sethmobit Рік тому

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

    • @sethmobit
      @sethmobit Рік тому +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_ Рік тому +1

      @@sethmobit 👍🏻👏🏻👏🏻

  • @JasonTubeOffical
    @JasonTubeOffical 2 роки тому

    Thanks