Code covered by the BSD License  

Highlights from
Bond graph add-on block library BG V.2.1

image thumbnail
from Bond graph add-on block library BG V.2.1 by Gert-Helge Geitner
Block library enables the graphical programming of Bond Graphs using standard Simulink and editor.

ASMab_skalar_P
function ASMab_skalar_P
%function ASMab_skalar_P
%Ls -   Statorinduktivitt          / stator inductance           // [H]
%Lr -   Rotorinduktivitt           / rotor inductance            // [H]
%Lk -   Koppelinduktivitt          / mutual inductance           // [H]
%Rs -   Statorwiderstand            / Stator resistance           // [Ohm]
%Rr -   Rotorwiderstand             / rotor resistance            // [Ohm]
%zp -   Polpaaranzahl               / pole pair number            // [-]
%JM -   Trgheitsmoment Motor       / inertia torque motor side   // [Kgm^2/rad]
%Kd -   Omega-proportionale Reibung / omega proportional friction // [Nms/rad]

assignin('base','Ls',0.09614); % [H]
assignin('base','Lr',0.09789); % [H]
assignin('base','La',0.00241); % [H] - Koppelinduktivitt bei Sttigung
assignin('base','Lm',0.0935);  % [H] - Koppelinduktivitts-Zuwachs ohne Sttigung
evalin('base','Lk=La+Lm;');    % [H] - MATLAB workspace
assignin('base','Rs',0.17);    % [Ohm]
assignin('base','Rr',0.2);     % [Ohm]
assignin('base','zp',1);       % [-]
assignin('base','JM',0.275);   % [Kgm^2/rad]
assignin('base','Kd',0.2);     % [Nms/rad]

evalin('base','MR=[Rs 0 0 0; 0 Rs 0 0; 0 0 Rr 0; 0 0 0 Rr];'); %R Element
evalin('base','MZP=[0 0 0 0;  0 0 0 0; 0 0 0 1;  0 0 -1 0 ];');%GY Element
                                                               %MS1=0!
evalin('base','LDQ=(Ls*Lr-Lk^2);');                            %L_delta_quadrat
evalin('base','ML=LDQ*[1/Lr 0 -1/Lk 0; 0 1/Lr 0 -1/Lk; -1/Lk 0 1/Ls 0; 0 -1/Lk 0 1/Ls ];'); %I Element

txt1='Parameter fr Bondgraph Beispiel ASMab kompakt geladen!';
txt2='Parameter loaded - bond graph example ASMab compact';
disp([txt1 sprintf('\n') txt2]);

Contact us at files@mathworks.com