Page 859 - Mechatronics with Experiments
P. 859

®
                                                               ®
                                                MATLAB , SIMULINK , STATEFLOW, AND AUTO-CODE GENERATION  845
                                        AND                      <=





                                                         y3
                                                                        2-D T(u)
                                                x
                                                    y2         f
                                                y        y1
                                    Lookup           Lookup  x           Lookup
                                  table (1-D)       table (2-D)         table (n-D)



































                                                ®
                             FIGURE A.19: Simulink blocks for logical operators (i.e., AND), relational operators
                             (comparator i.e., <=), and look-up tables.

                             The relational operator property can be set to

                                  == , = , > , < , >= , <=
                             Look-up tables and data interpolation based on a table are commonly used in control appli-
                                           ®
                             cations. Simulink provides one-dimensional (i.e., f(x)), two-dimensional (i.e. f(x, y)), and
                             multi-dimensional look-up tables that can be used for interpolation. A single dimensional
                             table is simply two data vectors: row-vector (independent variable values, x), and the cor-
                             responding function (f(x)) values with the same dimension. Two-dimensional tables have
                             two variables: row-vector (i.e., 1xm ) and column-vector (i.e., 1xn), then the table must
                             be a matrix of dimension mxn. The row-vector variable is connected to the x-port and the
                             column vector variable is connected to the y-port of the 2D look-up table interpolator. The
   854   855   856   857   858   859   860   861   862   863   864