Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Modelica/Blocks/Sources.mo
Original file line number Diff line number Diff line change
Expand Up @@ -941,13 +941,14 @@ The Real output y is a trapezoid signal:
equation
y = if time < startTime then wMin else
if time < (startTime + max(duration,eps)) then
10^(log10(wMin) + (log10(wMax) - log10(wMin))*min(1, (time-startTime)/max(duration,eps)))
wMin * (wMax/wMin)^min(1, (time-startTime)/max(duration,eps))
else
wMax;
annotation (defaultComponentName="logSweep",
Documentation(info="<html>
<p>The output <code>y</code> performs a logarithmic frequency sweep.
The logarithm of frequency <code>w</code> performs a linear ramp from <code>log10(wMin)</code> to <code>log10(wMax)</code>.
It uses <code>wMin*(wMax/wMin)^x</code> instead of the equivalent <code>10^(log10(wMin)+log10(wMax)-log10(wMin)*x)</code> to help with unit-checking.
The output is the decimal power of this logarithmic ramp.
</p>
<p>For <code>time &lt; startTime</code> the output is equal to <code>wMin</code>.</p>
Expand Down