3. Design and simulation
3.2. RRSA and EHA
3.2.2. Control algorithm design
The steps taken to design the motor control algorithm are presented in the following sub-section. The design, tuning and numerical validation of the control strategy have been made in Simulink, in particular, through the use of Motor control blockset toolbox. It provides the development of multirate simulations to detect and correct errors across the complete operating range of the motor before proceeding with hardware testing. Thus, this method permits to reduce the amount of prototype testing and verify the robustness of the control algorithm to fault conditions.
MTPA control reference
The first module designed is the MTPA control reference (fig. 3.3). It computes the d-axis
result in efficient output for the SPM motor in the constant torque region; successively, these references are interfaced with the FWC output.
Figure 3. 3: MTPA control reference
Basically, this block converts the input torque reference in the corresponding q-axis current while setting the d-axis current to zero. Moreover, its execution sample time is equal to 0.005 s. It is important to highlight that all the following control modules that are presented in the next lines are performed at the switching frequency rate to simulate the real microcontroller interrupt service routine i.e., with ππ = 5.00π β 05 s.
Sensorless estimators
Proceeding, the other inputs of the current controller have been processed i.e., the feedback signals. Sensorless control has been chosen for this simulation, thus, either the sliding mode observer or the flux observer are used to estimate the rotor position, as presented in section 2.3.
Figure 3. 4: Sensorless estimators
The SMO is tuned with a current observer gain equal to 0.01 and a unity sliding surface
voltage and current, coming internally from the control, using as reference value for the conversion respectively π£ππ₯ and ππππ₯. These signals are properly processed by a unit delay and a DC component removal module (fig. 3.5). The latter is inserted to cancel the offset introduced by the observerβs errors. In particular, it is composed by an infinite impulse response filter which modifies the signal with a discrete low pass filter using the following equation:
π¦(π) = π Γ π₯π+ (1 β π) Γ π¦πβ1 (3.6)
where π is the filter coefficient, π¦ is the filtered output value and π₯ is the sampled input value. The theoretical cutoff frequency is computed as:
ππ = π
(1 β π) β 2π β ππ (3.7)
Therefore, a lower filter coefficient gives better filtering at the cost of increasing the delay in the response time; in this case, the filter coefficient is set to 0.005.
Figure 3. 5: DC component removal
Clarke and Park transforms
Clarke and Park transforms are needed to translate ππ and ππ phase current measurements from the motor model in the d and q-axis current feedbacks.
Current controller
Figure 3.7 shows the current controller block scheme.
Figure 3. 7: Current controller block scheme
The inputs are the currents πππ_πππ and the speed feedback that in this simulation is simply the reference speed imposed to the motor; the outputs are the π£ππ_πππ voltages.
Before entering in the PI regulators, the current references are modified by means of the flux-weakening controller contribution and the current saturation. The FWC (fig. 3.8) accepts as input the maximum voltage reference and the magnitude of the π£ππ_πππ voltage imposed by the PI controllers. This last variable is first processed through a IIR filter, with coefficient 0.01, and a unit delay.
Figure 3. 8: Flux-weakening controller
β’ Proportional gain ππππ€ = 12.5 A/V.
β’ Integral gain ππππ€ = 0.06 A/Vs.
β’ Saturation limit [0, βππππ₯].
Therefore, if increasing the speed of the motor the magnitude of the π£ππ_πππ exceeds its maximum value, set to 0.9 β π£πππ₯, a negative ππ current is imposed to the drive, to maintain this reference. This means that the base speed is reduced with respect to its standard value reached at π£ππ₯, but the motor can still adequately run with a higher speed properly reducing the flux. In particular, for this machine πΌ0 < ππππ₯, thus, the current protection module is designed as in figure 3.9 to complete the work of the FWC.
Figure 3. 9: Current limitation
The overall strategy and the behaviour of the current space vector are the one illustrated in figure 2.14.
Once obtained the final current reference values, these fed the PI current regulator in figure 3.10; only one is needed since the machine is isotropic, so the inductance is the same for d and q axis.
Figure 3. 10: PI current regulator
The πππ_πππ currents are compared with the feedback currents and depending on the error the voltage references are chosen, with a maximum absolute value equal to π£πππ₯. The calibration has been made according to the equations 2.14:
β’ Current control bandwidth ππ = 1000 β 2π = 6283 rad/s.
β’ Proportional gain ππ = 2.2 V/A.
β’ Integral gain ππ = 427.2 V/As.
Figure 3.11 and 3.12 shows basic frequency control analysis exclusively of the FOC current control system, without FWC, considering the SPM motor parameters in table 3.1.
Figure 3. 11: Bode diagram
Figure 3. 12: Step response
Successively, the feed-forward of the motional terms is added to decouple the d and q-axis control. Finally, the resultant voltages pass through the voltage saturation module below that implements the equations 2.16.
Figure 3. 13: Voltage saturation
Space vector generator
The last module before the physical system model is the space vector generator.
Figure 3. 14: Space vector modulation
Firstly, the d and q-axis voltage references are transformed through the inverse Park transform and converted into per-unit values. Successively, they are sent to the space vector generator block which generates the space vector modulation signals, according to the SVM strategy illustrated in the section 2.2. The outputs are double hump signals between β1 and 1, thus, they are properly rescaled and translated to obtain the final duty cycles to be sent to the inverter (fig. 3.15).
Figure 3. 15: Duty cycles conversion