Issue with initial value of a controlled variable

조회 수: 4 (최근 30일)
Jude
Jude 2025년 2월 4일
댓글: Sam Chak 2025년 2월 13일
I'm trying to model a control response to a step change in a mulitivariable control model on Simulink. The PID controllers and transfer functions are set out correctly, but no matter what initial value I set in the step blocks, the plotted responses will start from zero. I have seen that this can be fixed by using a state-space block instead, but I was wondering if there was an easier solution, as I am not too familiar with state-space control lol
  댓글 수: 1
Sam Chak
Sam Chak 2025년 2월 13일
It is important to understand that the transfer function model is fundamentally derived from ordinary differential equations (ODEs), which can also be expressed in matrix form known as State-Space representation. Thus, if you have the transfer function model, then you must have known the ODEs of the system dynamics.
To the best of my recollection, we can assign starting values to the state variables only at the very beginning of the simulation if the model is in ODE or State-Space form. However, @MULI appears to have proposed different solutions. Please try them out and see if they work.

댓글을 달려면 로그인하십시오.

답변 (1개)

MULI
MULI 2025년 2월 13일
편집: MULI 2025년 2월 13일
Hi @Jude,
You can set a nonzero initial value in Simulink by following below approaches:
  • Adjust the "Step" block parameters by setting the initial value to your desired starting point.
  • You can use an "IC" block before your system to define an initial output. You can refer to this documentation link for more information on this block https://www.mathworks.com/help/simulink/slref/ic.html
  • Verify whether the Transfer Function or PID Controller block has the correct Initial States or Integrator Initial Condition set.
  • You can also use an operating Point by configuring Model Configuration Parameters > Data Import/Export to set the Initial State.
These approaches will allow your system to start from a nonzero value.
  댓글 수: 1
Sam Chak
Sam Chak 2025년 2월 13일
Hello @MULI
(1) Does setting the initial value in the Step block parameter allow the system's state variable to start at the specified value at the simulation start time?
(2) Additionally, I do not recall that the output of the Initial Condition (IC) block can be connected to the standard Transfer Fcn block.
Are these two new features introduced in the latest update to enhance the experience of System Dynamics users in Simulink? I have not updated yet. Could you please clarify these two items?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 PID Controller Tuning에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by