modelShowTransferFunction
Test complex transfer function block
Extends from Modelica.Icons.Example (Icon for runnable examples).
Information
This example shows the response of a PT2 (mechanical spring-mass-damper system with an acceleration acting on the mass) defined by its transfer function
-m
H(jw)=-------------------
m*(jw)^2 + d*jw + c
Frequency performs a logarithmic ramp from 0.01 to 100 s^-1.
Plot the magnitude locus (in dB) dB versus lg_w and the phase locus versus lg_w.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Units.SI.Mass | m | 0.2 | Mass |
| Modelica.Units.SI.TranslationalDampingConstant | d | 0.01 | Damping coefficient (not the damping ratio) |
| Modelica.Units.SI.TranslationalSpringConstant | c | 0.1 | Stiffness |
| Real[:] | b | {-m/oneUnitMass} | Unitless numerator polynomial coefficients {-m} of the transfer function |
| Real[:] | a | {m/oneUnitMass, d/oneUnitDampingConstant, c/oneUnitSpringConstant} | Unitless denominator polynomial coefficients {m,d,c} of the transfer function |
| Real | wMin | 0.01 | Lower bound for frequency sweep |
| Real | wMax | 100 | Upper bound for frequency sweep |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Real | lg_w | log10(logFrequencySweep.y) | Logarithm of frequency |
| Real | dB | 20*log10(complexToPolar.len) | Magnitude of the transfer function in decibel |
| Modelica.Units.SI.Angle | phi | complexToPolar.phi | Argument of the transfer function |
| Modelica.Blocks.Sources.LogFrequencySweep | logFrequencySweep | ||
| Modelica.ComplexBlocks.Sources.ComplexConstant | const | ||
| Modelica.ComplexBlocks.ComplexMath.TransferFunction | transferFunction | ||
| Modelica.ComplexBlocks.ComplexMath.ComplexToPolar | complexToPolar |