fuzzy logic HC12

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

fuzzy logic HC12

1,498 Views
supermario
Contributor I
'm working on a control system using fuzzy logic on a HCS12 MCU.
It works well until the output reaches the desired value. And the response curve is very good.
But when simulating an abnormality on the inputs the system just doesn't respond. The output keeps in a high value, the engine doesn't fix it down. It's like the output is one way only, it seems I can't have a signed deffuzified output. Does anyone know what should I do or where can I look for help or answers?

thanks.
Labels (1)
0 Kudos
Reply
1 Reply

582 Views
JimDon
Senior Contributor III
Well,  the real goal is for you to develop problem solving skills.

So, let me try to help you in this way.

First, it is a given that the algorithm does work, so the conclusion is that something in the way you have implemented it is not quite correct. Just because it works in one case, does not mean there are not errors that prevent it from working in ohters.

From my experience, when in this situation, it usually turns out that some assumption I have made is incorrect, and no matter how much I look at the code, I see nothing wrong. In this case it is helpful to step thru the code with different input or state values and watch the values I am computing.

Since you say it seems the code can never decrement, I would look at the possibility that certain computed values can not (or do not) go negative when they should. Set things up so that it should decrement, step thru the code and identify just why it never goes negative. You will find some reason for this.

This can sometimes be quite a struggle, but you must be willing to try, then try again, then try once more. You will find it if you keep at it.


0 Kudos
Reply