Notifications
Clear all

Least Squares Excel Spreadsheet?

19 Posts
9 Users
0 Reactions
8 Views
 rfc
(@rfc)
Posts: 1901
Registered
Topic starter
 

Learning to use Least Square Reduction method. Don't have any of the mainstream software (ACAD, Topsurv,Microcad, etc.), which I assume do it for you, but I do have Excel. It seems that the math could be made simpler with a well designed spreadsheet, but I'd rather focus on practicing the method, rather than develop the tool to do it with. I have to believe a gazillion wizards more talented than me have gone before me and developed such a tool? Anyone?

 
Posted : July 20, 2014 2:48 pm
(@ralph-perez)
Posts: 1262
 

> Learning to use Least Square Reduction method. Don't have any of the mainstream software (ACAD, Topsurv,Microcad, etc.), which I assume do it for you, but I do have Excel. It seems that the math could be made simpler with a well designed spreadsheet, but I'd rather focus on practicing the method, rather than develop the tool to do it with. I have to believe a gazillion wizards more talented than me have gone before me and developed such a tool? Anyone?

First learn to use matrices in excel,once you have that the rest is input. I don't think excel has the capability to solve partial derivatives so you probably need something more robust to linearize your equations. A few years ago Peter Lazio turned me on to Mathcad, which definitely has the power to solve most anything. That being said, when I took my first least squares class all we had was Mikhail's book and Quattro Pro.

DAM I'm getting Old 🙂

 
Posted : July 20, 2014 3:00 pm
(@bill93)
Posts: 9834
 

As Ralph mentioned, to reduce typical surveying data you have to linearize the equations for distance and angle/bearing by using the partial derivatives near the current best estimate.

This lets you compute a new better estimate via the least squares matrix solution. It takes a few iterations, maybe 3 or 4 if your initial best estimate is pretty close. If your estimate is way off it could take a dozen iterations or even not converge.

You could set up a particular problem in Excel, but I don't see how you're going to get a re-usable spreadsheet out of it.

I derived the general equations for the linearizations and wrote my own C++ program to solve the least squares, sort of a weak imitation of Star*Net. Wolf and Ghilani have some of the derivations in their text.

 
Posted : July 20, 2014 3:17 pm
 rfc
(@rfc)
Posts: 1901
Registered
Topic starter
 

Thanks. I'm using Wolf and Ghilani. They have a program called Wolfpack, and also some spreadsheets on their companion website, but I don't have a login to that. I thought it'd be somewhat easier to do than it is, but that's like a lot of things in life.

 
Posted : July 20, 2014 3:51 pm
(@ralph-perez)
Posts: 1262
 

There is a paper called "Traverse Adjustment Using Microsoft Excel Solver"
written by Sayed R. Hashimi, (former professor at Ferris State) which could probably get you started. I think he presented it at one of the ACSM conferences. It was widely available but I just googled it and it's not that easy to get anymore (with out loggng into some potential problem site).

Good Luck

 
Posted : July 20, 2014 4:52 pm
(@deleted-user)
Posts: 8349
Registered
 

The program you want is called Matlab. It is designed for matrix calls and programs least square problems easily.

 
Posted : July 20, 2014 5:15 pm
 rfc
(@rfc)
Posts: 1901
Registered
Topic starter
 

Thanks. I guess now would be a good time to ask if Least Squares is relevant anymore, given highly precise Total Stations and GPS equipment used now, Based on some comments in another thread on occupying a corner monument, I thought it was, but is its relevance a function of the ancient instrument I was using? Is it still used only when the required precision in closure is beyond the reach of the modern tools and people using them?

 
Posted : July 20, 2014 5:31 pm
(@dave-karoly)
Posts: 12001
 

Least Squares is definitely still relevant. It's a great way to process data from more than one source and quantify the quality of your Survey. Plus it highlights possible blunders. It allows you to use your equipment most efficiently, for example, closing your conventional traverse with a GPS vector, least squares software will handle that with no problem.

 
Posted : July 20, 2014 6:17 pm
(@bill93)
Posts: 9834
 

Dave's answer is good. I'll be more long-winded.

Least squares is applicable at any level of precision. Its main strengths are the ability to accommodate any reasonable mix of redundant measurements or measurements from various methods (e.g., GPS plus conventional), and to quantify the expected accuracy of your results.

When you do a traverse, it will help your resulting accuracy and help check for blunders if you make extra measurements across the figure between non-adjacent points that happen to be intervisible. Least squares is the most practical way of incorporating those measurements into the adjustment.

If you give it realistic estimates of how good your measurements are (standard errors or rms values) it will tell you the likely range of error (confidence limits) in your point coordinates or the distances and angles between them.

Like any adjustment method, it has the undesirable ability to smear your blunders out among all the points of the traverse so they are hard to find. The more redundancy you have, the easier it is to find any blunder.

 
Posted : July 20, 2014 6:33 pm
(@bill93)
Posts: 9834
 

Matlab is somewhat pricy. You might look into freeware clones that offer somewhat similar capabilities, including Scilab, Octave, Rlab and SciPy.
See discussion.

 
Posted : July 20, 2014 6:38 pm
(@ralph-perez)
Posts: 1262
 

> Thanks. I guess now would be a good time to ask if Least Squares is relevant anymore, given highly precise Total Stations and GPS equipment used now, Based on some comments in another thread on occupying a corner monument, I thought it was, but is its relevance a function of the ancient instrument I was using? Is it still used only when the required precision in closure is beyond the reach of the modern tools and people using them?

Is it relevant? Of course it is and for the reasons you listed above (given highly precise Total Stations and GPS equipment used now). The "Competent" Surveyor's role switches from one of simply pushing buttons and gathering data to ensuring the Quality of the data. There is no better tool in my opinion to do this than least squares.

 
Posted : July 20, 2014 7:00 pm
(@geeoddmike)
Posts: 1556
Registered
 

FWIW,

I like and use Matlab and Scilab and recommend both. While Excel is a powerful and useful tool, matrix methods are much easier accomplished using these tools.

While there is a $149 home version of Matlab available here:

https://www.mathworks.com/products/matlab-home/?s_tid=htb_learn_gtwy_cta4

The French research institute INRIA tool Scilab is free and can be downloaded here:
http://www.scilab.org/download/5.5.0

During my working years I had both the professional and academic versions of Matlab. For those interested in geodetic computations there are a great number of scripts available for use. Kai Borre's scripts to support both the Linear Algebra, Geodesy and GPS text and the more recent Algorithms for Global Positioning are highly recommended. See http://kom.aau.dk/~borre/

It is reasonably straightforward to modify Matlab scripts for use in Scilab. There are some annoying differences. As an example one must use %pi rather than pi. They have a great editor for use in creating scripts which includes adding the ending parentheses for nested equations (Matlab does not have this feature). Plotting is also available in both programs.

HTH,

DMM

 
Posted : July 20, 2014 7:33 pm
(@kent-mcmillan)
Posts: 11419
 

> Is it relevant? Of course it is and for the reasons you listed above (given highly precise Total Stations and GPS equipment used now). The "Competent" Surveyor's role switches from one of simply pushing buttons and gathering data to ensuring the Quality of the data. There is no better tool in my opinion to do this than least squares.

Absolutely. :good:

 
Posted : July 20, 2014 7:48 pm
(@tom-wilson)
Posts: 431
Customer
 

Try again.

http://www.personal.psu.edu/cdg3/free.htm

 
Posted : July 21, 2014 6:25 am
(@deleted-user)
Posts: 8349
Registered
 

I thought $149 was really reasonable. Free is better if it works well.

 
Posted : July 21, 2014 10:17 am
(@kevin-samuel)
Posts: 1043
 

Once you slog through a least squares adjustment of an overdetermined 4 sided figure in Microsoft Excel you will be happy to use nearly any commercially available LSA package.

It is a good exercise to learn how the method works, but performing a LSA on even the simplest surveys in excel will be a huge time drain.

I would suggest looking into StarNet at your earliest convenience if you intend to implement LSA adjustments in your workflow.

 
Posted : July 21, 2014 3:01 pm
(@bill93)
Posts: 9834
 

I think the OP is doing this as a hobby or educational project, not a profession, so won't likely be buying a pro package.

As I mentioned before, Star*Net used to offer, and I think still does, a free download that works in "Demo mode" with up to 10 points and otherwise full capabilities. I strongly recommend it.

Wolf's program is another option, and I'd share my program if he wishes.

 
Posted : July 21, 2014 3:07 pm
 rfc
(@rfc)
Posts: 1901
Registered
Topic starter
 

> I think the OP is doing this as a hobby or educational project, not a profession, so won't likely be buying a pro package.
>
> As I mentioned before, Star*Net used to offer, and I think still does, a free download that works in "Demo mode" with up to 10 points and otherwise full capabilities. I strongly recommend it.
>
> Wolf's program is another option, and I'd share my program if he wishes.

Educational project indeed it is! Thanks for all the great suggestions. Since originally posting the question, I sat down with my now graduated from High School Son's Honors Math and Computer Science teacher who outlined Least Squares, and looked at it from the perspective of attempting to accomplish the task in Excel. If you guys haven't convinced me, she did... "Not gonna do it...Wouldn't be prudent" as Mr. Bush would say.

I'm convinced that something like Starnet is the answer and can understand that the investment would be a good one for a professional (I'm definitely not). I will try out the demo, as my immediate exercise will have 7 or 8 stations at most.

 
Posted : July 21, 2014 3:26 pm
(@kevin-samuel)
Posts: 1043
 

That is sound advice. If you email me at the address in my profile I will dig up some LSA spreadsheets I did in school just so you can see the nightmare!

Doing that in excel would be more of a practice session for your excel skills, but would give you an appreciation of modern software.

 
Posted : July 21, 2014 5:10 pm