Professional Documents
Culture Documents
Electrical Drives Lectures
Electrical Drives Lectures
Electrical Drives
MEP 1422
2004/2005-02
'
! "
)
*
*
( &
+
& µ
#
$ %
)
) *
*
- #
$ %
#
. #
#
- #
&
&
&
! /
#
0
#
1
&
2 $ %
0
0
.
)
/ 0
$ %
#
#
# #
*
(
0
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
*
*
/
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
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
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)"
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"
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
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"
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
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
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]
}
}
}
!
# $
!
% &!
!
' ( ( ' )
*
% + #
"
' "'
'
, -
'
' "'
$" $
' −'
= *+
.
'
' , ' */
0 $" $
=
'
.
( − /
) *1
2 $" $ ,(3
0 , / "+ *
2 $" $ , ( 43 %
/ ,
2
=
'
/.
(( 3 − ( 3 ) = ' 5.
/
*6
"# "
' "'
#
"
' '
'
, - '
'
$" $
' −'
= *3
.
'
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
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
100 a b c
50
Figure 3 Sinusoidal
reference voltage
0
-50
-100
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
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
DC m a ch in e con s is t s of
Mo de lin g o f DC m o t o r
Te = k t Φ i a (1 )
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 )
1
e a = Kt ω
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 )
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
~
Te + Te = k E ( I a + i a )
(8 )
E e + ~ee = k E (ω + ω
~)
(9 )
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
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 )
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
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
ω ω
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)
DC Motors
• Several limitations:
• Regular Maintenance • Expensive
• Heavy • Speed limitations
• Sparking
Introduction
DC Motors
Rotor: armature
windings
Stator: field
windings
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
Armature circuit:
di a
Vt = R a i a + L + ea
dt
In steady state,
Vt = R a Ia + E a
Vt R T
ω= − a e2
k T φ (k T φ)
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
Maximum
Torque capability
ωbase ω
MODELING OF CONVERTERS
AND DC MOTOR
• Efficient
Ideal : lossless
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
+
iref + current vc firing α controlled
- controller circuit rectifier Vt
–
Modeling of Converters and DC motor
vt v vc
= c α= 180
180 α vt
Vm v
Va = cos c 180
π vt
v c = v s cos α
Vm v c
Va =
π vs
Modeling of Converters and DC motor
converter
T
GH(s)
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
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
+
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
~ ~ ~)
d (ω
~
Te = TL + B ω + J Te = TL + B(ω)
dt
Modeling of Converters and DC motor
~ ~ 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
Tl (s )
-
Va (s ) I a (s ) Te (s ) ω (s )
1 1
kT
+ Ra + sL a +
B + sJ
-
kE
CLOSED-LOOP SPEED CONTROL
tacho
kT
1/s
METHOD
• Obtain linear small signal model
Ra = 2 Ω La = 5.2 mH
Vd = 60 V Vtri = 5 V
fs = 33 kHz
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
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
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
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↑)
) * +*,-( % .
/ ( , 0 *
$ %! &' / , ( / (, 1 2,
1 23(
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
(
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
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
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
0 .1
Ga in 1
ki=100, kp=10
50
Ma gnitude (dB)
-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
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
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"
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"
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
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"
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"
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
}
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
}
}
}
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"
}
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
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]
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
}
}
}
}
c’ •
b’
x x
b • •
c
x
2
ωs = 2 πf rad/ s (1 )
p
ωs l = ωs – ωr (2 )
ωs − ωr
s = (3 )
ωs
E a g = k f φa g (4 )
1
Vs = R s Is + j(2 πf)Lls + E a g (5 )
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
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
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
Tem
Pu ll ou t
Tor qu e
Tm ,r a t ed
ωr
0 ωr a t ed ωs
s
1 0
Rr
sm = ±
R s + (X ls + X lr )
2 2
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 :
ω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
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
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
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 Ω
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
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
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=?
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 = 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
T L = K ω2
8
⇒ K = 20/(152.9)2 20
TL = ω2
1 5 2 .9 2
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
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
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
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
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
3-phase Rectifier
VSI
supply IM
Ramp Pulse
Width
ω* + + V
Modulator
+ +
Vboost
Slip speed
calculator
Vdc Idc
Te = Pag/ωsyn
12
Pag is estimated by subtracting the input DC power with the inverter and stator
copper losses.
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:
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.
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.
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
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
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)
ℑ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)
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
Ψ =Ψ +Ψ (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:
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
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)
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)
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
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)
Pmech = −
3
2
{
Re jωrL misi'*
r } (40)
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:
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
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
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
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
}
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"
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"
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 {
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"
}
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]
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"
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
}
}
}
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
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"
}
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
}
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]
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
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]
}
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"
}
}
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"
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
}
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
}
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]
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
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
/*
* 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.
*/
/* 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 *
*====================*/
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)
{
}
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;
/*======================================================*
* See sfuntmpl.doc for the optional S-function methods *
*======================================================*/
/*=============================*
* Required S-function trailer *
*=============================*/
"
# #
!
$
=
%
!
( + + %
) π
&
%'! %&
= +( %
%&
=) [ ]= ) %
!
( + + %
) =
%
!
−
&
%
−
&
%
!
= [ ]= %
!
( + + %
) =
&
( − ) *
!
=
%
!
( + + % ) +
(θ
= ,
- ω
$
=
%
!
( + + % ) .
/ $
(θ
= 0
1 & # #
θ
α
θ
1 &
(α
∴ = 2
34 $
− (α
∴ = &&
(α − (α
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 *
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
= ψ × (1)
= (ψ −ψ ) (2)
= (ψ ) (3)
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.
ψ
= + + ω ψ
ψ
= + + ω −ω ψ
ψ = +
ψ = + (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
[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
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
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"
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"
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
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
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"
}
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"
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"
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"
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 {
}
}
}
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"
}
}
}
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
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"
}
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 {
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
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"
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
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]
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"
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"
}
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 {
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]
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"
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
}
}
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"
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 {
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 {
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"
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]
DstBlock "Scope"
DstPort 2
}
}
}
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)
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,
ψ
= + (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.
dT
α ω sl t =0
(5)
dt t =0
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.
! "
" ""
"
""
! "
" ""
"
""
vs,4
Sector II
vs,3
Sector I vs,4
vs,4 vs,3
vs,3
vs,5 vs,2
vs,3
ψ
θψ
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
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
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)"
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 "''"
}
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
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"
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 {
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
}
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
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
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
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 {
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
}
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 ""
}
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"
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"
}
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
}
}
}
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 {
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
}
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 {
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])"
}
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"
}
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"
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]
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"
}
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 {
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
}
}
}