Skip to content

Commit 2b5715f

Browse files
author
camilo
committed
doc fixes
1 parent 678453d commit 2b5715f

File tree

2 files changed

+49
-49
lines changed

2 files changed

+49
-49
lines changed

doc/qfis.dox

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@
66
* using @c AND or @c OR logical connectives.
77
*
88
* Fuzzy inference works by sending any process's crisp input to the fuzzifier,
9-
* which applies a fuzzy membership function and maps the actual readings into
9+
* which applies a fuzzy membership function and maps the actual readings into
1010
* fuzzy values. The inference engine applies fuzzy rules from the knowledge base
1111
* and produces the fuzzy output. This output can not be used directly in any
1212
* process or system. It needs to be mapped into the original domain. For this,
1313
* the defuzzifier is used, which is the inverse process of fuzzification. It
1414
* converts the fuzzy output into crisp output, which can be fed to the process.
1515
*
1616
* The FIS Fuzzy Inference System engine provides an API for building and
17-
* evaluation of type-1 fuzzy logic inference systems.
18-
*
17+
* evaluation of type-1 fuzzy logic inference systems.
18+
*
1919
* The types of inferences supported by FIS are listed in the \ref qlibs::fis::type enum
2020
* and are detailed below:
2121
*
@@ -24,7 +24,7 @@
2424
* In a Mamdani system, the output of each rule is a fuzzy set. Since Mamdani
2525
* systems have more intuitive and easier to understand rule bases, they are
2626
* well-suited to expert system applications where the rules are created
27-
* from human expert knowledge.
27+
* from human expert knowledge.
2828
*
2929
* The output of each rule is a fuzzy set derived from the output membership
3030
* function and the implication method of the FIS. These output fuzzy sets are
@@ -65,19 +65,19 @@
6565
* function of the input values.
6666
*
6767
* and \f$w_i\f$, the rule firing strength, that is determined by the rule antecedent
68-
*
68+
*
6969
* The output of each rule is the weighted output level, which is the product of
7070
* \f$w_i\f$ and \f$u_i\f$.
71-
*
71+
*
7272
* The final output of the system is the weighted average/sum over all rule outputs:
7373
*
7474
* <center> \f$out= \frac{ \sum_{i=1}^{N}w_{i}u_{i} }{ \sum_{i=1}^{N}w_{i}} \f$ </center>
75-
*
75+
*
7676
* where \f$N\f$ is the number of rules.
7777
*
78-
* Because of the linear dependence of each rule on the input variables, the Sugeno
79-
* method is ideal for acting as an interpolating supervisor of multiple linear
80-
* controllers that are to be applied, respectively, to different operating
78+
* Because of the linear dependence of each rule on the input variables, the Sugeno
79+
* method is ideal for acting as an interpolating supervisor of multiple linear
80+
* controllers that are to be applied, respectively, to different operating
8181
* conditions of a dynamic nonlinear system.
8282
*
8383
* To specificy a FIS of this type, use the \ref qlibs::fis::Sugeno enum definition when
@@ -104,7 +104,7 @@
104104
* In the Tsukamoto inference system, the consequent of each fuzzy if-then rule
105105
* is represented by a fuzzy set with a monotonical membership function, As a result,
106106
* the inferred output of each rule is defined as a crisp value induced by the
107-
* rule's firing strength.
107+
* rule's firing strength.
108108
*
109109
* The overall output is taken as the weighted average of each rule's output.
110110
* Since each rule infers a crisp output, the Tsukamoto fuzzy model aggregates
@@ -131,22 +131,22 @@
131131
* </center>
132132
*
133133
* @section qfis_defuzz Defuzzification Methods
134-
*
134+
*
135135
* FIS supports five different methods, as listed in the \ref qlibs::fis::deFuzzMethod enum
136136
* for computing a single crisp output value for such a fuzzy set.
137137
*
138-
* -# \ref qlibs::fis::centroid (default): this method applies only to \ref qlibs::fis::Mamdani
139-
* systems and returns the center of gravity of the fuzzy set along the x-axis.
140-
* If you think of the area as a plate with uniform thickness and density, the
138+
* -# \ref qlibs::fis::centroid (default): this method applies only to \ref qlibs::fis::Mamdani
139+
* systems and returns the center of gravity of the fuzzy set along the x-axis.
140+
* If you think of the area as a plate with uniform thickness and density, the
141141
* centroid is the point along the x-axis about which the fuzzy set would balance.
142-
* The centroid is computed using the following formula, where \f$\mu(x)\f$ is
142+
* The centroid is computed using the following formula, where \f$\mu(x)\f$ is
143143
* the membership value for point \f$x_i\f$ in the universe of discourse.
144144
*
145145
*
146146
* <center> \f$\text{centroid}= \frac{ \sum_{i=1}\mu(x_{i})x_{i} }{ \sum_{i=1}\mu(x_{i})} \f$ </center>
147147
*
148-
* -# \ref qlibs::fis::bisector : this method applies only for \ref qlibs::fis::Mamdani systems and finds the
149-
* vertical line that divides the fuzzy set into two sub-regions of equal area.
148+
* -# \ref qlibs::fis::bisector : this method applies only for \ref qlibs::fis::Mamdani systems and finds the
149+
* vertical line that divides the fuzzy set into two sub-regions of equal area.
150150
* It is sometimes, but not always, coincident with the centroid line.
151151
*
152152
* -# \ref qlibs::fis::mom : Middle of Maximum. Only for \ref qlibs::fis::Mamdani systems.
@@ -155,13 +155,13 @@
155155
*
156156
* -# \ref qlibs::fis::lom : Largest of Maximum. Only for \ref qlibs::fis::Mamdani systems.
157157
*
158-
* -# \ref qlibs::fis::wtaver (default): Weighted average of all rule outputs. This method applies only
158+
* -# \ref qlibs::fis::wtaver (default): Weighted average of all rule outputs. This method applies only
159159
* for \ref qlibs::fis::Sugeno and \ref qlibs::fis::Tsukamoto systems.
160160
*
161-
* -# \ref qlibs::fis::wtsum : Weighted sum of all rule outputs. This method applies only
161+
* -# \ref qlibs::fis::wtsum : Weighted sum of all rule outputs. This method applies only
162162
* for \ref qlibs::fis::Sugeno and \ref qlibs::fis::Tsukamoto systems.
163163
*
164-
* @note The defuzzification method is selected by default when setting up the
164+
* @note The defuzzification method is selected by default when setting up the
165165
* FIS instance with \ref qlibs::fis::instance::setup(). However, the user can later change the default
166166
* method using the \ref qlibs::fis::instance::setDeFuzzMethod() function.
167167
*
@@ -188,7 +188,7 @@
188188
* -# <tt> IF the service IS excellent OR the food IS delicious, THEN the tip IS generous. </tt>
189189
*
190190
* This leads to a system with 2 inputs : @c service and @c food and 1 output: @c tip
191-
*
191+
*
192192
* <center>
193193
* @htmlonly
194194
* <!DOCTYPE html>
@@ -213,7 +213,7 @@
213213
* -# (food)rancid : A @a trapezoidal membership function with points located on <tt> [0 0 1 3] </tt>
214214
* -# (food)delicious : A @a trapezoidal membership function with points located on <tt> [7 9 10 10] </tt>
215215
*
216-
* and 3 membership functions for the output
216+
* and 3 membership functions for the output
217217
*
218218
* -# (tip)cheap : A @a triangular membership function with points located on <tt> [0 5 10] </tt>
219219
* -# (tip)average : A @a triangular membership function with points located on <tt> [10 15 20] </tt>
@@ -257,13 +257,13 @@
257257
* @endcode
258258
*
259259
* @attention
260-
* Please note that all tag names are unique.
260+
* Please note that all tag names are unique.
261261
*
262-
* Then, we will define the rules of
262+
* Then, we will define the rules of
263263
* the fuzzy system using the previously defined tags. Rules should be defined as
264264
* an array of type \ref qlibs::fis::rules and the contents should be rules constructed
265-
* with the provided statements:
266-
*
265+
* with the provided statements:
266+
*
267267
* - \ref #FIS_RULES_BEGIN to start the rules set
268268
* - \ref #FIS_RULES_END to end the rules set
269269
* - \ref #IF to start a rule sentence
@@ -275,7 +275,7 @@
275275
* Let's apply some of these statements to build the rule set.
276276
*
277277
* @code{.c}
278-
* static const fis::rules rules[] = {
278+
* static const fis::rules rules[] = {
279279
* FIS_RULES_BEGIN
280280
* IF service IS service_poor OR food IS food_rancid THEN tip IS tip_cheap END
281281
* IF service IS service_good THEN tip IS tip_average END
@@ -285,23 +285,23 @@
285285
* @endcode
286286
*
287287
* Additionally, we also need to define a vector where the firing strength of each
288-
* rule will be stored. The size of the vector will be the number of rules. In
288+
* rule will be stored. The size of the vector will be the number of rules. In
289289
* this particular case, there will be only three.
290290
*
291291
* @code{.c}
292292
* static real_t rulesStrength[ 3 ];
293293
* @endcode
294294
*
295-
* First step is to configure the instance that represents the fuzzy
295+
* First step is to configure the instance that represents the fuzzy
296296
* system using the \ref qlibs::fis::instance::setup() API:
297297
*
298298
* @code{.c}
299299
* tipper.setup( fis::Mamdani, tipper_inputs, tipper_outputs, MFin, MFout, rules, rulesStrength );
300300
* @endcode
301301
*
302302
* Then, we can proceed to the construction of the fuzzy system. First, we must
303-
* configure the inputs and outputs by setting the ranges of each. For this, we
304-
* will use the \ref qlibs::fis::instance::setupInput() and \ref qlibs::fis::instance::setupOutput()
303+
* configure the inputs and outputs by setting the ranges of each. For this, we
304+
* will use the \ref qlibs::fis::instance::setupInput() and \ref qlibs::fis::instance::setupOutput()
305305
* methods as follows:
306306
*
307307
* @code{.c}
@@ -310,8 +310,8 @@
310310
* tipper.setupOutput( tip, 0.0f, 30.0f );
311311
* @endcode
312312
*
313-
* The next step is to configure the membership functions by relating I/O,
314-
* tags, shape and parameters one by one by using the \ref qlibs::fis::instance::setupInputMF() and
313+
* The next step is to configure the membership functions by relating I/O,
314+
* tags, shape and parameters one by one by using the \ref qlibs::fis::instance::setupInputMF() and
315315
* \ref qlibs::fis::instance::setupOutputMF() methods as follows:
316316
* Then, let's define the parameters of all the membership functions:
317317
*
@@ -331,23 +331,23 @@
331331
*
332332
* @section qfis_eval Evaluating a Fuzzy Inference System
333333
*
334-
* If we already have a fuzzy system configured with \ref qlibs::fis::instance::setup(), we can
335-
* evaluate it by using \ref qlibs::fis::instance::fuzzify(), \ref qlibs::fis::instance::inference() and
336-
* \ref qlibs::fis::instance::deFuzzify().
337-
* Input values can be set with \ref qlibs::fis::instance::setInput() and output values can be
334+
* If we already have a fuzzy system configured with \ref qlibs::fis::instance::setup(), we can
335+
* evaluate it by using \ref qlibs::fis::instance::fuzzify(), \ref qlibs::fis::instance::inference() and
336+
* \ref qlibs::fis::instance::deFuzzify().
337+
* Input values can be set with \ref qlibs::fis::instance::setInput() and output values can be
338338
* obtained with \ref qlibs::fis::instance::getOutput(). Also you can use the stream operator @c <<
339339
* to set the inputs and the index operator [] to get the outputs of the FIS
340340
* system (see example bellow).
341341
*
342-
* To show its use, first we are going to put everything together in a single
343-
* code snippet and we are going to create two functions, @c tipper_init() and
344-
* @c tipper_run() that will be in charge of setting up the fuzzy inference
342+
* To show its use, first we are going to put everything together in a single
343+
* code snippet and we are going to create two functions, @c tipper_init() and
344+
* @c tipper_run() that will be in charge of setting up the fuzzy inference
345345
* system and evaluating it respectively.
346346
*
347347
* @code{.c}
348348
* #include "tipper_fis.h"
349-
* #include "qfis.h"
350-
*
349+
* #include <qlibs.h>
350+
*
351351
* // I/O Names
352352
* enum : fis::tag { service, food};
353353
* enum : fis::tag { tip};
@@ -371,8 +371,8 @@
371371
* };
372372
* //Rule strengths
373373
* real_t rStrength[ 3 ] = { 0.0f };
374-
*
375-
*
374+
*
375+
*
376376
* void tipper_init( void )
377377
* {
378378
* tipper.setup( fis::Mamdani, tipper_inputs, tipper_outputs, MFin, MFout, rules, rStrength );
@@ -388,20 +388,20 @@
388388
* tipper.setupOutputMF( tip, average, fis::trimf, (const real_t[]){ 10.0f, 15.0f, 20.0f } );
389389
* tipper.setupOutputMF( tip, generous, fis::trimf, (const real_t[]){ 20.0f, 25.0f, 30.0f } );
390390
* }
391-
*
391+
*
392392
* void tipper_run( real_t *inputs, real_t *outputs )
393393
* {
394394
* // Set the crips inputs
395395
* tipper << service << inputs[ service ] << food << inputs[ food ];
396-
*
396+
*
397397
* tipper.fuzzify();
398398
* if ( tipper.inference() ) {
399399
* tipper.deFuzzify();
400400
* }
401401
* else {
402402
* // Error!
403403
* }
404-
*
404+
*
405405
* // Get the crips outputs
406406
* outputs[ tip ] = tipper[ tip ];
407407
* }

doc/qltisys.dox

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@
150150
* { 0.1f, 0.2f, 0.3f },
151151
* { 1.0f, -0.85f, 0.02f },
152152
* };
153-
* continuousSystem gc( dtf );
153+
* discreteSystem gc( dtf );
154154
* real_t uk, yk;
155155
*
156156
* for( ;; ) {

0 commit comments

Comments
 (0)