Querry regarding simulink . It is not giving the desired results.

1 Ansicht (letzte 30 Tage)
shailesh
shailesh am 13 Jun. 2014
Beantwortet: A Jenkins am 13 Jun. 2014
Algorithm 1.If signal value is in between 5 & -5 , it should be given directly as out put. 2.If signals value is greater than 5 or less than -5 , its rate of rise or rate fall should be constrained by rate limiter.

Antworten (1)

A Jenkins
A Jenkins am 13 Jun. 2014
The syntax
(-5 < u1 < 5)
does not do what you think it does. You mean
(-5 < u1) & (u1 < 5).
MATLAB evaluates left to right so that the first part (-5 < u1) is either true or false, 1 or 0. Then you would have either (0 < 5) or (1 < 5), which is always true, and your switch will never change. See also Why is Answer to 3 < A < 7 Unexpected?
(Also, your model is aliasing. You need to set your max step size based on the frequency of your sign wave. Perhaps you have learned how to calculate the Nyquist rate?)

Kategorien

Mehr zu Simulink finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by