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.

DASMdq_skalar_P
function DASMdq_skalar_P
%function DASMdq_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.1667); % [H]
assignin('base','Lr',0.1699); % [H]
assignin('base','Lk',0.1601); % [H]
assignin('base','Rs',1.070);  % [Ohm]
assignin('base','Rr',1.32);   % [Ohm]
assignin('base','zp',2);      % [-]
assignin('base','JM',0.032);  % [Kgm^2/rad]
assignin('base','Kd',0.07);   % [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
evalin('base','MS1=[0 1 0 0; -1 0 0 0; 0 0 0 1;  0 0 -1 0 ];'); %SE Element
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 DASMdq kompakt geladen!';
txt2='Parameter loaded - bond graph example DASMdq compact';
disp([txt1 sprintf('\n') txt2]);

Contact us at files@mathworks.com