0

I'm trying to plot a plant transfer function in Simulink. For the case I'm looking at, there is a downward step in the temperature from 40 to 30 degrees Celsius.

Initially, I was able to identify some suitable plant models using both the System Identification toolbox and the PidTuner app. Either way, the identified plant transfer function follows the downward trend from 40 to 30:

Plant Transfer Function Graph

However, when I plotted one of the identified plant transfer functions in Simulink the resulting graph shows that system starts at the point 0 and moves up towards 30, instead of starting at 40 and decreasing towards 30:

Simulink Graph

Is there a way I can fix this problem? Thanks in advance.

Edit:

This is the Simulink model and the resulting graph of the plant using the state space block as opposed to the transfer function block:

Simulink model

Graph using state space block

Phil Goddard
  • 10,571
  • 1
  • 16
  • 28
Lin.1
  • 1
  • 1
  • Presumably you need to set the initial condition of the transfer function, but without seeing your model it's impossible to tell for sure. Please upload some images. – Phil Goddard Jul 17 '19 at 14:32
  • I have just edited my post to include some images. – Lin.1 Jul 17 '19 at 14:38
  • You need to show us how you have implemented it in Simulink. How to set the initial condition is different depending on the block(s) you have used. – Phil Goddard Jul 17 '19 at 15:23
  • I have now added the Simulink model to my post. I was initially using a transfer function block, but after reading through some other posts, I realised that I need to swap to a state space block to define the initial conditions. In the state space form, the variables are: A=[-0.5059 -0.1622; 1 0] , B=[1;0], C=[-0.0417 0.1506] and D=[0.0909]. Since I want an initial condition of 40, I tried to set the initial conditions in the state space block to [0 40/0.1506]. However, when I plot the graph (shown above), the graph still doesn’t start at 40. Am I defining the initial conditions incorrectly? – Lin.1 Jul 17 '19 at 16:17
  • I would suggest you use a form of the state-space such that the C matrix only has one non-zero entry. That'll make it easier to specify the initial condition correctly. – Phil Goddard Jul 17 '19 at 17:59
  • Thanks for your advice. I think there was probably a minor error somewhere because I started a new Simulink file and repeated all the same steps with the state-space block and it's working now! – Lin.1 Jul 17 '19 at 19:21

0 Answers0