%% Brushless DC Motor Fed by Six-Step Inverter
%
% This example shows the use of a Six-Step Switch-on mode for a
% trapezoidal PMSM motor rated 1kW, 3000 rpm and speed regulated.
%
% Olivier Tremblay, Louis-A. Dessaint (Ecole de technologie superieure,
% Montreal)
% Copyright 1997-2012 Hydro-Quebec, and The MathWorks, Inc.
%%
open_system('power_brushlessDCmotor')
%% Description
%
% A three-phase motor rated 1 kW, 500 Vdc, 3000 rpm is fed by a six step voltage inverter. The inverter is a
% MOSFET bridge of the SimPowerSystems(TM) library. A speed regulator is used to control the DC
% bus voltage. The inverter gates signals are produced by decoding the Hall effect signlas of the motor.
% The three-phase output of the inverter are applied to the PMSM block's stator windings. The load
% torque applied to the machine's shaft is first set to 0 and steps to its nominal value (11 N.m) at t = 0.1 s.
%
% Two control loops are used. The inner loop synchronises the inverter gates signals with the electromotive
% forces. The outer loop controls the motor's speed by varying the DC bus voltage.
%
%% Simulation
%
% Observe the sawtooth shape of the motor currents. That's caused by the DC bus which applies a constant
% voltage during 120 electrical degrees to the motor inductances. The initial current is high and decreases
% during the acceleration to the nominal speed. When the nominal torque is applied, the stator current increases
% to maintain the nominal speed. The sawtooth waveform is also observed in the electromagnetic torque signal Te.
% However, the motor's inertia prevents this noise from appearing in the motor's speed waveform.
%
% Change the "Back EMF flat area" of the motor from 120 to 0 and observe the waveform of the electromotive force
% e_a.
%
%%
clear all
close all
bdclose all