How can i export datas on the bode plot in SIMULINK?
26 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
DONGHWAN HWANG
am 13 Dez. 2016
Kommentiert: DONGHWAN HWANG
am 1 Jan. 2017
Hello, I need to exprot data from bode plot block in SIMULINK
I made diagram block and run the SIMULINK file but I couldn't get the data based on frequency(x-axis) and magnitude(y-axis).
I only get 'structure' data... but it dosen't include data what i want
To get datas, I tried to make output port on the Bode plot(To Workspace block) and check 'Save data to workspace' on the logging of Bode plot option
How can i export the data from the bode plot in SIMULINK?
0 Kommentare
Akzeptierte Antwort
Arkadiy Turevskiy
am 14 Dez. 2016
When you run the model with Bode Plot block, with "save data to workspace" enabled, you get a variable sys, or whatever name you specified for it. sys is a structure, like you said. It contain frequency response information in the form of state-spaces matrices A,B,C,D as well as block name and snapshot time when linearization was computed.
To access state space matrices type
sys.values
To get magnitude, phase and frequency data from the bode plot:
[mag,phase,w]=bode(sys.values);
Recreate Bode plot:
semilogx(squeeze(w),20*log10(squeeze(mag)))
subplot(211)
semilogx(squeeze(w),20*log10(squeeze(mag)))
subplot(212)
semilogx(squeeze(w),squeeze(phase))
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Time and Frequency Domain Analysis finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!