Simulink: Triggered subsystem result does not coincide with equivalent discrete system.
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Claudio Di Pietro
am 19 Jul. 2021
Beantwortet: Harikrishnan Balachandran Nair
am 22 Sep. 2021
I have created two equivalent discrete systems. They are identical and run at the same sampling period, but one is composed of just simulink blocks that execute their tasks at the specified sampling rate, T, while the other is sampled via a triggered subsystem, still with sampling rate T.
The results should be identical just like the subsystems but as you can see they are not:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/688698/image.png)
The simulink Model is attached below (TRIGGEREDSUBSYSTEM.slx). In order to run it you need to execute the m file PARAMETRISPMSM also attached.
Thank you in advance for your time.
0 Kommentare
Antworten (1)
Harikrishnan Balachandran Nair
am 22 Sep. 2021
Hi,
I understand that you are trying to achieve the same functionality with and without using a 'triggered subsystem' , and you are expecting the results to be same in both cases.
In the attatched simulink model, you can observe that at t=0, the output from the PID controller outside the triggered subsystem is 0.313, while the output of PID controller inside the triggered subsystem is close to zero. The triggered subsystem executes for the first time at time t='T' , where there is a rising edge, and not at t=0. This delay is causing the output from the triggered subsystem to lag behind that outside the triggered subsystem by the sampling period 'T'.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Subsystems finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!