# Tuning PID without transfer function

I'm very new to control theory and I am stuck at PID tuning. I have a given Simulink model but I do not know the transfer function. I want to use a PID to provide new input from the output of the model. Is it possible to tune the gains of the PID controller without knowing the transfer function? Which methods can I use for this?

• No, it isn't, no. Commented Jun 9, 2020 at 11:45
• Please give us more context. Why don't you know the transfer function? Usually you apply the PID controller to a (more or less) known model. Commented Jun 9, 2020 at 11:49
• I only have a very complex Simulink model of the process which was build by someone else. Now I want to design a PID controller for this system. Can I somehow derive a transfer function from the Simulink model? Commented Jun 9, 2020 at 12:19

If you don't 'know' the transfer function but you can run experiments (on simulink) with it you can either

• Determine an approximation of the TF using an ARMA model or other system identification techniques.
• Use a genetic algorithm to tune the PID until you get a 'good' PID for that system.
• Use methods such as the Åström-Hägglund relay method, a self tunning method.
• Use Ziegler-Nichols method to get some controller.

Method 1

You can find the transfer function of a Simulink block diagram using the linear analysis tool. First, you have to mark the input and output signal lines. Then you can use the linear analysis tool. The tool has options for linearisation / frequency response estimation. The exact name of the tool and its location in the menu varies from Simulink version to version.

Method 2

For open-loop stable plants, you can also try to identify the plant transfer function by giving standard test signals such as step response, sinusoidal signals etc.

e.g. From the step response, you can measure dead-time, rise-time, overshoot, settling time etc. and find a first/second/higher order transfer function which will have the same characteristics.

Method 3

For open-loop stable plants, there are PID tuning methods where you dont need to have model of the plant. One method commonly taught is the Ziegler–Nichols method.

https://en.wikipedia.org/wiki/Ziegler%E2%80%93Nichols_method

• in your method 2, I think you don't need to have a stable plant. It is possible to identify unstable systems (specially if you are running simulations with it). But in the unstable case you won't be able to identify the system by those characteristics you mention, it will be easier to use an ARMA model or do the Laplace transform of the output and have and approximation of the TF.
– jDAQ
Commented Jun 9, 2020 at 16:41
• @jDAQ Thanks. edited it.
– AJN
Commented Jun 9, 2020 at 16:46