# How to characterize a system given several curves

We have a system that heats up when voltage is applied, temperature is then measured against time. We have several different data plots of temperature versus time at varying voltages. We need to develop a PID controller to control the system. How would we find the system equation?

• This is a system identification problem. I suggest you consult the standard text on system identification: amazon.com/System-Identification-Theory-User-2nd/dp/0136566952. Also, if you have access to Matlab, the system identification toolbox is really helpful. Commented Nov 21, 2016 at 7:33

If you're completely stuck and all you have is plenty of (good) data, plug it into a program called Eureqa from nutonian.com. Eureqa uses symbolic regression to search for an appropriate model. If your data isn't super nonlinear or discontinuous it'll find a fit pretty quickly.

• This is a fairly good suggestion, but adding an example with pictures would make it a much better suggestion.
– Mark
Commented Apr 5, 2017 at 15:45

Whenever you want to model a physical system, you are faced with a choice of what model you are going to use. Your choice of model depends on how much accuracy you need, whether the fundamental physical relationships of the system are known, and what information you hope to get from your model.

## 1. A naive model

You could decide that you have no idea what physical processes are happening to your system and try to come up with an input-output relationship that "fits" your data directly. In your case you seem to want the temperature change over time, so you would derive a relationship like so:

$$T = f(t,V)$$

where $$T$$ is the temperature, $$t$$ is time, $$V$$ is the input voltage, and $$f$$ is some function. You have to decide what function best fits your data. For example, it could be linear, exponential, or polynomial. Often software packages like MATLAB, Microsoft Excel, and a multitude of others will automatically fit a curve to your data if you specify a type of function to use.

The problem with this method is that you may be unaware of some of the parameters that affect your system. For example, do you need to include the surrounding air temperature? Also, you have no idea if your model will work outside of the temperature range you tested, in fact your model could be wildly divergent from the true system (this is especially true if you use a polynomial fit for your data).

## 2. A physics/systems based model

If you have an understanding of the underlying physical phenomena in your system, then you can construct a model based on the known underlying relationships between those phenomena. Use the elemental physical equations of each component in your system to create a set of differential equations describing the states of your entire system. Then adjust the parameters derived from your differential equation until the model provides the same output as the data you measured. There is a very wide variety of methods for doing that, which would be too huge to list and explain in a single answer, so I would suggest doing what was suggested in the comments and finding a textbook on system identification.

The advantage to the physics-based model is that, if you've sufficiently accounted for all the variables in your system you can use it to estimate the output of your system in ranges that you haven't tested before. Another advantage is that you can usually derive a frequency domain expression of your system from the differential equation for use in control design. The disadvantage is that it can be more difficult to derive and identify all the relevant parameters.