**1. Introduction**

Electrification of urban transportation services, from high power solutions, such as busses and trains, to low power ones, such as small cargo delivery vehicles became highly important. The pressure of developing such solutions is continuously increasing due to the highly crowded urban scenarios in which merchandise and goods must be delivered as fast as possible. Investigating, researching and creating such solutions challenges many universities and OEM engineers. Nowadays, taking advantage of the achievements in the field of computer aided design, any serious study requires advanced simulations, fusing measured data, estimated and computed ones into powerful computation models, able to replicate behavior of the actual hardware. It is important to mention that at a certain level of complexity, studies can become rather difficult by means of large required computation time, powerful computers to perform and many model's implementations time.

In order to achieve high precision and accurate phenomenon simulation, one must use several software interconnected, each performing analysis in their field of expertise. For example, when simulation of an urban electric vehicle (UEV), all the mechanical, aerodynamical and road conditioning factors can be simulated in Amesim Software, while all the power electronics, electrical drive assemblies and their advanced control can be simulated in Matlab/Simulink. Such a solution ensures high fidelity and correct analysis approach of each assembly of the UEV. However, a co-simulation of this magnitude becomes rather complicated, time and resource demanding, returning a non-real-time behavioral screening. Hence, one solution is to engage a third software, National Instruments VeriStand. This was created to integrate exported model from many simulation software and create one complex simulation solution. Another hands-on advantage is that using a PXIe embedded controller, VeriStand can upload the model and perform the simulation in real-time, allowing the user to observe the system behavior just like in the real life. The simulation time can be from seconds elongated to tens of hours. The data recording can be streamed and decimated as desired. Such a solution will be presented in this chapter.

Another important feature of this tool is given by the real-time target's nature. This allows external communication via analog and digital I/O s simplifying and facilitating the transition from model-based analysis to hardware in the loop (HIL) based analysis.

In order to offer the possibility of selecting the accuracy and the magnitude of the model, the authors considered developing multilevel complexity model, all organized in Energetic Macroscopic Representation (EMR). The latter ensures the user with the correct understanding of the system's power flow, creates a direct path when designing the control loops and facilitates the model exchange when passing from one level of complexity to another. It has to be mentioned that all the models presented in the following sections are designed in EMR philosophy. However, the interest of this chapter is not focused towards this special organization method, hence the reader is encouraged to lecture references [1–3].

### **2. Multilevel modeling of electric vehicle's propulsion unit**

The multilevel approach for developing simulation models for an electric vehicle's propulsion system must be broken down into its main assemblies: the power supply (batteries), the electronic converter, the electrical machine and the general system controller (electronic control unit-ECU). To have a comprehensive analysis, each of these assemblies will be addressed separately in the following sub-sections. For each model, the corresponding energetic macroscopic representation (EMR) block will be presented, separately from its content. The latter will be in fact the modeling approach of each assembly. EMR is an energy flow based graphical organization philosophy easing the building process of complex electromechanical systems. The connection between blocks is always based on action-reaction principle according to the physical causality. In **Figure 1**, the basic elements used in EMR organization are depicted. These will be used in the following sections as some assemblies, for example, an electrical machine will include more than one such block in their graphical description.

*Powerful Multilevel Simulation Tool for HiL Analysis of Urban Electric Vehicle's… DOI: http://dx.doi.org/10.5772/intechopen.98532*

**Figure 1.** *Main EMR pictograms.*

#### **Figure 2.**

*First (a) and second (b) order equivalent battery circuits and their EMR pictogram (c).*

Before diving in the presentation of the multilevel models, it is lucrative to explain the philosophy of building a control scheme using EMR. This is necessary because, in the present chapter, the control units will be also under discussion and their multilevel attribute will come from the level of compromises chosen when building its EMR representation. The control loop can be simply generated by inverting all the model blocks. Hence, the blue pictograms (the control) are a reversed model of the orange ones (the model). The main difference is that in the control loop, only the action path is reversed, while the reaction is neglected, as the latter one is necessary only for the model description and not for the control. In the above indicated references, more details about building EMR control loops are presented, hence the reader in encouraged to visit those.

#### **2.1 Multilevel modeling of batteries**

When it comes to model a power supply for an electric vehicle, one can choose between ideal or non-ideal approaches. The latter category can be divided into less or more complex mathematical description. In general, besides the ideal approach the non-ideal one include first and second order battery modeling [4, 5]. A source or a sink in EMR is represented by a green oval, outputting voltage, and inputting current or vice versa.

In **Figure 2** the pictogram used for the battery as electrical source in a simulation is depicted. The content of this block however, can be adjusted to the designer's

needs. In **Figure 2(a)**–**(c)**, the ideal battery model is depicted (where the voltage is imposed invariant of any changes in the system), the first and second order models (where the battery voltage is dependent on the sourced/sinked current and the state of charge (SOC)). The latter models are called first and second order ones due to the number of parallel RC branches that compound their circuit.

$$V\_{bat} = V\_{oc} - u\_1 - R\_s I\_{bat}; \frac{\mathbf{d}u\_1}{\mathbf{d}t} = -\frac{\mathbf{1}}{R\_p C\_p} u\_1 + \frac{\mathbf{1}}{C\_p} I\_{bat} \tag{1}$$

The mathematical translation of the circuits is detailed in Eq. (1) and Eq. (2). It is important to mention that the circuits parameter's values for such models are identified using laboratory experiments and actual battery cells. Such approaches were carried out by the authors on a LG (LGABD11865) battery with a rated capacity of 3000 mAh, 3.75 V rated, 4.2 V maximum over charge voltage, 2.7 V minimum discharge voltage, 0.5–1 A charging current and 0.2–0.5 A discharging current.

$$V\_{bat} = V\_{oc} - u\_1 - u\_2 - R\_s I\_{bat}$$

$$\frac{\mathbf{d}u\_1}{\mathbf{d}t} = -\frac{1}{R\_1 C\_1} u\_1 + \frac{1}{C\_1} I\_{bat}$$

$$\frac{\mathbf{d}u\_2}{\mathbf{d}t} = -\frac{1}{R\_2 C\_2} u\_1 + \frac{1}{C\_2} I\_{bat} \tag{2}$$

The complete process described step-by-step to identify the parameters of the battery cell needed to run the correct model is presented in detail in [4]. Even more, not only the experimental process itself is presented, but also very important post processing steps mandatory to reach high accuracy results.

The open circuit voltage (VOC) is identical for both models, being measured for the same conditions. The recorded function of the SOC is depicted in **Figure 3**.

To help the reader emphasize an image about the precision of these models, a comparative analysis was carried out, superimposing their results for the same testing conditions. After the parameter's identification process [5–8], both models

**Figure 3.** *The open circuit cell voltage vs. SOC.*

*Powerful Multilevel Simulation Tool for HiL Analysis of Urban Electric Vehicle's… DOI: http://dx.doi.org/10.5772/intechopen.98532*

presented in Eq. (1) and Eq. (2) were built in Matlab/Simulink, as depicted in **Figure 4**-left.

The considered test was to apply equal length current pulses with equal length relaxation time between them, discharging the cell from 100–10%. Initially, this test was applied to the actual cell, the results being also used to identify the necessary data for the simulation models. Imposing the same current variation to the two models, and comparing their voltage calculations with the measured one, one can conclude that the second order model reaches higher accuracy than the first order one. In the zoomed plot from **Figure 4**-right, it can be observed that the second order and measured voltages are in best agreement, while the first order's one marks a slight deviation.

To quantify this difference to a certain palpable value, the root mean square error (RMSE) is computed using Eq. (3) and the instantaneous error between the two signals.

$$RMSE = \sqrt{\frac{1}{T} \bullet \int\_0^T \left[V\_{measured}(t) - V\_{model}(t)\right]^2 dt} \tag{3}$$

The comparative results of the RMSE and the instantaneous error are depicted in **Figure 5** (left and right). In both cases one can observe that the second order model yells lower disturbance compared to the first order one. More, in **Figure 5**-left

**Figure 4.** *The Matlab/Simulink cell models (left) and the comparative analysis (right).*

**Figure 5.** *The RMSE (left) and the instantaneous error (right) of the battery models.*

shows that during the ongoing discharging process, the RMSE for the first order model increases gradually faster than the one of the second order one.

To conclude this section, one can understand that increasing the rank of the battery model, the gap between real and simulated results is mitigated. The cost of this is the increased complexity of models, time-consuming parameters identification and the necessity of more data post processing operations. On the contrary, the first order model is quite simple to design, its parameters are simple to identify with classical calculations and there is no need for values post processing. If the compromise of accepting a small error in the battery model with the gain of simplicity, the first order model is the hands-on solution.

#### **2.2 Multilevel modeling of power electronics' losses**

The general approach when dealing simulation approaches of electronic converters regard conventional ideal ones, with or without switching, so called smooth or switched models. However, none of these consider the losses that occur in a nonideal converter. The largest losses are due to the switching components (power transistors and/or diodes), while the rest of the losses inside a converter can be neglected (those on the driver and measuring circuits). One reason why the losses are generally neglected overall is because their actual measurement is rather difficult and requires dedicated equipment. In doing so, one simple method is to consider a general efficiency of the converter and add it into its calculations. So, already some straightforward solutions for modeling electronic converters were mentioned, solutions that are available in nearly any reference the reader would search. To add value to the research and to the present chapter, the authors introduce 2 different approaches to compute the losses that occur on one MOSFET transistor. Of course, these can be then extrapolated towards the total number of power switches.

In **Figure 6**-bottom the EMR pictogram used for any electronic converter is presented. It inputs the DC link voltage (Vdc), the load currents (i\_load) and the duty cycle (m\_s). After the internal calculations, the converter outputs the resulting voltage (u) to be supplied to the load and its output currents (i\_conv). The inputs and outputs do not change with the chosen method of internal calculations. Either is

**Figure 6.** *Smooth (a) and switched (b) converter architectures and their EMR pictogram (c).*

*Powerful Multilevel Simulation Tool for HiL Analysis of Urban Electric Vehicle's… DOI: http://dx.doi.org/10.5772/intechopen.98532*

a smooth or switched model, these remain the same and valid even if we consider DC or AC converters.

In addition to the above depicted models, this block can include also the calculus for the converter losses. Even if in the standard pictogram there are no input/output ports considered for this, the information, being additional, can be manipulated to/ from the block via wireless labels.

Taking into consideration of these losses is mandatory when one is interested in reaching optimal converter architectures [9, 10]. The following calculus can be adapted to any power transistor, the authors using the IRFP4668PBF MOSFET, having its specifications listed in **Table 1**.

The losses computed in any active switching electronic component can be broken down into: conduction losses, switching losses and blocking (leakage) losses, the later normally being neglected, as expressed in Eq. (4).

$$P\_{lossT} = P\_{condiction} + P\_{switchingT} \tag{4}$$

As mentioned before, two approaches will be presented in detail. The first one computes the power losses during conduction and switching the MOSFET while the second one computes losses during switch-on and switch-off transients.

In the first approach, the conduction and switching losses are computed based on Eqs. (5) and (6), with regards to the semiconductor's parameters and its operation. The latter is described via the duty cycle (D), the switching frequency (fsw) and the transistor's output capacitance (Coss)


#### **Table 1.**

*The main specifications for IRFP4668PbF MOSFET.*

$$P\_{conductionT} = I\_d^2 R\_{ds} D \tag{5}$$

$$P\_{switchingT} = \frac{\mathcal{V}I\_d}{2} \left( T\_{on} + T\_{\mathcal{eff}} \right) f\_{sw} + \mathcal{C}\_{os} V^2 f\_{sw} \tag{6}$$

On the other hand, the losses occurring in the diode attached to the transistor are broken down into conduction, reverse and switching ones. The total losses due to the diode's operation are:

$$P\_{\rm lossD} = P\_{\rm conductionD} + P\_{\rm reverseD} + P\_{\rm switchingD} \tag{7}$$

Each of the eq.'s (7) components are formulated in expressions (8)–(10), with parameters valued and explained in **Table 1**:

$$P\_{\text{conduction}} = I\_f V\_f \mathbf{D} \tag{8}$$

$$P\_{\text{reerve}} = I\_r V(\mathbf{1} - D) \tag{9}$$

$$P\_{switching} = \frac{T\_{rI} I\_{rm} V\_r f\_{sw}}{2} \tag{10}$$

This model is quite simple and represents the hands-on solution for quantifying the converter losses without engaging too many mathematical tools.

The more complex model, the conduction losses are computed function of the on-state resistance (Rds) and the current passing through the component (id):

$$P\_{cond} = R\_{ds}^2 \mathbf{i}\_d \tag{11}$$

The next component of the total losses, the switching one, is broken down into two states, according to the on and off transients. There are different opinions and mathematical interpretations on how to compute the voltage fall-time (tfu) to gain accuracy. Details are presented in Ref. [10]. Engaging a straight forward approach, the fall-time is considered to be composed of two parts in accordance with the variation of the gate capacitance:

$$\text{tf\u0} = \frac{\text{tf\u1} + \text{tf\u2}}{2}$$

$$\text{tf\u1} = (U\_{DD} - R\_{DS}I\_d)R\_G \frac{\text{C}\_{GD1}}{\text{U}\_{drv} - \text{U}\_{plateau}}\tag{12}$$

$$\text{tf\u2} = (U\_{DD} - R\_{DS}I\_d)R\_G \frac{\text{C}\_{GD2}}{\text{U}\_{drv} - \text{U}\_{plateau}}$$

In Eq. (12), the terms (Udrv) and (UDD) refer to the driver voltage that excites the transistor's gate and the converter's DC link voltage, respectively. The rest of the terms are to be found in **Table 1**.

The complementary model to compute the switch-off losses differ just by subtracting from Eq. (12) the driver voltage.

$$\text{tru} = \frac{\text{tru1} + \text{tru2}}{2}$$

$$\text{tru1} = (U\_{DD} - R\_{DS}I\_d)R\_G \frac{C\_{GD1}}{U\_{plateau}}\tag{13}$$

$$\text{tru2} = (\mathbf{U\_{DD}} - \mathbf{R\_{DS}}\mathbf{I\_d})R\_G \frac{\mathbf{C\_{GD2}}}{\mathbf{U\_{plateau}}}$$

*Powerful Multilevel Simulation Tool for HiL Analysis of Urban Electric Vehicle's… DOI: http://dx.doi.org/10.5772/intechopen.98532*

The required energy to turn on and off the transistor is calculated in Eq. (14) and (15).

$$E\_{\rm onT} = U\_{DD} I\_{\rm Don} \frac{tru + t\!\!\!u\!u\!u\!u\!f}{2} + Q\_{rr} U\_{DD} \tag{14}$$

$$E\_{\rm gff} = U\_{DD} I\_{D\rm gff} \frac{tru + t\mathcal{f}}{2} \tag{15}$$

With the above computed ingredients, one can calculate the power losses on the transistor, Eq. (16), and diode, Eq. (17).

$$P\_{swT} = \left(E\_{onT} + E\_{off}\right) f\_{sw} \tag{16}$$

$$P\_{swD} = \left(E\_{onD} + E\_{qfD}\right) f\_{sw} \approx E\_{onD} f\_{sw} \tag{17}$$

The losses in the MOSFET and the free-wheeling diode are computed as the sum of the conduction and switching losses.

$$P\_{Total}T = P\_{conductionT} + P\_{switchingT}$$

$$P\_{Total}T = R\_{DSun}I\_{Drms}^2 + (E\_{onM} + E\_{offM})f\_{sw} \tag{18}$$

$$P\_{TotalD} = P\_{ConductionD} + P\_{switchingD}$$

$$P\_{TotalD} = \mathcal{U}\_{DO}I\_{Fdv} + R\_DI^2\_{Fmus} + E\_{onD}f\_{sw} \tag{19}$$

It has to be mentioned that during operation, in one transistor or diode, the currents can be positive or negative. In an analytical approach, this would lead to decreased losses, hence, to correctly calculate those, the absolute current's value is used.

Comparing the results of the two approaches (**Figure 7**) one can conclude that the complex model reaches higher calculated values. This is more realistic as it contains more loss sources compared to the simple model. However, the simple model proves to offer a quite good quantification of the losses despite its ease in approach, reaching satisfactory results.

**Figure 7.** *The instantaneous converter losses for the simple and complex models.*

#### **2.3 Multilevel modeling of permanent magnet synchronous machines**

The general approach when modeling a permanent magnet synchronous machine (PMSM) is to use its mathematical representation in dq0 reference frame, fixed to the rotor.

$$v\_{\rm sd} - R\_{\rm s}i\_{\rm sd} - e\_{\rm sd} = \frac{\rm d}{\rm dt} \nu\_{\rm ds}$$

$$v\_{\rm sq} - R\_{\rm s}i\_{\rm sq} - e\_{\rm sq} = \frac{\rm d}{\rm dt} \nu\_{\rm qs} \tag{20}$$

$$T\_{pmsm} = \frac{3}{2} p \left( \Psi\_{\rm ds} i\_{\rm qs} - \Psi\_{\rm qs} i\_{\rm ds} \right)$$

$$e\_{\rm sd} = -\alpha \Psi\_{\rm qs}, e\_{\rm sq} = \alpha \Psi\_{\rm ds}$$

$$\Psi\_{\rm ds} = \Psi\_{\rm md} + L\_{\rm d}I\_{\rm ds} + L\_{\rm dq}I\_{\rm sq}$$

$$\Psi\_{\rm qs} = \Psi\_{\rm mqd} + L\_{\rm q}I\_{\rm qs} + L\_{\rm qd}I\_{\rm ds} \tag{21}$$

$$J\frac{d\mathcal{Q}}{dt} = T\_{pmm} - T\_{load} - B\mathcal{Q} \tag{22}$$

The variables in Eqs. (20) and (21) are: the phase resistance (Rs), the direct and quadrature inductances (Ld and Lq) and the cross-coupling inductances (Ldq and Lqd). The number of pole pairs is denoted with (p), while the rotational speed is marked by (ω) and the friction coefficient in marked by (B). The dq currents (Ids and Iqs) are computed by integration of the voltage expressions.

For a PMSM, the EMR model is constructed by coupling 3 pictograms, one accumulation element (for the windings) described by Eq. (20), one electromechanical conversion (for the torque generation), described by Eq. (21) and another accumulation element (for the mechanical equilibrium), described by Eq. (22), (visit **Table 1** for clarifications). Such a model is depicted in **Figure 8**.

Returning to Eq. (21), the dq magnetic flux equations give the opportunity to choose the level of modeling complexity. In this section, 3 different such levels will be detailed: based on constant dq inductances, based on variable dq inductances and a flux-linkage based model. The latter is the most complex and precise one.

To have a comprehensive analysis, like for the battery and the power inverter, for the PMSM the model's parameters are listed in **Table 2**.

The first level of complexity consists in using constant values for the d and q axes inductances. The identification of these is a very simple process. It can be carried out in finite element analysis (FEA) or on the real machine (or in both environments). It requires only fixing the rotor in 0 and 90 electrical degrees positions and applying in both one controlled voltage pulse. The time dependent slope of the current will return after some simple calculations the global machine inductance (L). Having this value, the d and q components are easy to be computed,

**Figure 8.** *The EMR for a PMSM.*

*Powerful Multilevel Simulation Tool for HiL Analysis of Urban Electric Vehicle's… DOI: http://dx.doi.org/10.5772/intechopen.98532*


#### **Table 2.** *The PMSM under analysis.*

using Eq. (23). Details about the identification process can be selected from references [11, 12].

$$L\_d = \frac{2}{3}L \quad (\theta\_{el} = \mathbf{0}^\circ),\\ L\_q = \frac{2}{3}L \quad (\theta\_{el} = \mathbf{90}^\circ) \tag{23}$$

The second level model regards detailed information about the machine under testing. The latter needs to be simulated in a FEA environment in order to compute the dq inductance's variations function of the machine current. This is generally ranged from �10 � In, where In is the machine's rated current. The method itself that allows preliminary identification of the 3-phase magnetic fluxes is the so called "frozen permeability" approach. Applying it demands to set to 0 the permanent magnet's remanent flux density, freezing its permeability. More details about this method are to be found in Ref.s [12, 13]. The resulted phase magnetic fluxes will be used to compute the dq inductances versus the machine current, applying Eq. (24).

$$\Psi\_{\rm d} = \frac{2}{3} \left( \Psi\_{\rm a} - \frac{1}{2} \Psi\_{\rm b} - \frac{1}{2} \Psi\_{\rm c} \right), \Psi\_{\rm q} = \frac{1}{\sqrt{3}} (\Psi\_{\rm b} - \Psi\_{\rm c}).$$

$$L\_{\rm d} = \frac{\Psi\_{\rm d}}{i\_{\rm d}}, L\_{\rm qd} = \frac{\Psi\_{\rm q}}{i\_{\rm d}}, L\_{\rm q} = \frac{\Psi\_{\rm q}}{i\_{\rm q}}, L\_{\rm dq} = \frac{\Psi\_{\rm d}}{i\_{\rm q}}\tag{24}$$

The outcome of these calculations is stored in look up tables (LUT) and introduced in the machine model. It is clear that such a procedure is impossible to be implemented in a real testbench or it would require complex and expensive hardware. One can observe that using the calculus from Eq. (23), the direct as well as the cross-coupling inductances are computed. Their variation function of the ranged current is depicted in **Figure 9**.

The last and altogether the most complex model is based on using instead of inductances, the variation of the d and q currents function of the d and q magnetic fluxes. These are 2D LUTs as depicted in **Figure 10**.

It is important to mention that building the 2D LUTs from **Figure 10** is a quite complex and challenging process. Here to the designer needs to have the FEA model of the machine under study. Several simulations need to be accomplished, fetching initially the Ψ<sup>d</sup> (id, iq) and Ψ<sup>q</sup> (id, iq). From this information mathematical inversion methods need to be applied to get id(Ψd, Ψq) and iq(Ψd, Ψq). The complete process is explained in detail in [14].

In **Figure 11** a simple comparative analysis of the results obtained when simulating all the 3 models for the same conditions are depicted. Focusing the attention on the variation of the q axis magnetic flux, it can be noticed that flux linkage and

**Figure 9.** *The direct and cross-coupling inductances calculated with frozen permeabilities.*

**Figure 10.** *The 2D LUTs of id(Ψd, Ψq) and iq(Ψd, Ψq).*

**Figure 11.** *The PMSM torque and Ψ<sup>q</sup> during benchmarking the simulation levels.*

frozen permeability models do saturate, while the one based on constant inductances reaches large values. The latter is ideal; hence the machine will never saturate. In this condition, one can perform simulations within rated operation. However, when attempting to go in overload region the results will not reflect the real machine operation.

The flux linkage and frozen permeabilities models are behaving quite in the same manner. However, the complexity of the flux linkage model is high, both in data post processing and design. The ultimate conclusion is that using the frozen

*Powerful Multilevel Simulation Tool for HiL Analysis of Urban Electric Vehicle's… DOI: http://dx.doi.org/10.5772/intechopen.98532*

permeabilities model will lead to quite satisfactory results reflecting closely the actual machine behavior.

#### **2.4 Designing the control loop**

Energetic Macroscopic Representation is one organization concept that besides helping the designer to build simulation programs that reflect the actual power flow of a real testbench, it also proves to be a very lucrative solution when it comes to building control loops. To do so, one has just to inverse the simulation model and keep only the action path, discarding the reaction one.

In **Figure 12** the control loop can be observed being highlighted in light blue. Its inversed character compared to the model (in orange) is noticeable and each block contains the mathematical description of the inversed action.

The reversed accumulation block contains a regulator that outputs the reference torque to be developed function of the error between the actual and the imposed speed (see Eq. (25)).

$$
\xi\_{n\text{PMSM}} = n\_{\text{PMSM\\_ref}} - n\_{\text{PMSM}}
$$

$$
\xi\_{n\text{PMSM}} \longrightarrow PI(k\_{p\\_n}, k\_{i\\_n}) \longrightarrow T\_{\text{PMSM}}\tag{25}
$$

The inversed block without controller computes the reference q axis current function of the refence torque above expressed. In the same time, the d axis current is imposed to 0, this for torque maximization purposes.

$$i\_{\rm sq\\_ref} = \frac{T\_{\rm PMSM}}{\frac{3}{2}p\left[\Psi\_{PM} + (L\_{\rm d} - L\_{\rm q})i\_{\rm sd}\right]}$$

$$i\_{\rm sd\\_ref} = \mathbf{0} \tag{26}$$

This reference d and q currents are compared with the actual ones. The resulting errors are sent to regulators that output the reference d and q voltages. This process is carried out in the third control block (see **Figure 12** from right to left).

**Figure 12.** *The complete PMSM simulation model in EMR organization.*

$$
\xi\_{\rm iqd} = i\_{\rm sqd\\_ref} - i\_{\rm sqd}
$$

$$
\xi\_{\rm iqd} \longrightarrow PI(k\_{p\\_i}, k\_{i\\_i}) \longrightarrow u\_{\rm sqd}
$$

$$
u\_{\rm sqd\\_est} = 
u\_{\rm sqd} + 
e\_{\rm sqd\\_est} \tag{27}
$$

The resulted d and q voltage refences are converter to 3-phase quantities and sent to the last control block, that computes the duty-cycle (m) for each phase. The duty-cycle is sent to the PWM generator (in orange) closing the model's loop. More details about generating the process model are indicated in Ref. [15].
