Você está na página 1de 231

Electrical Drives

Electrical Drives
MEP 1422
2004/2005-02

Module 1. Introduction to drives:


Elements in electrical drives, overview of DC and AC drives.
Torque equations,
Components of load torque, torque characteristics. Four-quadrant
operation
Notes on Introduction to Electromechanical Energy Conversion

Module 2 Converters in electric drive systems:


Controlled rectifier, Linear scheme, Non-linear scheme,
Switched-mode converters - average model and transfer function,
Two-quadrant converters, Four-quadrant converters, Bipolar
switching, Unipolar switching,
Current-controlled converters, Fixed switching frequency control,
Hysteresis control
Example of Simulink file for 2-Q converter (switching and average
model)
Current ripple in 4 Q converter
Space Vector Modulation (SVM)

Module 3 DC motor drives

DC drives in power point format, in .pdf


Construction, modeling and transfer function, Converters for DC
drives – quadrant of operations.
MATLAB–based controller design method – here
Linear analysis in Simulink
Large signal simulation using SIMULINK – here

http://encon.fke.utm.my/courses/mep1422/modules.html (1 von 2) [17.05.2005 17:09:50]


Electrical Drives

Module 4. Induction motor drives


Dynamic model of induction machine
Construction and principle of operations,
Speed Control-
constant V/f, Scalar control – problems at low speed,
current
Simulink example on open-loop constant V/Hz using SIMULINK
s-function for IM simulation
Compiled with Borland C - here
Current controlled and voltage boost, open-loop and closed-loop
control.
Field-oriented control of IM:
Rotor flux orientation
Stator flux orientation
Simulink example on indirect FOC IM – requires imch.dll
PPoint for principles of direct torque control and in pdf
Direct Torque Control using SIMULINK and the required *.dll files
for the S-function

http://encon.fke.utm.my/courses/mep1422/modules.html (2 von 2) [17.05.2005 17:09:50]


& ) ,

'

! "

)
*
*

( &

+
& µ

#
$ %
)
) *

*
- #

$ %
#
. #
#
- #
&
&

&
! /

#
0
#
1

&

2 $ %
0

0
.

)
/ 0

$ %

#
#

# #
*

(
0
0

& ' 0 &


$ % 2 & '
0
! !

-
# 0 *
* 0
3

# 4567
& #
$ % #
#
#

# 4587
2
$ $ & %% #
# 9
$/: % $* %

#
)
• 0
• # $ %

• 0

;
• / #

0 $ % 0

• . 0
0
• #
0

0
#$ #$ % & '

* A ω θ
1
J
( !
*

d (Jω m )
Te = Tl +
dt

. <' =7$ %

dω m
Te = Tl + J
dt

* = ) $> %
* = , $> %
<= ) $ ?%

ω = $ '%

d (Jω m ) .
dt ω' = 7 * = *

/ 0 * *

@
.

"
! #$ +

, 1 B

$% / */

/ 0
*/ 1
*" " $* = -ω%
*
* & 0

. * *

ω)
ω)
*

*
*/ */

$% 2 *2

*2
*2 = Cω? . *2 *"

$ %* *,

*, . .

*
* *

* = *, + -ω + * + Cω?

2 * Cω?

ω
* =< + *, + -ω

! #$ -

% $ .#$ ! ! '

* ω * D

ω
*
*
ω ω

T
*
*
ω ω

* $
% *

* E E *
. .. ... ."

,
F .
-
* $
= * ω% !
*

F ..
*
* G D *

*
*

F ...
* *
*

* *

F ."
* * G D
*
*

G.K. Dubey, “Fundamental of Electrical Drives”, Narosa, 1994.


N. Mohan, “Power Electronics: Converters, applications and design” John Wiley and Sons, 1995.

/
ELECTROMECHANICAL ENERGY CONVERSION
Electromechanical energy conversion process involves three forms of energy: λ λ
electrical, magnetic field and mechanical. In rotating electrical machines,
energy is continuously converted from electrical to mechanical, or vice versa.
Electrical motors converts electrical energy to mechanical energy and it is
reversed in the case of generators. In both cases, magnetic field acts as a
medium in the process of electromechanical energy conversion. We will look (or
review) the process of electromechanical energy conversion of a simple
translational system for a non-linear and linear magnetic system. We will then
apply this basic principle to a rotating machine.
Example of electromechanical system
The characteristic of the flux linkage and current (λ-i) of a system shown in non-linear system linear system
Fig 1 is determined by the B-H characteristic of the core and the length of
the air-gap. With small air-gap length, g, the λ-i characteristic is dominated Fig. 2
by the B-H characteristic of the core which has a non-linear characteristic
due to the core magnetic saturation. With large g, however, the linear
magnetic characteristic of the air-gap will dominate. Thus for large air-gap The differential relation between the 3 forms of energy exists in the system
can be written as:
system the λ-i curve of the system displays a linear characteristic. If a
linear system is assumed, all of the mmf drops appear across the air-gap. In
dWe = dWf + dWm (1)
other words, it is assumed that the reluctance of the core is negligibly small
compared to that of the air-gap’s reluctance. This assumption is based on the
Where dWe – differential change in electrical energy
fact that the magnetic permeability of the core is much larger than the air-
dWf - differential change in field energy
gap permeability. The λ-i curves for different air-gap values are therefore dWm - differential change in mechanical energy
linear.
If the position of the moving part is fixed (air-gap length is fixed, thus dWm
= 0) and the current in the coil is increased from 0 to ix, the field energy
will increase and is given by:
dWe = e.i dt = dWf (2)
Substituting e = dλ/dt,
dWf = i dλ (3)
If the flux linkage increased from 0 to λx, the stored energy can be written as:
λx
Wf = idλ (4)
− − 0
λ
λx
Fig. 3
energy co-energy
Fig. 1
ix
The co-energy, which is used later to calculate the force, in this particular area of Fig 5, which is a reduction in field energy. Thus the mechanical force
example is defined as: is given by:
ix
∂Wf(i, x)
W'f = λdi (5) fm = − (8)
0
∂x λ = cons tan t
It should be noted that for a linear system, Wf = Wf’
If the differential movement is small, the shaded area of Fig 4 and Fig 5 is
If the moving part is allow to move slowly, from x = x1 to x = x2, such that the same. Hence the force calculated using equation (7) and (8) will be the
the air-gap is reduced, the rate of change of flux linkage will be very small same.
during this movement and hence the current can be assumed to be constant.
λ
λ
λ
λ
Fig. 5
Linear system
Fig. 4
For linear system, the flux linkage is proportional to the current, where the
The mechanical force associated with this movement can be obtained if the constant of proportionality is the inductance of the coil. The inductance
change in mechanical energy is known. Thus, however depends on the position, x. Thus,
dWm = dWe - dWf (6) λ = L(x)i (9)
λx2 The co-energy is given by:
During the motion, dWe = e.i dt = i dλ. Hence We = idλ
λx1 i
1 2
Wf' = λ di = i L(x) (10)
The change in the stored field energy can be obtained by calculating the 0 2
difference in stored energy between the two positions.
Using equation (7),
It can be shown graphically that Wm is given by the shaded area of Fig.4 which ∂Wf'(i, x) 1 2 dL(x)
essentially is the increase in co-energy. Thus: fm = = i (11)
∂x i = cons tan t 2 dx
dWm = dWf’
Since dWm = f dx, the mechanical force can be calculated as: Rotating machines
Fig 6 shows a general rotating machine with salient stator and salient rotor.
Both stator and rotor are exited (doubly–fed). We are interested in obtaining
∂Wf'(i, x)
fm = (7) the electromagnetic torque expression of the system. We can do this by
∂x i = cons tan t obtaining the expression for the co–energy (or energy) and differentiate it
with respect to x for constant current (or constant flux).
If the movement of the moving part is very fast (i.e. for the same
displacement but for a very short time), the change in flux linkage can be
assumed negligible. However, the rate of change of the flux linkage with time
is finite and hence causes the current to decrease during this movement. It
can be graphically shown that the mechanical energy is given by the shaded
i) Reluctance torque (the first two terms of equation (18)). It is caused
by a tendency of the induced pole to align with the excited pole such
that minimum reluctance is produced. The torque only exists if the
θ stator or rotor (or both) self inductances depends on the rotor position.
This can exists if: 1) both stator and rotor are salient, 2) either
stator or rotor is salient. In other words, in a cylindrical machine
(whereby both stator and rotor are non-salient) reluctance torque will
not exist. Further it can be seen that both stator and rotor need not to
be excited at the same time.
ii) Alignment torque (the third term of equation (18)). It is caused by a
tendency of the excited rotor to align with excited stator. Both
windings must be excited. The mutual inductance depends on rotor
position regardless of whether the stator or rotor is salient or not. In
Fig. 6 other words, the alignment torque exists even if both stator and rotor
is not salient. In induction machines, rotor current is produced through
induction rather than excitation by external circuit, as in the case of
With no rotation (rotor not moving), the stored field energy can be calculated cylindrical synchronous machines.
as:
= esis dt + erir dt
dWf (12)
Substituting es = dλs/dt and er =dλr/dt,
dWf = is dλs + ir dλr (13)
The flux linkage of the stator winding can be expressed in terms of stator
self inductance and mutual inductance:
λs = Lssis + Lsrir (14)
The first term of (14) is the flux linkage of the stator winding caused by the Stator - non-salient Rotor – salient Stator - salient Rotor – salient
- Stator self inductance depends on - Stator self inductance depends on
stator current whereas the second term is caused by the rotor current. rotor position
rotor position
- Rotor self inductance does not - Rotor self inductance depends on
Similarly, the flux linkage of the rotor winding can be expressed as, depend on rotor position rotor position
λr = Lrrir + Lsris (15)
Substituting (14) and (15) into (13),
dWf = Lssisdis + Lrrirdir + Lsr d(isir) (16)
For a linear system, Wf = Wf’. It can be shown that for rotational systems,
∂ θ
= (17)
∂θ =
Thus the torque is given by:
Stator - salient Rotor – non-salient Stator - salient Rotor – non-salient
- Stator self inductance does not - Stator self inductance does not
depend on rotor position
1 2 dLss 1 dLrr 1 dLsr depend on rotor position
T = is + ir2 + isir (18) - Rotor self inductance depends on - Rotor self inductance does not
2 dθ 2 dθ 2 dθ rotor position depend on rotor position
Based on equation (18), two types of torque can be classified:
CONVERTERS IN ELECTRIC DRIVE SYSTEMS MODELING OF SWITCH-MODE CONVERTERS IN ELECTRIC DRIVES
CONTROLLED RECTIFIER Introduction
Modeling is a simplified representation of a physical system. In electrical
We have seen in previous course (undergraduate course) that a relation between the engineering, physical systems are normally modeled using mathematical equations.
average voltage and the firing angle (or delay angle) of a single-phase controlled
rectifier is given by: The complexity of the developed model of power electronic converters will depend on
the applications of the model. For instance, a model for a switching device used to
analyze its switching characteristic or switching losses is different from a model
= α develop used to study the fundamental behavior of a converter containing that
π particular switching device.
where α is the delay angle, Vm is the peak input voltage and Va is the average
voltage. Note that this relation is only valid for continuous current mode. It Here we will look on how switch-mode converters used in DC drives are modeled. The
describes the ‘average’ behavior of the rectifier over a period of the output voltage. application of our model is in the designing of linear controllers for drive systems
using linear control system theory. We therefore need to obtain the linear models of
The dynamic characteristic of the controlled rectifier is however very non–linear the converters, i.e. we need to establish a linear relation between the control
which can be described by non–linear differential equations. In order to simplify the signal and the average output voltage.
designed of the controller containing controlled–rectifier circuit, an approximation
using the average value is normally used. This approximation is however valid Two typical switch-mode converters used in DC drives are the 2-quadrant and 4-
provided that the bandwidth of the control loop is maintained well below half of the quadrant converters shown below. We will assume that the converters obtained the
maximum time for the average voltage to change. For instance, if a 3-phase system, switching signals from a comparison between control signal vc and a triangular
50Hz system is used as the input to the full-wave controlled rectifier, then, the waveforms.
time taken for the average voltage to change varies between 0 to 3.33 ms ((1/50)/6).
The average time of 3.33ms/2 = 1.67 ms is taken. If this delay is not to be used in
the model, the bandwidth of the drive must be made much smaller than 600 Hz.
The SCRs are normally triggered based on the control signal generated, for example,
by a current controller. Depending on the firing circuit used, a linear or a non– Two-quadrant
linear relation between vc and Va can be obtained.
+
Va
-
α
ω
+ va –
Four-quadrant
= α= =
α π
Two-quadrant converter
As in all other converters, the status of the upper and lower switches in a leg, must
always complement, i.e. if the upper switch is on, the lower switch must be off or
vice versa- thus only one control signal is required to control a leg of a two-
quadrant converter.
= α = If the upper switch is ON, the output voltage, vo equals Vdc and if the lower switch
π is ON vo = 0. The instantaneous output voltage will swing between Vdc and 0, however
its average value depends on how long the switch upper (or lower) switch is ON.
We will assume the control signals for the switches are obtained as a result of
comparison between the control signal and a triangular
!
If the triangular frequency is high and therefore is much larger than the control
signal, d can be assumed continuous. However when selecting the bandwidth of the
closed-loop system, the discrete values of d must be taken into account, i.e. the
bandwidth must be limited to one or two order lower than the triangular frequency.
!
The relation between d and vc is obtained as follows:
When vc = Vtri,p , d = 1, when vc = -Vtri,p, d = 0.
The output of the comparator is obtained as follows:
1 when vc > vtri, upper switch ON
q= (1)
0
when vc < vtri, lower switch ON
Obviously, the waveform of va will follow that of q. The instantaneous value of va is
given by: va = q(Vdc) The average value of va will depend on the duty ratio of q and
the duty ratio of q in turn depends on the control signal vc. We can obtain the
relation between the average voltage Va and the duty ratio d by calculating the Assuming d is continuous, the relation between d and vc is obtained as:
average value of va in terms of d.
vc
dTs d = 0.5 + (4)
1 2 Vtri , p
Va = Vdc dt = dVdc Where d = ton/T (2)
T 0
The relation between vc and Va can be obtained by substituting (4) into (2),
d is in fact an average value of q over a cycle and therefore have a range of between
0 and 1, thus,
Vdc (5)
Va = 0.5Vdc + vc
2 Vtri , p
t + Ttri
1
d= q dt (3) If we want to include the converter into our closed-loop model of a DC drive system,
Ttri t we need to obtain the small signal transfer function between vc and Va. This is done
by introducing small signal perturbation in Va and vc.
Vdc
(Va + ~v a ) = 0.5Vdc + (v c + ~v c ) (6)
2Vtri , p
Separating the dc and ac components,
Bipolar switching
DC : Vdc (7) Leg A and Leg B obtained the switching signals from the same control signal. This
Va = 0.5Vdc + vc
2 Vtri , p implies that switching of Leg A and Leg B are always complements.
AC : ~v = Vdc ~ vc (8)
a
2 Vtri , p
By taking Laplace transform of equation (8), the small signal transfer function
between vc and VA can be obtained.
#$ #$
Vdc
2 Vtri , p
!
"
Four-quadrant converter !
The model developed for the two-quadrant converter can be used as a building block in
developing the model for the four-quadrant converter. As illustrated in the figure
below, the 4-quadrant converter is composed of two legs, with each leg similar to *
that of the 2-quadrant converter. We will consider two switching schemes normally
employed: (1) Bipolar switching scheme (2) unipolar switching scheme.
% &
In a forward breaking mode where the average voltage Va is positive and smaller than
the back emf of the armature, current will flow through D1 and D2 when va = Vdc and
will flow through Q3 and Q4 when va = -Vdc
' '
+ va –
(
' '
% &
The instantaneous voltage va can be made either equals Vdc , -Vdc or 0.
)
Va = Vdc when Q1 and Q2 are ON
va = -Vdc when Q3 and Q4 are ON
va = 0 when current freewheels through Q and D
Therefore the output voltage va can swing between Vdc and –Vdc, Vdc and 0 or 0 and Vdc,
which is determined by the switching scheme chosen:
Using the comparison between the control signal and triangular waveform as shown in
Figure 7, the resultant q and q is as below:
" (
#$ #$
Vdc
Vtri , p
-
Unipolar switching
! +
The switching signals for Leg B is obtained from the inverse of control signal for
Leg A. This is illustrated in Figure 10. According to our previous analysis, the
continuous duty ratio for Leg A, dA, is given by:
! + ,
vc
d A = 0 .5 + (16)
2 Vtri , p
-
Since Leg B uses the inverse control signal , accordingly the continuous duty ratio
for Leg B is given by:
From previous analysis, the average voltage for Leg A and Leg B is given by:
vc
d B = 0 .5 − (17)
2 Vtri , p
VAO = dA(Vdc) and VBO = dB(Vdc)=(1-dA)(Vdc) (9)
This gives and average armature voltage as,
Vdc
VAB = (dA – dB)Vdc = vc (18)
Vtri ,p
Similarly relation between vc and dA and dB can be written as:
The transfer function obtained for unipolar switching scheme is therefore similar to
vc the bipolar switching scheme.
For Leg A d A = 0 .5 + (10)
2 Vtri , p
vc
For Leg B d B = 0.5 − (11)
2 Vtri , p
.
We are interested in the voltage across the armature circuit, VAB
VAB = VAO – VBO = (dA – (1-dA))Vdc = (2dA -1)Vdc (12)
!
Substituting dA from (10) into (12) gives,
Vdc
VAB = vc (14)
Vtri , p
By taking the Laplace transform of the ac components in (14), the transfer function
between the vAB(s) and vc(s) is obtained: !.
,
Vdc
v AB (s ) = v c (s ) (15)
Vtri , p
*
a) The control variable of inner loop (e.g. torque) can be limited by
limiting its reference value
b) It is flexible – outer loop can be readily added or removed depending on
the control requirements
Implementing cascade control structure requires the torque and hence the current to
be controlled. Good current controlled schemes should produce low current ripple,
good tracking capability with zero steady state error, constant switching frequency
regardless of operating conditions, and fast dynamic response. There are two well
known methods normally used to control the current,
,
i) fixed switching frequency control – linear controller
ii) hysteresis (or bang-bang) control – non–linear controller
!
Fixed switching frequency control
The reference current is compared with the actual current and the error is fed to the
PI controller. The output of the PI controller is compared with the triangular
waveform to determine the duty ratio of the switches – either to increase or reduce
the current. This method resulted in the inverter switches at fixed frequency
! regardless of operating conditions. However the bandwidth of the current loop is
limited by the triangular waveform. The bandwidth of the closed–loop system is
normally set to at least an order lower than the triangular frequency.
CURRENT-CONTROLLED CONVERTER
DC and AC industrial drives normally employ cascade control structure. It consists of
multiple loops: with inner most loop being the fastest. Typically, the inner most
loop is the torque loop, followed by speed loop and position loop – this is shown in
Figure 12 below.
0 0 !
ω2 2
θ2
1
, , , 4 56
3
Figure 2 Fixed frequency current–controlled
For three-phase induction motor with isolated neutral, the 3-phase currents are not
/
completely independent – i.e. only two phases are independent, the third phase
current can be constructed from the other two phases. In other words, only two
Figure 1 Cascade control structure controllers are required. This problem can be eliminated if the control is performed
in d-q axis whereby only two controllers are required. Two variations have been
proposed for this technique: stationary reference frame and synchronous reference
Two main features or advantages of cascade control structure is: frame. Tracking problem will present if the current control is performed in
stationary reference frame. This will results in the actual current waveform that
will always lag the reference current. The tracking problem can be avoided if the
-
synchronous frame is used, however extra work is required to transform the current current need to be reduced and this is accomplished by turning on the lower switch of
from the stationary to the synchronous frames and vice versa. In addition, explicit that particular leg. This is illustrated in Figure 5.
knowledge of synchronous frequency is required to perform these transformations. The
reference voltage can be implemented using the well-known modulation techniques such
as Sinusoidal Pulse Width Modulation (SPWM) or Space Vector Modulation (SVM).
2
2
56
− !→ .
.2 7 1 758 1
76 61
2
!
56 2
− !
4
. → !
Figure 5 Hysteresis–based current–controlled
9: ;4
Hysteresis based controlled has large bandwidth. However, the switching frequency
varies with operating conditions and control signal. Thus the maximum switching
capability of the switching devices must be based on the worst–case condition. If the
simulation does not require detail information regarding the ripple, hysteresis-based
2
2 control can be modeled by a simple large DC gain due to its large bandwidth. The non-
56
linear behavior of the hystersis-based current control can be investigated using
− .2 large signal simulation.
! → . 7 1 758 1
76 61 As with the fixed frequency control, each phase current not only depend on the
!
2 corresponding phase voltage, but also on other phase voltages. In other words, there
56 2 is interferences between phases.
− The behavior of the hysteresis current control can be described using the complex
! plane switching diagram, as shown in Figure 6. The phase components of the current
error vector ∆i (which is the difference between reference current vector and the
actual current vector) can be obtained by resolving it to the respective phase axis.
ω If the current error of a phase touches the hysteresis band of that particular phase,
it should be switched to the other direction by toggling the switch of that
particular phase. Therefore, ideally, the current error vector should be confined
. → !
within the hexagonal defined by the hysteresis bands. However, due to the
interactions between phases, the current error may go outside the hysteresis band. As
a result, current error may become as large as twice the hysteresis band (Figure 7)
9: ; 4
Hysteresis control
The reference current is compared with the actual torque using hysteresis comparator.
The output of the hystresis comparator will determine whether the current need to be
increased or decreased. For instance, when the current touches the upper band,
&
( : 0 <0
=

%
2
:
0.2
0.15
* 7
0.1 =
0.05 < . ;
0
-0.05
-0.1
-0.15
-0.2
-0.2 -0.15 -0.1 -0.05 0 0.05 0.1 0.15 0.2
References:
N. Mohan, “Power Electronics: Converters, applications and design” John Wiley and
Sons, 1995.
N. Mohan, “Electric Drives – an integrative approach” MNPERE, 2000.
W. Leonhard, “Control of electrical drives”, Springer-Verlag, 1984.
J. M. D. Murphy and F.G. Turnbull, “Power electronic control of AC motor”,
Pergamon press, 1988.
http://encon.fke.utm.my/courses/mep1422/rl_2q_average.mdl

Model {
Name "rl_2q_average"
Version 5.0
SaveDefaultBlockParams on
SampleTimeColors off
LibraryLinkDisplay "none"
WideLines off
ShowLineDimensions off
ShowPortDataTypes off
ShowLoopsOnError on
IgnoreBidirectionalLines off
ShowStorageClass off
ExecutionOrder off
RecordCoverage off
CovPath "/"
CovSaveName "covdata"
CovMetricSettings "dw"
CovNameIncrementing off
CovHtmlReporting on
covSaveCumulativeToWorkspaceVar on
CovSaveSingleToWorkspaceVar on
CovCumulativeVarName "covCumulativeData"
CovCumulativeReport off
DataTypeOverride "UseLocalSettings"
MinMaxOverflowLogging "UseLocalSettings"
MinMaxOverflowArchiveMode "Overwrite"
BlockNameDataTip off
BlockParametersDataTip off
BlockDescriptionStringDataTip off
ToolBar on
StatusBar on
BrowserShowLibraryLinks off
BrowserLookUnderMasks off
Created "Thu Sep 11 20:51:10 2003"
UpdateHistory "UpdateHistoryNever"
ModifiedByFormat "%<Auto>"
LastModifiedBy "Nik Rumzi"
ModifiedDateFormat "%<Auto>"
LastModifiedDate "Mon Jul 19 11:38:36 2004"
ModelVersionFormat "1.%<AutoIncrement:14>"
ConfigurationManager "None"
SimParamPage "Solver"
LinearizationMsg "none"
Profile off
ParamWorkspaceSource "MATLABWorkspace"
AccelSystemTargetFile "accel.tlc"
AccelTemplateMakefile "accel_default_tmf"
AccelMakeCommand "make_rtw"
TryForcingSFcnDF off
ExtModeMexFile "ext_comm"
ExtModeBatchMode off
ExtModeTrigType "manual"
ExtModeTrigMode "normal"
ExtModeTrigPort "1"
ExtModeTrigElement "any"
ExtModeTrigDuration 1000
ExtModeTrigHoldOff 0
ExtModeTrigDelay 0
ExtModeTrigDirection "rising"
ExtModeTrigLevel 0
ExtModeArchiveMode "off"
ExtModeAutoIncOneShot off
ExtModeIncDirWhenArm off
ExtModeAddSuffixToVar off
ExtModeWriteAllDataToWs off

http://encon.fke.utm.my/courses/mep1422/rl_2q_average.mdl (1 von 10) [17.05.2005 17:11:15]


http://encon.fke.utm.my/courses/mep1422/rl_2q_average.mdl

ExtModeArmWhenConnect on
ExtModeSkipDownloadWhenConnect off
ExtModeLogAll on
ExtModeAutoUpdateStatusClock on
BufferReuse on
RTWExpressionDepthLimit 5
SimulationMode "normal"
Solver "ode5"
SolverMode "Auto"
StartTime "0.0"
StopTime "100e-3"
MaxOrder 5
MaxStep "auto"
MinStep "auto"
MaxNumMinSteps "-1"
InitialStep "auto"
FixedStep "1e-6"
RelTol "1e-3"
AbsTol "auto"
OutputOption "RefineOutputTimes"
OutputTimes "[]"
Refine "1"
LoadExternalInput off
ExternalInput "[t, u]"
LoadInitialState off
InitialState "xInitial"
SaveTime on
TimeSaveName "t"
SaveState off
StateSaveName "xout"
SaveOutput on
OutputSaveName "yout"
SaveFinalState off
FinalStateName "xFinal"
SaveFormat "Array"
Decimation "1"
LimitDataPoints off
MaxDataPoints "1000"
SignalLoggingName "sigsOut"
ConsistencyChecking "none"
ArrayBoundsChecking "none"
AlgebraicLoopMsg "warning"
BlockPriorityViolationMsg "warning"
MinStepSizeMsg "warning"
InheritedTsInSrcMsg "warning"
DiscreteInheritContinuousMsg "warning"
MultiTaskRateTransMsg "error"
SingleTaskRateTransMsg "none"
CheckForMatrixSingularity "none"
IntegerOverflowMsg "warning"
Int32ToFloatConvMsg "warning"
ParameterDowncastMsg "error"
ParameterOverflowMsg "error"
ParameterPrecisionLossMsg "warning"
UnderSpecifiedDataTypeMsg "none"
UnnecessaryDatatypeConvMsg "none"
VectorMatrixConversionMsg "none"
InvalidFcnCallConnMsg "error"
SignalLabelMismatchMsg "none"
UnconnectedInputMsg "warning"
UnconnectedOutputMsg "warning"
UnconnectedLineMsg "warning"
SfunCompatibilityCheckMsg "none"
RTWInlineParameters off
BlockReductionOpt on

http://encon.fke.utm.my/courses/mep1422/rl_2q_average.mdl (2 von 10) [17.05.2005 17:11:15]


http://encon.fke.utm.my/courses/mep1422/rl_2q_average.mdl

BooleanDataType on
ConditionallyExecuteInputs on
ParameterPooling on
OptimizeBlockIOStorage on
ZeroCross on
AssertionControl "UseLocalSettings"
ProdHWDeviceType "Microprocessor"
ProdHWWordLengths "8,16,32,32"
RTWSystemTargetFile "grt.tlc"
RTWTemplateMakefile "grt_default_tmf"
RTWMakeCommand "make_rtw"
RTWGenerateCodeOnly off
RTWRetainRTWFile off
TLCProfiler off
TLCDebug off
TLCCoverage off
TLCAssertion off
BlockDefaults {
Orientation "right"
ForegroundColor "black"
BackgroundColor "white"
DropShadow off
NamePlacement "normal"
FontName "Helvetica"
FontSize 10
FontWeight "normal"
FontAngle "normal"
ShowName on
}
BlockParameterDefaults {
Block {
BlockType Constant
Value "1"
VectorParams1D on
ShowAdditionalParam off
OutDataTypeMode "Inherit from 'Constant value'"
OutDataType "sfix(16)"
ConRadixGroup "Use specified scaling"
OutScaling "2^0"
}
Block {
BlockType Gain
Gain "1"
Multiplication "Element-wise(K.*u)"
ShowAdditionalParam off
ParameterDataTypeMode "Same as input"
ParameterDataType "sfix(16)"
ParameterScalingMode "Best Precision: Matrix-wise"
ParameterScaling "2^0"
OutDataTypeMode "Same as input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
}
Block {
BlockType Inport
Port "1"
PortDimensions "-1"
SampleTime "-1"
ShowAdditionalParam off
LatchInput off
DataType "auto"
OutDataType "sfix(16)"

http://encon.fke.utm.my/courses/mep1422/rl_2q_average.mdl (3 von 10) [17.05.2005 17:11:15]


http://encon.fke.utm.my/courses/mep1422/rl_2q_average.mdl

OutScaling "2^0"
SignalType "auto"
SamplingMode "auto"
Interpolate on
}
Block {
BlockType Outport
Port "1"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Block {
BlockType Reference
}
Block {
BlockType Relay
OnSwitchValue "eps"
OffSwitchValue "eps"
OnOutputValue "1"
OffOutputValue "0"
ShowAdditionalParam off
OutputDataTypeScalingMode "All ports same datatype"
OutDataType "sfix(16)"
OutScaling "2^0"
ConRadixGroup "Use specified scaling"
ZeroCross on
}
Block {
BlockType "S-Function"
FunctionName "system"
PortCounts "[]"
SFunctionModules "''"
}
Block {
BlockType Sin
SineType "Time based"
Amplitude "1"
Bias "0"
Frequency "1"
Phase "0"
Samples "10"
Offset "0"
SampleTime "-1"
VectorParams1D on
}
Block {
BlockType SubSystem
ShowPortLabels on
Permissions "ReadWrite"
RTWSystemCode "Auto"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
SimViewingDevice off
DataTypeOverride "UseLocalSettings"
MinMaxOverflowLogging "UseLocalSettings"
}
Block {
BlockType Sum
IconShape "rectangular"
Inputs "++"
ShowAdditionalParam off
InputSameDT on
OutDataTypeMode "Same as first input"
OutDataType "sfix(16)"
OutScaling "2^0"

http://encon.fke.utm.my/courses/mep1422/rl_2q_average.mdl (4 von 10) [17.05.2005 17:11:15]


http://encon.fke.utm.my/courses/mep1422/rl_2q_average.mdl

LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
}
Block {
BlockType ToWorkspace
VariableName "simulink_output"
MaxDataPoints "1000"
Decimation "1"
SampleTime "0"
}
Block {
BlockType TransferFcn
Numerator "[1]"
Denominator "[1 2 1]"
AbsoluteTolerance "auto"
Realization "auto"
}
}
AnnotationDefaults {
HorizontalAlignment "center"
VerticalAlignment "middle"
ForegroundColor "black"
BackgroundColor "white"
DropShadow off
FontName "Helvetica"
FontSize 10
FontWeight "normal"
FontAngle "normal"
}
LineDefaults {
FontName "Helvetica"
FontSize 9
FontWeight "normal"
FontAngle "normal"
}
System {
Name "rl_2q_average"
Location [2, 78, 1022, 701]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 212
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "115"
ReportName "simulink-default.rpt"
Block {
BlockType Constant
Name "Constant"
Position [315, 390, 345, 420]
Value "100"
}
Block {
BlockType Reference
Name "Dot Product"
Ports [2, 1]
Position [610, 431, 640, 464]
SourceBlock "simulink/Math\nOperations/Dot Product"
SourceType "Dot Product"
}
Block {
BlockType Gain

http://encon.fke.utm.my/courses/mep1422/rl_2q_average.mdl (5 von 10) [17.05.2005 17:11:15]


http://encon.fke.utm.my/courses/mep1422/rl_2q_average.mdl

Name "Gain1"
Position [480, 95, 510, 125]
Gain "200"
}
Block {
BlockType Gain
Name "Gain3"
Position [255, 320, 285, 350]
Gain "200/30"
}
Block {
BlockType Relay
Name "Relay"
Position [340, 95, 370, 125]
OnSwitchValue "0"
OffSwitchValue "0"
}
Block {
BlockType Sin
Name "Sine Wave"
Position [115, 55, 145, 85]
SineType "Time based"
Amplitude "2"
Frequency "1000"
SampleTime "0"
}
Block {
BlockType SubSystem
Name "Subsystem"
Ports [0, 1]
Position [110, 130, 150, 190]
TreatAsAtomicUnit off
MaskPromptString "frekuensi|V peak"
MaskStyleString "edit,edit"
MaskTunableValueString "on,on"
MaskCallbackString "|"
MaskEnableString "on,on"
MaskVisibilityString "on,on"
MaskToolTipString "on,on"
MaskVarAliasString ","
MaskVariables "f=@1;v1=@2;"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "5000|15"
System {
Name "Subsystem"
Location [553, 276, 688, 358]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Reference
Name "Repeating\nSequence"
Ports [0, 1]
Position [25, 25, 55, 55]
SourceBlock "simulink/Sources/Repeating\nSequence"
SourceType "Repeating table"

http://encon.fke.utm.my/courses/mep1422/rl_2q_average.mdl (6 von 10) [17.05.2005 17:11:15]


http://encon.fke.utm.my/courses/mep1422/rl_2q_average.mdl

rep_seq_t "[0 1/(2*f) 1/f]"


rep_seq_y "[-v1 v1 -v1]"
}
Block {
BlockType Outport
Name "Out1"
Position [80, 33, 110, 47]
}
Line {
SrcBlock "Repeating\nSequence"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
}
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [205, 100, 225, 120]
ShowName off
IconShape "round"
Inputs "+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1]
Position [350, 325, 370, 345]
ShowName off
IconShape "round"
Inputs "|++"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
}
Block {
BlockType ToWorkspace
Name "To Workspace1"
Position [485, 240, 545, 270]
VariableName "vave"
MaxDataPoints "inf"
SampleTime "-1"
SaveFormat "Array"
}
Block {
BlockType ToWorkspace
Name "To Workspace2"
Position [255, 20, 315, 50]
VariableName "vc"
MaxDataPoints "inf"
SampleTime "-1"
SaveFormat "Array"
}
Block {
BlockType ToWorkspace
Name "To Workspace3"
Position [660, 100, 720, 130]
VariableName "vau"
MaxDataPoints "inf"
SampleTime "-1"
SaveFormat "Array"
}

http://encon.fke.utm.my/courses/mep1422/rl_2q_average.mdl (7 von 10) [17.05.2005 17:11:15]


http://encon.fke.utm.my/courses/mep1422/rl_2q_average.mdl

Block {
BlockType ToWorkspace
Name "To Workspace4"
Position [925, 160, 985, 190]
VariableName "iau"
MaxDataPoints "inf"
SampleTime "-1"
SaveFormat "Array"
}
Block {
BlockType ToWorkspace
Name "To Workspace5"
Position [665, 320, 725, 350]
VariableName "iave"
MaxDataPoints "inf"
SampleTime "-1"
SaveFormat "Array"
}
Block {
BlockType ToWorkspace
Name "To Workspace8"
Position [715, 435, 775, 465]
VariableName "iD"
MaxDataPoints "inf"
SampleTime "-1"
SaveFormat "Array"
}
Block {
BlockType TransferFcn
Name "Transfer Fcn"
Position [785, 157, 845, 193]
Denominator "[0.01 10]"
}
Block {
BlockType TransferFcn
Name "Transfer Fcn1"
Position [500, 317, 560, 353]
Denominator "[0.01 10]"
}
Line {
SrcBlock "Sine Wave"
SrcPort 1
Points [25, 0]
Branch {
Points [5, 0]
Branch {
Points [0, -35]
DstBlock "To Workspace2"
DstPort 1
}
Branch {
Points [35, 0]
DstBlock "Sum"
DstPort 1
}
}
Branch {
Points [0, 265]
DstBlock "Gain3"
DstPort 1
}
}
Line {
SrcBlock "Subsystem"
SrcPort 1

http://encon.fke.utm.my/courses/mep1422/rl_2q_average.mdl (8 von 10) [17.05.2005 17:11:15]


http://encon.fke.utm.my/courses/mep1422/rl_2q_average.mdl

Points [60, 0]
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Relay"
DstPort 1
}
Line {
SrcBlock "Relay"
SrcPort 1
Points [65, 0]
Branch {
DstBlock "Gain1"
DstPort 1
}
Branch {
Points [0, 345]
DstBlock "Dot Product"
DstPort 2
}
}
Line {
SrcBlock "Gain1"
SrcPort 1
Points [20, 0; 0, 45; 80, 0; 0, 20; 30, 0]
Branch {
DstBlock "Transfer Fcn"
DstPort 1
}
Branch {
DstBlock "To Workspace3"
DstPort 1
}
}
Line {
SrcBlock "Transfer Fcn"
SrcPort 1
DstBlock "To Workspace4"
DstPort 1
}
Line {
SrcBlock "Transfer Fcn1"
SrcPort 1
Points [30, 0]
Branch {
DstBlock "To Workspace5"
DstPort 1
}
Branch {
DstBlock "Dot Product"
DstPort 1
}
}
Line {
SrcBlock "Dot Product"
SrcPort 1
DstBlock "To Workspace8"
DstPort 1
}
Line {
SrcBlock "Gain3"
SrcPort 1

http://encon.fke.utm.my/courses/mep1422/rl_2q_average.mdl (9 von 10) [17.05.2005 17:11:15]


http://encon.fke.utm.my/courses/mep1422/rl_2q_average.mdl

DstBlock "Sum1"
DstPort 1
}
Line {
SrcBlock "Sum1"
SrcPort 1
Points [20, 0]
Branch {
DstBlock "Transfer Fcn1"
DstPort 1
}
Branch {
Points [0, -80]
DstBlock "To Workspace1"
DstPort 1
}
}
Line {
SrcBlock "Constant"
SrcPort 1
Points [10, 0]
DstBlock "Sum1"
DstPort 2
}
Annotation {
Name "2-quadrant with iD"
Position [736, 44]
FontName "Arial"
FontSize 20
FontWeight "bold"
}
Annotation {
Name "qA"
Position [399, 99]
}
}
}

http://encon.fke.utm.my/courses/mep1422/rl_2q_average.mdl (10 von 10) [17.05.2005 17:11:15]


!
"

!
# $

!
% &!

!
' ( ( ' )
*

% + #
"

' "'
'
, -
'

' "'
$" $

' −'
= *+
.

'

' , ' */

0 $" $

=
'
.
( − /
) *1

2 $" $ ,(3

0 , / "+ *
2 $" $ , ( 43 %
/ ,
2

=
'
/.
(( 3 − ( 3 ) = ' 5.
/
*6

"# "
' "'
#
"

' '
'

, - '

'

$" $

' −'
= *3
.

'

' , */ "+ ' *7

0 $" $
/'
= − /
*4
.

# 2 ,(3

(3 2 $" $ %

, 2

=
/'
.
(( 3 − ( 3 ) = ' /.
/
*5

8 *6 *5 2
SPACE VECTOR MODULATION

In contrast to Sinusoidal Pulse Width Modulation (SPWM), which treats the 3-phase quantities
separately, in SVM, the 3-phase quantities are treated using single equation known as space vector.
Therefore in terms of microprocessor or digital implementation, SVM gives less computational
burden. The space vector of a 3-phase voltage is defined as:
2π 4π
2 j j
vs = va (t) + v b (t)e 3 + vc (t)e 3 ,
3
where va, vb and vc are the phase voltages.

In 3-phase VSI, there are 8 possible switch configurations, hence there are eight possible voltage
vectors that can be generated or obtained from the VSI. SVM utilized these 8 voltage vectors to
synthesize the reference voltage.

Vd AC
Motor

Figure 1 Space vector


modulator applied to AC
motor drive
vd *
Space vector
modulator
vq *

Given a location of the reference voltage in any of the sectors, the actual voltage can be synthesized,
within a sampling period, by selecting the two adjacent voltage vectors and zero voltage vectors. For
example, if the reference voltage is located in sector 1, voltage vectors v1, v2, v0 and v7 should be
selected. This is illustrated in Figure 2
q
Figure 2 Voltage
vectors of a 3-phase
Sector 2 VSI
[010] [110]
(1/√3)Vd
Sector 3 Sector 1

v *s

[100] d
[011]
(2/3)Vd

Sector 4
Sector 6

[001] [101]
Sector 5

sector 6 sector 1 sector 2 sector 3 sector 4 sector 5

100 a b c

50
Figure 3 Sinusoidal
reference voltage
0

-50

-100

0 0.005 0.01 0.015 0.02 0.025 0.03

000 010 110 111 110 010 000

Phase a
Figure 4 Example of
modulated waveform in
sector 2
Phase b

Phase c T0 T1 T2 T7

T T
The interval for each voltage vector, as shown in Figure 4, is determined by equating volt-second
integral of vs with the sum of all voltage vectors within a cycle. Thus, for example in sector 1,

v s ⋅ T = v o ⋅ To + v1 ⋅ T1 + v 2 ⋅ T2 + v 7 ⋅ T7
2
Note that v1 and v2 equal Vd . Thus in terms of d-q components this can be written as:
3

2 2
v s ⋅ T = To ⋅ 0 + Vd ⋅ T1 + Vd ⋅ T2 (cos 60 o + j sin 60 o ) + T7 ⋅ 0
3 3

Also, we need to satisfy the time constraint: T= T0 + T1 + T2 + T7

If we let T0 = T7, we can calculate all the required time intervals. If the angle between the reference
voltage and the adjacent vector (to the right of the reference voltage) equals α, it can be shown that
for any sector, the time intervals T1 and T2 are given by:

3 1
T1 = T ⋅ vs ⋅ cos α − sin α
2 3

T2 = 3 ⋅ T ⋅ vs sin α

In the above equation, vs is the normalized reference vector. The interval for the zero voltage vector is
given by: T0 + T7 = T – (T1 +T2). The ratio between T0 and T7 essentially control the amount of
triplen harmonic components in the fundamental phase voltage.

Further readings:
PG Handley and JT Boys, “Practical real-time PWM modulators: an assessment” IEE Proceedings-B,
Vol 139, No. 2 March 1992

W. Leonhard, “Control of electrical drives”, Springer-Verlag, 1984.


DC DRIVES

Prin c iple o f o pe rat io n an d c o n s t ru c t io n – a re v ie w

DC m a ch in e con s is t s of

s t a t or – s t a t ion a r y – wh er e t h e field flu x is p r od u ced


r ot or – r ot a t in g – wh er e t h e a r m a t u r e win d in g is p la ced .

Field flu x is ob t a in ed eit h er fr om p er m a n en t m a gn et or fr om field win d in g excit a t ion . Field flu x


in t er a ct s wit h cu r r en t ca r r yin g con d u ct or s in a r m a t u r e t o p r od u ce t or qu e. Com m u t a t or in
a r m a t u r e cir cu it will en s u r e t h a t t h e t or qu e p r od u ct ion is a lwa ys m a xim u m , r ega r d les s of r ot or
p os it ion .

Mo de lin g o f DC m o t o r

Th e t or qu e is p r od u ced a s a r es u lt of in t er a ct ion of field flu x wit h cu r r en t in a r m a t u r e


con d u ct or s a n d is given b y

Te = k t Φ i a (1 )

wh er e k t is a con s t a n t d ep en d in g on m ot or win d in gs a n d geom et r y


Φ is t h e flu x p er p ole d u e t o t h e field win d in g

For t h e m ot or wit h wou n d field , t h e flu x ca n b e va r ied t o con t r ol t h e s p eed , b u t for p er m a n en t


m a gn et m ot or , t h e flu x is fixed a n d t h u s ca n b e wr it t en a s :

T e = Kt i a

wh er e Kt d ep en d s on t h e p er m a n en t m a gn et m a t er ia l
Th e d ir ect ion of t h e t or qu e p r od u ced d ep en d s on t h e d ir ect ion of t h e a r m a t u r e cu r r en t
Wh en t h e a r m a t u r e r ot a t es , t h e flu x lin k in g t h e a r m a t u r e win d in g will va r y wit h t im e a n d
t h er efor e a ccor d in g t o Fa r a d a y’s la w, a n em f will b e in d u ced a cr os s t h e win d in g. Th is gen er a t ed
em f, k n own a s t h e b a ck em f, d ep en d s on s p eed of r ot a t ion a s well a s on t h e flu x p r od u ced b y
t h e field a n d is given b y:

ea = k t Φ ω (2 )

S im ila r ly, for p er m a n en t m a gn et , t h is ca n b e wr it t en a s :

1
e a = Kt ω

Th e p ola r it y of t h e b a ck em f d ep en d s on t h e d ir ect ion of t h e m ot or r ot a t ion

For s ep a r a t ely excit ed DC m ot or , t h e a r m a t u r e cir cu it is s h own :

Ra La

+ +

vt ea

− −

R a – lu m p ed a r m a t u r e win d in g r es is t a n ce
La – s elf in d u ct a n ce of t h e a r m a t u r e win d in g
e a – a s d efin ed b efor e, is t h e b a ck em f of t h e m ot or

Us in g KVL,
di a (3 )
v t = ia R a + La + ea
dt
In s t ea d y s t a t e con d it ion ,

Vt = I a R a + E a (4 )

In t er m s of t or qu e a n d s p eed t h e s t ea d y s t a t e equ a t ion ca n b e wr it t en a s :

T (5 )
Vt = R a + k t Φω
k tΦ

wh ich gives :
Vt T
ω= − Ra (6 )
k t Φ (k t Φ )2

Th u s t h r ee m et h od s ca n b e u s ed t o con t r ol t h e s p eed : Vt , Φ a n d R a

S p eed con t r ol u s in g a r m a t u r e r es is t a n ce b y a d d in g ext er n a l r es is t or R ext is s eld om u s ed ,


es p ecia lly for la r ge m ot or d u e t o t h e los s es a s s ocia t ed wit h Ia 2 R ext . Vt is n or m a lly con t r ol for
s p eed u p t o r a t ed s p eed . Beyon d r a t ed s p eed , for s ep a r a t ely excit ed DC m ot or , t h e s p eed con t r ol
is a ch ieved b y flu x con t r ol, Φ. Wh en s p eed con t r ol b y flu x con t r ol is u s ed , t h e m a xim u m t or qu e
ca p a b ilit y of t h e m ot or is r ed u ced s in ce for a given m a xim u m a r m a t u r e cu r r en t , t h e flu x is les s
t h a n t h e r a t ed va lu e a n d t h u s t h e m a xim u m t or qu e p r od u ced is les s t h a n t h e m a xu m u m
t or qu e. Als o it s h ou ld b e n ot ed t h a t , wit h p er m a n en t m a gn et excit a t ion , s p eed con t r ol u s in g
flu x wea k en in g is n ot p os s ib le – t h u s m a xim u m s p eed of p er m a n en t m a gn et m ot or is lim it ed .

Wh en d es ign in g con t r oller s for DC m ot or d r ives u s ed in s er vo or h igh p er for m a n ce a p p lica t ion s ,


a s m a ll s ign a l m od el of t h e m ot or is r equ ir ed . A s ep a r a t ely excit ed DC m ot or wit h fixed field
excit a t ion , or a p er m a n en t m a gn et DC m ot or , is d es cr ib ed b y equ a t ion s (3 ), (1 ) a n d (2 ). If a s m a ll
p er t u r b a t ion a r ou n d a DC op er a t in g p oin t is in t r od u ced , t h es e equ a t ion s ca n b e wr it t en a s (7 )-
(9 ). Th e ‘~’ in d ica t es a s m a ll p er t u r b a t ion , wh ich is a d d t o t h e DC com p on en t s of v t , ia , e a , Te , TL
and ω :
2
Vt + ~
~
v t = ( I a + ia ) R a + L a
( ~
d I a + ia )
+ ( E a + ~ea ) (7 )
dt

~
Te + Te = k E ( I a + i a )
(8 )

E e + ~ee = k E (ω + ω
~)
(9 )

E qu a t ion d es cr ib in g t h e d yn a m ic of t h e m ech a n ica l s ys t em is given b y:


dω m (1 0 )
Te = Tl + J
dt
wh er e Tl = TL + B ω

Tl is t h e loa d t or qu e com p os ed of wor k in g t or qu e of t h e loa d , TL a n d t or qu e d u e t o fr ict ion , B ω.


Th e fr ict ion a l t or qu e d ep en d s on t h e r ot a t ion a l s p eed , wh ile TL d ep en d s on t h e n a t u r e of t h e
loa d b ein g d r iven . S im ila r ly, if a s m a ll p er t u r b a t ion is in t r od u ced in Te a n d TL a n d ω, equ a t ion
(1 0 ) ca n b e wr it t en a s :
~
~ ~
Te + Te = T L + T L + B ( ω + ω ~ ) + J d ( ω + ω)
dt (1 1 )

S ep a r a t in g t h e DC a n d s m a ll p er t u r b a t ion or AC com p on en t s in (7 )–(9 ) a n d (1 1 ), t h e s t ea d y s t a t e


a n d s m a ll s ign a l equ a t ion s d es cr ib in g t h e DC m ot or ca n b e ob t a in ed :

AC com p on en t s DC com p on en t s
~
~v = ~i R + L d ia + ~e Vt = I a R a + E a
t a a a a
dt

~ ~ Te = k E I a
Te = k E ( ia )

~e = k (ω
~) Ee = k Eω
e E

~
~ ~ ~ + J d ( ω)
Te = TL + B ω Te = TL + B( ω)
dt

Th e t r a n s fer fu n ct ion of t h e DC m ot or is ob t a in ed b y t a k in g t h e La p la ce t r a n s for m of t h e s m a ll


s ign a l equ a t ion s .

Vt (s ) = Ia (s )R a + La s Ia + E a (s ) (1 2 )

Te (s ) = k E Ia (s ) (1 3 )

E a (s ) = k E ω(s ) (1 4 )

Te (s ) = TL(s ) + B ω(s ) + s J ω(s ) (1 5 )

3
Th u s t h e b lock d ia gr a m r ep r es en t in g t h e DC m ot or is s h own :

Tl (s )
I a (s ) -
Va (s ) 1 Te (s ) 1 ω(s )
kT
+ Ra + sLa + B + sJ
-

kE

Po we r e le c t ro n ic c o n v e rt e rs in DC driv e s

Th e p ower elect r on ic con ver t er s a r e u s ed t o ob t a in a n a d ju s t a b le DC volt a ge a p p lied t o t h e


a r m a t u r e of a DC m ot or . Th er e a r e b a s ica lly t wo t yp es of con ver t er n or m a lly em p loyed in DC
d r ives : (i) con t r olled r ect ifier (ii) s wit ch –m od e con ver t er .

(i) Con t r olled r ect ifier


Con t r olled r ect ifier ca n b e op er a t ed fr om a s in gle p h a s e or t h r ee p h a s e in p u t
Ou t p u t volt a ge con t a in low fr equ en cy r ip p le wh ich m a y r equ ir e a la r ge in d u ct or in s er t ed in
a r m a t u r e cir cu it , in or d er t o r ed u ce t h e a r m a t u r e cu r r en t r ip p le. A la r ge a r m a t u r e cu r r en t r ip p le
is u n d es ir a b le s in ce it m a y b e r eflect ed in s p eed r es p on s e if t h e in er t ia of t h e m ot or –loa d is n ot
la r ge en ou gh . Con t r olled r ect ifier h a s low b a n d wid t h . Th e a ver a ge ou t p u t volt a ge r es p on s e t o a
con t r ol s ign a l, wh ich is t h e d ela y a n gle, is r ela t ively s low. Th er efor e con t r olled r ect ifier is n ot
s u it a b le for d r ives r equ ir in g fa s t r es p on s e, e.g. in s er vo a p p lica t ion s .
In t er m s of qu a d r a n t of op er a t ion s , a s in gle p h a s e or a t h r ee p h a s e r ect ifier is on ly ca p a b le of
op er a t in g in fir s t a n d fou r t h qu a d r a n t s – wh ich is n ot s u it a b le for d r ives r equ ir in g for wa r d
b r ea k in g m od e. To b e a b le t o op er a t e in a ll fou r qu a d r a n t s , con figu r a t ion s u s in g b a ck t o b a ck
r ect ifier s or con t a ct or s s h own b elow m u s t b e em p loyed .

Con ver t er A Con ver t er B


ω
+
3-phase 3-phase
supply supply Converter Converter
Va
B A
- T
Converter Converter
B A

4
ω

F1 R1
3 –p h a s e R1 and R2 F1 and F2
s u p p ly are closed are closed
T
+ Va - R1 and R2 F1 and F2
R2 F2 are closed are closed
≡ Con ta ctor

(ii) S wit ch –m od e con ver t er


S wit ch –m od e con ver t er s n or m a lly op er a t e a t h igh fr equ en cy. As a r es u lt of t h is , (i) t h e a ver a ge
ou t p u t volt a ge r es p on s e is s ign ifica n t ly fa s t er t h a n t h e con t r olled r ect ifier , in ot h er wor d s t h e
b a n d wid t h of a s wit ch –m od e r ect ifier is h igh er com p a r ed t o t h e con t r olled r ect ifier , a n d (ii) t h e
a r m a t u r e cu r r en t r ip p le is r ela t ively les s t h a n t h e con t r olled r ect ifier cir cu it wh en t h e s a m e
a m ou n t of in d u ct a n ce p r es en t in t h e a r m a t u r e cir cu it . Th e s wit ch -m od e con ver t er is t h er efor e
s u it a b le for a p p lica t ion s r equ ir in g p os it ion con t r ol or fa s t r es p on s e, for exa m p le in s er vo
a p p lica t ion s , r ob ot ics , et c. In t er m s of qu a d r a n t of op er a t ion s , 3 p os s ib le con figu r a t ion s a r e
p os s ib le: s in gle qu a d r a n t , t wo–qu a d r a n t a n d fou r –qu a d r a n t con ver t er s – t h es e a r e s h own b elow.

ω ω

Q2 Q1 Q2 Q1
+ T + Q3 Q4 T
va Q3 Q4
va
– –

Single-quadrant
Two-quadrant

+ va – Q1
Q2
Q3 Q4 T

Four-quadrant

Reference:
N. Mohan, “Electric Drives: An integrative approach”, University of Minnesota Printing services, 2000.
N. Mohan, “Power Electronics: Converters, applications and design” John Wiley and Sons, 1995.

5
DC MOTOR DRIVES
(MEP 1422)

Dr. Nik Rumzi Nik Idris


Department of Energy Conversion
FKE, UTM
Contents
• Introduction
– Trends in DC drives
– DC motors
• Modeling of Converters and DC motor
– Phase-controlled Rectifier
– DC-DC converter (Switch-mode)
– Modeling of DC motor
• Closed-loop speed control
– Cascade Control Structure
– Closed-loop speed control - an example
• Torque loop
• Speed loop
• Summary
INTRODUCTION
• DC DRIVES: Electric drives that use DC motors
as the prime movers
• DC motor: industry workhorse for decades
• Dominates variable speed applications before
PE converters were introduced

• Will AC drive replaces DC drive ?


– Predicted 30 years ago
– DC strong presence – easy control – huge numbers
– AC will eventually replace DC – at a slow rate
Introduction

DC Motors

• Advantage: Precise torque and speed control


without sophisticated electronics

• Several limitations:
• Regular Maintenance • Expensive
• Heavy • Speed limitations
• Sparking
Introduction

DC Motors
Rotor: armature
windings
Stator: field
windings

•Mechanical commutator Current in


•Large machine employs compensation windings Current out
Introduction
Ra La Lf Rf

ia +
+ if +

Vt ea Vf

_ _ _

di di f
v t = R a ia + L a + ea v f = R f if + L
dt dt

Te = k t φi a Electric torque

e a = k E φω Armature back e.m.f.


Introduction

Armature circuit:
di a
Vt = R a i a + L + ea
dt

In steady state,
Vt = R a Ia + E a

Therefore speed is given by,

Vt R T
ω= − a e2
k T φ (k T φ)

Three possible methods of speed control:

Field flux
Armature voltage Vt
Armature resistance Ra
Introduction
Armature voltage control : retain maximum torque capability
Field flux control (i.e. flux reduced) : reduce maximum torque capability
For wide range of speed control
0 to ωbase → armature voltage, above ωbase → field flux reduction

Armature voltage control


Field flux control
Te

Maximum
Torque capability

ωbase ω
MODELING OF CONVERTERS
AND DC MOTOR

POWER ELECTRONICS CONVERTERS

Used to obtain variable armature voltage

• Efficient
Ideal : lossless

• Phase-controlled rectifiers (AC → DC)

• DC-DC switch-mode converters(DC → DC)


Modeling of Converters and DC motor

Phase-controlled rectifier (AC–DC)

ia
ω
+
3-phase Q1
Vt Q2
supply
Q3 Q4 T

Modeling of Converters and DC motor

Phase-controlled rectifier

+
3-
phase 3-phase
Vt supply
supply

Q2 Q1

Q3 Q4
T
Modeling of Converters and DC motor

Phase-controlled rectifier

F1 R1

3-phase
supply
+ Va -
R2 F2

Q2 Q1

Q3 Q4
T
Modeling of Converters and DC motor

Phase-controlled rectifier (continuous current)


• Firing circuit –firing angle control
→ Establish relation between vc and Vt

+
iref + current vc firing α controlled
- controller circuit rectifier Vt


Modeling of Converters and DC motor

Phase-controlled rectifier (continuous current)


• Firing angle control linear firing angle control

vt v vc
= c α= 180
180 α vt

Vm v 
Va = cos c 180 
π  vt 

Cosine-wave crossing control

v c = v s cos α

Vm v c
Va =
π vs
Modeling of Converters and DC motor

Phase-controlled rectifier (continuous current)


•Steady state: linear gain amplifier
•Cosine wave–crossing method
•Transient: sampler with zero order hold

converter

T
GH(s)

T – 10 ms for 1-phase 50 Hz system


– 3.33 ms for 3-phase 50 Hz system
Modeling of Converters and DC motor

Phase-controlled rectifier (continuous current)


400

200

0
Output
-200 voltage
-400
0.3 0.31 0.32 0.33 0.34 0.35 0.36
Control
Td signal
10

5
Cosine-wave
0 crossing
-5

-10
0.3 0.31 0.32 0.33 0.34 0.35 0.36

Td – Delay in average output voltage generation


0 – 10 ms for 50 Hz single phase system
Modeling of Converters and DC motor

Phase-controlled rectifier (continuous current)

• Model simplified to linear gain if bandwidth


(e.g. current loop) much lower than sampling
frequency
⇒ Low bandwidth – limited applications

• Low frequency voltage ripple → high current


ripple → undesirable
Modeling of Converters and DC motor

Switch–mode converters

T1 ω

+ Q2 Q1
Vt Q3 Q4 T
-
Modeling of Converters and DC motor

Switch–mode converters

T1 Q1
Q2
D1
Q3 Q4 T
+
T2 Vt
D2 - Q1 → T1 and D2

Q2 → D1 and T2
Modeling of Converters and DC motor

Switch–mode converters

D1 D3 Q1
T1 T3 Q2
+ Vt -
Q3 Q4 T

T4 D2 T2
D4
Modeling of Converters and DC motor

Switch–mode converters

• Switching at high frequency


→ Reduces current ripple
→ Increases control bandwidth

• Suitable for high performance applications


Modeling of Converters and DC motor

Switch–mode converters - modeling

+
Vdc
Vdc

vtri

q
vc
1 when vc > vtri, upper switch ON
q=
0 when vc < vtri, lower switch ON
Modeling of Converters and DC motor
Switch–mode converters – averaged model

Ttri

vc

q
1 t + Ttri t on
d d=
Ttri ∫ t
qdt =
Ttri

1 dTtri
Vdc
Vt Vt =
Ttri ∫ 0
Vdc dt = dVdc
Modeling of Converters and DC motor
Switch–mode converters – averaged model
d
1
0.5
0 vc
-Vtri,p Vtri,p

vc
d = 0.5 +
2Vtri,p

Vdc
Vt = 0.5Vdc + vc
2Vtri,p
Modeling of Converters and DC motor

DC motor – small signal model


di a dωm
v t = ia R a + L a + ea Te = Tl + J
dt dt
Te = kt ia ee = k t ω

Extract the dc and ac components by introducing small


perturbations in Vt, ia, ea, Te, TL and ωm
ac components dc components
~
~ d i
v t = ia R a + L a a + ~
~ ea Vt = Ia R a + E a
dt
~ ~
Te = k E ( ia ) Te = k E Ia
~ ~)
e e = k E (ω Ee = k E ω

~ ~ ~)
d (ω
~
Te = TL + B ω + J Te = TL + B(ω)
dt
Modeling of Converters and DC motor

DC motor – small signal model


Perform Laplace Transformation on ac components
~
~ d i
v t = ia R a + L a a + ~
~ ea Vt(s) = Ia(s)Ra + LasIa + Ea(s)
dt

~ ~ Te(s) = kEIa(s)
Te = k E ( ia )

~ ~)
e e = k E (ω Ea(s) = kEω(s)

~ ~ ~)
d (ω
~
Te = TL + B ω + J Te(s) = TL(s) + Bω(s) + sJω(s)
dt
Modeling of Converters and DC motor

DC motor – small signal model

Tl (s )
-
Va (s ) I a (s ) Te (s ) ω (s )
1 1
kT
+ Ra + sL a +
B + sJ
-

kE
CLOSED-LOOP SPEED CONTROL

Cascade control structure


position speed torque converter
controller controller controller
θ* + ω* + T* +
Motor
- - -

tacho
kT

1/s

• The control variable of inner loop (e.g. torque) can be


limited by limiting its reference value
• It is flexible – outer loop can be readily added or removed
depending on the control requirements
CLOSED-LOOP SPEED CONTROL

Design procedure in cascade control structure

• Inner loop (current or torque loop) the fastest –


largest bandwidth

• The outer most loop (position loop) the slowest –


smallest bandwidth

• Design starts from torque loop proceed towards


outer loops
CLOSED-LOOP SPEED CONTROL

Closed-loop speed control – an example


OBJECTIVES:
• Fast response – large bandwidth
• Minimum overshoot
good phase margin (>65o) BODE PLOTS
• Zero steady state error – very large DC gain

METHOD
• Obtain linear small signal model

• Design controllers based on linear small signal model

• Perform large signal simulation for controllers verification


CLOSED-LOOP SPEED CONTROL

Closed-loop speed control – an example

Permanent magnet motor’s parameters

Ra = 2 Ω La = 5.2 mH

B = 1 x10–4 kg.m2/sec J = 152 x 10–6 kg.m2

ke = 0.1 V/(rad/s) kt = 0.1 Nm/A

Vd = 60 V Vtri = 5 V

fs = 33 kHz

• PI controllers • Switching signals from


comparison of vc and triangular
waveform
CLOSED-LOOP SPEED CONTROL

Torque controller design q


vtri

Torque +
controller
Tc +
Vdc

q kt

DC motor
Tl (s )
Converter
T e (s ) Torque V dc Va (s ) 1 Ia (s ) Te (s ) -
1 ω (s )
kT
+ controller + Ra + sL a + B + sJ
V tri ,peak
- -

kE
CLOSED-LOOP SPEED CONTROL

Torque controller design


Open-loop gain
Bode Dia gram
From: Input Point To: Output Point
150

100 kpT= 90
Magnitude (dB)

compensated
50
kiT= 18000
0

-50
90

45
Pha s e (deg)

compensated
-45

-90
-2 -1 0 1 2 3 4 5
10 10 10 10 10 10 10 10
Frequency (rad/s ec )
CLOSED-LOOP SPEED CONTROL

Speed controller design

Assume torque loop unity gain for speed bandwidth << Torque bandwidth

ω* + Speed T* T
1 1 ω
controller
– B + sJ

Torque loop
CLOSED-LOOP SPEED CONTROL

Speed controller
Open-loop gain Bode Diagra m
From: Input Point To: Output Point
150

100
kps= 0.2
Ma gnitude (dB)

50
compensated
kis= 0.14
0

-50
0

-45
Phas e (deg)

-90

-135 compensated

-180
-2 -1 0 1 2 3 4
10 10 10 10 10 10 10
Frequenc y (Hz )
CLOSED-LOOP SPEED CONTROL

Large Signal Simulation results

40

20

Speed 0

-20

-40
0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45

Torque 0

-1

-2
0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45
CLOSED-LOOP SPEED CONTROL – DESIGN EXAMPLE

SUMMARY
Speed control by: armature voltage (0 →ωb) and field flux (ωb↑)

Power electronics converters – to obtain variable armature voltage

Phase controlled rectifier – small bandwidth – large ripple

Switch-mode DC-DC converter – large bandwidth – small ripple

Controller design based on linear small signal model


Power converters - averaged model
DC motor – separately excited or permanent magnet

Closed-loop speed control design based on Bode plots

Verify with large signal simulation


! "#$ %! &'(
(
(

) * +*,-( % .
/ ( , 0 *
$ %! &' / , ( / (, 1 2,
1 23(

PID PID 0.2 60


Input PointPID Controller speed
Step PID Controller1 1/Vt Vd Va
T

Tl Output Point
Ia

Step1 Subsystem

Bode Diagram
From: Input Point To: Output Point
20

10

0
Magnitude (dB)

-10

-20

-30

-40
90

45
Phase (deg)

-45

-90
-3 -2 -1 0 1 2 3
10 10 10 10 10 10 10
Frequency (Hz)

Pole-Zero Map
1

0.8

0.6

0.4

0.2
Imaginary Axis

-0.2

-0.4

-0.6

-0.8

-1
-350 -300 -250 -200 -150 -100 -50 0
Real Axis

/ (, 4 ( $ %! &'
1 . 0 " 0 .
5(5 16.(
7 55 16.( / #.
/ (, 0 58 # 59+ #( .
-33 #0 1 #1 2 -33 #( 1 0 1 2 -33
/ (- & 1 *. 0 (

Bode Diagram
From: Input Point To: Output Point
20

10

0
Magnitude (dB)

-10

-20

-30

-40
90

45

0
Phase (deg)

-45

-90

-135

-180
-3 -2 -1 0 1 2 3 4
10 10 10 10 10 10 10 10
Frequency (Hz)

/ (- 4 1 2 -33 1 2,

/ / (- 7 (
0 1 ( 0.
-33 # 1( / 1 :30 "
/ ( 5( 7 5(516. (

Bode Diagram
From: Input Point To: Output Point
100

80

60
Magnitude (dB)

40

20

-20
90

45

0
Phase (deg)

-45

-90

-135

-180
-3 -2 -1 0 1 2 3 4
10 10 10 10 10 10 10 10
Frequency (Hz)

/ (5 7 1 :3 7 (

7
0( ( 533 6.( " 0 7
0 ( % ; 0
"
<( $ 1 1 / (9 (/ (9
" ( /
7 7 0
(

PID PID 0.2 60

speed controller current controller 1/Vt Vd speed


Va
T
In1 Out1
Tl Ia

Step1 Subsystem 1/(sJ +B)1

PID 1 In1 Out1

speed_controller torque-loop
1/(sJ +B)

Bode Diagram
From: Input Point To: Output Point
200

150

) 100
B
d(
e 50
d 7
uti
n
g 0
a
M
-50

-100
0

-45
)
g
e
d( -90
e
s
a
h -135
P

-180
-3 -2 -1 0 1 2 3 4 5
10 10 10 10 10 10 10 10 10
Frequency (Hz)

/ (9 $ ( 7 ; 0 "
; 7

3(8 #( . 7 0
= 7 -33 6.( "
/ (>(
. (
Bode Diagram
From: Input Point To: Output Point
150

100

Magnitude (dB)
50

-50
0

-45
Phase (deg)

-90

-135
-2 -1 0 1 2 3 4
10 10 10 10 10 10 10
Frequency (Hz)

/ (>
. ?

1 1
7 ? :3 ,+333
$ ? 3(- 3(,9

( $ %! &' 1
/ (@ ( %
( 7 > 6. 7
,(> & ( 7 / (@ (

vtri

To Workspace2

torque
PID PID
T o Workspace1
Signal PID Controller1 Saturation1 PID Controller Rel ay speed speed
Va
Generator
T T o Workspace
Tl
Ia
Out1
Subsystem
Subsystem1

-1 Step1

Gain Relay1

vc

T o Workspace3

vc_m

T o Workspace4

40

20

-20

-40
0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45

-1

-2
0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45

/ (@ ! $ 1 1 $
7
!
USING LINEAR ANALYSIS IN MATLAB
FOR DC MOTOR DRIVE CONTROLLER
DESIGN

Our objective in DC drive system are:

(a) To obtain zero or small steady state error


– making sure DC gain of open–loop plot is large

(b) To achieve fast response


– making sure crossover frequency of open–loop
plot is large or large close–loop bandwidth
EXAMPLE in using linear analysis in MATLAB
100
GOL =
s(0.1s + 1)

1 1
-K-
s 0 .1s+1
Ga in Inte gra tor Tra nsfe r Fcn

100
0.1s2 +s
Tra nsfe r Fcn
EXAMPLE in using linear analysis in MATLAB
EXAMPLE in using linear analysis in MATLAB
Select Bode as response type in Plot Configurations window

Try to place input point at several different positions. For


each position, obtain the plot using the Simulink → get
linearized model

1 1
-K-
s 0 .1 s+1
In te g ra to r In p ut P oint
Ou tp u t P o in t
Ga in Tra nsfe r Fcn

1 1
-K-
s 0 .1 s+1
In p ut P oint In te g ra to r Ou tp u t P o in t
Ga in Tra nsfe r Fcn

1 1
-K-
s 0.1s+1
Input P oint Output P o in t
Ga in Inte gra tor Tra nsfe r Fcn
EXAMPLE in using linear analysis in MATLAB
Bode Dia gra m
From: Input Point To: Output Point
100

50
Ma gnitude (dB)

-50

-100
0

-45
Pha s e (de g)

-90

-135

-180
-1 0 1 2 3
10 10 10 10 10
Fre que nc y (ra d/s e c )
EXAMPLE in using linear analysis in MATLAB
1 1
-K-
s 0.1s+1
In pu t P oin t Ga in In te g ra tor Outp ut P o in t
Tra n sfe r Fcn

Bode Diagram
From: Input Point To: Output Point
100

50

Crossover frequency
Magnitude (dB)

-50
approximates close–
-100
loop bandwidth
0

-45
Phas e (de g)

-90

-135

-180
-1 0 1 2 3
10 10 10 10 10
Frequency (rad/s ec)
EXAMPLE in using linear analysis in MATLAB
PI controller
 
 s 
Transfer function ki 1 + k 
 i 
kp 

s

• Contain a zero and a pole at origin


• DC gain can be adjusted independently from
location of zero
EXAMPLE in using linear analysis in MATLAB
PI controller 1
1
s
In p u t P o in t Ga in In te g ra to r Ou tp u t P o in t

0 .1

Ga in 1

Bode Dia gram


From: Input Point To: Output Point
100

ki=100, kp=10
50
Ma gnitude (dB)

-50 ki=1, kp=0.1

-100
0
Pha s e (de g)

-45

-90
-1 0 1 2 3
10 10 10 10 10
Fre quenc y (ra d/s e c )
http://encon.fke.utm.my/courses/mep1422/dc_m2_large_torque.mdl

Model {
Name "dc_m2_linear_large_torque"
Version 5.0
SaveDefaultBlockParams on
SampleTimeColors off
LibraryLinkDisplay "none"
WideLines off
ShowLineDimensions off
ShowPortDataTypes off
ShowLoopsOnError on
IgnoreBidirectionalLines off
ShowStorageClass off
ExecutionOrder off
RecordCoverage off
CovPath "/"
CovSaveName "covdata"
CovMetricSettings "dw"
CovNameIncrementing off
CovHtmlReporting on
covSaveCumulativeToWorkspaceVar on
CovSaveSingleToWorkspaceVar on
CovCumulativeVarName "covCumulativeData"
CovCumulativeReport off
DataTypeOverride "UseLocalSettings"
MinMaxOverflowLogging "UseLocalSettings"
MinMaxOverflowArchiveMode "Overwrite"
BlockNameDataTip off
BlockParametersDataTip off
BlockDescriptionStringDataTip off
ToolBar on
StatusBar on
BrowserShowLibraryLinks off
BrowserLookUnderMasks on
Created "Wed May 28 20:17:31 2003"
UpdateHistory "UpdateHistoryNever"
ModifiedByFormat "%<Auto>"
LastModifiedBy "Nik Rumzi"
ModifiedDateFormat "%<Auto>"
LastModifiedDate "Mon Jul 26 11:46:55 2004"
ModelVersionFormat "1.%<AutoIncrement:33>"
ConfigurationManager "None"
SimParamPage "Solver"
LinearizationMsg "none"
Profile off
ParamWorkspaceSource "MATLABWorkspace"
AccelSystemTargetFile "accel.tlc"
AccelTemplateMakefile "accel_default_tmf"
AccelMakeCommand "make_rtw"
TryForcingSFcnDF off
ExtModeMexFile "ext_comm"
ExtModeBatchMode off
ExtModeTrigType "manual"
ExtModeTrigMode "normal"
ExtModeTrigPort "1"
ExtModeTrigElement "any"
ExtModeTrigDuration 1000
ExtModeTrigHoldOff 0
ExtModeTrigDelay 0
ExtModeTrigDirection "rising"
ExtModeTrigLevel 0
ExtModeArchiveMode "off"
ExtModeAutoIncOneShot off
ExtModeIncDirWhenArm off
ExtModeAddSuffixToVar off
ExtModeWriteAllDataToWs off

http://encon.fke.utm.my/courses/mep1422/dc_m2_large_torque.mdl (1 von 14) [17.05.2005 17:12:11]


http://encon.fke.utm.my/courses/mep1422/dc_m2_large_torque.mdl

ExtModeArmWhenConnect on
ExtModeSkipDownloadWhenConnect off
ExtModeLogAll on
ExtModeAutoUpdateStatusClock on
BufferReuse on
RTWExpressionDepthLimit 5
SimulationMode "normal"
Solver "ode5"
SolverMode "Auto"
StartTime "0.0"
StopTime "0.45"
MaxOrder 5
MaxStep "0.0001"
MinStep "0.00001"
MaxNumMinSteps "-1"
InitialStep "0.00001"
FixedStep "0.000001"
RelTol "1e-3"
AbsTol "auto"
OutputOption "RefineOutputTimes"
OutputTimes "[]"
Refine "1"
LoadExternalInput off
ExternalInput "[t, u]"
LoadInitialState off
InitialState "xInitial"
SaveTime on
TimeSaveName "t"
SaveState off
StateSaveName "xout"
SaveOutput on
OutputSaveName "yout"
SaveFinalState off
FinalStateName "xFinal"
SaveFormat "Array"
Decimation "1"
LimitDataPoints off
MaxDataPoints "1000"
SignalLoggingName "sigsOut"
ConsistencyChecking "none"
ArrayBoundsChecking "none"
AlgebraicLoopMsg "warning"
BlockPriorityViolationMsg "warning"
MinStepSizeMsg "warning"
InheritedTsInSrcMsg "warning"
DiscreteInheritContinuousMsg "warning"
MultiTaskRateTransMsg "error"
SingleTaskRateTransMsg "none"
CheckForMatrixSingularity "none"
IntegerOverflowMsg "warning"
Int32ToFloatConvMsg "warning"
ParameterDowncastMsg "error"
ParameterOverflowMsg "error"
ParameterPrecisionLossMsg "warning"
UnderSpecifiedDataTypeMsg "none"
UnnecessaryDatatypeConvMsg "none"
VectorMatrixConversionMsg "none"
InvalidFcnCallConnMsg "error"
SignalLabelMismatchMsg "none"
UnconnectedInputMsg "warning"
UnconnectedOutputMsg "warning"
UnconnectedLineMsg "warning"
SfunCompatibilityCheckMsg "none"
RTWInlineParameters off
BlockReductionOpt on

http://encon.fke.utm.my/courses/mep1422/dc_m2_large_torque.mdl (2 von 14) [17.05.2005 17:12:11]


http://encon.fke.utm.my/courses/mep1422/dc_m2_large_torque.mdl

BooleanDataType on
ConditionallyExecuteInputs on
ParameterPooling on
OptimizeBlockIOStorage on
ZeroCross on
AssertionControl "UseLocalSettings"
ProdHWDeviceType "Microprocessor"
ProdHWWordLengths "8,16,32,32"
RTWSystemTargetFile "grt.tlc"
RTWTemplateMakefile "grt_default_tmf"
RTWMakeCommand "make_rtw"
RTWGenerateCodeOnly off
RTWRetainRTWFile off
TLCProfiler off
TLCDebug off
TLCCoverage off
TLCAssertion off
BlockDefaults {
Orientation "right"
ForegroundColor "black"
BackgroundColor "white"
DropShadow off
NamePlacement "normal"
FontName "Helvetica"
FontSize 10
FontWeight "normal"
FontAngle "normal"
ShowName on
}
BlockParameterDefaults {
Block {
BlockType Clock
DisplayTime off
}
Block {
BlockType Derivative
}
Block {
BlockType Fcn
Expr "sin(u[1])"
}
Block {
BlockType Gain
Gain "1"
Multiplication "Element-wise(K.*u)"
ShowAdditionalParam off
ParameterDataTypeMode "Same as input"
ParameterDataType "sfix(16)"
ParameterScalingMode "Best Precision: Matrix-wise"
ParameterScaling "2^0"
OutDataTypeMode "Same as input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
}
Block {
BlockType Inport
Port "1"
PortDimensions "-1"
SampleTime "-1"
ShowAdditionalParam off
LatchInput off
DataType "auto"

http://encon.fke.utm.my/courses/mep1422/dc_m2_large_torque.mdl (3 von 14) [17.05.2005 17:12:11]


http://encon.fke.utm.my/courses/mep1422/dc_m2_large_torque.mdl

OutDataType "sfix(16)"
OutScaling "2^0"
SignalType "auto"
SamplingMode "auto"
Interpolate on
}
Block {
BlockType Lookup
InputValues "[-4:5]"
OutputValues " rand(1,10)-0.5"
ShowAdditionalParam off
LookUpMeth "Interpolation-Extrapolation"
OutDataTypeMode "Same as input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
}
Block {
BlockType Outport
Port "1"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Block {
BlockType Relay
OnSwitchValue "eps"
OffSwitchValue "eps"
OnOutputValue "1"
OffOutputValue "0"
ShowAdditionalParam off
OutputDataTypeScalingMode "All ports same datatype"
OutDataType "sfix(16)"
OutScaling "2^0"
ConRadixGroup "Use specified scaling"
ZeroCross on
}
Block {
BlockType Saturate
UpperLimit "0.5"
LowerLimit "-0.5"
LinearizeAsGain on
ZeroCross on
}
Block {
BlockType "S-Function"
FunctionName "system"
PortCounts "[]"
SFunctionModules "''"
}
Block {
BlockType SignalGenerator
WaveForm "sine"
Amplitude "1"
Frequency "1"
Units "Hertz"
VectorParams1D on
}
Block {
BlockType Step
Time "1"
Before "0"
After "1"
SampleTime "-1"

http://encon.fke.utm.my/courses/mep1422/dc_m2_large_torque.mdl (4 von 14) [17.05.2005 17:12:11]


http://encon.fke.utm.my/courses/mep1422/dc_m2_large_torque.mdl

VectorParams1D on
ZeroCross on
}
Block {
BlockType SubSystem
ShowPortLabels on
Permissions "ReadWrite"
RTWSystemCode "Auto"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
SimViewingDevice off
DataTypeOverride "UseLocalSettings"
MinMaxOverflowLogging "UseLocalSettings"
}
Block {
BlockType Sum
IconShape "rectangular"
Inputs "++"
ShowAdditionalParam off
InputSameDT on
OutDataTypeMode "Same as first input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
}
Block {
BlockType ToWorkspace
VariableName "simulink_output"
MaxDataPoints "1000"
Decimation "1"
SampleTime "0"
}
Block {
BlockType TransferFcn
Numerator "[1]"
Denominator "[1 2 1]"
AbsoluteTolerance "auto"
Realization "auto"
}
}
AnnotationDefaults {
HorizontalAlignment "center"
VerticalAlignment "middle"
ForegroundColor "black"
BackgroundColor "white"
DropShadow off
FontName "Helvetica"
FontSize 10
FontWeight "normal"
FontAngle "normal"
}
LineDefaults {
FontName "Helvetica"
FontSize 9
FontWeight "normal"
FontAngle "normal"
}
System {
Name "dc_m2_linear_large_torque"
Location [6, 82, 1018, 533]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 212

http://encon.fke.utm.my/courses/mep1422/dc_m2_large_torque.mdl (5 von 14) [17.05.2005 17:12:11]


http://encon.fke.utm.my/courses/mep1422/dc_m2_large_torque.mdl

ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "92"
ReportName "simulink-default.rpt"
Block {
BlockType Gain
Name "Gain"
Position [410, 230, 440, 260]
Gain "-1"
}
Block {
BlockType Reference
Name "PID Controller"
Ports [1, 1]
Position [335, 90, 365, 120]
SourceBlock "simulink_extras/Additional\nLinear/PID Controll"
"er"
SourceType "PID Controller"
P "90"
I "90*200"
D "0"
}
Block {
BlockType Reference
Name "PID Controller1"
Ports [1, 1]
Position [150, 90, 180, 120]
SourceBlock "simulink_extras/Additional\nLinear/PID Controll"
"er"
SourceType "PID Controller"
P "0.2"
I "0.7*0.2"
D "0"
}
Block {
BlockType Relay
Name "Relay"
Position [500, 90, 530, 120]
OnSwitchValue "0"
OffSwitchValue "0"
OnOutputValue "60"
}
Block {
BlockType Relay
Name "Relay1"
Position [520, 230, 550, 260]
OnSwitchValue "0"
OffSwitchValue "0"
OnOutputValue "60"
}
Block {
BlockType Saturate
Name "Saturation1"
Position [225, 90, 255, 120]
UpperLimit "1.5"
LowerLimit "-1.5"
}
Block {
BlockType SignalGenerator
Name "Signal\nGenerator"
Position [20, 90, 50, 120]
WaveForm "square"

http://encon.fke.utm.my/courses/mep1422/dc_m2_large_torque.mdl (6 von 14) [17.05.2005 17:12:11]


http://encon.fke.utm.my/courses/mep1422/dc_m2_large_torque.mdl

Amplitude "-30"
Frequency "5"
}
Block {
BlockType Step
Name "Step1"
Position [600, 205, 630, 235]
Time "0"
After "0"
SampleTime "0"
}
Block {
BlockType SubSystem
Name "Subsystem"
Ports [2, 3]
Position [700, 120, 740, 180]
TreatAsAtomicUnit off
MaskPromptString "Armature resistance|La|J|Kt|B"
MaskStyleString "edit,edit,edit,edit,edit"
MaskTunableValueString "on,on,on,on,on"
MaskCallbackString "||||"
MaskEnableString "on,on,on,on,on"
MaskVisibilityString "on,on,on,on,on"
MaskToolTipString "on,on,on,on,on"
MaskVarAliasString ",,,,"
MaskVariables "Ra=@1;La=@2;J=@3;Kt=@4;B=@5;"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "2|5.2e-3|152e-6|0.1|0.0001"
System {
Name "Subsystem"
Location [90, 152, 644, 411]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "Va"
Position [25, 88, 55, 102]
}
Block {
BlockType Inport
Name "Tl"
Position [280, 28, 310, 42]
Port "2"
}
Block {
BlockType Gain
Name "Gain"
Position [250, 80, 280, 110]
Gain "Kt"
}
Block {
BlockType Gain
Name "Gain2"
Position [270, 185, 300, 215]
Orientation "left"

http://encon.fke.utm.my/courses/mep1422/dc_m2_large_torque.mdl (7 von 14) [17.05.2005 17:12:11]


http://encon.fke.utm.my/courses/mep1422/dc_m2_large_torque.mdl

Gain "Kt"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [80, 85, 100, 105]
ShowName off
IconShape "round"
Inputs "|+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1]
Position [310, 85, 330, 105]
NamePlacement "alternate"
ShowName off
IconShape "round"
Inputs "-+|"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
}
Block {
BlockType TransferFcn
Name "Transfer Fcn"
Position [145, 77, 205, 113]
Denominator "[La Ra]"
}
Block {
BlockType TransferFcn
Name "Transfer Fcn1"
Position [375, 77, 435, 113]
Denominator "[J B]"
}
Block {
BlockType Outport
Name "speed"
Position [495, 88, 525, 102]
}
Block {
BlockType Outport
Name "T"
Position [390, 33, 420, 47]
Port "2"
}
Block {
BlockType Outport
Name "Ia"
Position [240, 33, 270, 47]
Port "3"
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Transfer Fcn"
DstPort 1
}
Line {
SrcBlock "Gain"
SrcPort 1
DstBlock "Sum1"
DstPort 2

http://encon.fke.utm.my/courses/mep1422/dc_m2_large_torque.mdl (8 von 14) [17.05.2005 17:12:11]


http://encon.fke.utm.my/courses/mep1422/dc_m2_large_torque.mdl

}
Line {
SrcBlock "Transfer Fcn"
SrcPort 1
Points [10, 0]
Branch {
DstBlock "Gain"
DstPort 1
}
Branch {
Points [0, -55]
DstBlock "Ia"
DstPort 1
}
}
Line {
SrcBlock "Sum1"
SrcPort 1
Points [5, 0]
Branch {
Points [0, -55]
DstBlock "T"
DstPort 1
}
Branch {
DstBlock "Transfer Fcn1"
DstPort 1
}
}
Line {
SrcBlock "Transfer Fcn1"
SrcPort 1
Points [35, 0]
Branch {
DstBlock "speed"
DstPort 1
}
Branch {
Points [0, 105]
DstBlock "Gain2"
DstPort 1
}
}
Line {
SrcBlock "Tl"
SrcPort 1
Points [5, 0]
DstBlock "Sum1"
DstPort 1
}
Line {
SrcBlock "Va"
SrcPort 1
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "Gain2"
SrcPort 1
Points [-175, 0]
DstBlock "Sum"
DstPort 2
}
}
}

http://encon.fke.utm.my/courses/mep1422/dc_m2_large_torque.mdl (9 von 14) [17.05.2005 17:12:11]


http://encon.fke.utm.my/courses/mep1422/dc_m2_large_torque.mdl

Block {
BlockType SubSystem
Name "Subsystem1"
Ports [0, 1]
Position [325, 162, 360, 198]
TreatAsAtomicUnit off
MaskPromptString "frekuensi|V peak"
MaskStyleString "edit,edit"
MaskTunableValueString "on,on"
MaskCallbackString "|"
MaskEnableString "on,on"
MaskVisibilityString "on,on"
MaskToolTipString "on,on"
MaskVarAliasString ","
MaskVariables "f=@1;v1=@2;"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "33000|5"
System {
Name "Subsystem1"
Location [553, 276, 688, 358]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Reference
Name "Repeating\nSequence"
Ports [0, 1]
Position [25, 25, 55, 55]
SourceBlock "simulink/Sources/Repeating\nSequence"
SourceType "Repeating table"
rep_seq_t "[0 1/(2*f) 1/f]"
rep_seq_y "[-v1 v1 -v1]"
}
Block {
BlockType Outport
Name "Out1"
Position [80, 33, 110, 47]
}
Line {
SrcBlock "Repeating\nSequence"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
}
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [100, 95, 120, 115]
ShowName off
IconShape "round"
Inputs "|+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"

http://encon.fke.utm.my/courses/mep1422/dc_m2_large_torque.mdl (10 von 14) [17.05.2005 17:12:11]


http://encon.fke.utm.my/courses/mep1422/dc_m2_large_torque.mdl

}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1]
Position [290, 95, 310, 115]
ShowName off
IconShape "round"
Inputs "|+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
}
Block {
BlockType Sum
Name "Sum2"
Ports [2, 1]
Position [430, 95, 450, 115]
ShowName off
IconShape "round"
Inputs "|+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
}
Block {
BlockType Sum
Name "Sum3"
Ports [2, 1]
Position [470, 235, 490, 255]
ShowName off
IconShape "round"
Inputs "-+|"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
}
Block {
BlockType Sum
Name "Sum4"
Ports [2, 1]
Position [560, 145, 580, 165]
ShowName off
IconShape "round"
Inputs "+|-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
}
Block {
BlockType ToWorkspace
Name "To Workspace"
Position [910, 115, 970, 145]
VariableName "speed"
MaxDataPoints "inf"
SampleTime "-1"
SaveFormat "Array"
}
Block {
BlockType ToWorkspace
Name "To Workspace1"
Position [800, 75, 860, 105]
VariableName "torque"
MaxDataPoints "inf"
SampleTime "-1"
SaveFormat "Array"
}
Block {
BlockType ToWorkspace

http://encon.fke.utm.my/courses/mep1422/dc_m2_large_torque.mdl (11 von 14) [17.05.2005 17:12:11]


http://encon.fke.utm.my/courses/mep1422/dc_m2_large_torque.mdl

Name "To Workspace2"


Position [445, 25, 505, 55]
VariableName "vtri"
MaxDataPoints "inf"
SampleTime "-1"
SaveFormat "Array"
}
Block {
BlockType ToWorkspace
Name "To Workspace3"
Position [485, 290, 545, 320]
VariableName "vc"
MaxDataPoints "inf"
SampleTime "-1"
SaveFormat "Array"
}
Block {
BlockType ToWorkspace
Name "To Workspace4"
Position [495, 370, 555, 400]
VariableName "vc_m"
MaxDataPoints "inf"
SampleTime "-1"
SaveFormat "Array"
}
Line {
SrcBlock "PID Controller"
SrcPort 1
Points [10, 0]
Branch {
Points [20, 0]
Branch {
Points [-5, 0]
DstBlock "Gain"
DstPort 1
}
Branch {
DstBlock "Sum2"
DstPort 1
}
}
Branch {
Points [0, 200]
DstBlock "To Workspace3"
DstPort 1
}
}
Line {
SrcBlock "Step1"
SrcPort 1
Points [50, 0]
DstBlock "Subsystem"
DstPort 2
}
Line {
SrcBlock "Sum2"
SrcPort 1
DstBlock "Relay"
DstPort 1
}
Line {
SrcBlock "Subsystem1"
SrcPort 1
Points [45, 0]
Branch {

http://encon.fke.utm.my/courses/mep1422/dc_m2_large_torque.mdl (12 von 14) [17.05.2005 17:12:11]


http://encon.fke.utm.my/courses/mep1422/dc_m2_large_torque.mdl

Points [30, 0]
Branch {
Points [40, 0]
DstBlock "Sum3"
DstPort 1
}
Branch {
DstBlock "Sum2"
DstPort 2
}
}
Branch {
Points [0, -140]
DstBlock "To Workspace2"
DstPort 1
}
}
Line {
SrcBlock "Signal\nGenerator"
SrcPort 1
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "PID Controller1"
DstPort 1
}
Line {
SrcBlock "PID Controller1"
SrcPort 1
DstBlock "Saturation1"
DstPort 1
}
Line {
SrcBlock "Sum1"
SrcPort 1
DstBlock "PID Controller"
DstPort 1
}
Line {
SrcBlock "Saturation1"
SrcPort 1
DstBlock "Sum1"
DstPort 1
}
Line {
SrcBlock "Subsystem"
SrcPort 1
Points [120, 0]
Branch {
Points [0, 295; -755, 0]
DstBlock "Sum"
DstPort 2
}
Branch {
DstBlock "To Workspace"
DstPort 1
}
}
Line {
SrcBlock "Gain"
SrcPort 1
Points [5, 0]

http://encon.fke.utm.my/courses/mep1422/dc_m2_large_torque.mdl (13 von 14) [17.05.2005 17:12:11]


http://encon.fke.utm.my/courses/mep1422/dc_m2_large_torque.mdl

Branch {
DstBlock "Sum3"
DstPort 2
}
Branch {
Points [0, 140]
DstBlock "To Workspace4"
DstPort 1
}
}
Line {
SrcBlock "Relay"
SrcPort 1
Points [35, 0]
DstBlock "Sum4"
DstPort 1
}
Line {
SrcBlock "Sum3"
SrcPort 1
DstBlock "Relay1"
DstPort 1
}
Line {
SrcBlock "Relay1"
SrcPort 1
Points [15, 0]
DstBlock "Sum4"
DstPort 2
}
Line {
SrcBlock "Sum4"
SrcPort 1
Points [50, 0; 0, -20]
DstBlock "Subsystem"
DstPort 1
}
Line {
SrcBlock "Subsystem"
SrcPort 2
Points [30, 0]
Branch {
Points [10, 0]
DstBlock "To Workspace1"
DstPort 1
}
Branch {
Points [0, 195; -475, 0]
DstBlock "Sum1"
DstPort 2
}
}
}
}

http://encon.fke.utm.my/courses/mep1422/dc_m2_large_torque.mdl (14 von 14) [17.05.2005 17:12:11]


PEMACU MOTOR ARUHAN
Mo t o r aru h an ï%LQDDQGDQSULQVLSRSHUDVL UHYLVLRQ
Mot or a r u h a n t er d ir i d a r i s t a t or d a n r ot or
Pa d a s t a t or t er d a p a t b elit a n 3 fa s a ya n g d is a m b u n g k ep a d a b ek a la n volt a n 3 fa s a (a , b , d a n c)
S eca r a a m , t er d a p a t d u a jen is r ot or : s qu ir r el ca ge (s a n gk a r t u p a i) d a n wou n d (b er b elit )

c’ •
b’
x x

b • •
c
x

Bila volt a n s in u s oid a l t iga fa s a s eim b a n g d ik en a k a n , a k a n t er b en t u k flu k s m a gn et p a d a s ela


u d a r a ya n g b er p u t a r d en ga n k ela ju a n :

2
ωs = 2 πf rad/ s (1 )
p

ωs – d ik en a li s eb a ga i fr ek u en s i s eger a k (s yn ch r on ou s fr equ en cy)


f– ia la h fr ek u en s i b ek a la n t iga fa s a p a d a s t a t or
p – ia la h b ila n ga n k u t u b

Flu x s ela u d a r a b er p u t a r in i a k a n m en ga r u h k a n d ge p a d a p en ga lir r ot or . Ar u s a k a n t er h a s il


p a d a p en ga lir r ot or d a n a k a n b er in t er a k s i d en ga n flu k s s ela u d a r a b er p u t a r u n t u k
m en gh a s ilk a n d a ya k ila s ya n g a k a n m em u t a r k a n r ot or .Oleh it u la ju r ot or s en t ia s a k u r a n g d a r i
la ju s eger a k .

Per b eza a n la ju in i d ik en a li s eb a ga i la ju gelin cir a n (s lip s p eed ).

ωs l = ωs – ωr (2 )

Nis b a h la ju gelin cir a n k ep a d a la ju s eger a k ia la h gelin cir a n .

ωs − ωr
s = (3 )
ωs

Flu k s s ela u d a r a ya n g b er p u t a r ju ga a k a n m en ga r u h k a n d ge p a d a b elit a n s t a t or ya n g d ik en a li


s eb a ga i d ge b a lik a n (b a ck em f) a t a u volt a n s ela u d a r a (a ir ga p volt a ge).

Volt a n s ela u d a r a ya n g t er a r u h d ib er i oleh :

E a g = k f φa g (4 )

J ik a Vs ia la h volt a n p er -fa s a ya n g d ik en a k a n p a d a b elit a n s t a t or d a n Is ia la h a r u s b elit a n


s t a t or , p er s a m a a n lit a r s t a t or ia la h :

1
Vs = R s Is + j(2 πf)Lls + E a g (5 )

d .g.e. ya n g t er a r u h p a d a r ot or a d a la h d is eb a b k a n oleh flu k s m a gn et ya n g s a m a t a p i p a d a


fr ek u en s i gelin cir a n d a n ia b oleh d it u lis s eb a ga i:

E r = k s f φa g = s E a g (6 )

Oleh it u , p er s a m a a n u n t u k lit a r r ot or ia la h :

E r = s E a g = R r Ir + js (2 πf)Llr (7 )

J ik a k ed u a -d u a b ela h p er s a m a a n d ib a h a gi d en ga n s ,

Rr
⇒ E ag = Ir + j(2 πf )L lr (8 )
s

Rs Is Lls Llr Ir

+ + Rr
Lm
Vs E ag s
Im
– –

Lit a r s et a r a p er fa s a

Rs – Rin t a n ga n b elit a n s t a t or
Rr – Rin t a n ga n p en ga lir r ot or
Lls – Kea r u h a n b ocor b elit a n s t a t or
Llr – Kea r u h a n b ocor b elit a n r ot or
Lm – Kea r u h a n k em a gn et a n
s – gelin cir a n

Rot or t id a k m em p u n ya i s u m b er k u a s a , oleh it u k u a s a ya n g d ip in d a h k a n d a r i lit a r s t a t or k e lit a r


r ot or d ik en a li s eb a ga i k u a s a s ela u d a r a (a ir -ga p p ower ) d a n d ib er i oleh :

Rr Rr
Pa g = 3 I 2r = 3 I 2r R r + 3 I 2r [1 − s ]
s s

Hila n g
p a d a Rr Ditu k a r k ep a d a k u a s a m ek a n ik a l
P m = (1 - s )P a g

Ku a s a m ek a n ik a l b oleh d it u lis d a la m s eb u t a n d a ya k ila s d a n la ju r ot or s eb a ga i:

P m = Tem ωr

Ta p i s ωs = ωs - ωr ⇒ ωr = (1 -s )ωs

2
∴ P a g = Tem ωs

Pa g 3 I 2r R r
Oleh it u Tem = =
ωs s ωs

Vs
J ik a Ir = , d a ya k ila s b oleh d it u lis s eb a ga i:
Rr
Rs + + j(X ls + X lr )
s

3R r Vs2
Tem =
s ωs  R 
2

 R s + r  + (X ls + X lr )
2

 s 

Ben t u k la zim cir i T- ω u n t u k m ot or a r u h a n :

Tem

Pu ll ou t
Tor qu e

Tm ,r a t ed

ωr
0 ωr a t ed ωs
s
1 0

Gelin cir a n s em a s a d a ya k ila s m a k s im u m d ib er i oleh :

Rr
sm = ±
R s + (X ls + X lr )
2 2

Nila i d a ya k ila s m a k s im a (p u ll-ou t t or qu e):

 
3  Vs2 
Tm a x =
s ωs  R ± R 2 + (X + X )2 
 s s ls lr 

3
Kawalan laju m o t o r aru h an

Ter d a p a t b eb er a p a k a ed a h k a wa la n la ju :

(i) Pole ch a n gin g ïPHQXNDUELODQJDQNXWXE


La ju s eger a k b er ga n t u n g k ep a d a b ila n ga n k u t u b
Den ga n m en u k a r s a m b u n ga n p a d a b elit a n , b ila n ga n k u t u b b oleh d iu b a h .

(ii) Va r ia b le volt a ge, fixed fr equ en cy


Ma gn it u d volt a n d ik a wa l, fr ek u en s i t et a p , e.g. m en ggu n a k a n t r a n s for m er .

TL Lower s p eed gives


h igh er s lip ∴ les s
efficien t

ωr

(iii) Va r ia b le m a gn it u d e va r ia b le fr equ en cy

Ma gn it u d volt a n b ek a la n d it u k a r b er k a d a r a n d en ga n fr ek u en s i d a n m er u p a k a n k a ea d a h ya n g
p a lin g p op u la r d igu n a k a n d a la m p em a cu k a wa la n la ju m ot or a r u h a n . Un t u k s ya n g k ecil d a n
φa g ya n g t et a p , b oleh d it u n ju k k a n h u b u n ga n d i a n t a r a d a ya k ila s d a n la ju gelin cir a n (s lip s p eed )
a d a la h lin ea r

Un t u k m en gek a lk a n flu k s s ela u d a r a p a d a n ila i k a d a r a n , b ila volt a n d iu b a h , fr ek u en s i ju ga


p er lu d iu b a h :

E a g = k f φa g

E ag
Oleh u n t u k m en gh a s ilk a n φa g ya n g m a la r p a d a n ila i k a d a r a n , n is b a h h a r u s la h m a la r . J ik a
f
k eja t u h a n volt a n p a d a R s d a n Xls a d a la h k ecil d ib a n d in gk a n d en ga n Vs ,

E ag Vs

f f

Volt a n b ek a la n d iu b a h s eca r a b er k a d a r a n d en ga n la ju a t a u fr equ en s i s eh in gga la ju k a d a r a n .

4
Un t u k ω > ωr a t ed , m a gn it u d volt a n d it et a p k a n t a p i fr ek u en s i d in a ik k a n , oleh it u torqu e ca p a b ility
m en gu r a n g k er a n a flu k s m u la m en gu r a n g

Vs

Vs , r a t ed

f
fr a t ed

Bila la ju k ecil, k eja t u h a n volt a n oleh R s d a n Xls a d a la h b es a r jik a d ib a n d in gk n d en ga n Vs . Oleh


it u k eb ia s a a n n ya Vs d in a ik k a n leb ih b es a r s ed ik it (b oos t ) s em a s a fr equ en s i r en d a h

Cir i T- ω b ila m a gn it u d Vs d a n f d iu b a h b er k a d a r a n

TL

T,r a t ed

ωr
ωr ,r a t ed
Vs

ωr
ωs ,r a t ed

Ba ga im a n a k a h m a gn it u d d a n fr ek u en s i d ik a wa l s er en t a k ?
Men ggu n a k a n Pu ls e Wid t h Mod u la t ion (PWM) In ver t er

5
Fixed AC. AC–DC
PWM in ver t er
(r ect ifier ) IM

Va r ia b le volt a ge
Va r ia b le fr eq.
Con t r ol
(f a n d V)

Ex am ple 1
4 0 0 V, 5 0 Hz 4 ïSROH 1370 rpm
Rs = 2 Ω, Rr = 3 Ω, Xls = Xlr = 3 .5 Ω

Mot or is con t r olled b y a volt a ge s ou r ce in ver t er wit h con s t a n t V/ f.

Ca lcu la t e:
(a ) S p eed for fr equ en cy of 3 0 Hz a n d 8 0 % of fu ll loa d
(b ) Fr equ en cy for a s p eed of 1 0 0 0 r p m a n d fu ll loa d t or qu e
(c) Tor qu e for a fr equ en cy of 4 0 Hz a n d s p eed of 1 1 0 0 r p m

(a )

3 0 Hz 5 0 Hz
Tr a t ed

0 .8 Tr a t ed

Ra ted
s lip
s p eed

1500
Ns lip ,0 .8

Tr a t ed 0 . 8 Tr a t ed
=
Ns lip , r a t ed N s lip ,0 . 8

Ns lip ,r a t ed = Ns ï1r ,r a t ed = 1 5 0 0 ï USP

0 . 8 Tr a t ed
∴ Ns lip , 0 . 8 = Ns lip , r a t ed = 0 . 8 (1 3 0 ) = 1 0 4 r p m
Tr a t ed

Pa d a 3 0 Hz, la ju s eger a k ia la h 3 0 x 6 0 = 1 8 0 0 / 2 = 9 0 0 r p m

6
∴Nr = Ns ï1s lip = 9 0 0 ï0 4 = 7 9 6 r p m

(b )

? Hz 5 0 Hz
Tr a t ed

1000 Ns 1370 1500


Ns lip ,ra ted Ns lip ,ra ted
= 130 = 130
rpm

Ns = 1 3 0 + 1 0 0 0 = 1 1 3 0 r p m
2
Ns = f × 60 ∴ f = 3 7 .6 7 Hz
p

(c)

4 0 Hz 5 0 Hz
Tr a t ed

T=?

1100 Ns 1370 1500

Ns lip Ns lip ,ra ted


= 130 rpm
2 ∴ Ns = 1 2 0 0 r p m
Ns = f × 60
p

Ns lip = 1 2 0 0 ï USP

7
Tr a t ed T ∴T = 0 .7 6 9 Tr a t ed Tr a t ed = ?
=
130 100

Tr a t ed d ip er oleh i d a r i : 3Rr Vs2


Tem = 2
s ωs  R 
 R s + r  + (X ls + X lr )
2
 s 

Tr a t ed = 3 8 .0 6 Nm

∴ Da ya k ila s p a d a 4 0 Hz, la ju 1 1 0 0 r p m ia la h T = 0 .7 6 9 (3 8 .0 6 ) = 2 9 .2 6 7 Nm

Example 2

A 4–pole, 3-phase, 50 Hz IM, 1460 rpm has a rated torque of 20 Nm. It is used
to drive a load with characteristic given by TL = Kω2 , such that the speed
equals rated value at rated torque. If a constant V/Hz control method is used,
find the speed of motor at 0.5 rated torque.

If the starting torque of 1.1 times the rated is required, what should be the
starting frequency?

5 0 Hz
TL(Nm)

TL = K ω2
Trated

0.5 Trated
Zsyn,r

ω(rad/s)

Zslip,r
Zr,r

ωslip,r = 1500 – 1460 = 40 rpm or 4.19 rad/s

a) Load torque is given by:

T L = K ω2

1460 rpm ⇒ 152.9 rad/s


20 = K(152.9)2

8
⇒ K = 20/(152.9)2 20
TL = ω2
1 5 2 .9 2

∴ at 0.5 rated torque, the speed is 108.11 rad/s

Motor T-ω is obtained as follows:

T r a t ed T r a t ed Te
= = 4 .7 7 =
ω s lip ω s yn , r − ω r , r ω s yn − ω r

Te = 4 . 7 7 ω s yn − 4 . 7 7 ω r

Therefore at 0.5 Trated and speed of 108.11 rad/s

1 0 = 4 . 7 7 ω s yn − 4 . 7 7 (1 0 8 . 1 1 )

∴ ωsyn = 110.2 ⇒ f = 35 Hz

5 0 Hz
TL(Nm)

1.1(Trated) TL = K ω2
Trated

Zsyn,r

ω(rad/s)

Zslip,r
Zslip = Zsyn
Zr,r

1 . 1 T r a t ed T
= r a t ed
ω s lip 4 .1 9

At start-up, ω s lip = ω s yn ∴ ω s yn = 4 . 1 9 (1 . 1 ) = 4 . 6 1

9
SCALAR CONTROL OF IM
We have seen that applying balanced, sinusoidal 3-phase supply to a 3-phase
sinusoidally distributed winding produces a rotating mmf wave and hence
rotating magnetic flux. The rotating magnetic flux will induce emf on the
rotor circuit, which is shorted for squirell cage rotor. Rotor current will
flow and interact with the rotating flux, producing torque.

Rs Ls l Lr l

+ +

V Eg Lm Rr/ s

− − Im

Per-phase steady state equivalent circuit

To ensure maximum torque capability at all time it is therefore necessary to


maintain the magnetic flux at its rated value at any frequency. From the
steady state equivalent circuit, this is equivalent to maintaining the
magnetizing current at its rated value.

The flux can be maintained constant at its rated by maintaining the ratio Eg/f
constant. At high speed, where the induced back emf is large, the drop across
the stator leakage and resistance is negligibly small.- therefore Eg/f is
maintained constant by maintaining V/f constant. However at low speed, the
back emf is low and the drop is significant. Thus the flux is reduced below
rated – torque capability is also reduced.
rad/s
speed-
torque - Nm

Simulation results with constant V/f

The performance can be improved by:

(i) Boosting the voltage at low frequency:

10
To accurately boost the voltage, stator current needs to be measured. The
voltage drop drop is calculated and added to stator voltage on-line

ii) Control the stator current such that constant magnetising current is
maintained. This is achieved by using a current-controlled voltage source
inverter.

Rr
jω L lr +
Im = s I1
Rr
jω (L lr + L m ) +
s

Rr
jω (L lr + L m ) +
⇒ I1 = s I
m
Rr
jω L lr +
s

Introducing σr = rotor leakage factor, which gives, Llr = σrLm,

Rr
jω L r +
I1 = s Im
 σr  R
jω  L r + r

1 + σr  s

jω s lip Tr + 1
I1 = Im ,
 σr 
jω s lip   Tr + 1

1 + σr 

Where Tr = Lr/Rr and ωslip = ω - ωr = sω


The method depends on the rotor parameters, which vary with temperature.

Open-loop V/f control


11
For low cost, low performance drive, open-loop constant V/f control is
normally employed. With open-loop speed control, the rotor speed will be less
than the synchronous speed by slip speed. In other words, the desired speed,
ω*, will differ from the actual speed by slip speed. The slip speed on the
other hand, depends on load. To improve the performance or the speed
regulation, slip speed can be estimated and added to the reference speed –
slip compensation technique. Typical arrangement is shown below:

3-phase Rectifier
VSI
supply IM

Ramp Pulse
Width
ω* + + V
Modulator

+ +

Vboost
Slip speed
calculator

Vdc Idc

How is the slip speed estimated?

The slip frequency is proportional to the torque, hence it can estimated by


estimating the torque. The torque is estimated from,

Te = Pag/ωsyn
12
Pag is estimated by subtracting the input DC power with the inverter and stator
copper losses.

Closed-loop speed control


Speed regulation can be improved by employing closed-loop speed control system
with tachometer feedback, as shown below.

The reference and actual speed are compared. The error is fed to the speed
controller which defines the inverter frequency. The current limit is
activated only when current exceeds the maximum allowable value. The signal
generated by the current limit block will reduce the rate by which the
inverter frequency is increased. This is to avoid the frequency from reaching
the breakdown frequency.

Further readings:
Power Electronic Control of AC Motors – J.M.D. Murphy and F.G. Turnbull,
Pergamon Press

13
Modelling of 3-phase Induction Machine (IM)

The steady state model of IM, which is represented by a steady state per phase equivalent
circuit introduced in the undergraduate courses, describes the steady state behaviour of
the IM. It is used when steady state analysis, such as efficiency, losses, steady state
torque, current, fluxes need to be evaluated. The model assumes input to be a balanced, 3-
phase steady state sinusoidal voltage. If the IM is fed by power electronic converters,
the steady state analysis can be performed by representing the pulse-width modulated
waveform of the inverter using Fourier series. Steady state model of IM is also used to
derive the control signals used for scalar control drives. Since the model only valid in
steady state condition, such drive normally has a poor transient performance. Applications
not requiring good transient response such as fans, blowers or compressors, normally
employ such control technique. Dynamic model on the other hand, describes the transient as
well as the steady state behaviour of the IM. Using the dynamic model, the transients of
IM, which cannot be analysed using steady state equivalent model, can be predicted and
studied. The model can be used to simulate the IM drives and evaluate their transient
performances, including that of using the scalar control technique. Dynamic model is also
essential when developing high performance control techniques for IM drives, such as
vector control or direct torque control drives. A dynamic model of IM must contain effect
of the magnetic coupling between stator phase circuits and the rotor phase circuits, as
well as coupling between phases of each circuit. This will undoubtedly result in a huge
number and complex equations, which are difficult to manage. By using space vector
equations, however, these complex equations are simplified and reduced. We will now
develop a dynamic model of an IM using mathematical equations based on space vectors or
space phasors (these terms will be defined later on).

System equations

Figure 1 shows the conceptual representation of a 3-phase, 2 poles induction machine. The
magnetic axis of each winding is represented by an inductor symbol. As usual the angles
between windings of each phase are 120o. The angle between rotor’s phase a axis and
stator’s phase a axis is given by θr. The equation describing the stator and rotor
circuits can be written as:

ψabcs)/dt
vabcs = Rsiabcs + d(ψ (1)

ψabr)/dt
vabcr = Rriabcr + d(ψ (2)

where,
v as ias Ψas v ar iar Ψar
v abcs = v bs iabcs = ibs Ψabcs = Ψbs and v abcr = v br iabcr = ibr Ψabcs = Ψbr
v cs ics Ψcs v cr icr Ψcr

It is clear that since the displacements between various windings of all the phases are
non-quadrature, there exists magnetic coupling between them. The stator and rotor flux
linkages (ψabcs and ψabcs)of equations (1) and (2) are contributed by the stator and rotor
currents. Thus:

Ψabcs = Ψabcs,s + Ψabcs,r (3)


Ψabcr = Ψabcr,r + Ψabcr,s (4)

1
stator, b

rotor, a
θr stator, a
rotor, b
ξ = 0

rotor, c

Figure 1

stator, c

ψabcs,s and ψabcs,r are the components of the stator flux linkage caused by stator and rotor
currents (phase a, b and c) respectively, and, ψabcr,r and ψabcr,s are the components of the
rotor flux linkage caused by rotor and stator currents (phase a, b and c) respectively
These flux linkages can be written in terms of the inductances and respective currents.

Las Labs Lacs ias


Ψabcs,s = Labs L bs L bcs ibs (5)
Lacs L bcs Lcs ics

Las,ar Las,br Las,cr iar


Ψabcs,r = L bs,ar L bs,br L bs,cr ibr (6)
Lcs,ar Lcs,br Lcs,cr icr

Lar Labr Lacr iar


Ψabcr,r = Labr L br L bcr ibr (7)
Lacr L bcr Lcr icr

2
Lar,as Lar,bs Lar,cs ias
Ψabcr,s = L br,as L br,bs L br,cs i bs (8)
Lcr,as Lcr,bs Lcr,cs ics

In equation (5), Las, Lbs and Lcs are the self inductances of phases a, b and c
respectively. The self inductance consists of magnetising and leakage inductance.

Las = Lms + Lls. Lbs = Lms + Lls. Lcs = Lms + Lls.

Labs, Lbcs, Lacs in equation (5), are the mutual inductances between stator phases.

For symmetrical winding, which is normally the case, magnetising and leakage as well as
mutual inductances for each phase are equal.

It can be shown that the magnetizing and the mutual inductances are given by:

rl π rl π L ms
L ms = µ o Ns2 L abs = L bcs = L acs = −µ o Ns2 = − (9)
g 4 g 8 2

Thus equation (5) can be written as:

L ms L ms
L ms + Lls − −
2 2 ias
L L ms
Ψabcs,s = − ms L ms + Lls − ibs (10)
2 2
L L ms ics
− ms − L ms + Lls
2 2

The mutual inductances between the stator and rotor windings in (6) and (8) depend on the
rotor position, θr and it can be shown that they can be written as:

cos θr (
cos θr + 2π 3 ) (
cos θr − 2π 3 ) iar
Ψabcs,r
N
= r L ms (
cos θ − 2π 3) cos θr (
cos θr + 2π 3 ) ibr (11)
cos(θ + 2π 3) ( )
r
Ns
r cos θr − 2π 3 cos θr icr

cos θr (
cos θr − 2π 3 ) (
cos θr + 2π 3 ) ias
Ψabcr,s =
Nr
(
L ms cos θr + 2π 3 ) cos θr (
cos θr − 2π 3 ) ibs (12)
Ns
(
cos θr − 2π 3 ) (
cos θr + 2π 3 ) cos θr ics

Space phasors representation of induction machine

Equations (1)-(8) give the complete description of the electrical characteristics of an


induction machine. There are six circuits that describe the 3-phase induction machine and
each of them coupled to one another. Although the determinations of the inductances are
quite straight forward, however, the number of equations involved is large. We will now
develop a model of the induction machine which is based on space phasors or space vectors
and valid under steady state and transient conditions. By doing so, the number of
equations is significantly reduced.

3
If the permeability of the core is assumed infintely large, all the mmf drops will appear
across the airgap. Therefore, the stator airgap MMF of a sinusoidally distributed winding
for phase a can be written as:
N
ℑas = s ias cos(ξ − α) (13)
2

ξ is any angle where ξ=0 coincide with the magnetic axis of stator winding phase a. α is
the angle in which airgap mmf is maximum. ias is the stator phase a current. If α = 0 then
equation (9) can be written as:

Ns
ℑas =
ias cos ξ (14)
2
Phases b and c are spatially separated from phase a by 120o. Thus airgap mmf of phase b
and c are given by:

Ns 2π
ℑ bs = i bs cos(ξ − ) (15)
2 3
N 2π
ℑcs = s ics cos(ξ + ) (16)
2 3
The total airgap mmf
Ns N 2π N 2π
ℑabcs = ias cos ξ + s i bs cos(ξ − ) + s ics cos(ξ + ) (17)
2 2 3 2 3

Using Euler’s identity and with some mathematical manupulation, it can be shown that:

ℑabcs =
Ns
4
{( ) ( )
ias + a2i bs + aics ejξ + ias + ai bs + a2ics e − jξ } (18)

where a = ej(2π/3)

This can be further reduced or written as:

ℑabcs =
3 Ns
2 4
{
ise − jξ + is*ejξ } (19)

The term is is defined as the space phasor or complex space vector of the stator current.
It is given by:

is =
2
3
(
ias + aibs + a2ics ) (20)

The physical current can be obtained from the space phasor by separating the space phasor
into its real and imaginary part. In most cases we can assume that ias + ibs + ics = 0.
2
is = (ias + ibs(cos 120 + j sin 120) + ics(cos 240 + j sin 240))
3
2 1 3
= ias − (ibs + ics) + j (ibs − ics)
3 2 2
1
= ias + j (ibs − ics)
3

Thus
ias = Re[is ] (21)

Similarly it can be shown that

4
= [ ] and = [ ] (22)

Similar definitions can be made to the stator voltage, rotor current, stator flux and
rotor flux. Equations (1) and (2) therefore can be written as:

Ψ
= + (23)

dΨr
vr = Rrir + (24)
dt

Ψ is composed of components caused by stator and rotor currents as given by (3). In


space phasors, (3) can be written as:

Ψ =Ψ +Ψ (25)

Ψ is obtained by multiplying second and third rows of (5) with a and a2 respectively.
Similarly, Ψ can be obtained from (6). With some mathematical manipulations, it can be
shown that:

Ψs = Ls is + L m ir'ejθr (26)

Nr
Where Ls = Lls + Lm , Lm = 3/2Lms and ir' = ir
Ns
Similarly, it can be shown that the rotor flux linkage can be written as:

Ψr' = Lr ir' + L m ise−jθr (27)

Note that the rotor current in (26) (i.e. ir' ) , is the space vector referred to the
rotating rotor reference frame. However, the d and q components of ir'ejθr are expressed in
the stator stationary reference frame. This is illustrated in Figure 2. Therefore we can
define the rotor current referred to the stator stationary frame as

irs = ir'ejθr (28)

Equation (26) can be written in stationary stator reference frame as:

Ψss = Ls iss + L m irs (29)

Where the superscript ‘s’ referred to the stator reference frame.

qr qs

ir'
ir' = i'rejξr ωr
dr
irs = i'rej(ξr + θr) isqr Figure 2

ξr
θr ds
isdr

5
Similarly the term ise−jθr in (27) is the stator current referred to rotating rotor frame.
This is illustrated in Figure 3.

qr qs

is
is = ise jξs ωr
dr Figure 3
j(ξs − θr)
is
r
= ise ξs
irqs
irds
θr ds

Re-writing equations (23),(24),(26) and (27), the space vector equations to describe the
squirrel cage IM written in stationary stator frame can be written as follows:

dψss
vss = R s iss + (30a)
dt
dψ rs
0 = R r irs + − jωr ψrs (31a)
dt
ψss = Ls iss + L m irs (32a)

ψ rs = Lr irs + L m iss (33a)

In a general reference frame rotating at angular speed of ω, these equations can be


written as:

dψsg
vsg = R s isg + + jωg ψsg (30b)
dt
dψ rg
0 = R r irg + + j(ωg − ωr)ψ rg (31b)
dt
ψsg = Ls isg + L m irg (32b)

ψrg = Lr irg + L m isg (33b)

Torque equation

The product of the stator voltage and conjugate stator current space vectors is given by:

vs is* =
2
3
(
v as + av bs + a2v cs
2
3
) (
ias + a2ibs + aics ) (34)

After some mathematical manipulations, with the three phase currents sum to zero, it can
be shown that:

[
Re vs is* =] 2
3
(v asias + v bsibs + v csics ) (35)

6
For a three phase induction machine without a neutral return, the power into the machine
can be written as:

Pe =
3
2
( [
Re vs is* ]) + 32 (Re[v i ]) ' *'
r r (36)

Replacing the voltage vectors expressed in rotating general reference frame, it can be
shown that equation (36) can be expressed as:

3 2 3 2 3 Lls 2 L' 2 2
Pe = rs is + rr ir' + p is + lr ir' + L m is + ir'
2 2 2 2 2
(37)
3
2
[ 2
]
+ Re jω(Lls + L m )is + L m ir is* + j(ω − ωr)(Lls + L m )ir'
2
+ L misi'*
r

Equation (37) can be divided into three terms:

(i) Power dissipated in stator and rotor resistances


(ii) Time rate of change of stored energy
(iii) Power conversion from electrical to mechanical – responsible for torque
production

Pmech =
3
2
[ 2
] 2
Re jω(Lls + L m )is + L m ir is* + j(ω − ωr)(Lls + L m )ir' + L misi'*
r (38)

The first and third terms of (38) have only imaginary components. Thus,

Pmech =
3
2
{ [ ]
Re jω(L m ir is* + j(ω − ωr)L misi'*
r =
3
2
} { [
Re jω(L m ir is* + L misi'*
r ]
− jωrL misi'*
r } (39)

Since the term L m ir is* + L misi'*


r has no imaginary part, the mechanical power reduces to:

Pmech = −
3
2
{
Re jωrL misi'*
r } (40)

Which can also be written as:

Pmech =
3
2
{
Im ωrL misi'*
r } (41)

OR

Pmech =
3
2
[
ωrL m iqsi'dr − idsi'qr ] (42)

The mechanical power is the product of torque and speed, and the mechanical rotor speed is
related to the rotor speed as ωr = (p/2)ωrm , thus from (42)

Te =
3 p
2 2
[
L m iqsi'dr − idsi'qr ] (43)

7
Simulation of induction machine (IM) with MATLAB/SIMULINK

For the purpose of simulation and microprocessor implementation, the space vectors
representation of the induction machine is converted to its equivalent d-q axis form.
Transforming equations (30)–(33) to their equivalent d-q axis forms in stationary
reference frame (ωg = 0), and re-arranging them into matrix form, the following is
obtained:

v sd R s + sLs 0 sL m 0 isd
v sq 0 R s + sLs 0 sL m i
= ⋅ sq (44)
v rd sL m ωrL m R r + sLr ωrLr ird
v rq − ωrL m sL m − ωrLr R r + sLr irq

‘s’in (44) represents the derivative operator d/dt. The space vectors equations can also
be put into state space forms with the choice of flux linkages or currents as state
variables. If the stator and rotor currents are chosen as the state variables, re-
arranging (44) the IM equation can be written as:

isd R sL r − ωr L2misq − R rL m − ωr L m L r isd − Lr 0


isq 1 ωL 2
R sLr ωr L m L r − R rL m i 1 0 Lr v sd
= r m
⋅ sq + ⋅ (45)
ird 2
Lm − Lr Ls − R sL m ω r L m Ls R r Ls ωr Lr Ls ird 2
Lm − Lr Ls Lm 0 v sq
irq − ωr L m Ls − R sL m − ω r L r Ls R r Ls irq 0 Lm

Equations (43),(45) along with the mechanical torque equation, can be used to simulate the
IM using SIMULINK. The SIMULINK blocks used to simulate the IM is shown in Figure 4.

1
1 isd
5
Va
Vd 2
q isq

Mux In1 Out1 Demux


2
3to2 Mux IM1
Vb 3
Demux
ird

6
irq

8
3
Te
Vc

7
-K- 1/s
Vq T load
1/J Integrator
Sum Constant

-K- -K-

Gain2 1/J1
4 -K-
speed Gain1

Figure 4

8
http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl

Model {
Name "constant_vhz"
Version 5.0
SaveDefaultBlockParams on
SampleTimeColors off
LibraryLinkDisplay "none"
WideLines off
ShowLineDimensions off
ShowPortDataTypes off
ShowLoopsOnError on
IgnoreBidirectionalLines off
ShowStorageClass off
ExecutionOrder off
RecordCoverage off
CovPath "/"
CovSaveName "covdata"
CovMetricSettings "dw"
CovNameIncrementing off
CovHtmlReporting on
covSaveCumulativeToWorkspaceVar on
CovSaveSingleToWorkspaceVar on
CovCumulativeVarName "covCumulativeData"
CovCumulativeReport off
DataTypeOverride "UseLocalSettings"
MinMaxOverflowLogging "UseLocalSettings"
MinMaxOverflowArchiveMode "Overwrite"
BlockNameDataTip off
BlockParametersDataTip off
BlockDescriptionStringDataTip off
ToolBar on
StatusBar on
BrowserShowLibraryLinks off
BrowserLookUnderMasks off
Created "Tue Oct 01 11:07:25 2002"
UpdateHistory "UpdateHistoryNever"
ModifiedByFormat "%<Auto>"
ModifiedDateFormat "%<Auto>"
LastModifiedDate "Mon Sep 13 15:37:48 2004"
ModelVersionFormat "1.%<AutoIncrement:14>"
ConfigurationManager "none"
SimParamPage "Solver"
LinearizationMsg "none"
Profile off
ParamWorkspaceSource "MATLABWorkspace"
AccelSystemTargetFile "accel.tlc"
AccelTemplateMakefile "accel_default_tmf"
AccelMakeCommand "make_rtw"
TryForcingSFcnDF off
ExtModeMexFile "ext_comm"
ExtModeBatchMode off
ExtModeTrigType "manual"
ExtModeTrigMode "normal"
ExtModeTrigPort "1"
ExtModeTrigElement "any"
ExtModeTrigDuration 1000
ExtModeTrigHoldOff 0
ExtModeTrigDelay 0
ExtModeTrigDirection "rising"
ExtModeTrigLevel 0
ExtModeArchiveMode "off"
ExtModeAutoIncOneShot off
ExtModeIncDirWhenArm off
ExtModeAddSuffixToVar off
ExtModeWriteAllDataToWs off
ExtModeArmWhenConnect on

http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl (1 von 28) [17.05.2005 17:15:21]


http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl

ExtModeSkipDownloadWhenConnect off
ExtModeLogAll on
ExtModeAutoUpdateStatusClock on
BufferReuse on
RTWExpressionDepthLimit 5
SimulationMode "normal"
Solver "ode5"
SolverMode "Auto"
StartTime "0.0"
StopTime "1000"
MaxOrder 5
MaxStep "0.0001"
MinStep "0.00001"
MaxNumMinSteps "-1"
InitialStep "0.00001"
FixedStep "10e-6"
RelTol "1e-3"
AbsTol "auto"
OutputOption "RefineOutputTimes"
OutputTimes "[]"
Refine "1"
LoadExternalInput off
ExternalInput "[t, u]"
LoadInitialState off
InitialState "xInitial"
SaveTime off
TimeSaveName "t"
SaveState off
StateSaveName "xout"
SaveOutput off
OutputSaveName "yout"
SaveFinalState off
FinalStateName "xFinal"
SaveFormat "Array"
Decimation "1"
LimitDataPoints off
MaxDataPoints "10000000"
SignalLoggingName "sigsOut"
ConsistencyChecking "none"
ArrayBoundsChecking "none"
AlgebraicLoopMsg "warning"
BlockPriorityViolationMsg "warning"
MinStepSizeMsg "warning"
InheritedTsInSrcMsg "warning"
DiscreteInheritContinuousMsg "warning"
MultiTaskRateTransMsg "error"
SingleTaskRateTransMsg "none"
CheckForMatrixSingularity "none"
IntegerOverflowMsg "warning"
Int32ToFloatConvMsg "warning"
ParameterDowncastMsg "error"
ParameterOverflowMsg "error"
ParameterPrecisionLossMsg "warning"
UnderSpecifiedDataTypeMsg "none"
UnnecessaryDatatypeConvMsg "none"
VectorMatrixConversionMsg "none"
InvalidFcnCallConnMsg "error"
SignalLabelMismatchMsg "none"
UnconnectedInputMsg "warning"
UnconnectedOutputMsg "warning"
UnconnectedLineMsg "warning"
SfunCompatibilityCheckMsg "none"
RTWInlineParameters off
BlockReductionOpt off
BooleanDataType off

http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl (2 von 28) [17.05.2005 17:15:21]


http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl

ConditionallyExecuteInputs on
ParameterPooling on
OptimizeBlockIOStorage on
ZeroCross on
AssertionControl "UseLocalSettings"
ProdHWDeviceType "Microprocessor"
ProdHWWordLengths "8,16,32,32"
RTWSystemTargetFile "grt.tlc"
RTWTemplateMakefile "grt_default_tmf"
RTWMakeCommand "make_rtw"
RTWGenerateCodeOnly off
RTWRetainRTWFile off
TLCProfiler off
TLCDebug off
TLCCoverage off
TLCAssertion off
BlockDefaults {
Orientation "right"
ForegroundColor "black"
BackgroundColor "white"
DropShadow off
NamePlacement "normal"
FontName "Helvetica"
FontSize 10
FontWeight "normal"
FontAngle "normal"
ShowName on
}
BlockParameterDefaults {
Block {
BlockType Constant
Value "1"
VectorParams1D on
ShowAdditionalParam off
OutDataTypeMode "Inherit from 'Constant value'"
OutDataType "sfix(16)"
ConRadixGroup "Use specified scaling"
OutScaling "2^0"
}
Block {
BlockType Demux
Outputs "4"
DisplayOption "none"
BusSelectionMode off
}
Block {
BlockType ElementaryMath
Operator "sin"
}
Block {
BlockType Gain
Gain "1"
Multiplication "Element-wise(K.*u)"
ShowAdditionalParam off
ParameterDataTypeMode "Same as input"
ParameterDataType "sfix(16)"
ParameterScalingMode "Best Precision: Matrix-wise"
ParameterScaling "2^0"
OutDataTypeMode "Same as input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
}

http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl (3 von 28) [17.05.2005 17:15:21]


http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl

Block {
BlockType Inport
Port "1"
PortDimensions "-1"
SampleTime "-1"
ShowAdditionalParam off
LatchInput off
DataType "auto"
OutDataType "sfix(16)"
OutScaling "2^0"
SignalType "auto"
SamplingMode "auto"
Interpolate on
}
Block {
BlockType Integrator
ExternalReset "none"
InitialConditionSource "internal"
InitialCondition "0"
LimitOutput off
UpperSaturationLimit "inf"
LowerSaturationLimit "-inf"
ShowSaturationPort off
ShowStatePort off
AbsoluteTolerance "auto"
ZeroCross on
}
Block {
BlockType Mux
Inputs "4"
DisplayOption "none"
}
Block {
BlockType Outport
Port "1"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Block {
BlockType Product
Inputs "2"
Multiplication "Element-wise(.*)"
ShowAdditionalParam off
InputSameDT on
OutDataTypeMode "Same as first input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
}
Block {
BlockType RateLimiter
RisingSlewLimit "1"
FallingSlewLimit "-1"
LinearizeAsGain on
}
Block {
BlockType Scope
Floating off
ModelBased off
TickLabels "OneTimeTick"
ZoomMode "on"
Grid "on"
TimeRange "auto"

http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl (4 von 28) [17.05.2005 17:15:21]


http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl

YMin "-5"
YMax "5"
SaveToWorkspace off
SaveName "ScopeData"
LimitDataPoints on
MaxDataPoints "5000"
Decimation "1"
SampleInput off
SampleTime "0"
}
Block {
BlockType "S-Function"
FunctionName "system"
PortCounts "[]"
SFunctionModules "''"
}
Block {
BlockType SubSystem
ShowPortLabels on
Permissions "ReadWrite"
RTWSystemCode "Auto"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
SimViewingDevice off
DataTypeOverride "UseLocalSettings"
MinMaxOverflowLogging "UseLocalSettings"
}
Block {
BlockType Sum
IconShape "rectangular"
Inputs "++"
ShowAdditionalParam off
InputSameDT on
OutDataTypeMode "Same as first input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
}
Block {
BlockType Switch
Criteria "u2 >= Threshold"
Threshold "0"
ShowAdditionalParam off
InputSameDT on
OutDataTypeMode "Inherit via internal rule"
RndMeth "Floor"
SaturateOnIntegerOverflow on
ZeroCross on
}
}
AnnotationDefaults {
HorizontalAlignment "center"
VerticalAlignment "middle"
ForegroundColor "black"
BackgroundColor "white"
DropShadow off
FontName "Helvetica"
FontSize 10
FontWeight "normal"
FontAngle "normal"
}
LineDefaults {
FontName "Helvetica"

http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl (5 von 28) [17.05.2005 17:15:21]


http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl

FontSize 9
FontWeight "normal"
FontAngle "normal"
}
System {
Name "constant_vhz"
Location [2, 82, 790, 584]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
ReportName "simulink-default.rpt"
Block {
BlockType Constant
Name "Constant"
Position [35, 121, 75, 139]
Value "50"
}
Block {
BlockType SubSystem
Name "Constant V/Hz"
Ports [2, 3]
Position [270, 88, 335, 172]
TreatAsAtomicUnit off
MaskPromptString "Vm at rated frequency"
MaskStyleString "edit"
MaskTunableValueString "on"
MaskEnableString "on"
MaskVisibilityString "on"
MaskToolTipString "on"
MaskVariables "Vm=@1;"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "240"
System {
Name "Constant V/Hz"
Location [2, 70, 798, 552]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "88"
Block {
BlockType Inport
Name "In1"
Position [30, 93, 60, 107]
}
Block {
BlockType Inport
Name "boost"
Position [20, 403, 50, 417]
Port "2"
}
Block {

http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl (6 von 28) [17.05.2005 17:15:21]


http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl

BlockType Constant
Name "Constant1"
Position [195, 371, 235, 389]
Value "(2*pi)/3"
}
Block {
BlockType SubSystem
Name "Dot Product1"
Ports [2, 1]
Position [400, 307, 430, 343]
TreatAsAtomicUnit off
MaskType "Dot Product"
MaskDescription "Inner (dot) product.\ny=sum(u1.*u2) "
MaskHelp "Computes the inner (dot) product of the inp"
"uts: sum(u1.*u2). The inputs are vectors of the same length. Output is a sca"
"lar."
MaskInitialization "t=(0:.1:2*pi)';\nx=cos(t);\ny=sin(t);"
MaskDisplay "plot(0,0,1,1,x*[0.025 0.07]+0.5,y*[0.025 0."
"07]+0.5)"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "normalized"
System {
Name "Dot Product1"
Location [33, 479, 253, 634]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "in_1"
Position [15, 25, 35, 45]
}
Block {
BlockType Inport
Name "in_2"
Position [15, 90, 35, 110]
Port "2"
}
Block {
BlockType Product
Name "Product"
Ports [2, 1]
Position [65, 55, 90, 75]
}
Block {
BlockType Sum
Name "Sum"
Ports [1, 1]
Position [125, 55, 145, 75]
Inputs "+"
}
Block {
BlockType Outport
Name "out_1"
Position [185, 55, 205, 75]
InitialOutput "0"
}

http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl (7 von 28) [17.05.2005 17:15:21]


http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl

Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "out_1"
DstPort 1
}
Line {
SrcBlock "Product"
SrcPort 1
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "in_1"
SrcPort 1
DstBlock "Product"
DstPort 1
}
Line {
SrcBlock "in_2"
SrcPort 1
DstBlock "Product"
DstPort 2
}
}
}
Block {
BlockType SubSystem
Name "Dot Product2"
Ports [2, 1]
Position [340, 72, 370, 108]
TreatAsAtomicUnit off
MaskType "Dot Product"
MaskDescription "Inner (dot) product.\ny=sum(u1.*u2) "
MaskHelp "Computes the inner (dot) product of the inp"
"uts: sum(u1.*u2). The inputs are vectors of the same length. Output is a sca"
"lar."
MaskInitialization "t=(0:.1:2*pi)';\nx=cos(t);\ny=sin(t);"
MaskDisplay "plot(0,0,1,1,x*[0.025 0.07]+0.5,y*[0.025 0."
"07]+0.5)"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "normalized"
System {
Name "Dot Product2"
Location [33, 479, 253, 634]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "in_1"
Position [15, 25, 35, 45]
}
Block {
BlockType Inport
Name "in_2"
Position [15, 90, 35, 110]

http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl (8 von 28) [17.05.2005 17:15:21]


http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl

Port "2"
}
Block {
BlockType Product
Name "Product"
Ports [2, 1]
Position [65, 55, 90, 75]
}
Block {
BlockType Sum
Name "Sum"
Ports [1, 1]
Position [125, 55, 145, 75]
Inputs "+"
}
Block {
BlockType Outport
Name "out_1"
Position [185, 55, 205, 75]
InitialOutput "0"
}
Line {
SrcBlock "in_2"
SrcPort 1
DstBlock "Product"
DstPort 2
}
Line {
SrcBlock "in_1"
SrcPort 1
DstBlock "Product"
DstPort 1
}
Line {
SrcBlock "Product"
SrcPort 1
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "out_1"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "Dot Product3"
Ports [2, 1]
Position [385, 467, 415, 503]
TreatAsAtomicUnit off
MaskType "Dot Product"
MaskDescription "Inner (dot) product.\ny=sum(u1.*u2) "
MaskHelp "Computes the inner (dot) product of the inp"
"uts: sum(u1.*u2). The inputs are vectors of the same length. Output is a sca"
"lar."
MaskInitialization "t=(0:.1:2*pi)';\nx=cos(t);\ny=sin(t);"
MaskDisplay "plot(0,0,1,1,x*[0.025 0.07]+0.5,y*[0.025 0."
"07]+0.5)"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "normalized"

http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl (9 von 28) [17.05.2005 17:15:21]


http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl

System {
Name "Dot Product3"
Location [33, 479, 253, 634]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "in_1"
Position [15, 25, 35, 45]
}
Block {
BlockType Inport
Name "in_2"
Position [15, 90, 35, 110]
Port "2"
}
Block {
BlockType Product
Name "Product"
Ports [2, 1]
Position [65, 55, 90, 75]
}
Block {
BlockType Sum
Name "Sum"
Ports [1, 1]
Position [125, 55, 145, 75]
Inputs "+"
}
Block {
BlockType Outport
Name "out_1"
Position [185, 55, 205, 75]
InitialOutput "0"
}
Line {
SrcBlock "in_2"
SrcPort 1
DstBlock "Product"
DstPort 2
}
Line {
SrcBlock "in_1"
SrcPort 1
DstBlock "Product"
DstPort 1
}
Line {
SrcBlock "Product"
SrcPort 1
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "out_1"
DstPort 1

http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl (10 von 28) [17.05.2005 17:15:21]


http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl

}
}
}
Block {
BlockType ElementaryMath
Name "Elementary\nMath"
Ports [1, 1]
Position [275, 85, 305, 115]
}
Block {
BlockType ElementaryMath
Name "Elementary\nMath1"
Ports [1, 1]
Position [335, 320, 365, 350]
}
Block {
BlockType ElementaryMath
Name "Elementary\nMath2"
Ports [1, 1]
Position [320, 480, 350, 510]
}
Block {
BlockType Gain
Name "Gain"
Position [150, 85, 180, 115]
Gain "2*pi"
}
Block {
BlockType Gain
Name "Gain1"
Position [150, 25, 180, 55]
Gain "Vm/50"
}
Block {
BlockType Gain
Name "Gain2"
Position [170, 320, 200, 350]
Gain "2*pi"
}
Block {
BlockType Gain
Name "Gain3"
Position [170, 235, 200, 265]
Gain "Vm/50"
}
Block {
BlockType Gain
Name "Gain4"
Position [160, 480, 190, 510]
Gain "2*pi"
}
Block {
BlockType Gain
Name "Gain5"
Position [160, 420, 190, 450]
Gain "Vm/50"
}
Block {
BlockType Integrator
Name "Integrator"
Ports [1, 1]
Position [210, 85, 240, 115]
}
Block {
BlockType Integrator

http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl (11 von 28) [17.05.2005 17:15:21]


http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl

Name "Integrator1"
Ports [1, 1]
Position [230, 320, 260, 350]
}
Block {
BlockType Integrator
Name "Integrator2"
Ports [1, 1]
Position [220, 480, 250, 510]
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [285, 325, 305, 345]
ShowName off
IconShape "round"
Inputs "|+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1]
Position [285, 485, 305, 505]
ShowName off
IconShape "round"
Inputs "++|"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
}
Block {
BlockType Sum
Name "Sum2"
Ports [2, 1]
Position [275, 240, 295, 260]
ShowName off
IconShape "round"
Inputs "++|"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
}
Block {
BlockType Sum
Name "Sum3"
Ports [2, 1]
Position [245, 30, 265, 50]
ShowName off
IconShape "round"
Inputs "++|"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
}
Block {
BlockType Sum
Name "Sum4"
Ports [2, 1]
Position [325, 425, 345, 445]
ShowName off
IconShape "round"
Inputs "++|"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
}

http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl (12 von 28) [17.05.2005 17:15:21]


http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl

Block {
BlockType Outport
Name "Out1"
Position [395, 83, 425, 97]
}
Block {
BlockType Outport
Name "Out2"
Position [455, 318, 485, 332]
Port "2"
}
Block {
BlockType Outport
Name "Out3"
Position [440, 478, 470, 492]
Port "3"
}
Line {
SrcBlock "Integrator"
SrcPort 1
DstBlock "Elementary\nMath"
DstPort 1
}
Line {
SrcBlock "Elementary\nMath"
SrcPort 1
DstBlock "Dot Product2"
DstPort 2
}
Line {
SrcBlock "Gain"
SrcPort 1
DstBlock "Integrator"
DstPort 1
}
Line {
SrcBlock "Elementary\nMath1"
SrcPort 1
DstBlock "Dot Product1"
DstPort 2
}
Line {
SrcBlock "Gain2"
SrcPort 1
DstBlock "Integrator1"
DstPort 1
}
Line {
SrcBlock "Elementary\nMath2"
SrcPort 1
DstBlock "Dot Product3"
DstPort 2
}
Line {
SrcBlock "Gain4"
SrcPort 1
DstBlock "Integrator2"
DstPort 1
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Elementary\nMath1"
DstPort 1
}

http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl (13 von 28) [17.05.2005 17:15:21]


http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl

Line {
SrcBlock "Integrator1"
SrcPort 1
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "Constant1"
SrcPort 1
Points [0, 0; 55, 0]
Branch {
Points [0, -20]
DstBlock "Sum"
DstPort 2
}
Branch {
Points [5, 0; 0, 90]
DstBlock "Sum1"
DstPort 1
}
}
Line {
SrcBlock "Sum1"
SrcPort 1
DstBlock "Elementary\nMath2"
DstPort 1
}
Line {
SrcBlock "Integrator2"
SrcPort 1
DstBlock "Sum1"
DstPort 2
}
Line {
SrcBlock "In1"
SrcPort 1
Points [0, 0; 15, 0]
Branch {
Points [15, 0]
Branch {
DstBlock "Gain"
DstPort 1
}
Branch {
Points [0, -60]
DstBlock "Gain1"
DstPort 1
}
}
Branch {
Points [0, 235]
Branch {
Points [35, 0]
Branch {
Points [0, -85]
DstBlock "Gain3"
DstPort 1
}
Branch {
DstBlock "Gain2"
DstPort 1
}
}
Branch {
Points [0, 160; 25, 0]

http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl (14 von 28) [17.05.2005 17:15:21]


http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl

Branch {
DstBlock "Gain4"
DstPort 1
}
Branch {
Points [0, -60]
DstBlock "Gain5"
DstPort 1
}
}
}
}
Line {
SrcBlock "Dot Product2"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "Dot Product1"
SrcPort 1
DstBlock "Out2"
DstPort 1
}
Line {
SrcBlock "Dot Product3"
SrcPort 1
DstBlock "Out3"
DstPort 1
}
Line {
SrcBlock "Gain3"
SrcPort 1
DstBlock "Sum2"
DstPort 2
}
Line {
SrcBlock "Sum2"
SrcPort 1
Points [40, 0; 0, 65]
DstBlock "Dot Product1"
DstPort 1
}
Line {
SrcBlock "Gain1"
SrcPort 1
DstBlock "Sum3"
DstPort 2
}
Line {
SrcBlock "Sum3"
SrcPort 1
Points [25, 0; 0, 40]
DstBlock "Dot Product2"
DstPort 1
}
Line {
SrcBlock "Gain5"
SrcPort 1
DstBlock "Sum4"
DstPort 2
}
Line {
SrcBlock "Sum4"
SrcPort 1

http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl (15 von 28) [17.05.2005 17:15:21]


http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl

Points [10, 0; 0, 40]


DstBlock "Dot Product3"
DstPort 1
}
Line {
SrcBlock "boost"
SrcPort 1
Points [70, 0]
Branch {
DstBlock "Sum4"
DstPort 1
}
Branch {
Points [0, -220]
Branch {
Points [0, -175]
DstBlock "Sum3"
DstPort 1
}
Branch {
Points [160, 0]
DstBlock "Sum2"
DstPort 1
}
}
}
}
}
Block {
BlockType Constant
Name "Constant1"
Position [60, 280, 90, 300]
Value "50"
}
Block {
BlockType Constant
Name "Constant2"
Position [60, 230, 90, 250]
Value "0"
}
Block {
BlockType Gain
Name "Gain"
Position [335, 35, 365, 65]
Gain "(2*pi)/2"
}
Block {
BlockType SubSystem
Name "Induction Machine"
Ports [3, 8]
Position [470, 63, 525, 192]
TreatAsAtomicUnit off
MaskPromptString "Stator resistance (ohm)|Rotor resistance (ohm)|"
"Stator self inductance (H)|Rotor self inductance (H)|Mutual Inductance (H)|No"
" of poles|Moment of inertia (kg.m^2)|Load torque (Nm)|Load constant"
MaskStyleString "edit,edit,edit,edit,edit,edit,edit,edit,edit"
MaskTunableValueString "on,on,on,on,on,on,on,on,on"
MaskCallbackString "||||||||"
MaskEnableString "on,on,on,on,on,on,on,on,on"
MaskVisibilityString "on,on,on,on,on,on,on,on,on"
MaskToolTipString "on,on,on,on,on,on,on,on,on"
MaskVarAliasString ",,,,,,,,"
MaskVariables "Rs=@1;Rr=@2;Ls=@3;Lr=@4;Lm=@5;pole=@6;J=@7;Tloa"
"d=@8;load_C=@9;"
MaskIconFrame on

http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl (16 von 28) [17.05.2005 17:15:21]


http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl

MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "5.5|4.51|306.5e-3|306.5e-3|291.9e-3|4|0.02|0.01"
"|0.1"
System {
Name "Induction Machine"
Location [2, 70, 798, 552]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "Va"
Position [25, 40, 45, 60]
}
Block {
BlockType Inport
Name "Vb"
Position [25, 120, 45, 140]
Port "2"
}
Block {
BlockType Inport
Name "Vc"
Position [25, 240, 45, 260]
Port "3"
}
Block {
BlockType Gain
Name "1/J"
Position [260, 292, 285, 318]
Orientation "left"
Gain "pole/(2*J)"
SaturateOnIntegerOverflow off
}
Block {
BlockType SubSystem
Name "3to2"
Ports [3, 2]
Position [105, 81, 135, 139]
ShowPortLabels off
TreatAsAtomicUnit off
System {
Name "3to2"
Location [4, 74, 628, 500]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "in_1"
Position [15, 50, 35, 70]

http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl (17 von 28) [17.05.2005 17:15:21]


http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl

}
Block {
BlockType Inport
Name "in_2"
Position [15, 115, 35, 135]
Port "2"
}
Block {
BlockType Inport
Name "in_3"
Position [15, 180, 35, 200]
Port "3"
}
Block {
BlockType Gain
Name "Gain3"
Position [120, 248, 160, 272]
Gain "0.577"
}
Block {
BlockType Gain
Name "Gain4"
Position [120, 298, 160, 322]
Gain "-0.577"
}
Block {
BlockType Gain
Name "Gain5"
Position [145, 143, 185, 167]
Gain "-0.33333"
}
Block {
BlockType Gain
Name "Gain6"
Position [140, 183, 180, 207]
Gain "-0.33333"
}
Block {
BlockType Gain
Name "Gain7"
Position [135, 63, 175, 87]
Gain "0.66666"
}
Block {
BlockType Sum
Name "Ib"
Ports [2, 1]
Position [240, 255, 260, 275]
}
Block {
BlockType Sum
Name "Ib1"
Ports [3, 1]
Position [260, 87, 280, 123]
Inputs "+++"
}
Block {
BlockType Outport
Name "d"
Position [330, 60, 350, 80]
InitialOutput "0"
}
Block {
BlockType Outport
Name "q"

http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl (18 von 28) [17.05.2005 17:15:21]


http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl

Position [310, 250, 330, 270]


Port "2"
InitialOutput "0"
}
Line {
SrcBlock "Ib1"
SrcPort 1
Points [15, 0; 0, -35]
DstBlock "d"
DstPort 1
}
Line {
SrcBlock "Gain7"
SrcPort 1
Points [30, 0; 0, 20]
DstBlock "Ib1"
DstPort 1
}
Line {
SrcBlock "in_1"
SrcPort 1
Points [40, 0; 0, 15]
DstBlock "Gain7"
DstPort 1
}
Line {
SrcBlock "Gain6"
SrcPort 1
Points [30, 0; 0, -90]
DstBlock "Ib1"
DstPort 2
}
Line {
SrcBlock "Gain5"
SrcPort 1
Points [25, 0; 0, -40]
DstBlock "Ib1"
DstPort 3
}
Line {
SrcBlock "in_3"
SrcPort 1
Points [40, 0; 0, 5]
Branch {
DstBlock "Gain6"
DstPort 1
}
Branch {
Points [0, 115]
DstBlock "Gain4"
DstPort 1
}
}
Line {
SrcBlock "in_2"
SrcPort 1
Points [20, 0; 0, 30]
Branch {
DstBlock "Gain5"
DstPort 1
}
Branch {
Points [0, 105]
DstBlock "Gain3"
DstPort 1

http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl (19 von 28) [17.05.2005 17:15:21]


http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl

}
}
Line {
SrcBlock "Gain3"
SrcPort 1
DstBlock "Ib"
DstPort 1
}
Line {
SrcBlock "Gain4"
SrcPort 1
Points [30, 0; 0, -40]
DstBlock "Ib"
DstPort 2
}
Line {
SrcBlock "Ib"
SrcPort 1
DstBlock "q"
DstPort 1
}
}
}
Block {
BlockType Constant
Name "Constant"
Position [630, 306, 670, 324]
Orientation "left"
Value "Tload"
}
Block {
BlockType Demux
Name "Demux"
Ports [1, 5]
Position [420, 91, 460, 149]
Outputs "5"
}
Block {
BlockType Gain
Name "Gain1"
Position [150, 407, 175, 433]
Orientation "left"
Gain "2/pole"
}
Block {
BlockType SubSystem
Name "IM1"
Ports [1, 1]
Position [320, 106, 380, 134]
TreatAsAtomicUnit off
System {
Name "IM1"
Location [248, 340, 468, 422]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"

http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl (20 von 28) [17.05.2005 17:15:21]


http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl

Position [25, 33, 55, 47]


}
Block {
BlockType "S-Function"
Name "S-Function"
Ports [1, 1]
Position [80, 25, 140, 55]
FunctionName "imch"
Parameters "Rs, Rr, Ls,Lr,Lm,pole"
}
Block {
BlockType Outport
Name "Out1"
Position [165, 33, 195, 47]
InitialOutput "0"
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "S-Function"
DstPort 1
}
Line {
SrcBlock "S-Function"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
}
}
Block {
BlockType Integrator
Name "Integrator"
Ports [1, 1]
Position [360, 295, 380, 315]
Orientation "left"
}
Block {
BlockType Mux
Name "Mux"
Ports [3, 1]
Position [260, 104, 290, 136]
Inputs "3"
}
Block {
BlockType Sum
Name "Sum"
Ports [3, 1]
Position [440, 287, 460, 323]
Orientation "left"
Inputs "+--"
}
Block {
BlockType Gain
Name "load_C"
Position [375, 367, 400, 393]
Gain "load_C"
SaturateOnIntegerOverflow off
}
Block {
BlockType Outport
Name "isd"
Position [630, 25, 650, 45]
InitialOutput "0"
}

http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl (21 von 28) [17.05.2005 17:15:21]


http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl

Block {
BlockType Outport
Name "isq"
Position [625, 70, 645, 90]
Port "2"
InitialOutput "0"
}
Block {
BlockType Outport
Name "ird"
Position [600, 140, 620, 160]
Port "3"
InitialOutput "0"
}
Block {
BlockType Outport
Name "speed"
Position [90, 410, 110, 430]
Orientation "left"
Port "4"
InitialOutput "0"
}
Block {
BlockType Outport
Name "Vd"
Position [265, 50, 285, 70]
Port "5"
InitialOutput "0"
}
Block {
BlockType Outport
Name "irq"
Position [595, 185, 615, 205]
Port "6"
InitialOutput "0"
}
Block {
BlockType Outport
Name "Vq"
Position [90, 285, 110, 305]
Orientation "left"
Port "7"
InitialOutput "0"
}
Block {
BlockType Outport
Name "Te"
Position [715, 230, 735, 250]
Port "8"
InitialOutput "0"
}
Line {
SrcBlock "Demux"
SrcPort 1
Points [60, 0; 0, -20]
DstBlock "isq"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 2
Points [65, 0; 0, -75]
DstBlock "isd"
DstPort 1
}

http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl (22 von 28) [17.05.2005 17:15:21]


http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl

Line {
SrcBlock "3to2"
SrcPort 2
Points [0, 0]
Branch {
Points [0, 170]
DstBlock "Vq"
DstPort 1
}
Branch {
Points [55, 0; 0, -15]
DstBlock "Mux"
DstPort 1
}
}
Line {
SrcBlock "3to2"
SrcPort 1
Points [0, 0; 25, 0]
Branch {
Points [0, -35]
DstBlock "Vd"
DstPort 1
}
Branch {
Points [30, 0; 0, 25]
DstBlock "Mux"
DstPort 2
}
}
Line {
SrcBlock "Demux"
SrcPort 5
Points [45, 0; 0, 145]
Branch {
Points [0, 15; -35, 0]
DstBlock "Sum"
DstPort 1
}
Branch {
Points [70, 0; 0, -45]
DstBlock "Te"
DstPort 1
}
}
Line {
SrcBlock "Vc"
SrcPort 1
Points [20, 0; 0, -120]
DstBlock "3to2"
DstPort 3
}
Line {
SrcBlock "Vb"
SrcPort 1
Points [20, 0; 0, -20]
DstBlock "3to2"
DstPort 2
}
Line {
SrcBlock "Va"
SrcPort 1
Points [20, 0; 0, 40]
DstBlock "3to2"
DstPort 1

http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl (23 von 28) [17.05.2005 17:15:21]


http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl

}
Line {
SrcBlock "1/J"
SrcPort 1
Points [0, 0; -25, 0]
Branch {
Points [0, -175]
DstBlock "Mux"
DstPort 3
}
Branch {
Points [-15, 0; 0, 75]
Branch {
Points [0, 40]
DstBlock "Gain1"
DstPort 1
}
Branch {
DstBlock "load_C"
DstPort 1
}
}
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "IM1"
DstPort 1
}
Line {
SrcBlock "IM1"
SrcPort 1
DstBlock "Demux"
DstPort 1
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Integrator"
DstPort 1
}
Line {
SrcBlock "Integrator"
SrcPort 1
DstBlock "1/J"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 3
Points [30, 0; 0, 75]
DstBlock "irq"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 4
Points [25, 0; 0, 20]
DstBlock "ird"
DstPort 1
}
Line {
SrcBlock "Gain1"
SrcPort 1
Points [0, 0]

http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl (24 von 28) [17.05.2005 17:15:21]


http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl

DstBlock "speed"
DstPort 1
}
Line {
SrcBlock "load_C"
SrcPort 1
Points [145, 0; 0, -75]
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "Constant"
SrcPort 1
DstBlock "Sum"
DstPort 3
}
Annotation {
Name "q"
Position [482, 87]
VerticalAlignment "top"
}
}
}
Block {
BlockType Reference
Name "Manual Switch"
Ports [2, 1]
Position [150, 232, 180, 268]
SourceBlock "simulink/Signal\nRouting/Manual Switch"
SourceType "Manual Switch"
sw "0"
action "0"
}
Block {
BlockType Mux
Name "Mux"
Ports [2, 1]
Position [660, 41, 665, 79]
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType RateLimiter
Name "Rate Limiter"
Position [170, 115, 200, 145]
RisingSlewLimit "50"
FallingSlewLimit "-50"
}
Block {
BlockType Scope
Name "Scope"
Ports [3]
Position [735, 104, 765, 136]
Location [357, 69, 795, 439]
Open on
NumInputPorts "3"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
axes2 "%<SignalLabel>"
axes3 "%<SignalLabel>"
}
List {
ListType SelectedSignals

http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl (25 von 28) [17.05.2005 17:15:21]


http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl

axes1 ""
axes2 ""
axes3 ""
}
TimeRange "1.5"
YMin "-10~-20~-50"
YMax "80~20~50"
DataFormat "StructureWithTime"
}
Block {
BlockType Scope
Name "Scope1"
Ports [4]
Position [455, 271, 490, 364]
Location [6, 204, 444, 564]
Open on
NumInputPorts "4"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
axes2 "%<SignalLabel>"
axes3 "%<SignalLabel>"
axes4 "%<SignalLabel>"
}
List {
ListType SelectedSignals
axes1 ""
axes2 ""
axes3 ""
axes4 ""
}
TimeRange "1.5"
YMin "-400~-400~-400~-5"
YMax "400~400~400~60"
SaveName "ScopeData1"
DataFormat "StructureWithTime"
}
Block {
BlockType Reference
Name "Slider\nGain1"
Ports [1, 1]
Position [100, 115, 130, 145]
SourceBlock "simulink/Math\nOperations/Slider\nGain"
SourceType "Slider Gain"
low "0"
gain "0.07"
high "1"
}
Line {
SrcBlock "Induction Machine"
SrcPort 8
Points [55, 0; 0, -60]
DstBlock "Scope"
DstPort 2
}
Line {
SrcBlock "Induction Machine"
SrcPort 2
Points [190, 0]
DstBlock "Scope"
DstPort 3
}
Line {
SrcBlock "Slider\nGain1"
SrcPort 1

http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl (26 von 28) [17.05.2005 17:15:21]


http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl

DstBlock "Rate Limiter"


DstPort 1
}
Line {
SrcBlock "Constant"
SrcPort 1
DstBlock "Slider\nGain1"
DstPort 1
}
Line {
SrcBlock "Constant V/Hz"
SrcPort 2
Points [0, 0; 70, 0]
Branch {
DstBlock "Induction Machine"
DstPort 2
}
Branch {
Points [0, 175]
DstBlock "Scope1"
DstPort 2
}
}
Line {
SrcBlock "Constant V/Hz"
SrcPort 1
Points [55, 0; 0, -20; 35, 0]
Branch {
DstBlock "Induction Machine"
DstPort 1
}
Branch {
Points [0, 195]
DstBlock "Scope1"
DstPort 1
}
}
Line {
SrcBlock "Constant V/Hz"
SrcPort 3
Points [0, 0; 40, 0]
Branch {
Points [15, 0; 0, 20]
DstBlock "Induction Machine"
DstPort 3
}
Branch {
Points [0, 175]
DstBlock "Scope1"
DstPort 3
}
}
Line {
SrcBlock "Rate Limiter"
SrcPort 1
Points [0, 0; 10, 0]
Branch {
Points [0, 225]
DstBlock "Scope1"
DstPort 4
}
Branch {
Points [25, 0]
Branch {
Points [15, 0]

http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl (27 von 28) [17.05.2005 17:15:21]


http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl

DstBlock "Constant V/Hz"


DstPort 1
}
Branch {
Points [0, -80]
DstBlock "Gain"
DstPort 1
}
}
}
Line {
SrcBlock "Constant1"
SrcPort 1
Points [0, -30]
DstBlock "Manual Switch"
DstPort 2
}
Line {
SrcBlock "Constant2"
SrcPort 1
DstBlock "Manual Switch"
DstPort 1
}
Line {
SrcBlock "Manual Switch"
SrcPort 1
Points [70, 0]
DstBlock "Constant V/Hz"
DstPort 2
}
Line {
SrcBlock "Mux"
SrcPort 1
Points [50, 0]
DstBlock "Scope"
DstPort 1
}
Line {
SrcBlock "Induction Machine"
SrcPort 4
Points [115, 0]
DstBlock "Mux"
DstPort 2
}
Line {
SrcBlock "Gain"
SrcPort 1
DstBlock "Mux"
DstPort 1
}
}
}

http://encon.fke.utm.my/courses/mep1422/constant_vhz.mdl (28 von 28) [17.05.2005 17:15:21]


http://encon.fke.utm.my/courses/mep1422/imch.c

/*
* sfuntmpl.c: Template C S-function source file.
*
* -------------------------------------------------------------------------
* | See matlabroot/simulink/src/sfuntmpl.doc for a more detailed template |
* -------------------------------------------------------------------------
*
* Copyright (c) 1990-97, by The MathWorks, Inc.
* All Rights Reserved
* $Revision 1.1 $
*/

/*
* You must specify the S_FUNCTION_NAME as the name of your S-function.
*/

#define S_FUNCTION_NAME imch

/* Input Arguments */

/*
* Need to include simstruc.h for the definition of the SimStruct and
* its associated macro definitions.
*/
/* #include "tmwtypes.h" */
#include "tmwtypes.h"
#include "simstruc.h"

#define Rs ssGetArg(S,0)
#define Rr ssGetArg(S,1)
#define Ls ssGetArg(S,2)
#define Lr ssGetArg(S,3)
#define Lm ssGetArg(S,4)
#define pole ssGetArg(S,5)

/*====================*
* S-function methods *
*====================*/

/* Function: mdlInitializeSizes ===============================================


* Abstract:
*
* The sizes information is used by SIMULINK to determine the S-function
* block's characteristics (number of inputs, outputs, states, etc.).
*
*/
static void mdlInitializeSizes(SimStruct *S)
{
ssSetNumContStates( S, 4); /* number of continuous states */
ssSetNumDiscStates( S, 0); /* number of discrete states */
ssSetNumInputs( S, 3); /* number of inputs */
ssSetNumOutputs( S, 5); /* number of outputs */
ssSetDirectFeedThrough(S, 0); /* direct feedthrough flag */
ssSetNumSampleTimes( S, 1); /* number of sample times */
ssSetNumInputArgs( S, 6);
ssSetNumRWork( S, 0); /* number of real work vector elements */
ssSetNumIWork( S, 0); /* number of integer work vector elements*/
ssSetNumPWork( S, 0); /* number of pointer work vector elements*/
ssSetNumModes( S, 0); /* number of mode work vector elements */
ssSetNumNonsampledZCs( S, 0); /* number of nonsampled zero crossings */
ssSetOptions( S, 0); /* general options (SS_OPTION_xx) */
}

http://encon.fke.utm.my/courses/mep1422/imch.c (1 von 3) [17.05.2005 17:15:22]


http://encon.fke.utm.my/courses/mep1422/imch.c

/* Function: mdlInitializeSampleTimes =========================================


*/
static void mdlInitializeSampleTimes(SimStruct *S)
{
ssSetSampleTime(S, 0, CONTINUOUS_SAMPLE_TIME);
ssSetOffsetTime(S, 0, 0.0);

/* Function: mdlInitializeConditions ==========================================


* Abstract:
*
* In this function, you should initialize the continuous and discrete
* states for your S-function block. The initial states are placed
* in the x0 variable. You can also perform any other initialization
* activities that your S-function may require.
*/
static void mdlInitializeConditions(real_T *x0, SimStruct *S)
{
int i;
for (i=0; i<4; i++){
*x0++ = 0.0;
}
}

/* Function: mdlOutputs =======================================================


* Abstract:
*
* In this function, you compute the outputs of your S-function
* block. The outputs are placed in the y variable.
*/
static void mdlOutputs(real_T *y, const real_T *x, const real_T *u,
SimStruct *S, int_T tid)
{
double lm;
double pl;
lm = mxGetPr(Lm)[0];
pl = mxGetPr(pole)[0];

y[0]=x[0];
y[1]=x[1];
y[2]=x[2];
y[3]=x[3];
y[4]=1.5*(pl/2)*lm*((x[0]*x[3])-(x[1]*x[2]));

static void mdlUpdate(real_T *x, const real_T *u, SimStruct *S, int_T tid)
{
}

/* Function: mdlDerivatives ===================================================


* Abstract:
*
* In this function, you compute the S-function block's derivatives.
* The derivatives are placed in the dx variable.
*/
static void mdlDerivatives(real_T *dx, const real_T *x, const real_T *u,

http://encon.fke.utm.my/courses/mep1422/imch.c (2 von 3) [17.05.2005 17:15:22]


http://encon.fke.utm.my/courses/mep1422/imch.c

SimStruct *S, int_T


tid)

/* x0=iq x1=id x2= iqr x3= idr u0=vq u1=vd u2=w */


{
double lr,ls,rr,rs,lm,a;

lm = mxGetPr(Lm)[0];
lr = mxGetPr(Lr)[0];
ls = mxGetPr(Ls)[0];
rr = mxGetPr(Rr)[0];
rs = mxGetPr(Rs)[0];

a=1/(lm*lm-lr*ls);

dx[0]=(u[2]*lm*lm*x[1]+rs*lr*x[0]+u[2]*lr*lm*x[3]-rr*lm*x[2]-lr*u[0])*a;

dx[1]=(rs*lr*x[1]-u[2]*lm*lm*x[0]-rr*lm*x[3]-u[2]*lr*lm*x[2]-lr*u[1])*a;

dx[2]=-(u[2]*lm*ls*x[1]+rs*lm*x[0]+u[2]*lr*ls*x[3]-rr*ls*x[2]-lm*u[0])*a;

dx[3]=-(rs*lm*x[1]-u[2]*lm*ls*x[0]-rr*ls*x[3]-u[2]*lr*ls*x[2]-lm*u[1])*a;

/* Function: mdlTerminate =====================================================


* Abstract:
*
* In this function, you should perform any actions that are necessary
* at the termination of a simulation. For example, if memory was allocated
* in mdlInitializeConditions, this is the place to free it.
*/
static void mdlTerminate(SimStruct *S)
{
/*
* YOUR CODE GOES HERE
*/
}

/*======================================================*
* See sfuntmpl.doc for the optional S-function methods *
*======================================================*/

/*=============================*
* Required S-function trailer *
*=============================*/

#ifdef MATLAB_MEX_FILE /* Is this file being compiled as a MEX-file? */


#include "simulink.c" /* MEX-file interface mechanism */
#else
#include "cg_sfun.h" /* Code generation registration function */
#endif

http://encon.fke.utm.my/courses/mep1422/imch.c (3 von 3) [17.05.2005 17:15:22]


!

"
# #

!
$

=
%
!
( + + %
) π
&

%'! %&

= +( %

%&

=) [ ]= ) %
!
( + + %
) =
%
!

&
%

&
%
!

= [ ]= %
!
( + + %
) =
&
( − ) *
!

=
%
!
( + + % ) +


= ,

- ω
$
=
%
!
( + + % ) .

/ $


= 0

1 & # #

θ
α
θ

1 &

irs = ir cos(θr + α ) + jir sin(θr + α )


irs = irejθ ejα r


∴ = 2

34 $

isr = is cos(θr − α ) + jis sin(θr − α )


(θ − (α
= &5

− (α
∴ = &&

(α − (α
4

ψ
=) + + (ω ψ &%
ψ
5=) + + (ω −ω ψ &!

ψ =3 +3 &*

ψ =3 +3 &+

=
%
!
( + + %
)
- ψ ψ 67
ω 85
$

ψ
=) + &,

ψ
5=) + − (ω ψ &.

ψ =3 +3 &0

ψ =3 +3 &2

&, &2

"! ! " #

!
= ψ × %5
%%

9 4
$

=
!
%%
ψ × =
!
%%
3 ( +3 )× %&

: $

!
= 3 − %%
%%

! 3
= ψ × %!
%% 3

# %! %*

! 3
= ψ −ψ %*
%% 3
; %*
#

1"< %*
#
1 % =

ψ = ψψ

ψψ = 5

%* $

! 3 ψ
= ψ %+
%% 3

ψ
ψ ψ

1 %

%+
>< %+

84 %+

><
- 1"<
ψ

%+ 1

1"< $

1"<

1 &!
ψ
5=) + + (ω −ω ψ

- &+
) 3 ) ψ
5= ψ − + + (ω −ω ψ %,
3 3

ψ = ψψ ψψ = 5 %, $

5=
)
3
ψ −
3 )
3
( ψ
+( ψ
)+ ψ
+ (ω ψ %.

- $

) 3 ) ψ ψ
5= ψ − + %0
3 3

3 ) ψ
5=− + ω ψ %2
3

1 !
1"<

1 1"<

> 1"<

1"<

4 ?

%, @
1 *

? >: 3 / &220 AB /< C" D


E ? F 4

B E &225 AB < /< C" D E ? F 4

G > 1 H &20. AE ; < /< CE


E "
STATOR FLUX FOC

In stator flux FOC, the frame chosen is aligned to the synchronously rotating frame
such that the d–axis coincide with stator flux space phasor.

ψ ψ Ψ

Figure 1

The torque equation in general reference frame is given by:

= ψ × (1)

= (ψ −ψ ) (2)

In the chosen reference frame, ψ = ψ and ψ = , hence (2) reduces to:

= (ψ ) (3)

To implement the stator flux FOC using current–controlled VSI, we need to

i) derive the d and q components of the stator current reference values,


ii) obtain the stator flux position in order to transform the rotating frame
to stationary frame..

From (3), given Te* and ψs*,the q component of the stator current in this reference
frame can be easily obtained. To look at the relation between isd and ψs we need to
examine the IM equations.

The induction machine in general reference frame is given by equations (4)–(7):

ψ
= + + ω ψ

ψ
= + + ω −ω ψ

ψ = +

ψ = + (7)
Substitute (7) into (5)

= +
( + )+ ω −ω + (8)

The stator flux is obtained by substituting the rotor current (which in practice,
normally unavailable) from (6), into (8)

With mathematical manipulations and recognizing that in the reference frame where
only the d axis component of the stator flux exists, it can be shown that by
separating the real and imaginary terms and after substituting rotor current,
equation (8) is given by:

( + στ ) ψ
−ω (
τ ψ −σ ψ
)= (9)

( +τ )ψ = ( + στ ) ψ
−ω τ σ ψ
= (10)

From (10), it can be seen that ψs is proportional to isd and isq. There exists a
coupling between ψs and isq. Varying isq to control the torque will result in ψs to
vary too hence the torque will not react immediately to isq.


! $
! !$
Ψ %&' '(
θ

" "
Ψ "

#ψ #

Figure 2

To overcome this problem, a de–coupler to compensate the effect of the isq


component from the output of the PI controller is can be designed [1].

[1] X. Xu, R. K. Doncker, D.W. Novotny, “A stator flux oriented Induction machine
drive”, IEEE-PESC, 1988.
http://encon.fke.utm.my/courses/mep1422/foc.mdl

Model {
Name "foc"
Version 5.0
SaveDefaultBlockParams on
SampleTimeColors off
LibraryLinkDisplay "none"
WideLines off
ShowLineDimensions off
ShowPortDataTypes off
ShowLoopsOnError on
IgnoreBidirectionalLines off
ShowStorageClass off
ExecutionOrder off
RecordCoverage off
CovPath "/"
CovSaveName "covdata"
CovMetricSettings "dw"
CovNameIncrementing off
CovHtmlReporting on
covSaveCumulativeToWorkspaceVar on
CovSaveSingleToWorkspaceVar on
CovCumulativeVarName "covCumulativeData"
CovCumulativeReport off
DataTypeOverride "UseLocalSettings"
MinMaxOverflowLogging "UseLocalSettings"
MinMaxOverflowArchiveMode "Overwrite"
BlockNameDataTip off
BlockParametersDataTip off
BlockDescriptionStringDataTip off
ToolBar on
StatusBar on
BrowserShowLibraryLinks off
BrowserLookUnderMasks off
Created "Tue Oct 01 11:07:25 2002"
UpdateHistory "UpdateHistoryNever"
ModifiedByFormat "%<Auto>"
LastModifiedBy "Administrator"
ModifiedDateFormat "%<Auto>"
LastModifiedDate "Sun Sep 12 00:33:10 2004"
ModelVersionFormat "1.%<AutoIncrement:22>"
ConfigurationManager "none"
SimParamPage "WorkspaceI/O"
LinearizationMsg "none"
Profile off
ParamWorkspaceSource "MATLABWorkspace"
AccelSystemTargetFile "accel.tlc"
AccelTemplateMakefile "accel_default_tmf"
AccelMakeCommand "make_rtw"
TryForcingSFcnDF off
ExtModeMexFile "ext_comm"
ExtModeBatchMode off
ExtModeTrigType "manual"
ExtModeTrigMode "normal"
ExtModeTrigPort "1"
ExtModeTrigElement "any"
ExtModeTrigDuration 1000
ExtModeTrigHoldOff 0
ExtModeTrigDelay 0
ExtModeTrigDirection "rising"
ExtModeTrigLevel 0
ExtModeArchiveMode "off"
ExtModeAutoIncOneShot off
ExtModeIncDirWhenArm off
ExtModeAddSuffixToVar off
ExtModeWriteAllDataToWs off

http://encon.fke.utm.my/courses/mep1422/foc.mdl (1 von 36) [17.05.2005 17:15:41]


http://encon.fke.utm.my/courses/mep1422/foc.mdl

ExtModeArmWhenConnect on
ExtModeSkipDownloadWhenConnect off
ExtModeLogAll on
ExtModeAutoUpdateStatusClock on
BufferReuse on
RTWExpressionDepthLimit 5
SimulationMode "normal"
Solver "ode5"
SolverMode "Auto"
StartTime "0.0"
StopTime "1000"
MaxOrder 5
MaxStep "0.0001"
MinStep "0.00001"
MaxNumMinSteps "-1"
InitialStep "0.00001"
FixedStep "5e-6"
RelTol "1e-3"
AbsTol "auto"
OutputOption "RefineOutputTimes"
OutputTimes "[]"
Refine "1"
LoadExternalInput off
ExternalInput "[t, u]"
LoadInitialState off
InitialState "xInitial"
SaveTime off
TimeSaveName "t"
SaveState off
StateSaveName "xout"
SaveOutput off
OutputSaveName "yout"
SaveFinalState off
FinalStateName "xFinal"
SaveFormat "Array"
Decimation "1"
LimitDataPoints off
MaxDataPoints "10000000"
SignalLoggingName "sigsOut"
ConsistencyChecking "none"
ArrayBoundsChecking "none"
AlgebraicLoopMsg "warning"
BlockPriorityViolationMsg "warning"
MinStepSizeMsg "warning"
InheritedTsInSrcMsg "warning"
DiscreteInheritContinuousMsg "warning"
MultiTaskRateTransMsg "error"
SingleTaskRateTransMsg "none"
CheckForMatrixSingularity "none"
IntegerOverflowMsg "warning"
Int32ToFloatConvMsg "warning"
ParameterDowncastMsg "error"
ParameterOverflowMsg "error"
ParameterPrecisionLossMsg "warning"
UnderSpecifiedDataTypeMsg "none"
UnnecessaryDatatypeConvMsg "none"
VectorMatrixConversionMsg "none"
InvalidFcnCallConnMsg "error"
SignalLabelMismatchMsg "none"
UnconnectedInputMsg "warning"
UnconnectedOutputMsg "warning"
UnconnectedLineMsg "warning"
SfunCompatibilityCheckMsg "none"
RTWInlineParameters off
BlockReductionOpt off

http://encon.fke.utm.my/courses/mep1422/foc.mdl (2 von 36) [17.05.2005 17:15:41]


http://encon.fke.utm.my/courses/mep1422/foc.mdl

BooleanDataType off
ConditionallyExecuteInputs on
ParameterPooling on
OptimizeBlockIOStorage on
ZeroCross on
AssertionControl "UseLocalSettings"
ProdHWDeviceType "Microprocessor"
ProdHWWordLengths "8,16,32,32"
RTWSystemTargetFile "grt.tlc"
RTWTemplateMakefile "grt_default_tmf"
RTWMakeCommand "make_rtw"
RTWGenerateCodeOnly off
RTWRetainRTWFile off
TLCProfiler off
TLCDebug off
TLCCoverage off
TLCAssertion off
BlockDefaults {
Orientation "right"
ForegroundColor "black"
BackgroundColor "white"
DropShadow off
NamePlacement "normal"
FontName "Helvetica"
FontSize 10
FontWeight "normal"
FontAngle "normal"
ShowName on
}
BlockParameterDefaults {
Block {
BlockType Constant
Value "1"
VectorParams1D on
ShowAdditionalParam off
OutDataTypeMode "Inherit from 'Constant value'"
OutDataType "sfix(16)"
ConRadixGroup "Use specified scaling"
OutScaling "2^0"
}
Block {
BlockType Demux
Outputs "4"
DisplayOption "none"
BusSelectionMode off
}
Block {
BlockType Derivative
}
Block {
BlockType Fcn
Expr "sin(u[1])"
}
Block {
BlockType Gain
Gain "1"
Multiplication "Element-wise(K.*u)"
ShowAdditionalParam off
ParameterDataTypeMode "Same as input"
ParameterDataType "sfix(16)"
ParameterScalingMode "Best Precision: Matrix-wise"
ParameterScaling "2^0"
OutDataTypeMode "Same as input"
OutDataType "sfix(16)"
OutScaling "2^0"

http://encon.fke.utm.my/courses/mep1422/foc.mdl (3 von 36) [17.05.2005 17:15:41]


http://encon.fke.utm.my/courses/mep1422/foc.mdl

LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
}
Block {
BlockType Inport
Port "1"
PortDimensions "-1"
SampleTime "-1"
ShowAdditionalParam off
LatchInput off
DataType "auto"
OutDataType "sfix(16)"
OutScaling "2^0"
SignalType "auto"
SamplingMode "auto"
Interpolate on
}
Block {
BlockType Integrator
ExternalReset "none"
InitialConditionSource "internal"
InitialCondition "0"
LimitOutput off
UpperSaturationLimit "inf"
LowerSaturationLimit "-inf"
ShowSaturationPort off
ShowStatePort off
AbsoluteTolerance "auto"
ZeroCross on
}
Block {
BlockType Math
Operator "exp"
OutputSignalType "auto"
}
Block {
BlockType Mux
Inputs "4"
DisplayOption "none"
}
Block {
BlockType Outport
Port "1"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Block {
BlockType Relay
OnSwitchValue "eps"
OffSwitchValue "eps"
OnOutputValue "1"
OffOutputValue "0"
ShowAdditionalParam off
OutputDataTypeScalingMode "All ports same datatype"
OutDataType "sfix(16)"
OutScaling "2^0"
ConRadixGroup "Use specified scaling"
ZeroCross on
}
Block {
BlockType Scope
Floating off
ModelBased off
TickLabels "OneTimeTick"

http://encon.fke.utm.my/courses/mep1422/foc.mdl (4 von 36) [17.05.2005 17:15:41]


http://encon.fke.utm.my/courses/mep1422/foc.mdl

ZoomMode "on"
Grid "on"
TimeRange "auto"
YMin "-5"
YMax "5"
SaveToWorkspace off
SaveName "ScopeData"
LimitDataPoints on
MaxDataPoints "5000"
Decimation "1"
SampleInput off
SampleTime "0"
}
Block {
BlockType "S-Function"
FunctionName "system"
PortCounts "[]"
SFunctionModules "''"
}
Block {
BlockType SignalGenerator
WaveForm "sine"
Amplitude "1"
Frequency "1"
Units "Hertz"
VectorParams1D on
}
Block {
BlockType SubSystem
ShowPortLabels on
Permissions "ReadWrite"
RTWSystemCode "Auto"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
SimViewingDevice off
DataTypeOverride "UseLocalSettings"
MinMaxOverflowLogging "UseLocalSettings"
}
Block {
BlockType Sum
IconShape "rectangular"
Inputs "++"
ShowAdditionalParam off
InputSameDT on
OutDataTypeMode "Same as first input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
}
Block {
BlockType Trigonometry
Operator "sin"
OutputSignalType "auto"
}
}
AnnotationDefaults {
HorizontalAlignment "center"
VerticalAlignment "middle"
ForegroundColor "black"
BackgroundColor "white"
DropShadow off
FontName "Helvetica"
FontSize 10

http://encon.fke.utm.my/courses/mep1422/foc.mdl (5 von 36) [17.05.2005 17:15:41]


http://encon.fke.utm.my/courses/mep1422/foc.mdl

FontWeight "normal"
FontAngle "normal"
}
LineDefaults {
FontName "Helvetica"
FontSize 9
FontWeight "normal"
FontAngle "normal"
}
System {
Name "foc"
Location [26, 100, 942, 425]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "91"
ReportName "simulink-default.rpt"
Block {
BlockType Gain
Name "Gain3"
Position [580, 305, 610, 335]
Orientation "left"
}
Block {
BlockType SubSystem
Name "Induction Machine"
Ports [3, 8]
Position [645, 13, 700, 142]
TreatAsAtomicUnit off
MaskPromptString "Stator resistance (ohm)|Rotor resistance (ohm)|"
"Stator self inductance (H)|Rotor self inductance (H)|Mutual Inductance (H)|No"
" of poles|Moment of inertia (kg.m^2)|Load torque (Nm)"
MaskStyleString "edit,edit,edit,edit,edit,edit,edit,edit"
MaskTunableValueString "on,on,on,on,on,on,on,on"
MaskCallbackString "|||||||"
MaskEnableString "on,on,on,on,on,on,on,on"
MaskVisibilityString "on,on,on,on,on,on,on,on"
MaskToolTipString "on,on,on,on,on,on,on,on"
MaskVarAliasString ",,,,,,,"
MaskVariables "Rs=@1;Rr=@2;Ls=@3;Lr=@4;Lm=@5;pole=@6;J=@7;Tloa"
"d=@8;"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "5.5|4.51|306.5e-3|306.5e-3|291.9e-3|4|0.02|0"
System {
Name "Induction Machine"
Location [4, 74, 764, 534]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport

http://encon.fke.utm.my/courses/mep1422/foc.mdl (6 von 36) [17.05.2005 17:15:41]


http://encon.fke.utm.my/courses/mep1422/foc.mdl

Name "Va"
Position [25, 40, 45, 60]
}
Block {
BlockType Inport
Name "Vb"
Position [25, 120, 45, 140]
Port "2"
}
Block {
BlockType Inport
Name "Vc"
Position [25, 240, 45, 260]
Port "3"
}
Block {
BlockType Gain
Name "1/J"
Position [260, 292, 285, 318]
Orientation "left"
Gain "1/J"
SaturateOnIntegerOverflow off
}
Block {
BlockType Gain
Name "1/J1"
Position [375, 367, 400, 393]
Gain "0.01"
SaturateOnIntegerOverflow off
}
Block {
BlockType SubSystem
Name "3to2"
Ports [3, 2]
Position [105, 81, 135, 139]
ShowPortLabels off
TreatAsAtomicUnit off
System {
Name "3to2"
Location [323, 87, 947, 513]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "in_1"
Position [15, 50, 35, 70]
}
Block {
BlockType Inport
Name "b"
Position [15, 115, 35, 135]
Port "2"
}
Block {
BlockType Inport
Name "c"
Position [15, 180, 35, 200]
Port "3"

http://encon.fke.utm.my/courses/mep1422/foc.mdl (7 von 36) [17.05.2005 17:15:41]


http://encon.fke.utm.my/courses/mep1422/foc.mdl

}
Block {
BlockType Gain
Name "Gain3"
Position [120, 248, 160, 272]
Gain "0.577"
}
Block {
BlockType Gain
Name "Gain4"
Position [120, 298, 160, 322]
Gain "-0.577"
}
Block {
BlockType Gain
Name "Gain5"
Position [145, 143, 185, 167]
Gain "-0.33333"
}
Block {
BlockType Gain
Name "Gain6"
Position [140, 183, 180, 207]
Gain "-0.33333"
}
Block {
BlockType Gain
Name "Gain7"
Position [135, 63, 175, 87]
Gain "0.66666"
}
Block {
BlockType Sum
Name "Ib"
Ports [2, 1]
Position [240, 255, 260, 275]
}
Block {
BlockType Sum
Name "Ib1"
Ports [3, 1]
Position [385, 52, 405, 88]
Inputs "+++"
}
Block {
BlockType Outport
Name "d"
Position [535, 60, 555, 80]
InitialOutput "0"
}
Block {
BlockType Outport
Name "q"
Position [310, 250, 330, 270]
Port "2"
InitialOutput "0"
}
Line {
SrcBlock "Ib1"
SrcPort 1
DstBlock "d"
DstPort 1
}
Line {
SrcBlock "Gain7"

http://encon.fke.utm.my/courses/mep1422/foc.mdl (8 von 36) [17.05.2005 17:15:41]


http://encon.fke.utm.my/courses/mep1422/foc.mdl

SrcPort 1
Points [30, 0; 0, -15]
DstBlock "Ib1"
DstPort 1
}
Line {
SrcBlock "in_1"
SrcPort 1
Points [40, 0; 0, 15]
DstBlock "Gain7"
DstPort 1
}
Line {
SrcBlock "Gain6"
SrcPort 1
Points [30, 0; 0, -125]
DstBlock "Ib1"
DstPort 2
}
Line {
SrcBlock "Gain5"
SrcPort 1
Points [60, 0; 0, -75]
DstBlock "Ib1"
DstPort 3
}
Line {
SrcBlock "c"
SrcPort 1
Points [40, 0; 0, 5]
Branch {
DstBlock "Gain6"
DstPort 1
}
Branch {
Points [0, 115]
DstBlock "Gain4"
DstPort 1
}
}
Line {
SrcBlock "b"
SrcPort 1
Points [20, 0; 0, 30]
Branch {
DstBlock "Gain5"
DstPort 1
}
Branch {
Points [0, 105]
DstBlock "Gain3"
DstPort 1
}
}
Line {
SrcBlock "Gain3"
SrcPort 1
DstBlock "Ib"
DstPort 1
}
Line {
SrcBlock "Gain4"
SrcPort 1
Points [30, 0; 0, -40]
DstBlock "Ib"

http://encon.fke.utm.my/courses/mep1422/foc.mdl (9 von 36) [17.05.2005 17:15:41]


http://encon.fke.utm.my/courses/mep1422/foc.mdl

DstPort 2
}
Line {
SrcBlock "Ib"
SrcPort 1
DstBlock "q"
DstPort 1
}
}
}
Block {
BlockType Constant
Name "Constant"
Position [630, 306, 670, 324]
Orientation "left"
Value "Tload"
}
Block {
BlockType Demux
Name "Demux"
Ports [1, 5]
Position [420, 91, 460, 149]
Outputs "5"
}
Block {
BlockType Gain
Name "Gain1"
Position [150, 407, 175, 433]
Orientation "left"
Gain "2/pole"
}
Block {
BlockType SubSystem
Name "IM1"
Ports [1, 1]
Position [320, 106, 380, 134]
TreatAsAtomicUnit off
System {
Name "IM1"
Location [248, 340, 468, 422]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [25, 33, 55, 47]
}
Block {
BlockType "S-Function"
Name "S-Function"
Ports [1, 1]
Position [80, 25, 140, 55]
FunctionName "imch"
Parameters "Rs, Rr, Ls,Lr,Lm,pole"
}
Block {
BlockType Outport
Name "Out1"

http://encon.fke.utm.my/courses/mep1422/foc.mdl (10 von 36) [17.05.2005 17:15:41]


http://encon.fke.utm.my/courses/mep1422/foc.mdl

Position [165, 33, 195, 47]


InitialOutput "0"
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "S-Function"
DstPort 1
}
Line {
SrcBlock "S-Function"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
}
}
Block {
BlockType Integrator
Name "Integrator"
Ports [1, 1]
Position [360, 295, 380, 315]
Orientation "left"
}
Block {
BlockType Mux
Name "Mux"
Ports [3, 1]
Position [260, 104, 290, 136]
Inputs "3"
}
Block {
BlockType Sum
Name "Sum"
Ports [3, 1]
Position [440, 287, 460, 323]
Orientation "left"
Inputs "+--"
}
Block {
BlockType Outport
Name "isd"
Position [630, 25, 650, 45]
InitialOutput "0"
}
Block {
BlockType Outport
Name "isq"
Position [625, 70, 645, 90]
Port "2"
InitialOutput "0"
}
Block {
BlockType Outport
Name "ird"
Position [600, 140, 620, 160]
Port "3"
InitialOutput "0"
}
Block {
BlockType Outport
Name "speed"
Position [90, 410, 110, 430]
Orientation "left"
Port "4"

http://encon.fke.utm.my/courses/mep1422/foc.mdl (11 von 36) [17.05.2005 17:15:41]


http://encon.fke.utm.my/courses/mep1422/foc.mdl

InitialOutput "0"
}
Block {
BlockType Outport
Name "Vd"
Position [265, 50, 285, 70]
Port "5"
InitialOutput "0"
}
Block {
BlockType Outport
Name "irq"
Position [595, 185, 615, 205]
Port "6"
InitialOutput "0"
}
Block {
BlockType Outport
Name "Vq"
Position [90, 285, 110, 305]
Orientation "left"
Port "7"
InitialOutput "0"
}
Block {
BlockType Outport
Name "Te"
Position [715, 230, 735, 250]
Port "8"
InitialOutput "0"
}
Line {
SrcBlock "Demux"
SrcPort 1
Points [60, 0; 0, -20]
DstBlock "isq"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 2
Points [65, 0; 0, -75]
DstBlock "isd"
DstPort 1
}
Line {
SrcBlock "3to2"
SrcPort 2
Points [0, 0]
Branch {
Points [0, 170]
DstBlock "Vq"
DstPort 1
}
Branch {
Points [55, 0; 0, -15]
DstBlock "Mux"
DstPort 1
}
}
Line {
SrcBlock "3to2"
SrcPort 1
Points [0, 0; 25, 0]
Branch {

http://encon.fke.utm.my/courses/mep1422/foc.mdl (12 von 36) [17.05.2005 17:15:41]


http://encon.fke.utm.my/courses/mep1422/foc.mdl

Points [0, -35]


DstBlock "Vd"
DstPort 1
}
Branch {
Points [30, 0; 0, 25]
DstBlock "Mux"
DstPort 2
}
}
Line {
SrcBlock "Demux"
SrcPort 5
Points [45, 0; 0, 145]
Branch {
Points [0, 15; -35, 0]
DstBlock "Sum"
DstPort 1
}
Branch {
Points [70, 0; 0, -45]
DstBlock "Te"
DstPort 1
}
}
Line {
SrcBlock "Vc"
SrcPort 1
Points [20, 0; 0, -120]
DstBlock "3to2"
DstPort 3
}
Line {
SrcBlock "Vb"
SrcPort 1
Points [20, 0; 0, -20]
DstBlock "3to2"
DstPort 2
}
Line {
SrcBlock "Va"
SrcPort 1
Points [20, 0; 0, 40]
DstBlock "3to2"
DstPort 1
}
Line {
SrcBlock "1/J"
SrcPort 1
Points [0, 0; -25, 0]
Branch {
Points [0, -175]
DstBlock "Mux"
DstPort 3
}
Branch {
Points [-15, 0; 0, 75]
Branch {
Points [0, 40]
DstBlock "Gain1"
DstPort 1
}
Branch {
DstBlock "1/J1"
DstPort 1

http://encon.fke.utm.my/courses/mep1422/foc.mdl (13 von 36) [17.05.2005 17:15:41]


http://encon.fke.utm.my/courses/mep1422/foc.mdl

}
}
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "IM1"
DstPort 1
}
Line {
SrcBlock "IM1"
SrcPort 1
DstBlock "Demux"
DstPort 1
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Integrator"
DstPort 1
}
Line {
SrcBlock "Integrator"
SrcPort 1
DstBlock "1/J"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 3
Points [30, 0; 0, 75]
DstBlock "irq"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 4
Points [25, 0; 0, 20]
DstBlock "ird"
DstPort 1
}
Line {
SrcBlock "Gain1"
SrcPort 1
Points [0, 0]
DstBlock "speed"
DstPort 1
}
Line {
SrcBlock "1/J1"
SrcPort 1
Points [145, 0; 0, -75]
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "Constant"
SrcPort 1
DstBlock "Sum"
DstPort 3
}
Annotation {
Name "q"
Position [482, 87]
VerticalAlignment "top"

http://encon.fke.utm.my/courses/mep1422/foc.mdl (14 von 36) [17.05.2005 17:15:41]


http://encon.fke.utm.my/courses/mep1422/foc.mdl

}
}
}
Block {
BlockType Integrator
Name "Integrator1"
Ports [1, 1]
Position [180, 305, 210, 335]
}
Block {
BlockType Integrator
Name "Integrator2"
Ports [1, 1]
Position [390, 305, 420, 335]
Orientation "left"
}
Block {
BlockType Relay
Name "Relay"
Position [540, 30, 570, 60]
OnSwitchValue "0.2"
OffSwitchValue "-0.2"
OnOutputValue "300"
OffOutputValue "-300"
}
Block {
BlockType Relay
Name "Relay1"
Position [545, 65, 575, 95]
OnSwitchValue "0.2"
OffSwitchValue "-0.2"
OnOutputValue "300"
OffOutputValue "-300"
}
Block {
BlockType Relay
Name "Relay2"
Position [545, 115, 575, 145]
OnSwitchValue "0.2"
OffSwitchValue "-0.2"
OnOutputValue "300"
OffOutputValue "-300"
}
Block {
BlockType Constant
Name "Rotor Flux"
Position [20, 134, 40, 156]
Value "1.2*(291.9e-3/306.5e-3)"
}
Block {
BlockType Scope
Name "Scope"
Ports [2]
Position [835, 205, 865, 240]
Location [581, 461, 905, 736]
Open on
NumInputPorts "2"
ZoomMode "yonly"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
axes2 "%<SignalLabel>"
}
List {
ListType SelectedSignals

http://encon.fke.utm.my/courses/mep1422/foc.mdl (15 von 36) [17.05.2005 17:15:41]


http://encon.fke.utm.my/courses/mep1422/foc.mdl

axes1 ""
axes2 ""
}
TimeRange "0.1"
YMin "-25~-30"
YMax "25~30"
DataFormat "StructureWithTime"
}
Block {
BlockType SignalGenerator
Name "Signal\nGenerator"
Position [25, 50, 55, 80]
WaveForm "square"
Amplitude "-20"
Frequency "20"
}
Block {
BlockType SubSystem
Name "Subsystem"
Ports [4, 4]
Position [895, 21, 945, 124]
TreatAsAtomicUnit off
System {
Name "Subsystem"
Location [596, 100, 1004, 348]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "ird"
Position [25, 33, 55, 47]
}
Block {
BlockType Inport
Name "isd"
Position [25, 78, 55, 92]
Port "2"
}
Block {
BlockType Inport
Name "irq"
Position [25, 128, 55, 142]
Port "3"
}
Block {
BlockType Inport
Name "isq"
Position [25, 173, 55, 187]
Port "4"
}
Block {
BlockType Reference
Name "Cartesian to\nPolar"
Ports [2, 2]
Position [255, 87, 285, 118]
SourceBlock "simulink_extras/Transformations/Cartesian t"
"o\nPolar"
SourceType "Cart2Polar"

http://encon.fke.utm.my/courses/mep1422/foc.mdl (16 von 36) [17.05.2005 17:15:41]


http://encon.fke.utm.my/courses/mep1422/foc.mdl

}
Block {
BlockType Gain
Name "Gain"
Position [80, 25, 110, 55]
Gain "306.5e-3"
}
Block {
BlockType Gain
Name "Gain1"
Position [80, 70, 110, 100]
Gain "291.9e-3"
}
Block {
BlockType Gain
Name "Gain2"
Position [80, 120, 110, 150]
Gain "306.5e-3"
}
Block {
BlockType Gain
Name "Gain3"
Position [80, 165, 110, 195]
Gain "291.9e-3"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [175, 55, 195, 75]
ShowName off
IconShape "round"
Inputs "+|+"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1]
Position [175, 150, 195, 170]
ShowName off
IconShape "round"
Inputs "+|+"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
}
Block {
BlockType Outport
Name "Fm"
Position [355, 88, 385, 102]
}
Block {
BlockType Outport
Name "F_the"
Position [310, 103, 340, 117]
Port "2"
}
Block {
BlockType Outport
Name "Fd"
Position [310, 33, 340, 47]
Port "3"
}
Block {

http://encon.fke.utm.my/courses/mep1422/foc.mdl (17 von 36) [17.05.2005 17:15:41]


http://encon.fke.utm.my/courses/mep1422/foc.mdl

BlockType Outport
Name "Fq"
Position [305, 153, 335, 167]
Port "4"
}
Line {
SrcBlock "Gain"
SrcPort 1
Points [40, 0]
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "Gain1"
SrcPort 1
Points [70, 0]
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "Sum"
SrcPort 1
Points [25, 0]
Branch {
Points [15, 0]
DstBlock "Cartesian to\nPolar"
DstPort 1
}
Branch {
Points [0, -25]
DstBlock "Fd"
DstPort 1
}
}
Line {
SrcBlock "Gain2"
SrcPort 1
Points [40, 0]
DstBlock "Sum1"
DstPort 1
}
Line {
SrcBlock "Gain3"
SrcPort 1
Points [70, 0]
DstBlock "Sum1"
DstPort 2
}
Line {
SrcBlock "Sum1"
SrcPort 1
Points [40, 0; 0, -5]
Branch {
DstBlock "Cartesian to\nPolar"
DstPort 2
}
Branch {
Points [0, 5]
DstBlock "Fq"
DstPort 1
}
}
Line {
SrcBlock "ird"
SrcPort 1

http://encon.fke.utm.my/courses/mep1422/foc.mdl (18 von 36) [17.05.2005 17:15:41]


http://encon.fke.utm.my/courses/mep1422/foc.mdl

DstBlock "Gain"
DstPort 1
}
Line {
SrcBlock "isd"
SrcPort 1
DstBlock "Gain1"
DstPort 1
}
Line {
SrcBlock "Cartesian to\nPolar"
SrcPort 1
DstBlock "Fm"
DstPort 1
}
Line {
SrcBlock "Cartesian to\nPolar"
SrcPort 2
DstBlock "F_the"
DstPort 1
}
Line {
SrcBlock "irq"
SrcPort 1
DstBlock "Gain2"
DstPort 1
}
Line {
SrcBlock "isq"
SrcPort 1
DstBlock "Gain3"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "Subsystem1"
Ports [2, 3]
Position [95, 50, 135, 110]
TreatAsAtomicUnit off
MaskPromptString "Lm|Lr|Rr|p"
MaskStyleString "edit,edit,edit,edit"
MaskTunableValueString "on,on,on,on"
MaskCallbackString "|||"
MaskEnableString "on,on,on,on"
MaskVisibilityString "on,on,on,on"
MaskToolTipString "on,on,on,on"
MaskVarAliasString ",,,"
MaskVariables "Lm=@1;Lr=@2;Rr=@3;p=@4;"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "291.9e-3|306.5e-3|4.51|4"
System {
Name "Subsystem1"
Location [2, 74, 1014, 724]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"

http://encon.fke.utm.my/courses/mep1422/foc.mdl (19 von 36) [17.05.2005 17:15:41]


http://encon.fke.utm.my/courses/mep1422/foc.mdl

PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "T"
Position [90, 33, 120, 47]
}
Block {
BlockType Inport
Name "Flux"
Position [35, 118, 65, 132]
Port "2"
}
Block {
BlockType Constant
Name "Constant1"
Position [140, 279, 210, 301]
Value "1/Lm"
}
Block {
BlockType Derivative
Name "Derivative"
Position [165, 180, 195, 210]
}
Block {
BlockType Reference
Name "Dot Product"
Ports [2, 1]
Position [230, 26, 260, 59]
SourceBlock "simulink/Math\nOperations/Dot Product"
SourceType "Dot Product"
}
Block {
BlockType Reference
Name "Dot Product1"
Ports [2, 1]
Position [292, 115, 323, 150]
Orientation "down"
NamePlacement "alternate"
SourceBlock "simulink/Math\nOperations/Dot Product"
SourceType "Dot Product"
}
Block {
BlockType Reference
Name "Dot Product2"
Ports [2, 1]
Position [390, 205, 425, 240]
NamePlacement "alternate"
SourceBlock "simulink/Math\nOperations/Dot Product"
SourceType "Dot Product"
}
Block {
BlockType Gain
Name "Gain"
Position [145, 25, 175, 55]
Gain "(4*Lr)/(3*p*Lm)"
}
Block {
BlockType Gain
Name "Gain1"
Position [230, 85, 260, 115]
Gain "(Lm*Rr)/Lr"
}
Block {
BlockType Gain

http://encon.fke.utm.my/courses/mep1422/foc.mdl (20 von 36) [17.05.2005 17:15:41]


http://encon.fke.utm.my/courses/mep1422/foc.mdl

Name "Gain2"
Position [115, 180, 145, 210]
Gain "Lr/Rr"
}
Block {
BlockType Math
Name "Math\nFunction"
Ports [1, 1]
Position [145, 110, 175, 140]
Operator "reciprocal"
}
Block {
BlockType Sum
Name "Sum2"
Ports [2, 1]
Position [255, 185, 275, 205]
ShowName off
IconShape "round"
Inputs "|++"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
}
Block {
BlockType Outport
Name "isq"
Position [340, 38, 370, 52]
}
Block {
BlockType Outport
Name "slip"
Position [295, 175, 325, 190]
Orientation "down"
Port "2"
}
Block {
BlockType Outport
Name "isd"
Position [510, 218, 540, 232]
Port "3"
}
Line {
SrcBlock "Flux"
SrcPort 1
Points [25, 0]
Branch {
DstBlock "Math\nFunction"
DstPort 1
}
Branch {
Points [0, 70]
Branch {
DstBlock "Gain2"
DstPort 1
}
Branch {
Points [0, 40; 170, 0]
DstBlock "Sum2"
DstPort 2
}
}
}
Line {
SrcBlock "Math\nFunction"
SrcPort 1
Points [25, 0; 0, -25]

http://encon.fke.utm.my/courses/mep1422/foc.mdl (21 von 36) [17.05.2005 17:15:41]


http://encon.fke.utm.my/courses/mep1422/foc.mdl

Branch {
Points [0, -50]
DstBlock "Dot Product"
DstPort 2
}
Branch {
DstBlock "Gain1"
DstPort 1
}
}
Line {
SrcBlock "Gain"
SrcPort 1
Points [35, 0]
DstBlock "Dot Product"
DstPort 1
}
Line {
SrcBlock "Dot Product"
SrcPort 1
Points [0, 0; 55, 0]
Branch {
Points [-5, 0]
DstBlock "Dot Product1"
DstPort 2
}
Branch {
DstBlock "isq"
DstPort 1
}
}
Line {
SrcBlock "Gain1"
SrcPort 1
DstBlock "Dot Product1"
DstPort 1
}
Line {
SrcBlock "T"
SrcPort 1
DstBlock "Gain"
DstPort 1
}
Line {
SrcBlock "Dot Product1"
SrcPort 1
DstBlock "slip"
DstPort 1
}
Line {
SrcBlock "Gain2"
SrcPort 1
DstBlock "Derivative"
DstPort 1
}
Line {
SrcBlock "Derivative"
SrcPort 1
DstBlock "Sum2"
DstPort 1
}
Line {
SrcBlock "Dot Product2"
SrcPort 1
DstBlock "isd"

http://encon.fke.utm.my/courses/mep1422/foc.mdl (22 von 36) [17.05.2005 17:15:41]


http://encon.fke.utm.my/courses/mep1422/foc.mdl

DstPort 1
}
Line {
SrcBlock "Sum2"
SrcPort 1
Points [45, 0; 0, 20]
DstBlock "Dot Product2"
DstPort 1
}
Line {
SrcBlock "Constant1"
SrcPort 1
Points [85, 0; 0, -60]
DstBlock "Dot Product2"
DstPort 2
}
}
}
Block {
BlockType SubSystem
Name "Subsystem3"
Ports [2, 3]
Position [605, 185, 645, 245]
Orientation "left"
TreatAsAtomicUnit off
System {
Name "Subsystem3"
Location [436, 127, 909, 413]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [80, 38, 110, 52]
}
Block {
BlockType Inport
Name "In2"
Position [115, 143, 145, 157]
Port "2"
}
Block {
BlockType Gain
Name "Gain1"
Position [215, 28, 255, 52]
Gain "1.0001"
}
Block {
BlockType Gain
Name "Gain10"
Position [215, 238, 255, 262]
Gain "-0.867"
}
Block {
BlockType Gain
Name "Gain2"
Position [215, 83, 255, 107]
Gain "-0.5"

http://encon.fke.utm.my/courses/mep1422/foc.mdl (23 von 36) [17.05.2005 17:15:41]


http://encon.fke.utm.my/courses/mep1422/foc.mdl

}
Block {
BlockType Gain
Name "Gain8"
Position [215, 138, 255, 162]
Gain "0.867"
}
Block {
BlockType Gain
Name "Gain9"
Position [215, 188, 255, 212]
Gain "-0.5"
}
Block {
BlockType Sum
Name "Ib2"
Ports [2, 1]
Position [375, 102, 395, 138]
}
Block {
BlockType Sum
Name "Ib3"
Ports [2, 1]
Position [375, 187, 395, 223]
}
Block {
BlockType Outport
Name "Out1"
Position [280, 33, 310, 47]
}
Block {
BlockType Outport
Name "Out2"
Position [420, 113, 450, 127]
Port "2"
}
Block {
BlockType Outport
Name "Out3"
Position [420, 198, 450, 212]
Port "3"
}
Line {
SrcBlock "In1"
SrcPort 1
Points [0, 0; 15, 0]
Branch {
Points [70, 0]
DstBlock "Gain1"
DstPort 1
}
Branch {
Points [0, 50]
Branch {
DstBlock "Gain2"
DstPort 1
}
Branch {
Points [0, 105]
DstBlock "Gain9"
DstPort 1
}
}
}
Line {

http://encon.fke.utm.my/courses/mep1422/foc.mdl (24 von 36) [17.05.2005 17:15:41]


http://encon.fke.utm.my/courses/mep1422/foc.mdl

SrcBlock "In2"
SrcPort 1
Points [0, 0; 15, 0]
Branch {
DstBlock "Gain8"
DstPort 1
}
Branch {
Points [0, 100]
DstBlock "Gain10"
DstPort 1
}
}
Line {
SrcBlock "Gain2"
SrcPort 1
Points [50, 0; 0, 15]
DstBlock "Ib2"
DstPort 1
}
Line {
SrcBlock "Gain8"
SrcPort 1
Points [50, 0; 0, -20]
DstBlock "Ib2"
DstPort 2
}
Line {
SrcBlock "Gain9"
SrcPort 1
Points [50, 0; 0, -5]
DstBlock "Ib3"
DstPort 1
}
Line {
SrcBlock "Gain10"
SrcPort 1
Points [50, 0; 0, -35]
DstBlock "Ib3"
DstPort 2
}
Line {
SrcBlock "Gain1"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "Ib2"
SrcPort 1
DstBlock "Out2"
DstPort 1
}
Line {
SrcBlock "Ib3"
SrcPort 1
DstBlock "Out3"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "Subsystem4"
Ports [2, 3]

http://encon.fke.utm.my/courses/mep1422/foc.mdl (25 von 36) [17.05.2005 17:15:41]


http://encon.fke.utm.my/courses/mep1422/foc.mdl

Position [345, 50, 385, 110]


TreatAsAtomicUnit off
System {
Name "Subsystem4"
Location [436, 127, 909, 413]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [80, 38, 110, 52]
}
Block {
BlockType Inport
Name "In2"
Position [115, 143, 145, 157]
Port "2"
}
Block {
BlockType Gain
Name "Gain1"
Position [215, 28, 255, 52]
Gain "1.0001"
}
Block {
BlockType Gain
Name "Gain10"
Position [215, 238, 255, 262]
Gain "-0.867"
}
Block {
BlockType Gain
Name "Gain2"
Position [215, 83, 255, 107]
Gain "-0.5"
}
Block {
BlockType Gain
Name "Gain8"
Position [215, 138, 255, 162]
Gain "0.867"
}
Block {
BlockType Gain
Name "Gain9"
Position [215, 188, 255, 212]
Gain "-0.5"
}
Block {
BlockType Sum
Name "Ib2"
Ports [2, 1]
Position [375, 102, 395, 138]
}
Block {
BlockType Sum
Name "Ib3"
Ports [2, 1]

http://encon.fke.utm.my/courses/mep1422/foc.mdl (26 von 36) [17.05.2005 17:15:41]


http://encon.fke.utm.my/courses/mep1422/foc.mdl

Position [375, 187, 395, 223]


}
Block {
BlockType Outport
Name "Out1"
Position [280, 33, 310, 47]
}
Block {
BlockType Outport
Name "Out2"
Position [420, 113, 450, 127]
Port "2"
}
Block {
BlockType Outport
Name "Out3"
Position [420, 198, 450, 212]
Port "3"
}
Line {
SrcBlock "In1"
SrcPort 1
Points [0, 0; 15, 0]
Branch {
Points [70, 0]
DstBlock "Gain1"
DstPort 1
}
Branch {
Points [0, 50]
Branch {
DstBlock "Gain2"
DstPort 1
}
Branch {
Points [0, 105]
DstBlock "Gain9"
DstPort 1
}
}
}
Line {
SrcBlock "In2"
SrcPort 1
Points [0, 0; 15, 0]
Branch {
DstBlock "Gain8"
DstPort 1
}
Branch {
Points [0, 100]
DstBlock "Gain10"
DstPort 1
}
}
Line {
SrcBlock "Gain2"
SrcPort 1
Points [50, 0; 0, 15]
DstBlock "Ib2"
DstPort 1
}
Line {
SrcBlock "Gain8"
SrcPort 1

http://encon.fke.utm.my/courses/mep1422/foc.mdl (27 von 36) [17.05.2005 17:15:41]


http://encon.fke.utm.my/courses/mep1422/foc.mdl

Points [50, 0; 0, -20]


DstBlock "Ib2"
DstPort 2
}
Line {
SrcBlock "Gain9"
SrcPort 1
Points [50, 0; 0, -5]
DstBlock "Ib3"
DstPort 1
}
Line {
SrcBlock "Gain10"
SrcPort 1
Points [50, 0; 0, -35]
DstBlock "Ib3"
DstPort 2
}
Line {
SrcBlock "Gain1"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "Ib2"
SrcPort 1
DstBlock "Out2"
DstPort 1
}
Line {
SrcBlock "Ib3"
SrcPort 1
DstBlock "Out3"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "Subsystem5"
Ports [3, 2]
Position [240, 48, 280, 112]
TreatAsAtomicUnit off
System {
Name "Subsystem5"
Location [468, 82, 922, 447]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "iq"
Position [25, 113, 55, 127]
}
Block {
BlockType Inport
Name "id"
Position [25, 23, 55, 37]

http://encon.fke.utm.my/courses/mep1422/foc.mdl (28 von 36) [17.05.2005 17:15:41]


http://encon.fke.utm.my/courses/mep1422/foc.mdl

Port "2"
}
Block {
BlockType Inport
Name "fp"
Position [25, 243, 55, 257]
Port "3"
}
Block {
BlockType Reference
Name "Dot Product"
Ports [2, 1]
Position [245, 46, 275, 79]
SourceBlock "simulink/Math\nOperations/Dot Product"
SourceType "Dot Product"
}
Block {
BlockType Reference
Name "Dot Product1"
Ports [2, 1]
Position [245, 136, 275, 169]
SourceBlock "simulink/Math\nOperations/Dot Product"
SourceType "Dot Product"
}
Block {
BlockType Reference
Name "Dot Product2"
Ports [2, 1]
Position [260, 201, 290, 234]
SourceBlock "simulink/Math\nOperations/Dot Product"
SourceType "Dot Product"
}
Block {
BlockType Reference
Name "Dot Product3"
Ports [2, 1]
Position [260, 251, 290, 284]
SourceBlock "simulink/Math\nOperations/Dot Product"
SourceType "Dot Product"
}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1]
Position [350, 95, 370, 115]
ShowName off
IconShape "round"
Inputs "|+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
}
Block {
BlockType Sum
Name "Sum2"
Ports [2, 1]
Position [350, 210, 370, 230]
ShowName off
IconShape "round"
Inputs "|++"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
}
Block {
BlockType Trigonometry
Name "Trigonometric\nFunction"

http://encon.fke.utm.my/courses/mep1422/foc.mdl (29 von 36) [17.05.2005 17:15:41]


http://encon.fke.utm.my/courses/mep1422/foc.mdl

Ports [1, 1]
Position [165, 145, 195, 175]
}
Block {
BlockType Trigonometry
Name "Trigonometric\nFunction1"
Ports [1, 1]
Position [170, 55, 200, 85]
Operator "cos"
}
Block {
BlockType Outport
Name "Out1"
Position [395, 98, 425, 112]
}
Block {
BlockType Outport
Name "Out2"
Position [395, 213, 425, 227]
Port "2"
}
Line {
SrcBlock "fp"
SrcPort 1
Points [5, 0; 0, 5; 25, 0; 0, -95]
Branch {
DstBlock "Trigonometric\nFunction"
DstPort 1
}
Branch {
Points [0, -90]
DstBlock "Trigonometric\nFunction1"
DstPort 1
}
}
Line {
SrcBlock "id"
SrcPort 1
Points [0, 0; 80, 0]
Branch {
Points [0, 230]
DstBlock "Dot Product3"
DstPort 1
}
Branch {
Points [90, 0]
DstBlock "Dot Product"
DstPort 1
}
}
Line {
SrcBlock "iq"
SrcPort 1
Points [0, 0; 70, 0]
Branch {
Points [0, 105]
DstBlock "Dot Product2"
DstPort 2
}
Branch {
Points [90, 0; 0, 25]
DstBlock "Dot Product1"
DstPort 1
}
}

http://encon.fke.utm.my/courses/mep1422/foc.mdl (30 von 36) [17.05.2005 17:15:41]


http://encon.fke.utm.my/courses/mep1422/foc.mdl

Line {
SrcBlock "Dot Product3"
SrcPort 1
Points [65, 0]
DstBlock "Sum2"
DstPort 2
}
Line {
SrcBlock "Dot Product2"
SrcPort 1
DstBlock "Sum2"
DstPort 1
}
Line {
SrcBlock "Dot Product1"
SrcPort 1
Points [80, 0]
DstBlock "Sum1"
DstPort 2
}
Line {
SrcBlock "Trigonometric\nFunction"
SrcPort 1
Points [0, 0; 5, 0]
Branch {
DstBlock "Dot Product1"
DstPort 2
}
Branch {
Points [0, 115]
DstBlock "Dot Product3"
DstPort 2
}
}
Line {
SrcBlock "Dot Product"
SrcPort 1
Points [55, 0]
DstBlock "Sum1"
DstPort 1
}
Line {
SrcBlock "Trigonometric\nFunction1"
SrcPort 1
Points [0, 0; 15, 0]
Branch {
DstBlock "Dot Product"
DstPort 2
}
Branch {
Points [0, 140]
DstBlock "Dot Product2"
DstPort 1
}
}
Line {
SrcBlock "Sum1"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "Sum2"
SrcPort 1
DstBlock "Out2"

http://encon.fke.utm.my/courses/mep1422/foc.mdl (31 von 36) [17.05.2005 17:15:41]


http://encon.fke.utm.my/courses/mep1422/foc.mdl

DstPort 1
}
}
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [235, 305, 265, 335]
Orientation "up"
ShowName off
IconShape "round"
Inputs "+|+"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1]
Position [460, 35, 480, 55]
ShowName off
IconShape "round"
Inputs "|+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
}
Block {
BlockType Sum
Name "Sum2"
Ports [2, 1]
Position [480, 70, 500, 90]
ShowName off
IconShape "round"
Inputs "|+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
}
Block {
BlockType Sum
Name "Sum3"
Ports [2, 1]
Position [505, 120, 525, 140]
ShowName off
IconShape "round"
Inputs "|+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
}
Line {
SrcBlock "Induction Machine"
SrcPort 4
Points [0, 0; 15, 0]
Branch {
Points [20, 0; 0, 250]
DstBlock "Gain3"
DstPort 1
}
Branch {
Points [0, 145]
DstBlock "Scope"
DstPort 1
}
}
Line {

http://encon.fke.utm.my/courses/mep1422/foc.mdl (32 von 36) [17.05.2005 17:15:41]


http://encon.fke.utm.my/courses/mep1422/foc.mdl

SrcBlock "Subsystem1"
SrcPort 2
Points [20, 0; 0, 240]
DstBlock "Integrator1"
DstPort 1
}
Line {
SrcBlock "Signal\nGenerator"
SrcPort 1
DstBlock "Subsystem1"
DstPort 1
}
Line {
SrcBlock "Rotor Flux"
SrcPort 1
Points [15, 0; 0, -50]
DstBlock "Subsystem1"
DstPort 2
}
Line {
SrcBlock "Subsystem4"
SrcPort 1
Points [15, 0; 0, -15]
DstBlock "Sum1"
DstPort 1
}
Line {
SrcBlock "Sum1"
SrcPort 1
DstBlock "Relay"
DstPort 1
}
Line {
SrcBlock "Relay"
SrcPort 1
Points [55, 0]
DstBlock "Induction Machine"
DstPort 1
}
Line {
SrcBlock "Subsystem4"
SrcPort 2
DstBlock "Sum2"
DstPort 1
}
Line {
SrcBlock "Sum2"
SrcPort 1
DstBlock "Relay1"
DstPort 1
}
Line {
SrcBlock "Sum3"
SrcPort 1
DstBlock "Relay2"
DstPort 1
}
Line {
SrcBlock "Subsystem4"
SrcPort 3
Points [20, 0; 0, 30]
DstBlock "Sum3"
DstPort 1
}
Line {

http://encon.fke.utm.my/courses/mep1422/foc.mdl (33 von 36) [17.05.2005 17:15:41]


http://encon.fke.utm.my/courses/mep1422/foc.mdl

SrcBlock "Gain3"
SrcPort 1
DstBlock "Integrator2"
DstPort 1
}
Line {
SrcBlock "Induction Machine"
SrcPort 1
Points [90, 0; 0, 35; 5, 0]
Branch {
DstBlock "Subsystem"
DstPort 2
}
Branch {
Points [0, 140]
DstBlock "Subsystem3"
DstPort 1
}
}
Line {
SrcBlock "Induction Machine"
SrcPort 2
Points [0, 10; 75, 0]
Branch {
Points [30, 0; 0, 60]
DstBlock "Subsystem"
DstPort 4
}
Branch {
Points [0, 180]
DstBlock "Subsystem3"
DstPort 2
}
}
Line {
SrcBlock "Induction Machine"
SrcPort 3
Points [175, 0]
DstBlock "Subsystem"
DstPort 1
}
Line {
SrcBlock "Induction Machine"
SrcPort 6
Points [175, 0]
DstBlock "Subsystem"
DstPort 3
}
Line {
SrcBlock "Relay1"
SrcPort 1
DstBlock "Induction Machine"
DstPort 2
}
Line {
SrcBlock "Relay2"
SrcPort 1
Points [35, 0; 0, -10; 15, 0]
DstBlock "Induction Machine"
DstPort 3
}
Line {
SrcBlock "Integrator1"
SrcPort 1
DstBlock "Sum"

http://encon.fke.utm.my/courses/mep1422/foc.mdl (34 von 36) [17.05.2005 17:15:41]


http://encon.fke.utm.my/courses/mep1422/foc.mdl

DstPort 1
}
Line {
SrcBlock "Integrator2"
SrcPort 1
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "Subsystem3"
SrcPort 1
Points [-130, 0]
DstBlock "Sum1"
DstPort 2
}
Line {
SrcBlock "Subsystem3"
SrcPort 2
Points [-110, 0]
DstBlock "Sum2"
DstPort 2
}
Line {
SrcBlock "Subsystem3"
SrcPort 3
Points [-85, 0]
DstBlock "Sum3"
DstPort 2
}
Line {
SrcBlock "Subsystem1"
SrcPort 3
Points [50, 0; 0, -20]
DstBlock "Subsystem5"
DstPort 2
}
Line {
SrcBlock "Subsystem5"
SrcPort 1
DstBlock "Subsystem4"
DstPort 1
}
Line {
SrcBlock "Subsystem5"
SrcPort 2
DstBlock "Subsystem4"
DstPort 2
}
Line {
SrcBlock "Subsystem1"
SrcPort 1
DstBlock "Subsystem5"
DstPort 1
}
Line {
SrcBlock "Sum"
SrcPort 1
Points [0, -120; -25, 0]
DstBlock "Subsystem5"
DstPort 3
}
Line {
SrcBlock "Induction Machine"
SrcPort 8
Points [20, 0; 0, 100]

http://encon.fke.utm.my/courses/mep1422/foc.mdl (35 von 36) [17.05.2005 17:15:41]


http://encon.fke.utm.my/courses/mep1422/foc.mdl

DstBlock "Scope"
DstPort 2
}
}
}

http://encon.fke.utm.my/courses/mep1422/foc.mdl (36 von 36) [17.05.2005 17:15:41]


DIRECT TORQUE CONTROL OF IM

If a three phase VSI is connected to an IM, there can be eight possible


configurations of six switching devices within the inverter. As a result, there are
eight possible input voltage vectors to the IM. The eight voltage vectors, two of
which are zero vectors, are shown in Fig 1.

DTC utilises the eight possible stator voltage vectors, to control the stator
flux and torque to follow the reference values within the hysteresis bands. The
voltage space vector of a three-phase system is given by:

= ( + + ) =
π
(1)

vsA, vsB, and vsC are the instantaneous phase voltages.

For the switching VSI, it can be shown that for a DC link voltage of Vd, the
voltage space vector is given by:

= ( + + ) =
π
(2)

Sa(t), Sb(t) and Sc(t) are the switching functions of each leg of the VSI, such that,

1 when upper switch is on


Si =
0 when lower switch is on

Figure 1. Voltage vectors for 3-phase VSI

Direct Flux Control


The IM stator voltage equation is given by:

ψ
= + (3)

Where v s , i s , and ψ s are the stator voltage, current and stator flux space vectors
respectively. According to equation (3), if the stator resistance is small and can
be neglected, the change in stator flux, ∆ψ s , will follow the stator voltage, i.e.,
∆ψ s = v s ∆t (4)
This simply means that the tip of the stator flux will follow that of the stator
voltage space vector multiplied by the small change in time. Hence if the stator
flux space vector (magnitude and angle) is known, its locus can be controlled by
selecting appropriate stator voltage vectors. In DTC the stator flux space vector
is obtained by calculation utilizing the motor terminal variables (stator voltages
and currents). The stator flux is forced to follow the reference value within a
hysteresis band by selecting the appropriate stator voltage vector using the
hysteresis comparator and selection table.

Direct Torque Control


As shown by Takahashi and Noguchi [1], under a condition of a constant mechanical
frequency and stator flux magnitude, when a step increase in the stator angular
frequency is applied at t=0, the rate of change of torque at time t=0 is
proportional to the slip frequency of the stator flux . Thus,

dT
α ω sl t =0
(5)
dt t =0

where ωsl is the instantaneous angular slip frequency

If the torque and stator flux is kept within their hysteresis bands by selecting
appropriate voltage vectors, an independent control over the torque and stator flux
is accomplished. If the stator flux space vector plane is divided into six sectors
or segments (Figure 2), a set of table or rules of which voltage vector should be
chosen in a particular sector (either to increase stator flux or to reduce stator
flux and either to increase torque or to reduce torque) can be constructed; such
table is given by Table 1.

Figure 2 Six sectors of stator flux plane


Table 1 Voltage vectors look-up table.

! "
" ""
"
""

! "
" ""
"
""

vs,4

Sector II

vs,3

Sector I vs,4

vs,4 vs,3

vs,3
vs,5 vs,2

vs,2 vs,6 vs,1

vs,3

Figure 3 Flux control within the hysteresis band

ψ
θψ

Figure 4 Basic DTC

#$ %& ' &%()* + , '- .) * - // 0 ) ) *0 )/ ) 1)) 2


) - () 3 . 45 678
http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl

Model {
Name "DTC_hysteresis"
Version 5.0
SaveDefaultBlockParams on
SampleTimeColors off
LibraryLinkDisplay "none"
WideLines off
ShowLineDimensions off
ShowPortDataTypes off
ShowLoopsOnError on
IgnoreBidirectionalLines off
ShowStorageClass off
ExecutionOrder off
RecordCoverage off
CovPath "/"
CovSaveName "covdata"
CovMetricSettings "dw"
CovNameIncrementing off
CovHtmlReporting on
covSaveCumulativeToWorkspaceVar on
CovSaveSingleToWorkspaceVar on
CovCumulativeVarName "covCumulativeData"
CovCumulativeReport off
DataTypeOverride "UseLocalSettings"
MinMaxOverflowLogging "UseLocalSettings"
MinMaxOverflowArchiveMode "Overwrite"
BlockNameDataTip off
BlockParametersDataTip off
BlockDescriptionStringDataTip off
ToolBar on
StatusBar on
BrowserShowLibraryLinks off
BrowserLookUnderMasks off
Created "Tue Oct 01 11:07:25 2002"
UpdateHistory "UpdateHistoryNever"
ModifiedByFormat "%<Auto>"
LastModifiedBy "Administrator"
ModifiedDateFormat "%<Auto>"
LastModifiedDate "Mon Aug 09 11:36:28 2004"
ModelVersionFormat "1.%<AutoIncrement:16>"
ConfigurationManager "none"
SimParamPage "Solver"
LinearizationMsg "none"
Profile off
ParamWorkspaceSource "MATLABWorkspace"
AccelSystemTargetFile "accel.tlc"
AccelTemplateMakefile "accel_default_tmf"
AccelMakeCommand "make_rtw"
TryForcingSFcnDF off
ExtModeMexFile "ext_comm"
ExtModeBatchMode off
ExtModeTrigType "manual"
ExtModeTrigMode "normal"
ExtModeTrigPort "1"
ExtModeTrigElement "any"
ExtModeTrigDuration 1000
ExtModeTrigHoldOff 0
ExtModeTrigDelay 0
ExtModeTrigDirection "rising"
ExtModeTrigLevel 0
ExtModeArchiveMode "off"
ExtModeAutoIncOneShot off
ExtModeIncDirWhenArm off
ExtModeAddSuffixToVar off
ExtModeWriteAllDataToWs off

http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl (1 von 29) [17.05.2005 17:16:36]


http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl

ExtModeArmWhenConnect on
ExtModeSkipDownloadWhenConnect off
ExtModeLogAll on
ExtModeAutoUpdateStatusClock on
BufferReuse on
RTWExpressionDepthLimit 5
SimulationMode "normal"
Solver "ode5"
SolverMode "Auto"
StartTime "0.0"
StopTime "1000"
MaxOrder 5
MaxStep "0.0001"
MinStep "0.00001"
MaxNumMinSteps "-1"
InitialStep "0.00001"
FixedStep "1e-6"
RelTol "1e-3"
AbsTol "auto"
OutputOption "RefineOutputTimes"
OutputTimes "[]"
Refine "1"
LoadExternalInput off
ExternalInput "[t, u]"
LoadInitialState off
InitialState "xInitial"
SaveTime on
TimeSaveName "t"
SaveState off
StateSaveName "xout"
SaveOutput on
OutputSaveName "yout"
SaveFinalState off
FinalStateName "xFinal"
SaveFormat "Array"
Decimation "1"
LimitDataPoints on
MaxDataPoints "10000000"
SignalLoggingName "sigsOut"
ConsistencyChecking "none"
ArrayBoundsChecking "none"
AlgebraicLoopMsg "warning"
BlockPriorityViolationMsg "warning"
MinStepSizeMsg "warning"
InheritedTsInSrcMsg "warning"
DiscreteInheritContinuousMsg "warning"
MultiTaskRateTransMsg "error"
SingleTaskRateTransMsg "none"
CheckForMatrixSingularity "none"
IntegerOverflowMsg "warning"
Int32ToFloatConvMsg "warning"
ParameterDowncastMsg "error"
ParameterOverflowMsg "error"
ParameterPrecisionLossMsg "warning"
UnderSpecifiedDataTypeMsg "none"
UnnecessaryDatatypeConvMsg "none"
VectorMatrixConversionMsg "none"
InvalidFcnCallConnMsg "error"
SignalLabelMismatchMsg "none"
UnconnectedInputMsg "warning"
UnconnectedOutputMsg "warning"
UnconnectedLineMsg "warning"
SfunCompatibilityCheckMsg "none"
RTWInlineParameters off
BlockReductionOpt off

http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl (2 von 29) [17.05.2005 17:16:36]


http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl

BooleanDataType off
ConditionallyExecuteInputs on
ParameterPooling on
OptimizeBlockIOStorage on
ZeroCross on
AssertionControl "UseLocalSettings"
ProdHWDeviceType "Microprocessor"
ProdHWWordLengths "8,16,32,32"
RTWSystemTargetFile "grt.tlc"
RTWTemplateMakefile "grt_default_tmf"
RTWMakeCommand "make_rtw"
RTWGenerateCodeOnly off
RTWRetainRTWFile off
TLCProfiler off
TLCDebug off
TLCCoverage off
TLCAssertion off
BlockDefaults {
Orientation "right"
ForegroundColor "black"
BackgroundColor "white"
DropShadow off
NamePlacement "normal"
FontName "Helvetica"
FontSize 10
FontWeight "normal"
FontAngle "normal"
ShowName on
}
BlockParameterDefaults {
Block {
BlockType Demux
Outputs "4"
DisplayOption "none"
BusSelectionMode off
}
Block {
BlockType Fcn
Expr "sin(u[1])"
}
Block {
BlockType Gain
Gain "1"
Multiplication "Element-wise(K.*u)"
ShowAdditionalParam off
ParameterDataTypeMode "Same as input"
ParameterDataType "sfix(16)"
ParameterScalingMode "Best Precision: Matrix-wise"
ParameterScaling "2^0"
OutDataTypeMode "Same as input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
}
Block {
BlockType Inport
Port "1"
PortDimensions "-1"
SampleTime "-1"
ShowAdditionalParam off
LatchInput off
DataType "auto"
OutDataType "sfix(16)"

http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl (3 von 29) [17.05.2005 17:16:37]


http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl

OutScaling "2^0"
SignalType "auto"
SamplingMode "auto"
Interpolate on
}
Block {
BlockType Integrator
ExternalReset "none"
InitialConditionSource "internal"
InitialCondition "0"
LimitOutput off
UpperSaturationLimit "inf"
LowerSaturationLimit "-inf"
ShowSaturationPort off
ShowStatePort off
AbsoluteTolerance "auto"
ZeroCross on
}
Block {
BlockType Mux
Inputs "4"
DisplayOption "none"
}
Block {
BlockType Outport
Port "1"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Block {
BlockType Relay
OnSwitchValue "eps"
OffSwitchValue "eps"
OnOutputValue "1"
OffOutputValue "0"
ShowAdditionalParam off
OutputDataTypeScalingMode "All ports same datatype"
OutDataType "sfix(16)"
OutScaling "2^0"
ConRadixGroup "Use specified scaling"
ZeroCross on
}
Block {
BlockType Scope
Floating off
ModelBased off
TickLabels "OneTimeTick"
ZoomMode "on"
Grid "on"
TimeRange "auto"
YMin "-5"
YMax "5"
SaveToWorkspace off
SaveName "ScopeData"
LimitDataPoints on
MaxDataPoints "5000"
Decimation "1"
SampleInput off
SampleTime "0"
}
Block {
BlockType "S-Function"
FunctionName "system"
PortCounts "[]"
SFunctionModules "''"

http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl (4 von 29) [17.05.2005 17:16:37]


http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl

}
Block {
BlockType SignalGenerator
WaveForm "sine"
Amplitude "1"
Frequency "1"
Units "Hertz"
VectorParams1D on
}
Block {
BlockType Step
Time "1"
Before "0"
After "1"
SampleTime "-1"
VectorParams1D on
ZeroCross on
}
Block {
BlockType SubSystem
ShowPortLabels on
Permissions "ReadWrite"
RTWSystemCode "Auto"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
SimViewingDevice off
DataTypeOverride "UseLocalSettings"
MinMaxOverflowLogging "UseLocalSettings"
}
Block {
BlockType Sum
IconShape "rectangular"
Inputs "++"
ShowAdditionalParam off
InputSameDT on
OutDataTypeMode "Same as first input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
}
}
AnnotationDefaults {
HorizontalAlignment "center"
VerticalAlignment "middle"
ForegroundColor "black"
BackgroundColor "white"
DropShadow off
FontName "Helvetica"
FontSize 10
FontWeight "normal"
FontAngle "normal"
}
LineDefaults {
FontName "Helvetica"
FontSize 9
FontWeight "normal"
FontAngle "normal"
}
System {
Name "DTC_hysteresis"
Location [2, 74, 1014, 724]
Open on
ModelBrowserVisibility off

http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl (5 von 29) [17.05.2005 17:16:37]


http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl

ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
ReportName "simulink-default.rpt"
Block {
BlockType SubSystem
Name "Induction Machine"
Ports [3, 8]
Position [160, 63, 215, 192]
TreatAsAtomicUnit off
MaskPromptString "Stator resistance (ohm)|Rotor resistance (ohm)|"
"Stator self inductance (H)|Rotor self inductance (H)|Mutual Inductance (H)|No"
" of poles|Moment of inertia (kg.m^2)|Load torque (Nm)"
MaskStyleString "edit,edit,edit,edit,edit,edit,edit,edit"
MaskTunableValueString "on,on,on,on,on,on,on,on"
MaskCallbackString "|||||||"
MaskEnableString "on,on,on,on,on,on,on,on"
MaskVisibilityString "on,on,on,on,on,on,on,on"
MaskToolTipString "on,on,on,on,on,on,on,on"
MaskVarAliasString ",,,,,,,"
MaskVariables "Rs=@1;Rr=@2;Ls=@3;Lr=@4;Lm=@5;pole=@6;J=@7;Tloa"
"d=@8;"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "5.5|4.51|306.5e-3|306.5e-3|291.9e-3|4|0.03|1"
System {
Name "Induction Machine"
Location [175, 176, 935, 636]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "Va"
Position [25, 40, 45, 60]
}
Block {
BlockType Inport
Name "Vb"
Position [25, 120, 45, 140]
Port "2"
}
Block {
BlockType Inport
Name "Vc"
Position [25, 240, 45, 260]
Port "3"
}
Block {
BlockType Gain
Name "1/J"
Position [260, 292, 285, 318]
Orientation "left"

http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl (6 von 29) [17.05.2005 17:16:37]


http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl

Gain "1/J"
SaturateOnIntegerOverflow off
}
Block {
BlockType Gain
Name "1/J1"
Position [295, 347, 320, 373]
Gain "0.05"
SaturateOnIntegerOverflow off
}
Block {
BlockType SubSystem
Name "3to2"
Ports [3, 2]
Position [105, 81, 135, 139]
ShowPortLabels off
TreatAsAtomicUnit off
System {
Name "3to2"
Location [4, 42, 628, 468]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "in_1"
Position [15, 50, 35, 70]
}
Block {
BlockType Inport
Name "in_2"
Position [15, 115, 35, 135]
Port "2"
}
Block {
BlockType Inport
Name "in_3"
Position [15, 180, 35, 200]
Port "3"
}
Block {
BlockType Gain
Name "Gain3"
Position [120, 248, 160, 272]
Gain "0.577"
}
Block {
BlockType Gain
Name "Gain4"
Position [120, 298, 160, 322]
Gain "-0.577"
}
Block {
BlockType Gain
Name "Gain5"
Position [145, 143, 185, 167]
Gain "-0.33333"
}
Block {

http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl (7 von 29) [17.05.2005 17:16:37]


http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl

BlockType Gain
Name "Gain6"
Position [140, 183, 180, 207]
Gain "-0.33333"
}
Block {
BlockType Gain
Name "Gain7"
Position [135, 63, 175, 87]
Gain "0.66666"
}
Block {
BlockType Sum
Name "Ib"
Ports [2, 1]
Position [240, 255, 260, 275]
}
Block {
BlockType Sum
Name "Ib1"
Ports [3, 1]
Position [260, 87, 280, 123]
Inputs "+++"
}
Block {
BlockType Outport
Name "d"
Position [330, 60, 350, 80]
InitialOutput "0"
}
Block {
BlockType Outport
Name "q"
Position [310, 250, 330, 270]
Port "2"
InitialOutput "0"
}
Line {
SrcBlock "Ib1"
SrcPort 1
Points [15, 0; 0, -35]
DstBlock "d"
DstPort 1
}
Line {
SrcBlock "Gain7"
SrcPort 1
Points [30, 0; 0, 20]
DstBlock "Ib1"
DstPort 1
}
Line {
SrcBlock "in_1"
SrcPort 1
Points [40, 0; 0, 15]
DstBlock "Gain7"
DstPort 1
}
Line {
SrcBlock "Gain6"
SrcPort 1
Points [30, 0; 0, -90]
DstBlock "Ib1"
DstPort 2
}

http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl (8 von 29) [17.05.2005 17:16:37]


http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl

Line {
SrcBlock "Gain5"
SrcPort 1
Points [25, 0; 0, -40]
DstBlock "Ib1"
DstPort 3
}
Line {
SrcBlock "in_3"
SrcPort 1
Points [40, 0; 0, 5]
Branch {
DstBlock "Gain6"
DstPort 1
}
Branch {
Points [0, 115]
DstBlock "Gain4"
DstPort 1
}
}
Line {
SrcBlock "in_2"
SrcPort 1
Points [20, 0; 0, 30]
Branch {
DstBlock "Gain5"
DstPort 1
}
Branch {
Points [0, 105]
DstBlock "Gain3"
DstPort 1
}
}
Line {
SrcBlock "Gain3"
SrcPort 1
DstBlock "Ib"
DstPort 1
}
Line {
SrcBlock "Gain4"
SrcPort 1
Points [30, 0; 0, -40]
DstBlock "Ib"
DstPort 2
}
Line {
SrcBlock "Ib"
SrcPort 1
DstBlock "q"
DstPort 1
}
}
}
Block {
BlockType Demux
Name "Demux"
Ports [1, 5]
Position [420, 91, 460, 149]
Outputs "5"
}
Block {
BlockType Gain

http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl (9 von 29) [17.05.2005 17:16:37]


http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl

Name "Gain1"
Position [150, 407, 175, 433]
Orientation "left"
Gain "2/pole"
}
Block {
BlockType SubSystem
Name "IM1"
Ports [1, 1]
Position [320, 106, 380, 134]
TreatAsAtomicUnit off
System {
Name "IM1"
Location [248, 340, 468, 422]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [25, 33, 55, 47]
}
Block {
BlockType "S-Function"
Name "S-Function"
Ports [1, 1]
Position [80, 25, 140, 55]
FunctionName "imch"
Parameters "Rs, Rr, Ls,Lr,Lm,pole"
}
Block {
BlockType Outport
Name "Out1"
Position [165, 33, 195, 47]
InitialOutput "0"
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "S-Function"
DstPort 1
}
Line {
SrcBlock "S-Function"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
}
}
Block {
BlockType Integrator
Name "Integrator"
Ports [1, 1]
Position [360, 295, 380, 315]
Orientation "left"
}
Block {
BlockType Mux

http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl (10 von 29) [17.05.2005 17:16:37]


http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl

Name "Mux"
Ports [3, 1]
Position [260, 104, 290, 136]
Inputs "3"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [440, 287, 460, 323]
Orientation "left"
Inputs "+-"
}
Block {
BlockType Outport
Name "isd"
Position [630, 25, 650, 45]
InitialOutput "0"
}
Block {
BlockType Outport
Name "isq"
Position [625, 70, 645, 90]
Port "2"
InitialOutput "0"
}
Block {
BlockType Outport
Name "ird"
Position [600, 140, 620, 160]
Port "3"
InitialOutput "0"
}
Block {
BlockType Outport
Name "speed"
Position [90, 410, 110, 430]
Orientation "left"
Port "4"
InitialOutput "0"
}
Block {
BlockType Outport
Name "Vd"
Position [265, 50, 285, 70]
Port "5"
InitialOutput "0"
}
Block {
BlockType Outport
Name "irq"
Position [595, 185, 615, 205]
Port "6"
InitialOutput "0"
}
Block {
BlockType Outport
Name "Vq"
Position [90, 285, 110, 305]
Orientation "left"
Port "7"
InitialOutput "0"
}
Block {
BlockType Outport

http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl (11 von 29) [17.05.2005 17:16:37]


http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl

Name "Te"
Position [715, 230, 735, 250]
Port "8"
InitialOutput "0"
}
Line {
SrcBlock "Demux"
SrcPort 1
Points [60, 0; 0, -20]
DstBlock "isq"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 2
Points [65, 0; 0, -75]
DstBlock "isd"
DstPort 1
}
Line {
SrcBlock "3to2"
SrcPort 2
Points [0, 0]
Branch {
Points [0, 170]
DstBlock "Vq"
DstPort 1
}
Branch {
Points [55, 0; 0, -15]
DstBlock "Mux"
DstPort 1
}
}
Line {
SrcBlock "3to2"
SrcPort 1
Points [0, 0; 25, 0]
Branch {
Points [0, -35]
DstBlock "Vd"
DstPort 1
}
Branch {
Points [30, 0; 0, 25]
DstBlock "Mux"
DstPort 2
}
}
Line {
SrcBlock "Demux"
SrcPort 5
Points [45, 0; 0, 145]
Branch {
Points [0, 15; -35, 0]
DstBlock "Sum"
DstPort 1
}
Branch {
Points [70, 0; 0, -45]
DstBlock "Te"
DstPort 1
}
}
Line {

http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl (12 von 29) [17.05.2005 17:16:37]


http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl

SrcBlock "Vc"
SrcPort 1
Points [20, 0; 0, -120]
DstBlock "3to2"
DstPort 3
}
Line {
SrcBlock "Vb"
SrcPort 1
Points [20, 0; 0, -20]
DstBlock "3to2"
DstPort 2
}
Line {
SrcBlock "Va"
SrcPort 1
Points [20, 0; 0, 40]
DstBlock "3to2"
DstPort 1
}
Line {
SrcBlock "1/J"
SrcPort 1
Points [0, 0; -25, 0]
Branch {
Points [0, -175]
DstBlock "Mux"
DstPort 3
}
Branch {
Points [-15, 0; 0, 115]
DstBlock "Gain1"
DstPort 1
}
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "IM1"
DstPort 1
}
Line {
SrcBlock "IM1"
SrcPort 1
DstBlock "Demux"
DstPort 1
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Integrator"
DstPort 1
}
Line {
SrcBlock "Integrator"
SrcPort 1
DstBlock "1/J"
DstPort 1
}
Line {
SrcBlock "1/J1"
SrcPort 1
Points [190, 0; 0, -45]
DstBlock "Sum"
DstPort 2

http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl (13 von 29) [17.05.2005 17:16:37]


http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl

}
Line {
SrcBlock "Demux"
SrcPort 3
Points [30, 0; 0, 75]
DstBlock "irq"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 4
Points [25, 0; 0, 20]
DstBlock "ird"
DstPort 1
}
Line {
SrcBlock "Gain1"
SrcPort 1
Points [0, 0; -10, 0]
Branch {
DstBlock "speed"
DstPort 1
}
Branch {
Points [0, -60]
DstBlock "1/J1"
DstPort 1
}
}
Annotation {
Name "q"
Position [482, 87]
VerticalAlignment "top"
}
}
}
Block {
BlockType "S-Function"
Name "S-Function2"
Ports [1, 1]
Position [220, 355, 270, 375]
Orientation "left"
FunctionName "flxp2"
}
Block {
BlockType Scope
Name "Scope"
Ports [3]
Position [560, 214, 590, 246]
Location [249, 259, 660, 649]
Open on
NumInputPorts "3"
ZoomMode "yonly"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
axes2 "%<SignalLabel>"
axes3 "%<SignalLabel>"
}
List {
ListType SelectedSignals
axes1 ""
axes2 ""
axes3 ""
}

http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl (14 von 29) [17.05.2005 17:16:37]


http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl

TimeRange "0.1"
YMin "-0.1~-20~-15"
YMax "2~20~15"
DataFormat "StructureWithTime"
}
Block {
BlockType Scope
Name "Scope1"
Ports [1]
Position [560, 144, 590, 176]
Location [667, 408, 991, 647]
Open on
NumInputPorts "1"
ZoomMode "yonly"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
List {
ListType SelectedSignals
axes1 ""
}
TimeRange "0.01"
YMin "-0.1"
YMax "2"
SaveName "ScopeData1"
DataFormat "StructureWithTime"
}
Block {
BlockType Scope
Name "Scope2"
Ports [1]
Position [325, 184, 355, 216]
Location [667, 110, 991, 349]
Open on
NumInputPorts "1"
ZoomMode "yonly"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
List {
ListType SelectedSignals
axes1 ""
}
TimeRange "0.01"
YMin "-20"
YMax "20"
SaveName "ScopeData2"
DataFormat "StructureWithTime"
}
Block {
BlockType SignalGenerator
Name "Signal\nGenerator"
Position [640, 320, 670, 350]
Orientation "left"
WaveForm "square"
Amplitude "-15"
Frequency "15"
}
Block {
BlockType Step
Name "Step"
Position [545, 380, 575, 410]
Orientation "left"

http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl (15 von 29) [17.05.2005 17:16:37]


http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl

Time "0.001"
After "1.2"
}
Block {
BlockType SubSystem
Name "Subsystem"
Ports [3, 3]
Position [110, 286, 160, 384]
Orientation "left"
TreatAsAtomicUnit off
System {
Name "Subsystem"
Location [230, 305, 670, 522]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "T,err"
Position [25, 35, 45, 55]
}
Block {
BlockType Inport
Name "Flx,err"
Position [25, 105, 45, 125]
Port "2"
}
Block {
BlockType Inport
Name "Flx ang"
Position [25, 160, 45, 180]
Port "3"
}
Block {
BlockType Demux
Name "Demux"
Ports [1, 3]
Position [280, 99, 320, 131]
Outputs "3"
}
Block {
BlockType Mux
Name "Mux"
Ports [3, 1]
Position [100, 99, 130, 131]
Inputs "3"
}
Block {
BlockType "S-Function"
Name "S-Function1"
Ports [1, 1]
Position [180, 105, 230, 125]
FunctionName "select2"
}
Block {
BlockType Outport
Name "Sa"
Position [375, 25, 395, 45]
InitialOutput "0"

http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl (16 von 29) [17.05.2005 17:16:37]


http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl

}
Block {
BlockType Outport
Name "Sb"
Position [395, 105, 415, 125]
Port "2"
InitialOutput "0"
}
Block {
BlockType Outport
Name "Sc"
Position [350, 170, 370, 190]
Port "3"
InitialOutput "0"
}
Line {
SrcBlock "Flx ang"
SrcPort 1
DstBlock "Mux"
DstPort 3
}
Line {
SrcBlock "Demux"
SrcPort 3
Points [0, 55]
DstBlock "Sc"
DstPort 1
}
Line {
SrcBlock "Flx,err"
SrcPort 1
DstBlock "Mux"
DstPort 2
}
Line {
SrcBlock "Demux"
SrcPort 2
DstBlock "Sb"
DstPort 1
}
Line {
SrcBlock "T,err"
SrcPort 1
DstBlock "Mux"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 1
Points [0, -70]
DstBlock "Sa"
DstPort 1
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "S-Function1"
DstPort 1
}
Line {
SrcBlock "S-Function1"
SrcPort 1
DstBlock "Demux"
DstPort 1
}

http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl (17 von 29) [17.05.2005 17:16:37]


http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl

}
}
Block {
BlockType Sum
Name "Sum2"
Ports [2, 1]
Position [510, 307, 530, 343]
Orientation "left"
Inputs "-+"
}
Block {
BlockType Sum
Name "Sum4"
Ports [2, 1]
Position [435, 380, 455, 400]
Orientation "left"
Inputs "+-"
}
Block {
BlockType SubSystem
Name "Voltage-controlled\nPWM-VSI1"
Ports [3, 3]
Position [70, 96, 100, 164]
ShowPortLabels off
TreatAsAtomicUnit off
System {
Name "Voltage-controlled\nPWM-VSI1"
Location [-23, 85, 764, 579]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "in_5"
Position [370, 60, 390, 80]
Orientation "left"
}
Block {
BlockType Inport
Name "in_6"
Position [390, 155, 410, 175]
Orientation "left"
Port "2"
}
Block {
BlockType Inport
Name "in_7"
Position [395, 225, 415, 245]
Orientation "left"
Port "3"
}
Block {
BlockType Gain
Name "Gain1"
Position [290, 152, 315, 178]
Orientation "left"
Gain "240"
}
Block {

http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl (18 von 29) [17.05.2005 17:16:37]


http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl

BlockType Gain
Name "Gain2"
Position [295, 222, 320, 248]
Orientation "left"
Gain "240"
}
Block {
BlockType Gain
Name "Gain3"
Position [285, 57, 310, 83]
Orientation "left"
Gain "240"
}
Block {
BlockType Outport
Name "out_1"
Position [160, 60, 180, 80]
Orientation "left"
InitialOutput "0"
}
Block {
BlockType Outport
Name "out_2"
Position [165, 155, 185, 175]
Orientation "left"
Port "2"
InitialOutput "0"
}
Block {
BlockType Outport
Name "out_3"
Position [175, 225, 195, 245]
Orientation "left"
Port "3"
InitialOutput "0"
}
Line {
SrcBlock "in_5"
SrcPort 1
DstBlock "Gain3"
DstPort 1
}
Line {
SrcBlock "in_6"
SrcPort 1
DstBlock "Gain1"
DstPort 1
}
Line {
SrcBlock "in_7"
SrcPort 1
DstBlock "Gain2"
DstPort 1
}
Line {
SrcBlock "Gain3"
SrcPort 1
DstBlock "out_1"
DstPort 1
}
Line {
SrcBlock "Gain1"
SrcPort 1
DstBlock "out_2"
DstPort 1

http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl (19 von 29) [17.05.2005 17:16:37]


http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl

}
Line {
SrcBlock "Gain2"
SrcPort 1
DstBlock "out_3"
DstPort 1
}
}
}
Block {
BlockType Relay
Name "flux\nhysterisis"
Position [335, 378, 365, 402]
Orientation "left"
OnSwitchValue "0.01"
OffSwitchValue "-0.01"
}
Block {
BlockType SubSystem
Name "stator flux - voltage model"
Ports [4, 4]
Position [345, 15, 415, 145]
TreatAsAtomicUnit off
MaskPromptString "Stator resistance"
MaskStyleString "edit"
MaskTunableValueString "on"
MaskEnableString "on"
MaskVisibilityString "on"
MaskToolTipString "on"
MaskVariables "Rs=@1;"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "5.5"
System {
Name "stator flux - voltage model"
Location [160, 288, 765, 529]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "vd"
Position [50, 33, 80, 47]
}
Block {
BlockType Inport
Name "id"
Position [40, 98, 70, 112]
Port "2"
}
Block {
BlockType Inport
Name "vq"
Position [60, 143, 90, 157]
Port "3"
}
Block {

http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl (20 von 29) [17.05.2005 17:16:37]


http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl

BlockType Inport
Name "iq"
Position [25, 193, 55, 207]
Port "4"
}
Block {
BlockType SubSystem
Name "Cartesian to Polar"
Ports [2, 2]
Position [420, 92, 455, 143]
ShowPortLabels off
TreatAsAtomicUnit off
MaskType "[x,y]->[r,theta]"
MaskDescription "Tranformation from cartesian to polar\ncoor"
"dinates.\nr=sqrt(x^2+y^2), theta=atan(y/x)"
MaskHelp "Unmask this block for more help."
MaskDisplay "plot(0,0,100,100,[24,20,15,20,20],[85,95,85"
",95,20],[80,20,95,85,95,85],[70,20,20,15,20,24],[56,56,55,52,50,46],[20,26,31"
",35,38,42])"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "Cartesian to Polar"
Location [0, 0, 359, 206]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "x"
Position [20, 70, 40, 90]
}
Block {
BlockType Inport
Name "y"
Position [20, 129, 40, 151]
Port "2"
}
Block {
BlockType Mux
Name "Mux"
Ports [2, 1]
Position [75, 96, 105, 129]
Inputs "2"
}
Block {
BlockType Fcn
Name "x->r"
Position [155, 72, 260, 98]
Expr "hypot(u[1],u[2])"
}
Block {
BlockType Fcn
Name "x->theta"
Position [160, 129, 265, 151]
Expr "atan2(u[2],u[1])"
}

http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl (21 von 29) [17.05.2005 17:16:37]


http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl

Block {
BlockType Outport
Name "r"
Position [295, 75, 315, 95]
InitialOutput "0"
}
Block {
BlockType Outport
Name "theta"
Position [295, 130, 315, 150]
Port "2"
InitialOutput "0"
}
Line {
SrcBlock "x->theta"
SrcPort 1
DstBlock "theta"
DstPort 1
}
Line {
SrcBlock "y"
SrcPort 1
DstBlock "Mux"
DstPort 2
}
Line {
SrcBlock "x"
SrcPort 1
DstBlock "Mux"
DstPort 1
}
Line {
SrcBlock "x->r"
SrcPort 1
DstBlock "r"
DstPort 1
}
Line {
SrcBlock "Mux"
SrcPort 1
Points [15, 0]
Branch {
Points [0, 25]
DstBlock "x->theta"
DstPort 1
}
Branch {
Points [0, -30]
DstBlock "x->r"
DstPort 1
}
}
Annotation {
Name "Cartesian to Polar"
Position [167, 37]
VerticalAlignment "top"
}
}
}
Block {
BlockType Gain
Name "Gain2"
Position [170, 167, 195, 193]
Gain "Rs"
}

http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl (22 von 29) [17.05.2005 17:16:37]


http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl

Block {
BlockType Gain
Name "Gain3"
Position [170, 112, 195, 138]
Gain "Rs"
}
Block {
BlockType Integrator
Name "Integrator"
Ports [1, 1]
Position [315, 85, 345, 115]
}
Block {
BlockType Integrator
Name "Integrator1"
Ports [1, 1]
Position [310, 165, 340, 195]
}
Block {
BlockType Sum
Name "Sum6"
Ports [2, 1]
Position [240, 90, 260, 110]
Inputs "+-"
}
Block {
BlockType Sum
Name "Sum7"
Ports [2, 1]
Position [240, 145, 260, 165]
Inputs "+-"
}
Block {
BlockType Outport
Name "flxsdv"
Position [500, 28, 530, 42]
}
Block {
BlockType Outport
Name "flxsv"
Position [550, 88, 580, 102]
Port "2"
InitialOutput "0"
}
Block {
BlockType Outport
Name "angflxsv"
Position [480, 123, 510, 137]
Port "3"
InitialOutput "0"
}
Block {
BlockType Outport
Name "flxsqv"
Position [435, 203, 465, 217]
Port "4"
}
Line {
SrcBlock "Sum6"
SrcPort 1
DstBlock "Integrator"
DstPort 1
}
Line {
SrcBlock "Sum7"

http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl (23 von 29) [17.05.2005 17:16:37]


http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl

SrcPort 1
DstBlock "Integrator1"
DstPort 1
}
Line {
SrcBlock "Gain3"
SrcPort 1
Points [25, 0]
DstBlock "Sum6"
DstPort 2
}
Line {
SrcBlock "Gain2"
SrcPort 1
Points [0, -10]
DstBlock "Sum7"
DstPort 2
}
Line {
SrcBlock "vd"
SrcPort 1
Points [60, 0; 0, 55]
DstBlock "Sum6"
DstPort 1
}
Line {
SrcBlock "Integrator"
SrcPort 1
Points [0, 5; 25, 0]
Branch {
DstBlock "Cartesian to Polar"
DstPort 1
}
Branch {
Points [0, -70]
DstBlock "flxsdv"
DstPort 1
}
}
Line {
SrcBlock "Integrator1"
SrcPort 1
Points [50, 0]
Branch {
Points [0, -50]
DstBlock "Cartesian to Polar"
DstPort 2
}
Branch {
Points [0, 30]
DstBlock "flxsqv"
DstPort 1
}
}
Line {
SrcBlock "Cartesian to Polar"
SrcPort 1
Points [75, 0]
DstBlock "flxsv"
DstPort 1
}
Line {
SrcBlock "id"
SrcPort 1
Points [0, 20]

http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl (24 von 29) [17.05.2005 17:16:37]


http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl

DstBlock "Gain3"
DstPort 1
}
Line {
SrcBlock "Cartesian to Polar"
SrcPort 2
DstBlock "angflxsv"
DstPort 1
}
Line {
SrcBlock "vq"
SrcPort 1
DstBlock "Sum7"
DstPort 1
}
Line {
SrcBlock "iq"
SrcPort 1
Points [0, -20]
DstBlock "Gain2"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "torquehys"
Ports [1, 1]
Position [365, 300, 395, 350]
Orientation "left"
ShowPortLabels off
TreatAsAtomicUnit off
MaskPromptString "Hyst band"
MaskStyleString "edit"
MaskTunableValueString "on"
MaskEnableString "on"
MaskVisibilityString "on"
MaskToolTipString "on"
MaskVariables "Th=@1;"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "2"
System {
Name "torquehys"
Location [50, 122, 340, 345]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "in_1"
Position [275, 95, 295, 115]
Orientation "left"
}
Block {
BlockType Relay
Name "Relay"

http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl (25 von 29) [17.05.2005 17:16:37]


http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl

Position [185, 58, 215, 82]


Orientation "left"
OnSwitchValue "Th/2"
OffSwitchValue "0"
}
Block {
BlockType Relay
Name "Relay1"
Position [185, 123, 215, 147]
Orientation "left"
OnSwitchValue "0"
OffSwitchValue "-Th/2"
OnOutputValue "0"
OffOutputValue "-1"
}
Block {
BlockType Sum
Name "Sum3"
Ports [2, 1]
Position [55, 105, 75, 125]
Orientation "left"
}
Block {
BlockType Outport
Name "out_1"
Position [15, 105, 35, 125]
Orientation "left"
InitialOutput "0"
}
Line {
SrcBlock "Sum3"
SrcPort 1
DstBlock "out_1"
DstPort 1
}
Line {
SrcBlock "Relay1"
SrcPort 1
Points [-75, 0]
DstBlock "Sum3"
DstPort 2
}
Line {
SrcBlock "Relay"
SrcPort 1
Points [-65, 0]
DstBlock "Sum3"
DstPort 1
}
Line {
SrcBlock "in_1"
SrcPort 1
Points [-20, 0]
Branch {
Points [0, 30]
DstBlock "Relay1"
DstPort 1
}
Branch {
Points [-5, 0]
DstBlock "Relay"
DstPort 1
}
}
}

http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl (26 von 29) [17.05.2005 17:16:37]


http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl

}
Line {
SrcBlock "Induction Machine"
SrcPort 5
Points [30, 0; 0, -100]
DstBlock "stator flux - voltage model"
DstPort 1
}
Line {
SrcBlock "Induction Machine"
SrcPort 1
Points [110, 0]
DstBlock "stator flux - voltage model"
DstPort 2
}
Line {
SrcBlock "Induction Machine"
SrcPort 2
Points [70, 0; 0, 35]
DstBlock "stator flux - voltage model"
DstPort 4
}
Line {
SrcBlock "Induction Machine"
SrcPort 7
Points [15, 0; 0, -70]
DstBlock "stator flux - voltage model"
DstPort 3
}
Line {
SrcBlock "stator flux - voltage model"
SrcPort 3
Points [40, 0; 0, 270]
DstBlock "S-Function2"
DstPort 1
}
Line {
SrcBlock "Induction Machine"
SrcPort 8
Points [20, 0; 0, 20]
Branch {
Points [0, 90; 140, 0]
Branch {
Points [165, 0]
DstBlock "Sum2"
DstPort 1
}
Branch {
Points [0, -60]
DstBlock "Scope"
DstPort 2
}
}
Branch {
DstBlock "Scope2"
DstPort 1
}
}
Line {
SrcBlock "stator flux - voltage model"
SrcPort 2
Points [65, 0; 0, 95]
Branch {
Points [0, 60]
Branch {

http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl (27 von 29) [17.05.2005 17:16:37]


http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl

Points [0, 165]


DstBlock "Sum4"
DstPort 1
}
Branch {
DstBlock "Scope"
DstPort 1
}
}
Branch {
DstBlock "Scope1"
DstPort 1
}
}
Line {
SrcBlock "Voltage-controlled\nPWM-VSI1"
SrcPort 1
Points [20, 0; 0, -25]
DstBlock "Induction Machine"
DstPort 1
}
Line {
SrcBlock "Voltage-controlled\nPWM-VSI1"
SrcPort 2
DstBlock "Induction Machine"
DstPort 2
}
Line {
SrcBlock "Voltage-controlled\nPWM-VSI1"
SrcPort 3
Points [20, 0; 0, 25]
DstBlock "Induction Machine"
DstPort 3
}
Line {
SrcBlock "Subsystem"
SrcPort 1
Points [-80, 0; 0, -195]
DstBlock "Voltage-controlled\nPWM-VSI1"
DstPort 1
}
Line {
SrcBlock "Subsystem"
SrcPort 2
Points [-70, 0; 0, -205]
DstBlock "Voltage-controlled\nPWM-VSI1"
DstPort 2
}
Line {
SrcBlock "Subsystem"
SrcPort 3
Points [-60, 0; 0, -215]
DstBlock "Voltage-controlled\nPWM-VSI1"
DstPort 3
}
Line {
SrcBlock "flux\nhysterisis"
SrcPort 1
Points [-40, 0; 0, -55]
DstBlock "Subsystem"
DstPort 2
}
Line {
SrcBlock "Sum4"
SrcPort 1

http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl (28 von 29) [17.05.2005 17:16:37]


http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl

DstBlock "flux\nhysterisis"
DstPort 1
}
Line {
SrcBlock "Step"
SrcPort 1
DstBlock "Sum4"
DstPort 2
}
Line {
SrcBlock "torquehys"
SrcPort 1
Points [-60, 0; 0, -20]
DstBlock "Subsystem"
DstPort 1
}
Line {
SrcBlock "Sum2"
SrcPort 1
DstBlock "torquehys"
DstPort 1
}
Line {
SrcBlock "Signal\nGenerator"
SrcPort 1
DstBlock "Sum2"
DstPort 2
}
Line {
SrcBlock "S-Function2"
SrcPort 1
DstBlock "Subsystem"
DstPort 3
}
Line {
SrcBlock "Induction Machine"
SrcPort 4
Points [45, 0; 0, 120]
DstBlock "Scope"
DstPort 3
}
}
}

http://encon.fke.utm.my/courses/mep1422/DTC_hysteresis.mdl (29 von 29) [17.05.2005 17:16:37]

Você também pode gostar