1
votes

I am working on an engine temperature model. I am stuck at a Point. There is a Signal named tred which Needs to be filtered using a Low Pass Filter to get the final Output Signal as tredf.the Problem is that tred starts from 90°C but after filtering the tredf starts from 0. I am comparing my simulink model with another realtime model. Everything seems to be ok except this initialisation. I want my filtered Signal tredf to also start from 90°C. The filter i am using is a PT1 (proportional Transmission 1st order) filter(low pass) which is being derived from a self created library.
The filter has the following 6 Inputs :

  1. u(k) i.e. the Input viz tred.
  2. T i.e. Filter Time Constant viz 500.
  3. y(0) i.e. the Initial value viz also tred.
  4. reset - connected to a bit (resets when bit is false).
  5. compute - connected to the same bit (computes the Output when bit is true).
  6. dT - sampling/increment time - i have set this to 0.1.

This is the descreption of the PT1 block for better understanding :

  • The PT1 block is a discrete-time low-pass with a time constant T , the integration algorithm works by an Euler - forward . The time constant is automatically limited in their range of values ​​( T > = dT ) . The y ( 0 ) - input is the digital lowpass specify a start value , for this initial value can be at any time by a pulse at the reset - return receipt . The PT1 - block must explicitly with the compute - enabled input

The first 5 Inputs of the filter are fixed and i can only set dT. Does anyone has an idea so as to what am i doing wrong and how could the Output i.e.tredf also starts from 90°C ?

1
It sounds like the y(0) input needs to be set to be 90, what are you using?Phil Goddard
No, It cannot be set to 90 as the Input for y(0) is given. I have tried and understood the Problem. y(0) is not the Initial value but the start value at the reset. So whenever it resets, it Begins with the Initial value. But the filter has not been initialised, so simulink always starts from 0. I Need to somehow reset it for the very first Input so that it automatically takes the Initial value. But i havnt figured out how ? any idea @PhilGoddardAakash Sehgal

1 Answers

0
votes

You might want to check this out:

enter image description here