modelMovingIntegral
Extends from Modelica.Icons.Example (Icon for runnable examples).
Information
This example tests quadrature functions:
The function funB
defines the spatial distribution of the flux density with respect to the rotor surface, dependent on pole coverage α.
As the rotor position increases, the flux linkage of a coil of width β is caculated
by integration over the interval [pos + π/2 - β/2, pos + π/2 + β/2].
The maximum of the flux linkage psi0 is calculated analytically.
psi1is the result of the moving integral using d=1 trapezoidal rulepsi2is the result of the moving integral using d=2 Simpson's rulepsi3is the result of the moving integral using d=3 3/8-rulepsi4is the result of the moving integral using d=4 Boole's rulepsi5is the result of the moving integral using d=5psi6is the result of the moving integral using d=6
At time = 0, the positive maximum of flux density distribution is at pos = π/2,
the coil spans the angle [π/2 - β/2, π/2 + β/2].
Therefore the flux linkage has a maximum.
Since flux linkage is not differentiable, a derivative with first-order lag is used to calculate induced voltage.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| SI.MagneticFluxDensity | Bpeak | 1 | Amplitude |
| SI.Angle | alpha | 2*pi/3 | Pole coverage |
| SI.Angle | beta | pi | Coil width |
| Integer | N | 180 | Number of intervals |
| SI.MagneticFlux | psi0 | Bpeak*wlD*(min(alpha, beta) + (if alpha < beta then (1 + (pi/2 - beta/2)/(pi/2 - alpha/2))/2*(beta - alpha) else 0)) | Max. flux linkage (analytical) |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| SI.Angle | pos | 2*pi*time/Tend | Position |
| SI.MagneticFluxDensity | B | Bpeak*funB(pos, alpha) | Flux density |
| SI.MagneticFlux | psi1 | Bpeak*wlD*quadratureNewtonCotes(function funB(alpha = alpha), pos + pi/2 - beta/2, pos + pi/2 + beta/2, N = N, d = 1) | Flux linkage using trapezoidal rule |
| SI.MagneticFlux | psi2 | Bpeak*wlD*quadratureNewtonCotes(function funB(alpha = alpha), pos + pi/2 - beta/2, pos + pi/2 + beta/2, N = N, d = 2) | Flux linkage using Simpson's rule |
| SI.MagneticFlux | psi3 | Bpeak*wlD*quadratureNewtonCotes(function funB(alpha = alpha), pos + pi/2 - beta/2, pos + pi/2 + beta/2, N = N, d = 3) | Flux linkage using 3/8-rule |
| SI.MagneticFlux | psi4 | Bpeak*wlD*quadratureNewtonCotes(function funB(alpha = alpha), pos + pi/2 - beta/2, pos + pi/2 + beta/2, N = N, d = 4) | Flux linkage using Boole's rule |
| SI.MagneticFlux | psi5 | Bpeak*wlD*quadratureNewtonCotes(function funB(alpha = alpha), pos + pi/2 - beta/2, pos + pi/2 + beta/2, N = N, d = 5) | Flux linkage using d=5 |
| SI.MagneticFlux | psi6 | Bpeak*wlD*quadratureNewtonCotes(function funB(alpha = alpha), pos + pi/2 - beta/2, pos + pi/2 + beta/2, N = N, d = 6) | Flux linkage using d=6 |
| SI.Voltage | v | -(psi1 - xi)/Td | Induced voltage |