functionbodeMIMO
Plot bode plot of all transfer functions, corresponding to the state space system
Extends from Modelica_LinearSystems2.Internal.PartialPlotFunction (Interface of a plot function).
Information
Syntax
StateSpace.Plot.bodeMIMO(ss) or StateSpace.Plot.bodeMIMO( ss, nPoints, autoRange, f_min, f_max, magnitude, phase, tol, defaultDiagram=Modelica_LinearSystems2.Internal.DefaultDiagramBodePlot(), device=Modelica_LinearSystems2.Utilities.Plot.Records.Device(), Hz, dB, onFile, fileName, matrixName)
Example
Modelica_LinearSystems2.StateSpace ss=Modelica_LinearSystems2.StateSpace(
A=[-1.0,0.0,0.0; 0.0,-2.0,0.0; 0.0,0.0,-3.0],
B=[0.0,1.0; 1.0,1.0; -1.0,0.0],
C=[0.0,1.0,1.0],
D=[1.0,0.0])
algorithm
Modelica_LinearSystems2.StateSpace.Plot.plotBodeMIMO(ss)
// gives:
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| StateSpace | ss | State space system | |
| Integer | nPoints | 200 | Number of points |
| Boolean[:,:] | autoRange | fill(true, size(ss.C, 1), size(ss.B, 2)) | True, if abszissa range is automatically determined |
| Modelica.Units.SI.Frequency[:,:] | f_min | fill(0.1, size(ss.C, 1), size(ss.B, 2)) | Minimum frequency value, if autoRange = false |
| Modelica.Units.SI.Frequency[:,:] | f_max | fill(10, size(ss.C, 1), size(ss.B, 2)) | Maximum frequency value, if autoRange = false |
| Boolean | magnitude | true | = true, to plot magnitude |
| Boolean | phase | true | = true, to plot phase |
| Real | tol | 1e-10 | Tolerance of reduction procedure, default tol = 1e-10 |
| Plot.Records.Diagram | defaultDiagram (from PartialPlotFunction) | Default diagram layout | |
| Plot.Records.Device | device (from PartialPlotFunction) | Modelica_LinearSystems2.Utilities.Plot.Records.Device() | Properties of device where figure is shown |
| Boolean | Hz | true | = true, to plot abszissa in [Hz], otherwise in [rad/s] (= 2*pi*Hz) |
| Boolean | dB | false | = true, to plot magnitude in [-], otherwise in [dB] (=20*log10(value)) |
| Boolean | onFile | false | = true, if frequency response is stored on file as matrix [f,a,phi] |
| String | fileName | "frequencyResponse.mat" | If onFile=true, file on which the frequency response will be stored |
| String | matrixName | if Hz and not dB then "fHz_a_phiDeg" elseif Hz and dB then "fHz_adB_phiDeg" elseif not Hz and dB then "f_adB_phiDeg" else "f_a_phiDeg" | If onFile=true, prefix name of matrix on file |