Wednesday, July 15, 2009

PTS - Engineering Calculations Module

The DR Module (see last week's post) is accompanied by TK Solver, a powerful Engineering Calculations Module which aids in solving the most challenging engineering design problems. Design equations can be entered directly into TK Solver and solved instantly. Outputs and different sets of inputs for each design can be saved as part of every calculation model, allowing reviewers to instantly perform “what-if” calculations during the Design Review Process. TK Solver can accept up to 32,000 design equations and up to 32,000 variables in a single calculation. This module includes an Optimizer for performing non-linear optimization, Engineering Plots, Support for Tables, Advanced Units Conversion and List Solving.

This post is the second in a ten-part series about UTS's Project Tracking System. Check back next week to read about the Manufacturer or Vendor Module.

Labels: ,

Monday, June 15, 2009

Share Your TK Models!

Calling all authors! We'd love to see what you've done in TK, and share it with the greater TK community. Click here to see models TK users have shared with us in the past.

All models should be sent to todd.piefer@uts.us.com. Please check out the TK Model Share Guidelines for details.


TK Model Share Guidelines
When submitting a file for TK Model Share, please include the phrase "Model Share" in the email subject line.

Models should be properly documented, including a summary comment on the Comment Sheet. All variables on the variable sheet should include a description in the comment field. Additionally, you might consider including a separate DOC, PDF, XLS or other file to help document your model and zip them together into a compressed file.

If a model includes content in the MathLook Sheet, this information is stored in a separate file and its existence should be noted in the summary comment in case the files get separated. The path to the MathLook content file can be found at the bottom of the TK model file when viewed in a text editor. The path must be updated by each user who downloads the model. It might be best to avoid the use of MathLook content and simply zip a DOC or PDF with your model to display any diagrams or other associated graphics.

The TK model should not contain any "Included" files. Please merge any included files before submitting models.

You may also submit linked or packaged files produced using the TK-Excel Toolkit. If you submit a linked spreadsheet file that has not been packaged, be sure to submit the associated TK model(s) as well so that the link can be updated on each user's PC.

Labels: , , ,

Monday, June 08, 2009

Check Out These Success Stories!

Case studies and examples are a good thing. Sometimes, though, it's nice to read something a little less formal - say, an interview or first-hand account from a fellow TK user.

Click here to read how an award winning petroleum engineer uses TK Solver.

Click here to access a library of success stories.

Labels: , , ,

Wednesday, May 20, 2009

Deciding Whether to Use the TK or Excel Version of Roark's Formulas

Customers sometimes ask how they should decide which version of Roark's Formulas to purchase - the TK Solver version, or the Excel version. Here's a bit of guidance:

Our TK Solver version of Roark’s Formulas uses the TK Solver interface and provides direct access to all the formulas, unit conversions, formats, etc. It will take a bit longer to learn all the capabilities but will be more flexible in the long term.

The Excel version of Roark’s Formulas uses Excel as the interface and the TK Solver math models are automatically called as subroutines from within Excel. It’s easy to use right away.

Those who are most interested in a familiar Excel interface should use the Excel version. Those who would like to add TK Solver’s features to their tool box and occasionally “get under the hood” should go with the TK version.

Labels: , ,

Friday, April 10, 2009

Register Today for TK Solver and Plastic Gear Design and Manufacturing Training

Universal Technical Systems, Inc. (UTS) is pleased to announce its upcoming TK Solver and Gear Design and Manufacturing Training. Metal Gear Design and Manufacturing is covered in the September 21-25 training session. Plastic Gear Design and Manufacturing is covered in the October 12-16 training session. Both sessions begin with one day of TK Solver training, and are conducted at UTS headquarters in Rockford, Illinois.

Click here to register online for one or both courses, or contact Kari Johnson, Sales Associate, at (815) 963-2220 or sales@uts.us.com.

TK Solver Training

Dates: September 21 and October 12

Participants will learn to use TK Solver for equation solving, manipulation of units and the creation of tables and plots in math models.

Metal Gear Design and Manufacturing Training

Dates: September 22-25

Participants will receive four days of intensive gear training. The course aims to do the following:

  • Provide you with a fundamental understanding of spur and helical involute gear geometry
  • Teach you to apply gear design concepts in your job
  • Help you to develop a working knowledge of UTS’ software tools

Throughout the course, the instructor will cover gear fundamentals, gear tooth form, gear geometry, standard proportions, quality, gear modifications, gear design considerations, and the gear design process.

In addition to these topics, students will learn how to use UTS software to solve their gear problems and will go through a specific example, step-by-step.

Students will also have the opportunity to take a tour of two leading gear companies in the area, Gleason Cutting Tools and Forest City Gear. At the end of the week, each student will have the option of meeting one–on–one with the instructor for an hour to discuss individual gear problems and questions.

Plus - everyone registering for Gear School will receive free access to “Fundamentals of Gearing”; the great new eLearning course from UTS. Visit http://uts-rkfd-1.uts.us.com/GearUniversity to register, login, or preview the course.

Plastic Gear Design and Manufacturing Training
Dates: October 13-16

Topics include:

Tuesday

  • Basic Gear Geometry
  • Design and Manufacturing
  • The fundamental theory of gearing
  • Review of common terminology
  • Basic involute theory
  • How changing the generating rack form affects the tooth form
  • What gear geometry factors are most important to control
  • What gear parameters are most influential in improving a gear design
  • How to optimize a gear set
  • Advanced Gear Design and Manufacturing Tour of Forest City Gear, a world-class fine-pitch gear shop in Roscoe, Illinois


Wednesday

  • Tour of Gleason Pfauter-Maag Cutting Tools’ gear manufacturing plant
  • Establishing preliminary design specifications
  • Designing and analyze the gear geometry
  • How to apply tip relief and crowning
  • Visual evaluation of the mesh
  • How lubrication affects your gear applications
  • Determining life and stress of gear sets
  • Sound plastic gear design methods for spur, helical and epicyclic (Planetary) gears


Thursday

  • Knowledge of robust design methods
  • Application of non-standard proportions
  • Making the best of material properties
  • Accounting for extreme conditions
  • Minimizing operational variation
  • Predicting tooth deflection at mesh temperature
  • Maximizing contact ratio
  • Applying proper tip relief
  • Design and selection of tooling
  • Use of grinding

Friday

Individual one-on-one time with instructor - one hour free! (A $250 value). Bring your prints and design problems.

Registration
Click here to register online for one or both courses, or contact Kari Johnson, Sales Associate, at (815) 963-2220 or sales@uts.us.com.

Labels: , , , , ,

Friday, February 20, 2009

Bivariate Normal Probabilities in Engineering

An extensive study was made of shear strength (x2) and weld diameter (x1) in an attempt to substitute a less expensive, nondestructive testing procedure for a destructive test. The results of the study were as follows. . .

Click here to see the outcome of the study.

Visit our Product Tutorials and Examples page for a complete list of resources.

Labels: , ,

Friday, February 13, 2009

Have You Seen Our Free Library of Product Tutorials and Case Studies?

Get a better feel for how our problem-solving software works! We're pleased to bring you a free library of product tutorials, examples and case studies. Why not take advantage of these resources?

This week, check out TK Solver--Many Solvers in One, for an overview of TK features. You'll learn about TK Solver's:
  • Direct Solver
  • Iterative Solver
  • Procedure Processor
  • Differential Equations Integrator
  • List Solver
  • Optimizer
  • TK Library of Root-Finders
  • Excel Tool Kit
Visit our Product Tutorials and Examples page for a complete list of resources.

Labels: , ,

Tuesday, May 13, 2008

Knowledge Management: A Case Study, Part 2

UTS is pleased bring you the second in a two-part series, guest-written by Rick Lukanen, Principal Engineer at Douglas Machine Inc. This series is based on a presentation Mr. Lukanen delivered April 22, 2008 at the Engineering, Globalization and Knowledge Management workshop co-hosted by the Northern Illinois University Engineering, Technology and Alumni Society (ETAS) and UTS.
***************************************************************************

Douglas’ KMS in Action

Time Savings 100:1

There was a machine Douglas had designed many times before, but this time the design was somewhat unique, enough so that troubles arose during early tests. Three people worked 10 hr days for 10 days to solve the problems. At the time, it seemed it was just a matter of tweaking the problem into submission. It was early in the analysis so many people were not thinking about looking for solutions via a math investigation. Once an analysis person found out about this machine he modeled it in TK Solver, animated the machine, watched it run on his computer screen, and issued a report to the shop floor. The analysis work took 3 hours. The derived solution ran perfectly when it was loaded into the machine controller. Douglas realized a 100:1 ratio of effort.

Increased Life and Speed

A new transfer table design completed by the analysis group is proving to have 12 times greater life and 6.5 times greater speed capability. This was achieved using Douglas’ modular codes, rule based programming in TK Solver, and Roark’s Formulas. The new design is slated for acceptance in 2008.

Leveraging Expertise to Facilitate the Design Process

In 2008 Douglas had a large proto-type project that required it to demonstrate the feasibility of using a new machine design. A successful proto-type could potentially result in a very large order.

Advanced linear actuator analysis methods were deployed to assist the design engineers. Included on the analysis team were two members who had never used the advanced linear actuator program. The two analysis team members using the linear actuator model for the first time found the program easy to use since the component data was read into the inputs via ODBC connectivity. This advanced program made it possible for the designers to complete their work early and provided the opportunity to study the types of technologies that would need to be applied during the concept phase of the project. The machine validation was performed two weeks ahead of schedule and the customer initiated the order process for more machines. This example set the standard for future engineering projects.

Case Study: Rule Based Programming with Optimization

With imperative languages (BASIC, FORTRAN, Mathcad, etc.) users have to provide instructions in code (an algorithm) to solve a problem (and it can only solve the one the user wants to solve). With declarative rule based programming, the computer can solve every possible permutation described by the user’s rules (making it a solution space).

Optimization with imperative programming yields the best of what the programmer(s) could conceive, where optimization in declarative rule based programming yields the best results in a solution space – something so complicated that writing a program to do this would be very difficult to do, if not impossible.

Douglas was presented with the challenge of custom-designing guard door lift mechanisms on a tight schedule. This effort had to be right the first time and potential orders could follow. On-the-fly analysis was initiated to dodge what would have been a large amount of rework, lost profits, and a customer whose expectations would not be realized.

Rules were developed that described the lift strut’s linkage, the compression spring design, and constraints for each component as well as the strut itself. The rules would make the lift strut by optimization of the spring design, linkages, and size/orientation. Optimizations of three complex systems concurrently were not trivial problems. Initially, the problem appeared too complex to solve, but in three days’ time the problem was solved.

The custom spring strut was manufactured and it worked so well it remains Douglas’ standard due to its compact size and performance. This design is not only small; Douglas believes it to be impossible to make it smaller. The documentation produced by TK Solver’s report wizard was sent to the spring manufacturer. The springs arrived in a few days time – and they were correct. Customers have commented that Douglas has the best guard door in the industry. The guard door can be moved easily by one hand and, placed in any position, it will stay put.

In Conclusion

Douglas Machine has made the transition that they set out to achieve; they made the change to servo based machinery. During this process Douglas also realized the benefit of KMS development. Analysis reports are now used to manage projects. Reduced startups and machine commissioning has been realized. In 2007, all projects shipped on time. The support for further KMS development continues at Douglas.

As with any survey of technologies such as this one, it is not always possible to single out one act or plan that contributes to a company’s success; it often is a conglomeration of many efforts. However, everyone at Douglas Machine, and its customers, agree that the KMS has played a significant role in Douglas’ success.

Douglas Machine is employee owned and has more than 7,000 machines installed with customers in over 30 countries.

Rick Lukanen is a Principal Engineer at Douglas Machine, Inc., located in Alexandria, MN, USA. Rick has 20 years of experience in software development and numerical analysis applied in machine design. He currently manages the application of analysis technologies at Douglas and oversees a five-member analysis team.

Labels: , , ,

Knowledge Management: A Case Study, Part 1

UTS is pleased bring you the first of a two-part series, guest-written by Rick Lukanen, Principal Engineer at Douglas Machine Inc. This series is based on a presentation Mr. Lukanen delivered April 22, 2008 at the Engineering, Globalization and Knowledge Management Workshop co-hosted by the Northern Illinois University Engineering, Technology and Alumni Society (ETAS) and UTS.
***************************************************************************

Introduction

Douglas Machine designs and manufactures high speed packaging machinery for clients in the United States and abroad. These machines are primarily for the food and beverage industries. Founded with a five-dollar sale in 1964, Douglas continues to grow, and, since 2003 has experienced steady growth of around 30% each year.

Shrink film wrapping machines and corrugated case packing machines are the two main products offered by Douglas Machine; today, these are fully servo controlled designs. The shrink film division (known as the Contour Business Unit) typically sells its products to the beverage industry. Shrink-wrapped packages produced by these machines can be found in your local grocery aisles where spring water and sodas are kept. Douglas’ Case Packers and Specials division manufactures machines that are used to package food, beverage and consumer goods into corrugated boxes. For example, the can of beans delivered to your grocery store was likely packaged using one of these machines.

In 2003, Douglas began implementing a Knowledge Management System (KMS) as part of its transition from the all-mechanical chain and line shaft era to the servo controlled machine. This paper documents Douglas’ efforts and successes in implementing their KMS, and shares the ways in which mathematical modeling and utilization of a KMS has increased Douglas’ client satisfaction and market share.


The Status Quo

Highly-tuned math software systems are plentiful today, so analysis methods need not be limited to ANSI standard languages such as C or BASIC. Companies typically equip their engineers with math software, but it is often the case that many engineers revert back to Excel or paper and pencils when faced with new design challenges. A study done by Maplesoft™ arrived at the same conclusion. The study found that 52% of people surveyed used hand calculations daily. 47% said they used printed reference tables in their work, while 40% of those surveyed turned to Excel for numerical computations.

The concern is that work done by hand gets lost in the desks of multiple engineers, never to be found again. Also, consider the reality of the following questions: Which reference materials were used to obtain input data? Are other engineers using different data? What about the Excel spreadsheets? How many individualized versions exist? Where are the calculations now? This is not a working KMS.

Developing the Douglas KMS

About five years ago Douglas began working with Universal Technical Systems, (UTS) based in Rockford, IL. UTS introduced Douglas to a new way of looking at programming paradigms: rule-based declarative programming.

It was through UTS that Douglas first considered a method of managing technology and information called Knowledge Management. The basic idea of a Knowledge Management System (KMS) is to keep all your information (proprietary process data, standards, and even numerical analysis programs) in a secure vault. The KMS also maintains the results of all the analyses performed, making it that much easier to reuse designs that have proven reliable.

Software life cycle maintenance issues are addressed with the KMS. Processes are easily updated because reports created in the past have a software build manager, making it possible to rebuild any program instantly. New versions of analysis codes, standards, etc. are easily managed and are kept secure in the KMS vault, with an administrator managing user access.

Douglas purchased two licenses of UTS’ TK Solver in 2003. TK Solver was chosen over other math software because of its ability to backsolve for any variable, which lets users bypass all the programming. The time required to develop an analysis model in TK Solver has in many instances been up to 30 times faster than would have been possible with a procedural language.

Douglas studied the types of problems that would present themselves in the near future and developed a plan that classified groups of problems into similar schema. Managing problems in this way allowed Douglas to develop a modular programming scheme that would be applicable to many types of jobs simultaneously.

Douglas also needed a way to document the results of its TK Solver analyses that did not require any manual labor. Engineers would be more likely to accept the documentation format if the reports looked more like schematic drawings rather than a novel. Microsoft Visio was selected for this process because it is simple to work with and does not tie up needed CAD resources. The automation link between TK Solver and Visio was achieved with object link and embedding (a fancy name for “paste special”), reducing the time it took to create reports from 8 hours to just minutes.

In 2004 Douglas began developing a motion language. As with many machines, mathematically describing the motion was the first step in performing the analysis. A system to describe motion was developed in TK Solver, along with standard variable names for each variable: position would be x, speed would be v, etc. This set up standards so that as groups of engineers collaborated on a machine design project, or worked to develop the next new analysis method there would be a structure to follow – an important step in fitting all of your software building blocks together.

Next, cam application software was created using these libraries. This application would be used to study motions, make decisions about performance demands on servos, power transmission design, and conduct strength of materials studies. After developing the motion libraries and modular codes the next task was to develop software connectivity to databases of our supplier’s component specifications. Douglas was on its way to developing a true KMS.

In 2005 Douglas Machine acknowledged the achievements that were made in the analysis group, and gave approval to develop the technologies to launch a formal KMS. A site license for TK Solver was obtained. A larger analysis team was created, allowing Douglas to formalize many of it’s “on the fly” methods into more advanced analysis processes. One such effort was the addition of polynomial cam motions. This enhancement allowed Douglas to command motions that would move an object to a specific position in time and simultaneously specify its speed and acceleration. Douglas’ strength of materials analysis also advanced in 2005 with the addition of UTS’ Roark’s Formulas package, which gave Douglas the ability to quickly optimize structural rigidity in the large frames used in the film wrapping machines.

In 2006 Douglas discovered that it needed to devise a way to visualize the results of motions in its machines. Early work was completed on animation development and a powerful concept was created that let the programmer work with graphic objects as if they were solids. Each object was able to interact with one another; for example, bumping into one another. These concepts were taken to a high level of sophistication in the Contour Business Unit.

Today, Douglas has modeled many of the film wrapping machinery concepts. This work, completely developed in TK Solver, could lead to an online product configuration tool for Douglas’ sales teams. Currently it is used almost daily by many at Douglas to solve motion control issues. To speak of its power, Douglas now uses this work to research new machine concepts in film wrapping.

With the development of advanced numerical methods for motion analysis complete, Douglas naturally wanted to extend this capability to its machine controllers (PLC). The cam algorithms were ported to the Rockwell Allen-Bradley machine controllers, giving the machines access to the same uniform and concise motion language used by the analysis engineers. Douglas’ machine performance improved significantly, but equally important, the company could now communicate between departments. The language of motion was now spoken across three departments: analysis, mechanical designers, and electrical controls. By this time, Douglas had been using TK’s built-in functions to retrieve data via ODBC and found that more power was necessary to achieve some of its goals. To continue KMS development Douglas asked UTS to provide more advanced query capability within TK.

In 2007 Douglas added MathML, a symbolic algebra package. MathML is simply a standard that allows representation of math symbols and equations. The algebra system let Douglas derive equations for new machine concepts and produce some needed documentation of methods that were already in place. At this time Douglas undertook the challenge to create an expert servo linear actuator design tool, which would perform a complete analysis of bearing, belts, gearboxes, servos, etc. The modular programming developed over the past few years would be used to create this application.

Current KMS Topology

In 2008, Douglas’ KMS system consists of TK Solver, a Microsoft Access database of supplier specifications, and Visio report templates. This implementation is probably considered a mid-level KMS (a full KMS, UTS’ Galaxy, is slated for launch in mid-2008).

To set up the database, Douglas decided on units of measure and exactly which data was important. This format was used to obtain information from new suppliers, thus broadening Douglas’ capabilities. Working with suppliers during this time was important, because they needed to understand why such highly detailed design data was required for their products.

Preferred components were a subset of this large and growing database. Douglas wanted its machine designers to be using these components as often as possible. Procurement departments were rewarded with a higher commitment from engineering that components with negotiated volume prices would be used.

A library of TK Solver libraries was created and stored in a server folder. These codes and rules are where engineers study Douglas’ processes. Analysis engineers are able retrieve TK applications from the servers and enter design information, perform an analysis, and save the runtime results. Visio reports are automatically created and then routed to other engineers and the manufacturing groups.

At this time the management of these codes is not done automatically but will be when the Galaxy system is finalized.

Douglas achieved its main objective: making the transition to all servo machinery. Additionally, the analysis system works well. It is easy to develop new applications with libraries of code and Douglas continues to produce results that could not have been achieved by trial and error. The KMS efforts have also gained the attention of Douglas’ customers. Their feedback has been positive and they have seen an improvement in Douglas’ products.

Because the analysis systems have grown and Douglas continues to massage them, machine startup and commissioning times dropped substantially from what they were before such analysis methods were in place. Previously, Douglas worked long hours to meet its delivery dates and still missed them on occasion. In 2007 Douglas shipped 100% of its projects on time.

Douglas Machine is employee owned and has more than 7,000 machines installed with customers in over 30 countries.

Rick Lukanen is a Principal Engineer at Douglas Machine, Inc., located in Alexandria, MN, USA. Rick has 20 years of experience in software development and numerical analysis applied in machine design. He currently manages the application of analysis technologies at Douglas and oversees a five-member analysis team.

Labels: , , ,

Tuesday, April 29, 2008

Have you visited the TK Library lately?

The hundreds of tools in the TK Solver Library can save you hours of programming time. Many of the tech calls I receive regarding application development with TK are answered with the use of one or more TK Library functions. It's good to stay acquainted with all that's in there. Here’s a quick tour of some of the most popular Library tools and some of the more recent additions.

Bilinear Interpolation
The inpol2 function is found under Utilities -- Model Solving. It can be used to convert tables of data (families of curves) into two-way look-up tables with interpolation.

Calendar Functions
These are found under Utilities – Miscellaneous. There are six functions for computing days between dates, a useful collection for financial calculations.

Graphics Tools
The “pickit” tools are found under Utilities – Graphics. This collection of functions generates plot coordinates for lines, boxes, circles, and other shapes and can rotate, translate, mirror, and otherwise transform the coordinates. There are also 34 functions found in the Mathematics – Geometry folder for doing geometry calculations frequently required for CAD. For example, there are various equations for lines, angles, points of intersection, rules for collinearity and parallelism and a function for determining the coordinates of the common tangent of two circles.

Unit Sheets
Perhaps the most commonly used time-savers in the TK Library, these unit sheets – arranged by discipline – can be merged into your TK models to allow for a variety of different display units for your variables and lists. These unit sheets are found under Utilities – Units and Conversions.

Fluids and Mixtures
The Utilities – Fluid Properties folder includes tools for calculations involving combustion, psychrometric charts and latent heat of vaporization but the Fluids and Mixtures file is probably the most frequently referenced. It summarizes the results from all the built-in fluid property functions.

Root Finders
The tools in the Mathematics – Roots of Equations folder are a must for TK application developers. These functions can be used instead of the built-in iterative solver to solve sub-tasks within an application such as generating plot data. The most recent addition to this folder is a tool called mbisect which hunts for and returns multiple roots of functions.

Functions of Complex Numbers
The 18 comfun tools under Mathematics – Complex Numbers compute functions of complex numbers such as square root, log, and a variety of trig functions.

Optimization
Similar to the root-finders, these tools can be used to process sub-tasks within TK models, freeing the Optimizer for use with the complete model. A very popular routine is the Marqoptn function based on the Marquardt algorithm for nonlinear optimization with numerical differentiation of the objective function with respect to the decision variables.

Random Number Generation
A recent addition to the Statistics – Distributions and Random Numbers folder provides the ability to generate correlated multivariate random values. This can be vital in performing Monte Carlo simulations where it is known that two or more input variables in a model are not independent.

The TK Library now includes random number generators for 33 different probability distributions, from Beta to Zipf-Mandelbrot. It also includes routines for fitting distribution parameters to lists of values.

Financial Modeling Tools
The Finance folder includes the very popular mortgage calculator and a few other, more sophisticated tools such as the Black-Scholes options pricing model.

Labels: ,

Friday, February 08, 2008

TK Solver Models Natural Disaster Outcomes for the Insurance Industry in South Africa

Adi Hazan is a “fixer.” A programmer of last resort, the guy people call when all other efforts have fallen through. As he describes it, “I take on projects where other people have failed or where there is a crisis . . . in general, I’m the last line of defense.” And it’s no wonder. Hazan sold his first program at age 12, and to this day is a voracious learner, blazing through 1000+ pages a week on “absolutely anything.”

One of Hazan’s most recent programming challenges arrived 9 months ago, when he was approached by an actuary who hired him to solve some outstanding problems in mathematical modeling of natural disasters. A legislative deadline loomed: The South African government had made modeling a legal requirement for the insurance industry starting in 2008. When Hazan was approached, no one had been able to produce a workable model. After weeks of testing actuarial programs without success, he broadened his search and came across TK Solver, and immediately recognized the potential.

So what does the program do? Hazan explains: “The program tries to predict what the maximum damage from earthquakes could be so that insurance companies can keep the correct money reserves for such an emergency. A more detailed explanation is that the system clusters the historical data into regions, and then models the frequency and magnitude for the regions using 30 different statistical curves in TK, optimizing the curves to fit the data. Once the best fit is chosen from the 30 curves, a simulation of 10,000 years is done using random inputs to see what size of damage one can expect every 250 years on the client’s specific set of insurance policies.”

TK’s speed, power and accuracy were critical to Hazan’s work. On TK’s speed, he states, “It’s vital to note that any series of calculations done in TK is at least 10 times faster than Excel. This is not trivial when you consider a 10 hour process coming down to an hour.” As to TK’s power, Hazan comments, “We were able to solve problems using built-in functions that cannot be done on any platform that costs less than $150,000. Specifically, we were able to fit a curve of rounded, discrete values to a mean and standard deviation–what this means is that we can round and then optimize, not optimize and then round and lose accuracy. This is impossible on normal algorithms or the Frontline Solver for Excel.” Finally, accuracy was imperative to Hazan’s program, and TK delivered. He remarks, “A number of the rarely-used functions in Excel simply gave us wrong answers in comparison. When the TK answers were wrong we were able to adjust the functions, whereas in Excel it was ‘take-it-or-leave-it.’”

Hazan also cites TK’s support as “unparalleled,” in particular the expertise Todd and Mohan provided, on both complex statistical issues and non-mathematical technical support. As he puts it, “Imagine a call center getting a call asking how to ‘expand the Marquardt optimization algorithm so that it can accommodate discrete values and still move to the local minimum of multi-variable curves.’”

As for response to the program Hazan reports that it has been “excellent.” TK’s versatility prevented him from having to side-step any mathematical issues, giving Hazan the ability to build something “more detailed and accurate than anything else on the market.”

Labels: , , ,

Thursday, December 06, 2007

Root-Finders in TK Solver

Here is a summary of the root-finders available in TK Solver, including their strengths and weaknesses. My goal is to help you choose the right tool for the task at hand. If you're just solving a problem once and need a quick solution, the built-in Iterative Solver is the best tool but if you're creating an application for repeated use, some other tools from the TK Library will be valuable.

Iterative Solver
The Iterative Solver uses a modified Newton-Raphson approach. It requires an initial guess. It cannot be bounded or controlled once engaged. It runs the entire model repeatedly until the solution is found or the processes diverges. It cannot be used on a subset of a model, such as within a procedure function loop. The initial guesses are programmable within TK. It can be run repeatedly at each element of a list solve.

Optimizer
The Optimizer uses a variety of methods. It is a close cousin to the Excel Solver add-in. It requires a Premium license. It uses the initial value as its guess. This initial value is not programmable within TK. It accepts bounds which may be functions of other variables. It runs the entire model repeatedly until the solution is found or the processes diverges. It cannot be used on a subset of a model, such as within a procedure function loop. It cannot be run repeatedly at each element of a list solve.

TK Library Functions
TK Library functions can be merged into models to solve subsets of equations such as within procedure loops. These complement the Iterative Solver and Optimizer.

Here is a listing of the root-finders in the TK Library.

The first batch process polynomial coefficients and return the roots.
quadr1 - solves quadratic equation for real roots
quadr2 - solves quadratic equation for real and complex roots
cubicg - solves cubic equations in general form
cubicnr - solves cubic equations in normal or reduced form
quartic - solves quartic equations for real and complex roots
Bairstow - solves polynomial equations for real and complex roots

The next group require that an error term be generated and returned by a function. For example, to solve the equation
Y = X*LN(X) + 20*X
for Y = 5, iteration would be required to find the value of X. Both the Iterative Solver and Optimizer could be used but what if Y will vary within a procedure function loop and solutions are required for each Y? Create a rule function with the following equation
Y = X*LN(X) + 20*X + ERROR
Make X the "argument" variable and ERROR the "result" variable. The value of Y will be passed in as a list element as it changes during the procedure loop. For example, the first element of a list called Ytemp could be used to store and retrieve the temporary value.
Y = 'Ytemp[1]
Now TK Library functions such as NewtonN can be used to determine the value of X that makes ERROR close to 0.

bisect - finds the point at which the sign of the error changes; Note that this may not be a root of the equation but could also be a point where the equation becomes undefined.
mbisect - finds a series of solutions within a range of values
refal - regula falsi (false position) method; Similar to bisect in that it searches for a sign change in the error and may return a root or a point where the equation becomes undefined
NewtonS - Newton's method, assuming that an equation for the derivative is known and available
NewtonN - Newton's method, with numeric differentiation
Newton2 - Newton's method with numeric differentation; functions of 2 unknowns
Newton3 - Newton's method with numeric differentation; functions of 3 unknowns
Newton4 - Newton's method with numeric differentation; functions of 4 unknowns
Newton5 - Newton's method with numeric differentation; functions of 5 unknowns
Newtonm - Newton's method with numeric differentation; functions of m unknowns; uses lists instead of variables to allow for an arbitrary number of unknowns.

Labels: ,

Thursday, September 20, 2007

Debugging a Complex TK Model

A customer sent me a TK model with 200+ lines on the variable sheet and 100+ lines on the rule sheet, plus several procedure functions called from the rules. The request was for help in getting the model to solve. When the iterative solver was launched, TK responded with the dreaded "Dependency Error" message.

That error indicates that when the iterative solver reached a certain point, it discovered that changes to one or more of the guess values no longer resulted in significant changes to the error terms it was trying to make zeros.

There are many different causes for this condition. The iterative solver may have started from poor guesses and diverged so far from the solution that the values have become extremely large. The error function may not be a smooth, continuous surface over a particular domain. There may not be a solution for the given set of inputs.

The key to diagnosing the problem is to overdefine the problem, changing the status of all the guess variables to inputs. (For this article, I will continue to refer to them as guess variables.) TK will detect an inconsistency and point to the offending rule. Edit in an error term. Repeat this process until you have new error variables associated with each of the guess variables. Make some changes to the guess variables and watch to see that the error terms update. It is sometimes useful to list solve using lists for each of the guess variables, one by one, as inputs and the error terms as outputs. In effect, this plots a slice of the solution hyperspace. What you're looking for is the sensitivity of each of the error terms to each of the guess variables. Also be on the lookout for ranges over which it appears an error doesn't seem to change. That would be a tar pit for the iterative solver if it stumbled into that range. In models with just a single guess variable, this plot will show you exactly where the solution lies.

Next, for models with two or more guess variables, make all but one of the error terms inputs of 0 and change the status of the associated guess variables to GUESS. The remaining error term should be an output and its associated guess variable should be an input. It may not be possible to get a solution under this scenario but if this works, it's a major breakthrough because now you can repeat the process over a range of values of the remaining guess variable to see where its associated error term becomes zero. In other words, get the model to where you can list solve over a single guess variable and you'll be able to get a plot of where that error term goes to zero.

In the case of the recent tech call, this process worked and unfortunately, it became clear that there was no feasible solution to the given problem. That is the error plot for the remaining variable never approached zero over the feasible range of inputs.

In some cases, the iterative solver requires extremely good guesses to find a solution and you might want to use the Optimizer as an alternative. The Optimizer is less reliant on the initial guesses and allows for adding bounds on the guess variables and constraints on related expressions. Assuming you have the error terms identified as described above, add a rule to the rule sheet to find the square root of the sum of the squared error terms. Then set up the Optimizer to minimize that value by changing the guess variable values within your desired bounds. If the Optimizer can't get the result down near 0, it's likely that there isn't a valid solution to the simultaneous equations.

In the case of the tech call model, the square root of the sum of squares of the three error terms was around 1000, so it wasn't even close.

Labels: , , ,

Monday, July 23, 2007

Math Models and Monte Carlo Simulation

It's always nice to know your odds of success before taking on any challenge. In some cases, such as card games, the odds can be computed from the information known to you. In other cases, odds are based on assumptions and/or past performance. This is true for things like sporting events and performance of financial products. Engineering design can also involve probabilities. Design engineers doing tolerance stack calculations are determining the odds that things will fit in a given space. In many cases, the required calculations are prohibitively complex. That is when Monte Carlo simulation becomes so appealing.

Monte Carlo simulation involves running a math model repeatedly using "random" numbers from assumed distributions as the inputs. Then you observe the distributions of the output variables and use them to predict the probabilities of seeing values within particular ranges.

Simulation in TK Solver has the same prerequisites as List Solving, plus a few more. The model must have input and output variables on the variable sheet and the model must solve using the direct solver or with automatic iteration (i.e. - without having to manually provide guess values).

Next, you need to determine if any of the simulation inputs are correlated. If two variables are correlated, they tend to vary together. If any input variables are correlated, the random values used as inputs must be generated with that in mind. This can have a significant impact on the simulation results, as the results will show greater variability if no correlations are assumed.

TK Solver's list fill facility can be used to generate lists from a variety of distributions but it assumes that the variables are uncorrelated. The TK Library includes additional procedures for generating independent lists of random numbers.

We recently developed a procedure (let's call it "rancorr" for now) for generating correlated sets of lists. Rancorr provides a table for specifying correlations between the input variables. The correlation matrix for the input variables defaults to 0’s off the diagonal, indicating that the variables are independent. If non-zero correlations between any or all of the variables are to be assumed, edit the correlation matrix and the simulation will account for it. Correlations can vary from -1 to 1. The correlation matrix is symmetric, so if you enter a correlation in row m and column n of the matrix, the same value is automatically entered in row n, column m. It is possible to construct a correlation matrix that is mathematically infeasible. The procedure checks and reports on that condition.

Rancorr includes another table for specifying the distribution parameters for each variable. Here is the list of distributions:

Bernoulli, Beta, Binomial, Cauchy, Erlang, Exponential, Extreme Value, Gamma, Half Normal, Hypergeometric, Kumaraswamy, Log Series, Logistic, Lognormal, Negative Binomial, Normal, Poisson, Power, Rayleigh, Rectangle, Semicircle, Skellam, Trapezoid, Triangle, Truncated Normal, Uniform, Weibull, Weibull Series, Yule Simon, and Zipf Mandelbrot.

The TK Library includes many routines for fitting various probability distributions to lists. By fitting, we mean that they determine the parameters that cause a particular distribution to match a list of values as closely as possible. It is easy to launch a second TK, load a Library routine and then copy and paste an output list from a simulation run into the fitting routine.

That method assumes that you have some notion as to which distributions might fit the data. Each library routine does its best to determine the parameters of a specific distribution but does not compare the results to determine which fit best. We recently developed a TK routine called "fitall" which does just that. Fitall can run through a series of over 30 different distributions and determine the parameters of the one which fits a list the best.

Fitall processes each of the output lists, providing a frequency histogram, probability plots and descriptive statistics for a visual and numerical summary. The histogram also includes an overlay of the best fitting theoretical distribution. The descriptive statistics for the simulated values include:

Max/Min – Maximum and minimum values
Mean – Arithmetic mean
Standard Deviation – A measure of the variability
Mean +/- 3SD – The arithmetic mean plus (or minus) three standard deviations is often used as a practical estimate for the expected range.
Skewness – Used to compare the distribution with a normal distribution, skewness is an indication of the symmetry of the results about the mean value. The skewness for a normal distribution is zero, and any symmetric data should have skewness near zero. Negative values for the skewness indicate data that are skewed left and positive values indicate data that are skewed right. By skewed left, we mean that the left tail is heavier than the right tail.
Kurtosis - Used to compare the distribution with a normal distribution, kurtosis is an indication of the “peakedness” of the resulting distribution. Positive kurtosis indicates a "peaked" distribution and negative kurtosis indicates a "flat" distribution.

If the data contains any values less than or equal to zero, some of the distributions are eliminated. A chi-square test of the frequencies is done. Anderson-Darling and Kolmogorov-Smirnov test statistics are computed. The correlation between the data and the theoretical data is computed. The theory is that the best fitting distribution should have the smallest Chi-Square, Anderson-Darling and Kolmogorov-Smirnov statistics and the largest correlation coefficient.

The results from each distribution are ranked and the ranks summed to form a score. The distribution with the lowest score is selected. Tables summarize the results from each distribution tested along with the ranked scores.

Plots are available for each distribution. A plot of the best-fitting cumulative distribution is shown along with the actual data. A bar chart shows the observed and expected frequencies for five or more intervals.

Once you have the distribution parameters, you can compute the probability of observing values in any particular range. In effect, you now know the odds. The process only takes a minute or two so if you don't like the odds, you can tweak your math model and re-run the simulation until you're satisfied.

We are in the process of creating a Simulaton Wizard to automate the steps involved in using rancorr and fitall. Meanwhile, we are looking for individuals interested in testing these new tools. Please contact me if you are interested (todd@uts.com). You read this far... why not give them a try?!

Labels: , ,

Wednesday, June 06, 2007

Excerpts From a Recent TK Demo

I was over an hour into a demo for a group of six engineers and had covered most of the basics when I got the usual question from a Mathcad fan who was growing frustrated by all the enthusiasm the audience was showing for TK. “What if I want to type everything into a single document, including text and formulas, and have the solutions appear as I progress down the document?”

I gave my standard response. “It’s easy to create documents in Word, copying and pasting TK objects such as equations, tables, plots, and sections of the Variable Sheet into them as needed. You can dynamically link the TK objects so that when you change the values in the model, the document updates as well. TK also provides a built-in report writer that’s an efficient way to automatically dump most of the model into a report.”

The Mathcad fan just grew more agitated by this. “But what if I want to type the values directly into the document? Can I type the values into Word and have the TK model update?”

Again, I gave my standard response. “No. The Word document includes your text but the variables, tables, and plots come from the linked TK model.” And then the shocker. “You might try using Mathcad if you want to type values into the document…”

The Mathcad fan quickly chirped, “Exactly. That’s the way I need to work.”

I couldn’t resist. “Really? So what happens when you’ve typed up your Mathcad document and then you find out the problem changed slightly (in TK terms, anyway) and what had been a solution variable suddenly becomes a critical input?”

There’s a moment of silence at this point. I waited but eventually answered the question myself. “Time to start redoing your document. Mathcad documents flow from right to left and top to bottom. You need to completely restructure your document to handle the new scenario. Meanwhile, with TK Solver and Word, the report automatically updates when the TK model is backsolved. The equations haven’t changed. It’s just the sequence in solving them that changes and TK handles that automatically.”

Another long pause. It’s like he just learned that the Earth isn’t flat. I press on. “You probably already know how to use Word so there’s nothing to learn. And since most office PCs have Word installed, there’s usually no added cost.”

The Mathcad fan mustered a half-hearted response: “But I really like being able to type and see the formulas directly.”

“You can type and see the formulas directly in TK Solver and they transfer nicely over to Word. Best of all, you can type REAL EQUATIONS into TK without any additional programming. For example, what if you’re making a point that two ratios must be equal? In TK Solver, you just type an equation showing ratios on both sides of an equal sign. Mathcad works with sequences of assignment statements. You have to decide which variable you are going to solve for and isolate it to the left of an assignment statement. That’s just a lot of extra work.”

The rest of the audience encouraged the Mathcad fan to give it up.

I’ve often heard it said that 85% of the technical engineering work is done by 15% of the engineers and that the rest devolve into paper pushers. TK Solver encourages innovation and creativity while efficiently producing concise, effective, adaptable reports. In the end, Mathcad users could accomplish much more with TK.

Join the innovators. Go with TK.

Labels: , ,

Thursday, May 31, 2007

TK Solver Laws

The late Dr. Milos Konopasek, inventor of TK Solver, wrote a paper several years ago entitled TK Solver Laws. That paper and a related TK model file are available via the TK Model Share section of the UTS web site, in the Miscellaneous group. The paper has been modified a few times over the years to reflect some of the new features that were added to the program. Here is the introduction and a quick summary of the laws from that paper.

The purpose of the following material is to contribute to the collective understanding of the essence of TK Solver. It does not answer the question, “What is TK?”, and it does not attempt to catalog or explain TK techniques and tricks to any extent. It is a set of problem solving laws which are good to know, respect and live by.

The “laws” are supplemented with a sample model FRUSTUM in the Appendix. It deals with the frustum of a cone and it has 18 variables and 15+ rules. It is an extension of the cone model frequently used in TK Solver demos and training materials.

1. As many independent equations are needed as there are unknown variables to be solved for.

2. A set of TK rules equivalent to m independent equations linking n variables provides a framework for solving all feasible combinations of input and output variables.

3. A TK model can be solved for a certain set of unknowns by the Direct Solver if the reduced variable-equation-coincidence (VEC) matrix can be triangulized by reshuffling of rows and columns. Every diagonal element points to a variable and an equation resolvable in that variable.

4. Simultaneous equations break down the propagation of solution by the Direct Solver.

5. The simultaneous equations for TK’s Iterative Solver to be concerned with are those left after resolving the triangulized head and removing the reverse-triangulized tail of the model.

6. A set of simultaneous equations can always be solved by the Direct Solver, after assigning input values to some of the unknowns and dealing with ensuing inconsistencies, by editing error terms into affected rules.

7. There is always a minimum number of unknown variables to be assigned input (guess) values in order to make the set of simultaneous equations resolvable by the Direct Solver.

8. The number of guess variables may be reduced, or the use of the Iterative Solver avoided altogether for some output variables, by presolving the subsystems of simultaneous equations symbolically and adding redundant equations to the set of rules, or by using the techniques of local root finding or iteration.

9. The invertibility of the operations and functions is the name of the game with TK.

10. The lexical analysis (with VEC matrices and other tools) helps us to use TK efficiently. It may assist with, but it never substitutesfor, the necessary mathematical and subject-related analysis.

11. List solving or block solving is a way of performing a series of simple solutions automatically for a series of values of input variable(s); it should not be launched before simple solving works satisfactorily.

12. Respect and take advantage of the difference between values of variables (that are initialized at the beginning and cannot be overwritten during the solution process) and values of list elements (no automatic initialization, free to overwrite any time).

13. Beware of multiple solutions.

Labels: ,

amazing 

counters
Dell Computer Deals