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.

HebenLast_S64_P
function HebenLast_S64_P
%function HebenLast_S64_P
%JM -   Trgheitsmoment des Motors      / inertia: motor      // [kgm^2]
%JT -   Trgheitsmoment der Seiltrommel / inertia: rope drum  // [kgm^2]
%r  -   Trommelradius                   / drum: radius        // [m]
%mL -   Masse der Last                  / load: mass          // [kg]
%iG -   Getriebebersetzung: Mot/Tro    / gear ratio: mo/dr   // [-]
%MK -   Kippmoment des Motors           / breakdown torque    // [Nm]
%sk -   Kippschlupf des Motors          / breakdown slip      // [-]
%ns -   Synchrondrehzahl (Drehfeld)     / synchronous rpm     // [rpm]
%g  -   Erdbeschleunigung               / gravity coefficient // [m/s^2]

assignin('base','JM',0.15);      % [kgm^2]
assignin('base','JT',2.5);       % [kgm^2]
assignin('base','r',0.3);        % [m]
assignin('base','mL',50);        % [kg]
assignin('base','iG',10);        % [-]
assignin('base','MK',150);       % [Nm]
assignin('base','sk',0.2);       % [-]
assignin('base','ns',1500);      % [U/min]]
assignin('base','g',9.81);       % [m/s^2]

%Regarding Bond Graph only::
evalin('base','ns_rs=ns*2*pi/60;'); %conversion to a norm unit [rad/s]

%Regarding signal flow oriented modelling according Scherf only:
evalin('base','Jred=JM+JT/iG^2+mL*r^2/iG^2;'); %computation in MATLAB workspace
evalin('base','MLM=mL*g*r / iG;');             %computation in MATLAB workspace

txt1='Parameter fr Bondgraph Beispiel HebenLast (Scherf_6.4) geladen!';
txt2='Parameter loaded - bond graph example lift a load (Scherf 6.4)';
disp([txt1 sprintf('\n') txt2]);

Contact us at files@mathworks.com