KiCad Spice, Anyone Tried It?

Yes, good point!

And any instability could be inherent in the polynomial and/or correction, or over time as something physically changes.

But I wouldn't take John's "5th order" too literally; he was just making a quick point.

But you realise that, of course.

Reply to
Tom Gardner
Loading thread data ...

Bof. The polynomial would have a big linear term and a few tiny higher order terms, and only used within its domain. Should be safe enough. I do wonder if it's worth the trouble. DAC non-linearities tend to be jumpy, with sharp discontinuities at major bit transitions.

How would you handle it?

Jeroen Belleman

Reply to
Jeroen Belleman

And I'd fire you, and we'd both be happy.

Let's look at the system and see how to handle it /properly/".

I knew he could run my filter/control algorithm at 200K, and in fact crank down the CPU clock to save power. But it's hard to get classic c programmers to push the realtime limits, or to even estimate runtimes.

I wrote a couple of cross-assemblers that added instruction execution times to the listing so I could see runtimes directly. Caches and such make that less precise nowadays.

--
John Larkin         Highland Technology, Inc 

Science teaches us to doubt. 
 Click to see the full signature
Reply to
jlarkin

The official ITS thermocouple voltage-temperature equations range from

8th order to 14th order for various thermocouples. We make both thermocouple acquisition and simulation products. If anyone refused to implement the ITS equations, of course I'd fire them, for stupidity if nothing else. 5th is perfectly reasonable for calibrating a precision timing instrument. I'd explain why but our best circuits are proprietary.
--
John Larkin         Highland Technology, Inc 

Science teaches us to doubt. 
 Click to see the full signature
Reply to
jlarkin

What's not general about an RTOS? Thousands of units were sold.

This is an electronic design group. I deal with the software that makes electronic instruments work. My relationship to servers is that I have to talk to them, feed them javascript and UDP packets and such.

There are other forums for coders, people who work so far up the abstraction stack that they know nothing about computers or timing or electricity.

--
John Larkin         Highland Technology, Inc 

Science teaches us to doubt. 
 Click to see the full signature
Reply to
jlarkin

It is a single specialised program than can be used in different end equipment.

There's far more to software and software development than that.

No doubt.

But it confirms that you have no experience of creating large-scale software systems using modern techniques.

It is therefore unsurprising that you haven't understood the congruences with hardware.

Back in the 90s, when the "modern" technologies were moving from academia to industry, many softies had "hardware envy". Consequently they tried to mimic the perceived beneficial aspects of hardware. Two resulting technologies that have become very important are OOD/OOP and application servers. They aren't relevant to RTOSs, and aren't necessary for network-level programming.

Hence it is unsurprising that you aren't familiar with them.

But they do exist and do have certain characteristics, even if you aren't familiar with them.

Reply to
Tom Gardner

Good grief, this is an electronic design forum. I'm an electrical engineer.

Try washing your dishes, or driving to the beach, with software.

Two resulting technologies that have

I'm not familiar with knitting either.

--
John Larkin         Highland Technology, Inc 
picosecond timing   precision measurement  
 Click to see the full signature
Reply to
John Larkin

Nobody can argue with that.

--
John Larkin         Highland Technology, Inc 
picosecond timing   precision measurement  
 Click to see the full signature
Reply to
John Larkin

Yes, I assume so.

It does happen that people think that fitting a high-order polynomial to their data is a good idea because they can make a "perfect" fit for their sample points, and then are surprised when interpolated (and especially extrapolated) points are a complete mess.

But I would not expect John to make that mistake in practice.

Reply to
David Brown

Press button on steering wheel, "Drive to beach", select beach. Ok, where next?

Yeah, I think that was software. The Tesla cars literally could not exist in any semblance of their current form without software. I'm not talking a bout the fancy doodads. I'm saying the only practical way to make such a v ehicle practical, safe and prevent it from being harmed by misuse is the ma ny tons of software "inside".

Probably the greatest feature is that the car's software can be updated via downloads. The features on my car have continually improved with every up date including performance and safety features.

Try doing that purely with hardware.

--
  Rick C. 

  +++ Get 1,000 miles of free Supercharging 
 Click to see the full signature
Reply to
Ricketty C

It is a silly way to do it. I'd explain why, but it would take too long to cover the maths. And if the "official equations" are 8th to 14th order, they too are silly. And even if they are given in that form, using a 5th order polynomial in the software is a silly way to implement it.

High order polynomials have their uses - handling calibration is not one of them.

Reply to
David Brown

There is a difference between analyzing some effect and calibrating a senso r. A good example is a thermistor. The equations are not complex, but mos t sources seem to make a hash of explaining how to use them. A simple solu tion is to use data and fit a polynomial to it with whatever order is requi red to meet your accuracy needs. The higher order terms will all have smal l coefficients and the resulting curve will be very well behaved.

Besides, if you use enough data the result will pass through all the data p oints you will ever see. lol

--
  Rick C. 

  ---- Get 1,000 miles of free Supercharging 
 Click to see the full signature
Reply to
Ricketty C

Software and electronic have been completely entwined for almost half a century.

As a competent electronic engineer you are unwise to make strong statements in spheres where you have limited experience. Large scale software, for example.

Ditto other spheres, of course.

Try eating hardware!

Do you make sweeping statements about knitting? If not, then no problems will arise.

Reply to
Tom Gardner

It would depend on the accuracy needed, the quality of the source data (there's no point in closely fitting to inaccurate data), the non-linearities, and type of processor hardware you have, the speed you need, and other factors. A cubic spline is typically a good balance - you get a smooth function (with a Hermite spline, you get a continuous derivative - no jumps), no unexpected oscillations or large errors between points, simple and stable numerical analysis to figure out the coefficients, easy scalability to balance table size against detail, and very simple and efficient calculations at run-time. For many applications, a linear interpolation table is good enough.

If the original data supports it, there might be other types of curves that fit better. I don't know of any physical phenomenon where a high degree polynomial would be the natural fit for an effect - this sounds like it is empirical data from measurements and someone has incorrectly thought that a formula is better than a table.

Reply to
David Brown

Hang on to that resume for a while, OK?

--
John Larkin         Highland Technology, Inc 
picosecond timing   precision measurement  
 Click to see the full signature
Reply to
John Larkin

What a telling reaction.

Norway invariably beats the USA on all "happiness" comparisons. And the two biggest differences I see between how people work in the USA and how people work in Norway is that over here, if the boss tells you to do something stupid, you question him or her. The other is that we have job security - you need a very good reason, and a sensible time frame, in order to fire someone. This all gives a health, cooperative and supportive working relationship instead of employees who spend their lives terrified of irritating their boss and ending up on the street (and simultaneously losing their health care).

I don't know what the phrase "classic C programmer" might mean.

All sorts of things make it difficult to calculate accurately the run time of non-trivial code. You might be able to make some rough estimates, but generally measurement is better.

Reply to
David Brown

Unwise? Because I don't meet your expectations? Because I use ITC thermocouple equations?

We get purchase orders for electronics things, from people that you have heard of, and they are happy with what we make for them.

Given that, or being some google coder droid, I like the hardware.

Post some electronics now and then and we'll discuss it.

--
John Larkin         Highland Technology, Inc 
picosecond timing   precision measurement  
 Click to see the full signature
Reply to
John Larkin

ou

I'd say

be wrong -

it.

How can anyone say this guy is not a troll? It's not about the electronics for him. It's about the drama.

--
  Rick C. 

  ---+ Get 1,000 miles of free Supercharging 
 Click to see the full signature
Reply to
Ricketty C

You didn't say you would question, you said that you'd refuse.

I was kinda surprised when one of my engineers told me that a 5th order poly was best to calibrate a timing system. But since he was right, I didn't say "No" or anything obtuse like that. We can easily take a couple hundred data points to picosecond, sometimes femtosecond, accuracy. Lots of points smooths out the jitter.

The other is that we have

California is an "at will" state; we can lay off or fire anyone, any time, for any reason or none. Similarly, they can quit any time they want, walk right out the door, no matter how much it might damage the company.

That's symmetric.

No boss has ever terrified me; quite the opposite.

That's what I have to do, use an oscilloscope to show programmers what their code does. You can often relate the pulse widths to paths through the code.

--
John Larkin         Highland Technology, Inc 
picosecond timing   precision measurement  
 Click to see the full signature
Reply to
John Larkin

That's just a matter of emphasis and initial reaction.

I'd take a lot of convincing to believe that a 5th order polynomial is the right choice here.

That's stupid. (It is by no means your fault - don't imagine it is an insult. And you can be sure I can find some stupid things about the way things work in Norway too.)

With the Norwegian system, no one gets terrified. (Just as you can't fire someone immediately without exceptional reason - such as criminal activity, endangering the health or lives of others, etc. - you can't leave a job immediately. It is also symmetric - but safe for both sides.)

A scope can be a fine tool for measuring code performance. I like to make sure there are a few test pins on our boards that can be connected to an oscilloscope precisely for measuring critical code. Not all programmers understand how to instrument code for such measurements, unfortunately.

Reply to
David Brown

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.