Simulink - Initial condition for first iteration only
59 visualizaciones (últimos 30 días)
I've built a closed-loop model on Simulink and I used a Memory block in order to delay the feedback signal. The problem is that Memory block delays every input signal by one step and I would like to use an initial value for the first step only and then use the computed value for the second step and so on.
Is there a way to accomplish this is Simulink?
Thanks in advance.
Birdman el 3 de Abr. de 2018
Run the attached model. I simply made a logic where the clock of the simulation is compared to a constant, let's say your sampling time(assuming you are working with fixed step). Then, At the very first step, it enables Memory block to be active via a MATLAB Function(see the content of MATLAB Function and try to understand), and after it passes first step, direct feedback is applied. Try to understand and adapt this into your problem. Hope this helps.
Abdolvakil Fazli el 18 de Dic. de 2018
Editada: Abdolvakil Fazli el 18 de Dic. de 2018
I have trouble setting the initial value of the adaptation block in simulink attached in this post. I am dealing with a loop in the input of this loop I take one data x (or say a sample) and calculate y according to that x , and adaptation vector (A), in adaptation block, I would update A according to the previous value of x,y,z and A , then I report A to predistortion block , and this loop is turning. My problem is the initial value of A in the first step; It has to be set as ones(1,65) just in the first time ; I do not know how to do it. Because if you set it in Pred block as ones(1,65) in each sample you will be facing with A=ones not an updated version of A. Someone suggested me using clock and counter, I do not know how for I am beginner in simulink. If anybody has any idea about implimentation of this method, or if you have another suggestion , it would be appreciated.
Thanks in advance