Commenting out Simulink block changes in unrelated system
4 views (last 30 days)
Show older comments
I have an issue where "Commenting Through" a Simulink block semmingly changes the response of an unrelated system.
Say I have unrelated sys A and sys B. Exactly what they are aren't as relevant for now (I think).
The top sys A is off-screen at the connection, but is independent of the bottom sys B. A's output plotted is called "y LQGI_DOB intl err".
The bottom sys B is shown in entirety, so is independent of anything else.
They both have an inline filter (5e5 / ...).
The left-most shared input is from essentially a signal generator, eg assume it's a sin-wave. It's a one-directional source that has nothing to do with any outputs in the system.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1373819/image.png)
Here's the response: (note the peak of ~2e4)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1373789/image.png)
Then comment through the filter of sys A like so -- nothing else changed:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1373824/image.png)
And here's the response: (note the peak value for BOTH outputs is ~3e3)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1373799/image.png)
Here's both responses together just for comparison: green/blue is both filters in, red/yellow is one filter commented through.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1373804/image.png)
How is it possible for a self-contained sys B's output to be impacted by a change to sys A? What might be going on?
0 Comments
Accepted Answer
Paul
on 3 May 2023
Hi John,
Do you have reason to believe that either pair of responses is correct? Just asking because having some idea what the response should be can be helpful in figuring out problems like this in Simulink.
One way that self-contained B can be affected by A is if the model is using a variable step solver and commenting through that filter in A changes the solver step size compuations as the model simulates.
4 Comments
Paul
on 13 May 2023
Hi John,
Did manually setting the Max Step Size parameter in the solver pane prove fruitful?
I don't know how SL deals with Max Step Size if it's set to 'auto'. Maybe the doc page for the solver pane has more info on how that works.
More Answers (0)
See Also
Categories
Find more on General Applications in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!