| ??? 06/17/03 09:36 Read: times |
#48578 - RE: An issue on maths - Kai Responding to: ???'s previous message |
Even if the LVDT is as linear as any line you can draw there is still good use of a look up table here. Thus I think that Raghu as done just the right thing. It is not at all uncommon to "characterize" your own system and build a set of calibration points into a lookup table such as has been done here. The look up table can be the best way to get a problem solved, coded, tested and ready for system validation. Sure it may be possible to say, "My sensor is linear" or "This linkage follows a cosine curve" or "This actuator exerts an exponential force curve". But it can be extremely useful to collect the "characterization data" for your system and use the look up table for establishing the transfer function in the system. This way you can get the job done and move on instead of endlessly analyzing the design and trying to find the theoretically perfect formula.
That said I think this thread can provide a good bit of information to microcontroller systems implementers about how to handle non-linear transfer functions whether they be designed in as a fundamental system characteristic, a characteristic of one or more components of the system, or a combination of these factors. On more than one occasion I have worked on systems where a component was nor characterized by the time the software had to be completed and into testing. In these instances I have built provisional models of the component into a spreadsheet or MathCad worksheet. I have had the model produce the text for the actual of the lookup table that gets plugged into the project source code. This way the code algorithms are completed and tested using the provisional table and then when the system as a whole goes through final integration, often at times and places that are not conducive to trying to use a debugger, the table models can be tweaked and a simple re-compile done to get the shippable version of the software. In one or more of these models I have actually used the text output functions of MathCad to cause it to produce a set of "source code" in a .H or .INC file that is direct input to the compiler or assember wiithout any intermediate editing being necessary. Michael Karas |



