Measuring frequency and transient characteristics on Yaskawa Motor and controlling the motor by means of PC

This article familiarise its readers with possibilities of motor control, measuring frequency and transient characteristics on Yaskawa Motor in laboratory conditions using Matlab – Simulink software and its Real Time Target toolbox. Using the Real Time Target toolbox along with MF624 I/O card, we are able to capture, store and submit information on state variables of the motor in real time. The manufacturer of Yaskawa motors does not provide with information about frequency and transient characteristics of current, speed or position loops. In order to verify the mathematical model, it is necessary to measure these characteristics on a specific motor type and use the obtained results to recalculate amplification of individual controllers by means of the mathematical model. Adjusting the current controller is not possible, since the values are fixed by the manufacturer. The manufacturer allows the user of the current controller to choose from 10 pre-set values (from the „softest“ to the „most stiff“). By making the model more accurate, we may perform simulations of various load states that are approaching real ones.


Introduction
Parameters of the motor mathematical models were obtained from the motor manufacturer's documentation and from measuring reaction of required torque jump when connected to a torque (current) feedback circuit (Fig. 1) and from reaction of required speed jump when connected to a speed feedback circuit.Even though the measurement and simulation processes on Figs. 1 and 2 corresponds very well with each other (reaction of torque and speed jumps), it was decided to perform the measurement directly on the motor in order to specify the shape of the frequency characteristics.
The measurement of frequency characteristics in speed feedback are shown in Chapter 3. A difference between measurement and simulation is expected mainly during higher frequencies.The measurement will also verify setting values of the speed controller, since the manufacturer only provides with time constant of the speed controller in seconds along with information about "indeterminate" amplification, whose unit does not make the amount of amplification apparent (from the physical point of view).

Preparation of Frequency Characteristics Measurement
•Creating a Simulink model with marked inputs and outputs to MF624 card (Fig. 3) and set signal sampling period.
•In Real -Time Workshop (tab in Simulation -Configuration Parameters menu), we choose the target platform for Simulink model compilation.In our case, the platform is Real -Time Windows Target.Compilation of the model into C programming language -this part is performed by Simulink automatically.
•When the compilation is complete, we switch Simulink to External mode and press the Connect to Target button.The code compiled to C programming language is executed, establishing connection with the Real -Time kernel.That also results in measuring card initialisation and the parameters from the compiled model are set on the card as well.The last step is to press the Start Real -Time Code button (same button we used for starting regular Simulink simulation) and we may start with the measurement.1. Feed a pink noise to the speed loop input as the required speed value and measure the speed.A course of the amplitude and phase frequency characteristics may be obtained by means of mathematical apparatus.Unfortunately, this procedure did not turn out to be the right choice, since the output (analog) signal was severely deformed by the environmental influences, and it was not possible to use it as a credible result.2. Feed a function of ‫ܣ‬ ଵ ή ሺ߱ ή ‫ݐ‬ሻ with A 1 defined amplitude and f frequency corresponding to ߱ ൌ ʹ ή ߨ ή ݂ to the speed loop input as the required speed value.
The actual speed of motor shaft rotation with A 2 amplitude and ߮ phase shift would be measured at the analog output.However, this method may be used only for frequencies of up to appx.200 Hz; exceeding this value will lead to significant declination of A 2 amplitude and the noise modulated on the carrier signal will overcome the carries signal by its amplitude, resulting in erroneous evaluation of the measurement.3. Feed a function of ‫ܣ‬ ଵ ή ሺ߱ ή ‫ݐ‬ሻ with A 1 defined amplitude and f frequency corresponding to ߱ ൌ ʹ ή ߨ ή ݂ to a speed loop input as the required speed value.
Unlike in the previous item, in this case, the analog speed will not be measured.What we will measure, however, will be the position pulses from the incremental sensor (turning of the shaft) and numerically derive them afterwards, thus providing us with information on actual motor shaft rotation speed.
This method did not lead to satisfying results as well, since the biggest problem was in the numerical derivation.4. Feed a function of ‫ܣ‬ ଵ ή ሺ߱ ή ‫ݐ‬ሻ with A 1 defined amplitude and f frequency corresponding to ߱ ൌ ʹ ή ߨ ή ݂ to a speed loop input as the required speed value.
The difference is that in this case, we measured position (pulses), which we did not transform to speed by means of derivation.
By using correlation of input and output and respecting that the input is ‫ܣ‬ ଵ ή ሺ߱ ή ‫ݐ‬ሻ function and the output is ‫ܣ‬ ଶ ή ሺ߱ ή ‫ݐ‬ ߮ሻ function, we are able to evaluate the frequency characteristics of the speed loop even on relatively high frequencies, where the output amplitude is becoming very low.

Comparison of Measurement and Simulation
Fig. 4 shows the comparison of measured and simulated amplitude and phase frequency characteristics of Yaskawa motor when in speed feedback circuit.The controllers were set to factory settings.
A very good conformity (mainly in case of amplitude characteristics) between measurement and simulation on mathematical model has been reached.Due to that, it may be concluded that constant values of speed controller in the mathematical models were appropriately chosen pursuant to speed jump reactions.

Torque Control Mode
This is the most subordinate control mode.Its equivalent is the simulation scheme, where the input value is required current and the output value is the actual current.In this case, the required value is the required torque fed as analog voltage corresponding to the moment to CN1 connector, PIN 9.The output is actual torque of the motor shaft.
In case we want to control the turning of the motor shaft fitted with inverter in torque control mode, we shall use the higher-level control system with speed and position feedback.For this purpose, we would use a control computer (see Fig. 5) with Matlab software and Real Time Windows Target toolbox, as partially described in Chapters 2 and 3.The Pn400 constant contains conversion of voltage to motor torque.Feedforwards offer choice between position derivations, or we may calculate the course of the required speed and acceleration in advance and feed it separately to the schematic."Manual Switch" is used for that.
Advantages and Disadvantages of the Torque Control Mode + Possibility to create own control structures in PC, we are not limited by the fixed structure in the controller, + easy to add various filters, + possibility to easily choose data source for feedforward -Calculation of speed derivations by means of decreased amount of pulses is not one of the most suitable, -analog value of the required torque may be loaded with noise, -high PC system requirements due to the necessity to use higher sample frequencies.

Speed Control Mode
In this control mode, the current (torque) feedback and speed feedback is closed in the Yaskawa inverter, while only the position feedback is closed in the higher-level control system.To provide a better understanding, the Fig. 7 contains constant values changed on the inverter.-analog value of the required speed may be loaded with noise, consequently affecting the xe deviation position.An offset compensation shall be performed by means of offset.

Position Control Mode
In this mode, all 3 controller loops (current, speed and position) are closed in the inverter and the higher-level control system feeds the inverter only with information on required position; the output of the inverter is the actual position of motor shaft (in pulses as well).

Advantages and Disadvantages of Position Control Mode
+ Noise no longer affects the signal between PC controller and inverter (unless analog feedforward is used).
-The controller fixed structure cannot be modified, -it is crucial to use accurate path-generating pulse generator.

Conclusion
It is worth noting that when using method No. 4 described in Chapter 3, we were able to perform the measurement above the frequency of 1,000 Hz.Around the frequency values of 1,500 Hz, there is a noticeable resonance peak on the amplitude characteristics.
This matter is of mechanical nature and is probably caused by vibrations of the shaft sensor (due to sensor mounting).The resonant frequency was measured several times in the speed feedback (to exclude measurement errors), even with various controller setting.However, the amplitude peak occurs repeatedly.

Fig. 1 Fig. 2
Fig. 1 Reaction of the assembly to the torque jump

Fig. 3 A
Fig. 3 A simple Simulink model

Fig. 5
Fig. 5 Connection of PC to the Yaskawa inverter in the torque control mode The analog voltage value corresponding to the required speed (in rpm) is fed to the inverter via CN1 connector, PIN 5 (V-REF).We change the Pn002 constant in the inverter in order to be able to feed the analog torque feedforward value (T-REF) to CN1 connector, PIN 9.

Fig. 7
Fig. 7 Connection of PC to the Yaskawa inverter in the speed control mode

Fig. 8
Fig. 8 Schematic of PC controller for speed control mode Research in this article was supported by targeted support for specific university research in terms of the TUL student grant competition (Project 21010 -Complex Optimisation of Manufacturing Systems and Processes 2).