Simulation of Speed Control on a PMSM Using a PI Controller

—In order to manage the speed of a permanent magnet synchronous motor drive system, a practical approach for a PI controller has been developed and put into practice in this study. The adopted approach, which also preserves the proportional integral controller's straightforward structure and features, significantly enhanced the performance of the prior proportional integral controller. The final PI controller delivers quick and precise response, strong noise rejection, and minimal sensitivity to permanent magnet synchronous motor parameter fluctuations. The findings demonstrate that the suggested controller may provide best performance in terms of accuracy, parametric variation, and load torque disturbance when entering a proportional value of 0,013 and an integral value of 16,61. The proposed method has been exhaustively tested under various circumstances. The proposed solution not only possesses attributes like simplicity and ease of implementation for real-time, but also stability and effectiveness.


I. INTRODUCTION
The properties of conventional DC motors make them appropriate as servo motors because of their high efficiency.However, over time, the commutator and brushes may wear out and need to be replaced [1].Solid-state switches may eventually take the position of the commutator and brush functions, reducing the requirement for ongoing maintenance.Brushless DC motors are the current name for these motors.A permanent magnet synchronous motor (PMSM), which uses a permanent magnet in the stator to counteract this, is employed.The permanent magnet synchronous motor (PMSM) is one of the three-phase synchronous machine designs among synchronous motor types.A permanent magnet synchronous motor (PMSM) has a standard three-phase winding on the stator.The permanent magnetic material in the rotor performs the same function as the field winding in a typical synchronous machine.New magnetic materials like rare earths were introduced, which allowed for their development.The creation of highly effective permanent magnet motors is made possible by the employment of permanent magnets to produce a considerable magnetic flux in the air gap.[2]- [4].
In comparison to other popular machines used for AC servo drives, permanent magnet synchronous motors (PMSM) have various benefits.An induction motor's stator current includes both magnetizing and torque-generating components.A permanent magnet synchronous motor (PMSM)'s rotor uses permanent magnets, therefore the stator current just needs to produce torque rather than magnetizing current for a constant clearance flux [5]- [7].
A permanent magnet synchronous motor (PMSM) will therefore operate at a greater power factor (since there is no magnetizing current) and be more effective than an induction motor for the same power [8].The motor of a normal woundrotor synchronous machine, on the other hand, must use a DC excitation and is often powered by brushes and slip rings.This necessitates more time-consuming and extensive brush maintenance on the rotors.It should be noted that the creation of the permanent magnet synchronous motor (PMSM) was primarily motivated by the need to eliminate the shortcomings of the prior synchronous motor by substituting the field coil, DC power supply, and permanent magnet.So, like a synchronous motor, a permanent magnet synchronous motor (PMSM) has a sinusoidal induced Electromotive Force (EMF) and needs a sinusoidal current to generate a constant torque.The winding rotor of an induction or synchronous motor has a lower torque-to-inertia ratio and power density, according to recent study on the design of permanent magnet synchronous motors (PMSM) [9], [10].
According to current studies on the PMSM design, it is better suitable for a variety of applications since it has a higher torque-to-inertia ratio and power density than a wound-rotor synchronous motor [11].Because it is lighter and smaller, the PMSM is better suited for some highperformance applications.
Figure 1.Block diagram of PMSM drive system [15] Figure 2. PI Controller for PMSM Drive System [16] The performance of the drive system for the permanent magnet synchronous motor must therefore be carefully monitored by the intelligent speed controller.Additionally, independent of the reference signals supporting them, governors must be built from the ground up to give full dynamics current regulation and zero steady-state error.There are several controllers in PMSM drives.To eliminate steady-state errors, a PI controller can also be used.In

Permanent Magnet Synchronous Motor Control
According to the theory of Field Oriented Control (FOC), and ignoring the hysteresis loss of a permanent magnet synchronous motor, the voltage flux equations in the d-q coordinate system based on the power invariant principle, are obtained as follows [17].addition, the PI controller is very sensitive to changes in  =   +    −    (1) control speed, parameter variation, and load noise [12]- [14].
) Furthermore, this article is organized into several parts.

𝑞 𝑠 𝑞 𝑞 𝑑𝑡 𝑒 𝑑 𝑑 𝑓
In Section 2, a proposed PI controller for Permanent Magnet Synchronous Motor (PMSM) drive system speed controller is presented.Permanent Magnet Synchronous Motor (PMSM) nonlinear equations, speed and current controller equations, as well as real-time inverter switch models, vector control used in simulations, and switches are considered ideal.In section 3, the performance of the proposed controller is studied through several tests and compared with open loop operation.The conclusion section is presented in section 5.
(  ) is the d(q)-axis components of stator voltage.  is the resistance of three-phase winding.  is the current of stator three-phase winding.  (  ) is the current of d(q)-axis components.  (  ) is the d(q)-axis components of inductance.  is the electric angular velocity.  is the flux of permanent magnet.p is the pole numbers.When,   = 0 there is a linear condition between   and   , and PMSM can be equivalent to the model of the excited DC motor.

PMSM Drive System
Rotor position information is very important for fieldoriented vector control.Coordinate transformation uses the rotor position values to adjust the projection of the stator current vector on the rotating frame.Electrical position is not used directly in this transformation but its sine and cosine values are used.According to the concept, the control scheme is sensor-based or sensor-free, requiring rotor position.The control of permanent magnet synchronous motors can be classified into sensor-based and sensorless controls.
Sensor-based control refers to a method of controlling a system or device by using sensors to gather information about its environment and make decisions based on that data.The sensors detect various physical or environmental parameters, such as temperature, pressure, light, motion, or proximity, and provide feedback to the control system.This feedback is then used to adjust the system's behavior, optimize performance, or trigger specific actions.Sensor-less control refers to a control technique used in various fields, such as robotics, motor control, and automation, where the system operates without relying on external sensors for feedback.Instead of using dedicated sensors to measure the system's state or performance, sensor-less control methods infer or estimate this information based on internal measurements or other indirect means.Sensor-less control techniques are typically employed when the use of sensors is impractical, expensive, or undesirable.These methods often rely on mathematical models, algorithms, and advanced signal processing techniques to estimate the system's state.

Proportional-Integral Speed Control for PMSM
The purpose of PI speed control is to control the PMSM's speed by varying the torque or current of the motor.The motor's actual speed is reported to the control system, which then compares it to the setpoint speed that is required.The PI controller produces a control signal that modifies the motor's torque or current to reduce the mistake based on the difference between the setpoint and actual speed.
where Kp and Ki are the PI controller's gains.This controller's output is regarded as the reference torque.On the basis of the permitted maximum winding currents, a limit is placed on the speed controller output [18].Figure 2 depicts the layout of the PI controller for PMSM speed adjustment.
The control system determines the inaccuracy while continuously measuring the motor's speed.

III. RESULT AND ANALYSIS
Different load conditions were applied to the system.The Permanent Magnet Synchronous Motor (PMSM) was operated for a reference speed of 1500 rpm under the following circumstances: Case 1 at an open loop condition without a proportional-integral controller, Case 2 at a close loop condition with a proportional-integral controller, and Case 3 with a condition of changing the reference speed.

Case 1: Response System Without Controller
In case 1, testing under open-loop conditions will be carried out as a comparison to the closed-loop test using the PI controller.As a comparison, we will observe the response on the stator current side, rotor speed, stator back EMF, and electromagnetic torque.For the open-loop test design, it can be seen in Figure 3, where the speed setting is carried out at the source voltage of the permanent magnet synchronous motor.Figure 4 shows the speed response in open-loop conditions or without control.From the simulation results, it takes 0.5 seconds to reach the specified reference speed.

Case 2: Response System with PI Controller
In case 2, several output parameters will be observed, some of which are rotor speed, stator current, stator back EMF, and electromagnetic torque.The simulation design made using the PI controller can be seen in Figure 4.The simulation result with controller gains is KP = 0,013, KI = 16,61.with a reference speed of 1500 rpm is applied to the permanent magnet synchronous motor at 0.5 sec can be seen in figure 5.When compared to the uncontrolled condition, the PI controller used makes the speed setting more stable and the resulting response is better, especially in the parameters of rise time, settling time, and maximum overshoot.

Case 3: Response System at Different Reference Speed
In this third case, researchers will look at the stability of the PI controller with different reference speeds, namely at 3000 rpm, 2500 rpm and 2000 rpm. Figure 7 shows the difference between the speed setting in the open-loop condition, that is, by setting the source voltage compared to the PI controller, the value of rise time, error steady state can be seen.however, this PI controller raises a non-significant overshoot value.It can also be seen in the three simulation results, before the steady state conditions experienced peak undershoot events.So from the simulation results that have been carried out, when the openloop condition the system is in a critically damped state.Meanwhile, when using the PI controller the condition changes to being underdamped.
To determine the appropriate PI value to obtain the accuracy of speed control in PMSM, there are several steps that can be carried out, namely the first must determine the desired speed control specifications, such as the desired speed range, accuracy requirements, and desired dynamic response.Then, identify PMSM motor parameters, such as inertia parameters, torque-friction parameters, motor resistance and inductance parameters, and other necessary parameters.Next, Create a mathematical model for PMSM and PI controller design.Mathematical models for PMSM can be created using differential equations to describe motor dynamics.
Controller performance analysis can be done by comparing the response of the simulation or experiment with the desired speed control specifications.If the controller performance results do not meet the desired specifications, adjust the PI value until the controller performance meets the desired specifications.Thus, the appropriate PI value can be obtained to obtain the accuracy of speed control in PMSM.

Analysis of Speed Response to Load Changes
To observe PI control of the speed response of the PMSM, a load test was added with each load having a value of 2.5 Nm, 5 Nm, and 10 Nm.From the simulation results, the overshoot, rise time, settling time and steady state error values were observed.Addition of load is carried out by entering the mechanical load value tested via the TM section at the PMSM input.For more details, Figure 8 shows a PMSM simulation with variations in mechanical load.Figure 9 shows the speed response in PMSM using PI control with the addition of mechanical load.From the simulation results, it can be seen that the greater the mechanical load applied, the lower the speed value will be, causing the steady state error value to become greater.On the other hand, the rise time and settling time values become better when the mechanical load applied is greater.When the load applied was 10 Nm, no overshoot occurred, whereas when the load was applied at 2.5 Nm and 5 Nm, overshoot still occurred.Rise time and settling time are two parameters used to measure the response performance of a control system to changes in input or setpoint.Even though an increase in these two parameters can be considered an increase in system response, sometimes a value of 0.2 seconds is still considered slow and requires a proportional-integral (PI) controller to speed it up.These values may still be considered slow in some contexts, especially in control systems that require very fast responses, such as in autonomous vehicle systems.

Electromagnetic Torque Analysis
In addition to the speed response, an analysis of electromagnetic torque is also carried out because the speed and torque are closely related in all types of dynamic electric machines.To keep the rotor rotating at the desired speed, the amperage in the stator must be matched by the mechanical load placed on the motor.As the mechanical load increases, the electromagnetic torque generated must also increase to maintain the rotor rotational speed.Figure 9 and figure 10 is a comparison of the electromagnetic torque between the uncontrolled (magenta) and the PI controller (brown).When the PMSM is running without control, the electromagnetic torque generated depends on the input voltage and motor impedance.The torque generated can vary significantly depending on the load applied to the motor.Without control, the PMSM may not be able to provide constant torque at a given speed, and motor efficiency may also decrease due to unstable current.On the other hand, when the PMSM is controlled by proportional-integral (PI) control, the electromagnetic torque can be regulated and kept constant at different speeds.The PI control monitors and adjusts the flow of electric current in the motor to keep it at the desired speed.This allows the motor to work more efficiently and provides a more stable torque at each speed.Thus, the main difference between the electromagnetic torque in PMSM without control and with PI control is the ability to set and maintain a stable torque at any speed, as well as increase the overall efficiency of the motor.

Results of Application of the PI Controller to PMSM
Permanent Magnet Synchronous Motor (PMSM) is a type of synchronous motor that is efficient and reliable for use in various applications.In controlling PMSM speed, one of the methods used is proportional integral (PI) control.This combination of proportional (P) and Integral (I) parameters can help improve overall system response, speed up rise time and settling time, and increase system stability.However, the choice of control type and PI parameters must be adjusted to the specific characteristics of the PMSM.PMSM has six phases driven by an inverter circuit that works in six steps.This inverter is usually used to control the speed and direction of PMSM rotation.This six-step process continuously repeats itself, creating a stable rotation of the PMSM.The electronic controller regulates when each phase is connected and disconnected to control the speed and direction of rotation of the motor.Control algorithms can be customized based on specific application requirements.In Figure 11 is show the inverter output wave, from the simulation results it can be seen that the R phase, S phase and T phase look balanced, this indicates that the inverter is working well as a driver rather than a PMSM.After a comparison of the simulation results, the advantages of speed regulation with the PI controller, in terms of the stability of this PI controller, are included in a good assessment.PI control can provide good stability in PMSM speed settings.This is because PI control can reduce the response error and help the motor to reach the set-point speed quickly and accurately.Then in the ability to overcome PI control disturbances it can also help the motor in overcoming disturbances that occur in the system.Disturbances such as load or voltage fluctuations can be overcome by modifying the PI control parameters.Also, easy to implement, PI control is relatively easy to implement on permanent magnet synchronous motor systems and requires some experience in system control.However, there are several drawbacks to the PI controller used, which can be seen in response to slow load changes where the proportional integral (PI) control is less responsive to sudden load changes in the system.This can cause a delay in reaching the set-point speed.Then, implementation of proportional integral (PI) control requires sensors to measure motor speed, thereby increasing the overall system cost.and susceptible to imprecise parameters.Under these conditions, vulnerable means that the proportional-integral (PI) control is vulnerable to inappropriate parameter changes in the permanent magnet synchronous generator (PMSM) system, which can reduce control efficiency and speed accuracy.Therefore, proper parameter setting should be done regularly to maintain proportional integral (PI) control efficiency.

IV. CONCLUSION
In this study, PI-Controller speed regulation of PMSM drives was compared to open-loop operation.Performance The rotational speed of permanent synchronous motors (PMSM) can be changed using a control method called proportional integral (PI) control.Proportional Integral (PI) Figure 1 describes the basic building blocks of the PMSM drive.() =   −   () (4)   () is compared with the reference speed   and the resulting error is estimated at the nth sampling instant as.() = [( − 1) + {()( − 1)} ()]

Figure 8 .Figure 9 .
Figure 8. PI control simulation on PMSM with additional mechanical load