MSPM0_ValvanoWare  1.0
ECE445L starter code
Fuzzy.h
Go to the documentation of this file.
1 
36 /* This example accompanies the book
37  "Embedded Systems: Introduction to Robotics,
38  Jonathan W. Valvano, ISBN: 9781074544300, copyright (c) 2019
39  For more information about my classes, my research, and my books, see
40  http://users.ece.utexas.edu/~valvano/
41 
42 Simplified BSD License (FreeBSD License)
43 Copyright (c) 2019, Jonathan Valvano, All rights reserved.
44 
45 Redistribution and use in source and binary forms, with or without modification,
46 are permitted provided that the following conditions are met:
47 
48 1. Redistributions of source code must retain the above copyright notice,
49  this list of conditions and the following disclaimer.
50 2. Redistributions in binary form must reproduce the above copyright notice,
51  this list of conditions and the following disclaimer in the documentation
52  and/or other materials provided with the distribution.
53 
54 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
55 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
56 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
57 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
58 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
59 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
60 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
61 AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
62 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
63 USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
64 
65 The views and conclusions contained in the software and documentation are
66 those of the authors and should not be interpreted as representing official
67 policies, either expressed or implied, of the FreeBSD Project.
68 */
69 
70 #include <stdint.h>
74 typedef uint8_t fuz_t;
75 
83 
84 
93 
103 
112 
122 
130 uint32_t umin32(uint32_t u1,uint32_t u2);
131 
140 int32_t min32(int32_t n1,int32_t n2,int32_t n3);
141 
163 fuz_t MinFuzzification(int32_t crisp, const int32_t MIN, const int32_t MAX);
164 
189 fuz_t CenterFuzzification(int32_t crisp, const int32_t MIN, const int32_t CENTER, const int32_t MAX);
190 
216 fuz_t LeftRightFuzzification(int32_t crisp, const int32_t MIN,
217  const int32_t LEFT, const int32_t RIGHT, const int32_t MAX);
218 
240 fuz_t MaxFuzzification(int32_t crisp, const int32_t MIN, const int32_t MAX);
241 
249 char FuzzyChar(fuz_t fuz);
250 
fuz_t or3(fuz_t u1, fuz_t u2, fuz_t u3)
Fuzzy or.
char FuzzyChar(fuz_t fuz)
convert fuzzy variable to ASCII character
fuz_t CenterFuzzification(int32_t crisp, const int32_t MIN, const int32_t CENTER, const int32_t MAX)
Fuzzification.
uint8_t fuz_t
8-bit fuzzy variable having values from true (255,254,253,...,2,1,0) false
Definition: Fuzzy.h:74
fuz_t MinFuzzification(int32_t crisp, const int32_t MIN, const int32_t MAX)
Fuzzification.
int32_t min32(int32_t n1, int32_t n2, int32_t n3)
minimum
fuz_t or(fuz_t u1, fuz_t u2)
Fuzzy or.
fuz_t not(fuz_t u1)
Complement.
fuz_t MaxFuzzification(int32_t crisp, const int32_t MIN, const int32_t MAX)
Fuzzification.
fuz_t and3(fuz_t u1, fuz_t u2, fuz_t u3)
Fuzzy and.
fuz_t and(fuz_t u1, fuz_t u2)
Fuzzy and.
uint32_t umin32(uint32_t u1, uint32_t u2)
minimum
fuz_t LeftRightFuzzification(int32_t crisp, const int32_t MIN, const int32_t LEFT, const int32_t RIGHT, const int32_t MAX)
Fuzzification.