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. 💙
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
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!
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!
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.
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 .
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)
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!
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?
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!
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');
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.
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
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
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. 💙
Wow, just wow! Outstanding explanation! I have just started watching your videos and they are both detailed and understandable. Thank you for all 🙏
I just started studying on this topic and saw your video. A great video to understand the logic. Thank you !
I'm glad it was a good introduction for you
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
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!
@@BrianBDouglas All of these topics seem very interesting either way. Really looking forward to it!
every time i strumble upon a new video and see master douglas talking I know beforehand the video will be awesome!
Easy to understand. Great job, mate!
Hi sir, big fan of your teaching. Fell in love with control systems after watching your videos. Thank you so much sir❤
Thank you sir for such an excellent video, to the point and for once about fuzzy logic explained in a very clear way
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!
Simply Marvelous job Mr. Brian. Thank you very much
fuzzy here, fuzzy there, my brain goes fuzzy fuzzy. hahaha
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.
Really useful video regarding the practical fuzzy logic. Thank you so much.
Glad it was helpful!
take all of my data and tell me the theory of everything, thank you
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 .
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)
Was eagerly waiting for this! Great video
Man, You really ROCK!!!
It is very easy to understand, despite reading books😊
Happy to help!
really clear and easy to follow explanation, thank you so much!
Hello Mr.Douglas 😊
Hello!
@@BrianBDouglas make more videos mr Douglas
If you ever make a full video course on this for control engineering people, please take my money.
Always deeply appreciate ur series. Thank u so much
Thanks for this video. It has given me a better understanding of fuzzy logic.
It's extremely easy to follow you. Please keep it that way. 🙏
explaining the steps with the example cleared most of my doubts. Thank you!
The explanations are so clear!
Awesome video. Very effective teaching of the subject. Thank you!
I truly love this clip. Inspire me a lot for work. - from Thailand
13:40 Interesting that there is never 0 risk...
Did you ever figure out why that is the case?
A talent of control explanation!
Fuzzy logic = Daily way of thinking! ♡♧◇☆♡
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!
Waiting for Part 2
good job Brian
Great video!
Thanks for the explanation
But how to know where the centroid of the shape should be ?
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?
Brian Douglas is a boon for people who want to learn Control Systems
is there a fuzzy logic playlist?
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?
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!
thank you. have you tried coding it in python?@@BrianBDouglas
Is this like PID: proportional, integral, differential?
Great work
Amazing video
Amazing tutorial
Great explanation.
Comprehensive and simple.
Thanks a lot! Quite sad that fuzzy logic application do not get much credits industry-wise nowadays.
great explanation
Thanks For the video. Can I apply it on online gambling games😅😅?
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');
Fuzzy Logic is multi valued language with membership functions. Red Pill. Matrix Crew. Topology.
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.
A good video ❤
Thank you
And what about Neuro fuzzy
Awsome , thank u , could u plz give us these presentation pdfs or powerpoints ?
I didn't create a pdf or slides of the video. Sorry.
Ok , i thought there is a powepoint or sth you are presenting . @@BrianBDouglas
@@BrianBDouglasby the way is there any way that i can talk to you ?
Can anyone tell me what Abbreviation NDS stands for ?
I failed fuzzy logic in Uni :)
Still best course i took ;)
Thank you
How is this different from point systems (like XP, health, etc) in videogames or analog control systems? Are those both examples of 'fuzzy logic'?
Tanks a lot!
Brain is the OG
Beeeeaaaaauuuuuttttiiiiifffffuuuullll!
Hahaha, thanks, glad you liked it!
THE BATLOGIC CONTROLLER
gracias!
Fuzzy logic was a bear. Fuzzy logic had 0.2 hairiness.
Thanks
Nice!
here! take my like!
The world is full of fuzzy logic people.
Sow how convert the 46% to binary again
can we say fuzzy logic is a kind of machine learning?
How are you caculated 46 percent% ?
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
Does fuzzy logic deny the law of non excluded middle?
According to physics the particles are always probabilities.
goat video
Glad you liked it.
Just give good tips men..
This was still too fuzzy for us!
You are Brian? Or are your really Brian?
Nice introduction without mathematics :-)
Ok
Lütfü Aliasker Zade
🙏🙏👍👍❤❤
i do not understand why %46 for this example: 12:01
How can we calculate the centroid of an shape?
me neither, I was trying to find if someone said about
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
@@sethmobit 👍🏻👏🏻👏🏻
Thanks