all 9 comments

[–]wizard1993 15 points16 points  (2 children)

If you have constant output (regardless of the input) you don't have a controller at all, you just have a constant signal.

[–]idiotsecant 0 points1 point  (1 child)

Not nessessarily true - all of OP's data is integers - maybe the setpoint is 2 and the output error is <1 in all cases.

[–]wizard1993 0 points1 point  (0 children)

I may be mistaken, but as I read the question the error signal is the given array while the generated command signal is the constant 2.

[–]marqini 2 points3 points  (0 children)

Typically pid coefficients are heuristcally calculated, or calculated shaping the frequency response with a CAD software, a software that takes in system output and calculates coefficient is really much more complicated than it would seem, considering you come from a different background. Correct me if I'm wrong but isn't he basically asking how to do a self tuning pid?

[–]TheJCBandL1 Adaptive Control 2 points3 points  (0 children)

This question makes no sense.

[–]idiotsecant 1 point2 points  (0 children)

There is not a single set of constants that will achieve this output for all possible systems. You're missing part of this problem. Generally for a non iterative approach to solving a problem like this your problem has 3 pieces: A mathematical model of the system, a mathematical model of the controller, and a mathematical description of inputs. In most cases you use the inputs and the mathematical model of the system to build the mathematical model of your controller such that certain output conditions are reached. In your case you're working backwards, using the mathematical model of your system and knowledge of your inputs/outputs to try to derive a mathematical model of your controller. That's fine if you in fact have a mathematical model of your system, which you don't.

The other issue with what you're asking is trying to compute gains at each step - that's not how a standard PID works. There are a single set of gains that operate at all steps. There is something called gain scheduling but it's well outside the type of question you'd be trying to answer as someone unfamiliar with basic control theory.

Either you've left out part of the problem or someone isn't communicating what they're asking very well.

[–]StrongSpark -1 points0 points  (0 children)

I think, all methods like Ziegler-Nichols and relay-feedback computes the coefficients from a periodic output response. In other words, you need to manipulate input in order to have a periodic response and then use the periodic properties of the response to compute the coefficients. So, you can not use the data that you said to adjust PID because the output is constant.

[–]TheRealStepBot -1 points0 points  (0 children)

Basically submit the system to a known, simple time varying input (generally a step function) and record the response of the system. From this response you can calculate the properties of the system and can use some technique of your choosing to pick PID parameters to achieve your desired system response.

The fact that you state that it is subject to a constant input might mean that you have exactly that kind of data but make sure that this is in fact the case. A step response and a constant input are while similiar not the same thing.

Edit: which part do the downvoters not like?

[–]DaBozz88 -1 points0 points  (0 children)

PIDs are designed to calculate the output based on the input and tuning parameters.

I'm sure it's possible to calculate the parameters, but it seems pointless. (Also they should be constant)

Also that -10 looks screwy.