Clear Filters
Clear Filters

starting condition of feedback scheme in simulink

2 views (last 30 days)
Hi! How can I set a starting condition as input of my system? The input at t=0 is a constant error vector, but I don't know how to sum/activate it. Then the error should be csi_desired-csi_attuale for any t different from 0.

Answers (1)

Saurabh
Saurabh on 15 May 2024
Edited: Saurabh on 15 May 2024
Hi Valeria,
It seems you want to have a different error condition at t = 0, and other than t = 0, the error condition goes as csi_desired-csi_attuale.
For this purpose, use a clock block, a switch block, and a relational operator block.
Use the clock block to get the simulation time.
A relational operator block is used to compare the output of the block with zero. This block should be set to check if the time is greater than zero.
The switch block is used to switch between the initial error vector and the dynamic error computation.
Configuration steps:
  1. Connect the constant block to one input of the switch block.
  2. Connect the output of the subtract block to another input of the switch block.
  3. Connect the output of the relational operator block to the control input of the switch block.
  4. The output of the switch block will now represent your error input: the constant error vector at t = 0, and csi_desired-csi_attuale at t not equal to zero.
Here is the demo model attached to understand the purpose:
For more information look at the documentation of the blocks used.
  1. https://www.mathworks.com/help/simulink/slref/clock.html?searchHighlight=clock%20block&s_tid=srchtitle_support_results_1_clock%2520block
  2. https://www.mathworks.com/help/simulink/slref/switch.html?s_tid=doc_ta
  3. https://www.mathworks.com/help/simulink/slref/relationaloperator.html?searchHighlight=relational%20operator%20block%20&s_tid=srchtitle_support_results_1_relational%20operator%20block%20
I hope this was helpful.

Products

Community Treasure Hunt

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

Start Hunting!