Tag Archives: fuzzy logic

Thoughts on… X-mu Fuzzy Applications: Wind Energy

So as part of a GW4 Alliance Collaboration between me (Daniel Lewis, at the University of Bristol) and Tibin Joseph (at Cardiff University), we have put our collective minds together and used the X-mu approach for current controllers in Wind Energy Farms. It is based on existing work which handles errors in auto-tuning current controllers for sending electricity from wind farms over long distances.

The result, so far, is a short report with some initial findings. The report is informal, and is accessible as a PDF via:

“Offshore Wind Energy Transmission with Multi Terminal High Voltage DC grids (MT-HVDC) and Fuzziness”

Web address: http://vanirsystems.com/static/GW4_Collab_FuzzyCurrents.pdf

The hope is that we can transform this initial report into a publishable piece, however your comments will be warmly received if you have any.

I’ll leave any further description for the time being, but please do continue to read this blog to keep updated – as I’ll be describing the X-mu method in more detail, and will have some tutorials uploaded shortly. I am sure that you can follow Tibin’s progress on the MEDOW project also.

Many thanks to Tibin, and also the GW4 Alliance.

Thoughts on… The X-mu Library (An Introduction)

OK, so one of the many outputs of my PhD Research and Development is a software library in the python programming language for what we call the “X-mu Approach” to Fuzzy Set Theory. I’ve released this library as free and open source software via github ( danieljohnlewis/xmu-python ), and I’ve started to build an online calculator… but I’m not quite ready to make that public quite yet (although if you’re up for testing it, then please do get in touch!)

Something is fuzzy when it has a graded membership… what I mean by this is that subjectively something can be categorised to a certain degree. So it might be “lightly raining” or “very heavily raining”, they are fuzzy terms, whereas “its either raining or its not” is what we call a binary term.

So, in traditional fuzzy. A membership function takes in a value (e.g. millimetres of rain per hour) and returns a value between 0 and 1, representing how much it is that term/category (e.g. “very heavy rain”). This value between 0 and 1 is called the membership value, or mu (well, the greek letter μ).

The X-mu (or X-μ) approach, does the opposite (or rather the “inverse”). Which gives us some neat things. It highlights what we call the interval nature of a fuzzy membership function, and when we take those intervals as symbolic/algebraic equations and push that through an algorithm we retain the full meaning of a fuzzy membership function all the way through that algorithm. We also see speed gains in comparison to traditional methods, purely because of the symbolic nature.

Anyway, I hope that I have discussed this reasonably – I started off quite simple, and got a little more technical at the end… but my purpose was to highlight that my X-mu library is available for perusal, and the online calculator for the X-mu approach can be tested (for people that contact me anyway).

This will be the first post of, probably, many about this library. I hope to show off the calculator a bit more in future posts. I also hope to give you a tutorial about downloading and using the library for yourselves. Then I hope to discuss the uses of the library – in things like data mining and robotics, etc.

In the meantime, if you have any questions then please do comment, or get in touch directly… its daniel [at] vanirsystems, and has a dot com at the end of it.


Computational Intelligence Unconference UK 2014 – Announcement

Hi all,

I wanted to let you all know about an event that I am co-organising. Its an unconference (as some of you know I’ve organised unconferences before), on “Computational Intelligence”, in London (UK), on 26th July 2014. If you can be in the area on that date, then pop over to the CI Unconference UK 2014 website and get yourself a ticket. It’ll be an great day, full of wonderful talks and ideas, and lots of interesting people with different experiences.

More details below…


Computational Intelligence Unconference UK 2014
BT Centre, London, UK
26th July 2014

Computational Intelligence Unconference UK 2014 is looking for attendees and speakers at the event on 26th July 2014. The unconference will bring people together with similar interests for networking and talks about Computational Intelligence and Intelligent Systems. The unconference will be held at the BT Centre in the St Paul’s area of London, England.

Free tickets and more information are available from the website. Space is limited, so get your free tickets as soon as you can from our website:


The event is an “unconference”, which is an informal self-organising meeting with free (ticketed) entry, quite unlike a standard conference. An unconference is attendee-run, if you submit an idea you’ll get a slot in a first-come-first-served-basis timetable to talk about what you like, providing it is relevant to the general topic of Computational Intelligence.

This particular unconference will be suited to those people who use, or have an interest in, Computational Intelligence. Talks will have an element of theory and/or application. Topics include:

  • Fuzzy Set Theory and Fuzzy Logic,
  • Artificial Neural Networks,
  • Evolutionary Computing and Genetic Algorithms,
  • Connectionist Systems,
  • Autonomous Mental Development,
  • Hybrid Intelligent Systems,
  • Artificial General Intelligence,
  • Applications (e.g., Finance, Government, Telecommunications, Security, Open Data, Social Networking)


  • Daniel Lewis, University of Bristol
  • Stephen G Matthews, University of Bristol

Thoughts on… rationality

I’ve recently become quite interested in the idea of the technological singularity, which is basically where artificial intelligence becomes more intelligent than human intelligence. What form this takes, and how we get there is not known, but it is not uncomprehendable that we accidentally or purposefully build an artificial general intelligence which evolves itself beyond the level of its creators intelligence.

That aside, I have watched a few of the talks from the Singularity Summit of 2012, and stumbled across one talk by Julia Galef (of CFAR) on “Rationality and the Future“. Rationality is an important on its own, but it has a special relationship with singularity theory. It seems to me (and those of you in this particular field, please do feel free to correct me), that rationality is important in singularity theory for the following reasons:

  1. Machines are programmed to be rational. Programming languages are based on mathematics – such as algebra, calculus, geometry and proof. It is this “proof” theory which allows us to test, and be confident that an algorithm (or whole software) will act in a certain way.
  2. Rationality allows us to define beliefs, intentions and desires (BDI). As humans, this has, or at least should have, an implication on the decisions we make and the actions we perform thereafter. The same stands for an artificial intelligence – in machine learning algorithms the results may or may not match up with reality or even rationality, and those decisions will lead into action for an intelligent agent. PEAS (Performance measure, Environment,. Actuators, Sensors) theory also comes to mind.
  3. Also from what I’ve seen in singularity topics, there is plenty of opinion. Some opinion is based on reasonable speculation, and some is based on pure guesswork. (Although it sounds as if expert opinion and non-expert opinion when it comes to singularity is somewhat similar in its estimations on when singularity will occur. See talk on How we’re predicting AI by Stuart Armstrong). This means that rational thinking is essential for humans to sort through the strong theories, and the weak theories. Having assumptions is something necessary as we don’t know everything, and those things that we do know exhibit levels of uncertainty and vagueness, but the important thing is to actually specify for any particular statement that you are taking such an assumption.

So the problem with the above is that almost every human is at least sometimes irrational. There are very few people that are able to live completely rationally. Uncertainties and vagueness permeates our understandings and our communications, not to mention that we do things wrong because of physical limitations (temporal or permanent). This is not necessarily always a bad thing – for example, when we fall in love (could be with a person, or a place), we might have our reasons for falling in love, but these reasons might not necessarily match up with science and mathematics, if they do then scientific and mathematical reasoning is not necessarily at the front of the mind of the human.

The talk by Galef, mentioned (and I am paraphrasing here) that one of her students came to her saying that he did not know whether to move away from family and friends in order to take a much higher paid job. To which Galef rephrased the problematic decision to being if you were already in that job, would you take a very big pay cut in order to move back to your family and friends. To which the answer was apparently “no”. Galef said that this rephrasing of the decision got around the problem of the Status Quo, in that people prefer to stay in a situation than move from it – even if it is the irrational option.

It is a good example, and rephrasing a decision can allow for more reasonable decision making. It also depends on how much we hone in on one or the other forms of decision. For example, in the decision about moving for a job, there could be an element of risk involved – the what-if’s could creep in, for example what if I don’t make friends, what if I lose the job, what if I am not comfortable in the place where I live. The level of risk might be too much for a rational move. In other words the level of risk is greater than the level of pay increase. Likewise risk can creep in to the inverse – if I stay where I am, then what if I lose my job, what if I lose my friends or upset my family, and what happens if my environment changes dramatically. The level of risk might be too much for a rational stay. We could also go into much more depth of reasoning, and actually give value to staying or going. This is turning the irrational into the rational… but do we always need to go into such depths of reasoning? Particularly as we’re sometimes irrational anyway, can we not hone our decisions without becoming so rational?

At the moment I don’t know the answer to this final question, or even know whether it is very important. What I do know is that this irrationality, or at least just the uncertainty and vagueness, is the reason why I became involved in and continue to be interested in Fuzzy Set Theory and Fuzzy Logic. Fuzzy attempts to model these shades of grey, allows for them to be reasoned, and does not have the requirement of definitive input or output. Probability theory is another area which helps with uncertainties, and I am very convinced that there is use for Fuzzy Probabilities and Possibility theory in Artificial Intelligence. Particularly if we combine such reasoning systems with knowledge bases (and that is where my knowledge of Semantic Web / Linked Data and Databases comes in handy).

These are just my initial thoughts on rationality for this blog, as I go along in my research into fuzzy theory and artificial intelligence I’m sure I’ll have more. Plus, I’m sure they’ll develop the more I consider singularity too.

Please feel free to comment.

FuzzBot part 1

Well, new blog, new style…

Some of you may know that I’m currently building a robot (with help from Beki). It has the following components so far…

  • An Arduino Mega 2560
  • An Arduino Motor Shield rev 3
  • An Arduino Ultrasonic Ping Sensor (HC-SR04)
  • Meccano for the shell
  • A Meccano motor base (with the remote control circuitry removed)
  • Batteries: 1x 9v (PP3), and 6x 1.5v (AA)
  • USB cable for connecting with the Laptop (at the moment I’m using Ubuntu Gnome 13.10  distribution of Linux operating system. The hardware is an Intel Core i7.)

At the time of writing, we’ve out together some very basic Arduino-C code which does the following (just for test purposes):

  1. Slowly inches forwards until it reaches 10cm away from an object, then…
  2. Reverses straight 10cm, then…
  3. Turns left, right, left while reversing for another few more seconds.

Today, I’ve refactored out the code which controls the sensors and actuators, along with some of the basic calculations, into a library. This means that I’ve written some C++ code, which is the first bit of C++ I’ve done for quite a few years. This will mean that I can easily create a new Arduino-C sketch and import my C++ library.

I’ve also added some very basic fuzzy commands, to do the following fuzzy rule “if too slow, then speed up a bit”. Which seems to work fine, but probably could do with a bit more tuning.

I plan to research on some data mining methods for collision detection in robotics, as data mining is an area of interest in my PhD I thought it would be appropriate to try to relate it somehow. The final plan is for FuzzBot to have some forms of (Fuzzy) Artificial Intelligence, which I hope will look reasonably organic to a viewer of this machine.

Keep an eye on this blog for more details. I hope to post some pictures when we’ve put the Meccano together in a better way…