20 #ifndef _LINEAR_SYSTEM_ANALYZER_H_
21 #define _LINEAR_SYSTEM_ANALYZER_H_
23 #include "mbsim/solver.h"
24 #include "mbsim/functions/function.h"
25 #include "mbsim/utils/index.h"
26 #include <mbsim/utils/boost_parameters.h>
30 BOOST_PARAMETER_NAME(modeNumbers)
31 BOOST_PARAMETER_NAME(frequencyRange)
35 namespace MBSimControl {
45 void execute()
override;
46 void setInitialTime(
double t0_) { t0 = t0_; }
47 void setInitialState(
const fmatvec::Vec &z0_) { z0 <<= z0_; }
48 void setInitialInput(
const fmatvec::Vec &u0_) { u0 <<= u0_; }
49 void setMinimumNaturalFrequency(
double fmin_) { fmin = fmin_; }
50 void setMaximumNaturalFrequency(
double fmax_) { fmax = fmax_; }
51 void setNormalModeScaleFactor(
double modeScaleFactor_) { modeScaleFactor = modeScaleFactor_; }
52 void setNormalModeScale(
const fmatvec::VecV &modeScale_) { modeScale <<= modeScale_; }
53 void setExcitationFrequencies(
const fmatvec::VecV &fex_) { fex <<= fex_; }
54 void setExcitationAmplitudeFunction(
MBSim::Function<fmatvec::VecV(
double)> *Amp_) { Amp = Amp_; }
55 void setExcitationPhaseFunction(
MBSim::Function<fmatvec::VecV(
double)> *Phi_) { Phi = Phi_; }
56 void setPlotStepSize(
double dtPlot_) { dtPlot = dtPlot_; }
57 void setLoops(
double loops_) { loops = loops_; }
58 const fmatvec::Vec& getInitialState()
const override {
return z0; }
59 void initializeUsingXML(xercesc::DOMElement *element)
override;
61 BOOST_PARAMETER_MEMBER_FUNCTION( (
void), visualizeNormalModes, MBSim::tag, (optional (modeNumbers,(fmatvec::VecVI),fmatvec::VecVI()))) {
66 BOOST_PARAMETER_MEMBER_FUNCTION( (
void), visualizeFrequencyResponse, MBSim::tag, (optional (frequencyRange,(fmatvec::Vec2),
"[0;1e4]"))) {
68 fRange = frequencyRange;
75 double modeScaleFactor{1};
76 fmatvec::VecV modeScale;
79 fmatvec::VecV amp, phi;
80 fmatvec::Vec z0, zEq, u0, fex;
88 std::vector<fmatvec::MatVx3> fap;
Linear system analyzer.
Definition: linear_system_analyzer.h:41