%% Necessary simulaton variables
Ts=5e-06;
%% Motor specification
rpm = 900; %reference round per minute
efficiency = 0.9; %constant efficiency of a motor
%% Specification of a modelled motor
% resistancy of all rezistors
R=10;
R1 = R;
R2 = R;
R3 = R;
% resistancy of tranzistors which are connecting parallel rezistor
Ron1 = 1e-6;
Ron2 = 1e-6;
Ron3 = 1e-6;
% inductance used in realization of the model
L = 220e-9;
%L = 1e-2; % inductance used for proving similarity of the model
% moment simulated as a three steps
s1 = 0.7;
s2 = 0.4;
s3 = 1;
% Enable all of the phases (standard state)
Uon = 1;
Von = 1;
Won = 1;
% frequency of connecting parallel rezistors
f_pwm = 10^3;
% width of pwm modulation (when pwm is in "1", then parallel rezistors are connected)
pwm_width = 0.001;% off ... R_system = 20 Ohm
pwm_width = 100-0.001; % on ... R_system = 10 Ohm