Why doesn't Output Maximum work like I expect it to

4 Ansichten (letzte 30 Tage)
Hello all,
Sometimes it just feels like MATLAB doesn't work logically, and I am sure it is because I am failing to grasp some key concept. Everything always just feels way more difficult than I expect it to be. Today there is an issue with Simulink. I have searched on Google for an answer, tried to watch relevant videos and read the help. Still no joy.
I am trying to set the maximum value for a signal so that it doesn't blow the scaling on my scope plot. I am measuring the Unit Impulse response of a series RLC circuit. As you probably know, the ideal impulse is 0s in duration and infinite amplitude. In reality though, I excite the circuit by summing two step signals, one which steps it up to a high value (e.g. 100) and then the other to pull it down very shortly thereafter.
I then want to find a way to put a max on the signal, so that it only goes to a max of 1, so that it may be represented on the scope as a Unit Impulse, (i.e. Amplitude of 1). I have tried messing with the "Output maximum" field on the "Signal Attributes tab of both the Add block and the Max block, with no success. I don't understand why putting for example 2 in that field doesn't cap the signal to a max of 2. What am I missing?

Akzeptierte Antwort

Robyn Galliers
Robyn Galliers am 1 Jun. 2024
FWIW, I don't think what I was trying to do is possible. I think the Maximum field is really just a limit, and if you enable warnings for signal overshoot, it warns you in the Command Window that your signal went over the maximum. It doesn't seem to limit the signal in anyway.
To get around this, I had to have conditional logic in the model such that for impulse signal inputs, the circuit was stimulated with a full impulse signal, and what was logged to the scope was a unit impulse representation. Not ideal, but it is the only way I could find to show it properly.

Weitere Antworten (0)

Produkte


Version

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by